Interface FieldMapper<ENTITY,T,R,NON_NULLABLE extends com.speedment.runtime.compute.expression.Expression<ENTITY>,MAPPER>

Type Parameters:
ENTITY - the entity type
T - the column type mapped from
R - the type mapped to
NON_NULLABLE - the expression type obtained if the nullability of this expression is handled
MAPPER - functional interface type returned by getMapper()
All Superinterfaces:
com.speedment.runtime.compute.expression.Expression<ENTITY>, Function<ENTITY,R>, com.speedment.runtime.compute.trait.ToNullable<ENTITY,R,NON_NULLABLE>
All Known Subinterfaces:
FieldToBigDecimal<ENTITY,T>, FieldToBoolean<ENTITY,T>, FieldToByte<ENTITY,T>, FieldToChar<ENTITY,T>, FieldToDouble<ENTITY,T>, FieldToEnum<ENTITY,T,E>, FieldToFloat<ENTITY,T>, FieldToInt<ENTITY,T>, FieldToLong<ENTITY,T>, FieldToShort<ENTITY,T>, FieldToString<ENTITY,T>

public interface FieldMapper<ENTITY,T,R,NON_NULLABLE extends com.speedment.runtime.compute.expression.Expression<ENTITY>,MAPPER> extends com.speedment.runtime.compute.expression.Expression<ENTITY>, com.speedment.runtime.compute.trait.ToNullable<ENTITY,R,NON_NULLABLE>
Specialized expression that takes the value of a particular Speedment field and maps it to a specific type.
Since:
3.1.0
Author:
Emil Forslund
  • Method Summary

    Modifier and Type
    Method
    Description
    The field that is being mapped.
    Returns the functional interface implementation that is used when doing the mapping.

    Methods inherited from interface com.speedment.runtime.compute.expression.Expression

    expressionType

    Methods inherited from interface java.util.function.Function

    andThen, apply, compose

    Methods inherited from interface com.speedment.runtime.compute.trait.ToNullable

    isNotNull, isNotNull, isNull, isNull, orElse, orElseGet, orThrow
  • Method Details

    • getField

      ReferenceField<ENTITY,T> getField()
      The field that is being mapped.
      Returns:
      the field
    • getMapper

      MAPPER getMapper()
      Returns the functional interface implementation that is used when doing the mapping. The returned object must implement one of the following interfaces: The first generic type should be the boxed type returned by the getters of the field. If the mapper implements Function, then the returning type must be either String, Enum or BigDecimal.
      Returns:
      the mapper to use