com.holonplatform.core

## Interface ConverterExpression<T>

- Type Parameters:
    `T` - Expression type
  All Superinterfaces:
    Expression, TypedExpression<T>
  All Known Subinterfaces:
    BeanProperty<T>, BeanProperty.Builder<T>, BooleanBeanProperty, BooleanProperty, BooleanProperty.BooleanPropertyBuilder, CloneableProperty<T,P,B>, CloneableProperty.CloneablePathProperty<T,P>, CollectionConstantExpression<T>, CollectionPathProperty<E,C>, CollectionProperty<E,C>, CollectionProperty.ListProperty<T>, CollectionProperty.SetProperty<T>, ConstantConverterExpression<T,E>, ConstantExpression<T>, ListPathProperty<T>, ListPathProperty.ListPathPropertyBuilder<T>, ListVirtualProperty<T>, ListVirtualProperty.ListVirtualPropertyBuilder<T>, NullExpression<T>, NumericBeanProperty<N>, NumericProperty<N>, NumericProperty.NumericPropertyBuilder<N>, PathProperty<T>, PathProperty.PathPropertyBuilder<T>, Property<T>, PropertyBoxProperty, PropertyBoxProperty.PropertyBoxPropertyBuilder, QueryFunction.Avg, QueryFunction.Count, QueryFunction.Max<T>, QueryFunction.Min<T>, QueryFunction.PropertyQueryFunction<T,A>, QueryFunction.Sum<T>, SetPathProperty<T>, SetPathProperty.SetPathPropertyBuilder<T>, SetVirtualProperty<T>, SetVirtualProperty.SetVirtualPropertyBuilder<T>, StringBeanProperty, StringFunction, StringFunction.Lower, StringFunction.Upper, StringProperty, StringProperty.StringPropertyBuilder, TemporalBeanProperty<T>, TemporalFunction.Day, TemporalFunction.Hour, TemporalFunction.Month, TemporalFunction.Year, TemporalProperty<T>, TemporalProperty.TemporalPropertyBuilder<T>, VirtualProperty<T>, VirtualProperty.Builder<T,P,B>, VirtualProperty.VirtualPropertyBuilder<T>
  All Known Implementing Classes:
    AbstractConverterExpression, DefaultCollectionConstantExpression, DefaultConstantConverterExpression, DefaultNullExpression

      public interface ConverterExpression<T>
      extends TypedExpression<T>

  A `TypedExpression` which supports an optional `ExpressionValueConverter` to perform expression type conversion.
  Since:
    5.1.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 Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `Optional<ExpressionValueConverter<T,?>>` | `getExpressionValueConverter()` Get the expression value type converter, if available.
    `default Class<?>` | `getModelType()` Get the model expression type.
    `default Object` | `getModelValue(T value)` Get the model data type value of given `value`, using the `ExpressionValueConverter` to convert the value, if available.

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

      `getTemporalType, getType, isCollectionExpression, isConverterExpression`

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

      `validate`

- - ### Method Detail

    - #### getExpressionValueConverter

          Optional<ExpressionValueConverter<T,?>> getExpressionValueConverter()

      Get the expression value type converter, if available.
      Returns:
        Optional `ExpressionValueConverter`

    - #### getModelValue

          default Object getModelValue(T value)

      Get the model data type value of given `value`, using the `ExpressionValueConverter` to convert the value, if available. If an `ExpressionValueConverter` is not available, the provided value itself is returned.
      Parameters:
        `value` - The expression value
      Returns:
        The model-converted expression value if an `ExpressionValueConverter` is available, otherwise provided value itself is returned.

    - #### getModelType

          default Class<?> getModelType()

      Get the model expression type.
      Returns:
        The model expression type if an `ExpressionValueConverter` is available, otherwise returns the expression type

Copyright © 2019 The Holon Platform. All rights reserved.