use of org.datanucleus.query.expression.Literal in project datanucleus-api-jdo by datanucleus.
the class ExpressionImpl method ne.
/* (non-Javadoc)
* @see org.datanucleus.query.typesafe.Expression#ne(java.lang.Object)
*/
public BooleanExpression ne(T t) {
org.datanucleus.query.expression.Expression leftQueryExpr = queryExpr;
org.datanucleus.query.expression.Expression rightQueryExpr = new Literal(t);
return new BooleanExpressionImpl(new DyadicExpression(leftQueryExpr, org.datanucleus.query.expression.Expression.OP_NOTEQ, rightQueryExpr));
}
use of org.datanucleus.query.expression.Literal in project datanucleus-api-jdo by datanucleus.
the class ListExpressionImpl method get.
/* (non-Javadoc)
* @see org.datanucleus.query.typesafe.ListExpression#get(int)
*/
public Expression get(int pos) {
List args = new ArrayList();
args.add(new Literal(pos));
org.datanucleus.query.expression.Expression invokeExpr = new InvokeExpression(queryExpr, "get", args);
return new ExpressionImpl(invokeExpr);
}
use of org.datanucleus.query.expression.Literal 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 org.datanucleus.query.expression.Literal 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 org.datanucleus.query.expression.Literal in project datanucleus-api-jdo by datanucleus.
the class StringExpressionImpl method matches.
public BooleanExpression matches(String str) {
List<org.datanucleus.query.expression.Expression> args = new ArrayList();
args.add(new Literal(str));
org.datanucleus.query.expression.Expression invokeExpr = new InvokeExpression(queryExpr, "matches", args);
return new BooleanExpressionImpl(invokeExpr);
}
Aggregations