Class NumericResolver
- java.lang.Object
 - 
- org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver
 - 
- org.eclipse.persistence.jpa.jpql.tools.resolver.NumericResolver
 
 
 
- 
public class NumericResolver extends Resolver
ThisResolveris responsible to return the numeric type for a list ofResolvers.The result of a CASE expression, COALESCE expression, NULLIF expression, or arithmetic expression (+, -, *, /) is determined by applying the following rule to its operands.
- If there is an operand of type 
Doubleordouble, the result of the operation is of typeDouble; - otherwise, if there is an operand of type 
Floatorfloat, the result of the operation is of typeFloat; - otherwise, if there is an operand of type 
BigDecimal, the result of the operation is of typeBigDecimal; - otherwise, if there is an operand of type 
BigInteger, the result of the operation is of typeBigInteger, unless the operator is / (division), in which case the numeric result type is not further defined; - otherwise, if there is an operand of type 
Longorlong, the result of the operation is of typeLong, unless the operator is / (division), in which case the numeric result type is not further defined; - otherwise, if there is an operand of integral type, the result of the operation is of type
     
Integer, unless the operator is / (division), in which case the numeric result type is not further defined. 
- Version:
 - 2.5
 - Author:
 - Pascal Filion
 - Since:
 - 2.3
 
 - If there is an operand of type 
 
- 
- 
Constructor Summary
Constructors Constructor Description NumericResolver(Resolver parent, java.util.Collection<Resolver> typeResolvers)Creates a newNumericResolver.NumericResolver(Resolver parent, Resolver resolver)Creates a newNumericResolver. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ITypebuildType()protected ITypeDeclarationbuildTypeDeclaration()Resolves theITypeDeclarationof the property handled by thisResolver.- 
Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver
addChild, checkParent, getChild, getManagedType, getMapping, getParent, getParentManagedType, getParentMapping, getParentType, getParentTypeDeclaration, getProvider, getQuery, getType, getType, getType, getTypeDeclaration, getTypeHelper, getTypeRepository, isNullAllowed, setNullAllowed 
 - 
 
 - 
 
- 
- 
Method Detail
- 
buildType
protected IType buildType()
 
- 
buildTypeDeclaration
protected ITypeDeclaration buildTypeDeclaration()
Resolves theITypeDeclarationof the property handled by thisResolver.- Specified by:
 buildTypeDeclarationin classResolver- Returns:
 - Either the 
ITypeDeclarationthat was resolved by thisResolveror theITypeDeclarationforIType.UNRESOLVABLE_TYPEif it could not be resolved 
 
 - 
 
 -