Top Fields Constructors Methods
org.hibernate.dialect.function

public Class CountFunction

extends AbstractSqmSelfRenderingFunctionDescriptor
Class Inheritance
Imports
java.util.Collections, .List, org.hibernate.dialect.Dialect, org.hibernate.metamodel.mapping.EntityIdentifierMapping, .JdbcMapping, .JdbcMappingContainer, org.hibernate.query.ReturnableType, org.hibernate.query.sqm.CastType, org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor, .FunctionKind, org.hibernate.query.sqm.produce.function.StandardArgumentsValidators, .StandardFunctionReturnTypeResolvers, org.hibernate.query.sqm.produce.function.internal.PatternRenderer, org.hibernate.query.sqm.sql.internal.AbstractSqmPathInterpretation, 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.Distinct, .Expression, .QueryLiteral, .SqlTuple, .SqlTupleContainer, .Star, org.hibernate.sql.ast.tree.from.TableGroup, .TableGroupJoin, org.hibernate.sql.ast.tree.predicate.Predicate, org.hibernate.sql.ast.tree.select.QuerySpec, org.hibernate.type.StandardBasicTypes, org.hibernate.type.spi.TypeConfiguration

Deprecated

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

Author
Christian Beikov

Field Summary

Modifier and TypeField and Description
private final boolean
private final String
private final String
private final String
private final SqlAstNodeRenderingMode
private final Dialect
private final String

Constructor Summary

AccessConstructor and Description
public
CountFunction(Dialect dialect, TypeConfiguration typeConfiguration, SqlAstNodeRenderingMode defaultArgumentRenderingMode, String concatOperator)

public
CountFunction(Dialect dialect, TypeConfiguration typeConfiguration, SqlAstNodeRenderingMode defaultArgumentRenderingMode, String concatOperator, String concatArgumentCastType, boolean castDistinctStringConcat)

public
CountFunction(Dialect dialect, TypeConfiguration typeConfiguration, SqlAstNodeRenderingMode defaultArgumentRenderingMode, String countFunctionName, String concatOperator, String concatArgumentCastType, boolean castDistinctStringConcat)

public
CountFunction(Dialect dialect, TypeConfiguration typeConfiguration, SqlAstNodeRenderingMode defaultArgumentRenderingMode, String countFunctionName, String concatOperator, String concatArgumentCastType, boolean castDistinctStringConcat, String distinctArgumentCastType)

Method Summary

Modifier and TypeMethod and Description
private boolean
public String
private boolean
private boolean
private Boolean
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 boolean
renderCastedArgument(SqlAppender sqlAppender, SqlAstTranslator<?> translator, Expression realArg)

private void
renderCommaSeparatedList(SqlAppender sqlAppender, SqlAstTranslator<?> translator, List<? extends Expression> expressions)

private void
renderSimpleArgument(SqlAppender sqlAppender, Predicate filter, SqlAstTranslator<?> translator, boolean caseWrapper, SqlAstNode realArg)

private void
renderTupleCountSupported(SqlAppender sqlAppender, Predicate filter, SqlAstTranslator<?> translator, boolean caseWrapper, SqlTuple tuple, List<? extends Expression> expressions, boolean requiresParenthesis)

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

Field Detail

castDistinctStringConcatback to summary
private final boolean castDistinctStringConcat
concatArgumentCastTypeback to summary
private final String concatArgumentCastType
concatOperatorback to summary
private final String concatOperator
countFunctionNameback to summary
private final String countFunctionName
defaultArgumentRenderingModeback to summary
private final SqlAstNodeRenderingMode defaultArgumentRenderingMode
dialectback to summary
private final Dialect dialect
distinctArgumentCastTypeback to summary
private final String distinctArgumentCastType

Constructor Detail

CountFunctionback to summary
public CountFunction(Dialect dialect, TypeConfiguration typeConfiguration, SqlAstNodeRenderingMode defaultArgumentRenderingMode, String concatOperator)
CountFunctionback to summary
public CountFunction(Dialect dialect, TypeConfiguration typeConfiguration, SqlAstNodeRenderingMode defaultArgumentRenderingMode, String concatOperator, String concatArgumentCastType, boolean castDistinctStringConcat)
CountFunctionback to summary
public CountFunction(Dialect dialect, TypeConfiguration typeConfiguration, SqlAstNodeRenderingMode defaultArgumentRenderingMode, String countFunctionName, String concatOperator, String concatArgumentCastType, boolean castDistinctStringConcat)
CountFunctionback to summary
public CountFunction(Dialect dialect, TypeConfiguration typeConfiguration, SqlAstNodeRenderingMode defaultArgumentRenderingMode, String countFunctionName, String concatOperator, String concatArgumentCastType, boolean castDistinctStringConcat, String distinctArgumentCastType)

Method Detail

canReplaceWithStarback to summary
private boolean canReplaceWithStar(SqlAstNode arg, SqlAstTranslator<?> translator)
getArgumentListSignatureback to summary
public String getArgumentListSignature()

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

Annotations
@Override
hasJoinsAlteringNullabilityback to summary
private boolean hasJoinsAlteringNullability(TableGroup tableGroup)
hasJoinsAlteringNullabilityback to summary
private boolean hasJoinsAlteringNullability(TableGroupJoin neighbourJoin)
hasNeighbouringJoinsAlteringNullabilityback to summary
private Boolean hasNeighbouringJoinsAlteringNullability(TableGroup tableGroup, TableGroup targetTableGroup)
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
renderCastedArgumentback to summary
private boolean renderCastedArgument(SqlAppender sqlAppender, SqlAstTranslator<?> translator, Expression realArg)
renderCommaSeparatedListback to summary
private void renderCommaSeparatedList(SqlAppender sqlAppender, SqlAstTranslator<?> translator, List<? extends Expression> expressions)
renderSimpleArgumentback to summary
private void renderSimpleArgument(SqlAppender sqlAppender, Predicate filter, SqlAstTranslator<?> translator, boolean caseWrapper, SqlAstNode realArg)
renderTupleCountSupportedback to summary
private void renderTupleCountSupported(SqlAppender sqlAppender, Predicate filter, SqlAstTranslator<?> translator, boolean caseWrapper, SqlTuple tuple, List<? extends Expression> expressions, boolean requiresParenthesis)