public abstract class AbstractHibernateSession extends Object implements Session
| Constructor and Description |
|---|
AbstractHibernateSession() |
| Modifier and Type | Method and Description |
|---|---|
protected org.hibernate.Criteria |
applyFindData(org.hibernate.Criteria criteria,
FindData findData)
Apply settings from the findData object to the Hibernate criteria.
|
protected org.hibernate.Query |
applyFindData(org.hibernate.Query query,
FindData findData)
Apply settings from the findData object to the Hibernate query.
|
protected org.hibernate.Criteria |
applyFindDataAlias(org.hibernate.Criteria criteria,
FindData findData)
Create criteria aliases for each alias instance in findData.
|
protected org.hibernate.Criteria |
applyFindDataProjection(org.hibernate.Criteria criteria,
FindData findData)
Create criteria projections from findData.
|
void |
beginTransaction()
Start a new transaction.
|
protected abstract org.hibernate.Transaction |
beginTransactionImpl()
Subclass specific implementation of session beginTransaction.
|
List<Object> |
buildCriterionList(Object key,
List<String> keyAttributeNames)
Build a list of "equal" criterions for the given key object and list of
attribute names.
|
protected abstract org.hibernate.Query |
buildQueryImpl(String queryString)
Subclass specific implementation of buildQuery.
|
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 HQL 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.
|
protected abstract void |
closeImpl()
Subclass specific implementation of session close.
|
void |
commitTransaction()
Commit the current transaction.
|
protected abstract org.hibernate.Criteria |
createCriteriaImpl(FindData findData)
Subclass specific implementation of createCriteria.
|
void |
delete(Object object)
Delete the given object in the database.
|
protected abstract void |
deleteImpl(Object object)
Subclass specific implementation of delete.
|
void |
flush()
Flush the session cache changes to the database.
|
protected abstract void |
flushImpl()
Subclass specific implementation of session flush.
|
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.
|
abstract org.hibernate.SharedSessionContract |
getSession() |
boolean |
hasActiveTransaction()
Return true if the session has an active transaction.
|
protected abstract boolean |
hasActiveTransactionImpl()
Subclass specific implementation of session hasActiveTransaction.
|
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.
|
protected abstract Serializable |
insertImpl(Object object)
Subclass specific implementation of insert.
|
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.
|
protected abstract Object |
mergeImpl(Object object)
Subclass specific implementation of merge.
|
protected Object |
qbc(FindData findData,
boolean all)
Execute a Criteria based query operation.
|
protected Object |
qbe(FindData findData,
boolean all)
Execute a Query-By-Example operation.
|
protected Object |
query(FindData findData,
boolean all)
Build and execute a Hibernate query from the given FindData.
|
void |
refresh(Object object)
Refresh the (cached) object from the database.
|
protected abstract void |
refreshImpl(Object object)
Subclass specific implementation of refresh.
|
void |
rollbackTransaction()
Rollback the current transaction.
|
protected Object |
simpleGet(FindData findData)
Execute a simple get operation.
|
protected abstract Object |
simpleGetImpl(FindData findData)
Subclass specific implementation of simpleGet.
|
void |
update(Object object)
Update the given object.
|
protected abstract void |
updateImpl(Object object)
Subclass specific implementation of update.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasLockFlagpublic Object get(FindData findData) throws G9DataAccessException
Sessionget in interface SessionfindData - (missing javadoc)G9DataAccessExceptionpublic List<?> getAll(FindData findData) throws G9DataAccessException
SessiongetAll in interface SessionfindData - (missing javadoc)G9DataAccessExceptionpublic Serializable insert(Object object) throws G9DataAccessException
Sessioninsert in interface Sessionobject - (missing javadoc)G9DataAccessExceptionpublic void update(Object object) throws G9DataAccessException
Sessionupdate in interface Sessionobject - (missing javadoc)G9DataAccessExceptionpublic Object merge(Object object) throws G9DataAccessException
Sessionmerge in interface Sessionobject - the detached instanceG9DataAccessExceptionpublic void delete(Object object) throws G9DataAccessException
Sessiondelete in interface Sessionobject - (missing javadoc)G9DataAccessExceptionpublic boolean isInitialized(Object object)
SessionisInitialized in interface Sessionobject - the proxy object or collection to checkpublic void initialize(Object object) throws G9DataAccessException
Sessioninitialize in interface Sessionobject - (missing javadoc)G9DataAccessExceptionpublic void refresh(Object object) throws G9DataAccessException
Sessionrefresh in interface Sessionobject - (missing javadoc)G9DataAccessExceptionpublic void close()
throws G9DataAccessException
Sessionclose in interface SessionG9DataAccessExceptionpublic void flush()
throws G9DataAccessException
Sessionflush in interface SessionG9DataAccessExceptionpublic void beginTransaction()
throws G9DataAccessException
SessionbeginTransaction in interface SessionG9DataAccessExceptionpublic void commitTransaction()
throws G9DataAccessException
SessioncommitTransaction in interface SessionG9DataAccessExceptionpublic void rollbackTransaction()
SessionrollbackTransaction in interface Sessionpublic boolean canRollbackTransaction()
SessioncanRollbackTransaction in interface Sessionpublic boolean hasActiveTransaction()
throws G9DataAccessException
SessionhasActiveTransaction in interface SessionG9DataAccessExceptionpublic abstract org.hibernate.SharedSessionContract getSession()
protected Object query(FindData findData, boolean all) throws G9DataAccessException
findData - - the query is based on the given FindData.all - - false if only the first result matching the query is returned.G9DataAccessException - (no doc)public String buildQueryString(Class<?> clazz, List<String> keyAttributeNames)
buildQueryString in interface Sessionclazz - - the class for the query.keyAttributeNames - - list containing the name of the key attributes.public List<Object> buildQueryParameterValueList(Object key, List<String> keyAttributeNames)
SessionbuildQueryParameterValueList in interface Sessionkey - (missing javadoc)keyAttributeNames - (missing javadoc)public List<Object> buildCriterionList(Object key, List<String> keyAttributeNames)
SessionbuildCriterionList in interface Sessionkey - (missing javadoc)keyAttributeNames - (missing javadoc)protected org.hibernate.Criteria applyFindDataProjection(org.hibernate.Criteria criteria,
FindData findData)
criteria - - the criteria to set the projection on.findData - - the input FindData.protected org.hibernate.Criteria applyFindDataAlias(org.hibernate.Criteria criteria,
FindData findData)
criteria - - the criteria to update.findData - - the FindData with the aliases.protected org.hibernate.Criteria applyFindData(org.hibernate.Criteria criteria,
FindData findData)
criteria - - the criteria to update.findData - - the FindData with the criteria settings.protected org.hibernate.Query applyFindData(org.hibernate.Query query,
FindData findData)
query - - the query to update.findData - - the FindData with the query settings.protected Object simpleGet(FindData findData) throws G9DataAccessException
findData - - holds the class and key information for the get.G9DataAccessException - if an exception occurred.protected Object qbe(FindData findData, boolean all) throws G9DataAccessException
findData - - holds the input parameters for the QBE.all - - false if only the first result matching the query is returned.G9DataAccessException - if an exception occurred.protected Object qbc(FindData findData, boolean all) throws G9DataAccessException
findData - - holds the input parameters for the query.all - - false if only the first result matching the query is returned.G9DataAccessException - if an exception occurred.protected abstract Object simpleGetImpl(FindData findData)
findData - - the class and key info for the get operation.protected abstract org.hibernate.Criteria createCriteriaImpl(FindData findData)
findData - - the FindData input for the criteria to be created.protected abstract Serializable insertImpl(Object object)
object - - the object to insert.protected abstract void updateImpl(Object object)
object - - the object to update.protected abstract Object mergeImpl(Object object)
object - - the object to merge.protected abstract void deleteImpl(Object object)
object - - the object to delete.protected abstract void refreshImpl(Object object)
object - - the object to refresh.protected abstract void closeImpl()
protected abstract void flushImpl()
protected abstract org.hibernate.Transaction beginTransactionImpl()
protected abstract boolean hasActiveTransactionImpl()
protected abstract org.hibernate.Query buildQueryImpl(String queryString)
queryString - - the input for the query.Copyright © 2006–2017 Esito AS. All rights reserved.