|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.jpattern.orm.session.ASession
public abstract class ASession
| Constructor Summary | |
|---|---|
ASession(IOrmClassToolMap ormClassToolMap)
|
|
| Method Summary | ||
|---|---|---|
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> objects)
Delete the objects from the database |
|
|
delete(T object)
Delete one object from the database |
|
|
find(Class<T> clazz,
Object value)
Load a registered Object from the database |
|
|
find(Class<T> clazz,
Object[] values)
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 |
|
protected IOrmClassToolMap |
getOrmClassToolMap()
|
|
|
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 |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.googlecode.jpattern.orm.session.ISessionSqlPerformer |
|---|
sqlPerformer |
| Methods inherited from interface com.googlecode.jpattern.orm.session.ISession |
|---|
beginTransaction, close |
| Constructor Detail |
|---|
public ASession(IOrmClassToolMap ormClassToolMap)
| Method Detail |
|---|
public final <T> IOrmQuery<T> findQuery(Class<T> clazz,
Class<?>... joinClasses)
throws OrmException
ISession
findQuery in interface ISessionclazz - 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
public final <T> IOrmQuery<T> findQuery(Class<T> clazz,
String alias)
throws OrmException
ISession
findQuery in interface ISessionclazz - The class of the object that will be retrieved by the query execution.alias - The alias of the class in the query.
OrmException
public final IOrmCustomQuery findQuery(String selectClause,
Class<?> clazz,
Class<?>... joinClasses)
throws OrmException
ISession
findQuery in interface ISessionselectClause - 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
public final IOrmCustomQuery findQuery(String selectClause,
Class<?> clazz,
String alias)
throws OrmException
ISession
findQuery in interface ISessionselectClause - 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.
OrmExceptionprotected final IOrmClassToolMap getOrmClassToolMap()
public final <T> T find(Class<T> clazz,
Object value)
throws OrmException
ISession
find in interface ISessionclazz - The Class of the object to loadvalue - the value of the identifying column of the object
OrmException
public final <T> T find(Class<T> clazz,
Object[] values)
throws OrmException
ISession
find in interface ISessionclazz - The Class of the object to loadvalues - an ordered array with the values of the identifying columns of the object
OrmException
public final <T> void save(T object)
throws OrmException
ISession
save in interface ISessionOrmException
public final <T> void save(List<T> objects)
throws OrmException
ISession
save in interface ISessionobjects - the objects to persist
OrmException
public final <T> void update(T object)
throws OrmException
ISession
update in interface ISessionOrmException
public final <T> void update(List<T> objects)
throws OrmException
ISession
update in interface ISessionobjects - the objects to update
OrmException
public final IUpdate update(Class<?> clazz)
throws OrmException
ISession
update in interface ISessionclazz - the TABLE related Class
OrmException
public final IUpdate update(Class<?> clazz,
String alias)
throws OrmException
ISession
update in interface ISessionclazz - the TABLE related Classalias - The alias of the class in the query.
OrmException
public final <T> void delete(T object)
throws OrmException
ISession
delete in interface ISessionOrmException
public final <T> void delete(List<T> objects)
throws OrmException
ISession
delete in interface ISessionOrmException
public final IDelete delete(Class<?> clazz)
throws OrmException
ISession
delete in interface ISessionclazz - the TABLE related Class
OrmException
public final IDelete delete(Class<?> clazz,
String alias)
throws OrmException
ISession
delete in interface ISessionclazz - the TABLE related Classalias - The alias of the class in the query.
OrmException
public final IScriptExecutor scriptExecutor()
throws OrmException
ISession
scriptExecutor in interface ISessionOrmExceptionpublic final ISqlExecutor sqlExecutor()
ISession
sqlExecutor in interface ISession
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||