com.holonplatform.datastore.mongo.core.expression

## Interface FieldValue

- All Superinterfaces:
    com.holonplatform.core.Expression

      public interface FieldValue
      extends com.holonplatform.core.Expression

  Expression which represents a MongoDB document field value.
  Since:
    5.2.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 FieldValue` | `create(Object value)` Create a new `FieldValue`.
    `static FieldValue` | `create(Object value, EnumCodecStrategy enumCodecStrategy)` Create a new `FieldValue`.
    `static FieldValue` | `create(Object value, com.holonplatform.core.TypedExpression<?> expression)` Create a new `FieldValue`.
    `static FieldValue` | `create(Object value, com.holonplatform.core.TypedExpression<?> expression, EnumCodecStrategy enumCodecStrategy)` Create a new `FieldValue`.
    `Optional<EnumCodecStrategy>` | `getEnumCodecStrategy()` Get the `EnumCodecStrategy` to use to encode/decode `Enum` type values.
    `Optional<com.holonplatform.core.TypedExpression<?>>` | `getExpression()` Get the `TypedExpression` to which the field value is bound, if any.
    `Object` | `getValue()` Get the field value.

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

      `validate`

- - ### Method Detail

    - #### getValue

          Object getValue()

      Get the field value.
      Returns:
        The field value (may be null)

    - #### getEnumCodecStrategy

          Optional<EnumCodecStrategy> getEnumCodecStrategy()

      Get the `EnumCodecStrategy` to use to encode/decode `Enum` type values.
      Returns:
        The enum codec strategy, if specified

    - #### getExpression

          Optional<com.holonplatform.core.TypedExpression<?>> getExpression()

      Get the `TypedExpression` to which the field value is bound, if any.
      Returns:
        Optional expression to which the field value is bound

    - #### create

          static FieldValue create(Object value)

      Create a new `FieldValue`.
      Parameters:
        `value` - The field value
      Returns:
        A new `FieldValue` instance

    - #### create

          static FieldValue create(Object value,
                                   com.holonplatform.core.TypedExpression<?> expression)

      Create a new `FieldValue`.
      Parameters:
        `value` - The field value
        `expression` - The expression to which the value is bound
      Returns:
        A new `FieldValue` instance

    - #### create

          static FieldValue create(Object value,
                                   EnumCodecStrategy enumCodecStrategy)

      Create a new `FieldValue`.
      Parameters:
        `value` - The field value
        `enumCodecStrategy` - The `EnumCodecStrategy` to use
      Returns:
        A new `FieldValue` instance

    - #### create

          static FieldValue create(Object value,
                                   com.holonplatform.core.TypedExpression<?> expression,
                                   EnumCodecStrategy enumCodecStrategy)

      Create a new `FieldValue`.
      Parameters:
        `value` - The field value
        `expression` - The expression to which the value is bound
        `enumCodecStrategy` - The `EnumCodecStrategy` to use
      Returns:
        A new `FieldValue` instance

Copyright © 2019 The Holon Platform. All rights reserved.