Package org.biojavax.bio.db.biosql
Class BioSQLBioEntryDB
java.lang.Object
org.biojava.utils.AbstractChangeable
org.biojavax.bio.db.AbstractBioEntryDB
org.biojavax.bio.db.biosql.BioSQLBioEntryDB
- All Implemented Interfaces:
Changeable,BioEntryDB,BioEntryDBLite
- Since:
- 1.5
- Author:
- Richard Holland, David Scott
-
Field Summary
Fields inherited from interface org.biojavax.bio.db.BioEntryDBLite
BIOENTRYS -
Constructor Summary
ConstructorsConstructorDescriptionBioSQLBioEntryDB(Object session) Creates a new instance of BioSQLBioEntryDBBioSQLBioEntryDB(String name, Object session) Creates a new instance of BioSQLBioEntryDB -
Method Summary
Modifier and TypeMethodDescriptionvoid_addBioEntry(BioEntry seq) voidaddBioEntry(BioEntry seq) Adds a sequence to the database.getBioEntry(String id) Retrieve a single BioEntry by its id.getBioEntrys(Set ids) Retrieve multiple BioEntry by their ids.getBioEntrys(Set ids, BioEntryDB db) Retrieve multiple BioEntry into a specific sequence database.getName()Get the name of this sequence database.ids()Get an immutable set of all of the IDs in the database.voidremoveBioEntry(String id) Remove the BioEntry associated with an ID from the database.Methods inherited from class org.biojavax.bio.db.AbstractBioEntryDB
getBioEntryIteratorMethods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
-
Constructor Details
-
BioSQLBioEntryDB
Creates a new instance of BioSQLBioEntryDB -
BioSQLBioEntryDB
Creates a new instance of BioSQLBioEntryDB
-
-
Method Details
-
getName
Description copied from interface:BioEntryDBLiteGet the name of this sequence database.- Returns:
- the name of the sequence database, which may be null.
-
getHibernateSession
-
ids
Description copied from interface:BioEntryDBGet an immutable set of all of the IDs in the database. The ids are legal arguments to getBioEntry.- Returns:
- a Set of ids - at the moment, strings
-
getBioEntry
Description copied from interface:BioEntryDBLiteRetrieve a single BioEntry by its id.- Parameters:
id- the id to retrieve by- Returns:
- the BioEntry with that id
- Throws:
IllegalIDException- if the database doesn't know about the idBioException- if there was a failure in retrieving the BioEntry
-
getBioEntrys
Description copied from interface:BioEntryDBLiteRetrieve multiple BioEntry by their ids.- Parameters:
ids- a set of ids to retrieve by- Returns:
- the BioEntrys with those ids
- Throws:
IllegalIDException- if the database doesn't know about the idBioException
-
getBioEntrys
Description copied from interface:BioEntryDBLiteRetrieve multiple BioEntry into a specific sequence database. If that database is null, a new HashBioEntryDB is used.- Parameters:
ids- a set of ids to retrieve bydb- a database to load the seqs into- Returns:
- the BioEntrys with that id
- Throws:
IllegalIDException- if the database doesn't know about the idBioException
-
removeBioEntry
Description copied from interface:BioEntryDBLiteRemove the BioEntry associated with an ID from the database.- Specified by:
removeBioEntryin interfaceBioEntryDBLite- Overrides:
removeBioEntryin classAbstractBioEntryDB- Parameters:
id- the ID of the BioEntry to remove- Throws:
IllegalIDException- if there is no BioEntry for the IDBioException- if something failed while removing the BioEntry for that IDChangeVetoException- if either the database does not allow BioEntrys to be removed or the modification was vetoed
-
addBioEntry
Description copied from interface:BioEntryDBLiteAdds a sequence to the database.- Specified by:
addBioEntryin interfaceBioEntryDBLite- Overrides:
addBioEntryin classAbstractBioEntryDB- Parameters:
seq- the BioEntry to add- Throws:
IllegalIDException- if a uniqe ID could not be generated for BioEntryBioException- if something goes wrong with adding the BioEntryChangeVetoException- if either the database does not allow BioEntrys to be added or the modification was vetoed
-
_addBioEntry
-