|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.sdsc.inca.depot.persistent.DAO
public abstract class DAO
This is the base class for the depot DAOs--classes that transfer objects between memory and the depot database. Since child DAO classes will each deal with a different DB class, this class doesn't define abstract methods for children to override. Instead, the set of methods that child classes should define is described in comments below. Which methods from this set a child class actually implements depends on which are needed; the description is intended to provide a convention to follow.
Field Summary | |
---|---|
protected static org.apache.log4j.Logger |
logger
|
Constructor Summary | |
---|---|
DAO()
|
Method Summary | |
---|---|
static java.lang.Object |
save(java.lang.Object o)
Stores an object that has not previously been saved in the database. |
static java.util.List |
selectMultiple(java.lang.String query,
java.lang.Object[] params)
Return the set of objects selected by a Hibernate query. |
static java.lang.Object |
selectUnique(java.lang.String query,
java.lang.Object[] params)
Return the unique object selected by a Hibernate query. |
static java.lang.Object |
update(java.lang.Object o)
Updates an object that has previously been saved in the database. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.apache.log4j.Logger logger
Constructor Detail |
---|
public DAO()
Method Detail |
---|
public static java.lang.Object selectUnique(java.lang.String query, java.lang.Object[] params) throws PersistenceException
query
- the Hibernate query; see Hibernate doc for formatparams
- a set of objects to plug into the query in spots marked
as :p0, :p1, etc. May be null if the query has no params.
PersistenceException
- on errorpublic static java.util.List selectMultiple(java.lang.String query, java.lang.Object[] params) throws PersistenceException
query
- the Hibernate query; see Hibernate doc for formatparams
- a set of objects to plug into the query in spots marked
as :p0, :p1, etc. May be null if the query has no params.
PersistenceException
- on errorpublic static java.lang.Object save(java.lang.Object o) throws PersistenceException
o
- the object to store
PersistenceException
- on errorpublic static java.lang.Object update(java.lang.Object o) throws PersistenceException
o
- the object to store
PersistenceException
- on error
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |