com.holonplatform.datastore.jdbc.composer.internal

## Enum DefaultSQLValueSerializer

- java.lang.Object
- - java.lang.Enum<DefaultSQLValueSerializer>
  - - com.holonplatform.datastore.jdbc.composer.internal.DefaultSQLValueSerializer

- All Implemented Interfaces:
    SQLValueSerializer, Serializable, Comparable<DefaultSQLValueSerializer>

      public enum DefaultSQLValueSerializer
      extends Enum<DefaultSQLValueSerializer>
      implements SQLValueSerializer

  Default `SQLValueSerializer`.
  Since:
    5.1.0

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `INSTANCE` Singleton instance

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ANSI_DATE_FORMAT`
    `static String` | `ANSI_DATETIME_FORMAT`
    `static String` | `ANSI_TIME_FORMAT`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `serialize(Object value, com.holonplatform.core.temporal.TemporalType temporalType)` Serialize given value as a SQL string.
    `Optional<String>` | `serializeTemporal(Object value, com.holonplatform.core.temporal.TemporalType temporalType)` Try to serialize given temporal value as a SQL string, using given `temporalType` to select a suitable serialization format.
    `static DefaultSQLValueSerializer` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static DefaultSQLValueSerializer[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.holonplatform.datastore.jdbc.composer.SQLValueSerializer

      `getDefault, serialize`

- - ### Enum Constant Detail

    - #### INSTANCE

          public static final DefaultSQLValueSerializer INSTANCE

      Singleton instance

  - ### Field Detail

    - #### ANSI_DATE_FORMAT

          public static final String ANSI_DATE_FORMAT

      See Also:
        Constant Field Values

    - #### ANSI_TIME_FORMAT

          public static final String ANSI_TIME_FORMAT

      See Also:
        Constant Field Values

    - #### ANSI_DATETIME_FORMAT

          public static final String ANSI_DATETIME_FORMAT

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### values

          public static DefaultSQLValueSerializer[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (DefaultSQLValueSerializer c : DefaultSQLValueSerializer.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static DefaultSQLValueSerializer valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### serialize

          public String serialize(Object value,
                                  com.holonplatform.core.temporal.TemporalType temporalType)

      Description copied from interface: `SQLValueSerializer`
      Serialize given value as a SQL string.
      Specified by:
        `serialize` in interface `SQLValueSerializer`
      Parameters:
        `value` - Value to serialize
        `temporalType` - The `TemporalType` to use with temporal values
      Returns:
        Serialized SQL value. A `null` value will be serialized as the `NULL` string

    - #### serializeTemporal

          public Optional<String> serializeTemporal(Object value,
                                                    com.holonplatform.core.temporal.TemporalType temporalType)

      Description copied from interface: `SQLValueSerializer`
      Try to serialize given temporal value as a SQL string, using given `temporalType` to select a suitable serialization format.
      Specified by:
        `serializeTemporal` in interface `SQLValueSerializer`
      Parameters:
        `value` - Value to serialize
        `temporalType` - Value temporal type
      Returns:
        Serialized SQL value, or an empty Optional if the value type is not supported by the serializer

Copyright © 2019 The Holon Platform. All rights reserved.