org.hibernate.search.impl
Class FullTextSessionImpl

java.lang.Object
  extended by org.hibernate.search.impl.FullTextSessionImpl
All Implemented Interfaces:
Serializable, LobCreationContext, SessionImplementor, FullTextSession, Session, SharedSessionContract

public class FullTextSessionImpl
extends Object
implements FullTextSession, SessionImplementor

Lucene full text search aware session.

Author:
Emmanuel Bernard, John Griffin, Hardy Ferentschik
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.hibernate.Session
Session.LockRequest
 
Nested classes/interfaces inherited from interface org.hibernate.engine.jdbc.LobCreationContext
LobCreationContext.Callback<T>
 
Constructor Summary
FullTextSessionImpl(Session session)
           
 
Method Summary
 void afterScrollOperation()
           
 void applyNonFlushedChanges(NonFlushedChanges nonFlushedChanges)
           
 Transaction beginTransaction()
           
 String bestGuessEntityName(Object object)
           
 Session.LockRequest buildLockRequest(LockOptions lockOptions)
           
 IdentifierLoadAccess byId(Class entityClass)
           
 IdentifierLoadAccess byId(String entityName)
           
 NaturalIdLoadAccess byNaturalId(Class entityClass)
           
 NaturalIdLoadAccess byNaturalId(String entityName)
           
 SimpleNaturalIdLoadAccess bySimpleNaturalId(Class entityClass)
           
 SimpleNaturalIdLoadAccess bySimpleNaturalId(String entityName)
           
 void cancelQuery()
           
 void clear()
           
 Connection close()
           
 Connection connection()
           
 boolean contains(Object object)
           
 Criteria createCriteria(Class persistentClass)
           
 Criteria createCriteria(Class persistentClass, String alias)
           
 Criteria createCriteria(String entityName)
           
 Criteria createCriteria(String entityName, String alias)
           
 Query createFilter(Object collection, String queryString)
           
 FullTextQuery createFullTextQuery(org.apache.lucene.search.Query luceneQuery, Class<?>... entities)
          Execute a Lucene query and retrieve managed objects of type entities (or their indexed subclasses) If entities is empty, include all indexed entities
 MassIndexer createIndexer(Class<?>... types)
          Creates a MassIndexer to rebuild the indexes of some or all indexed entity types.
 Query createQuery(String queryString)
           
 SQLQuery createSQLQuery(String queryString)
           
 void delete(Object object)
           
 void delete(String entityName, Object object)
           
 void disableFetchProfile(String name)
           
 void disableFilter(String filterName)
           
 void disableTransactionAutoJoin()
           
 Connection disconnect()
           
<T> T
doReturningWork(ReturningWork<T> work)
           
 void doWork(Work work)
           
 void enableFetchProfile(String name)
           
 Filter enableFilter(String filterName)
           
 void evict(Object object)
           
