Package org.hibernate.dialect.function
Class TruncFunction
java.lang.Object
org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor
org.hibernate.dialect.function.TruncFunction
- All Implemented Interfaces:
SqmFunctionDescriptor
- Direct Known Subclasses:
OracleTruncFunction,PostgreSQLTruncFunction,SqlServerConvertTruncFunction,SybaseTruncFunction
Custom function that manages both numeric and datetime truncation
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumprotected static classprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final TruncFunction.TruncRenderingSupportprotected final TruncFunction.TruncRenderingSupport -
Constructor Summary
ConstructorsConstructorDescriptionTruncFunction(String truncPattern, String twoArgTruncPattern, TruncFunction.DatetimeTrunc datetimeTrunc, String toDateFunction, TypeConfiguration typeConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> SelfRenderingSqmFunction<T> generateSqmFunctionExpression(List<? extends SqmTypedNode<?>> arguments, ReturnableType<T> impliedResultType, QueryEngine queryEngine) Return an SQM node or subtree representing an invocation of this function with the given arguments.Methods inherited from class org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor
generateAggregateSqmExpression, generateOrderedSetAggregateSqmExpression, generateSqmAggregateFunctionExpression, generateSqmExpression, generateSqmOrderedSetAggregateFunctionExpression, generateSqmWindowFunctionExpression, generateWindowSqmExpression, getArgumentListSignature, getArgumentsValidator, getArgumentTypeResolver, getName, getReturnSignature, getReturnTypeResolver, getSignatureMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.query.sqm.function.SqmFunctionDescriptor
alwaysIncludesParentheses, generateSqmExpression, generateSqmExpression, getFunctionKind, isPredicate
-
Field Details
-
numericRenderingSupport
-
datetimeRenderingSupport
-
-
Constructor Details
-
TruncFunction
public TruncFunction(String truncPattern, String twoArgTruncPattern, TruncFunction.DatetimeTrunc datetimeTrunc, String toDateFunction, TypeConfiguration typeConfiguration)
-
-
Method Details
-
generateSqmFunctionExpression
protected <T> SelfRenderingSqmFunction<T> generateSqmFunctionExpression(List<? extends SqmTypedNode<?>> arguments, ReturnableType<T> impliedResultType, QueryEngine queryEngine) Description copied from class:AbstractSqmFunctionDescriptorReturn an SQM node or subtree representing an invocation of this function with the given arguments. This method may be overridden in the case of function descriptors that wish to customize creation of the node.- Specified by:
generateSqmFunctionExpressionin classAbstractSqmFunctionDescriptor- Parameters:
arguments- the arguments of the function invocationimpliedResultType- the function return type as inferred from its usage
-