org.hibernate.search.impl
public class FullTextSessionImpl extends Object implements FullTextSession, SessionImplementor
Session.LockRequestLobCreationContext.Callback<T>| Constructor and Description |
|---|
FullTextSessionImpl(Session session) |
public FullTextSessionImpl(Session session)
public FullTextQuery createFullTextQuery(Query luceneQuery, Class<?>... entities)
createFullTextQuery in interface FullTextSessionentities - must be immutable for the lifetime of the query objectluceneQuery - The native Lucene query to be run against the Lucene index.FullTextQuery wrapping around the native Lucene query.public <T> void purgeAll(Class<T> entityType)
EntityIndexingInterceptor registered on the entity type will be ignored.purgeAll in interface FullTextSessionentityType - The class of the entities to remove.public void flushToIndexes()
FullTextSessionflushToIndexes in interface FullTextSessionpublic <T> void purge(Class<T> entityType, Serializable id)
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.purge in interface FullTextSessionentityType - The type of the entity to delete.id - The id of the entity to delete.public <T> void index(T entity)
index in interface FullTextSessionentity - The entity to index - must not be null.IllegalArgumentException - if entity is null or not an @Indexed entitypublic MassIndexer createIndexer(Class<?>... types)
FullTextSessionEntityIndexingInterceptor registered on the entity types are applied: each instance will trigger
an EntityIndexingInterceptor.onAdd(Object) event from where you can customize the indexing operation.createIndexer in interface FullTextSessiontypes - optionally restrict the operation to selected typespublic SearchFactory getSearchFactory()
getSearchFactory in interface FullTextSessionSearchFactory instance.public String getTenantIdentifier()
getTenantIdentifier in interface SessionImplementorgetTenantIdentifier in interface SharedSessionContractpublic Transaction beginTransaction()
beginTransaction in interface SharedSessionContractpublic void cancelQuery()
cancelQuery in interface Sessionpublic Connection close()
public Criteria createCriteria(String entityName)
createCriteria in interface SharedSessionContractpublic Criteria createCriteria(String entityName, String alias)
createCriteria in interface SharedSessionContractpublic Criteria createCriteria(Class persistentClass)
createCriteria in interface SharedSessionContractpublic Criteria createCriteria(Class persistentClass, String alias)
createCriteria in interface SharedSessionContractpublic Query createFilter(Object collection, String queryString)
createFilter in interface Sessionpublic Query createQuery(String queryString)
createQuery in interface SharedSessionContractpublic SQLQuery createSQLQuery(String queryString)
createSQLQuery in interface SharedSessionContractpublic void disableFilter(String filterName)
disableFilter in interface Sessionpublic Connection disconnect()
disconnect in interface Sessionpublic Filter enableFilter(String filterName)
enableFilter in interface Sessionpublic FullTextSharedSessionBuilder sessionWithOptions()
FullTextSessionsessionWithOptions in interface FullTextSessionsessionWithOptions in interface Sessionpublic void flush()
flush in interface SessionImplementorflush in interface Sessionpublic Object get(Class clazz, Serializable id)
public Object get(Class clazz, Serializable id, LockMode lockMode)
public Object get(Class clazz, Serializable id, LockOptions lockOptions)
public Object get(String entityName, Serializable id)
public Object get(String entityName, Serializable id, LockMode lockMode)
public Object get(String entityName, Serializable id, LockOptions lockOptions)
public CacheMode getCacheMode()
getCacheMode in interface SessionImplementorgetCacheMode in interface Sessionpublic LockMode getCurrentLockMode(Object object)
getCurrentLockMode in interface Sessionpublic Filter getEnabledFilter(String filterName)
getEnabledFilter in interface Sessionpublic JdbcConnectionAccess getJdbcConnectionAccess()
getJdbcConnectionAccess in interface SessionImplementorpublic EntityKey generateEntityKey(Serializable id, EntityPersister persister)
generateEntityKey in interface SessionImplementorpublic CacheKey generateCacheKey(Serializable id, Type type, String entityOrRoleName)
generateCacheKey in interface SessionImplementorpublic Interceptor getInterceptor()
getInterceptor in interface SessionImplementorpublic void setAutoClear(boolean enabled)
setAutoClear in interface SessionImplementorpublic void disableTransactionAutoJoin()
disableTransactionAutoJoin in interface SessionImplementorpublic boolean isTransactionInProgress()
isTransactionInProgress in interface SessionImplementorpublic void initializeCollection(PersistentCollection collection, boolean writing)
initializeCollection in interface SessionImplementorpublic Object internalLoad(String entityName, Serializable id, boolean eager, boolean nullable)
internalLoad in interface SessionImplementorpublic Object immediateLoad(String entityName, Serializable id)
immediateLoad in interface SessionImplementorpublic long getTimestamp()
getTimestamp in interface SessionImplementorpublic SessionFactoryImplementor getFactory()
getFactory in interface SessionImplementorpublic List list(String query, QueryParameters queryParameters)
list in interface SessionImplementorpublic Iterator iterate(String query, QueryParameters queryParameters)
iterate in interface SessionImplementorpublic ScrollableResults scroll(String query, QueryParameters queryParameters)
scroll in interface SessionImplementorpublic ScrollableResults scroll(Criteria criteria, ScrollMode scrollMode)
scroll in interface SessionImplementorpublic List list(Criteria criteria)
list in interface SessionImplementorpublic List listFilter(Object collection, String filter, QueryParameters queryParameters)
listFilter in interface SessionImplementorpublic Iterator iterateFilter(Object collection, String filter, QueryParameters queryParameters)
iterateFilter in interface SessionImplementorpublic EntityPersister getEntityPersister(String entityName, Object object)
getEntityPersister in interface SessionImplementorpublic Object getEntityUsingInterceptor(EntityKey key)
getEntityUsingInterceptor in interface SessionImplementorpublic Serializable getContextEntityIdentifier(Object object)
getContextEntityIdentifier in interface SessionImplementorpublic String bestGuessEntityName(Object object)
bestGuessEntityName in interface SessionImplementorpublic String guessEntityName(Object entity)
guessEntityName in interface SessionImplementorpublic Object instantiate(String entityName, Serializable id)
instantiate in interface SessionImplementorpublic List listCustomQuery(CustomQuery customQuery, QueryParameters queryParameters)
listCustomQuery in interface SessionImplementorpublic ScrollableResults scrollCustomQuery(CustomQuery customQuery, QueryParameters queryParameters)
scrollCustomQuery in interface SessionImplementorpublic List list(NativeSQLQuerySpecification spec, QueryParameters queryParameters)
list in interface SessionImplementorpublic ScrollableResults scroll(NativeSQLQuerySpecification spec, QueryParameters queryParameters)
scroll in interface SessionImplementorpublic Object getFilterParameterValue(String filterParameterName)
getFilterParameterValue in interface SessionImplementorpublic Type getFilterParameterType(String filterParameterName)
getFilterParameterType in interface SessionImplementorpublic Map getEnabledFilters()
getEnabledFilters in interface SessionImplementorpublic int getDontFlushFromFind()
getDontFlushFromFind in interface SessionImplementorpublic PersistenceContext getPersistenceContext()
getPersistenceContext in interface SessionImplementorpublic int executeUpdate(String query, QueryParameters queryParameters)
executeUpdate in interface SessionImplementorpublic int executeNativeUpdate(NativeSQLQuerySpecification specification, QueryParameters queryParameters)
executeNativeUpdate in interface SessionImplementorpublic NonFlushedChanges getNonFlushedChanges()
getNonFlushedChanges in interface SessionImplementorpublic void applyNonFlushedChanges(NonFlushedChanges nonFlushedChanges)
applyNonFlushedChanges in interface SessionImplementorpublic String getEntityName(Object object)
getEntityName in interface Sessionpublic FlushMode getFlushMode()
getFlushMode in interface SessionImplementorgetFlushMode in interface Sessionpublic Serializable getIdentifier(Object object)
getIdentifier in interface Sessionpublic Query getNamedQuery(String queryName)
getNamedQuery in interface SessionImplementorgetNamedQuery in interface SharedSessionContractpublic Query getNamedSQLQuery(String name)
getNamedSQLQuery in interface SessionImplementorpublic boolean isEventSource()
isEventSource in interface SessionImplementorpublic void afterScrollOperation()
afterScrollOperation in interface SessionImplementorpublic void setFetchProfile(String name)
setFetchProfile in interface SessionImplementorpublic TransactionCoordinator getTransactionCoordinator()
getTransactionCoordinator in interface SessionImplementorpublic String getFetchProfile()
getFetchProfile in interface SessionImplementorpublic boolean isClosed()
isClosed in interface SessionImplementorpublic LoadQueryInfluencers getLoadQueryInfluencers()
getLoadQueryInfluencers in interface SessionImplementorpublic SessionFactory getSessionFactory()
getSessionFactory in interface Sessionpublic SessionStatistics getStatistics()
getStatistics in interface Sessionpublic boolean isReadOnly(Object entityOrProxy)
isReadOnly in interface Sessionpublic Transaction getTransaction()
getTransaction in interface SharedSessionContractpublic boolean isConnected()
isConnected in interface SessionImplementorisConnected in interface Sessionpublic boolean isDefaultReadOnly()
isDefaultReadOnly in interface Sessionpublic boolean isOpen()
isOpen in interface SessionImplementorisOpen in interface Sessionpublic Object load(String entityName, Serializable id)
public Object load(String entityName, Serializable id, LockMode lockMode)
public Object load(String entityName, Serializable id, LockOptions lockOptions)
public void load(Object object, Serializable id)
public Object load(Class theClass, Serializable id)
public Object load(Class theClass, Serializable id, LockMode lockMode)
public Object load(Class theClass, Serializable id, LockOptions lockOptions)
public Session.LockRequest buildLockRequest(LockOptions lockOptions)
buildLockRequest in interface Sessionpublic void reconnect(Connection connection)
public void refresh(Object object, LockOptions lockOptions)
public void refresh(String entityName, Object object, LockOptions lockOptions)
public void replicate(String entityName, Object object, ReplicationMode replicationMode)
public void replicate(Object object, ReplicationMode replicationMode)
public Serializable save(String entityName, Object object)
public Serializable save(Object object)
public void saveOrUpdate(String entityName, Object object)
saveOrUpdate in interface Sessionpublic void saveOrUpdate(Object object)
saveOrUpdate in interface Sessionpublic void setCacheMode(CacheMode cacheMode)
setCacheMode in interface SessionImplementorsetCacheMode in interface Sessionpublic void setDefaultReadOnly(boolean readOnly)
setDefaultReadOnly in interface Sessionpublic void setFlushMode(FlushMode flushMode)
setFlushMode in interface SessionImplementorsetFlushMode in interface Sessionpublic Connection connection()
connection in interface SessionImplementorpublic void setReadOnly(Object entity, boolean readOnly)
setReadOnly in interface Sessionpublic <T> T doReturningWork(ReturningWork<T> work)
doReturningWork in interface Sessionpublic boolean isFetchProfileEnabled(String name)
isFetchProfileEnabled in interface Sessionpublic void enableFetchProfile(String name)
enableFetchProfile in interface Sessionpublic void disableFetchProfile(String name)
disableFetchProfile in interface Sessionpublic TypeHelper getTypeHelper()
getTypeHelper in interface Sessionpublic LobHelper getLobHelper()
getLobHelper in interface Sessionpublic <T> T execute(LobCreationContext.Callback<T> callback)
execute in interface LobCreationContextpublic IdentifierLoadAccess byId(String entityName)
public IdentifierLoadAccess byId(Class entityClass)
public NaturalIdLoadAccess byNaturalId(String entityName)
byNaturalId in interface Sessionpublic NaturalIdLoadAccess byNaturalId(Class entityClass)
byNaturalId in interface Sessionpublic SimpleNaturalIdLoadAccess bySimpleNaturalId(String entityName)
bySimpleNaturalId in interface Sessionpublic SimpleNaturalIdLoadAccess bySimpleNaturalId(Class entityClass)
bySimpleNaturalId in interface SessionCopyright © 2006-2015 Red Hat, Inc. All Rights Reserved