What's the difference between View Criteria and Where clause?
- by frank.nimphius
Normal
0
false
false
false
EN-US
X-NONE
X-NONE
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
A View Criteria
is a filter that you apply programmatically or by definition to a View Object
instance. It augments the WHERE clause in a View Object query. Named View Criteria are defined in the Query
panel of the View Object and are used
·
In combination with the af:query component to build search forms. To do this, you drag and
drop the View Criteria from the Named
View Criteria node of the View Object in the Data Controls Panel. In the
context menu, you then select the Query component - optionally with a result
table
·
To restrict a View Object instance in the Application
Module model. For this, select a View object instance in the right hand list of
the ADF Business Component Data Model panel. Use the Edit button to add a View Criteria to the View Object instance. This
ensures that the View Object instance also runs with a query filter applied.
View Criteria use bind variables for query conditions that you
want to pass in dynamically at runtime. Beside of the ability to apply View Criteria
declaratively, you can apply them programmatically in Java.
A WHERE clause, if added to a View Object query by design
restricts all instances of this View Object, which usually is not what
developers want. Because of the benefits - and the configuration options not
explained above but in the product documentation referenced below - the recommendation
is to use View Criteria.
The product documentation explains View Criteria in chapter
5 of the Developer Guide:
http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcquerying.htm#BCGIFHHF