edu.sdsc.inca.depot.persistent
Class SeriesDAO

java.lang.Object
  extended by edu.sdsc.inca.depot.persistent.DAO
      extended by edu.sdsc.inca.depot.persistent.SeriesDAO

public class SeriesDAO
extends DAO

This class transfers Series objects between memory and the DB.


Field Summary
 
Fields inherited from class edu.sdsc.inca.depot.persistent.DAO
logger
 
Constructor Summary
SeriesDAO()
           
 
Method Summary
static Series load(Series s)
          Returns a Series from the DB with the same field values as one specified, null if no such Series appears in the DB.
static Series loadOrSave(Series s)
          Returns a Series object from the DB with the same field values as one specified, or the saved version of the specified object if no such object appears in the DB.
static Series update(Series s)
          A wrapper around DAO.update that handles the necessary casting.
 
Methods inherited from class edu.sdsc.inca.depot.persistent.DAO
save, selectMultiple, selectUnique, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SeriesDAO

public SeriesDAO()
Method Detail

load

public static Series load(Series s)
                   throws PersistenceException
Returns a Series from the DB with the same field values as one specified, null if no such Series appears in the DB.

Parameters:
s - an object that contains field values used in the retrieval
Returns:
an object from the DB that contains the same values
Throws:
PersistenceException - on err

loadOrSave

public static Series loadOrSave(Series s)
                         throws PersistenceException
Returns a Series object from the DB with the same field values as one specified, or the saved version of the specified object if no such object appears in the DB. Synchronized to avoid race conditions that could result in DB duplicates.

Parameters:
s - an object that contains field values used in the retrieval
Returns:
an object from the DB that contains the same values
Throws:
PersistenceException - on err

update

public static Series update(Series s)
                     throws PersistenceException
A wrapper around DAO.update that handles the necessary casting.

Parameters:
s - the Series to update
Returns:
s for convenience
Throws:
PersistenceException - on error