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

public Class SybaseTruncFunction

extends TruncFunction
Class Inheritance
Imports
java.util.ArrayList, .List, org.hibernate.query.ReturnableType, org.hibernate.query.spi.QueryEngine, org.hibernate.query.sqm.NodeBuilder, .TemporalUnit, org.hibernate.query.sqm.function.SelfRenderingSqmFunction, org.hibernate.query.sqm.tree.SqmTypedNode, org.hibernate.query.sqm.tree.expression.SqmExtractUnit, .SqmLiteral, org.hibernate.sql.ast.SqlAstTranslator, org.hibernate.sql.ast.spi.SqlAppender, org.hibernate.sql.ast.tree.SqlAstNode, org.hibernate.type.spi.TypeConfiguration

Custom TruncFunction for Sybase which uses a dialect-specific emulation function for datetimes
Author
Marco Belladelli

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
SybaseTruncFunction.SybaseDateTruncEmulation

Deprecated as a consequence of DateTruncEmulation being deprecated.
Custom DateTruncEmulation that uses convert instead of format for Sybase

Field Summary

Modifier and TypeField and Description
private final SybaseTruncFunction.SybaseDateTruncEmulation
Inherited from org.hibernate.dialect.function.TruncFunction:
datetimeRenderingSupportnumericRenderingSupport

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected <T> SelfRenderingSqmFunction<T>
generateSqmFunctionExpression(List<? extends SqmTypedNode<?>>
the arguments of the function invocation
arguments
,
ReturnableType<T>
the function return type as inferred from its usage
impliedResultType
,
QueryEngine queryEngine)

Overrides org.hibernate.dialect.function.TruncFunction.generateSqmFunctionExpression.

Return an SQM node or subtree representing an invocation of this function with the given arguments.

Field Detail

dateTruncEmulationback to summary
private final SybaseTruncFunction.SybaseDateTruncEmulation dateTruncEmulation

Hides org.hibernate.dialect.function.TruncFunction.dateTruncEmulation.

Deprecated

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

Constructor Detail

SybaseTruncFunctionback to summary
public SybaseTruncFunction(TypeConfiguration typeConfiguration)

Method Detail

generateSqmFunctionExpressionback to summary
protected <T> SelfRenderingSqmFunction<T> generateSqmFunctionExpression(List<? extends SqmTypedNode<?>> arguments, ReturnableType<T> impliedResultType, QueryEngine queryEngine)

Overrides org.hibernate.dialect.function.TruncFunction.generateSqmFunctionExpression.

Doc from org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor.generateSqmFunctionExpression.

Return 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.

Parameters
arguments:List<? extends SqmTypedNode<?>>

the arguments of the function invocation

impliedResultType:ReturnableType<T>

the function return type as inferred from its usage

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

private Class SybaseTruncFunction.SybaseDateTruncEmulation

extends DateTruncEmulation
Class Inheritance

Deprecated

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

Custom DateTruncEmulation that uses convert instead of format for Sybase
Author
Marco Belladelli
See Also
Sybase Documentation

Field Summary

Inherited from org.hibernate.dialect.function.DateTruncEmulation:
toDateFunction

Constructor Summary

AccessConstructor and Description
public
SybaseDateTruncEmulation(String toDateFunction, TypeConfiguration typeConfiguration)

Method Summary

Modifier and TypeMethod and Description
protected <T> SelfRenderingSqmFunction<T>
generateSqmFunctionExpression(List<? extends SqmTypedNode<?>>
the arguments of the function invocation
arguments
,
ReturnableType<T>
the function return type as inferred from its usage
impliedResultType
,
QueryEngine queryEngine)

Overrides org.hibernate.dialect.function.DateTruncEmulation.generateSqmFunctionExpression.

Return an SQM node or subtree representing an invocation of this function with the given arguments.
public void

Constructor Detail

SybaseDateTruncEmulationback to summary
public SybaseDateTruncEmulation(String toDateFunction, TypeConfiguration typeConfiguration)

Method Detail

generateSqmFunctionExpressionback to summary
protected <T> SelfRenderingSqmFunction<T> generateSqmFunctionExpression(List<? extends SqmTypedNode<?>> arguments, ReturnableType<T> impliedResultType, QueryEngine queryEngine)

Overrides org.hibernate.dialect.function.DateTruncEmulation.generateSqmFunctionExpression.

Doc from org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor.generateSqmFunctionExpression.

Return 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.

Parameters
arguments:List<? extends SqmTypedNode<?>>

the arguments of the function invocation

impliedResultType:ReturnableType<T>

the function return type as inferred from its usage

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

Overrides org.hibernate.dialect.function.DateTruncEmulation.render.

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

Annotations
@Override