org.hibernate.search.indexes.serialization.impl

## Class LuceneWorkHydrator

- java.lang.Object
- - org.hibernate.search.indexes.serialization.impl.LuceneWorkHydrator

- All Implemented Interfaces:
    LuceneWorksBuilder

      public class LuceneWorkHydrator
      extends Object
      implements LuceneWorksBuilder

  Default implementation of the `LuceneWorksBuilder`. An instance is passed to the `Deserializer.deserialize(byte[] , LuceneWorksBuilder )` method of the de-serializer of a given `SerializationProvider`.
  Author:
    Emmanuel Bernard <emmanuel@hibernate.org>, Sanne Grinovero

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LuceneWorkHydrator(ExtendedSearchIntegrator searchIntegrator)`

  - ### Method Summary

    All Methods Instance Methods Concrete 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[] instanceAsByte)`
    `void` | `addFieldWithBinaryData(String name, byte[] value, int offset, int length)`
    `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` | `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()`
    `List<AttributeImpl>` | `getAttributes()`
    `List<LuceneWork>` | `getLuceneWorks()`
    `List<List<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(ExtendedSearchIntegrator searchIntegrator)

  - ### Method Detail

    - #### getLuceneWorks

          public List<LuceneWork> getLuceneWorks()

    - #### addOptimizeAll

          public void addOptimizeAll()

      Specified by:
        `addOptimizeAll` in interface `LuceneWorksBuilder`

    - #### addFlush

          public void addFlush()

      Specified by:
        `addFlush` 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`

    - #### addDeleteByQueryLuceneWork

          public void addDeleteByQueryLuceneWork(String entityClassName,
                                                 DeletionQuery deletionQuery)

      Specified by:
        `addDeleteByQueryLuceneWork` 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()

      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)

      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(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`

    - #### addDocValuesFieldWithBinaryData

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

      Specified by:
        `addDocValuesFieldWithBinaryData` in interface `LuceneWorksBuilder`

    - #### addDocValuesFieldWithNumericData

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

      Specified by:
        `addDocValuesFieldWithNumericData` in interface `LuceneWorksBuilder`

    - #### getAttributes

          public List<AttributeImpl> getAttributes()

    - #### getTokens

          public List<List<AttributeImpl>> getTokens()

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