Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.6.0)

E10653-07

oracle.jbo.common
Class BaseViewCriteriaManagerImpl

java.lang.Object
  extended by oracle.jbo.common.BaseViewCriteriaManagerImpl
All Implemented Interfaces:
ViewCriteriaManager

public abstract class BaseViewCriteriaManagerImpl
extends java.lang.Object
implements ViewCriteriaManager

This class provides implementation for most of the ViewCriteriaManager interface for a View Object.


Field Summary
static ViewCriteria[] EMPTY_VC_LIST
           
 
Fields inherited from interface oracle.jbo.ViewCriteriaManager
DFLT_VIEW_CRITERIA_NAME, IMPLICIT_VIEW_CRITERIA_NAME, QUICKSEARCH_VIEW_CRITERIA_NAME
 
Constructor Summary
BaseViewCriteriaManagerImpl(ViewCriteriaManagerOwner owner)
          Creates an view criteria manager for the view criteria held by the owner.
 
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.
abstract  CriteriaClauses buildViewCriteriaClauses(ViewCriteria criteria)
          This method is used by the framework to generate a query clause for a particular view criteria.
 void clearClausesCache()
           
 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.
protected  void ensureCriteriaResolved(ViewCriteria criteria)
           
protected  void ensureStorage()
          Creates a default storage for view crtieria.
 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.util.ArrayList<ViewCriteria> getApplyAllViewCriterias(int criteriaMode)
           
 java.lang.String[] getApplyJoinedViewCriteriaNames()
           
 ViewCriteria[] getApplyJoinedViewCriterias(int criteriaMode)
          Return a list view criteria that are applied in filtering a declarative view object with entity joins
 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
 java.util.ArrayList getJoinedViewCriteriaList()
           
 ViewCriteriaManagerOwner getOwner()
           
 java.util.List<ViewCriteria> getUnionViewCriterias(int criteriaMode)
           
 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.
 ViewCriteria getViewLinkReqdVC()
           
 ViewCriteria getViewObjectReqdVC()
          Deprecated. use getViewObjectRequiredViewCriteria()
 ViewCriteria getViewObjectRequiredViewCriteria()
           
protected  void initViewCriteriaManager()
          Subclasses can instantiate the contents of the manager lazily.
 boolean isResolvedInternal()
          Deprecated. Internal use only.
 boolean isViewCriteriaApplied(ViewCriteria vc)
          A convenience API to check if a view criteria is in the applied view criteria list
 boolean isViewCriteriaNameApplied(java.lang.String name)
          A convenience API to check if a name is in the applied view criteria list
 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.
protected  void resetClauses(ViewCriteria vc)
           
abstract  void resetCriteria(ViewCriteria criteria)
          Resets a view criteria to the state as defined in the View Definition.
 void setApplyJoinedViewCriteriaNames(java.lang.String[] names)
          A list of view criteria that are applied in filtering a declarative view object with entity joins
 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 name)
           
protected  void setSqlGen()
          Sets this manager into a declarative sql mode if the view object is in declarative sql mode.
 void setViewLinkReqdVC(ViewCriteria vc)
          Set a give view criteria as a required view criteria when a view link is traversed in a declarative view object.
 void setViewObjectReqdVC(ViewCriteria vc)
          Deprecated. use setViewObjectRequiredViewCriteria()
 void setViewObjectRequiredViewCriteria(ViewCriteria vc)
          Set a give view criteria as a required view criteria.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_VC_LIST

public static final ViewCriteria[] EMPTY_VC_LIST
Constructor Detail

BaseViewCriteriaManagerImpl

public BaseViewCriteriaManagerImpl(ViewCriteriaManagerOwner owner)
Creates an view criteria manager for the view criteria held by the owner.

Parameters:
owner - the object that has the view criteria metadata
Method Detail

getViewCriteria

public ViewCriteria getViewCriteria(java.lang.String name)
Description copied from interface: ViewCriteriaManager
Returns a reference to the view criteria with a specific name if it is found.

Specified by:
getViewCriteria in interface ViewCriteriaManager
Parameters:
name - view criteria name
Returns:
a view criteria reference or null

getViewCriteria

public ViewCriteria getViewCriteria()
Description copied from interface: ViewCriteriaManager
Returns the default view criteria of the manager. If a view criteria has the name as ViewCriteriaManager.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.

Specified by:
getViewCriteria in interface ViewCriteriaManager
Returns:
the default view criteria.

getAllViewCriterias

public ViewCriteria[] getAllViewCriterias()
Description copied from interface: ViewCriteriaManager
Returns a list of both applied and unapplied view criterias managed by this object.

