Package [com.oaframework.toolkit.common.server]
Extends oracle.apps.fnd.framework.server.OAViewObjectImpl
This class provides methods to assist in the construction of complex WHERE clauses. Your VO's initQuery() method should call the methods from this class as follows:
For further details see the Example
This methods clears down any previously set WHERE clauses ands calls the standard setWhereClauseParams() to clear down any existing bind values.
This method is overloaded 5 times to provide a variety WHERE clause syntax.
The clause is added to the WHERE clause with no modification
The clause must contain a placeholder <1> which is replaced by a suitably numbered bind variable and added to the WHERE clause. The value is stored and will be bound to the Query later by bindParameters()
The clause must contain a placeholder <1> which is replaced by a suitably numbered bind variable and added to the WHERE clause. The value is stored and will be bound to the Query later by bindParameters()
The clause must contain placeholder <1> and <2> which are replaced by a suitably numbered bind variables and added to the WHERE clause. value1 and value2 are stored and will be bound to the Query later by bindParameters(). This overload would normally be used for BETWEEN clauses.
The clause must contain placeholder <1> and <2> which are replaced by a suitably numbered bind variables and added to the WHERE clause. value1 and value2 are stored and will be bound to the Query later by bindParameters(). This overload would normally be used for BETWEEN clauses.
Applies the current WHERE clauses to the VO and bind the supplied values to any bind variables.
Returns the current complete WHERE clause
Returns the number of clauses that comprise the current WHERE clause
Returns the number of bind variables contained in the current WHERE clause.
Bind the previously supplied values to the variables in the current WHERE clause. This method is not normally called directly.
public void initQuery(Number userId, String status, Number lowValue, Number highValue) { clearWhereClauses(); addClause("enabled = 'Y'"); addClause("user_id = <1>", userId); addClause("status = <1>", status); addClause("total_value BETWEEN <1> AND <2>", lowValue, highValue); applyWhereClauses(); executeQuery(); }
Calling this method will result in the following WHERE clause:
enabled = 'Y' AND user_id = :1 AND status = :2 AND total_value BETWEEN :3 AND :4