Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.search.jpa.impl
Class FullTextEntityManagerImpl

    java.lang.Object
      org.hibernate.search.jpa.impl.FullTextEntityManagerImpl

All Implemented Interfaces:
  java.io.Serializable, javax.persistence.EntityManager, FullTextEntityManager

    public class FullTextEntityManagerImpl

extends java.lang.Object
implements FullTextEntityManager, java.io.Serializable

Author:
  Emmanuel Bernard
See Also:
  Serialized Form

Constructor Summary
`FullTextEntityManagerImpl(javax.persistence.EntityManager em)`

Method Summary
`void` | `clear()`
`void` | `close()`
`boolean` | `contains(java.lang.Object entity)`
`FullTextQuery` | `createFullTextQuery(org.apache.lucene.search.Query luceneQuery, java.lang.Class<?>... entities)` Create a fulltext query on top of a native Lucene query returning the matching objects of type `entities` and their respective subclasses.
`MassIndexer` | `createIndexer(java.lang.Class<?>... types)` Creates a MassIndexer to rebuild the indexes of some or all indexed entity types.
`javax.persistence.Query` | `createNamedQuery(java.lang.String name)`
`
`<T> javax.persistence.TypedQuery<T>`
` | `createNamedQuery(java.lang.String name, java.lang.Class<T> resultClass)`
`javax.persistence.Query` | `createNativeQuery(java.lang.String sqlString)`
`javax.persistence.Query` | `createNativeQuery(java.lang.String sqlString, java.lang.Class resultClass)`
`javax.persistence.Query` | `createNativeQuery(java.lang.String sqlString, java.lang.String resultSetMapping)`
`
`<T> javax.persistence.TypedQuery<T>`
` | `createQuery(javax.persistence.criteria.CriteriaQuery<T> criteriaQuery)`
`javax.persistence.Query` | `createQuery(java.lang.String ejbqlString)`
`
`<T> javax.persistence.TypedQuery<T>`
` | `createQuery(java.lang.String qlString, java.lang.Class<T> resultClass)`
`void` | `detach(java.lang.Object entity)`
`
`<T> T`
` | `find(java.lang.Class<T> entityClass, java.lang.Object primaryKey)`
`
`<T> T`
` | `find(java.lang.Class<T> entityClass, java.lang.Object primaryKey, javax.persistence.LockModeType lockModeType)`
`
`<T> T`
` | `find(java.lang.Class<T> entityClass, java.lang.Object primaryKey, javax.persistence.LockModeType lockModeType, java.util.Map<java.lang.String,java.lang.Object> hints)`
`
`<T> T`
` | `find(java.lang.Class<T> entityClass, java.lang.Object primaryKey, java.util.Map<java.lang.String,java.lang.Object> hints)`
`void` | `flush()`
`void` | `flushToIndexes()` Flush all index changes forcing Hibernate Search to apply all changes to the index not waiting for the batch limit.
`javax.persistence.criteria.CriteriaBuilder` | `getCriteriaBuilder()`
`java.lang.Object` | `getDelegate()`
`javax.persistence.EntityManagerFactory` | `getEntityManagerFactory()`
`javax.persistence.FlushModeType` | `getFlushMode()`
`javax.persistence.LockModeType` | `getLockMode(java.lang.Object entity)`
`javax.persistence.metamodel.Metamodel` | `getMetamodel()`
`java.util.Map<java.lang.String,java.lang.Object>` | `getProperties()`
`
`<T> T`
` | `getReference(java.lang.Class<T> entityClass, java.lang.Object primaryKey)`
`SearchFactory` | `getSearchFactory()`
`javax.persistence.EntityTransaction` | `getTransaction()`
`
`<T> void`
` | `index(T entity)` Force the (re)indexing of a given managed object.
`boolean` | `isOpen()`
`void` | `joinTransaction()`
`void` | `lock(java.lang.Object entity, javax.persistence.LockModeType lockMode)`
`void` | `lock(java.lang.Object entity, javax.persistence.LockModeType lockModeType, java.util.Map<java.lang.String,java.lang.Object> hints)`
`
`<T> T`
` | `merge(T entity)`
`void` | `persist(java.lang.Object entity)`
`
`<T> void`
` | `purge(java.lang.Class<T> entityType, java.io.Serializable id)` Remove the entity with the type `entityType` and the identifier `id` from the index.
`
`<T> void`
` | `purgeAll(java.lang.Class<T> entityType)` Remove all entities from of particular class and all its subclasses from the index.
`void` | `refresh(java.lang.Object entity)`
`void` | `refresh(java.lang.Object entity, javax.persistence.LockModeType lockModeType)`
`void` | `refresh(java.lang.Object entity, javax.persistence.LockModeType lockModeType, java.util.Map<java.lang.String,java.lang.Object> hints)`
`void` | `refresh(java.lang.Object entity, java.util.Map<java.lang.String,java.lang.Object> hints)`
`void` | `remove(java.lang.Object entity)`
`void` | `setFlushMode(javax.persistence.FlushModeType flushMode)`
`void` | `setProperty(java.lang.String key, java.lang.Object value)`
`
`<T> T`
` | `unwrap(java.lang.Class<T> type)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FullTextEntityManagerImpl

    public FullTextEntityManagerImpl(javax.persistence.EntityManager em)

Method Detail

### createFullTextQuery

    public FullTextQuery createFullTextQuery(org.apache.lucene.search.Query luceneQuery,
                                             java.lang.Class<?>... entities)

  Description copied from interface: `FullTextEntityManager`
  Create a fulltext query on top of a native Lucene query returning the matching objects of type `entities` and their respective subclasses.

  Specified by:
    `createFullTextQuery` in interface `FullTextEntityManager`
  Parameters:
    `luceneQuery` - The native Lucene query to be rn against the Lucene index.
    `entities` - List of classes for type filtering. The query result will only return entities of the specified types and their respective subtype. If no class is specified no type filtering will take place.
  Returns:
    A `FullTextQuery` wrapping around the native Lucene wuery.

### index

    public <T> void index(T entity)

  Description copied from interface: `FullTextEntityManager`
  Force the (re)indexing of a given managed object. Indexation is batched per transaction: if a transaction is active, the operation will not affect the index at least until commit.

  Specified by:
    `index` in interface `FullTextEntityManager`
  Parameters:
    `entity` - The entity to index - must not be `null`.

### getSearchFactory

    public SearchFactory getSearchFactory()

  Specified by:
    `getSearchFactory` in interface `FullTextEntityManager`
  Returns:
    the `SearchFactory` instance.

### purge

    public <T> void purge(java.lang.Class<T> entityType,
                          java.io.Serializable id)

  Description copied from interface: `FullTextEntityManager`
  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 `FullTextEntityManager.purgeAll(Class)`.

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

### purgeAll

    public <T> void purgeAll(java.lang.Class<T> entityType)

  Description copied from interface: `FullTextEntityManager`
  Remove all entities from of particular class and all its subclasses from the index.

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

### flushToIndexes

    public void flushToIndexes()

  Description copied from interface: `FullTextEntityManager`
  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 `FullTextEntityManager`

### persist

    public void persist(java.lang.Object entity)

  Specified by:
    `persist` in interface `javax.persistence.EntityManager`

### merge

    public <T> T merge(T entity)

  Specified by:
    `merge` in interface `javax.persistence.EntityManager`

### remove

    public void remove(java.lang.Object entity)

  Specified by:
    `remove` in interface `javax.persistence.EntityManager`

### find

    public <T> T find(java.lang.Class<T> entityClass,
                      java.lang.Object primaryKey)

  Specified by:
    `find` in interface `javax.persistence.EntityManager`

### find

    public <T> T find(java.lang.Class<T> entityClass,
                      java.lang.Object primaryKey,
                      java.util.Map<java.lang.String,java.lang.Object> hints)

  Specified by:
    `find` in interface `javax.persistence.EntityManager`

### find

    public <T> T find(java.lang.Class<T> entityClass,
                      java.lang.Object primaryKey,
                      javax.persistence.LockModeType lockModeType)

  Specified by:
    `find` in interface `javax.persistence.EntityManager`

### find

    public <T> T find(java.lang.Class<T> entityClass,
                      java.lang.Object primaryKey,
                      javax.persistence.LockModeType lockModeType,
                      java.util.Map<java.lang.String,java.lang.Object> hints)

  Specified by:
    `find` in interface `javax.persistence.EntityManager`

### getReference

    public <T> T getReference(java.lang.Class<T> entityClass,
                              java.lang.Object primaryKey)

  Specified by:
    `getReference` in interface `javax.persistence.EntityManager`

### flush

    public void flush()

  Specified by:
    `flush` in interface `javax.persistence.EntityManager`

### setFlushMode

    public void setFlushMode(javax.persistence.FlushModeType flushMode)

  Specified by:
    `setFlushMode` in interface `javax.persistence.EntityManager`

### getFlushMode

    public javax.persistence.FlushModeType getFlushMode()

  Specified by:
    `getFlushMode` in interface `javax.persistence.EntityManager`

### lock

    public void lock(java.lang.Object entity,
                     javax.persistence.LockModeType lockMode)

  Specified by:
    `lock` in interface `javax.persistence.EntityManager`

### lock

    public void lock(java.lang.Object entity,
                     javax.persistence.LockModeType lockModeType,
                     java.util.Map<java.lang.String,java.lang.Object> hints)

  Specified by:
    `lock` in interface `javax.persistence.EntityManager`

### refresh

    public void refresh(java.lang.Object entity)

  Specified by:
    `refresh` in interface `javax.persistence.EntityManager`

### refresh

    public void refresh(java.lang.Object entity,
                        java.util.Map<java.lang.String,java.lang.Object> hints)

  Specified by:
    `refresh` in interface `javax.persistence.EntityManager`

### refresh

    public void refresh(java.lang.Object entity,
                        javax.persistence.LockModeType lockModeType)

  Specified by:
    `refresh` in interface `javax.persistence.EntityManager`

### refresh

    public void refresh(java.lang.Object entity,
                        javax.persistence.LockModeType lockModeType,
                        java.util.Map<java.lang.String,java.lang.Object> hints)

  Specified by:
    `refresh` in interface `javax.persistence.EntityManager`

### clear

    public void clear()

  Specified by:
    `clear` in interface `javax.persistence.EntityManager`

### detach

    public void detach(java.lang.Object entity)

  Specified by:
    `detach` in interface `javax.persistence.EntityManager`

### contains

    public boolean contains(java.lang.Object entity)

  Specified by:
    `contains` in interface `javax.persistence.EntityManager`

### getLockMode

    public javax.persistence.LockModeType getLockMode(java.lang.Object entity)

  Specified by:
    `getLockMode` in interface `javax.persistence.EntityManager`

### setProperty

    public void setProperty(java.lang.String key,
                            java.lang.Object value)

  Specified by:
    `setProperty` in interface `javax.persistence.EntityManager`

### getProperties

    public java.util.Map<java.lang.String,java.lang.Object> getProperties()

  Specified by:
    `getProperties` in interface `javax.persistence.EntityManager`

### createQuery

    public javax.persistence.Query createQuery(java.lang.String ejbqlString)

  Specified by:
    `createQuery` in interface `javax.persistence.EntityManager`

### createQuery

    public <T> javax.persistence.TypedQuery<T> createQuery(javax.persistence.criteria.CriteriaQuery<T> criteriaQuery)

  Specified by:
    `createQuery` in interface `javax.persistence.EntityManager`

### createQuery

    public <T> javax.persistence.TypedQuery<T> createQuery(java.lang.String qlString,
                                                           java.lang.Class<T> resultClass)

  Specified by:
    `createQuery` in interface `javax.persistence.EntityManager`

### createNamedQuery

    public javax.persistence.Query createNamedQuery(java.lang.String name)

  Specified by:
    `createNamedQuery` in interface `javax.persistence.EntityManager`

### createNamedQuery

    public <T> javax.persistence.TypedQuery<T> createNamedQuery(java.lang.String name,
                                                                java.lang.Class<T> resultClass)

  Specified by:
    `createNamedQuery` in interface `javax.persistence.EntityManager`

### createNativeQuery

    public javax.persistence.Query createNativeQuery(java.lang.String sqlString)

  Specified by:
    `createNativeQuery` in interface `javax.persistence.EntityManager`

### createNativeQuery

    public javax.persistence.Query createNativeQuery(java.lang.String sqlString,
                                                     java.lang.Class resultClass)

  Specified by:
    `createNativeQuery` in interface `javax.persistence.EntityManager`

### createNativeQuery

    public javax.persistence.Query createNativeQuery(java.lang.String sqlString,
                                                     java.lang.String resultSetMapping)

  Specified by:
    `createNativeQuery` in interface `javax.persistence.EntityManager`

### joinTransaction

    public void joinTransaction()

  Specified by:
    `joinTransaction` in interface `javax.persistence.EntityManager`

### unwrap

    public <T> T unwrap(java.lang.Class<T> type)

  Specified by:
    `unwrap` in interface `javax.persistence.EntityManager`

### getDelegate

    public java.lang.Object getDelegate()

  Specified by:
    `getDelegate` in interface `javax.persistence.EntityManager`

### close

    public void close()

  Specified by:
    `close` in interface `javax.persistence.EntityManager`

### isOpen

    public boolean isOpen()

  Specified by:
    `isOpen` in interface `javax.persistence.EntityManager`

### getTransaction

    public javax.persistence.EntityTransaction getTransaction()

  Specified by:
    `getTransaction` in interface `javax.persistence.EntityManager`

### getEntityManagerFactory

    public javax.persistence.EntityManagerFactory getEntityManagerFactory()

  Specified by:
    `getEntityManagerFactory` in interface `javax.persistence.EntityManager`

### getCriteriaBuilder

    public javax.persistence.criteria.CriteriaBuilder getCriteriaBuilder()

  Specified by:
    `getCriteriaBuilder` in interface `javax.persistence.EntityManager`

### getMetamodel

    public javax.persistence.metamodel.Metamodel getMetamodel()

  Specified by:
    `getMetamodel` in interface `javax.persistence.EntityManager`

### createIndexer

    public MassIndexer createIndexer(java.lang.Class<?>... types)

  Description copied from interface: `FullTextEntityManager`
  Creates a MassIndexer to rebuild the indexes of some or all indexed entity types. Instances cannot be reused.

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2010 Hibernate. All Rights Reserved.