<T> T
execute(LobCreationContext.Callback<T> callback)
           
 int executeNativeUpdate(NativeSQLQuerySpecification specification, QueryParameters queryParameters)
           
 int executeUpdate(String query, QueryParameters queryParameters)
           
 void flush()
           
 void flushToIndexes()
          Flush all index changes forcing Hibernate Search to apply all changes to the index not waiting for the batch limit.
 CacheKey generateCacheKey(Serializable id, Type type, String entityOrRoleName)
           
 EntityKey generateEntityKey(Serializable id, EntityPersister persister)
           
 Object get(Class clazz, Serializable id)
           
 Object get(Class clazz, Serializable id, LockMode lockMode)
           
 Object get(Class clazz, Serializable id, LockOptions lockOptions)
           
 Object get(String entityName, Serializable id)
           
 Object get(String entityName, Serializable id, LockMode lockMode)
           
 Object get(String entityName, Serializable id, LockOptions lockOptions)
           
 CacheMode getCacheMode()
           
 Serializable getContextEntityIdentifier(Object object)
           
 LockMode getCurrentLockMode(Object object)
           
 int getDontFlushFromFind()
           
 Filter getEnabledFilter(String filterName)
           
 Map getEnabledFilters()
           
 String getEntityName(Object object)
           
 EntityPersister getEntityPersister(String entityName, Object object)
           
 Object getEntityUsingInterceptor(EntityKey key)
           
 SessionFactoryImplementor getFactory()
           
 String getFetchProfile()
           
 Type getFilterParameterType(String filterParameterName)
           
 Object getFilterParameterValue(String filterParameterName)
           
 FlushMode getFlushMode()
           
 Serializable getIdentifier(Object object)
           
 Interceptor getInterceptor()
           
 JdbcConnectionAccess getJdbcConnectionAccess()
           
 LoadQueryInfluencers getLoadQueryInfluencers()
           
 LobHelper getLobHelper()
           
 Query getNamedQuery(String queryName)
           
 Query getNamedSQLQuery(String name)
           
 NonFlushedChanges getNonFlushedChanges()
           
 PersistenceContext getPersistenceContext()
           
 SearchFactory getSearchFactory()
           
 SessionFactory getSessionFactory()
           
 SessionStatistics getStatistics()
           
 String getTenantIdentifier()
           
 long getTimestamp()
           
 Transaction getTransaction()
           
 TransactionCoordinator getTransactionCoordinator()
           
 TypeHelper getTypeHelper()
           
 String guessEntityName(Object entity)
           
 Object immediateLoad(String entityName, Serializable id)
           
<T> void
index(T entity)
          (Re-)index an entity.
 void initializeCollection(PersistentCollection collection, boolean writing)
           
 Object instantiate(String entityName, Serializable id)
           
 Object internalLoad(String entityName, Serializable id, boolean eager, boolean nullable)
           
 boolean isClosed()
           
 boolean isConnected()
           
 boolean isDefaultReadOnly()
           
 boolean isDirty()
           
 boolean isEventSource()
           
 boolean isFetchProfileEnabled(String name)
           
 boolean isOpen()
           
 boolean isReadOnly(Object entityOrProxy)
           
 boolean isTransactionInProgress()
           
 Iterator iterate(String query, QueryParameters queryParameters)
           
 Iterator iterateFilter(Object collection, String filter, QueryParameters queryParameters)
           
 List list(CriteriaImpl criteria)
           
 List list(NativeSQLQuerySpecification spec, QueryParameters queryParameters)
           
 List list(String query, QueryParameters queryParameters)
           
 List listCustomQuery(CustomQuery customQuery, QueryParameters queryParameters)
           
 List listFilter(Object collection, String filter, QueryParameters queryParameters)
           
 Object load(Class theClass, Serializable id)
           
 Object load(Class theClass, Serializable id, LockMode lockMode)
           
 Object load(Class theClass, Serializable id, LockOptions lockOptions)
           
 void load(Object object, Serializable id)
           
 Object load(String entityName, Serializable id)
           
 Object load(String entityName, Serializable id, LockMode lockMode)
           
 Object load(String entityName, Serializable id, LockOptions lockOptions)
           
 void lock(Object object, LockMode lockMode)
           
 void lock(String entityName, Object object, LockMode lockMode)
           
 Object merge(Object object)
           
 Object merge(String entityName, Object object)
           
 void persist(Object object)
           
 void persist(String entityName, Object object)
           
<T> void
purge(Class<T> entityType, Serializable id)
          Remove the entity with the type entityType and the identifier id from the index.
