|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.envers.entities.mapper.relation.lazy.AbstractDelegateSessionImplementor
public abstract class AbstractDelegateSessionImplementor
Field Summary | |
---|---|
protected SessionImplementor |
delegate
|
Constructor Summary | |
---|---|
AbstractDelegateSessionImplementor(SessionImplementor delegate)
|
Method Summary | |
---|---|
void |
afterScrollOperation()
|
void |
afterTransactionCompletion(boolean successful,
Transaction tx)
Notify the session that the transaction completed, so we no longer own the old locks. |
void |
applyNonFlushedChanges(NonFlushedChanges nonFlushedChanges)
Apply non-flushed changes from a different session to this session. |
void |
beforeTransactionCompletion(Transaction tx)
Notify the session that the transaction is about to complete |
String |
bestGuessEntityName(Object object)
The best guess entity name for an entity not in an association |
Connection |
connection()
|
abstract Object |
doImmediateLoad(String entityName)
|
int |
executeNativeUpdate(NativeSQLQuerySpecification specification,
QueryParameters queryParameters)
Execute a native SQL update or delete query |
int |
executeUpdate(String query,
QueryParameters queryParameters)
Execute a HQL update or delete query |
void |
flush()
|
Batcher |
getBatcher()
Get the prepared statement Batcher for this session |
CacheMode |
getCacheMode()
|
Serializable |
getContextEntityIdentifier(Object object)
Return the identifier of the persistent object, or null if not associated with the session |
int |
getDontFlushFromFind()
|
Map |
getEnabledFilters()
Return the currently enabled filters. |
EntityMode |
getEntityMode()
|
EntityPersister |
getEntityPersister(String entityName,
Object object)
Get the EntityPersister for any instance |
Object |
getEntityUsingInterceptor(EntityKey key)
Get the entity instance associated with the given Key, calling the Interceptor if necessary |
SessionFactoryImplementor |
getFactory()
Get the creating SessionFactoryImplementor |
String |
getFetchProfile()
Get the internal fetch profile currently associated with this session. |
Type |
getFilterParameterType(String filterParameterName)
Retreive the type for a given filter parrameter. |
Object |
getFilterParameterValue(String filterParameterName)
Retreive the currently set value for a filter parameter. |
FlushMode |
getFlushMode()
|
Interceptor |
getInterceptor()
Retrieves the interceptor currently in use by this event source. |
JDBCContext |
getJDBCContext()
|
EventListeners |
getListeners()
Retrieves the configured event listeners from this event source. |
LoadQueryInfluencers |
getLoadQueryInfluencers()
Get the load query influencers associated with this session. |
Query |
getNamedQuery(String name)
Get a Query instance for a named query or named native SQL query |
Query |
getNamedSQLQuery(String name)
Get a Query instance for a named native SQL query |
NonFlushedChanges |
getNonFlushedChanges()
Return changes to this session that have not been flushed yet. |
PersistenceContext |
getPersistenceContext()
Get the persistence context for this session |
long |
getTimestamp()
System time before the start of the transaction |
String |
guessEntityName(Object entity)
The guessed entity name for an entity not in an association |
Object |
immediateLoad(String entityName,
Serializable id)
Load an instance immediately. |
void |
initializeCollection(PersistentCollection collection,
boolean writing)
Initialize the collection (if not already initialized) |
Object |
instantiate(String entityName,
Serializable id)
Instantiate the entity class, initializing with the given identifier |
Object |
internalLoad(String entityName,
Serializable id,
boolean eager,
boolean nullable)
Load an instance without checking if it was deleted. |
boolean |
isClosed()
Determine whether the session is closed. |
boolean |
isConnected()
|
boolean |
isEventSource()
|
boolean |
isOpen()
|
boolean |
isTransactionInProgress()
Does this Session have an active Hibernate transaction or is there a JTA transaction in progress? |
Iterator |
iterate(String query,
QueryParameters queryParameters)
Execute an iterate() query |
Iterator |
iterateFilter(Object collection,
String filter,
QueryParameters queryParameters)
Iterate a filter |
List |
list(CriteriaImpl criteria)
Execute a criteria query |
List |
list(NativeSQLQuerySpecification spec,
QueryParameters queryParameters)
Execute a native SQL query, and return the results as a fully built list. |
List |
list(String query,
QueryParameters queryParameters)
Execute a find() query |
List |
listCustomQuery(CustomQuery customQuery,
QueryParameters queryParameters)
Execute an SQL Query |
List |
listFilter(Object collection,
String filter,
QueryParameters queryParameters)
Execute a filter |
ScrollableResults |
scroll(CriteriaImpl criteria,
ScrollMode scrollMode)
Execute a criteria query |
ScrollableResults |
scroll(NativeSQLQuerySpecification spec,
QueryParameters queryParameters)
Execute a native SQL query, and return the results as a scrollable result. |
ScrollableResults |
scroll(String query,
QueryParameters queryParameters)
Execute a scroll() query |
ScrollableResults |
scrollCustomQuery(CustomQuery customQuery,
QueryParameters queryParameters)
Execute an SQL Query |
void |
setAutoClear(boolean enabled)
Enable/disable automatic cache clearing from after transaction completion (for EJB3) |
void |
setCacheMode(CacheMode cm)
|
void |
setFetchProfile(String name)
Set the current internal fetch profile for this session. |
void |
setFlushMode(FlushMode fm)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected SessionImplementor delegate
Constructor Detail |
---|
public AbstractDelegateSessionImplementor(SessionImplementor delegate)
Method Detail |
---|
public abstract Object doImmediateLoad(String entityName)
public Object immediateLoad(String entityName, Serializable id) throws HibernateException
SessionImplementor
immediateLoad
in interface SessionImplementor
HibernateException
public LoadQueryInfluencers getLoadQueryInfluencers()
SessionImplementor
getLoadQueryInfluencers
in interface SessionImplementor
public Interceptor getInterceptor()
SessionImplementor
getInterceptor
in interface SessionImplementor
public void setAutoClear(boolean enabled)
SessionImplementor
setAutoClear
in interface SessionImplementor
public boolean isTransactionInProgress()
SessionImplementor
isTransactionInProgress
in interface SessionImplementor
public void initializeCollection(PersistentCollection collection, boolean writing) throws HibernateException
SessionImplementor
initializeCollection
in interface SessionImplementor
HibernateException
public Object internalLoad(String entityName, Serializable id, boolean eager, boolean nullable) throws HibernateException
SessionImplementor
internalLoad
in interface SessionImplementor
HibernateException
public long getTimestamp()
SessionImplementor
getTimestamp
in interface SessionImplementor
public SessionFactoryImplementor getFactory()
SessionImplementor
getFactory
in interface SessionImplementor
public Batcher getBatcher()
SessionImplementor
getBatcher
in interface SessionImplementor
public List list(String query, QueryParameters queryParameters) throws HibernateException
SessionImplementor
list
in interface SessionImplementor
HibernateException
public Iterator iterate(String query, QueryParameters queryParameters) throws HibernateException
SessionImplementor
iterate
in interface SessionImplementor
HibernateException
public ScrollableResults scroll(String query, QueryParameters queryParameters) throws HibernateException
SessionImplementor
scroll
in interface SessionImplementor
HibernateException
public ScrollableResults scroll(CriteriaImpl criteria, ScrollMode scrollMode)
SessionImplementor
scroll
in interface SessionImplementor
public List list(CriteriaImpl criteria)
SessionImplementor
list
in interface SessionImplementor
public List listFilter(Object collection, String filter, QueryParameters queryParameters) throws HibernateException
SessionImplementor
listFilter
in interface SessionImplementor
HibernateException
public Iterator iterateFilter(Object collection, String filter, QueryParameters queryParameters) throws HibernateException
SessionImplementor
iterateFilter
in interface SessionImplementor
HibernateException
public EntityPersister getEntityPersister(String entityName, Object object) throws HibernateException
SessionImplementor
getEntityPersister
in interface SessionImplementor
entityName
- optional entity nameobject
- the entity instance
HibernateException
public Object getEntityUsingInterceptor(EntityKey key) throws HibernateException
SessionImplementor
getEntityUsingInterceptor
in interface SessionImplementor
HibernateException
public void afterTransactionCompletion(boolean successful, Transaction tx)
SessionImplementor
afterTransactionCompletion
in interface SessionImplementor
public void beforeTransactionCompletion(Transaction tx)
SessionImplementor
beforeTransactionCompletion
in interface SessionImplementor
public Serializable getContextEntityIdentifier(Object object)
SessionImplementor
getContextEntityIdentifier
in interface SessionImplementor
public String bestGuessEntityName(Object object)
SessionImplementor
bestGuessEntityName
in interface SessionImplementor
public String guessEntityName(Object entity) throws HibernateException
SessionImplementor
guessEntityName
in interface SessionImplementor
HibernateException
public Object instantiate(String entityName, Serializable id) throws HibernateException
SessionImplementor
instantiate
in interface SessionImplementor
HibernateException
public List listCustomQuery(CustomQuery customQuery, QueryParameters queryParameters) throws HibernateException
SessionImplementor
listCustomQuery
in interface SessionImplementor
HibernateException
public ScrollableResults scrollCustomQuery(CustomQuery customQuery, QueryParameters queryParameters) throws HibernateException
SessionImplementor
scrollCustomQuery
in interface SessionImplementor
HibernateException
public List list(NativeSQLQuerySpecification spec, QueryParameters queryParameters) throws HibernateException
SessionImplementor
list
in interface SessionImplementor
spec
- The specification of the native SQL query to execute.queryParameters
- The parameters by which to perform the execution.
HibernateException
public ScrollableResults scroll(NativeSQLQuerySpecification spec, QueryParameters queryParameters) throws HibernateException
SessionImplementor
scroll
in interface SessionImplementor
spec
- The specification of the native SQL query to execute.queryParameters
- The parameters by which to perform the execution.
HibernateException
public Object getFilterParameterValue(String filterParameterName)
SessionImplementor
getFilterParameterValue
in interface SessionImplementor
filterParameterName
- The filter parameter name in the format
{FILTER_NAME.PARAMETER_NAME}.
public Type getFilterParameterType(String filterParameterName)
SessionImplementor
getFilterParameterType
in interface SessionImplementor
filterParameterName
- The filter parameter name in the format
{FILTER_NAME.PARAMETER_NAME}.
public Map getEnabledFilters()
SessionImplementor
FilterImpl
instance.
getEnabledFilters
in interface SessionImplementor
public int getDontFlushFromFind()
getDontFlushFromFind
in interface SessionImplementor
public EventListeners getListeners()
SessionImplementor
getListeners
in interface SessionImplementor
public PersistenceContext getPersistenceContext()
SessionImplementor
getPersistenceContext
in interface SessionImplementor
public int executeUpdate(String query, QueryParameters queryParameters) throws HibernateException
SessionImplementor
executeUpdate
in interface SessionImplementor
HibernateException
public int executeNativeUpdate(NativeSQLQuerySpecification specification, QueryParameters queryParameters) throws HibernateException
SessionImplementor
executeNativeUpdate
in interface SessionImplementor
HibernateException
public NonFlushedChanges getNonFlushedChanges() throws HibernateException
SessionImplementor
getNonFlushedChanges
in interface SessionImplementor
HibernateException
public void applyNonFlushedChanges(NonFlushedChanges nonFlushedChanges) throws HibernateException
SessionImplementor
applyNonFlushedChanges
in interface SessionImplementor
nonFlushedChanges
- the non-flushed changes
HibernateException
public EntityMode getEntityMode()
getEntityMode
in interface SessionImplementor
public CacheMode getCacheMode()
getCacheMode
in interface SessionImplementor
public void setCacheMode(CacheMode cm)
setCacheMode
in interface SessionImplementor
public boolean isOpen()
isOpen
in interface SessionImplementor
public boolean isConnected()
isConnected
in interface SessionImplementor
public FlushMode getFlushMode()
getFlushMode
in interface SessionImplementor
public void setFlushMode(FlushMode fm)
setFlushMode
in interface SessionImplementor
public Connection connection()
connection
in interface SessionImplementor
public void flush()
flush
in interface SessionImplementor
public Query getNamedQuery(String name)
SessionImplementor
getNamedQuery
in interface SessionImplementor
public Query getNamedSQLQuery(String name)
SessionImplementor
getNamedSQLQuery
in interface SessionImplementor
public boolean isEventSource()
isEventSource
in interface SessionImplementor
public void afterScrollOperation()
afterScrollOperation
in interface SessionImplementor
public void setFetchProfile(String name)
SessionImplementor
setFetchProfile
in interface SessionImplementor
name
- The internal fetch profile name to usepublic String getFetchProfile()
SessionImplementor
getFetchProfile
in interface SessionImplementor
public JDBCContext getJDBCContext()
getJDBCContext
in interface SessionImplementor
public boolean isClosed()
SessionImplementor
SessionImplementor.isOpen()
as this method does not attempt any JTA synch
registration, where as SessionImplementor.isOpen()
does; which makes this one
nicer to use for most internal purposes.
isClosed
in interface SessionImplementor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |