com.holonplatform.core.query

## Interface ConstantExpression<T>

- Type Parameters:
    `T` - Expression type
  All Superinterfaces:
    ConstantConverterExpression<T,T>, ConverterExpression<T>, Expression, QueryProjection<T>, TypedExpression<T>

      public interface ConstantExpression<T>
      extends ConstantConverterExpression<T,T>, QueryProjection<T>

  Constant value expression which can also act as `QueryProjection`.
  Since:
    5.0.0

- - ### Nested Class Summary

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

      `Expression.ExpressionResolverFunction<E extends Expression,R extends Expression>, Expression.InvalidExpressionException`

  - ### Method Summary

    All Methods Static Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> ConstantExpression<T>` | `create(T value)` Create a `ConstantExpression` which represents a constant value.
    `static <T> ConstantExpression<T>` | `create(T value, Class<? extends T> type)` Create a `ConstantExpression` which represents a constant value.
    `static <T> ConstantExpression<T>` | `create(TypedExpression<T> expression, T value)` Create a `ConstantExpression` which represents a constant value, using given `expression` to inherit an `ExpressionValueConverter`, if available.

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

      `getModelValue, getValue`

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

      `getExpressionValueConverter, getModelType, getModelValue`

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

      `getTemporalType, getType, isCollectionExpression, isConverterExpression`

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

      `validate`

    - ### Methods inherited from interface com.holonplatform.core.query.QueryProjection

      `bean, constant, countAll, path, propertySet, propertySet`

- - ### Method Detail

    - #### create

          static <T> ConstantExpression<T> create(T value)

      Create a `ConstantExpression` which represents a constant value.
      Specified by:
        `create` in interface `ConstantConverterExpression<T,T>`
      Type Parameters:
        `T` - Expression type
      Parameters:
        `value` - Constant value
      Returns:
        A new constant expression

    - #### create

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

      Create a `ConstantExpression` which represents a constant value.
      Specified by:
        `create` in interface `ConstantConverterExpression<T,T>`
      Type Parameters:
        `T` - Expression type
      Parameters:
        `value` - Constant value
        `type` - Constant value type (not null)
      Returns:
        A new constant expression

    - #### create

          static <T> ConstantExpression<T> create(TypedExpression<T> expression,
                                                  T value)

      Create a `ConstantExpression` which represents a constant value, using given `expression` to inherit an `ExpressionValueConverter`, if available.
      Specified by:
        `create` in interface `ConstantConverterExpression<T,T>`
      Type Parameters:
        `T` - Expression type
      Parameters:
        `expression` - Expression form which to inherit an `ExpressionValueConverter`, if available (not null)
        `value` - Constant value
      Returns:
        A new constant expression

Copyright © 2019 The Holon Platform. All rights reserved.