Uses of Enum Class
org.hibernate.query.common.TemporalUnit
Packages that use TemporalUnit
Package
Description
Defines the root contracts and built-in implementations for SQL dialects.
Dialect contracts for selecting SQL AST translators and
expressing database-specific SQL AST rendering behavior.
Supported Dialect contracts for temporal expressions, formatting,
operations, selection, and value semantics.
Common APIs used internally, in the SQL tree,
in the dialects, and in the criteria query API.
The JPA-standard criteria query API defines all the operations needed express
any query written in standard JPQL.
SPI for extending
HibernateCriteriaBuilder
with additional functionality by registering a Service.Nodes representing expressions in the SQM tree.
AST nodes representing expressions in a SQL tree.
-
Uses of TemporalUnit in org.hibernate.dialect
Methods in org.hibernate.dialect with parameters of type TemporalUnitModifier and TypeMethodDescriptionCockroachDialect.extractPattern(TemporalUnit unit) Theextract()function returnsTemporalUnit.DAY_OF_WEEKnumbered from 0 to 6.DB2Dialect.extractPattern(TemporalUnit unit) H2Dialect.extractPattern(TemporalUnit unit) In H2, the extract() function does not return fractional seconds for the fieldTemporalUnit.SECOND.HANADialect.extractPattern(TemporalUnit unit) HANA has no extract() function, but we can emulate it using the appropriate named functions instead of extract().HSQLDialect.extractPattern(TemporalUnit unit) MySQLDialect.extractPattern(TemporalUnit unit) MySQL supports a limited list of temporal fields in the extract() function, but we can emulate some of them by using the appropriate named functions instead of extract().OracleDialect.extractPattern(TemporalUnit unit) Oracle supports a limited list of temporal fields in the extract() function, but we can emulate some of them by using to_char() with a format string instead of extract().PostgreSQLDialect.extractPattern(TemporalUnit unit) Theextract()function returnsTemporalUnit.DAY_OF_WEEKnumbered from 0 to 6.SQLServerDialect.extractPattern(TemporalUnit unit) SybaseDialect.extractPattern(TemporalUnit unit) CockroachDialect.timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) DB2Dialect.timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) DB2zDialect.timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) H2Dialect.timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) HANADialect.timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) HSQLDialect.timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) MySQLDialect.timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) OracleDialect.timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) PostgreSQLDialect.timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) SpannerDialect.timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) SpannerPostgreSQLDialect.timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) SQLServerDialect.timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) SybaseASEDialect.timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) SybaseDialect.timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) CockroachDialect.timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) DB2Dialect.timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) H2Dialect.timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) HANADialect.timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) HSQLDialect.timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) MySQLDialect.timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) OracleDialect.timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) PostgresPlusDialect.timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) PostgreSQLDialect.timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) SpannerDialect.timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) SpannerPostgreSQLDialect.timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) SQLServerDialect.timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) SybaseASEDialect.timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) SybaseDialect.timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) CockroachDialect.translateDurationField(TemporalUnit unit) SQLServerDialect.translateDurationField(TemporalUnit unit) CockroachDialect.translateExtractField(TemporalUnit unit) DB2Dialect.translateExtractField(TemporalUnit unit) H2Dialect.translateExtractField(TemporalUnit unit) HSQLDialect.translateExtractField(TemporalUnit unit) PostgreSQLDialect.translateExtractField(TemporalUnit unit) SpannerDialect.translateExtractField(TemporalUnit unit) SQLServerDialect.translateExtractField(TemporalUnit unit) SybaseDialect.translateExtractField(TemporalUnit unit) -
Uses of TemporalUnit in org.hibernate.dialect.sql.ast.spi
Methods in org.hibernate.dialect.sql.ast.spi with parameters of type TemporalUnitModifier and TypeMethodDescriptionprotected voidAbstractSqlAstTranslator.renderIntervalLiteral(Literal literal, TemporalUnit unit) -
Uses of TemporalUnit in org.hibernate.dialect.temporaltype.spi
Methods in org.hibernate.dialect.temporaltype.spi with parameters of type TemporalUnitModifier and TypeMethodDescriptionDelegatingTemporalOperationSupport.extractPattern(TemporalUnit unit) default StringTemporalOperationSupport.extractPattern(TemporalUnit unit) Return an extraction pattern containing?1for the field and?2for the value.DelegatingTemporalOperationSupport.timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) default StringTemporalOperationSupport.timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) Return a timestamp-add pattern containing?1,?2, and?3.DelegatingTemporalOperationSupport.timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) default StringTemporalOperationSupport.timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) Return a timestamp-difference pattern containing?1,?2, and?3.DelegatingTemporalOperationSupport.translateDurationField(TemporalUnit unit) default StringTemporalOperationSupport.translateDurationField(TemporalUnit unit) Translate a duration unit name.DelegatingTemporalOperationSupport.translateExtractField(TemporalUnit unit) default StringTemporalOperationSupport.translateExtractField(TemporalUnit unit) Translate an extraction field name. -
Uses of TemporalUnit in org.hibernate.query.common
Subclasses with type arguments of type TemporalUnit in org.hibernate.query.commonModifier and TypeClassDescriptionenumA temporal field type which can occur as an argument toextract()or as the unit of a duration expression.Methods in org.hibernate.query.common that return TemporalUnitModifier and TypeMethodDescriptionTemporalUnit.normalized()The unit that this unit "normalizes to", eitherTemporalUnit.NANOSECONDorTemporalUnit.MONTH, which represent the two basic types of duration: "physical" durations, and "calendar" durations.static TemporalUnitReturns the enum constant of this class with the specified name.static TemporalUnit[]TemporalUnit.values()Returns an array containing the constants of this enum class, in the order they are declared.Methods in org.hibernate.query.common with parameters of type TemporalUnitModifier and TypeMethodDescriptionTemporalUnit.conversionFactor(TemporalUnit unit, Dialect dialect) TemporalUnit.conversionFactorFull(TemporalUnit unit, Dialect dialect) -
Uses of TemporalUnit in org.hibernate.query.criteria
Methods in org.hibernate.query.criteria with parameters of type TemporalUnitModifier and TypeMethodDescriptionHibernateCriteriaBuilder.duration(long magnitude, TemporalUnit unit) A literalDuration, for example, "five days" or "30 minutes".HibernateCriteriaBuilder.durationByUnit(TemporalUnit unit, Expression<Duration> duration) Convert aDurationto a numeric magnitude in the given units.<T extends TemporalAccessor>
JpaFunction<T> HibernateCriteriaBuilder.truncate(Expression<T> datetime, TemporalUnit temporalUnit) Truncates a date, time or datetime expression to the givenTemporalUnit. -
Uses of TemporalUnit in org.hibernate.query.criteria.spi
Methods in org.hibernate.query.criteria.spi with parameters of type TemporalUnitModifier and TypeMethodDescriptionHibernateCriteriaBuilderDelegate.duration(long magnitude, TemporalUnit unit) HibernateCriteriaBuilderDelegate.durationByUnit(TemporalUnit unit, Expression<Duration> duration) <T extends TemporalAccessor>
JpaFunction<T> HibernateCriteriaBuilderDelegate.truncate(Expression<T> datetime, TemporalUnit temporalUnit) -
Uses of TemporalUnit in org.hibernate.query.sqm.tree.spi.expression
Methods in org.hibernate.query.sqm.tree.spi.expression that return TemporalUnitModifier and TypeMethodDescriptionConversion.getUnit()SqmDurationUnit.getUnit()SqmExtractUnit.getUnit()Constructors in org.hibernate.query.sqm.tree.spi.expression with parameters of type TemporalUnitModifierConstructorDescriptionConversion(Duration duration, TemporalUnit unit, BasicValuedMapping type) SqmDurationUnit(TemporalUnit unit, ReturnableType<T> type, NodeBuilder nodeBuilder) SqmExtractUnit(TemporalUnit unit, ReturnableType<T> type, NodeBuilder nodeBuilder) -
Uses of TemporalUnit in org.hibernate.sql.ast.spi.query.expression
Methods in org.hibernate.sql.ast.spi.query.expression that return TemporalUnitModifier and TypeMethodDescriptionDuration.getUnit()DurationUnit.getUnit()ExtractUnit.getUnit()Constructors in org.hibernate.sql.ast.spi.query.expression with parameters of type TemporalUnitModifierConstructorDescriptionDuration(Expression magnitude, TemporalUnit unit, BasicValuedMapping type) DurationUnit(TemporalUnit unit, BasicValuedMapping type) ExtractUnit(TemporalUnit unit, BasicValuedMapping type)