org.hibernate.search.indexes.serialization.impl
Class LuceneWorkHydrator

java.lang.Object
  extended by org.hibernate.search.indexes.serialization.impl.LuceneWorkHydrator
All Implemented Interfaces:
LuceneWorksBuilder

public class LuceneWorkHydrator
extends Object
implements LuceneWorksBuilder

Author:
Emmanuel Bernard

Constructor Summary
LuceneWorkHydrator(SearchFactoryImplementor searchFactory)
           
 
Method Summary
 void addAddLuceneWork(String entityClassName, Map<String,String> fieldToAnalyzerMap, ConversionContext conversionContext)
           
 void addAttributeInstance(org.apache.lucene.util.AttributeImpl attribute)
           
 void addCharTermAttribute(CharSequence sequence)
           
 void addDeleteLuceneWork(String entityClassName, ConversionContext conversionContext)
           
 void addDoubleNumericField(double value, String name, int precisionStep, SerializableStore store, boolean indexed, float boost, boolean omitNorms, boolean omitTermFreqAndPositions)
           
 void addFieldable(byte[] instanceAsByte)
           
 void addFieldWithBinaryData(String name, byte[] value, int offset, int length, float boost, boolean omitNorms, boolean omitTermFreqAndPositions)
           
 void addFieldWithSerializableReaderData(String name, byte[] valueAsByte, SerializableTermVector termVector, float boost, boolean omitNorms, boolean omitTermFreqAndPositions)
           
 void addFieldWithStringData(String name, String value, SerializableStore store, SerializableIndex index, SerializableTermVector termVector, float boost, boolean omitNorms, boolean omitTermFreqAndPositions)
           
 void addFieldWithTokenStreamData(String name, SerializableTermVector termVector, float boost, boolean omitNorms, boolean omitTermFreqAndPositions)
           
 void addFlagsAttribute(int flags)
           
 void addFloatNumericField(float value, String name, int precisionStep, SerializableStore store, boolean indexed, float boost, boolean omitNorms, boolean omitTermFreqAndPositions)
           
 void addId(Serializable id)
           
 void addIdAsJavaSerialized(byte[] idAsByte)
           
 void addIntNumericField(int value, String name, int precisionStep, SerializableStore store, boolean indexed, float boost, boolean omitNorms, boolean omitTermFreqAndPositions)
           
 void addKeywordAttribute(boolean isKeyword)
           
 void addLongNumericField(long value, String name, int precisionStep, SerializableStore store, boolean indexed, float boost, boolean omitNorms, boolean omitTermFreqAndPositions)
           
 void addOffsetAttribute(int startOffset, int endOffset)
           
 void addOptimizeAll()
           
 void addPayloadAttribute(byte[] payloads)
           
 void addPositionIncrementAttribute(int positionIncrement)
           
 void addPurgeAllLuceneWork(String entityClassName)
           
 void addSerializedAttribute(byte[] bytes)
           
 void addToken()
           
 void addTokenTrackingAttribute(List<Integer> positions)
           
 void addTypeAttribute(String type)
           
 void addUpdateLuceneWork(String entityClassName, Map<String,String> fieldToAnalyzerMap, ConversionContext conversionContext)
           
 void defineDocument(float boost)
           
 List<org.apache.lucene.util.AttributeImpl> getAttributes()
           
 List<LuceneWork> getLuceneWorks()
           
 List<List<org.apache.lucene.util.AttributeImpl>> getTokens()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LuceneWorkHydrator

public LuceneWorkHydrator(SearchFactoryImplementor searchFactory)
Method Detail

getLuceneWorks

public List<LuceneWork> getLuceneWorks()

addOptimizeAll

public void addOptimizeAll()
Specified by:
addOptimizeAll in interface LuceneWorksBuilder

addPurgeAllLuceneWork

public void addPurgeAllLuceneWork(String entityClassName)
Specified by:
addPurgeAllLuceneWork in interface LuceneWorksBuilder

addIdAsJavaSerialized

public void addIdAsJavaSerialized(byte[] idAsByte)
Specified by:
addIdAsJavaSerialized in interface LuceneWorksBuilder

addId

public void addId(Serializable id)
Specified by:
addId in interface LuceneWorksBuilder

addDeleteLuceneWork

public void addDeleteLuceneWork(String entityClassName,
                                ConversionContext conversionContext)
Specified by:
addDeleteLuceneWork in interface LuceneWorksBuilder

addAddLuceneWork

public void addAddLuceneWork(String entityClassName,
                             Map<String,String> fieldToAnalyzerMap,
                             ConversionContext conversionContext)
Specified by:
addAddLuceneWork in interface LuceneWorksBuilder

addUpdateLuceneWork

public void addUpdateLuceneWork(String entityClassName,
                                Map<String,String> fieldToAnalyzerMap,
                                ConversionContext conversionContext)
Specified by:
addUpdateLuceneWork in interface LuceneWorksBuilder

defineDocument

public void defineDocument(float boost)
Specified by:
defineDocument in interface LuceneWorksBuilder

addFieldable

public void addFieldable(byte[] instanceAsByte)
Specified by:
addFieldable in interface LuceneWorksBuilder

addIntNumericField

public void addIntNumericField(int value,
                               String name,
                               int precisionStep,
                               SerializableStore store,
                               boolean indexed,
                               float boost,
                               boolean omitNorms,
                               boolean omitTermFreqAndPositions)
Specified by:
addIntNumericField in interface LuceneWorksBuilder

addLongNumericField

public void addLongNumericField(long value,
                                String name,
                                int precisionStep,
                                SerializableStore store,
                                boolean indexed,
                                float boost,
                                boolean omitNorms,
                                boolean omitTermFreqAndPositions)
Specified by:
addLongNumericField in interface LuceneWorksBuilder

addFloatNumericField

public void addFloatNumericField(float value,
                                 String name,
                                 int precisionStep,
                                 SerializableStore store,
                                 boolean indexed,
                                 float boost,
                                 boolean omitNorms,
                                 boolean omitTermFreqAndPositions)
Specified by:
addFloatNumericField in interface LuceneWorksBuilder

addDoubleNumericField

public void addDoubleNumericField(double value,
                                  String name,
                                  int precisionStep,
                                  SerializableStore store,
                                  boolean indexed,
                                  float boost,
                                  boolean omitNorms,
                                  boolean omitTermFreqAndPositions)
Specified by:
addDoubleNumericField in interface LuceneWorksBuilder

addFieldWithBinaryData

public void addFieldWithBinaryData(String name,
                                   byte[] value,
                                   int offset,
                                   int length,
                                   float boost,
                                   boolean omitNorms,
                                   boolean omitTermFreqAndPositions)
Specified by:
addFieldWithBinaryData in interface LuceneWorksBuilder

addFieldWithStringData

public void addFieldWithStringData(String name,
                                   String value,
                                   SerializableStore store,
                                   SerializableIndex index,
                                   SerializableTermVector termVector,
                                   float boost,
                                   boolean omitNorms,
                                   boolean omitTermFreqAndPositions)
Specified by:
addFieldWithStringData in interface LuceneWorksBuilder

addFieldWithTokenStreamData

public void addFieldWithTokenStreamData(String name,
                                        SerializableTermVector termVector,
                                        float boost,
                                        boolean omitNorms,
                                        boolean omitTermFreqAndPositions)
Specified by:
addFieldWithTokenStreamData in interface LuceneWorksBuilder

addFieldWithSerializableReaderData

public void addFieldWithSerializableReaderData(String name,
                                               byte[] valueAsByte,
                                               SerializableTermVector termVector,
                                               float boost,
                                               boolean omitNorms,
                                               boolean omitTermFreqAndPositions)
Specified by:
addFieldWithSerializableReaderData in interface LuceneWorksBuilder

addSerializedAttribute

public void addSerializedAttribute(byte[] bytes)
Specified by:
addSerializedAttribute in interface LuceneWorksBuilder

addAttributeInstance

public void addAttributeInstance(org.apache.lucene.util.AttributeImpl attribute)
Specified by:
addAttributeInstance in interface LuceneWorksBuilder

addTokenTrackingAttribute

public void addTokenTrackingAttribute(List<Integer> positions)
Specified by:
addTokenTrackingAttribute in interface LuceneWorksBuilder

addCharTermAttribute

public void addCharTermAttribute(CharSequence sequence)
Specified by:
addCharTermAttribute in interface LuceneWorksBuilder

addPayloadAttribute

public void addPayloadAttribute(byte[] payloads)
Specified by:
addPayloadAttribute in interface LuceneWorksBuilder

addKeywordAttribute

public void addKeywordAttribute(boolean isKeyword)
Specified by:
addKeywordAttribute in interface LuceneWorksBuilder

addPositionIncrementAttribute

public void addPositionIncrementAttribute(int positionIncrement)
Specified by:
addPositionIncrementAttribute in interface LuceneWorksBuilder

addFlagsAttribute

public void addFlagsAttribute(int flags)
Specified by:
addFlagsAttribute in interface LuceneWorksBuilder

addTypeAttribute

public void addTypeAttribute(String type)
Specified by:
addTypeAttribute in interface LuceneWorksBuilder

addOffsetAttribute

public void addOffsetAttribute(int startOffset,
                               int endOffset)
Specified by:
addOffsetAttribute in interface LuceneWorksBuilder

addToken

public void addToken()
Specified by:
addToken in interface LuceneWorksBuilder

getAttributes

public List<org.apache.lucene.util.AttributeImpl> getAttributes()

getTokens

public List<List<org.apache.lucene.util.AttributeImpl>> getTokens()


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