org.hibernate.search.bridge.builtin

## Class DefaultStringBridge

- java.lang.Object
- - org.hibernate.search.bridge.builtin.DefaultStringBridge

- All Implemented Interfaces:
    StringBridge

      public class DefaultStringBridge
      extends Object
      implements StringBridge

  Convert an object using the object's `toString` method or return `null` if the object is `null`.
  Author:
    Davide D'Alto

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static DefaultStringBridge` | `INSTANCE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultStringBridge()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `DefaultStringBridge` | `getInstance()`
    `String` | `objectToString(Object object)` Converts the object representation to a string.

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

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

- - ### Field Detail

    - #### INSTANCE

          public static final DefaultStringBridge INSTANCE

  - ### Constructor Detail

    - #### DefaultStringBridge

          public DefaultStringBridge()

  - ### Method Detail

    - #### objectToString

          public String objectToString(Object object)

      Description copied from interface: `StringBridge`
      Converts the object representation to a string.
      Specified by:
        `objectToString` in interface `StringBridge`
      Parameters:
        `object` - The object to transform into a string representation.
      Returns:
        String representation of the given object to be stored in Lucene index. The return string must not be `null`. It can be empty though.

    - #### getInstance

          @Factory
          public DefaultStringBridge getInstance()

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