edu.sdsc.inca.depot.persistent
Class SeriesConfigDAO

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

public class SeriesConfigDAO
extends DAO

This class transfers SeriesConfig objects between memory and the DB.


Field Summary
 
Fields inherited from class edu.sdsc.inca.depot.persistent.DAO
logger
 
Constructor Summary
SeriesConfigDAO()
           
 
Method Summary
static SeriesConfig load(java.lang.Long id)
          Returns a SeriesConfig object from the DB with the id specified, null if no such object appears in the DB.
static SeriesConfig loadOrSave(SeriesConfig sc)
          Returns a SeriesConfig 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 SeriesConfig update(SeriesConfig sc)
          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

SeriesConfigDAO

public SeriesConfigDAO()
Method Detail

load

public static SeriesConfig load(java.lang.Long id)
                         throws PersistenceException
Returns a SeriesConfig object from the DB with the id specified, null if no such object appears in the DB.

Parameters:
id - the id of the object to be retrieved
Returns:
an object from the DB marked with the given id
Throws:
PersistenceException - on err

loadOrSave

public static SeriesConfig loadOrSave(SeriesConfig sc)
                               throws PersistenceException
Returns a SeriesConfig 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 could result in DB duplicates.

Parameters:
sc - 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 SeriesConfig update(SeriesConfig sc)
                           throws PersistenceException
A wrapper around DAO.update that handles the necessary casting.

Parameters:
sc - the SeriesConfig to update
Returns:
sc for convenience
Throws:
PersistenceException - on error