Package com.querydsl.core.types.dsl
Class DateTimeExpression<T extends Comparable>
java.lang.Object
com.querydsl.core.types.dsl.DslExpression<T>
com.querydsl.core.types.dsl.SimpleExpression<T>
com.querydsl.core.types.dsl.ComparableExpressionBase<T>
com.querydsl.core.types.dsl.ComparableExpression<T>
com.querydsl.core.types.dsl.LiteralExpression<T>
com.querydsl.core.types.dsl.TemporalExpression<T>
com.querydsl.core.types.dsl.DateTimeExpression<T>
- Type Parameters:
T- expression type
- All Implemented Interfaces:
Expression<T>,Serializable
- Direct Known Subclasses:
DateTimeOperation,DateTimePath,DateTimeTemplate
DateTimeExpression represents Date / Time expressions
The date representation is compatible with the Gregorian calendar.- Author:
- tiwe
- See Also:
-
Field Summary
Fields inherited from class com.querydsl.core.types.dsl.DslExpression
hashCode, mixin -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate an alias for the expressionCreate an alias for the expressioncoalesce(Expression<?>... exprs) Create acoalesce(this, exprs...)expressioncoalesce(Expression<T> expr) Create acoalesce(this, expr)expressionCreate acoalesce(this, arg)expressionCreate acoalesce(this, args...)expressionstatic DateTimeExpression<Date>Create an expression representing the current date as a DateTimeExpression instancestatic <T extends Comparable>
DateTimeExpression<T>currentDate(Class<T> cl) Create an expression representing the current date as a DateTimeExpression instancestatic DateTimeExpression<Date>Create an expression representing the current time instant as a DateTimeExpression instancestatic <T extends Comparable>
DateTimeExpression<T>currentTimestamp(Class<T> cl) Create an expression representing the current time instant as a DateTimeExpression instanceCreate a day of month expression (range 1-31)Create a day of week expression (range 1-7 / SUN-SAT)Create a day of year expression (range 1-356)hour()Create a hours expression (range 0-23)max()Get the maximum value of this expression (aggregation)Create a milliseconds expression (range 0-999)min()Get the minimum value of this expression (aggregation)minute()Create a minutes expression (range 0-59)month()Create a month expression (range 1-12 / JAN-DEC)nullif(Expression<T> other) Create anullif(this, other)expressionCreate anullif(this, other)expressionsecond()Create a seconds expression (range 0-59)week()Create a week expressionyear()Create a year expressionCreate a year / month expressionyearWeek()Create a ISO yearweek expressionMethods inherited from class com.querydsl.core.types.dsl.TemporalExpression
after, after, before, beforeMethods inherited from class com.querydsl.core.types.dsl.LiteralExpression
castToNum, stringValueMethods inherited from class com.querydsl.core.types.dsl.ComparableExpression
between, between, goe, goe, goeAll, goeAll, goeAny, goeAny, gt, gt, gtAll, gtAll, gtAny, gtAny, loe, loe, loeAll, loeAll, loeAny, loeAny, lt, lt, ltAll, ltAll, ltAny, ltAny, notBetween, notBetweenMethods inherited from class com.querydsl.core.types.dsl.ComparableExpressionBase
asc, descMethods inherited from class com.querydsl.core.types.dsl.SimpleExpression
count, countDistinct, eq, eq, eqAll, eqAll, eqAny, eqAny, in, in, in, in, in, isNotNull, isNull, ne, ne, neAll, neAny, notIn, notIn, notIn, notIn, notIn, when, whenMethods inherited from class com.querydsl.core.types.dsl.DslExpression
equals, getType, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.querydsl.core.types.Expression
accept
-
Constructor Details
-
DateTimeExpression
-
-
Method Details
-
currentDate
Create an expression representing the current date as a DateTimeExpression instance- Returns:
- current date
-
currentDate
Create an expression representing the current date as a DateTimeExpression instance- Returns:
- current date
-
currentTimestamp
Create an expression representing the current time instant as a DateTimeExpression instance- Returns:
- current timestamp
-
currentTimestamp
Create an expression representing the current time instant as a DateTimeExpression instance- Returns:
- current timestamp
-
as
Description copied from class:SimpleExpressionCreate an alias for the expression- Overrides:
asin classComparableExpression<T extends Comparable>- Returns:
- alias expression
-
as
Description copied from class:SimpleExpressionCreate an alias for the expression- Overrides:
asin classComparableExpression<T extends Comparable>- Returns:
- alias expression
-
dayOfMonth
Create a day of month expression (range 1-31)- Returns:
- day of month
-
dayOfWeek
Create a day of week expression (range 1-7 / SUN-SAT)NOT supported in JDOQL and not in Derby
- Returns:
- day of week
-
dayOfYear
Create a day of year expression (range 1-356)NOT supported in JDOQL and not in Derby
- Returns:
- day of year
-
hour
Create a hours expression (range 0-23)- Returns:
- hour
-
max
Get the maximum value of this expression (aggregation)- Overrides:
maxin classComparableExpression<T extends Comparable>- Returns:
- max(this)
-
milliSecond
Create a milliseconds expression (range 0-999)Is always 0 in HQL and JDOQL modules
- Returns:
- milli seconds
-
min
Get the minimum value of this expression (aggregation)- Overrides:
minin classComparableExpression<T extends Comparable>- Returns:
- min(this)
-
minute
Create a minutes expression (range 0-59)- Returns:
- minute
-
month
Create a month expression (range 1-12 / JAN-DEC)- Returns:
- month
-
second
Create a seconds expression (range 0-59)- Returns:
- second
-
week
Create a week expression- Returns:
- week
-
year
Create a year expression- Returns:
- year
-
yearMonth
Create a year / month expression- Returns:
- year month
-
yearWeek
Create a ISO yearweek expression- Returns:
- year week
-
nullif
Create anullif(this, other)expression- Overrides:
nullifin classComparableExpression<T extends Comparable>- Parameters:
other-- Returns:
- nullif(this, other)
-
nullif
Create anullif(this, other)expression- Overrides:
nullifin classComparableExpression<T extends Comparable>- Parameters:
other-- Returns:
- nullif(this, other)
-
coalesce
Create acoalesce(this, expr)expression- Overrides:
coalescein classComparableExpression<T extends Comparable>- Parameters:
expr- additional argument- Returns:
- coalesce
-
coalesce
Create acoalesce(this, exprs...)expression- Overrides:
coalescein classComparableExpression<T extends Comparable>- Parameters:
exprs- additional arguments- Returns:
- coalesce
-
coalesce
Create acoalesce(this, arg)expression- Overrides:
coalescein classComparableExpression<T extends Comparable>- Parameters:
arg- additional argument- Returns:
- coalesce
-
coalesce
Create acoalesce(this, args...)expression- Overrides:
coalescein classComparableExpression<T extends Comparable>- Parameters:
args- additional arguments- Returns:
- coalesce
-