public abstract class BaseViewCriteriaManagerImpl extends java.lang.Object implements ViewCriteriaManager
Modifier and Type | Field and Description |
---|---|
static ViewCriteria[] |
EMPTY_VC_LIST |
static int |
VC_TYPE_ALL
For internal framework use only
|
static int |
VC_TYPE_APPLIED
For internal framework use only
|
static int |
VC_TYPE_REQUIRED
For internal framework use only
|
DFLT_VIEW_CRITERIA_NAME, IMPLICIT_VIEW_CRITERIA_NAME, QUICKSEARCH_VIEW_CRITERIA_NAME
Constructor and Description |
---|
BaseViewCriteriaManagerImpl(ViewCriteriaManagerOwner owner)
Creates an view criteria manager for the view criteria held by
the owner.
|
Modifier and Type | Method and Description |
---|---|
void |
applyCriteriaNamesChanged(java.lang.String[] oldApplyNames,
java.lang.String[] newApplyNames,
boolean forJoin) |
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() |
java.lang.String[] |
getApplyViewCriteriaNames(boolean includeRequiredVC) |
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.
|
protected ViewCriteria |
getViewCriteriaInternal(java.lang.String name)
For internal framework use only.
|
java.util.List<ViewCriteria> |
getViewCriterias(int vcType)
For internal framework use only.
|
protected java.util.Map<java.lang.String,ViewCriteria> |
getViewCriteriasInternal()
For internal framework use only.
|
ViewCriteria |
getViewLinkReqdVC() |
ViewCriteria |
getViewObjectReqdVC()
Deprecated.
use getViewObjectRequiredViewCriteria()
|
ViewCriteria |
getViewObjectRequiredViewCriteria() |
protected void |
initJoinViewCriteria() |
protected void |
initRequiredViewCriteria() |
protected void |
initViewCriteria(java.lang.String vcName) |
protected void |
initViewCriteriaManager()
Subclasses can instantiate the contents of the manager lazily.
|
boolean |
isPartiallyResolvedInternal()
Deprecated.
Internal use only.
|
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 |
setPartiallyResolvedInternal() |
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.
|
void |
setViewObjectRequiredViewCriteria(ViewCriteria vc)
Deprecated.
|
public static final ViewCriteria[] EMPTY_VC_LIST
@Concealed public static final int VC_TYPE_ALL
@Concealed public static final int VC_TYPE_APPLIED
@Concealed public static final int VC_TYPE_REQUIRED
public BaseViewCriteriaManagerImpl(ViewCriteriaManagerOwner owner)
owner
- the object that has the view criteria metadatapublic ViewCriteria getViewCriteria(java.lang.String name)
ViewCriteriaManager
getViewCriteria
in interface ViewCriteriaManager
name
- view criteria namepublic ViewCriteria getViewCriteria()
ViewCriteriaManager
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.getViewCriteria
in interface ViewCriteriaManager
public ViewCriteria[] getAllViewCriterias()
ViewCriteriaManager
getAllViewCriterias
in interface ViewCriteriaManager
public java.lang.String[] getAllViewCriteriaNames()
ViewCriteriaManager
getAllViewCriteriaNames
in interface ViewCriteriaManager
public java.lang.String[] getAvailableViewCriteriaNames()
ViewCriteriaManager
getAvailableViewCriteriaNames
in interface ViewCriteriaManager
protected void resetClauses(ViewCriteria vc)
public void putViewCriteria(java.lang.String name, ViewCriteria vc)
ViewCriteriaManager
putViewCriteria
in interface ViewCriteriaManager
name
- Name of the view criteriavc
- view criteria referencepublic void clearViewCriterias()
ViewCriteriaManager
clearViewCriterias
in interface ViewCriteriaManager
public void clearClausesCache()
public ViewCriteria removeViewCriteria(java.lang.String name)
ViewCriteriaManager
removeApplyViewCriteriaName
API.removeViewCriteria
in interface ViewCriteriaManager
name
- The view criteria name that needs to be removedpublic void setCurrentUnionViewCriteriaName(java.lang.String name)
setCurrentUnionViewCriteriaName
in interface ViewCriteriaManager
public java.util.List<ViewCriteria> getUnionViewCriterias(int criteriaMode)
public boolean removeApplyViewCriteriaName(java.lang.String name)
ViewCriteriaManager
removeApplyViewCriteriaName
in interface ViewCriteriaManager
name
- The view criteria name that need to be unapplied.true
if the view criteria was found to be applied,
false
otherwise.public void applyViewCriteria(ViewCriteria vc)
ViewCriteriaManager
applyViewCriteria
in interface ViewCriteriaManager
vc
- the criteria to be applied.public void applyViewCriteria(ViewCriteria vc, boolean bAppend)
ViewCriteriaManager
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)
applyViewCriteria
in interface ViewCriteriaManager
vc
- the criteria to be appliedbAppend
- pass true
if the view criteria needs to be appended to
the applied list otherwise the list is cleared out.public void setApplyViewCriteriaName(java.lang.String name)
ViewCriteriaManager
setApplyViewCriteriaName
in interface ViewCriteriaManager
name
- the criteria to be applied.public void setApplyViewCriteriaName(java.lang.String name, boolean bAppend)
ViewCriteriaManager
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)
If name
is null there will be no applied view criteria
(identical to setApplyViewCriteriaName(null)
;
bAppend
will be ignored).
setApplyViewCriteriaName
in interface ViewCriteriaManager
name
- the criteria to be appliedbAppend
- pass true
if the view criteria needs to be appended to
the applied list otherwise the list is cleared out.public void setApplyViewCriteriaNames(java.lang.String[] names)
ViewCriteriaManager
setApplyViewCriteriaNames
in interface ViewCriteriaManager
names
- the criterias to be applied.public ViewCriteria[] getApplyViewCriterias(int criteriaMode)
ViewCriteriaManager
ViewCriteria.CRITERIA_MODE_CACHE
and
ViewCriteria.CRITERIA_MODE_QUERY
for more information. View criterias
that have both modes turned on are also qualified.getApplyViewCriterias
in interface ViewCriteriaManager
criteriaMode
- the mode to match the criteria.public java.lang.String[] getApplyViewCriteriaNames()
getApplyViewCriteriaNames
in interface ViewCriteriaManager
public java.lang.String[] getApplyViewCriteriaNames(boolean includeRequiredVC)
public java.lang.String getViewCriteriaClause(boolean forQuery)
ViewCriteriaManager
getViewCriteriaClause
in interface ViewCriteriaManager
forQuery
- true
if the clause is needed for a database
query, false
for in-memory filtering.protected void ensureCriteriaResolved(ViewCriteria criteria)
public abstract CriteriaClauses buildViewCriteriaClauses(ViewCriteria criteria)
ViewCriteriaManager
ViewCriteriaManager.getViewCriteriaClause(boolean)
buildViewCriteriaClauses
in interface ViewCriteriaManager
criteria
- the view criteria whose criteria needs to be generatedpublic abstract void resetCriteria(ViewCriteria criteria)
ViewCriteriaManager
resetCriteria
in interface ViewCriteriaManager
criteria
- View Criteria to be resetpublic void criteriaChanged(ViewCriteria vc)
ViewCriteriaManager
criteriaChanged
in interface ViewCriteriaManager
vc
- the view criteria that has changedpublic void applyCriteriaNamesChanged(java.lang.String[] oldApplyNames, java.lang.String[] newApplyNames, boolean forJoin)
public ViewCriteriaManagerOwner getOwner()
public boolean isViewCriteriaNameApplied(java.lang.String name)
name
- name of the view criteria to checktrue
if applied, false
otherwisepublic boolean isViewCriteriaApplied(ViewCriteria vc)
vc
- view criteria to checktrue
if applied, false
otherwisepublic java.lang.String[] getApplyJoinedViewCriteriaNames()
public void setApplyJoinedViewCriteriaNames(java.lang.String[] names)
public java.util.ArrayList getJoinedViewCriteriaList()
public void setViewObjectRequiredViewCriteria(ViewCriteria vc)
ViewCriteria.setRequired(boolean)
vc
- required view criteriapublic void setViewLinkReqdVC(ViewCriteria vc)
vc
- required view criteriapublic ViewCriteria getViewObjectRequiredViewCriteria()
setViewObjectRequiredViewCriteria(oracle.jbo.ViewCriteria)
public ViewCriteria getViewLinkReqdVC()
setViewLinkReqdVC(oracle.jbo.ViewCriteria)
public ViewCriteria[] getApplyJoinedViewCriterias(int criteriaMode)
criteriaMode
- the join view criteria with a matching mode are returnedpublic java.util.ArrayList<ViewCriteria> getApplyAllViewCriterias(int criteriaMode)
protected void initViewCriteriaManager()
protected void initViewCriteria(java.lang.String vcName)
protected void initRequiredViewCriteria()
protected void initJoinViewCriteria()
protected void ensureStorage()
protected void setSqlGen()
public ViewCriteria getViewObjectReqdVC()
getViewObjectRequiredViewCriteria()
instead.
public void setViewObjectReqdVC(ViewCriteria vc)
ViewCriteria.setRequired(boolean)
vc.setRequired()
instead.
@Deprecated @Concealed public boolean isResolvedInternal()
initViewCriteriaManager()
@Deprecated @Concealed public boolean isPartiallyResolvedInternal()
@Concealed protected void setPartiallyResolvedInternal()
@Concealed public java.util.List<ViewCriteria> getViewCriterias(int vcType)
@Concealed protected ViewCriteria getViewCriteriaInternal(java.lang.String name)
@Concealed protected java.util.Map<java.lang.String,ViewCriteria> getViewCriteriasInternal()