Search in sources :

Example 11 with BooleanExpression

use of javax.jdo.query.BooleanExpression 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);
}
Also used : DyadicExpression(org.datanucleus.query.expression.DyadicExpression) NumericExpression(javax.jdo.query.NumericExpression) ComparableExpression(javax.jdo.query.ComparableExpression) Expression(org.datanucleus.query.expression.Expression) InvokeExpression(org.datanucleus.query.expression.InvokeExpression) OrderExpression(javax.jdo.query.OrderExpression) PersistableExpression(javax.jdo.query.PersistableExpression) BooleanExpression(javax.jdo.query.BooleanExpression) Literal(org.datanucleus.query.expression.Literal) Expression(org.datanucleus.query.expression.Expression) DyadicExpression(org.datanucleus.query.expression.DyadicExpression)

Example 12 with BooleanExpression

use of javax.jdo.query.BooleanExpression 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);
}
Also used : DyadicExpression(org.datanucleus.query.expression.DyadicExpression) NumericExpression(javax.jdo.query.NumericExpression) ComparableExpression(javax.jdo.query.ComparableExpression) Expression(org.datanucleus.query.expression.Expression) InvokeExpression(org.datanucleus.query.expression.InvokeExpression) OrderExpression(javax.jdo.query.OrderExpression) PersistableExpression(javax.jdo.query.PersistableExpression) BooleanExpression(javax.jdo.query.BooleanExpression) Expression(org.datanucleus.query.expression.Expression) DyadicExpression(org.datanucleus.query.expression.DyadicExpression)

Example 13 with BooleanExpression

use of javax.jdo.query.BooleanExpression in project datanucleus-api-jdo by datanucleus.

the class MapExpressionImpl method containsEntry.

/* (non-Javadoc)
     * @see org.datanucleus.query.typesafe.MapExpression#containsEntry(java.util.Map.Entry)
     */
public BooleanExpression containsEntry(Entry<K, V> entry) {
    List<org.datanucleus.query.expression.Expression> args = new ArrayList();
    args.add(new Literal(entry));
    org.datanucleus.query.expression.Expression invokeExpr = new InvokeExpression(queryExpr, "containsEntry", args);
    return new BooleanExpressionImpl(invokeExpr);
}
Also used : InvokeExpression(org.datanucleus.query.expression.InvokeExpression) NumericExpression(javax.jdo.query.NumericExpression) InvokeExpression(org.datanucleus.query.expression.InvokeExpression) PersistableExpression(javax.jdo.query.PersistableExpression) MapExpression(javax.jdo.query.MapExpression) BooleanExpression(javax.jdo.query.BooleanExpression) Expression(javax.jdo.query.Expression) Literal(org.datanucleus.query.expression.Literal) ArrayList(java.util.ArrayList)

Example 14 with BooleanExpression

use of javax.jdo.query.BooleanExpression in project datanucleus-api-jdo by datanucleus.

the class MapExpressionImpl method containsValue.

/* (non-Javadoc)
     * @see org.datanucleus.query.typesafe.MapExpression#containsValue(java.lang.Object)
     */
public BooleanExpression containsValue(V value) {
    List<org.datanucleus.query.expression.Expression> args = new ArrayList();
    args.add(new Literal(value));
    org.datanucleus.query.expression.Expression invokeExpr = new InvokeExpression(queryExpr, "containsValue", args);
    return new BooleanExpressionImpl(invokeExpr);
}
Also used : InvokeExpression(org.datanucleus.query.expression.InvokeExpression) NumericExpression(javax.jdo.query.NumericExpression) InvokeExpression(org.datanucleus.query.expression.InvokeExpression) PersistableExpression(javax.jdo.query.PersistableExpression) MapExpression(javax.jdo.query.MapExpression) BooleanExpression(javax.jdo.query.BooleanExpression) Expression(javax.jdo.query.Expression) Literal(org.datanucleus.query.expression.Literal) ArrayList(java.util.ArrayList)

Example 15 with BooleanExpression

use of javax.jdo.query.BooleanExpression in project datanucleus-api-jdo by datanucleus.

the class MapExpressionImpl method containsKey.

/* (non-Javadoc)
     * @see org.datanucleus.query.typesafe.MapExpression#containsKey(java.lang.Object)
     */
public BooleanExpression containsKey(K key) {
    List<org.datanucleus.query.expression.Expression> args = new ArrayList();
    args.add(new Literal(key));
    org.datanucleus.query.expression.Expression invokeExpr = new InvokeExpression(queryExpr, "containsKey", args);
    return new BooleanExpressionImpl(invokeExpr);
}
Also used : InvokeExpression(org.datanucleus.query.expression.InvokeExpression) NumericExpression(javax.jdo.query.NumericExpression) InvokeExpression(org.datanucleus.query.expression.InvokeExpression) PersistableExpression(javax.jdo.query.PersistableExpression) MapExpression(javax.jdo.query.MapExpression) BooleanExpression(javax.jdo.query.BooleanExpression) Expression(javax.jdo.query.Expression) Literal(org.datanucleus.query.expression.Literal) ArrayList(java.util.ArrayList)

Aggregations

BooleanExpression (javax.jdo.query.BooleanExpression)19 PersistableExpression (javax.jdo.query.PersistableExpression)19 NumericExpression (javax.jdo.query.NumericExpression)16 InvokeExpression (org.datanucleus.query.expression.InvokeExpression)16 DyadicExpression (org.datanucleus.query.expression.DyadicExpression)15 Literal (org.datanucleus.query.expression.Literal)12 Expression (org.datanucleus.query.expression.Expression)11 ArrayList (java.util.ArrayList)8 ComparableExpression (javax.jdo.query.ComparableExpression)8 Expression (javax.jdo.query.Expression)8 OrderExpression (javax.jdo.query.OrderExpression)8 CharacterExpression (javax.jdo.query.CharacterExpression)4 StringExpression (javax.jdo.query.StringExpression)4 MapExpression (javax.jdo.query.MapExpression)3 CollectionExpression (javax.jdo.query.CollectionExpression)1