Top Inners Fields Constructors Methods
org.hibernate.dialect.function

public Class AvgFunction

extends AbstractSqmSelfRenderingFunctionDescriptor
Class Inheritance
Imports
java.util.Arrays, .List, .Locale, java.util.function.Supplier, org.hibernate.dialect.Dialect, org.hibernate.metamodel.mapping.BasicValuedMapping, .JdbcMapping, .MappingModelExpressible, org.hibernate.metamodel.model.domain.DomainType, org.hibernate.query.ReturnableType, org.hibernate.query.sqm.SqmExpressible, org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor, .FunctionKind, org.hibernate.query.sqm.produce.function.ArgumentsValidator, .FunctionArgumentException, .FunctionReturnTypeResolver, .StandardFunctionArgumentTypeResolvers, org.hibernate.query.sqm.tree.SqmTypedNode, org.hibernate.sql.ast.Clause, .SqlAstNodeRenderingMode, .SqlAstTranslator, org.hibernate.sql.ast.spi.SqlAppender, org.hibernate.sql.ast.tree.SqlAstNode, org.hibernate.sql.ast.tree.expression.CastTarget, .Distinct, .Expression, org.hibernate.sql.ast.tree.predicate.Predicate, org.hibernate.type.BasicPluralType, .BasicType, .SqlTypes, .StandardBasicTypes, org.hibernate.type.descriptor.java.JavaType, org.hibernate.type.descriptor.jdbc.ArrayJdbcType, .JdbcType, .ObjectJdbcType, org.hibernate.type.spi.TypeConfiguration

Deprecated

as a consequence of AbstractSqmSelfRenderingFunctionDescriptor being deprecated. See corresponding docs for further information.

Author
Christian Beikov

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class

Field Summary

Modifier and TypeField and Description
private final CastFunction
castFunction

Deprecated as a consequence of CastFunction being deprecated.
private final SqlAstNodeRenderingMode
private final BasicType<Double>

Constructor Summary

AccessConstructor and Description
public
AvgFunction(Dialect dialect, TypeConfiguration typeConfiguration, SqlAstNodeRenderingMode defaultArgumentRenderingMode)

Method Summary

Modifier and TypeMethod and Description
public String
public void
public void
render(SqlAppender sqlAppender, List<? extends SqlAstNode> sqlAstArguments, Predicate filter, ReturnableType<?> returnType, SqlAstTranslator<?> translator)

Overrides default org.hibernate.query.sqm.function.FunctionRenderer.render.

private void
renderArgument(SqlAppender sqlAppender, SqlAstTranslator<?> translator, Expression realArg)

Inherited from org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor:
generateSqmAggregateFunctionExpressiongenerateSqmFunctionExpressiongenerateSqmOrderedSetAggregateFunctionExpressiongenerateSqmWindowFunctionExpressiongetFunctionKind

Field Detail

castFunctionback to summary
private final CastFunction castFunction

Deprecated

as a consequence of CastFunction being deprecated. See corresponding docs for further information.

defaultArgumentRenderingModeback to summary
private final SqlAstNodeRenderingMode defaultArgumentRenderingMode
doubleTypeback to summary
private final BasicType<Double> doubleType

Constructor Detail

AvgFunctionback to summary
public AvgFunction(Dialect dialect, TypeConfiguration typeConfiguration, SqlAstNodeRenderingMode defaultArgumentRenderingMode)

Method Detail

getArgumentListSignatureback to summary
public String getArgumentListSignature()

Overrides org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor.getArgumentListSignature.

Annotations
@Override
renderback to summary
public void render(SqlAppender sqlAppender, List<? extends SqlAstNode> sqlAstArguments, ReturnableType<?> returnType, SqlAstTranslator<?> walker)

Overrides org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor.render.

Implements org.hibernate.query.sqm.function.FunctionRenderer.render.

Annotations
@Override
renderback to summary
public void render(SqlAppender sqlAppender, List<? extends SqlAstNode> sqlAstArguments, Predicate filter, ReturnableType<?> returnType, SqlAstTranslator<?> translator)

Overrides default org.hibernate.query.sqm.function.FunctionRenderer.render.

Annotations
@Override
renderArgumentback to summary
private void renderArgument(SqlAppender sqlAppender, SqlAstTranslator<?> translator, Expression realArg)
org.hibernate.dialect.function back to summary

public Class AvgFunction.ReturnTypeResolver

extends Object
implements FunctionReturnTypeResolver
Class Inheritance
  • java.lang.Object
  • org.hibernate.dialect.function.AvgFunction.ReturnTypeResolver
