Example:
@Override
protected boolean buildWhereClause(StringBuffer sqlBuffer, int noBindVars) {
// call ViewObjectImpl's buildWhereClause() to allow the framework to do its processing
boolean hasWhereClause = super.buildWhereClause(sqlBuffer, noBindVars);
if (hasWhereClause) { // framework added a WHERE clause
// modify the WHERE clause as needed
}
else { // framework did not add a WHERE clause, so we need to add it ourselves
// add a WHERE clause here
hasWhereClause = true; // ensure that is set to notify the framework
}
return hasWhereClause; // return true/false to indicate whether a WHERE clause was added
}
Context:
View Object Implementation
Thanks a lot for your post. It helped me a lot..
ReplyDeleteI am using JDev 11.1.2.2.0. Example Scenario : In my application, In the first page, I am choosing a location value. In the second page I have a model based VO. The where clause of the query has to be set dynamically, based on the location what I am choosing in the first page. How to achieve this?
ReplyDeleteHave you looked at ExecuteWithParams?
ReplyDelete