## 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

    public class BioSQLBioEntryDB

extends AbstractBioEntryDB

Since:
  1.5
Author:
  Richard Holland, David Scott

Field Summary

Fields inherited from interface org.biojavax.bio.db.BioEntryDBLite
`BIOENTRYS`

Constructor Summary
`BioSQLBioEntryDB(Object session)` Creates a new instance of BioSQLBioEntryDB
`BioSQLBioEntryDB(String name, Object session)` Creates a new instance of BioSQLBioEntryDB

Method Summary
`void` `_addBioEntry(BioEntry seq)`
`void` `addBioEntry(BioEntry seq)` Adds a sequence to the database.
`BioEntry` `getBioEntry(String id)` Retrieve a single BioEntry by its id.
`BioEntryDB` `getBioEntrys(Set ids)` Retrieve multiple BioEntry by their ids.
`BioEntryDB` `getBioEntrys(Set ids, BioEntryDB db)` Retrieve multiple BioEntry into a specific sequence database.
`Object` `getHibernateSession()`
`String` `getName()` Get the name of this sequence database.
`Set` `ids()` Get an immutable set of all of the IDs in the database.
`void` `removeBioEntry(String id)` Remove the BioEntry associated with an ID from the database.

Methods inherited from class org.biojavax.bio.db.AbstractBioEntryDB
`getBioEntryIterator`

Methods inherited from class org.biojava.utils.AbstractChangeable
`addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BioSQLBioEntryDB

    public BioSQLBioEntryDB(Object session)

  Creates a new instance of BioSQLBioEntryDB

### BioSQLBioEntryDB

    public BioSQLBioEntryDB(String name,
                            Object session)

  Creates a new instance of BioSQLBioEntryDB

Method Detail

### getName

    public String getName()

  Description copied from interface: `BioEntryDBLite`
  Get the name of this sequence database.

  Returns:
    the name of the sequence database, which may be null.

### getHibernateSession

    public Object getHibernateSession()

### ids

    public Set ids()

  Description copied from interface: `BioEntryDB`
  Get 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

    public BioEntry getBioEntry(String id)
                         throws IllegalIDException,
                                BioException

  Description copied from interface: `BioEntryDBLite`
  Retrieve 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 id
    `BioException` - if there was a failure in retrieving the BioEntry

### getBioEntrys

    public BioEntryDB getBioEntrys(Set ids)
                            throws BioException,
                                   IllegalIDException

  Description copied from interface: `BioEntryDBLite`
  Retrieve 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 id
    `BioException`

### getBioEntrys

    public BioEntryDB getBioEntrys(Set ids,
                                   BioEntryDB db)
                            throws BioException,
                                   IllegalIDException

  Description copied from interface: `BioEntryDBLite`
  Retrieve 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 by
    `db` - a database to load the seqs into
  Returns:
    the BioEntrys with that id
  Throws:
    `IllegalIDException` - if the database doesn't know about the id
    `BioException`

### removeBioEntry

    public void removeBioEntry(String id)
                        throws IllegalIDException,
                               BioException,
                               ChangeVetoException

  Description copied from interface: `BioEntryDBLite`
  Remove the BioEntry associated with an ID from the database.

  Specified by:
    `removeBioEntry` in interface `BioEntryDBLite`
  Overrides:
    `removeBioEntry` in class `AbstractBioEntryDB`
  Parameters:
    `id` - the ID of the BioEntry to remove
  Throws:
    `IllegalIDException` - if there is no BioEntry for the ID
    `BioException` - if something failed while removing the BioEntry for that ID
    `ChangeVetoException` - if either the database does not allow BioEntrys to be removed or the modification was vetoed

### addBioEntry

    public void addBioEntry(BioEntry seq)
                     throws IllegalIDException,
                            BioException,
                            ChangeVetoException

  Description copied from interface: `BioEntryDBLite`
  Adds a sequence to the database.

  Specified by:
    `addBioEntry` in interface `BioEntryDBLite`
  Overrides:
    `addBioEntry` in class `AbstractBioEntryDB`
  Parameters:
    `seq` - the BioEntry to add
  Throws:
    `IllegalIDException` - if a uniqe ID could not be generated for BioEntry
    `BioException` - if something goes wrong with adding the BioEntry
    `ChangeVetoException` - if either the database does not allow BioEntrys to be added or the modification was vetoed

### _addBioEntry

    public void _addBioEntry(BioEntry seq)
                      throws IllegalIDException,
                             BioException,
                             ChangeVetoException

  Throws:
    `IllegalIDException`
    `BioException`
    `ChangeVetoException`