Specified by:
getAllViewCriterias in interface ViewCriteriaManager
Returns:
an array of view criteria

getAllViewCriteriaNames

public java.lang.String[] getAllViewCriteriaNames()
Description copied from interface: ViewCriteriaManager
Returns a list of both applied and unapplied view criterias managed by this object.

Specified by:
getAllViewCriteriaNames in interface ViewCriteriaManager
Returns:
an array of view criteria names

getAvailableViewCriteriaNames

public java.lang.String[] getAvailableViewCriteriaNames()
Description copied from interface: ViewCriteriaManager
Returns a list of view criteria names that are unapplied and managed by this object

Specified by:
getAvailableViewCriteriaNames in interface ViewCriteriaManager
Returns:
the names of the criteria that can still be applied

resetClauses

protected void resetClauses(ViewCriteria vc)

putViewCriteria

public void putViewCriteria(java.lang.String name,
                            ViewCriteria vc)
Description copied from interface: ViewCriteriaManager
Add a view criteria to be managed by this object

Specified by:
putViewCriteria in interface ViewCriteriaManager
Parameters:
name - Name of the view criteria
vc - view criteria reference

clearViewCriterias

public void clearViewCriterias()
Description copied from interface: ViewCriteriaManager
Clear all view criteria, both applied and unapplied help by this manager

Specified by:
clearViewCriterias in interface ViewCriteriaManager

clearClausesCache

public void clearClausesCache()

removeViewCriteria

public ViewCriteria removeViewCriteria(java.lang.String name)
Description copied from interface: ViewCriteriaManager
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.

Specified by:
removeViewCriteria in interface ViewCriteriaManager
Parameters:
name - The view criteria name that needs to be removed
Returns:
reference to the removed view criteria if found.

setCurrentUnionViewCriteriaName

public void setCurrentUnionViewCriteriaName(java.lang.String name)
Specified by:
setCurrentUnionViewCriteriaName in interface ViewCriteriaManager

getUnionViewCriterias

public java.util.List<ViewCriteria> getUnionViewCriterias(int criteriaMode)

removeApplyViewCriteriaName

public boolean removeApplyViewCriteriaName(java.lang.String name)
Description copied from interface: ViewCriteriaManager
Unapplied the view criteria if it is applied. The view criteria will continue to be managed by this manager.

Specified by:
removeApplyViewCriteriaName in interface ViewCriteriaManager
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

public void applyViewCriteria(ViewCriteria vc)
Description copied from interface: ViewCriteriaManager
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.

Specified by:
applyViewCriteria in interface ViewCriteriaManager
Parameters:
vc - the criteria to be applied.

applyViewCriteria

public void applyViewCriteria(ViewCriteria vc,
                              boolean bAppend)
Description copied from interface: ViewCriteriaManager
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 ViewCriteriaManager.applyViewCriteria(ViewCriteria)

Specified by:
applyViewCriteria in interface ViewCriteriaManager
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

public void setApplyViewCriteriaName(java.lang.String name)
Description copied from interface: ViewCriteriaManager
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.

Specified by:
setApplyViewCriteriaName in interface ViewCriteriaManager
Parameters:
name - the criteria to be applied.

setApplyViewCriteriaName

public void setApplyViewCriteriaName(java.lang.String name,
                                     boolean bAppend)
Description copied from interface: ViewCriteriaManager
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 ViewCriteriaManager.setApplyViewCriteriaName(String)

Specified by:
setApplyViewCriteriaName in interface ViewCriteriaManager
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

public void setApplyViewCriteriaNames(java.lang.String[] names)
Description copied from interface: ViewCriteriaManager
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.

Specified by:
setApplyViewCriteriaNames in interface ViewCriteriaManager
Parameters:
names - the criterias to be applied.

getApplyViewCriterias

public ViewCriteria[] getApplyViewCriterias(int criteriaMode)
Description copied from interface: ViewCriteriaManager
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.

Specified by:
getApplyViewCriterias in interface ViewCriteriaManager
Parameters:
criteriaMode - the mode to match the criteria.
Returns:
An array of matching applied view criterias.

getApplyViewCriteriaNames

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

getViewCriteriaClause

public java.lang.String getViewCriteriaClause(boolean forQuery)
Description copied from interface: ViewCriteriaManager
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.

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

ensureCriteriaResolved

protected void ensureCriteriaResolved(ViewCriteria criteria)

buildViewCriteriaClauses

