com.holonplatform.datastore.jdbc.composer.expression

## Interface SQLParameter<T>

- Type Parameters:
    `T` - Parameter type
  All Superinterfaces:
    com.holonplatform.core.Expression, com.holonplatform.core.TypedExpression<T>

      public interface SQLParameter<T>
      extends com.holonplatform.core.TypedExpression<T>

  SQL statement parameter definition.
  Since:
    5.1.0

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.holonplatform.core.Expression

      `com.holonplatform.core.Expression.ExpressionResolverFunction<E extends com.holonplatform.core.Expression,R extends com.holonplatform.core.Expression>, com.holonplatform.core.Expression.InvalidExpressionException`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> SQLParameter<T>` | `create(T value, Class<? extends T> type)` Create a new `SQLParameter`.
    `static <T> SQLParameter<T>` | `create(T value, Class<? extends T> type, Function<String,String> serializationFunction)` Create a new `SQLParameter`.
    `static <T> SQLParameter<T>` | `create(T value, Class<? extends T> type, com.holonplatform.core.temporal.TemporalType temporalType)` Create a new `SQLParameter`.
    `static <T> SQLParameter<T>` | `create(T value, Class<? extends T> type, com.holonplatform.core.temporal.TemporalType temporalType, Function<String,String> serializationFunction)` Create a new `SQLParameter`.
    `default Function<String,String>` | `getSerializationFunction()` Optional function which has to be used to serialize the parameter placeholder in the SQL statement.
    `T` | `getValue()` Get the parameter value

    - ### Methods inherited from interface com.holonplatform.core.TypedExpression

      `getTemporalType, getType, isCollectionExpression, isConverterExpression`

    - ### Methods inherited from interface com.holonplatform.core.Expression

      `validate`

- - ### Method Detail

    - #### getValue

          T getValue()

      Get the parameter value
      Returns:
        the parameter value, maybe `null`

    - #### getSerializationFunction

          default Function<String,String> getSerializationFunction()

      Optional function which has to be used to serialize the parameter placeholder in the SQL statement.
      Returns:
        Optional parameter placeholder serialization function

    - #### create

          static <T> SQLParameter<T> create(T value,
                                            Class<? extends T> type)

      Create a new `SQLParameter`.
      Type Parameters:
        `T` - Parameter value type
      Parameters:
        `value` - Parameter value
        `type` - Parameter value type (not null)
      Returns:
        A new `SQLParameter`

    - #### create

          static <T> SQLParameter<T> create(T value,
                                            Class<? extends T> type,
                                            com.holonplatform.core.temporal.TemporalType temporalType)

      Create a new `SQLParameter`.
      Type Parameters:
        `T` - Parameter value type
      Parameters:
        `value` - Parameter value
        `type` - Parameter value type (not null)
        `temporalType` - Value temporal type
      Returns:
        A new `SQLParameter`

    - #### create

          static <T> SQLParameter<T> create(T value,
                                            Class<? extends T> type,
                                            Function<String,String> serializationFunction)

      Create a new `SQLParameter`.
      Type Parameters:
        `T` - Parameter value type
      Parameters:
        `value` - Parameter value
        `type` - Parameter value type (not null)
        `serializationFunction` - Parameter serialization function
      Returns:
        A new `SQLParameter`

    - #### create

          static <T> SQLParameter<T> create(T value,
                                            Class<? extends T> type,
                                            com.holonplatform.core.temporal.TemporalType temporalType,
                                            Function<String,String> serializationFunction)

      Create a new `SQLParameter`.
      Type Parameters:
        `T` - Parameter value type
      Parameters:
        `value` - Parameter value
        `type` - Parameter value type (not null)
        `temporalType` - Value temporal type
        `serializationFunction` - Parameter serialization function
      Returns:
        A new `SQLParameter`

Copyright © 2019 The Holon Platform. All rights reserved.