use of javax.jdo.query.StringExpression 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.StringExpression in project datanucleus-api-jdo by datanucleus.
the class StringExpressionImpl method substring.
/* (non-Javadoc)
* @see org.datanucleus.query.typesafe.StringExpression#substring(int)
*/
public StringExpression substring(int pos) {
List<org.datanucleus.query.expression.Expression> args = new ArrayList();
args.add(new Literal(pos));
org.datanucleus.query.expression.Expression invokeExpr = new InvokeExpression(queryExpr, "substring", args);
return new StringExpressionImpl(invokeExpr);
}
Aggregations