org.hibernate.search.engine.nulls.codec.impl

## Class LuceneStringNullMarkerCodec

- java.lang.Object
- - org.hibernate.search.engine.nulls.codec.impl.LuceneStringNullMarkerCodec

- All Implemented Interfaces:
    NullMarkerCodec

      public class LuceneStringNullMarkerCodec
      extends Object

  Author:
    Sanne Grinovero

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected NullMarker` | `nullMarker`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LuceneStringNullMarkerCodec(NullMarker nullMarker)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Query` | `createNullMatchingQuery(String fieldName)` Create a Query to find all documents which have a 'null' value encoded in the specified field
    `void` | `encodeNullValue(String name, Document document, LuceneOptions luceneOptions)` Store the null marker in the Document.
    `NullMarker` | `getNullMarker()`
    `boolean` | `representsNullValue(IndexableField field)` Check if the field represents the encoding for a null element
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### nullMarker

          protected final NullMarker nullMarker

  - ### Constructor Detail

    - #### LuceneStringNullMarkerCodec

          public LuceneStringNullMarkerCodec(NullMarker nullMarker)

  - ### Method Detail

    - #### encodeNullValue

          public void encodeNullValue(String name,
                                      Document document,
                                      LuceneOptions luceneOptions)

      Description copied from interface: `NullMarkerCodec`
      Store the null marker in the Document. Some implementations might not do anything
      Parameters:
        `name` - the name of the field
        `document` - the document where to store the null marker
        `luceneOptions` - indexing options

    - #### createNullMatchingQuery

          public Query createNullMatchingQuery(String fieldName)

      Description copied from interface: `NullMarkerCodec`
      Create a Query to find all documents which have a 'null' value encoded in the specified field
      Parameters:
        `fieldName` - the field to target with the Query
      Returns:
        a new Lucene Query

    - #### representsNullValue

          public boolean representsNullValue(IndexableField field)

      Description copied from interface: `NullMarkerCodec`
      Check if the field represents the encoding for a null element
      Parameters:
        `field` - the fields to check
      Returns:
        true if the field argument is representing the encoding for a null element.

    - #### getNullMarker

          public NullMarker getNullMarker()

      Specified by:
        `getNullMarker` in interface `NullMarkerCodec`
      Returns:
        The null marker used by this codec.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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