edu.sdsc.inca.depot.persistent
Class ArgDAO

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

public class ArgDAO
extends DAO

This class transfers Arg objects between memory and the DB.


Field Summary
 
Fields inherited from class edu.sdsc.inca.depot.persistent.DAO
logger
 
Constructor Summary
ArgDAO()
           
 
Method Summary
static Arg load(Arg a)
          Returns an Arg object from the DB with the same field values as one specified, or null if no such object appears in the DB.
static Arg loadOrSave(Arg a)
          Returns an Arg 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 Arg update(Arg a)
          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

ArgDAO

public ArgDAO()
Method Detail

load

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

Parameters:
a - 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 Arg loadOrSave(Arg a)
                      throws PersistenceException
Returns an Arg 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:
a - 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 Arg update(Arg a)
                  throws PersistenceException
A wrapper around DAO.update that handles the necessary casting.

Parameters:
a - the object to update
Returns:
a, for convenience
Throws:
PersistenceException - on error