public interface Session
| Modifier and Type | Method and Description |
|---|---|
void |
beginTransaction()
Start a new transaction.
|
List<Object> |
buildCriterionList(Object key,
List<String> keyAttributeNames)
Build a list of "equal" criterions for the given key object and list of
attribute names.
|
List<Object> |
buildQueryParameterValueList(Object key,
List<String> keyAttributeNames)
Build a list of parameter values for the given key object and list of
attribute names.
|
String |
buildQueryString(Class<?> clazz,
List<String> keyAttributeNames)
Build a query string for the given class and list of attribute names.
|
boolean |
canRollbackTransaction()
Return true if the session has a transaction that can be rolled back.
|
void |
close()
Close this database session.
|
void |
commitTransaction()
Commit the current transaction.
|
void |
delete(Object object)
Delete the given object in the database.
|
void |
flush()
Flush the session cache changes to the database.
|
Object |
get(FindData findData)
Get one object from the database according to the given findData.
|
List<?> |
getAll(FindData findData)
Get a list of objects from the database according to the given findData.
|
boolean |
hasActiveTransaction()
Return true if the session has an active transaction.
|
boolean |
hasLockFlag(Class<?> domainClass)
Return true if the domain class uses lock flags (optimistic
locking) in the database.
|
void |
initialize(Object object)
Initialize (load) a proxy object or collection from the database.
|
Serializable |
insert(Object object)
Insert a new object in the database.
|
boolean |
isInitialized(Object object)
Check if the given proxy object or collection is initialized (loaded) from the database.
|
Object |
merge(Object object)
Copy the state of the detached instance to a persistent instance with the
same identifier.
|
void |
refresh(Object object)
Refresh the (cached) object from the database.
|
void |
rollbackTransaction()
Rollback the current transaction.
|
void |
update(Object object)
Update the given object.
|
Object get(FindData findData)
findData - (missing javadoc)List<?> getAll(FindData findData)
findData - (missing javadoc)Serializable insert(Object object)
object - (missing javadoc)void update(Object object)
object - (missing javadoc)Object merge(Object object)
object - the detached instancevoid delete(Object object)
object - (missing javadoc)boolean isInitialized(Object object)
object - the proxy object or collection to checkvoid initialize(Object object)
object - (missing javadoc)void refresh(Object object)
object - (missing javadoc)void close()
void flush()
void beginTransaction()
void commitTransaction()
void rollbackTransaction()
boolean canRollbackTransaction()
boolean hasActiveTransaction()
boolean hasLockFlag(Class<?> domainClass)
domainClass - the domain class to check.String buildQueryString(Class<?> clazz, List<String> keyAttributeNames)
clazz - (missing javadoc)keyAttributeNames - (missing javadoc)List<Object> buildQueryParameterValueList(Object key, List<String> keyAttributeNames)
key - (missing javadoc)keyAttributeNames - (missing javadoc)Copyright © 2006–2018 Esito AS. All rights reserved.