Check if the resource has a datastore.

        Returns:
            bool: Whether the resource has a datastore or not
328167
def has_datastore(self):
        # type: () -> bool
        
        success, result = self._read_from_hdx('datastore', self.data['id'], 'resource_id',
                                              self.actions()['datastore_search'])
        if not success:
            logger.debug(result)
        else:
            if result:
                return True
        return False
1351047
public final boolean datastoreExists() {

        String thisMethodName = "datastoreExists";

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.exit(tc, thisMethodName, new Boolean(false));
        }
        return false;
    }
200827
def has_model(self, model):
        
        # TODO:
        # - accept DigitalObject for model?
        # - convert model pid to info:fedora/ form if not passed in that way?
        try:
            rels = self.rels_ext.content
        except RequestFailed:
            # if rels-ext can't be retrieved, confirm this object does not have a RELS-EXT
            # (in which case, it does not subscribe to the specified content model)
            if "RELS-EXT" not in self.ds_list.keys():
                return False
            else:
                raise

        st = (self.uriref, modelns.hasModel, URIRef(model))
        return st in rels
1357860
def has_ssd(self):
        """"""
        for member in self._drives_list():
            if member.media_type == constants.MEDIA_TYPE_SSD:
                return True
        return False
623510
def datastore(self, datastore):
        
        if isinstance(datastore, DataStore):
            self._datastore = datastore
        else:
            raise Exception('%s is not a valid datastore.' % datastore)
765992
public boolean isExternalizable(final Datastore datastore) {
        if (datastore == null) {
            return false;
        }

        if (datastore instanceof JdbcDatastore) {
            return true;
        }

        if (datastore instanceof CsvDatastore) {
            final Resource resource = ((CsvDatastore) datastore).getResource();
            return isExternalizable(resource);
        }

        if (datastore instanceof ExcelDatastore) {
            final Resource resource = ((ExcelDatastore) datastore).getResource();
            return isExternalizable(resource);
        }

        if (datastore instanceof ArffDatastore) {
            final Resource resource = ((ArffDatastore) datastore).getResource();
            return isExternalizable(resource);
        }

        if (datastore instanceof ElasticSearchDatastore) {
            final SimpleTableDef[] tableDefs = ((ElasticSearchDatastore) datastore).getTableDefs();
            if (tableDefs == null) {
                return true;
            }
        }

        if (datastore instanceof MongoDbDatastore) {
            final SimpleTableDef[] tableDefs = ((MongoDbDatastore) datastore).getTableDefs();
            if (tableDefs == null) {
                return true;
            }
        }

        if (datastore instanceof CouchDbDatastore) {
            final SimpleTableDef[] tableDefs = ((CouchDbDatastore) datastore).getTableDefs();
            if (tableDefs == null) {
                return true;
            }
        }

        if (datastore instanceof SalesforceDatastore) {
            return true;
        }
        if (datastore instanceof DynamoDbDatastore) {
            final SimpleTableDef[] tableDefs = ((DynamoDbDatastore) datastore).getTableDefs();
            if (tableDefs == null) {
                return true;
            }
        }
        if (datastore instanceof JsonDatastore) {
            final Resource resource = ((JsonDatastore) datastore).getResource();
            return isExternalizable(resource);
        }
        if (datastore instanceof FixedWidthDatastore) {
            return true;
        }
        if (datastore instanceof KafkaDatastore) {
            return true;
        }
        return false;
    }
889006
def isAppStore(s):
    
    if s.parent is None:
        return False
    substore = s.parent.getItemByID(s.idInParent)
    return s.parent.query(InstalledOffering,
                          InstalledOffering.application == substore
                          ).count() > 0
454337
def get_datastore_id(kwargs=None, call=None):
    '''
    
    '''
    if call == 'action':
        raise SaltCloudSystemExit(
            'The get_datastore_id function must be called with -f or --function.'
        )

    if kwargs is None:
        kwargs = {}

    name = kwargs.get('name', None)
    if name is None:
        raise SaltCloudSystemExit(
            'The get_datastore_id function requires a name.'
        )

    try:
        ret = list_datastores()[name]['id']
    except KeyError:
        raise SaltCloudSystemExit(
            'The datastore \'{0}\' could not be found.'.format(name)
        )

    return ret
202576
def has_member(self, device_object):
        
        if device_object.tag == "computer":
            container_search = "computers/computer"
        elif device_object.tag == "mobile_device":
            container_search = "mobile_devices/mobile_device"
        else:
            raise ValueError

        return len([device for device in self.findall(container_search) if
                    device.findtext("id") == device_object.id]) is not 0
794253
def isattr(self, key):
        
        try:
            if key in self.datastore:
                return True
            else:
                return False
        except AttributeError:
            return False
601539
def is_managed(using=None):
    
    if using is None:
        managed = False
        for using in tldap.backend.connections:
            connection = tldap.backend.connections[using]
            if connection.is_managed():
                managed = True
        return managed
    connection = tldap.backend.connections[using]
    return connection.is_managed()
1087804
def _has_local_storage(self, pod=None):
        

        for vol in pod.volumes:
            if vol.emptyDir is not None:
                return True
        return False
1018954
def list_datastores(kwargs=None, call=None):
    '''
    
    '''
    if call != 'function':
        raise SaltCloudSystemExit(
            'The list_datastores function must be called with '
            '-f or --function.'
        )

    return {'Datastores': salt.utils.vmware.list_datastores(_get_si())}
1338382
def _is_dataset(uri, config_path):
    """"""
    uri = dtoolcore.utils.sanitise_uri(uri)
    storage_broker = _get_storage_broker(uri, config_path)
    return storage_broker.has_admin_metadata()
689623
def contains(self, data):
        
        for item in self:
            if item.data() == data:
                return True
        return False
16323
def _use_datastore(self, key, options=None):
    
    flag = ContextOptions.use_datastore(options)
    if flag is None:
      flag = self._datastore_policy(key)
    if flag is None:
      flag = ContextOptions.use_datastore(self._conn.config)
    if flag is None:
      flag = True
    return flag
485295
public function checkIntegrityData()
    {
        $prevId = 0;
        $identifier = $this->getIdentifier();

        foreach ($this as $item) {
            $this->checkIdentifierType($item[$identifier]);

            if ($item[$identifier] < $prevId) {
                throw new DataStoreException("This storage type supports only a list ordered by id ASC");
            }

            $prevId = $item[$identifier];
        }

        return true;
    }