use of javax.jdo.query.NumericExpression in project datanucleus-api-jdo by datanucleus.
the class ComparableExpressionImpl method max.
/* (non-Javadoc)
* @see org.datanucleus.query.typesafe.Expression#max()
*/
public NumericExpression max() {
List<org.datanucleus.query.expression.Expression> args = new ArrayList();
args.add(queryExpr);
org.datanucleus.query.expression.Expression invokeExpr = new InvokeExpression(null, "max", args);
return new NumericExpressionImpl<T>(invokeExpr);
}
use of javax.jdo.query.NumericExpression in project datanucleus-api-jdo by datanucleus.
the class ComparableExpressionImpl method min.
/* (non-Javadoc)
* @see org.datanucleus.query.typesafe.Expression#min()
*/
public NumericExpression min() {
List<org.datanucleus.query.expression.Expression> args = new ArrayList();
args.add(queryExpr);
org.datanucleus.query.expression.Expression invokeExpr = new InvokeExpression(null, "min", args);
return new NumericExpressionImpl<T>(invokeExpr);
}
use of javax.jdo.query.NumericExpression in project datanucleus-api-jdo by datanucleus.
the class StringExpressionImpl method indexOf.
/* (non-Javadoc)
* @see org.datanucleus.query.typesafe.StringExpression#indexOf(java.lang.String, org.datanucleus.query.typesafe.NumericExpression)
*/
public NumericExpression<Integer> indexOf(String str, NumericExpression pos) {
List<org.datanucleus.query.expression.Expression> args = new ArrayList();
args.add(new Literal(str));
args.add(((ExpressionImpl) pos).getQueryExpression());
org.datanucleus.query.expression.Expression invokeExpr = new InvokeExpression(queryExpr, "indexOf", args);
return new NumericExpressionImpl<Integer>(invokeExpr);
}
use of javax.jdo.query.NumericExpression in project datanucleus-api-jdo by datanucleus.
the class StringExpressionImpl method indexOf.
/* (non-Javadoc)
* @see org.datanucleus.query.typesafe.StringExpression#indexOf(org.datanucleus.query.typesafe.StringExpression, int)
*/
public NumericExpression<Integer> indexOf(StringExpression expr, int pos) {
List<org.datanucleus.query.expression.Expression> args = new ArrayList();
args.add(((ExpressionImpl) expr).getQueryExpression());
args.add(new Literal(pos));
org.datanucleus.query.expression.Expression invokeExpr = new InvokeExpression(queryExpr, "indexOf", args);
return new NumericExpressionImpl<Integer>(invokeExpr);
}
use of javax.jdo.query.NumericExpression in project datanucleus-api-jdo by datanucleus.
the class ExpressionImpl method countDistinct.
/* (non-Javadoc)
* @see org.datanucleus.query.typesafe.Expression#countDistinct()
*/
public NumericExpression<Long> countDistinct() {
List<org.datanucleus.query.expression.Expression> args = new ArrayList();
args.add(new DyadicExpression(org.datanucleus.query.expression.Expression.OP_DISTINCT, queryExpr));
org.datanucleus.query.expression.Expression invokeExpr = new InvokeExpression(null, "count", args);
return new NumericExpressionImpl<Long>(invokeExpr);
}
Aggregations