|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Session
| Method Summary | ||
|---|---|---|
|
delete(List<T> object)
Delete the objects from the database |
|
|
delete(T object)
Delete one object from the database |
|
DeleteQuery |
deleteQuery(Class<?> clazz)
Delete the objects of a specific table |
|
DeleteQuery |
deleteQuery(Class<?> clazz,
String alias)
Delete the objects of a specific table |
|
|
doInTransaction(TransactionCallback<T> transactionCallback)
Execute a block of code inside a Transaction or participate to an existing one |
|
|
doInTransaction(TransactionDefinition transactionDefinition,
TransactionCallback<T> transactionCallback)
Execute a block of code inside a Transaction or participate to an existing one |
|
|
exist(Class<T> clazz,
Object idValue)
Return whether a Bean with a specific id exists in the DB. |
|
|
exist(Class<T> clazz,
Object[] idValues)
Return whether a Bean with the specific ids exists in the DB. |
|
|
exist(T object)
Return whether a Bean exist in the DB using the Object type and id(s). |
|
|
find(Class<T> clazz,
Object idValue)
Find a bean using is ID. |
|
|
find(Class<T> clazz,
Object[] idValues)
Find a bean using is IDs. |
|
|
findQuery(Class<T> clazz)
Create a new query |
|
|
findQuery(Class<T> clazz,
String alias)
Create a new query |
|
CustomFindQuery |
findQuery(String selectClause,
Class<?> clazz,
String alias)
Create a new query |
|
|
findUnique(Class<T> clazz,
Object idValue)
Find a bean using is ID. |
|
|
findUnique(Class<T> clazz,
Object[] idValues)
Find a bean using is IDs. |
|
|
save(Collection<T> objects)
Persist the new objects in the database |
|
|
save(T object)
Persist the new object in the database |
|
|
saveOrUpdate(Collection<T> objects)
For each object in the list, update the object if it exists, otherwise save it |
|
|
saveOrUpdate(T object)
Update the object if it exists, otherwise save it |
|
ScriptExecutor |
scriptExecutor()
A script executor useful to execute multiple sql statement from files. |
|
SqlExecutor |
sqlExecutor()
An executor to perform any kind of plain SQL statements. |
|
Transaction |
transaction()
Begin a transaction or participate to an existing one using the default ITransactionDefinition |
|
Transaction |
transaction(TransactionDefinition transactionDefinition)
Begin a or participate to an existing one depending on the specific transactionDefinition |
|
|
update(Collection<T> objects)
Update the values of the existing objects in the database |
|
|
update(T object)
Update the values of an existing object in the database |
|
UpdateQuery |
updateQuery(Class<?> clazz)
Update the objects of a specific TABLE |
|
UpdateQuery |
updateQuery(Class<?> clazz,
String alias)
Update the objects of a specific TABLE |
|
| Method Detail |
|---|
Transaction transaction()
throws OrmException
OrmException
Transaction transaction(TransactionDefinition transactionDefinition)
throws OrmException
OrmException<T> T doInTransaction(TransactionCallback<T> transactionCallback)
transactionCallback -
<T> T doInTransaction(TransactionDefinition transactionDefinition,
TransactionCallback<T> transactionCallback)
transactionCallback -
<T> boolean exist(T object)
throws OrmException
T - object -
OrmException
<T> boolean exist(Class<T> clazz,
Object idValue)
throws OrmException
T - clazz - The Class of the object to loadidValue - the value of the identifying column of the object
OrmException
<T> boolean exist(Class<T> clazz,
Object[] idValues)
throws OrmException
T - clazz - The Class of the object to loadidValues - an ordered array with the values of the identifying columns of the object
OrmException
<T> T find(Class<T> clazz,
Object idValue)
throws OrmException
T - clazz - The Class of the object to loadidValue - the value of the identifying column of the object
OrmException
<T> T find(Class<T> clazz,
Object[] idValues)
throws OrmException
T - clazz - The Class of the object to loadidValues - an ordered array with the values of the identifying columns of the object
OrmException
<T> T findUnique(Class<T> clazz,
Object idValue)
throws OrmException,
OrmNotUniqueResultException
T - clazz - The Class of the object to loadidValue - the value of the identifying column of the object
OrmException
OrmNotUniqueResultException
<T> T findUnique(Class<T> clazz,
Object[] idValues)
throws OrmException,
OrmNotUniqueResultException
T - clazz - The Class of the object to loadidValues - an ordered array with the values of the identifying columns of the object
OrmException
OrmNotUniqueResultException
<T> T save(T object)
throws OrmException
T - object -
OrmException
<T> T saveOrUpdate(T object)
throws OrmException
T - object -
OrmException
<T> T update(T object)
throws OrmException
T - object -
OrmException
<T> List<T> save(Collection<T> objects)
throws OrmException
T - objects - the objects to persist
OrmException
<T> List<T> saveOrUpdate(Collection<T> objects)
throws OrmException
T - objects - the objects to persist
OrmException
<T> List<T> update(Collection<T> objects)
throws OrmException
T - objects - the objects to update
OrmException
UpdateQuery updateQuery(Class<?> clazz)
throws OrmException
clazz - the TABLE related Class
OrmException
UpdateQuery updateQuery(Class<?> clazz,
String alias)
throws OrmException
clazz - the TABLE related Classalias - The alias of the class in the query.
OrmException
<T> int delete(T object)
throws OrmException
T - object -
OrmException
<T> int delete(List<T> object)
throws OrmException
T - objects - the objects to delete
OrmException
DeleteQuery deleteQuery(Class<?> clazz)
throws OrmException
clazz - the TABLE related Class
OrmException
DeleteQuery deleteQuery(Class<?> clazz,
String alias)
throws OrmException
clazz - the TABLE related Classalias - The alias of the class in the query.
OrmException
<T> FindQuery<T> findQuery(Class<T> clazz)
throws OrmException
T - clazz - The class of the object that will be retrieved by the query execution. The simple class name will be used as alias for the class
OrmException
<T> FindQuery<T> findQuery(Class<T> clazz,
String alias)
throws OrmException
T - clazz - The class of the object that will be retrieved by the query execution.alias - The alias of the class in the query.
OrmException
CustomFindQuery findQuery(String selectClause,
Class<?> clazz,
String alias)
throws OrmException
selectClause - the select clause of the query (do not use the "select" keyword)clazz - The class of the object that will be retrieved by the query execution.alias - The alias of the class in the query.
OrmExceptionSqlExecutor sqlExecutor()
ScriptExecutor scriptExecutor()
throws OrmException
OrmException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||