use of org.datanucleus.query.expression.DyadicExpression in project datanucleus-api-jdo by datanucleus.
the class ExpressionImpl method eq.
/* (non-Javadoc)
* @see org.datanucleus.query.typesafe.Expression#eq(org.datanucleus.query.typesafe.Expression)
*/
public BooleanExpression eq(Expression expr) {
if (expr == null) {
// Assume they meant to compare with NULL Literal
return this.eq((T) null);
}
org.datanucleus.query.expression.Expression leftQueryExpr = queryExpr;
org.datanucleus.query.expression.Expression rightQueryExpr = ((ExpressionImpl) expr).getQueryExpression();
return new BooleanExpressionImpl(new DyadicExpression(leftQueryExpr, org.datanucleus.query.expression.Expression.OP_EQ, rightQueryExpr));
}
use of org.datanucleus.query.expression.DyadicExpression in project datanucleus-api-jdo by datanucleus.
the class BooleanExpressionImpl method not.
/* (non-Javadoc)
* @see org.datanucleus.query.typesafe.BooleanExpression#not()
*/
public BooleanExpression not() {
Expression rightQueryExpr = queryExpr;
org.datanucleus.query.expression.Expression queryExpr = new DyadicExpression(org.datanucleus.query.expression.Expression.OP_NOT, rightQueryExpr);
return new BooleanExpressionImpl(queryExpr);
}
use of org.datanucleus.query.expression.DyadicExpression in project datanucleus-api-jdo by datanucleus.
the class ComparableExpressionImpl method gteq.
/* (non-Javadoc)
* @see org.datanucleus.query.typesafe.Expression#gteq(java.lang.Object)
*/
public BooleanExpression gteq(T t) {
Expression leftQueryExpr = queryExpr;
Expression rightQueryExpr = new Literal(t);
org.datanucleus.query.expression.Expression queryExpr = new DyadicExpression(leftQueryExpr, org.datanucleus.query.expression.Expression.OP_GTEQ, rightQueryExpr);
return new BooleanExpressionImpl(queryExpr);
}
use of org.datanucleus.query.expression.DyadicExpression in project datanucleus-api-jdo by datanucleus.
the class ComparableExpressionImpl method lteq.
/* (non-Javadoc)
* @see org.datanucleus.query.typesafe.Expression#lteq(org.datanucleus.query.typesafe.ComparableExpression)
*/
public BooleanExpression lteq(ComparableExpression expr) {
Expression leftQueryExpr = queryExpr;
Expression rightQueryExpr = ((ExpressionImpl) expr).getQueryExpression();
org.datanucleus.query.expression.Expression queryExpr = new DyadicExpression(leftQueryExpr, org.datanucleus.query.expression.Expression.OP_LTEQ, rightQueryExpr);
return new BooleanExpressionImpl(queryExpr);
}
use of org.datanucleus.query.expression.DyadicExpression 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