public class FullTextSessionImpl extends org.hibernate.engine.spi.SessionDelegatorBaseImpl implements FullTextSession, org.hibernate.engine.spi.SessionImplementor
| Constructor and Description |
|---|
FullTextSessionImpl(org.hibernate.Session session) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
void |
flushToIndexes()
Flush all index changes forcing Hibernate Search to apply all changes to the index not waiting for the batch limit.
|
SearchFactory |
getSearchFactory() |
<T> void |
index(T entity)
(Re-)index an entity.
|
<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.
|
FullTextSharedSessionBuilder |
sessionWithOptions() |
addEventListeners, afterScrollOperation, beginTransaction, bestGuessEntityName, buildLockRequest, byId, byId, byNaturalId, byNaturalId, bySimpleNaturalId, bySimpleNaturalId, cancelQuery, clear, close, connection, contains, createCriteria, createCriteria, createCriteria, createCriteria, createFilter, createQuery, createQuery, createSQLQuery, createSQLQuery, createStoredProcedureCall, createStoredProcedureCall, createStoredProcedureCall, delete, delete, disableFetchProfile, disableFilter, disableTransactionAutoJoin, disconnect, doReturningWork, doWork, enableFetchProfile, enableFilter, evict, execute, executeNativeUpdate, executeUpdate, flush, generateCacheKey, generateEntityKey, get, get, get, get, get, get, getCacheMode, getContextEntityIdentifier, getCurrentLockMode, getDontFlushFromFind, getEnabledFilter, getEnabledFilters, getEntityName, getEntityPersister, getEntityUsingInterceptor, getEventListenerManager, getFactory, getFetchProfile, getFilterParameterType, getFilterParameterValue, getFlushMode, getIdentifier, getInterceptor, getJdbcConnectionAccess, getLoadQueryInfluencers, getLobHelper, getNamedProcedureCall, getNamedQuery, getNamedSQLQuery, getPersistenceContext, getSessionFactory, getStatistics, getTenantIdentifier, getTimestamp, getTransaction, getTransactionCoordinator, getTypeHelper, guessEntityName, immediateLoad, initializeCollection, instantiate, internalLoad, isClosed, isConnected, isDefaultReadOnly, isDirty, isEventSource, isFetchProfileEnabled, isOpen, isReadOnly, isTransactionInProgress, iterate, iterateFilter, list, list, list, listCustomQuery, listFilter, load, load, load, load, load, load, load, lock, lock, merge, merge, persist, persist, reconnect, refresh, refresh, refresh, refresh, refresh, replicate, replicate, save, save, saveOrUpdate, saveOrUpdate, scroll, scroll, scroll, scrollCustomQuery, setAutoClear, setCacheMode, setDefaultReadOnly, setFetchProfile, setFlushMode, setReadOnly, update, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddEventListeners, buildLockRequest, byId, byId, byNaturalId, byNaturalId, bySimpleNaturalId, bySimpleNaturalId, cancelQuery, clear, close, contains, createFilter, delete, delete, disableFetchProfile, disableFilter, disconnect, doReturningWork, doWork, enableFetchProfile, enableFilter, evict, flush, get, get, get, get, get, get, getCacheMode, getCurrentLockMode, getEnabledFilter, getEntityName, getFlushMode, getIdentifier, getLobHelper, getSessionFactory, getStatistics, getTypeHelper, isConnected, isDefaultReadOnly, isDirty, isFetchProfileEnabled, isOpen, isReadOnly, load, load, load, load, load, load, load, lock, lock, merge, merge, persist, persist, reconnect, refresh, refresh, refresh, refresh, refresh, replicate, replicate, save, save, saveOrUpdate, saveOrUpdate, setCacheMode, setDefaultReadOnly, setFlushMode, setReadOnly, update, updatebeginTransaction, createCriteria, createCriteria, createCriteria, createCriteria, createQuery, createSQLQuery, createStoredProcedureCall, createStoredProcedureCall, createStoredProcedureCall, getNamedProcedureCall, getNamedQuery, getTenantIdentifier, getTransactionafterScrollOperation, bestGuessEntityName, connection, createQuery, createSQLQuery, disableTransactionAutoJoin, executeNativeUpdate, executeUpdate, flush, generateCacheKey, generateEntityKey, getCacheMode, getContextEntityIdentifier, getDontFlushFromFind, getEnabledFilters, getEntityPersister, getEntityUsingInterceptor, getEventListenerManager, getFactory, getFetchProfile, getFilterParameterType, getFilterParameterValue, getFlushMode, getInterceptor, getJdbcConnectionAccess, getLoadQueryInfluencers, getNamedQuery, getNamedSQLQuery, getPersistenceContext, getTenantIdentifier, getTimestamp, getTransactionCoordinator, guessEntityName, immediateLoad, initializeCollection, instantiate, internalLoad, isClosed, isConnected, isEventSource, isOpen, isTransactionInProgress, iterate, iterateFilter, list, list, list, listCustomQuery, listFilter, scroll, scroll, scroll, scrollCustomQuery, setAutoClear, setCacheMode, setFetchProfile, setFlushModepublic FullTextQuery createFullTextQuery(org.apache.lucene.search.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)
FullTextSessionEntityIndexingInterceptor 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)
FullTextSessionentityType 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 FullTextSharedSessionBuilder sessionWithOptions()
FullTextSessionsessionWithOptions in interface FullTextSessionsessionWithOptions in interface org.hibernate.SessionsessionWithOptions in class org.hibernate.engine.spi.SessionDelegatorBaseImplCopyright © 2006–2014 Hibernate. All rights reserved.