|
ensembl-hive
2.7.0
|
Inheritance diagram for Bio::EnsEMBL::DBSQL::Support::FullIdCache:Public Member Functions | |
| public Hash | build_cache () |
| public | put () |
| public | remove () |
| public | clear_cache () |
| public Object | get_by_additional_lookup () |
| public ArrayRef | get_all_by_additional_lookup () |
| public void | remove_from_additional_lookup () |
| public HashRef | compute_keys () |
| public void | add_to_additional_lookups () |
| protected HashRef | _additional_lookup () |
Public Member Functions inherited from Bio::EnsEMBL::DBSQL::Support::BaseCache | |
| public Bio::EnsEMBL::DBSQL::Support::BaseCache | new () |
| public Bio::EnsEMBL::DBSQL::BaseAdaptor | adaptor () |
| public Hash | cache () |
| public void | delete_cache () |
| public Scalar | get () |
| public ArrayRef | get_by_list () |
| public ArrayRef | get_by_sql () |
| public Scalar | put () |
| public Scalar | remove () |
| public void | clear_cache () |
| public List | cache_keys () |
| public List | cached_values () |
| public Int | size () |
| public Hash | build_cache () |
An implementation of caching which uses a raw hash to hold all available values from an adaptor. Useful for working with a controlled vocabulary table where cardinality is low. Provides extra functionality to compute additional lookup keys.
Definition at line 22 of file FullIdCache.pm.
| protected HashRef Bio::EnsEMBL::DBSQL::Support::FullIdCache::_additional_lookup | ( | ) |
Description : Returns the additional lookup hash Example :
Returntype : HashRef Exceptions : none Caller : BaseAdaptors Status : Beta
Code:
| public void Bio::EnsEMBL::DBSQL::Support::FullIdCache::add_to_additional_lookups | ( | ) |
Arg [1] : String The key used in the primary lookup hash. Normally
a DB identifier
Arg [2] : Object The object to add to the additional lookups
Description : Internally calls the compute_keys() method and adds
the object to the _additional_lookup() hash.
Returntype : None
Exceptions : Thrown if additional lookups are not supported
Caller : BaseAdaptors
Status : Beta
Code:
| public Hash Bio::EnsEMBL::DBSQL::Support::FullIdCache::build_cache | ( | ) |
Description: Builds a cache keyed by dbID and populated from a call
using generic_fetch()
Returntype : Hash
Exceptions : None
Caller : BaseAdaptors
Status : Beta
Code:
| public Bio::EnsEMBL::DBSQL::Support::FullIdCache::clear_cache | ( | ) |
Undocumented method
Code:
| public HashRef Bio::EnsEMBL::DBSQL::Support::FullIdCache::compute_keys | ( | ) |
Arg [1] : Object The object to compute keys from
Description : Override to provide support for additional key lookup. The
keys of the hash should represent the lookup name and the
value is the computed key.
Example :Returntype : HashRef key is the lookup name and value is the computed key Exceptions : none Caller : BaseAdaptors Status : Beta
Code:
| public ArrayRef Bio::EnsEMBL::DBSQL::Support::FullIdCache::get_all_by_additional_lookup | ( | ) |
Arg [1] : String key of the lookup to search for the value in
Arg [2] : String value to search for. We expect exact lookups in the hash
Description : Returns an array of all the objects linked to the value
in the specified lookup.
Example : Returntype : ArrayRef of objects keyed agains the second argument
Exceptions : Throws an exception if there are more than one ID linked to the
value lookup. Also thrown if additional lookups are not supported
Caller : BaseAdaptors
Status : Beta
Code:
| public Object Bio::EnsEMBL::DBSQL::Support::FullIdCache::get_by_additional_lookup | ( | ) |
Arg [1] : String key of the lookup to search for the value in Arg [2] : String value to search for. We expect exact lookups in the hash Description : Returns the object linked to the value in the specified lookup. Example :
Returntype : Object a single object
Exceptions : Throws an exception if there are more than one ID linked to the
value lookup. Also thrown if additional lookups are not supported
Caller : BaseAdaptors
Status : Beta
Code:
| public Bio::EnsEMBL::DBSQL::Support::FullIdCache::put | ( | ) |
Undocumented method
Code:
| public Bio::EnsEMBL::DBSQL::Support::FullIdCache::remove | ( | ) |
Undocumented method
Code:
| public void Bio::EnsEMBL::DBSQL::Support::FullIdCache::remove_from_additional_lookup | ( | ) |
Arg [1] : String The lookup key to remove from the additional lookup hash Arg [2] : Object The object to remove from the additional lookup hash Description : Re-computes the additional keys for this object Example :
Returntype : None Exceptions : Thrown if we do not support additional lookups Caller : BaseAdaptors Status : Beta
Code: