public class NumericResolver extends Resolver
Resolver
is responsible to return the numeric type for a list of Resolvers
.
The result of a CASE expression, COALESCE expression, NULLIF expression, or arithmetic expression (+, -, *, /) is determined by applying the following rule to its operands.
Double
or double
, the result of the
operation is of type Double
;
Float
or float
, the
result of the operation is of type Float
;
BigDecimal
, the result of the
operation is of type BigDecimal
;
BigInteger
, the result of the
operation is of type BigInteger
, unless the operator is / (division), in which
case the numeric result type is not further defined;
Long
or long
, the result
of the operation is of type Long
, unless the operator is / (division), in which
case the numeric result type is not further defined;
Integer
, unless the operator is / (division), in which case the numeric result
type is not further defined.
Constructor and Description |
---|
NumericResolver(Resolver parent,
Collection<Resolver> typeResolvers)
Creates a new
NumericResolver . |
NumericResolver(Resolver parent,
Resolver resolver)
Creates a new
NumericResolver . |
addChild, getChild, getManagedType, getMapping, getParent, getParentManagedType, getParentMapping, getParentType, getParentTypeDeclaration, getProvider, getQuery, getType, getType, getType, getTypeDeclaration, getTypeHelper, getTypeRepository, isNullAllowed, setNullAllowed
public NumericResolver(Resolver parent, Collection<Resolver> typeResolvers)
NumericResolver
.