/** * PUBLIC: * This can only be used within an ordering expression. * It will order the result ascending. * Example: * <blockquote><pre> * readAllQuery.addOrderBy(expBuilder.get("address").get("city").ascending()) * </pre></blockquote> */ public Expression ascending() { return getFunction(ExpressionOperator.Ascending); }
/** * PUBLIC: * Function, This represents the aggregate function Average. Can be used only within Report Queries. */ public Expression average() { return getFunction(ExpressionOperator.Average); }
/** * PUBLIC: * This represents the aggregate function Minimum. Can be used only within Report Queries. */ public Expression minimum() { return getFunction(ExpressionOperator.Minimum); }
/** * PUBLIC: * This can only be used within an ordering expression. * It will order the result descending. * <p>Example: * <blockquote><pre> * readAllQuery.addOrderBy(expBuilder.get("address").get("city").descending()) * </pre></blockquote> */ public Expression descending() { return getFunction(ExpressionOperator.Descending); }
/** * PUBLIC: * Function, This represents the distinct option inside an aggregate function. Can be used only within Report Queries. */ public Expression distinct() { return getFunction(ExpressionOperator.Distinct); }
/** * PUBLIC: * Function, This represents the aggregate function Average. Can be used only within Report Queries. */ public Expression average() { return getFunction(ExpressionOperator.Average); }
/** * PUBLIC: * This represents the aggregate function StandardDeviation. Can be used only within Report Queries. */ public Expression standardDeviation() { return getFunction(ExpressionOperator.StandardDeviation); }
/** * PUBLIC: * This can only be used within an ordering expression. * Null results will be ordered first. * Example: * <blockquote><pre> * readAllQuery.addOrderBy(expBuilder.get("address").get("city").ascending().nullsFirst()) * </pre></blockquote> */ public Expression nullsFirst() { return getFunction(ExpressionOperator.NullsFirst); }
/** * PUBLIC: * This represents the aggregate function Average. Can be used only within Report Queries. */ public Expression count() { return getFunction(ExpressionOperator.Count); }
/** * PUBLIC: * This represents the aggregate function Maximum. Can be used only within Report Queries. */ public Expression maximum() { return getFunction(ExpressionOperator.Maximum); }
/** * PUBLIC: * This gives access to the current time only on the database through expression. * Note the difference between currentDate() and this method. This method does * not return the date portion where as currentDate() does. */ public Expression currentTime() { return getFunction(ExpressionOperator.CurrentTime); }
/** * PUBLIC: * This can only be used within an ordering expression. * It will order the result descending. * <p>Example: * <blockquote><pre> * readAllQuery.addOrderBy(expBuilder.get("address").get("city").descending()) * </pre></blockquote> */ public Expression descending() { return getFunction(ExpressionOperator.Descending); }
/** * PUBLIC: * This represents the aggregate function StandardDeviation. Can be used only within Report Queries. */ public Expression standardDeviation() { return getFunction(ExpressionOperator.StandardDeviation); }
/** * PUBLIC: * Function, this represents the aggregate function Variance. Can be used only within Report Queries. */ public Expression variance() { return getFunction(ExpressionOperator.Variance); }
/** * PUBLIC: * This can only be used within an ordering expression. * It will order the result ascending. * Example: * <blockquote><pre> * readAllQuery.addOrderBy(expBuilder.get("address").get("city").ascending()) * </pre></blockquote> */ public Expression ascending() { return getFunction(ExpressionOperator.Ascending); }
/** * PUBLIC: * This represents the aggregate function Average. Can be used only within Report Queries. */ public Expression count() { return getFunction(ExpressionOperator.Count); }
/** * PUBLIC: * This represents the aggregate function Minimum. Can be used only within Report Queries. */ public Expression minimum() { return getFunction(ExpressionOperator.Minimum); }
/** * ADVANCED: * For Object-relational support. */ public Expression ref() { return getFunction(ExpressionOperator.Ref); }
/** * INTERNAL * Return the parent expression unmodified */ public Expression addToExpression(Expression parentExpression, GenerationContext context) { return parentExpression.getFunction(getSortDirection()); }
@Override public Expression createExpressionFor(DatabaseField field, Expression builder) { if (field.getType() == java.sql.Clob.class || field.getType() == java.sql.Blob.class) { Expression subExp1 = builder.getField(field); Expression subExp2 = builder.getParameter(field); subExp1 = subExp1.getFunction("dbms_lob.compare", subExp2); return subExp1.equal(0); } return super.createExpressionFor(field, builder); }