Retrieve a piece of data from a named collection whose key is the one provided.
@param collectionID
@param key
765020
function( collectionID, key ) {
            collectionID = collectionID.toLowerCase();

            var deferred = q.defer();
            schemaSyncer.prepCollection(collectionID)
            .then( function() {
                sqliteObj.find( collectionID, {'_id': key}, false, 1 ).then(
                    // success
                    function(r) {
                        if ( r && r.length > 0 ) {
                            var firstElement = r[0];
                            if ( isValue(firstElement[key]) ) {
                                var value = firstElement[key];
                                deferred.resolve(value);
                            } else {
                                deferred.resolve(firstElement);
                            }
                        }
                        return deferred.resolve(null);
                    },

                    // failure
                    function(e) {
                        return q.reject(e);
                    }
                );
            });

            return deferred.promise;
        }
666374
def _collection(self, key):
    ''''''
    collection = str(key.path)
    if not collection in self._items:
      self._items[collection] = dict()
    return self._items[collection]
975664
@SuppressWarnings("unchecked")
  @Nullable
  public <T> T get(Key<T> key) {
    return (T) data.get(key);
  }
378658
public V get (int key)
    {
        Record<V> rec = getImpl(key);
        return (rec == null) ? null : rec.value;
    }
596231
def from_stored(self, key):
        
        # only one stored key allowed
        if self.stored_key:
            raise ValueError('This collection is already based on a stored one')

        # prepare the collection
        self.stored_key = key
        self.intersect(_StoredCollection(self.cls.get_connection(), key))
        self.sort(by='nosort')  # keep stored order

        # count the number of results to manage empty result (to not behave like
        # expired key)
        self._stored_len = self.cls.get_connection().llen(key)

        return self
964016
def retrieve_resource(collection, key):
    
    session = _get_session()
    cls = endpoint_class(collection)
    resource = session.query(cls).get(key)
    if resource is None:
        raise InvalidAPIUsage(404)
    return resource
1220998
@Override
    public Object get(PageContext pc, Collection.Key key) throws PageException {
	return get(key);
    }
565796
@Override
  public <T> boolean isCollectionReadonly(String collectionName) {
    CollectionMetaData cmd = cmdMap.get(collectionName);
    return cmd.isReadOnly();
  }
512359
@Override
    public CompletableFuture<Collection<V>> getCollectionAndRefreshAsync(String key, int expireSeconds) {
        return (CompletableFuture) refreshAsync(key, expireSeconds).thenCompose(v -> getCollectionAsync(key));
    }
634384
@Override
    public Value get(Object key) {
        if (key instanceof String) {
            String name = (String) key;
            return get(name);
        }
        return fields.get(key);
    }
411520
@SuppressWarnings({ "rawtypes", "unchecked" })
    protected Object parseCollection(GetterMethodCover method, 
            Collection collection) {
        if(method.isArrayObjectCollection()) {
            return parseArrayObjectCollection(method, collection);
        }
        else if(method.isObjectCollection()) {
            return parseObjectCollection(method, collection);
        }
        else if(method.isByteCollection()) {
            return collectionToPrimitiveByteArray(collection);
        }
        else if(method.isCharCollection()) {
            return charCollectionToPrimitiveByteArray(collection);
        }
        else if(method.isArrayCollection()) {
            return parseArrayCollection(method, collection);
        }
        return collection;
    }
463657
def get_collection(self, key, using_name=True):
        
        object_ = self.application.get_object(key, using_name=using_name)
        collection = Collection.from_dict(object_.__dict__)
        for http_cmd in ["get", "post", "put", "delete"]:
            collection.__setattr__(http_cmd, self.auth.__getattribute__(http_cmd))
        return collection
499423
private boolean isReadOnlyKey(Collection.Key key) {

	return (key.equals(KeyConstants._java) || key.equals(KeyConstants._separator) || key.equals(KeyConstants._os) || key.equals(KeyConstants._coldfusion)
		|| key.equals(KeyConstants._lucee));
    }
989990
@Override
    public V get(Object key) {
        if (key == null) {
            throw new NullPointerException();
        }
        
        CachedValue<K, V> entry = map.get(key);
        if (entry == null) {
            return null;
        }
        if (isValueExpired(entry)) {
            if (map.remove(key, entry)) {
                onValueRemove(entry);
                return null;
            }
            return get(key);
        }
        return readValue(entry);
    }
1293448
public function getCollection($collectionName)
    {
        $this->initialize();

        return isset($this->collections[$collectionName]) ? $this->collections[$collectionName] : null;
    }
619102
public V get(K key, int index) {
		final Collection<V> collection = get(key);
		return CollUtil.get(collection, index);
	}
823369
public CollectionDescriptorDef getCollection(String name)
    {
        CollectionDescriptorDef collDef = null;

        for (Iterator it = _collections.iterator(); it.hasNext(); )
        {
            collDef = (CollectionDescriptorDef)it.next();
            if (collDef.getName().equals(name))
            {
                return collDef;
            }
        }
        return null;
    }