public abstract CriteriaClauses buildViewCriteriaClauses(ViewCriteria criteria)
Description copied from interface: ViewCriteriaManager
This method is used by the framework to generate a query clause for a particular view criteria. Used by ViewCriteriaManager.getViewCriteriaClause(boolean)

Specified by:
buildViewCriteriaClauses in interface ViewCriteriaManager
Parameters:
criteria - 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

resetCriteria

public abstract void resetCriteria(ViewCriteria criteria)
Description copied from interface: ViewCriteriaManager
Resets a view criteria to the state as defined in the View Definition.

Specified by:
resetCriteria in interface ViewCriteriaManager
Parameters:
criteria - View Criteria to be reset

criteriaChanged

public void criteriaChanged(ViewCriteria vc)
Description copied from interface: ViewCriteriaManager
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.

Specified by:
criteriaChanged in interface ViewCriteriaManager
Parameters:
vc - the view criteria that has changed

getOwner

public ViewCriteriaManagerOwner getOwner()
Returns:
owner of the view criteria manager

isViewCriteriaNameApplied

public boolean isViewCriteriaNameApplied(java.lang.String name)
A convenience API to check if a name is in the applied view criteria list

Parameters:
name - name of the view criteria to check
Returns:
true if applied, false otherwise

isViewCriteriaApplied

public boolean isViewCriteriaApplied(ViewCriteria vc)
A convenience API to check if a view criteria is in the applied view criteria list

Parameters:
vc - view criteria to check
Returns:
true if applied, false otherwise

getApplyJoinedViewCriteriaNames

public java.lang.String[] getApplyJoinedViewCriteriaNames()
Returns:
a list of view criteria that are applied in filtering a declarative view object with entity joins

setApplyJoinedViewCriteriaNames

public void setApplyJoinedViewCriteriaNames(java.lang.String[] names)
A list of view criteria that are applied in filtering a declarative view object with entity joins


getJoinedViewCriteriaList

public java.util.ArrayList getJoinedViewCriteriaList()
Returns:
a list of view criteria that are used in filtering a declarative view object with entity joins

setViewObjectRequiredViewCriteria

public void setViewObjectRequiredViewCriteria(ViewCriteria vc)
Set a give view criteria as a required view criteria. This criteria cannot be unapplied and remains applied until this method invoked with a null argument.

Parameters:
vc - required view criteria

setViewLinkReqdVC

public void setViewLinkReqdVC(ViewCriteria vc)
Set a give view criteria as a required view criteria when a view link is traversed in a declarative view object. This criteria cannot be unapplied and remains applied until this method invoked with a null argument.

Parameters:
vc - required view criteria

getViewObjectRequiredViewCriteria

public ViewCriteria getViewObjectRequiredViewCriteria()
Returns:
the required view criteria. See setViewObjectRequiredViewCriteria(oracle.jbo.ViewCriteria)

getViewLinkReqdVC

public ViewCriteria getViewLinkReqdVC()
Returns:
the view link required view criteria for declarative view object. See setViewLinkReqdVC(oracle.jbo.ViewCriteria)

getApplyJoinedViewCriterias

public ViewCriteria[] getApplyJoinedViewCriterias(int criteriaMode)
Return a list view criteria that are applied in filtering a declarative view object with entity joins

Parameters:
criteriaMode - the join view criteria with a matching mode are returned
Returns:
an array of view criteria

getApplyAllViewCriterias

public java.util.ArrayList<ViewCriteria> getApplyAllViewCriterias(int criteriaMode)
Returns:
a list of applied view criteria that are mode bit set to the argument passed in.

initViewCriteriaManager

protected void initViewCriteriaManager()
Subclasses can instantiate the contents of the manager lazily. If overridden the method must track the previous init operation and skip


ensureStorage

protected void ensureStorage()
Creates a default storage for view crtieria.


setSqlGen

protected void setSqlGen()
Sets this manager into a declarative sql mode if the view object is in declarative sql mode.


getViewObjectReqdVC

public ViewCriteria getViewObjectReqdVC()
Deprecated. use getViewObjectRequiredViewCriteria()

This method is now deprecated. One should use getViewObjectRequiredViewCriteria() instead.


setViewObjectReqdVC

public void setViewObjectReqdVC(ViewCriteria vc)
Deprecated. use setViewObjectRequiredViewCriteria()

This method is now deprecated. One should use setViewObjectRequiredViewCriteria() instead.


isResolvedInternal

@Deprecated
public boolean isResolvedInternal()
Deprecated. Internal use only.

See Also:
initViewCriteriaManager()
For internal use only. Application developers should not use this
Called by Kava to check whether this VCM has been init'ed.

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.6.0)

E10653-07

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