BC4J 10.1.3 supports 'named where-clause params' and 'variables' on various BC4J objects. The memo below explains tech details:
This memo will describe the named where-clause parameter feature.
Underlying the named where-clause parameter is a general feature of Variable support (aka, name space). Each app component object (specifically, AM, VO, RS and eventually binding container) is a variable manager (name space).
Each def object (AM def, VO def, EO def) is a variable manager.
A variable manager may be nested in the sense of scope nesting. (Interface name is oracle.jbo.VariableManager). Name lookup goes from the current var mgr and searches outward. Hence, a variable mgr has the concept of parent var mgr.
For a RowSet, the parent var mgr is the VO's var mgr.
For a VO, its parents are the AM instance's var mgr and view def's var mgr.
For an AM, its parents are the parent AM's (in terms of AM nesting) var mgr and the AM def's var mgr.
For a VO def its parents are the entity defs of the base EOs.
~~~~~
A var mgr contains variables (interface Variable).
A variable is typed, has a name, and has a default value. I also copied AttributeHint support into it so that people can to attr-hinting with these vars (just like Shailesh's JUCtrlParameterDef).
A var mgr is further extended into VariableValueManager, which knows how to store and manage current values (above and beyond the default value).
Strictly speaking, an app component object will have a VariableValueManager. AM def, VO def, EO def has VariableManager.
A variable can be a named where-clause parameter or a method parameter (or other things to be included as requirements arise). A "variable kind" indicates what kind of variable it is.
A where-clause parameter will have an additional list of integer ids. These ids will be used to bind the variable values into where-clause when the query is executed (will translate into setWhereClauseParam(int, Object) calls).
~~~~~
For named where-clause parameter implementation, I added the following APIs to oracle.jbo.RowSet.
void defineNamedWhereClauseParam(String name, Object defaultValue, int[] indices); void removeNamedWhereClauseParam(String name); void setNamedWhereClauseParam(String name, Object value); void skipNamedWhereClauseParam(String name);
Also, use the following link for further info
http://www.oracle.com/technology/oramag/oracle/06-mar/o26frame.html?msgid=4658272
11:54:34 AM
|