Package org.hibernate.dialect.function
Class SumReturnTypeResolver
java.lang.Object
org.hibernate.dialect.function.SumReturnTypeResolver
- All Implemented Interfaces:
FunctionReturnTypeResolver
Resolve according to JPA spec 4.8.5
SUM returns:
Longwhen applied to state fields of integral types (other thanBigInteger);Doublewhen applied to state fields of floating point types;BigIntegerwhen applied to state fields of typeBigInteger;- and
BigDecimalwhen applied to state fields of typeBigDecimal.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolveFunctionReturnType(Supplier<BasicValuedMapping> impliedTypeAccess, List<? extends SqlAstNode> arguments) Resolve the return type for a function given its context-implied type and the arguments to this call.resolveFunctionReturnType(ReturnableType<?> impliedType, @Nullable SqmToSqlAstConverter converter, List<? extends SqmTypedNode<?>> arguments, TypeConfiguration typeConfiguration) Resolve the return type for a function given its context-implied type and the arguments to this call.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.query.sqm.produce.function.FunctionReturnTypeResolver
getReturnType, resolveFunctionReturnType
-
Constructor Details
-
SumReturnTypeResolver
-
-
Method Details
-
resolveFunctionReturnType
public ReturnableType<?> resolveFunctionReturnType(ReturnableType<?> impliedType, @Nullable SqmToSqlAstConverter converter, List<? extends SqmTypedNode<?>> arguments, TypeConfiguration typeConfiguration) Description copied from interface:FunctionReturnTypeResolverResolve the return type for a function given its context-implied type and the arguments to this call.The context-implied type is the type implied by where the function occurs in the query. E.g., for an equality predicate (`something = some_function`) the implied type of the return from `some_function` would be defined by the type of `some_function`.
- Specified by:
resolveFunctionReturnTypein interfaceFunctionReturnTypeResolver- Returns:
- The resolved type.
-
resolveFunctionReturnType
public BasicValuedMapping resolveFunctionReturnType(Supplier<BasicValuedMapping> impliedTypeAccess, List<? extends SqlAstNode> arguments) Description copied from interface:FunctionReturnTypeResolverResolve the return type for a function given its context-implied type and the arguments to this call.The context-implied type is the type implied by where the function occurs in the query. E.g., for an equality predicate (`something = some_function`) the implied type of the return from `some_function` would be defined by the type of `some_function`.
- Specified by:
resolveFunctionReturnTypein interfaceFunctionReturnTypeResolver- Returns:
- The resolved type.
-