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,
java.util.Collection<Resolver> typeResolvers)
Creates a new
NumericResolver. |
NumericResolver(Resolver parent,
Resolver resolver)
Creates a new
NumericResolver. |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(ResolverVisitor visitor)
|
protected IType |
buildType()
|
protected ITypeDeclaration |
buildTypeDeclaration()
Resolves the
ITypeDeclaration of the property handled by this Resolver. |
addChild, checkParent, getChild, getManagedType, getMapping, getParent, getParentManagedType, getParentMapping, getParentType, getParentTypeDeclaration, getProvider, getQuery, getType, getType, getType, getTypeDeclaration, getTypeHelper, getTypeRepository, isNullAllowed, setNullAllowedpublic NumericResolver(Resolver parent, java.util.Collection<Resolver> typeResolvers)
NumericResolver.public void accept(ResolverVisitor visitor)
protected IType buildType()
protected ITypeDeclaration buildTypeDeclaration()
ITypeDeclaration of the property handled by this Resolver.buildTypeDeclaration in class ResolverITypeDeclaration that was resolved by this Resolver or the
ITypeDeclaration for IType.UNRESOLVABLE_TYPE if it could not be resolved