<T> void
purgeAll(Class<T> entityType)
          Remove all entities from of particular class and all its subclasses from the index.
 void reconnect(Connection connection)
           
 void refresh(Object object)
           
 void refresh(Object object, LockMode lockMode)
           
 void refresh(Object object, LockOptions lockOptions)
           
 void refresh(String entityName, Object object)
           
 void refresh(String entityName, Object object, LockOptions lockOptions)
           
 void replicate(Object object, ReplicationMode replicationMode)
           
 void replicate(String entityName, Object object, ReplicationMode replicationMode)
           
 Serializable save(Object object)
           
 Serializable save(String entityName, Object object)
           
 void saveOrUpdate(Object object)
           
 void saveOrUpdate(String entityName, Object object)
           
 ScrollableResults scroll(CriteriaImpl criteria, ScrollMode scrollMode)
           
 ScrollableResults scroll(NativeSQLQuerySpecification spec, QueryParameters queryParameters)
           
 ScrollableResults scroll(String query, QueryParameters queryParameters)
           
 ScrollableResults scrollCustomQuery(CustomQuery customQuery, QueryParameters queryParameters)
           
 SharedSessionBuilder sessionWithOptions()
           
 void setAutoClear(boolean enabled)
           
 void setCacheMode(CacheMode cacheMode)
           
 void setDefaultReadOnly(boolean readOnly)
           
 void setFetchProfile(String name)
           
 void setFlushMode(FlushMode flushMode)
           
 void setReadOnly(Object entity, boolean readOnly)
           
 void update(Object object)
           
 void update(String entityName, Object object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FullTextSessionImpl

public FullTextSessionImpl(Session session)
Method Detail

createFullTextQuery

public FullTextQuery createFullTextQuery(org.apache.lucene.search.Query luceneQuery,
                                         Class<?>... entities)
Execute a Lucene query and retrieve managed objects of type entities (or their indexed subclasses) If entities is empty, include all indexed entities

Specified by:
createFullTextQuery in interface FullTextSession
Parameters:
entities - must be immutable for the lifetime of the query object
luceneQuery - The native Lucene query to be run against the Lucene index.
Returns:
A FullTextQuery wrapping around the native Lucene query.

purgeAll

public <T> void purgeAll(Class<T> entityType)
Remove all entities from of particular class and all its subclasses from the index.

Specified by:
purgeAll in interface FullTextSession
Parameters:
entityType - The class of the entities to remove.

flushToIndexes

public void flushToIndexes()
Description copied from interface: FullTextSession
Flush all index changes forcing Hibernate Search to apply all changes to the index not waiting for the batch limit.

Specified by:
flushToIndexes in interface FullTextSession

purge

public <T> void purge(Class<T> entityType,
                      Serializable id)
Remove the entity with the type entityType and the identifier id from the index. If id == null all indexed entities of this type and its indexed subclasses are deleted. In this case this method behaves like FullTextSession.purgeAll(Class).

Specified by:
purge in interface FullTextSession
Parameters:
entityType - The type of the entity to delete.
id - The id of the entity to delete.

index

public <T> void index(T entity)
(Re-)index an entity. The entity must be associated with the session and non indexable entities are ignored.

Specified by:
index in interface FullTextSession
Parameters:
entity - The entity to index - must not be null.
Throws:
IllegalArgumentException - if entity is null or not an @Indexed entity

createIndexer

public MassIndexer createIndexer(Class<?>... types)
Description copied from interface: FullTextSession
Creates a MassIndexer to rebuild the indexes of some or all indexed entity types. Instances cannot be reused.

Specified by:
createIndexer in interface FullTextSession
Parameters:
types - optionally restrict the operation to selected types
Returns:

getSearchFactory

public SearchFactory getSearchFactory()
Specified by:
getSearchFactory in interface FullTextSession
Returns:
the SearchFactory instance.

getTenantIdentifier

public String getTenantIdentifier()
Specified by:
getTenantIdentifier in interface SessionImplementor
Specified by:
getTenantIdentifier in interface SharedSessionContract

beginTransaction

public Transaction beginTransaction()
                             throws HibernateException
Specified by:
beginTransaction in interface SharedSessionContract
Throws:
HibernateException

cancelQuery

public void cancelQuery()
                 throws HibernateException
Specified by:
cancelQuery in interface Session
Throws:
HibernateException

clear

public void clear()
Specified by:
clear in interface Session

close

public Connection close()
                 throws HibernateException
Specified by:
close in interface Session
Throws:
HibernateException

contains

public boolean contains(Object object)
Specified by:
contains in interface Session

createCriteria

public Criteria createCriteria(String entityName)
Specified by:
createCriteria in interface SharedSessionContract

createCriteria

public Criteria createCriteria(String entityName,
                               String alias)
Specified by:
createCriteria in interface SharedSessionContract

createCriteria

public Criteria createCriteria(Class persistentClass)
Specified by:
createCriteria in interface SharedSessionContract

createCriteria

public Criteria createCriteria(Class persistentClass,
                               String alias)
Specified by:
createCriteria in interface SharedSessionContract

createFilter

public Query createFilter(Object collection,
                          String queryString)
                   throws HibernateException
Specified by:
createFilter in interface Session
Throws:
HibernateException

createQuery

public Query createQuery(String queryString)
                  throws HibernateException
Specified by:
createQuery in interface SharedSessionContract
Throws:
HibernateException

createSQLQuery

public SQLQuery createSQLQuery(String queryString)
                        throws HibernateException
Specified by:
createSQLQuery in interface SharedSessionContract
Throws:
HibernateException

delete

public void delete(String entityName,
                   Object object)
            throws HibernateException
Specified by:
delete in interface Session
Throws:
HibernateException

delete

public void delete(Object object)
            throws HibernateException
Specified by:
delete in interface Session
Throws:
HibernateException

disableFilter

public void disableFilter(String filterName)
Specified by:
disableFilter in interface Session

disconnect

public Connection disconnect()
                      throws HibernateException
Specified by:
disconnect in interface Session
Throws:
HibernateException

enableFilter

public Filter enableFilter(String filterName)
Specified by:
enableFilter in interface Session

evict

public void evict(Object object)
           throws HibernateException
Specified by:
evict in interface Session
Throws:
HibernateException

sessionWithOptions

public SharedSessionBuilder sessionWithOptions()
Specified by:
sessionWithOptions in interface Session

flush

public void flush()
           throws HibernateException
Specified by:
flush in interface SessionImplementor
Specified by:
flush in interface Session
Throws:
HibernateException

get

public Object get(Class clazz,
                  Serializable id)
           throws HibernateException
Specified by:
get in interface Session
Throws:
HibernateException

get

public Object get(Class clazz,
                  Serializable id,
                  LockMode lockMode)
           throws HibernateException
Specified by:
get in interface Session
Throws:
HibernateException

get

public Object get(Class clazz,
                  Serializable id,
                  LockOptions lockOptions)
           throws HibernateException
Specified by:
get in interface Session
Throws:
HibernateException

get

public Object get(String entityName,
                  Serializable id)
           throws HibernateException
Specified by:
get in interface Session
Throws:
HibernateException

get

public Object get(String entityName,
                  Serializable id,
                  LockMode lockMode)
           throws HibernateException
Specified by:
get in interface Session
Throws:
HibernateException

get

public Object get(String entityName,
                  Serializable id,
                  LockOptions lockOptions)
           throws HibernateException
Specified by:
get in interface Session
Throws:
HibernateException

getCacheMode

public CacheMode getCacheMode()
Specified by:
getCacheMode in interface SessionImplementor
Specified by:
getCacheMode in interface Session

getCurrentLockMode

public LockMode getCurrentLockMode(Object object)
                            throws HibernateException
Specified by:
getCurrentLockMode in interface Session
Throws:
HibernateException

getEnabledFilter

public Filter getEnabledFilter(String filterName)
Specified by:
getEnabledFilter in interface Session

getJdbcConnectionAccess

public JdbcConnectionAccess getJdbcConnectionAccess()
Specified by:
getJdbcConnectionAccess in interface SessionImplementor

generateEntityKey

public EntityKey generateEntityKey(Serializable id,
                                   EntityPersister persister)
Specified by:
generateEntityKey in interface SessionImplementor

generateCacheKey

public CacheKey generateCacheKey(Serializable id,
                                 Type type,
                                 String entityOrRoleName)
Specified by:
generateCacheKey in interface SessionImplementor

getInterceptor

public Interceptor getInterceptor()
Specified by:
getInterceptor in interface SessionImplementor

setAutoClear

public void setAutoClear(boolean enabled)
Specified by:
setAutoClear in interface SessionImplementor

disableTransactionAutoJoin

public void disableTransactionAutoJoin()
Specified by:
disableTransactionAutoJoin in interface SessionImplementor

isTransactionInProgress

public boolean isTransactionInProgress()
Specified by:
isTransactionInProgress in interface SessionImplementor

initializeCollection

public void initializeCollection(PersistentCollection collection,
                                 boolean writing)
                          throws HibernateException
Specified by:
initializeCollection in interface SessionImplementor
Throws:
HibernateException

internalLoad

public Object internalLoad(String entityName,
                           Serializable id,
                           boolean eager,
                           boolean nullable)
                    throws HibernateException
Specified by:
internalLoad in interface SessionImplementor
Throws:
HibernateException

immediateLoad

public Object immediateLoad(String entityName,
                            Serializable id)
                     throws HibernateException
Specified by:
immediateLoad in interface SessionImplementor
Throws:
HibernateException

getTimestamp

public long getTimestamp()
Specified by:
getTimestamp in interface SessionImplementor

getFactory

public SessionFactoryImplementor getFactory()
Specified by:
getFactory in interface SessionImplementor

list

public List list(String query,
                 QueryParameters queryParameters)
          throws HibernateException
Specified by:
list in interface SessionImplementor
Throws:
HibernateException

iterate

public Iterator iterate(String query,
                        QueryParameters queryParameters)
                 throws HibernateException
Specified by:
iterate in interface SessionImplementor
Throws:
HibernateException

scroll

public ScrollableResults scroll(String query,
                                QueryParameters queryParameters)
                         throws HibernateException
Specified by:
scroll in interface SessionImplementor
Throws:
HibernateException

scroll

public ScrollableResults scroll(CriteriaImpl criteria,
                                ScrollMode scrollMode)
Specified by:
scroll in interface SessionImplementor

list

public List list(CriteriaImpl criteria)
Specified by:
list in interface SessionImplementor

listFilter

public List listFilter(Object collection,
                       String filter,
                       QueryParameters queryParameters)
                throws HibernateException
Specified by:
listFilter in interface SessionImplementor
Throws:
HibernateException

iterateFilter

public Iterator iterateFilter(Object collection,
                              String filter,
                              QueryParameters queryParameters)
                       throws HibernateException
Specified by:
iterateFilter in interface SessionImplementor
Throws:
HibernateException

getEntityPersister

public EntityPersister getEntityPersister(String entityName,
                                          Object object)
                                   throws HibernateException
Specified by:
getEntityPersister in interface SessionImplementor
Throws:
HibernateException

getEntityUsingInterceptor

public Object getEntityUsingInterceptor(EntityKey key)
                                 throws HibernateException
Specified by:
getEntityUsingInterceptor in interface SessionImplementor
Throws:
HibernateException

getContextEntityIdentifier

public Serializable getContextEntityIdentifier(Object object)
Specified by:
getContextEntityIdentifier in interface SessionImplementor

bestGuessEntityName

public String bestGuessEntityName(Object object)
Specified by:
bestGuessEntityName in interface SessionImplementor

guessEntityName

public String guessEntityName(Object entity)
                       throws HibernateException
Specified by:
guessEntityName in interface SessionImplementor
Throws:
HibernateException

instantiate

public Object instantiate(String entityName,
                          Serializable id)
                   throws HibernateException
Specified by:
instantiate in interface SessionImplementor
Throws:
HibernateException

listCustomQuery

public List listCustomQuery(CustomQuery customQuery,
                            QueryParameters queryParameters)
                     throws HibernateException
Specified by:
listCustomQuery in interface SessionImplementor
Throws:
HibernateException

scrollCustomQuery

public ScrollableResults scrollCustomQuery(CustomQuery customQuery,
                                           QueryParameters queryParameters)
                                    throws HibernateException
Specified by:
scrollCustomQuery in interface SessionImplementor
Throws:
HibernateException

list

public List list(NativeSQLQuerySpecification spec,
                 QueryParameters queryParameters)
          throws HibernateException
Specified by:
list in interface SessionImplementor
Throws:
HibernateException

scroll

public ScrollableResults scroll(NativeSQLQuerySpecification spec,
                                QueryParameters queryParameters)
                         throws HibernateException
Specified by:
scroll in interface SessionImplementor
Throws:
HibernateException

getFilterParameterValue

public Object getFilterParameterValue(String filterParameterName)
Specified by:
getFilterParameterValue in interface SessionImplementor

getFilterParameterType

public Type getFilterParameterType(String filterParameterName)
Specified by:
getFilterParameterType in interface SessionImplementor

getEnabledFilters

public Map getEnabledFilters()
Specified by:
getEnabledFilters in interface SessionImplementor

getDontFlushFromFind

public int getDontFlushFromFind()
Specified by:
getDontFlushFromFind in interface SessionImplementor

getPersistenceContext

public PersistenceContext getPersistenceContext()
Specified by:
getPersistenceContext in interface SessionImplementor

executeUpdate

public int executeUpdate(String query,
                         QueryParameters queryParameters)
                  throws HibernateException
Specified by:
executeUpdate in interface SessionImplementor
Throws:
HibernateException

executeNativeUpdate

public int executeNativeUpdate(NativeSQLQuerySpecification specification,
                               QueryParameters queryParameters)
                        throws HibernateException
Specified by:
executeNativeUpdate in interface SessionImplementor
Throws:
HibernateException

getNonFlushedChanges

public NonFlushedChanges getNonFlushedChanges()
                                       throws HibernateException
Specified by:
getNonFlushedChanges in interface SessionImplementor
Throws:
HibernateException

applyNonFlushedChanges

public void applyNonFlushedChanges(NonFlushedChanges nonFlushedChanges)
                            throws HibernateException
Specified by:
applyNonFlushedChanges in interface SessionImplementor
Throws:
HibernateException

getEntityName

public String getEntityName(Object object)
                     throws HibernateException
Specified by:
getEntityName in interface Session
Throws:
HibernateException

getFlushMode

public FlushMode getFlushMode()
Specified by:
getFlushMode in interface SessionImplementor
Specified by:
getFlushMode in interface Session

getIdentifier

public Serializable getIdentifier(Object object)
                           throws HibernateException
Specified by:
getIdentifier in interface Session
Throws:
HibernateException

getNamedQuery

public Query getNamedQuery(String queryName)
                    throws HibernateException
Specified by:
getNamedQuery in interface SessionImplementor
Specified by:
getNamedQuery in interface SharedSessionContract
Throws:
HibernateException

getNamedSQLQuery

public Query getNamedSQLQuery(String name)
Specified by:
getNamedSQLQuery in interface SessionImplementor

isEventSource

public boolean isEventSource()
Specified by:
isEventSource in interface SessionImplementor

afterScrollOperation

public void afterScrollOperation()
Specified by:
afterScrollOperation in interface SessionImplementor

setFetchProfile

public void setFetchProfile(String name)
Specified by:
setFetchProfile in interface SessionImplementor

getTransactionCoordinator

public TransactionCoordinator getTransactionCoordinator()
Specified by:
getTransactionCoordinator in interface SessionImplementor

getFetchProfile

public String getFetchProfile()
Specified by:
getFetchProfile in interface SessionImplementor

isClosed

public boolean isClosed()
Specified by:
isClosed in interface SessionImplementor

getLoadQueryInfluencers

public LoadQueryInfluencers getLoadQueryInfluencers()
Specified by:
getLoadQueryInfluencers in interface SessionImplementor

getSessionFactory

public SessionFactory getSessionFactory()
Specified by:
getSessionFactory in interface Session

getStatistics

public SessionStatistics getStatistics()
Specified by:
getStatistics in interface Session

isReadOnly

public boolean isReadOnly(Object entityOrProxy)
Specified by:
isReadOnly in interface Session

getTransaction

public Transaction getTransaction()
Specified by:
getTransaction in interface SharedSessionContract

isConnected

public boolean isConnected()
Specified by:
isConnected in interface SessionImplementor
Specified by:
isConnected in interface Session

isDirty

public boolean isDirty()
                throws HibernateException
Specified by:
isDirty in interface Session
Throws:
HibernateException

isDefaultReadOnly

public boolean isDefaultReadOnly()
Specified by:
isDefaultReadOnly in interface Session

isOpen

public boolean isOpen()
Specified by:
isOpen in interface SessionImplementor
Specified by:
isOpen in interface Session

load

public Object load(String entityName,
                   Serializable id)
            throws HibernateException
Specified by:
load in interface Session
Throws:
HibernateException

load

public Object load(String entityName,
                   Serializable id,
                   LockMode lockMode)
            throws HibernateException
Specified by:
load in interface Session
Throws:
HibernateException

load

public Object load(String entityName,
                   Serializable id,
                   LockOptions lockOptions)
            throws HibernateException
Specified by:
load in interface Session
Throws:
HibernateException

load

public void load(Object object,
                 Serializable id)
          throws HibernateException
Specified by:
load in interface Session
Throws:
HibernateException

load

public Object load(Class theClass,
                   Serializable id)
            throws HibernateException
Specified by:
load in interface Session
Throws:
HibernateException

load

public Object load(Class theClass,
                   Serializable id,
                   LockMode lockMode)
            throws HibernateException
Specified by:
load in interface Session
Throws:
HibernateException

load

public Object load(Class theClass,
                   Serializable id,
                   LockOptions lockOptions)
            throws HibernateException
Specified by:
load in interface Session
Throws:
HibernateException

lock

public void lock(String entityName,
                 Object object,
                 LockMode lockMode)
          throws HibernateException
Specified by:
lock in interface Session
Throws:
HibernateException

buildLockRequest

public Session.LockRequest buildLockRequest(LockOptions lockOptions)
Specified by:
buildLockRequest in interface Session

lock

public void lock(Object object,
                 LockMode lockMode)
          throws HibernateException
Specified by:
lock in interface Session
Throws:
HibernateException

merge

public Object merge(String entityName,
                    Object object)
             throws HibernateException
Specified by:
merge in interface Session
Throws:
HibernateException

merge

public Object merge(Object object)
             throws HibernateException
Specified by:
merge in interface Session
Throws:
HibernateException

persist

public void persist(String entityName,
                    Object object)
             throws HibernateException
Specified by:
persist in interface Session
Throws:
HibernateException

persist

public void persist(Object object)
             throws HibernateException
Specified by:
persist in interface Session
Throws:
HibernateException

reconnect

public void reconnect(Connection connection)
               throws HibernateException
Specified by:
reconnect in interface Session
Throws:
HibernateException

refresh

public void refresh(Object object)
             throws HibernateException
Specified by:
refresh in interface Session
Throws:
HibernateException

refresh

public void refresh(String entityName,
                    Object object)
             throws HibernateException
Specified by:
refresh in interface Session
Throws:
HibernateException

refresh

public void refresh(Object object,
                    LockMode lockMode)
             throws HibernateException
Specified by:
refresh in interface Session
Throws:
HibernateException

refresh

public void refresh(Object object,
                    LockOptions lockOptions)
             throws HibernateException
Specified by:
refresh in interface Session
Throws:
HibernateException

refresh

public void refresh(String entityName,
                    Object object,
                    LockOptions lockOptions)
             throws HibernateException
Specified by:
refresh in interface Session
Throws:
HibernateException

replicate

public void replicate(String entityName,
                      Object object,
                      ReplicationMode replicationMode)
               throws HibernateException
Specified by:
replicate in interface Session
Throws:
HibernateException

replicate

public void replicate(Object object,
                      ReplicationMode replicationMode)
               throws HibernateException
Specified by:
replicate in interface Session
Throws:
HibernateException

save

public Serializable save(String entityName,
                         Object object)
                  throws HibernateException
Specified by:
save in interface Session
Throws:
HibernateException

save

public Serializable save(Object object)
                  throws HibernateException
Specified by:
save in interface Session
Throws:
HibernateException

saveOrUpdate

public void saveOrUpdate(String entityName,
                         Object object)
                  throws HibernateException
Specified by:
saveOrUpdate in interface Session
Throws:
HibernateException

saveOrUpdate

public void saveOrUpdate(Object object)
                  throws HibernateException
Specified by:
saveOrUpdate in interface Session
Throws:
HibernateException

setCacheMode

public void setCacheMode(CacheMode cacheMode)
Specified by:
setCacheMode in interface SessionImplementor
Specified by:
setCacheMode in interface Session

setDefaultReadOnly

public void setDefaultReadOnly(boolean readOnly)
Specified by:
setDefaultReadOnly in interface Session

setFlushMode

public void setFlushMode(FlushMode flushMode)
Specified by:
setFlushMode in interface SessionImplementor
Specified by:
setFlushMode in interface Session

connection

public Connection connection()
Specified by:
connection in interface SessionImplementor

setReadOnly

public void setReadOnly(Object entity,
                        boolean readOnly)
Specified by:
setReadOnly in interface Session

doWork

public void doWork(Work work)
            throws HibernateException
Specified by:
doWork in interface Session
Throws:
HibernateException

doReturningWork

public <T> T doReturningWork(ReturningWork<T> work)
                  throws HibernateException
Specified by:
doReturningWork in interface Session
Throws:
HibernateException

update

public void update(String entityName,
                   Object object)
            throws HibernateException
Specified by:
update in interface Session
Throws:
HibernateException

update

public void update(Object object)
            throws HibernateException
Specified by:
update in interface Session
Throws:
HibernateException

isFetchProfileEnabled

public boolean isFetchProfileEnabled(String name)
                              throws UnknownProfileException
Specified by:
isFetchProfileEnabled in interface Session
Throws:
UnknownProfileException

enableFetchProfile

public void enableFetchProfile(String name)
                        throws UnknownProfileException
Specified by:
enableFetchProfile in interface Session
Throws:
UnknownProfileException

disableFetchProfile

public void disableFetchProfile(String name)
                         throws UnknownProfileException
Specified by:
disableFetchProfile in interface Session
Throws:
UnknownProfileException

getTypeHelper

public TypeHelper getTypeHelper()
Specified by:
getTypeHelper in interface Session

getLobHelper

public LobHelper getLobHelper()
Specified by:
getLobHelper in interface Session

execute

public <T> T execute(LobCreationContext.Callback<T> callback)
Specified by:
execute in interface LobCreationContext

byId

public IdentifierLoadAccess byId(String entityName)
Specified by:
byId in interface Session

byId

public IdentifierLoadAccess byId(Class entityClass)
Specified by:
byId in interface Session

byNaturalId

public NaturalIdLoadAccess byNaturalId(String entityName)
Specified by:
byNaturalId in interface Session

byNaturalId

public NaturalIdLoadAccess byNaturalId(Class entityClass)
Specified by:
byNaturalId in interface Session

bySimpleNaturalId

public SimpleNaturalIdLoadAccess bySimpleNaturalId(String entityName)
Specified by:
bySimpleNaturalId in interface Session

bySimpleNaturalId

public SimpleNaturalIdLoadAccess bySimpleNaturalId(Class entityClass)
Specified by:
bySimpleNaturalId in interface Session


Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved