/** * PUBLIC: * Add the expression to the query to be used in the HAVING clause. * This epression will be used to filter the result sets after they are grouped. It must be used in conjunction with the GROUP BY clause. * <p>Example: * <p>reportQuery.setHavingExpression(expBuilder.get("address").get("country").equal("Canada")) */ public void setHavingExpression(Expression expression) { havingExpression = expression; setIsPrepared(false); }
/** * PUBLIC: * Add the expression to the query to be used in the HAVING clause. * This epression will be used to filter the result sets after they are grouped. It must be used in conjunction with the GROUP BY clause. * <p>Example: * <p>reportQuery.setHavingExpression(expBuilder.get("address").get("country").equal("Canada")) */ public void setHavingExpression(Expression expression) { havingExpression = expression; setIsPrepared(false); }
/** * PUBLIC: * Add the expression to the query to be used in the HAVING clause. * This epression will be used to filter the result sets after they are grouped. It must be used in conjunction with the GROUP BY clause. * <p>Example: * <p>reportQuery.setHavingExpression(expBuilder.get("address").get("country").equal("Canada")) */ public void setHavingExpression(Expression expression) { havingExpression = expression; setIsPrepared(false); }
/** * INTERNAL: * Clear the ReportQueryItems */ public void clearItems() { this.items = new ArrayList<ReportItem>(); setIsPrepared(false); }
/** * INTERNAL: * Clear the ReportQueryItems */ public void clearItems() { this.items = new ArrayList<ReportItem>(); setIsPrepared(false); }
/** * INTERNAL: * Clear the ReportQueryItems */ public void clearItems() { this.items = new ArrayList<ReportItem>(); setIsPrepared(false); }
/** * PUBLIC: * Set if the query results should contain the primary keys or each associated object. * This make retrieving the real object easier. * By default they are not retrieved. */ public void retrievePrimaryKeys() { setShouldRetrievePrimaryKeys(true); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * PUBLIC: * Set if the query results should contain the primary keys or each associated object. * This make retrieving the real object easier. * By default they are not retrieved. */ public void dontRetrievePrimaryKeys() { setShouldRetrievePrimaryKeys(false); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * PUBLIC: * Set if the query results should contain the primary keys or each associated object. * This make retrieving the real object easier. * By default they are not retrieved. */ public void retrievePrimaryKeys() { setShouldRetrievePrimaryKeys(true); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * PUBLIC: * Add the attribute expression to the group by expressions. * This will group the result set on that attribute and is normally used in conjunction with aggregation functions. * Example: reportQuery.addGrouping(expBuilder.get("address").get("country")) */ public void addGrouping(Expression expression) { getGroupByExpressions().add(expression); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * PUBLIC: * Add the attribute expression to the group by expressions. * This will group the result set on that attribute and is normally used in conjunction with aggregation functions. * Example: reportQuery.addGrouping(expBuilder.get("address").get("country")) */ public void addGrouping(Expression expression) { getGroupByExpressions().add(expression); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * PUBLIC: * Set if the query results should contain the primary keys or each associated object. * This make retrieving the real object easier. * By default they are not retrieved. */ public void dontRetrievePrimaryKeys() { setShouldRetrievePrimaryKeys(false); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * PUBLIC: * Set if the query results should contain the primary keys or each associated object. * This make retrieving the real object easier. * By default they are not retrieved. */ public void dontRetrievePrimaryKeys() { setShouldRetrievePrimaryKeys(false); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * PUBLIC: * Add the attribute expression to the group by expressions. * This will group the result set on that attribute and is normally used in conjunction with aggregation functions. * Example: reportQuery.addGrouping(expBuilder.get("address").get("country")) */ public void addGrouping(Expression expression) { getGroupByExpressions().add(expression); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * PUBLIC: * Set if the query results should contain the primary keys or each associated object. * This make retrieving the real object easier. * By default they are not retrieved. */ public void retrievePrimaryKeys() { setShouldRetrievePrimaryKeys(true); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * ADVANCED: * Add the expression value to be included in the result. * EXAMPLE: reportQuery.addItem("name", expBuilder.get("firstName").toUpperCase()); */ public void addItem(String itemName, Expression attributeExpression) { ReportItem item = new ReportItem(itemName, attributeExpression); addItem(item); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * ADVANCED: * Add the expression value to be included in the result. * EXAMPLE: reportQuery.addItem("name", expBuilder.get("firstName").toUpperCase()); */ public void addItem(String itemName, Expression attributeExpression) { ReportItem item = new ReportItem(itemName, attributeExpression); addItem(item); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * ADVANCED: * Add the expression value to be included in the result. * EXAMPLE: reportQuery.addItem("name", expBuilder.get("firstName").toUpperCase()); */ public void addItem(String itemName, Expression attributeExpression) { ReportItem item = new ReportItem(itemName, attributeExpression); addItem(item); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * INTERNAL: * Method used to abstract addToConstructorItem behavour from the public addItem methods */ private void addItem(ReportItem item){ if (this.addToConstructorItem && (getItems().size() > 0) && (getItems().get(getItems().size() - 1).isConstructorItem())) { ((ConstructorReportItem)getItems().get(getItems().size() - 1)).addItem(item); } else { getItems().add(item); } //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }
/** * ADVANCED: * Add the function against the attribute expression to be included in the result. * Aggregation functions can be used with a group by, or on the entire result set. * Example: reportQuery.addFunctionItem("average", expBuilder.get("salary"), "average"); */ public void addFunctionItem(String itemName, Expression attributeExpression, String functionName) { Expression functionExpression = attributeExpression; functionExpression = attributeExpression.getFunction(functionName); ReportItem item = new ReportItem(itemName, functionExpression); addItem(item); //Bug2804042 Must un-prepare if prepared as the SQL may change. setIsPrepared(false); }