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(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(Criteria 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(Criteria criteria, ScrollMode scrollMode)
           
 ScrollableResults scroll(NativeSQLQuerySpecification spec, QueryParameters queryParameters)
           
 ScrollableResults scroll(String query, QueryParameters queryParameters)
           
 ScrollableResults scrollCustomQuery(CustomQuery customQuery, QueryParameters queryParameters)
           
 FullTextSharedSessionBuilder 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(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. Any EntityIndexingInterceptor registered on the entity type will be ignored.

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). Any EntityIndexingInterceptor registered on the entity will be ignored: this method forces a purge operation.

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. Any EntityIndexingInterceptor registered on the entity types are applied: each instance will trigger an EntityIndexingInterceptor.onAdd(Object) event from where you can customize the indexing operation.

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

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()
Specified by:
beginTransaction in interface SharedSessionContract

cancelQuery

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

clear

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

close

public Connection close()
Specified by:
close in interface Session

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)
Specified by:
createFilter in interface Session

createQuery

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

createSQLQuery

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

delete

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

delete

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

disableFilter

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

disconnect

public Connection disconnect()
Specified by:
disconnect in interface Session

enableFilter

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

evict

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

sessionWithOptions

public FullTextSharedSessionBuilder sessionWithOptions()
Description copied from interface: FullTextSession

Specified by:
sessionWithOptions in interface FullTextSession
Specified by:
sessionWithOptions in interface Session

flush

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

get

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

get

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

get

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

get

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

get

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

get

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

getCacheMode

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

getCurrentLockMode

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

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)
Specified by:
initializeCollection in interface SessionImplementor

internalLoad

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

immediateLoad

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

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)
Specified by:
list in interface SessionImplementor

iterate

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

scroll

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

scroll

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

list

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

listFilter

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

iterateFilter

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

getEntityPersister

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

getEntityUsingInterceptor

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

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)
Specified by:
guessEntityName in interface SessionImplementor

instantiate

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

listCustomQuery

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

scrollCustomQuery

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

list

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

scroll

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

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)
Specified by:
executeUpdate in interface SessionImplementor

executeNativeUpdate

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

getNonFlushedChanges

public NonFlushedChanges getNonFlushedChanges()
Specified by:
getNonFlushedChanges in interface SessionImplementor

applyNonFlushedChanges

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

getEntityName

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

getFlushMode

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

getIdentifier

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

getNamedQuery

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

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()
Specified by:
isDirty in interface Session

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)
Specified by:
load in interface Session

load

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

load

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

load

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

load

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

load

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

load

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

lock

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

buildLockRequest

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

lock

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

merge

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

merge

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

persist

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

persist

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

reconnect

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

refresh

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

refresh

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

refresh

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

refresh

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

refresh

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

replicate

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

replicate

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

save

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

save

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

saveOrUpdate

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

saveOrUpdate

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

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)
Specified by:
doWork in interface Session

doReturningWork

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

update

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

update

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

isFetchProfileEnabled

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

enableFetchProfile

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

disableFetchProfile

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

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-2013 Red Hat, Inc. All Rights Reserved