"How can I invoke a stored procedure before a view object query executes?"
The framework class oracle.jbo.server.ViewObjectImpl has a method executeQueryForCollection() which will be invoked by the framework to actually execute the query for the view object to produce the resulting RowSet. If you override this method in your view object's custom ViewObjectImpl subclass, you can write a method like this:
protected void executeQueryForCollection(Object qc, Object[] params, int noUserParams) { /* * Use getDBTransaction().createCreateCallableStatement() * to create a JDBC callable statement to invoke the * stored procedure first, then call the super to do the * framework's built-in behavior. */ super.executeQueryForCollection(qc, params, noUserParams); }
10:40:02 AM
|