org.hibernate.search.backend
Class LuceneWork
java.lang.Object
org.hibernate.search.backend.LuceneWork
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- AddLuceneWork, DeleteLuceneWork, OptimizeLuceneWork, PurgeAllLuceneWork
public abstract class LuceneWork
- extends Object
- implements Serializable
Represent a Serializable Lucene unit work
WARNING: This class aims to be serializable and passed in an asynchronous way across VMs
any non backward compatible serialization change should be done with great care
and publically announced. Specifically, new versions of Hibernate Search should be
able to handle changes produced by older versions of Hibernate Search if reasonably possible.
That is why each subclass susceptible to be pass along have a magic serialization number.
NOTE: we are relying on Lucene's Document to play nice unfortunately
- Author:
- Emmanuel Bernard, Hardy Ferentschik, Sanne Grinovero
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LuceneWork
public LuceneWork(Serializable id,
String idInString,
Class entity)
LuceneWork
public LuceneWork(Serializable id,
String idInString,
Class entity,
org.apache.lucene.document.Document document)
LuceneWork
public LuceneWork(Serializable id,
String idInString,
Class entity,
org.apache.lucene.document.Document document,
boolean batch)
isBatch
public boolean isBatch()
getDocument
public org.apache.lucene.document.Document getDocument()
getEntityClass
public Class getEntityClass()
getId
public Serializable getId()
getIdInString
public String getIdInString()
getWorkDelegate
public abstract <T> T getWorkDelegate(WorkVisitor<T> visitor)