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

## Class NotEncodingCodec

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

- All Implemented Interfaces:
    NullMarkerCodec

      public class NotEncodingCodec
      extends Object
      implements NullMarkerCodec

  Implementation of NullMarkerCodec which implements the no-op strategy of not writing anything to the index for null values.
  Author:
    Sanne Grinovero

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static NotEncodingCodec` | `SINGLETON`

  - ### 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 fieldName, 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

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

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

- - ### Field Detail

    - #### SINGLETON

          public static final NotEncodingCodec SINGLETON

  - ### Method Detail

    - #### getNullMarker

          public NullMarker getNullMarker()

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

    - #### encodeNullValue

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

      Description copied from interface: `NullMarkerCodec`
      Store the null marker in the Document. Some implementations might not do anything
      Specified by:
        `encodeNullValue` in interface `NullMarkerCodec`
      Parameters:
        `fieldName` - 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
      Specified by:
        `createNullMatchingQuery` in interface `NullMarkerCodec`
      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
      Specified by:
        `representsNullValue` in interface `NullMarkerCodec`
      Parameters:
        `field` - the fields to check
      Returns:
        true if the field argument is representing the encoding for a null element.

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