|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DbSession
Responsibilities of an JPA database session in interaction with NestedSetsTreeDAO. Should be implementable using a Hibernate Session or an JPA EntityManager.
Method Summary | |
---|---|
void |
delete(java.lang.Object node)
Deletes passed object from persistence. |
void |
executeUpdate(java.lang.String statement,
java.lang.Object[] parameters)
Executes an update or delete statement. |
void |
flush()
Flushes all changes to database. |
java.lang.Object |
get(java.lang.Class<?> entityClass,
java.io.Serializable id)
Fast cached read of an object by identity (primary key). |
int |
queryCount(java.lang.String queryText,
java.lang.Object[] parameters)
Executes given query and returns the resulting count of found records. |
java.util.List<?> |
queryList(java.lang.String queryText,
java.lang.Object[] parameters)
Executes a query and returns its result list. |
void |
refresh(java.lang.Object node)
Re-reads passed object from persistence. |
java.lang.Object |
save(java.lang.Object node)
Save the passed object to persistence. |
Method Detail |
---|
java.lang.Object get(java.lang.Class<?> entityClass, java.io.Serializable id)
entityClass
- the persistence class of the entity (POJO).id
- the primary key of the entity.
java.util.List<?> queryList(java.lang.String queryText, java.lang.Object[] parameters)
queryText
- the JPQL text for the query.parameters
- the positional parameters for "?" place-holders in query text.
int queryCount(java.lang.String queryText, java.lang.Object[] parameters)
select count(x) ...
query.
queryText
- the JPQL text for the query.parameters
- the positional parameters for "?" place-holders in query text.
java.lang.Object save(java.lang.Object node)
node
- the object to save.void refresh(java.lang.Object node)
node
- the object to refresh.void delete(java.lang.Object node)
node
- the object to delete.void executeUpdate(java.lang.String statement, java.lang.Object[] parameters)
statement
- the text of the JPQL statement.parameters
- the positional parameters for place-holders in command text.void flush()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |