Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.1.0)

E17483-02

oracle.jbo
Interface ViewCriteriaManager

All Known Implementing Classes:
BaseViewCriteriaManagerImpl, CmrAccessorViewImpl, DCCriteriaBaseVOImpl, DCCriteriaItemVOImpl, DCCriteriaOperatorVOImpl, DCCriteriaRowVOImpl, DCCriteriaValueVOImpl, DCCriteriaVOImpl, DCDataVO, DSViewObjectImpl, FinderViewImpl, PDefViewObject, PlaceholderVOImpl, ViewObjectImpl, ViewObjectOnRowSets, ViewUsageImpl

public interface ViewCriteriaManager

ViewCriteriaManager interface describes a set of functionality that a criteria manager must implement to manage a set of view criteria. Using the interface one ore more criteria could be applied or unapplied.


Field Summary
static java.lang.String DFLT_VIEW_CRITERIA_NAME
           
static java.lang.String IMPLICIT_VIEW_CRITERIA_NAME
           
static java.lang.String QUICKSEARCH_VIEW_CRITERIA_NAME
           
 
Method Summary
 void applyViewCriteria(ViewCriteria vc)
          Apply the view criteria passed as the argument.
 void applyViewCriteria(ViewCriteria vc, boolean bAppend)
          Apply the view crtieria passed as the argument.
 CriteriaClauses buildViewCriteriaClauses(ViewCriteria vc)
          This method is used by the framework to generate a query clause for a particular view criteria.
 void clearViewCriterias()
          Clear all view criteria, both applied and unapplied help by this manager
 void criteriaChanged(ViewCriteria vc)
          The criteria manager can track changes to applied view criteria.
 java.lang.String[] getAllViewCriteriaNames()
          Returns a list of both applied and unapplied view criterias managed by this object.
 ViewCriteria[] getAllViewCriterias()
          Returns a list of both applied and unapplied view criterias managed by this object.
 java.lang.String[] getApplyViewCriteriaNames()
           
 ViewCriteria[] getApplyViewCriterias(int criteriaMode)
          Return a list of applied view criteria that have the mode passed in the argument turned on.
 java.lang.String[] getAvailableViewCriteriaNames()
          Returns a list of view criteria names that are unapplied and managed by this object
 ViewCriteria getViewCriteria()
          Returns the default view criteria of the manager.
 ViewCriteria getViewCriteria(java.lang.String name)
          Returns a reference to the view criteria with a specific name if it is found.
 java.lang.String getViewCriteriaClause(boolean forQuery)
          This method is used by the framework to generate a query clause for the applied view criterias.
 void putViewCriteria(java.lang.String name, ViewCriteria vc)
          Add a view criteria to be managed by this object
 boolean removeApplyViewCriteriaName(java.lang.String name)
          Unapplied the view criteria if it is applied.
 ViewCriteria removeViewCriteria(java.lang.String name)
          Removes the view criteria from this manager.
 void resetCriteria(ViewCriteria vc)
          Resets a view criteria to the state as defined in the View Definition.
 void setApplyViewCriteriaName(java.lang.String name)
          Apply the view criteria name passed as the argument.
 void setApplyViewCriteriaName(java.lang.String name, boolean bAppend)
          Apply the view crtieria name passed as the argument.
 void setApplyViewCriteriaNames(java.lang.String[] names)
          Apply a set of view criteria names passed as the argument.
 void setCurrentUnionViewCriteriaName(java.lang.String vcName)
           
 

Field Detail

DFLT_VIEW_CRITERIA_NAME

static final java.lang.String DFLT_VIEW_CRITERIA_NAME
See Also:
Constant Field Values

IMPLICIT_VIEW_CRITERIA_NAME

static final java.lang.String IMPLICIT_VIEW_CRITERIA_NAME
See Also:
Constant Field Values

QUICKSEARCH_VIEW_CRITERIA_NAME

static final java.lang.String QUICKSEARCH_VIEW_CRITERIA_NAME
See Also:
Constant Field Values
Method Detail

getViewCriteria

ViewCriteria getViewCriteria(java.lang.String name)
Returns a reference to the view criteria with a specific name if it is found.

Parameters:
name - view criteria name
Returns:
a view criteria reference or null

getViewCriteria

ViewCriteria getViewCriteria()
Returns the default view criteria of the manager. If a view criteria has the name as DFLT_VIEW_CRITERIA_NAME then it is considered to be the default. The default name is also assigned when a view criteria with a null name is applied.

Returns:
the default view criteria.

getAllViewCriterias

ViewCriteria[] getAllViewCriterias()
Returns a list of both applied and unapplied view criterias managed by this object.

Returns:
an array of view criteria

getAllViewCriteriaNames

java.lang.String[] getAllViewCriteriaNames()
Returns a list of both applied and unapplied view criterias managed by this object.

Returns:
an array of view criteria names

getAvailableViewCriteriaNames

java.lang.String[] getAvailableViewCriteriaNames()
Returns a list of view criteria names that are unapplied and managed by this object

Returns:
the names of the criteria that can still be applied

putViewCriteria

void putViewCriteria(java.lang.String name,
                     ViewCriteria vc)
Add a view criteria to be managed by this object

Parameters:
name - Name of the view criteria
vc - view criteria reference

clearViewCriterias

void clearViewCriterias()
Clear all view criteria, both applied and unapplied help by this manager


removeViewCriteria

ViewCriteria removeViewCriteria(java.lang.String name)
Removes the view criteria from this manager. If it is applied it is first unapplied and then removed. If the intent is to simply unapply use removeApplyViewCriteriaName API.

Parameters:
name - The view criteria name that needs to be removed
Returns:
reference to the removed view criteria if found.

removeApplyViewCriteriaName

boolean removeApplyViewCriteriaName(java.lang.String name)
Unapplied the view criteria if it is applied. The view criteria will continue to be managed by this manager.

Parameters:
name - The view criteria name that need to be unapplied.
Returns:
true if the view criteria was found to be applied, false otherwise.

applyViewCriteria

void applyViewCriteria(ViewCriteria vc)
Apply the view criteria passed as the argument. If the passed view criteria is not managed by this object it will be added to managed list. The applied criteria name list will first be cleared out and then the view criteria passed as argument is applied. If null is passed as the argument there will be no applied view criteria.

Parameters:
vc - the criteria to be applied.

applyViewCriteria

void applyViewCriteria(ViewCriteria vc,
                       boolean bAppend)
Apply the view crtieria passed as the argument. If the passed view criteria is not managed by this object it will be added to managed list. If bAppend is true the passed view criteria will be applied in addition to the existing ones. If bAppend is false this method is identical to applyViewCriteria(ViewCriteria)

Parameters:
vc - the criteria to be applied
bAppend - pass true if the view criteria needs to be appended to the applied list otherwise the list is cleared out.

setApplyViewCriteriaName

void setApplyViewCriteriaName(java.lang.String name)
Apply the view criteria name passed as the argument. The applied criteria name list will first be cleared out and then the view criteria passed as argument is applied. If null is passed as the argument there will be no applied view criteria.

Parameters:
name - the criteria to be applied.

setApplyViewCriteriaName

void setApplyViewCriteriaName(java.lang.String name,
                              boolean bAppend)
Apply the view crtieria name passed as the argument. If bAppend is true the passed view criteria will be applied in addition to the existing ones. If bAppend is false this method is identical to setApplyViewCriteriaName(String)

Parameters:
name - the criteria to be applied
bAppend - pass true if the view criteria needs to be appended to the applied list otherwise the list is cleared out.

setApplyViewCriteriaNames

void setApplyViewCriteriaNames(java.lang.String[] names)
Apply a set of view criteria names passed as the argument. The applied criteria name list will first be cleared out and then the view criterias passed as argument are applied.

Parameters:
names - the criterias to be applied.

getApplyViewCriterias

ViewCriteria[] getApplyViewCriterias(int criteriaMode)
Return a list of applied view criteria that have the mode passed in the argument turned on. Refer to ViewCriteria.CRITERIA_MODE_CACHE and ViewCriteria.CRITERIA_MODE_QUERY for more information. View criterias that have both modes turned on are also qualified.

Parameters:
criteriaMode - the mode to match the criteria.
Returns:
An array of matching applied view criterias.

getApplyViewCriteriaNames

java.lang.String[] getApplyViewCriteriaNames()
Returns:
An array of view criteria names that are currently in the applied state.

setCurrentUnionViewCriteriaName

void setCurrentUnionViewCriteriaName(java.lang.String vcName)

getViewCriteriaClause

java.lang.String getViewCriteriaClause(boolean forQuery)
This method is used by the framework to generate a query clause for the applied view criterias. If the argument is true the clause will be generated for a database query, if false the clause will be generated for in-memory filtering using an expression evaluator.

Parameters:
forQuery - true if the clause is needed for a database query, false for in-memory filtering.
Returns:
a clause for performing row filtering

buildViewCriteriaClauses

CriteriaClauses buildViewCriteriaClauses(ViewCriteria vc)
This method is used by the framework to generate a query clause for a particular view criteria. Used by getViewCriteriaClause(boolean)

Parameters:
vc - the view criteria whose criteria needs to be generated
Returns:
a reference to an object that store clauses for both database and in-memory filtering

criteriaChanged

void criteriaChanged(ViewCriteria vc)
The criteria manager can track changes to applied view criteria. If the structure of an applied view criteria changes or a view criteria item in an applied view criteria has a new value then this method is invoked by the framework so that the manager can initiate a fresh clause generation when required.

Parameters:
vc - the view criteria that has changed

resetCriteria

void resetCriteria(ViewCriteria vc)
Resets a view criteria to the state as defined in the View Definition.

Parameters:
vc - View Criteria to be reset

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.1.0)

E17483-02

Copyright © 1997, 2011, Oracle. All rights reserved.