Top Description Fields Constructors Methods
org.hibernate.sql.ast.tree.expression

public Class DurationUnit

extends Object
implements Expression, SqlAstNode
Class Inheritance
All Implemented Interfaces
org.hibernate.sql.ast.tree.SqlAstNode, org.hibernate.sql.ast.tree.expression.Expression, org.hibernate.sql.ast.spi.SqlSelectionProducer
Imports
org.hibernate.metamodel.mapping.BasicValuedMapping, org.hibernate.query.sqm.TemporalUnit, org.hibernate.sql.ast.SqlAstWalker, org.hibernate.sql.ast.tree.SqlAstNode

A TemporalUnit passed as an argument to the org.hibernate.dialect.function.TimestampaddFunction or org.hibernate.dialect.function.TimestampdiffFunction. These are different to ExtractUnits because of how the TemporalUnit#WEEK field is handled on some platforms.
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private final BasicValuedMapping
private final TemporalUnit

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public BasicValuedMapping
public TemporalUnit
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

typeback to summary
private final BasicValuedMapping type
unitback to summary
private final TemporalUnit unit

Constructor Detail

DurationUnitback to summary
public DurationUnit(TemporalUnit unit, BasicValuedMapping type)

Method Detail

acceptback to summary
public void accept(SqlAstWalker sqlTreeWalker)

Implements org.hibernate.sql.ast.tree.SqlAstNode.accept.

Annotations
@Override
getExpressionTypeback to summary
public BasicValuedMapping getExpressionType()

Implements org.hibernate.sql.ast.tree.expression.Expression.getExpressionType.

Doc from org.hibernate.sql.ast.tree.expression.Expression.getExpressionType.

The type for this expression

Annotations
@Override
getUnitback to summary
public TemporalUnit getUnit()