|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ISession
| Method Summary | ||
|---|---|---|
ITransaction |
beginTransaction()
Open a new Transaction |
|
void |
close()
Close the current session and release the connection to the database. |
|
IDelete |
delete(Class<?> clazz)
Delete the objects of a specific table |
|
IDelete |
delete(Class<?> clazz,
String alias)
Delete the objects of a specific table |
|
|
delete(List<T> object)
Delete the objects from the database |
|
|
delete(T object)
Delete one object from the database |
|
|
find(Class<T> clazz,
Object idValue)
Load a registered Object from the database |
|
|
find(Class<T> clazz,
Object[] idValues)
Load a registered Object from the database |
|
|
findQuery(Class<T> clazz,
Class<?>... joinClasses)
Create a new query |
|
|
findQuery(Class<T> clazz,
String alias)
Create a new query |
|
IOrmCustomQuery |
findQuery(String selectClause,
Class<?> clazz,
Class<?>... joinClasses)
Create a new custom query |
|
IOrmCustomQuery |
findQuery(String selectClause,
Class<?> clazz,
String alias)
Create a new query |
|
|
save(List<T> objects)
Persist the new objects in the database |
|
|
save(T object)
Persist the new object in the database |
|
IScriptExecutor |
scriptExecutor()
A script executor useful to execute multiple sql statement from files. |
|
ISqlExecutor |
sqlExecutor()
An executor to perform any kind of plain SQL statements. |
|
IUpdate |
update(Class<?> clazz)
Update the objects of a specific TABLE |
|
IUpdate |
update(Class<?> clazz,
String alias)
Update the objects of a specific TABLE |
|
|
update(List<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 |
|
| Method Detail |
|---|
ITransaction beginTransaction()
throws OrmException
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> void save(T object)
throws OrmException
T - object -
OrmException
<T> void save(List<T> objects)
throws OrmException
T - objects - the objects to persist
OrmException
<T> void update(T object)
throws OrmException
T - object -
OrmException
<T> void update(List<T> objects)
throws OrmException
T - objects - the objects to update
OrmException
IUpdate update(Class<?> clazz)
throws OrmException
clazz - the TABLE related Class
OrmException
IUpdate update(Class<?> clazz,
String alias)
throws OrmException
clazz - the TABLE related Classalias - The alias of the class in the query.
OrmException
<T> void delete(T object)
throws OrmException
T - object -
OrmException
<T> void delete(List<T> object)
throws OrmException
T - objects - the objects to delete
OrmException
IDelete delete(Class<?> clazz)
throws OrmException
clazz - the TABLE related Class
OrmException
IDelete delete(Class<?> clazz,
String alias)
throws OrmException
clazz - the TABLE related Classalias - The alias of the class in the query.
OrmException
<T> IOrmQuery<T> findQuery(Class<T> clazz,
Class<?>... joinClasses)
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 classjoinClasses - a list of class that will be added in the 'from' using comma separation. For every class the simple class name will be used as alias.
OrmException
<T> IOrmQuery<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
IOrmCustomQuery findQuery(String selectClause,
Class<?> clazz,
Class<?>... joinClasses)
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. The simple class name will be used as alias for the classjoinClasses - a list of class that will be added in the 'from' using comma separation. For every class the simple class name will be used as alias.
OrmException
IOrmCustomQuery 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.
OrmException
void close()
throws OrmException
OrmExceptionISqlExecutor sqlExecutor()
IScriptExecutor scriptExecutor()
throws OrmException
OrmException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||