|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ORMSession
Method Summary | |
---|---|
void |
clear(PageContext pc)
clear the session |
void |
close(PageContext pc)
close the session |
Component |
create(PageContext pc,
String entityName)
creates a entity matching the given name |
void |
delete(PageContext pc,
Object obj)
delete elememt from datasource |
void |
evictCollection(PageContext pc,
String entity,
String collection)
|
void |
evictCollection(PageContext pc,
String entity,
String collection,
String id)
|
void |
evictEntity(PageContext pc,
String entity)
|
void |
evictEntity(PageContext pc,
String entity,
String id)
|
void |
evictQueries(PageContext pc)
|
void |
evictQueries(PageContext pc,
String cacheName)
|
Object |
executeQuery(PageContext pc,
String hql,
Array params,
boolean unique,
Struct queryOptions)
|
Object |
executeQuery(PageContext pc,
String hql,
Struct params,
boolean unique,
Struct queryOptions)
|
void |
flush(PageContext pc)
flush all elements in session |
DatasourceConnection |
getDatasourceConnection()
|
ORMEngine |
getEngine()
engine from session |
Object |
getRawSession()
|
ORMTransaction |
getTransaction(boolean autoManage)
|
boolean |
isValid()
is session valid or not |
Component |
load(PageContext pc,
String name,
String id)
load and return a Object that match given id, if there is more than one Object matching the id, only the first Object is returned |
Component |
load(PageContext pc,
String name,
Struct filter)
load and return a Object that match given filter, if there is more than one Object matching the filter, only the first Object is returned |
Array |
loadAsArray(PageContext pc,
String name,
String id)
load and return a array of Objects matching given id |
Array |
loadAsArray(PageContext pc,
String name,
String id,
String order)
|
Array |
loadAsArray(PageContext pc,
String name,
Struct filter)
load and return a array of Objects matching given filter |
Array |
loadAsArray(PageContext pc,
String name,
Struct filter,
Struct options)
load and return a array of Objects matching given filter |
Array |
loadAsArray(PageContext pc,
String name,
Struct filter,
Struct options,
String order)
|
Component |
loadByExample(PageContext pc,
Object obj)
load and return a Object that match given sampleEntity, if there is more than one Object matching the id, only the first Object is returned |
Array |
loadByExampleAsArray(PageContext pc,
Object obj)
load and return a array of Objects matching given sampleEntity |
Component |
merge(PageContext pc,
Object obj)
Attaches the specified entity to the current ORM session. |
void |
reload(PageContext pc,
Object obj)
Reloads data for an entity that is already loaded. |
void |
save(PageContext pc,
Object obj,
boolean forceInsert)
insert entity into datasource, even the entry already exist |
Query |
toQuery(PageContext pc,
Object obj,
String name)
|
Method Detail |
---|
void flush(PageContext pc) throws PageException
pc
-
PageException
void delete(PageContext pc, Object obj) throws PageException
name
-
PageException
void save(PageContext pc, Object obj, boolean forceInsert) throws PageException
entity
-
PageException
void reload(PageContext pc, Object obj) throws PageException
obj
-
ORMException
PageException
Component create(PageContext pc, String entityName) throws PageException
entityName
-
ORMException
PageException
Component merge(PageContext pc, Object obj) throws PageException
entity
-
PageException
void clear(PageContext pc) throws PageException
pc
-
PageException
Component load(PageContext pc, String name, Struct filter) throws PageException
name
- filter
-
PageException
Query toQuery(PageContext pc, Object obj, String name) throws PageException
PageException
Component load(PageContext pc, String name, String id) throws PageException
name
- id
-
PageException
Array loadAsArray(PageContext pc, String name, Struct filter) throws PageException
name
- filter
-
PageException
Array loadAsArray(PageContext pc, String name, Struct filter, Struct options) throws PageException
name
- filter
- options
-
PageException
Array loadAsArray(PageContext pc, String name, Struct filter, Struct options, String order) throws PageException
pc
- name
- filter
- options
- order
-
PageException
Array loadAsArray(PageContext pc, String name, String id) throws PageException
name
- id
-
PageException
Array loadAsArray(PageContext pc, String name, String id, String order) throws PageException
pc
- name
- id
- order
-
PageException
Array loadByExampleAsArray(PageContext pc, Object obj) throws PageException
name
- id
-
PageException
Component loadByExample(PageContext pc, Object obj) throws PageException
name
- id
-
PageException
void evictCollection(PageContext pc, String entity, String collection) throws PageException
PageException
void evictCollection(PageContext pc, String entity, String collection, String id) throws PageException
PageException
void evictEntity(PageContext pc, String entity) throws PageException
PageException
void evictEntity(PageContext pc, String entity, String id) throws PageException
PageException
void evictQueries(PageContext pc) throws PageException
PageException
void evictQueries(PageContext pc, String cacheName) throws PageException
PageException
Object executeQuery(PageContext pc, String hql, Array params, boolean unique, Struct queryOptions) throws PageException
PageException
Object executeQuery(PageContext pc, String hql, Struct params, boolean unique, Struct queryOptions) throws PageException
PageException
void close(PageContext pc) throws PageException
pc
-
PageException
boolean isValid()
ORMEngine getEngine()
Object getRawSession()
ORMTransaction getTransaction(boolean autoManage)
DatasourceConnection getDatasourceConnection()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |