org.hibernate.search.indexes.serialization.spi

## Interface LuceneWorksBuilder

- All Known Implementing Classes:
    LuceneWorkHydrator

      public interface LuceneWorksBuilder

  During de-serialization a `Deserializer` needs to build a list of `LuceneWork` instances from binary data. To do so, it gets passed a `LuceneWorksBuilder` instance which defines "template methods" to assemble the work instances.

  Note:
  The order in which calls need to be made is not clearly defined making this API rather fragile. Refer to `AvroDeserializer` to see how the builder is used.

  Author:
    Emmanuel Bernard <emmanuel@hibernate.org>
  See Also:
    `Deserializer`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAddLuceneWork(String entityClassName, Map<String,String> fieldToAnalyzerMap, ConversionContext conversionContext)`
    `void` | `addAttributeInstance(AttributeImpl attribute)`
    `void` | `addCharTermAttribute(CharSequence sequence)`
    `void` | `addDeleteByQueryLuceneWork(String entityClassName, DeletionQuery deletionQuery)`
    `void` | `addDeleteLuceneWork(String entityClassName, ConversionContext conversionContext)`
    `void` | `addDocValuesFieldWithBinaryData(String name, String type, byte[] value, int offset, int length)`
    `void` | `addDocValuesFieldWithNumericData(String name, String type, long value)`
    `void` | `addDoubleNumericField(double value, String name, int precisionStep, SerializableStore store, boolean indexed, float boost, boolean omitNorms, boolean omitTermFreqAndPositions)`
    `void` | `addFieldable(byte[] instance)`
    `void` | `addFieldWithBinaryData(String name, byte[] value, int offset, int length)`
    `void` | `addFieldWithSerializableReaderData(String name, byte[] value, 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` | `addFlush()`
    `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()`

- - ### Method Detail

    - #### addOptimizeAll

          void addOptimizeAll()

    - #### addFlush

          void addFlush()

    - #### addPurgeAllLuceneWork

          void addPurgeAllLuceneWork(String entityClassName)

    - #### addIdAsJavaSerialized

          void addIdAsJavaSerialized(byte[] idAsByte)

    - #### addId

          void addId(Serializable id)

    - #### addDeleteLuceneWork

          void addDeleteLuceneWork(String entityClassName,
                                   ConversionContext conversionContext)

    - #### addDeleteByQueryLuceneWork

          void addDeleteByQueryLuceneWork(String entityClassName,
                                          DeletionQuery deletionQuery)

    - #### addAddLuceneWork

          void addAddLuceneWork(String entityClassName,
                                Map<String,String> fieldToAnalyzerMap,
                                ConversionContext conversionContext)

    - #### addUpdateLuceneWork

          void addUpdateLuceneWork(String entityClassName,
                                   Map<String,String> fieldToAnalyzerMap,
                                   ConversionContext conversionContext)

    - #### defineDocument

          void defineDocument()

    - #### addFieldable

          void addFieldable(byte[] instance)

    - #### addIntNumericField

          void addIntNumericField(int value,
                                  String name,
                                  int precisionStep,
                                  SerializableStore store,
                                  boolean indexed,
                                  float boost,
                                  boolean omitNorms,
                                  boolean omitTermFreqAndPositions)

    - #### addLongNumericField

          void addLongNumericField(long value,
                                   String name,
                                   int precisionStep,
                                   SerializableStore store,
                                   boolean indexed,
                                   float boost,
                                   boolean omitNorms,
                                   boolean omitTermFreqAndPositions)

    - #### addFloatNumericField

          void addFloatNumericField(float value,
                                    String name,
                                    int precisionStep,
                                    SerializableStore store,
                                    boolean indexed,
                                    float boost,
                                    boolean omitNorms,
                                    boolean omitTermFreqAndPositions)

    - #### addDoubleNumericField

          void addDoubleNumericField(double value,
                                     String name,
                                     int precisionStep,
                                     SerializableStore store,
                                     boolean indexed,
                                     float boost,
                                     boolean omitNorms,
                                     boolean omitTermFreqAndPositions)

    - #### addFieldWithBinaryData

          void addFieldWithBinaryData(String name,
                                      byte[] value,
                                      int offset,
                                      int length)

    - #### addFieldWithStringData

          void addFieldWithStringData(String name,
                                      String value,
                                      SerializableStore store,
                                      SerializableIndex index,
                                      SerializableTermVector termVector,
                                      float boost,
                                      boolean omitNorms,
                                      boolean omitTermFreqAndPositions)

    - #### addFieldWithTokenStreamData

          void addFieldWithTokenStreamData(String name,
                                           SerializableTermVector termVector,
                                           float boost,
                                           boolean omitNorms,
                                           boolean omitTermFreqAndPositions)

    - #### addFieldWithSerializableReaderData

          void addFieldWithSerializableReaderData(String name,
                                                  byte[] value,
                                                  SerializableTermVector termVector,
                                                  float boost,
                                                  boolean omitNorms,
                                                  boolean omitTermFreqAndPositions)

    - #### addSerializedAttribute

          void addSerializedAttribute(byte[] bytes)

    - #### addAttributeInstance

          void addAttributeInstance(AttributeImpl attribute)

    - #### addTokenTrackingAttribute

          void addTokenTrackingAttribute(List<Integer> positions)

    - #### addCharTermAttribute

          void addCharTermAttribute(CharSequence sequence)

    - #### addPayloadAttribute

          void addPayloadAttribute(byte[] payloads)

    - #### addKeywordAttribute

          void addKeywordAttribute(boolean isKeyword)

    - #### addPositionIncrementAttribute

          void addPositionIncrementAttribute(int positionIncrement)

    - #### addFlagsAttribute

          void addFlagsAttribute(int flags)

    - #### addTypeAttribute

          void addTypeAttribute(String type)

    - #### addOffsetAttribute

          void addOffsetAttribute(int startOffset,
                                  int endOffset)

    - #### addToken

          void addToken()

    - #### addDocValuesFieldWithBinaryData

          void addDocValuesFieldWithBinaryData(String name,
                                               String type,
                                               byte[] value,
                                               int offset,
                                               int length)

    - #### addDocValuesFieldWithNumericData

          void addDocValuesFieldWithNumericData(String name,
                                                String type,
                                                long value)

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved