Example #1
0
 public NumberExpression<?> asNumber() {
   return NumberOperation.create((Class) getType(), Ops.COALESCE, getExpressionList());
 }
Example #2
0
 /**
  * Get a milliseconds expression (range 0-999)
  *
  * <p>Is always 0 in HQL and JDOQL modules
  *
  * @return
  */
 public NumberExpression<Integer> milliSecond() {
   if (milliseconds == null) {
     milliseconds = NumberOperation.create(Integer.class, Ops.DateTimeOps.MILLISECOND, this);
   }
   return milliseconds;
 }
Example #3
0
 /**
  * Get a minutes expression (range 0-59)
  *
  * @return
  */
 public NumberExpression<Integer> minute() {
   if (minutes == null) {
     minutes = NumberOperation.create(Integer.class, Ops.DateTimeOps.MINUTE, this);
   }
   return minutes;
 }
Example #4
0
 /**
  * Get a seconds expression (range 0-59)
  *
  * @return
  */
 public NumberExpression<Integer> second() {
   if (seconds == null) {
     seconds = NumberOperation.create(Integer.class, Ops.DateTimeOps.SECOND, this);
   }
   return seconds;
 }
Example #5
0
 /**
  * Get a hours expression (range 0-23)
  *
  * @return
  */
 public NumberExpression<Integer> hour() {
   if (hours == null) {
     hours = NumberOperation.create(Integer.class, Ops.DateTimeOps.HOUR, this);
   }
   return hours;
 }