org.hibernate.search.backend
Class LuceneWork

java.lang.Object
  extended by org.hibernate.search.backend.LuceneWork
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AddLuceneWork, DeleteLuceneWork, FlushLuceneWork, OptimizeLuceneWork, PurgeAllLuceneWork, UpdateLuceneWork

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

Constructor Summary
LuceneWork(Serializable id, String idInString, Class<?> entity)
           
LuceneWork(Serializable id, String idInString, Class<?> entity, org.apache.lucene.document.Document document)
           
 
Method Summary
 org.apache.lucene.document.Document getDocument()
           
 Class<?> getEntityClass()
           
 Map<String,String> getFieldToAnalyzerMap()
           
 Serializable getId()
           
 String getIdInString()
           
abstract
<T> T
getWorkDelegate(WorkVisitor<T> visitor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LuceneWork

public LuceneWork(Serializable id,
                  String idInString,
                  Class<?> entity)

LuceneWork

public LuceneWork(Serializable id,
                  String idInString,
                  Class<?> entity,
                  org.apache.lucene.document.Document document)
Method Detail

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)

getFieldToAnalyzerMap

public Map<String,String> getFieldToAnalyzerMap()


Copyright © 2006-2013 Red Hat Middleware, LLC. All Rights Reserved