org.hibernate.search.bridge.util.impl

## Class ToStringNullMarker

- java.lang.Object
- - org.hibernate.search.bridge.util.impl.ToStringNullMarker

- All Implemented Interfaces:
    NullMarker

      public class ToStringNullMarker
      extends Object
      implements NullMarker

  A null marker that uses toString() to retrieve the null string representation.
  Author:
    Yoann Rodiere

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ToStringNullMarker(Object indexNullAs)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `nullEncoded()` This returns the actual value to be indexed in place of null.
    `String` | `nullRepresentedAsString()` This is mostly a requirement for integration with other old-style contracts which expect a strongly String based strategy.
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### ToStringNullMarker

          public ToStringNullMarker(Object indexNullAs)

  - ### Method Detail

    - #### nullRepresentedAsString

          public String nullRepresentedAsString()

      Description copied from interface: `NullMarker`
      This is mostly a requirement for integration with other old-style contracts which expect a strongly String based strategy.
      Specified by:
        `nullRepresentedAsString` in interface `NullMarker`
      Returns:
        a string representation of the null-marker, or null if no marker is used.

    - #### nullEncoded

          public Object nullEncoded()

      Description copied from interface: `NullMarker`
      This returns the actual value to be indexed in place of null.

      The returned value may be:

      - A String, for text fields.
      - A Number, for numeric fields.
      Specified by:
        `nullEncoded` in interface `NullMarker`
      Returns:
        a representation of the null-marker ready to be indexed.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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