Module jpastreamer.field
Interface FieldMapper<ENTITY,T,R,NON_NULLABLE extends com.speedment.runtime.compute.expression.Expression<ENTITY>,MAPPER>
- Type Parameters:
ENTITY- the entity typeT- the column type mapped fromR- the type mapped toNON_NULLABLE- the expression type obtained if the nullability of this expression is handledMAPPER- functional interface type returned bygetMapper()
- 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
Methods inherited from interface com.speedment.runtime.compute.expression.Expression
expressionTypeMethods 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:ToByteFunctionToShortFunctionToIntFunctionToLongFunctionToDoubleFunctionToFloatFunctionToCharFunctionToBooleanFunctionFunction
field. If the mapper implementsFunction, then the returning type must be eitherString,EnumorBigDecimal.- Returns:
- the mapper to use
-