All Implemented Interfaces
org.hibernate.query.sqm.produce.function.FunctionReturnTypeResolver

Field Summary

Modifier and TypeField and Description
private final BasicType<Double>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public BasicValuedMapping
resolveFunctionReturnType(Supplier<BasicValuedMapping> impliedTypeAccess, List<? extends SqlAstNode> arguments)

Implements org.hibernate.query.sqm.produce.function.FunctionReturnTypeResolver.resolveFunctionReturnType.

Resolve the return type for a function given its context-implied type and the arguments to this call.
public ReturnableType<?>
resolveFunctionReturnType(ReturnableType<?> impliedType, Supplier<MappingModelExpressible<?>> inferredTypeSupplier, List<? extends SqmTypedNode<?>> arguments, TypeConfiguration typeConfiguration)

Overrides default org.hibernate.query.sqm.produce.function.FunctionReturnTypeResolver.resolveFunctionReturnType.

Resolve the return type for a function given its context-implied type and the arguments to this call.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

doubleTypeback to summary
private final BasicType<Double> doubleType

Constructor Detail

ReturnTypeResolverback to summary
public ReturnTypeResolver(TypeConfiguration typeConfiguration)

Method Detail

resolveFunctionReturnTypeback to summary
public BasicValuedMapping resolveFunctionReturnType(Supplier<BasicValuedMapping> impliedTypeAccess, List<? extends SqlAstNode> arguments)

Implements org.hibernate.query.sqm.produce.function.FunctionReturnTypeResolver.resolveFunctionReturnType.

Doc from org.hibernate.query.sqm.produce.function.FunctionReturnTypeResolver.resolveFunctionReturnType.

Resolve 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`.

Returns:BasicValuedMapping

The resolved type.

Annotations
@Override
resolveFunctionReturnTypeback to summary
public ReturnableType<?> resolveFunctionReturnType(ReturnableType<?> impliedType, Supplier<MappingModelExpressible<?>> inferredTypeSupplier, List<? extends SqmTypedNode<?>> arguments, TypeConfiguration typeConfiguration)

Overrides default org.hibernate.query.sqm.produce.function.FunctionReturnTypeResolver.resolveFunctionReturnType.

Doc from org.hibernate.query.sqm.produce.function.FunctionReturnTypeResolver.resolveFunctionReturnType.

Resolve 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`.

Returns:ReturnableType<?>

The resolved type.

Annotations
@Override
org.hibernate.dialect.function back to summary

public Class AvgFunction.Validator

extends Object
implements ArgumentsValidator
Class Inheritance
All Implemented Interfaces
org.hibernate.query.sqm.produce.function.ArgumentsValidator

Field Summary

Modifier and TypeField and Description
public static final ArgumentsValidator

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static JdbcType
getJdbcType(DomainType<?> domainType, TypeConfiguration typeConfiguration)

public String
getSignature()

Overrides default org.hibernate.query.sqm.produce.function.ArgumentsValidator.getSignature.

Pretty-print the signature of the argument list.
private static boolean
isNumeric(JdbcType jdbcType)

public void
validate(List<? extends SqmTypedNode<?>> arguments, String functionName, TypeConfiguration typeConfiguration)

Overrides default org.hibernate.query.sqm.produce.function.ArgumentsValidator.validate.

Perform validation that may be done using the SqmTypedNode tree and assigned Java types.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final ArgumentsValidator INSTANCE

Constructor Detail

Validatorback to summary
public Validator()

Method Detail

getJdbcTypeback to summary
private static JdbcType getJdbcType(DomainType<?> domainType, TypeConfiguration typeConfiguration)
getSignatureback to summary
public String getSignature()

Overrides default org.hibernate.query.sqm.produce.function.ArgumentsValidator.getSignature.

Doc from org.hibernate.query.sqm.produce.function.ArgumentsValidator.getSignature.

Pretty-print the signature of the argument list.

Annotations
@Override
isNumericback to summary
private static boolean isNumeric(JdbcType jdbcType)
validateback to summary
public void validate(List<? extends SqmTypedNode<?>> arguments, String functionName, TypeConfiguration typeConfiguration)

Overrides default org.hibernate.query.sqm.produce.function.ArgumentsValidator.validate.

Doc from org.hibernate.query.sqm.produce.function.ArgumentsValidator.validate.

Perform validation that may be done using the SqmTypedNode tree and assigned Java types.

Annotations
@Override