com.mysema.query.types.expr
Class DateExpression<T extends Comparable>

java.lang.Object
  extended by com.mysema.query.types.ExpressionBase<T>
      extended by com.mysema.query.types.expr.SimpleExpression<T>
          extended by com.mysema.query.types.expr.ComparableExpressionBase<T>
              extended by com.mysema.query.types.expr.ComparableExpression<T>
                  extended by com.mysema.query.types.expr.TemporalExpression<T>
                      extended by com.mysema.query.types.expr.DateExpression<T>
Type Parameters:
T - expression type
All Implemented Interfaces:
Expression<T>, Serializable
Direct Known Subclasses:
DateOperation, DatePath, DateSubQuery, DateTemplate

public abstract class DateExpression<T extends Comparable>
extends TemporalExpression<T>

DateExpression represents Date expressions The date representation is compatible with the Gregorian calendar.

Author:
tiwe
See Also:
Gregorian calendar, Serialized Form

Field Summary
 
Fields inherited from class com.mysema.query.types.expr.SimpleExpression
primitive
 
Fields inherited from class com.mysema.query.types.ExpressionBase
type
 
Constructor Summary
DateExpression(Class<? extends T> type)
           
 
Method Summary
 DateExpression<T> as(Path<T> alias)
          Create an alias for the expression
 DateExpression<T> as(String alias)
          Create an alias for the expression
static DateExpression<Date> currentDate()
          Get an expression representing the current date as a EDate instance
static
<T extends Comparable>
DateExpression<T>
currentDate(Class<T> cl)
          Get an expression representing the current date as a EDate instance
 NumberExpression<Integer> dayOfMonth()
          Get a day of month expression (range 1-31)
 NumberExpression<Integer> dayOfWeek()
          Get a day of week expression (range 1-7 / SUN-SAT)
 NumberExpression<Integer> dayOfYear()
          Get a day of year expression (range 1-356)
 DateExpression<T> max()
          Get the maximum value of this expression (aggregation)
 DateExpression<T> min()
          Get the minimum value of this expression (aggregation)
 NumberExpression<Integer> month()
          Get a month expression (range 1-12 / JAN-DEC)
 NumberExpression<Integer> week()
          Get a week expression
 NumberExpression<Integer> year()
          Get a year expression
 NumberExpression<Integer> yearMonth()
          Get a year / month expression
 
Methods inherited from class com.mysema.query.types.expr.TemporalExpression
after, after, before, before
 
Methods inherited from class com.mysema.query.types.expr.ComparableExpression
between, between, goe, goe, gt, gt, loe, loe, lt, lt, notBetween, notBetween
 
Methods inherited from class com.mysema.query.types.expr.ComparableExpressionBase
asc, castToNum, desc, stringValue
 
Methods inherited from class com.mysema.query.types.expr.SimpleExpression
count, countDistinct, eq, eq, equals, hashCode, in, in, in, isNotNull, isNull, ne, ne, notIn, notIn, notIn, when, when
 
Methods inherited from class com.mysema.query.types.ExpressionBase
getType, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.mysema.query.types.Expression
accept
 

Constructor Detail

DateExpression

public DateExpression(Class<? extends T> type)
Method Detail

currentDate

public static DateExpression<Date> currentDate()
Get an expression representing the current date as a EDate instance

Returns:

currentDate

public static <T extends Comparable> DateExpression<T> currentDate(Class<T> cl)
Get an expression representing the current date as a EDate instance

Returns:

as

public DateExpression<T> as(Path<T> alias)
Description copied from class: SimpleExpression
Create an alias for the expression

Overrides:
as in class ComparableExpression<T extends Comparable>
Returns:

as

public DateExpression<T> as(String alias)
Description copied from class: SimpleExpression
Create an alias for the expression

Overrides:
as in class ComparableExpression<T extends Comparable>
Returns:

dayOfMonth

public NumberExpression<Integer> dayOfMonth()
Get a day of month expression (range 1-31)

Returns:

dayOfWeek

public NumberExpression<Integer> dayOfWeek()
Get a day of week expression (range 1-7 / SUN-SAT)

NOT supported in JDOQL and not in Derby

Returns:

dayOfYear

public NumberExpression<Integer> dayOfYear()
Get a day of year expression (range 1-356)

NOT supported in JDOQL and not in Derby

Returns:

max

public DateExpression<T> max()
Get the maximum value of this expression (aggregation)

Returns:
max(this)

min

public DateExpression<T> min()
Get the minimum value of this expression (aggregation)

Returns:
min(this)

month

public NumberExpression<Integer> month()
Get a month expression (range 1-12 / JAN-DEC)

Returns:

week

public NumberExpression<Integer> week()
Get a week expression

Returns:

year

public NumberExpression<Integer> year()
Get a year expression

Returns:

yearMonth

public NumberExpression<Integer> yearMonth()
Get a year / month expression

Returns:


Copyright © 2007-2011 Mysema Ltd. All Rights Reserved.