Package org.hibernate.dialect.function
Class ExtractFunction
- java.lang.Object
- org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor
- org.hibernate.dialect.function.ExtractFunction
- All Implemented Interfaces:
FunctionRenderer,FunctionRenderingSupport,SqmFunctionDescriptor
- Direct Known Subclasses:
OracleExtractFunction
public classExtractFunctionextendsAbstractSqmFunctionDescriptorimplementsFunctionRenderer
ANSI SQL-inspiredextract()function, where the date/time fields are enumerated byTemporalUnit, and portability is achieved by delegating toDialect.extractPattern(TemporalUnit).
Constructor Summary
Constructors Constructor Description ExtractFunction(Dialect dialect,TypeConfiguration typeConfiguration)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T> SelfRenderingSqmFunctiongenerateSqmFunctionExpression(List<? extendsSqmTypedNode<?>> arguments,ReturnableType<T> impliedResultType,QueryEngine queryEngine)Return an SQM node or subtree representing an invocation of this function with the given arguments.StringgetArgumentListSignature()voidrender(SqlAppender sqlAppender,List<? extendsSqlAstNode> sqlAstArguments,ReturnableType<?> returnType,SqlAstTranslator<?> walker)Methods inherited from class org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor
generateAggregateSqmExpression,generateOrderedSetAggregateSqmExpression,generateSqmAggregateFunctionExpression,generateSqmExpression,generateSqmOrderedSetAggregateFunctionExpression,generateSqmWindowFunctionExpression,generateWindowSqmExpression,getArgumentsValidator,getArgumentTypeResolver,getName,getReturnSignature,getReturnTypeResolver,getSignature
Methods inherited from class java.lang.Object
clone,equals,finalize,getClass,hashCode,notify,notifyAll,toString,wait,wait,wait
Methods inherited from interface org.hibernate.query.sqm.function.FunctionRenderer
render,render,render,render
Methods inherited from interface org.hibernate.query.sqm.function.FunctionRenderingSupport
render,render,render
Methods inherited from interface org.hibernate.query.sqm.function.SqmFunctionDescriptor
alwaysIncludesParentheses,generateSqmExpression,generateSqmExpression,getFunctionKind
Constructor Detail
ExtractFunction
public ExtractFunction(Dialect dialect,TypeConfiguration typeConfiguration)
Method Detail
render
public void render(SqlAppender sqlAppender,List<? extendsSqlAstNode> sqlAstArguments,ReturnableType<?> returnType,SqlAstTranslator<?> walker)
- Specified by:
renderin interfaceFunctionRenderer- Specified by:
renderin interfaceFunctionRenderingSupport
generateSqmFunctionExpression
protected <T> SelfRenderingSqmFunction generateSqmFunctionExpression(List<? extendsSqmTypedNode<?>> 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
getArgumentListSignature
public String getArgumentListSignature()
- Overrides:
getArgumentListSignaturein classAbstractSqmFunctionDescriptor