Class DurationUnit
- java.lang.Object
-
- org.hibernate.sql.ast.tree.expression.DurationUnit
-
- All Implemented Interfaces:
SqlSelectionProducer,Expression,SqlAstNode
public class DurationUnit extends Object implements Expression, SqlAstNode
ATemporalUnitpassed as an argument to theTimestampaddFunctionorTimestampdiffFunction. These are different toExtractUnits because of how theTemporalUnit.WEEKfield is handled on some platforms.
-
-
Constructor Summary
Constructors Constructor Description DurationUnit(TemporalUnit unit, BasicValuedMapping type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(SqlAstWalker sqlTreeWalker)BasicValuedMappinggetExpressionType()The type for this expressionTemporalUnitgetUnit()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.sql.ast.tree.expression.Expression
createDomainResultSqlSelection, createSqlSelection, getColumnReference
-
-
-
-
Constructor Detail
-
DurationUnit
public DurationUnit(TemporalUnit unit, BasicValuedMapping type)
-
-
Method Detail
-
getUnit
public TemporalUnit getUnit()
-
getExpressionType
public BasicValuedMapping getExpressionType()
Description copied from interface:ExpressionThe type for this expression- Specified by:
getExpressionTypein interfaceExpression
-
accept
public void accept(SqlAstWalker sqlTreeWalker)
- Specified by:
acceptin interfaceSqlAstNode
-
-