public class ViewCriteria extends java.util.Vector implements NavigatableRowIterator, ViewCriteriaComponent, Properties, VariableManagerOwner
 The following example of a user-defined function, demoCriteria
 uses several methods in the ViewCriteria and
 ViewCriteriaRow classes to create and populate
 criteria rows and to demonstrate "query-by-example."  The
 printViewObject is a helper function that executes the
 View Object query and prints the results to the screen.
 
    public static void demoCriteria(ApplicationModule appMod)
    {
       // Create and populate criteria rows to support query-by-example.
       ViewObject empView = appMod.createViewObject("Emp", "mypackage1.EmpView");
       ViewCriteria vc = empView.createViewCriteria();
       ViewCriteriaRow vcRow = vc.createViewCriteriaRow();
       // ViewCriteriaRow attribute name is case-sensitive.
       // ViewCriteriaRow attribute value requires operator and value.
       // Note also single-quotes around string value.
       ViewCriteriaItem jobItem = vcRow.ensureCriteriaItem("Job");
       jobItem.setOperator("=");
       jobItem.getValues().get(0).setValue("MANAGER");
       vc.add(vcRow);
       vcRow = vc.createViewCriteriaRow();
       ViewCriteriaItem salItem = vcRow.ensureCriteriaItem("Sal");
       salItem.setOperator(">");
       salItem.getValues().get(0).setValue(new Integer(2500));
       vc.add(vcRow);
       empView.applyViewCriteria(vc);
       // Multiple rows are OR-ed in WHERE clause.
       System.out.println("Demo View Criteria");
       // Should print employees that are MANAGER or have Sal > 2500
       QueryDemo.printViewObject(empView);
    }
    public static void printViewObject(ViewObject vo)
    {
       // Execute the query, print results to the screen.
       vo.executeQuery();
       // Print the View Object's query
       System.out.println("Query: " + vo.getQuery());
       while (vo.hasNext())
       {
          Row row = vo.next();
          String rowDataStr = "";
          // How many attributes (columns) is the View Object using?
          int numAttrs = vo.getAttributeCount();
          // Column numbers start with 0, not 1.
          for (int columnNo = 0; columnNo < numAttrs; columnNo++)
          {
             // See also Row.getAttribute(String name).
             Object attrData = row.getAttribute(columnNo);
             rowDataStr += (attrData + "\t");
          }
          System.out.println(rowDataStr);
       }
    }
 
 
 In the above code example, note that the View Object's
 ViewObject.applyViewCriteria(oracle.jbo.ViewCriteria)
| Modifier and Type | Class and Description | 
|---|---|
| class  | ViewCriteria.NestedViewCriteriaRow | 
| Modifier and Type | Field and Description | 
|---|---|
| static int | API_BASED_REQUIREDFor internal framework use only. | 
| static java.lang.String | BASE_QUERY_ALIAS_BASE | 
| static java.lang.String | CLONED_VARIABLE | 
| static int | CRITERIA_MODE_CACHECRITERIA_MODE_...constants are used to specify
 View Criteria mode. | 
| static int | CRITERIA_MODE_QUERYCRITERIA_MODE_...constants are used to specify
 View Criteria mode. | 
| static int | DEF_BASED_REQUIREDFor internal framework use only. | 
| static java.lang.String | FILTER_ENABLED | 
| static java.lang.String | FIND_MODE | 
| static java.lang.String | FIND_MODE_ITERATOR | 
| protected java.util.ArrayList | listeners | 
| protected java.util.Hashtable | mProperties | 
| protected ViewCriteria | mSavedState | 
| protected VariableValueManager | mVariableManager | 
| static java.lang.String | NESTED_QUERY_ALIAS_BASE | 
| static int | NOT_REQUIREDFor internal framework use only. | 
| static java.lang.String | NULL_VALUE | 
| static java.lang.String | RELATIVE_NAME | 
| static java.lang.String | ROOT_VC_NAME | 
| static java.lang.String | TEMP_VARIABLE | 
| static int | VC_USAGE_BASED_REQUIREDFor internal framework use only. | 
ITER_MODE_LAST_PAGE_FULL, ITER_MODE_LAST_PAGE_PARTIAL, SLOT_BEFORE_FIRST, SLOT_BEYOND_LAST, SLOT_DELETED, SLOT_VALIDVC_CONJ_AND, VC_CONJ_NOT, VC_CONJ_OR, VC_CONJ_UNION, VC_UPPER_COL_DEFAULT, VC_UPPER_COL_FALSE, VC_UPPER_COL_TRUE| Constructor and Description | 
|---|
| ViewCriteria(StructureDef structureDef)Creates an empty view criteria object. | 
| ViewCriteria(ViewCriteria parent,
            java.lang.String structDefFullName)Creates a nested view criteria object | 
| ViewCriteria(ViewCriteria parent,
            StructureDef structureDef)Creates a nested view criteria object | 
| ViewCriteria(ViewObject viewObject)Creates an empty view criteria object. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | activate(XMLElement node)For internal use only. | 
| void | add(int index,
   java.lang.Object element) | 
| boolean | add(java.lang.Object o) | 
| boolean | addAll(java.util.Collection c) | 
| boolean | addAll(int index,
      java.util.Collection c) | 
| void | addElement(java.lang.Object obj) | 
| void | addListener(java.lang.Object target)For internal use only. | 
| void | addRow(ViewCriteriaRow newRow)For internal use only. | 
| static java.lang.String | addTableAliasSuffix(java.lang.String origAlias,
                   java.lang.String suffix)For internal use only. | 
| boolean | clausesCacheDisabled() | 
| protected void | cleanUpClonedBindVariables()For internal use only. | 
| void | clear() | 
| protected java.util.HashMap<java.lang.String,java.lang.Object> | convertArrayToMap(java.lang.Object[] valuesArr) | 
| protected java.lang.Object[] | convertMapToArray(java.util.HashMap<java.lang.String,java.lang.Object> varsMap) | 
| static VariableValueManager | convertVarMapToVarMgr(java.util.Map varMap)Deprecated.   | 
| void | copyFrom(ViewCriteria vc)For internal use only. | 
| Row | createAndInitRow(AttributeList nvp)For internal use only. | 
| ViewCriteria | createCriteria() | 
| Key | createKey(AttributeList nvp)For internal use only. | 
| ViewCriteriaRow | createNestedCriteriaRow(java.lang.String name,
                       ViewCriteria criteria)Deprecated.   | 
| Row | createRow()For internal use only. | 
| ViewCriteriaRow | createSimpleRow(java.lang.String name)Deprecated.   | 
| ViewCriteriaRow | createViewCriteriaRow()Creates a new ViewCriteriaRow for this ViewCriteria. | 
| ViewCriteriaUsage | createViewCriteriaUsage()Creates a View Criteria reference to an existing view criteria | 
| void | criteriaChanged()When a filter value changes in the view criteria it is marked dirty
 and the criteria manager is notified so that the view criteria is marked
 for a fresh clause generation in the next cycle. | 
| VariableValueManager | ensureVariableManager()Returns this object's Variable Value Manager. | 
| java.util.Enumeration | enumerateRowsInRange()For internal use only. | 
| RowIterator | findByAltKey(java.lang.String keyName,
            Key key,
            int maxNumOfRows,
            boolean skipWhere)For internal use only. | 
| Row[] | findByEntity(int eRowHandle,
            int maxNumOfRows)For internal use only. | 
| Row[] | findByKey(Key key,
         int maxNumOfRows)For internal use only. | 
| RowIterator | findByViewCriteria(ViewCriteria criteria,
                  int maxNumOfRows,
                  int queryMode)For internal use only. | 
| java.lang.Object | findElementByName(java.lang.String elemName) | 
| java.lang.Object | findElementWithRelativeName(java.lang.String compName)Find a view criteria element given a full path. | 
| ViewCriteriaItem | findViewCriteriaItem(java.lang.String compName)Deprecated. 
 use  findElementWithRelativeName(String)instead | 
| Row | first()For internal use only. | 
| boolean | get1013CompatibilityMode()With the 10.1.3 compatibility flag set to true,
 SQL fragment is allowed in the value argument in calls
 to ViewCriteriaRow.setAttribute() method. | 
| java.util.Collection<Variable> | getAllBindVariables() | 
| void | getAllBindVariables(java.util.HashMap<java.lang.String,Variable> map) | 
| Row[] | getAllRowsInRange()For internal use only. | 
| int | getAttributeIndexOf(java.lang.String name)For internal use only. | 
| CriteriaClauses | getClauses()For internal use only. | 
| int | getConjunction()Conjunction of a view criteria is used when nested view criteria are converted
 into where clauses. | 
| VariableValueManager | getContextualVariableManager()For internal use only. | 
| java.lang.String | getCriteriaAlias(ViewCriteria vc)For internal use only. | 
| int | getCriteriaMode()Gets the current View Criteria mode. | 
| Row | getCurrentRow()For internal use only. | 
| int | getCurrentRowIndex()For internal use only. | 
| int | getCurrentRowSlot()For internal use only. | 
| java.lang.String | getDisplayName(LocaleContext locale)Deprecated. 
 Use  getProperty(String, LocaleContext)instead. For the property name
 argument passViewCriteriaHints.CRITERIA_DISPLAY_NAME. | 
| protected java.util.Hashtable | getElementProperties(XMLElement propertiesNode)For internal use only. | 
| java.lang.Object | getExtendedDataForVarName(java.lang.String varName)For internal use only. | 
| int | getExtendedDataOffset()For internal use only. | 
| int | getFetchedRowCount()For internal use only. | 
| int | getIterMode()For internal use only
 Gets the iteration mode. | 
| boolean | getKeepExtendedDataOffset()For internal use only. | 
| protected java.util.ArrayList | getListenersList()For internal use only. | 
| java.util.Hashtable | getLocalAndResourceProperties()For internal use only. | 
| protected LocaleContext | getLocale() | 
| java.lang.String | getLocaleName(LocaleContext locale,
             java.lang.String sName)For internal use only. | 
| java.lang.Class | getMessageBundleClass() | 
| java.lang.String | getName()Returns the name of this Variable Manager Owner. | 
| java.util.HashMap<java.lang.String,ViewCriteria> | getNestedViewCriteria(java.util.HashMap<java.lang.String,ViewCriteria> criteriaMap)For internal use only. | 
| ViewCriteria | getParentViewCriteria() | 
| java.util.Hashtable | getProperties()Gets the table of properties. | 
| java.util.Hashtable | getProperties(LocaleContext context) | 
| java.lang.Object | getProperty(java.lang.String property)Retrieves the specified property, if it exists. | 
| java.lang.Object | getProperty(java.lang.String property,
           LocaleContext locale) | 
| int | getRangeIndexOf(Row row)For internal use only. | 
| int | getRangeSize()For internal use only. | 
| int | getRangeStart()For internal use only. | 
| int | getRequiredInternal()Deprecated.   | 
| ResourceBundleDef | getResourceBundleDef() | 
| protected void | getResourcesFromBundle(LocaleContext locale,
                      java.util.HashMap map)Get all resources from the resource bundle. | 
| java.lang.String | getRootCriteriaRelativeName() | 
| ViewCriteria | getRootViewCriteria() | 
| Row | getRow(Key key)For internal use only. | 
| Row | getRowAtRangeIndex(int index)For internal use only. | 
| int | getRowCount()For internal use only. | 
| int | getRowCountInRange()For internal use only. | 
| java.util.List | getRows()For internal use only. | 
| java.util.HashMap<java.lang.String,java.lang.Object> | getSavedVariables()For internal use only. | 
| StructureDef | getStructureDef() | 
| java.lang.String | getStructureDefFullName() | 
| int | getUpperColumnsValue()For internal use only. | 
| java.lang.String[] | getUsedAttributeNames()For internal use only. | 
| AttributeDef[] | getUsedViewAttributes()For internal use only. | 
| VariableValueManager | getVariableManager()Returns this object's current Variable Value Manager. | 
| ViewCriteriaManager | getViewCriteriaManager() | 
| ViewObject | getViewObject()Gets the View Object that owns the view criteria. | 
| ViewObject | getViewObject(boolean getVoIfNested)For internal use only. | 
| protected VariableManager | getVoVariableManager()For internal use only. | 
| boolean | hasData()For internal use only. | 
| boolean | hasNext()For internal use only. | 
| boolean | hasPrevious()For internal use only. | 
| boolean | hasTransientAttrs() | 
| boolean | hasVariables()For internal use only. | 
| void | initializeFiltering(boolean filterEnabled)For internal framework use only. | 
| void | initName(java.lang.String name)For internal use only. | 
| void | insertElementAt(java.lang.Object obj,
               int index) | 
| void | insertRow(Row row)For internal use only. | 
| void | insertRowAtRangeIndex(int index,
                     Row row)For internal use only. | 
| boolean | isAppliedIfJoinSatisfied()For internal use only. | 
| boolean | isCriteriaForQuery()Returns a flag indicating whether the View Criteria is to be included
 in database query. | 
| boolean | isCriteriaForRowMatch()Returns a flag indicating whether the View Criteria is to be used for
 in-memory row filtering. | 
| boolean | isDirty() | 
| boolean | isFilterEnabled()For internal framework use only. | 
| boolean | isItemHolder()For internal use only. | 
| boolean | isRangeAtBottom()For internal use only. | 
| boolean | isRangeAtTop()For internal use only. | 
| boolean | isRequired() | 
| boolean | isRowValidation()For internal use only. | 
| boolean | isSubQueryAliasEnabled()For internal use only. | 
| static boolean | isTemporaryVariable(Variable var)For internal use only. | 
| boolean | isTemporaryVariableBelongs(Variable var)For internal use only. | 
| static boolean | isTemporaryVariableOfKind(Variable var,
                         java.lang.String kind) | 
| boolean | isUpperColumns()Upper column setting on a view criteria controls the default behavior
 of matching with case for all string type filter values used in the criteria items. | 
| boolean | isUseAttributeFormatHint()Deprecated.   | 
| boolean | isUseBindVarsOnly()When a view criteria is set to bind vars only mode, the literal
 values are converted into temporary bind variables so that database
 and jdbc layers can use statement caching even when the literal
 values change. | 
| static boolean | isViewCriteriaTypeVariable(Variable var)For internal use only. | 
| Row | last()For internal use only. | 
| void | loadVOBindVariables(java.util.HashMap<java.lang.String,Variable> bindVarMap)For internal use only. | 
| void | mergeFrom(ViewCriteria vc)For internal use only. | 
| Row | next()For internal use only. | 
| void | passivate(XMLDocument doc,
         XMLElement node)For internal use only. | 
| protected void | passivateElementProperties(XMLDocument doc,
                          XMLElement parentNode,
                          java.util.Hashtable props)For internal use only. | 
| Row | previous()For internal use only. | 
| void | putCriteriaAlias(ViewCriteria vc,
                java.lang.String vcAlias)For internal use only. | 
| java.lang.String | putDefaultCriteriaAlias(ViewCriteria vc,
                       boolean isNested)For internal use only. | 
| java.lang.Object | refreshProperty(java.lang.String hintName)For internal use only. | 
| java.lang.Object | remove(int index) | 
| boolean | remove(java.lang.Object o) | 
| boolean | removeAll(java.util.Collection c) | 
| void | removeAllElements() | 
| void | removeCurrentRow()For internal use only. | 
| Row | removeCurrentRowAndRetain()For internal use only. | 
| void | removeCurrentRowFromCollection()For internal use only. | 
| boolean | removeElement(java.lang.Object obj) | 
| void | removeElementAt(int index) | 
| void | removeListener(java.lang.Object target)For internal use only. | 
| void | removeProperty(java.lang.String hintName)Remove a property from the hash table maintained in the view criteria. | 
| protected void | removeRange(int fromIndex,
           int toIndex) | 
| boolean | removeRow(ViewCriteriaRow row)For internal use only. | 
| void | reset()For internal use only. | 
| void | resetCriteria()Restore the View Criteria to the latest saved state. | 
| void | resolve(ViewCriteriaResolver resolver)For internal use only. | 
| boolean | retainAll(java.util.Collection c) | 
| void | saveState()Save the current state of the View Criteria which will be
 used to restore when resetCriteria is called. | 
| int | scrollRange(int amount)For internal use only. | 
| int | scrollRangeTo(Row row,
             int index)For internal use only. | 
| int | scrollToRangePage(int pageIndex)For internal use only. | 
| java.lang.Object | set(int index,
   java.lang.Object element) | 
| void | set1013CompatibilityMode(boolean mode)With the 10.1.3 compatibility flag set to true,
 SQL fragment is allowed in the value argument in calls 
 to ViewCriteriaRow.setAttribute() method. | 
| void | setAppliedIfJoinSatisfied(boolean bApplied)For internal use only. | 
| void | setClauses(CriteriaClauses clauses)For internal use only. | 
| void | setConjunction(int conj)Conjunction of a view criteria is used when nested view criteria are converted
 into where clauses. | 
| void | setConjunctionOnChildren(int conjunction)For internal use only. | 
| void | setCriteriaForQuery(boolean b)Deprecated. 
 Since JDeveloper 10.1.3. Use setCriteriaMode(int) instead | 
| void | setCriteriaMode(int mode)Sets the criteria mode which controls the manner in which the
 View Criteria will be used. | 
| boolean | setCurrentRow(Row row)For internal use only. | 
| boolean | setCurrentRowAtRangeIndex(int index)For internal use only. | 
| void | setDirty(boolean isDirty)For internal use only. | 
| void | setElementAt(java.lang.Object obj,
            int index) | 
| void | setExtendedDataForVarName(java.lang.String varName,
                         java.lang.Object extendedData)For internal use only. | 
| void | setExtendedDataOffset(int offset,
                     boolean bSkipIfAlreadySet)For internal use only. | 
| void | setIterMode(int mode)For internal use only. | 
| void | setKeepExtendedDataOffset(boolean keepExtendedDataOffset)For internal use only. | 
| void | setName(java.lang.String name)Assign a name to the View Criteria instance. | 
| void | setParent(java.lang.Object parent)Change the owner of the view criteria. | 
| void | setProperties(java.util.Hashtable properties)Override all the properties currently defined on this view criteria. | 
| void | setProperty(java.lang.String hintName,
           java.lang.Object hintValue)Set a property on view criteria. | 
| int | setRangeSize(int size)For internal use only. | 
| int | setRangeStart(int start)For internal use only. | 
| void | setRequired(boolean required)Mark a view criteria as required. | 
| void | setRequiredInternal(int required)Deprecated.   | 
| void | setRowValidation(boolean flag)For internal use only. | 
| void | setSavedValuesInVariableMgr()For internal use only. | 
| void | setSavedVariables(java.util.HashMap<java.lang.String,java.lang.Object> savedVariablesMap)For internal use only. | 
| void | setStructureDefFullName(java.lang.String defName)For internal use only. | 
| void | setSubQueryAliasEnabled(boolean bEnabled)For internal use only. | 
| void | setUpperColumns(boolean b)Upper column setting on a view criteria controls the default behavior
 of matching with case for all string type filter values used in the criteria items. | 
| void | setUseAttributeFormatHint(boolean flag)Deprecated.   | 
| void | setUseBindVarsForLiterals(boolean useBindVarsOnly)Enables or Disables the usage of bind variables for literal values in view criteria. | 
| void | setVariableManager(VariableValueManager variableManager)For internal use only. | 
| void | setViewCriteriaManager(ViewCriteriaManager manager)For internal use only. | 
| void | setViewObject(ViewObject vo)For internal use only. | 
| java.lang.String | toString() | 
| void | trimNoDataRows()For internal use only. | 
| void | useBindVarsOnly()When a view criteria is set to bind vars only mode, the literal
 values are converted into temporary bind variables so that database
 and jdbc layers can use statement caching even when the literal
 values change. | 
| void | validate()Deprecated.   | 
| void | validate(java.util.HashMap whereParams)Deprecated. 
 since 12.1.1.0. Use  validate(VariableValueManager)instead | 
| void | validate(VariableValueManager vMgr)Performs view criteria item required and selectively required validation. | 
capacity, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, setSize, size, subList, toArray, toArray, trimToSizeprotected transient java.util.Hashtable mProperties
protected transient ViewCriteria mSavedState
protected transient VariableValueManager mVariableManager
public static final int NOT_REQUIRED
public static final int DEF_BASED_REQUIRED
public static final int VC_USAGE_BASED_REQUIRED
public static final int API_BASED_REQUIRED
public static int CRITERIA_MODE_QUERY
CRITERIA_MODE_... constants are used to specify
 View Criteria mode.  CRITERIA_MODE_QUERY means that
 the View Criteria will be used to augment the database query's
 where-clause.
 
 These constants may be OR'ed together.  For example,
 (CRITERIA_MODE_QUERY | CRITERIA_MODE_CACHE) specifies that
 the View Criteria will be used for the database query, as well as the
 RowMatch (in-memory row filtering).
public static int CRITERIA_MODE_CACHE
CRITERIA_MODE_... constants are used to specify
 View Criteria mode.  CRITERIA_MODE_CACHE means that
 the View Criteria will be used to produce a RowMatch,
 which is used for in-memory row filtering.
 
 These constants may be OR'ed together.  For example,
 (CRITERIA_MODE_QUERY | CRITERIA_MODE_CACHE) specifies that
 the View Criteria will be used for the database query, as well as the
 RowMatch (in-memory row filtering).
public static final java.lang.String TEMP_VARIABLE
public static final java.lang.String ROOT_VC_NAME
public static final java.lang.String CLONED_VARIABLE
public static final java.lang.String FIND_MODE
public static final java.lang.String FIND_MODE_ITERATOR
public static final java.lang.String FILTER_ENABLED
public static final java.lang.String NULL_VALUE
public static final java.lang.String BASE_QUERY_ALIAS_BASE
public static final java.lang.String NESTED_QUERY_ALIAS_BASE
public static final java.lang.String RELATIVE_NAME
protected java.util.ArrayList listeners
public ViewCriteria(ViewObject viewObject)
viewObject - the owner of this ViewCriteria.public ViewCriteria(StructureDef structureDef)
structureDef - the owner of this ViewCriteria.public ViewCriteria(ViewCriteria parent, StructureDef structureDef)
parent - a reference to outer view criteria ownerstructureDef - the structure defintion determines the
 searchable attributes in this view criteria. This could be different
 from the outer view criteria in the case of accessors.public ViewCriteria(ViewCriteria parent, java.lang.String structDefFullName)
parent - a reference to outer view criteria ownerstructDefFullName - the structure defintion determines the
 searchable attributes in this view criteria. This could be different
 from the outer view criteria in the case of accessors.public java.lang.String getName()
VariableManagerOwnergetName in interface VariableManagerOwnerpublic void initName(java.lang.String name)
public void setName(java.lang.String name)
name - name of the view criteriapublic void setParent(java.lang.Object parent)
parent - owner of the view criteriapublic final boolean hasData()
true if the view criteria has any data that would
 generate a where clause fragment, false otherwise.public void setViewCriteriaManager(ViewCriteriaManager manager)
manager - a ViewCriteriaManager instancepublic ViewCriteriaManager getViewCriteriaManager()
public CriteriaClauses getClauses()
public void setClauses(CriteriaClauses clauses)
public void criteriaChanged()
public boolean isDirty()
true if any structural changes are made to the view criteria.
 It could be addition or removal of new view criteria items, rows. It could be
 also be changes to the filter values held in view criteria items. This method
 is also used to determine if this instance has transformed since it was
 read from an XML defintion. If this method returns true then
 it is passivated when the view object is triggered for passivation for high
 availability scenarios.public void setDirty(boolean isDirty)
isDirty - true if the view criteria has changed since it
 was read from an XML definition. A view criteria that is created in-memory
 is considered always dirty.public boolean isCriteriaForQuery()
 If true, when the View Criteria is translated into a
 row qualification clause, it will use the name of the database column
 to which the attribute is mapped.
 
true)public boolean isCriteriaForRowMatch()
 If the View Criteria is being used for in memory row filtering,
 it should be used in conjunction with RowQualifier.  See
 ViewObjectImpl.setRowQualifier(oracle.jbo.server.RowQualifier)
public void setCriteriaForQuery(boolean b)
 If true, when the View Criteria is translated into a
 row qualification clause, it will use the name of the database column
 to which the attribute is mapped.  If false, the attribute
 name is used as is.
 
 If the View Criteria is being used for in memory row filtering,
 it should be used in conjunction with RowQualifier.  See
 ViewObjectImpl.setRowQualifier(oracle.jbo.server.RowQualifier)
b - the flag indicating whether the View Criteria is for database query
           (true) or for in memory row filtering (false).public int getCriteriaMode()
 See CRITERIA_MODE_QUERY and CRITERIA_MODE_CACHE
 for a description of supported modes.
 
The returning mode may be a combination (through bit-wise OR) multiple criteria modes.
public void setCriteriaMode(int mode)
 See CRITERIA_MODE_QUERY and CRITERIA_MODE_CACHE
 for a description of supported modes.
 
 The criteria mode constants may be OR'ed together.
 For example, if this method is called with
 (CRITERIA_MODE_QUERY | CRITERIA_MODE_CACHE), the View
 Criteria will be used for the database query, as well as the
 RowMatch (in-memory row filtering).
 
mode - the new criteria mode.public void setAppliedIfJoinSatisfied(boolean bApplied)
bApplied - flag to indicate if the view criteria needs
 to be applied when join is activatedpublic boolean isAppliedIfJoinSatisfied()
true if the view criteria needs
 to be applied when join is activatedpublic void setRequiredInternal(int required)
public int getRequiredInternal()
public void setRequired(boolean required)
required - flag to indicate that a view criteria is requiredpublic boolean isRequired()
true if the view criteria
 is a required view criteriapublic void setViewObject(ViewObject vo)
vo - the owner of the view criteriapublic void resolve(ViewCriteriaResolver resolver)
resolver - used to locate the structure defpublic StructureDef getStructureDef()
public java.lang.String getStructureDefFullName()
public void setStructureDefFullName(java.lang.String defName)
defName - the fully qualified name of the structure definition this criteria is based onpublic ViewObject getViewObject()
ViewObject that owns this ViewCriteria.public ViewObject getViewObject(boolean getVoIfNested)
getVoIfNested argument is true, and if this view criteria
 is a view criteria for a compound VC item,
 this method will return the View Object of the view criteria that
 contains this nested VC or compound VC item.getVoIfNested - true if the VO of the owning VC should be
        retrieved if this VC is a nested VC or an item holder for
        a VC item. If false, this method returns the owning view
        object, which could be null for nested VC or item holder.public ViewCriteria getParentViewCriteria()
null value
 is returned.public ViewCriteria getRootViewCriteria()
null.public java.lang.String getRootCriteriaRelativeName()
public ViewCriteriaItem findViewCriteriaItem(java.lang.String compName)
findElementWithRelativeName(String) insteadcompName - The fully qualified name of the view criteria itemViewCriteriaItem if found, null
 otherwise.public java.lang.Object findElementWithRelativeName(java.lang.String compName)
getRootCriteriaRelativeName()
 to obtain the path and use it later to find the elementcompName - The full path to the element relative to the root view criteriapublic boolean isItemHolder()
true if this view criteria is an item holder for a compound
         view criteria item, false otherwise.public int getAttributeIndexOf(java.lang.String name)
name - the attribute name.public java.lang.String[] getUsedAttributeNames()
public AttributeDef[] getUsedViewAttributes()
public ViewCriteriaRow createViewCriteriaRow()
ViewCriteriaRow, an array for WHERE clause criteria.ViewCriteriaRowpublic ViewCriteriaUsage createViewCriteriaUsage()
ViewCriteriaUsaga instance that contains the
         the information needed to resolve the view criteriaViewCriteriaUsagepublic int getConjunction()
getConjunction in interface ViewCriteriaComponentpublic void setConjunction(int conj)
setConjunction in interface ViewCriteriaComponentconj - public boolean isUpperColumns()
isUpperColumns in interface ViewCriteriaComponentpublic void setUpperColumns(boolean b)
setUpperColumns in interface ViewCriteriaComponentb - set the ignore case property of this view criteriapublic int getUpperColumnsValue()
getUpperColumnsValue in interface ViewCriteriaComponentpublic void useBindVarsOnly()
public void setUseBindVarsForLiterals(boolean useBindVarsOnly)
useBindVarsOnly - if true enables bind variable usage, disables otherwisepublic boolean isUseBindVarsOnly()
true if the view criteria is set to bind vars only modepublic void initializeFiltering(boolean filterEnabled)
public boolean isFilterEnabled()
public void set1013CompatibilityMode(boolean mode)
mode - true to allow SQL fragment in value argument of 
        ViewCriteriaRow.setAttribute(), false to unset.public boolean get1013CompatibilityMode()
true if the view criteria should allow
 10.1.3 style of usagepublic void loadVOBindVariables(java.util.HashMap<java.lang.String,Variable> bindVarMap)
bindVarMap - the hashmap that will contain bind variable name
 and reference to the required bind variablespublic java.util.Collection<Variable> getAllBindVariables()
public void getAllBindVariables(java.util.HashMap<java.lang.String,Variable> map)
map - the hashmap that will contain bind variable name
 and reference to the bind variablespublic Row next()
next in interface RowIteratornull if there is no next row.public Row previous()
previous in interface RowIteratornull if there is no previous row.public Row first()
first in interface RowIteratornull if the row set is empty.public Row last()
last in interface RowIteratornull if the row set is empty.public void reset()
 A subsequent invocation of next() will cause the first
 row to become the current row.
reset in interface RowIteratorpublic boolean hasNext()
hasNext in interface RowIteratortrue if there is next row.public boolean hasPrevious()
hasPrevious in interface RowIteratortrue if there is previous row.public int getFetchedRowCount()
getFetchedRowCount in interface RowIteratorpublic int getRowCount()
getRowCount in interface RowIteratorpublic Row getRowAtRangeIndex(int index)
getRowAtRangeIndex in interface RowIteratorindex - an integer in the range 0 to getRangeSize() - 1.null if the index is out of range.public Row getCurrentRow()
getCurrentRow in interface RowIteratorpublic int getCurrentRowIndex()
getCurrentRowIndex in interface RowIteratorpublic int getCurrentRowSlot()
getCurrentRowSlot in interface RowIteratorSLOT_.
         See SLOT_ constants in RowIterator.public boolean setCurrentRow(Row row)
setCurrentRow in interface RowIteratorrow - the new current row.true if the operation succeeded.public Row createAndInitRow(AttributeList nvp)
createViewCriteriaRow() API.
 Creates a new Row object, but does not insert it into the row set.
 For ViewCriteria, this method works just like
 createRow().
 createAndInitRow in interface RowIteratornvp - not used.public Row createRow()
createViewCriteriaRow() API.
 
 Creates a new Row object, but does not insert it into the row set.
 createRow in interface RowIteratorpublic void insertRow(Row row)
add(Object) API.
 Adds a row to the row set, before the current row.
 This method sets the current row to the row just inserted.
 With respect to eventing, this method call will generate
 two events (of oracle.jbo.RowSetListener):  rowInserted,
 followed by navigated.
 insertRow in interface RowIteratorrow - the Row object to be added.public void removeCurrentRow()
removeElementAt(int) API.
 
 Removes the current Row object from the row set.removeCurrentRow in interface RowIteratorpublic void removeCurrentRowFromCollection()
removeElementAt(int) API.
 Removes the current Row object from the row set.removeCurrentRowFromCollection in interface RowIteratorpublic Row removeCurrentRowAndRetain()
removeElementAt(int) API.
 Removes the current Row object from the row set.removeCurrentRowAndRetain in interface RowIteratorpublic int setRangeSize(int size)
This method is a no-op for ViewCriteria. For a ViweCriteria, the range size is always -1.
setRangeSize in interface RowIteratorsize - this parameter is not used.-1, which means that the range contains all rows.RowIterator.setRangeStart(int)public int getRangeSize()
getRangeSize in interface RowIterator-1, which means that the range contains all rows.public int getRangeStart()
The absolute index is 0-based, and is the row's index relative to the entire result set.
getRangeStart in interface RowIteratorpublic int setRangeStart(int start)
Note that the index is 0-based. When you call setRangeStart(1), the range start will be positioned at the second table row.
Another behavior of setRangeStart (and also setRangeSize) is that it tries to position the range, so as to fill up the range as much as possible. For example, assume you have View Object vo focused on a table with four rows (A, B, C, D), and you execute the following code:
     vo.setRangeStart(4);
     vo.setRangeSize(3);
     Row[] rows = vo.getAllRowsInRange();
 
 In this case, rows contains the last 3 rows (B, C, D). When you call setRangeStart(4), it will try to position you at row 4. Since the index is 0-based, it finds that there is no row. Since the default range size is 1, it will position you to the last row (row index 3).
Then, when you call getRangeSize(3), it tries to fill up the range from the bottom. This is why you get (B, C, D).
setRangeStart in interface RowIteratorstart - the absolute index of the new first row in the row set range.public int scrollRange(int amount)
scrollRange in interface RowIteratoramount - the number of rows to scroll.
                A negative value scrolls upward.public int scrollToRangePage(int pageIndex)
public int scrollRangeTo(Row row, int index)
scrollRangeTo in interface RowIteratorrow - the row.index - the row's new index.public boolean setCurrentRowAtRangeIndex(int index)
setCurrentRowAtRangeIndex in interface RowIteratorindex - the index of the new current row.true if the operation succeeded.public void insertRowAtRangeIndex(int index,
                         Row row)
insertElementAt(Object, int) API.
 Adds a row to the row set at the given index.  The index is
 relative to the range, i.e., index of 0 would mean to insert
 before the first row of the range.  Allowed values for index
 is 0 to range size.  If index equals range size, the row
 is inserted right after the last row in the range.  This method call does not
 alter the current position of the iterator, nor does it affect the range
 position.
 insertRowAtRangeIndex in interface RowIteratorindex - the point where row is to be added.row - the Row object to be added.public int getRangeIndexOf(Row row)
getRangeIndexOf in interface RowIteratorrow - a Row object.
            or -1 if the row is not in range.row (0 based).public int getRowCountInRange()
getRowCountInRange in interface RowIteratorpublic boolean isRangeAtBottom()
isRangeAtBottom in interface RowIteratortrue if the last row of the range is
         the last row of the result set.public boolean isRangeAtTop()
isRangeAtTop in interface RowIteratortrue if the first row of the range is
         the first row of the result set.public java.util.Enumeration enumerateRowsInRange()
Enumeration interface for the row set.
 enumerateRowsInRange in interface RowIteratorEnumeration interface.public Row[] getAllRowsInRange()
getAllRowsInRange in interface RowIteratorpublic Row getRow(Key key)
 This operation is not supported by ViewCriteria.  Calling this method
 will throw InvalidOperException.
 
getRow in interface RowIteratorkey - a key.InvalidOperException - is thrown.  ViewCriteria
               does not support this operation.public Row[] findByKey(Key key, int maxNumOfRows)
 This operation is not supported by ViewCriteria.  Calling this method
 will throw InvalidOperException.
 
findByKey in interface RowIteratorkey - the key to match.maxNumOfRows - the maximum size of the array to return,
                     or -1 to return all rows.InvalidOperException - is thrown.  ViewCriteria
               does not support this operation.public RowIterator findByAltKey(java.lang.String keyName, Key key, int maxNumOfRows, boolean skipWhere)
 This operation is not supported by ViewCriteria.  Calling this method
 will throw InvalidOperException.
 
findByAltKey in interface RowIteratorkey - the key to match.maxNumOfRows - the maximum size of the array to return,
                     or -1 to return all rows.skipWhere - A flag that controls whether, when a db query is issued
                  to get the matching row(s), the view object's current
                  where-clause is to be included in the query or not.keyName - the name of the alternate key.  If null
                        the primary key is specified, i.e., this function call
                        becomes equivalent to findByKey with
                        skipWhere = false.InvalidOperException - is thrown.  ViewCriteria
               does not support this operation.public RowIterator findByViewCriteria(ViewCriteria criteria, int maxNumOfRows, int queryMode)
InvalidOperException.
 findByViewCriteria in interface RowIteratorcriteria - the View Criteria to be used to qualify View rows.maxNumOfRows - the maximum size of the array to return,
                        or -1 to return all rows.  If a value
                        other than -1 is specified and if the
                        specified number of rows is reached, the method
                        returns without performing any further operation.queryMode - the mode in which qualify View rows are scanned.
                        See above for further info.InvalidOperException - is thrown.  ViewCriteria
               does not support this operation.public Key createKey(AttributeList nvp)
 This operation is not supported by ViewCriteria.  Calling this method
 will throw InvalidOperException.
 
createKey in interface RowIteratornvp - the name value pair array.InvalidOperException - is thrown.  ViewCriteria
               does not support this operation.public Row[] findByEntity(int eRowHandle, int maxNumOfRows)
eRowHandle.
 
 This operation is not supported by ViewCriteria.  Calling this method
 will throw InvalidOperException.
 
findByEntity in interface RowIteratoreRowHandle - the entity row handle.maxNumOfRows - the maximum size of the row array to return,
                     or -1 to return all rows.InvalidOperException - is thrown.  ViewCriteria
               does not support this operation.public void setRowValidation(boolean flag)
 This operation is not supported by ViewCriteria.  Calling this method
 will throw InvalidOperException.
 
setRowValidation in interface RowIteratorflag - whether to turn row validation off or not.InvalidOperException - is thrown.  ViewCriteria
               does not support this operation.public boolean isRowValidation()
isRowValidation in interface RowIteratorpublic int getIterMode()
As ViewCriteria always works with full range (range size -1), iteration mode is meaningless.
getIterMode in interface RowIteratorRowIterator.ITER_MODE_LAST_PAGE_FULL.public void setIterMode(int mode)
This method is a no-op for ViewCriteria. For a ViweCriteria, the range size is always -1, and thus iteration mode is meaningless.
setIterMode in interface RowIteratormode - this parameter is not used.protected java.util.ArrayList getListenersList()
public void addListener(java.lang.Object target)
RowSetListener.
 addListener in interface NavigatableRowIteratortarget - the listener to add.public void removeListener(java.lang.Object target)
RowSetListener.removeListener in interface NavigatableRowIteratortarget - the listener to remove.public void trimNoDataRows()
public void setUseAttributeFormatHint(boolean flag)
flag - controls the 904 behaviorpublic boolean isUseAttributeFormatHint()
public void copyFrom(ViewCriteria vc)
vc - the view criteria that needs to be copiedpublic void mergeFrom(ViewCriteria vc)
vc - A view criteria definition that has a specific overrides that
 need to be appliedpublic java.lang.Object findElementByName(java.lang.String elemName)
public ViewCriteria createCriteria()
add(Object) needs
 to be invoked to make the returned instance a nested view criteriapublic void saveState()
public void resetCriteria()
saveState()public void activate(XMLElement node)
node - The XMLElement parent nodeprotected java.util.Hashtable getElementProperties(XMLElement propertiesNode)
propertiesNode - the node that contains the propertiespublic void passivate(XMLDocument doc, XMLElement node)
node - the XML node that represents the owner of the view criteriaprotected void passivateElementProperties(XMLDocument doc, XMLElement parentNode, java.util.Hashtable props)
doc - xml documentparentNode - the properties elementprops - hash table containing the view criteria propertiespublic java.util.List getRows()
public void addRow(ViewCriteriaRow newRow)
add(Object) API
 Adds a row to the view criteria structure. Unwraps the nested
 view criteria that are wrapped in a row interface before insert.newRow - a new row that is added to the structurepublic boolean removeRow(ViewCriteriaRow row)
remove(Object) API
 Removes a row from the view criteria structure.row - to be removed from the structuretrue if the passed row is found and removed from
 the structurepublic ViewCriteriaRow createSimpleRow(java.lang.String name)
name - of the view criteria row that is returnedpublic ViewCriteriaRow createNestedCriteriaRow(java.lang.String name, ViewCriteria criteria)
name - ignoredcriteria - the nested view criteria instancepublic void validate()
public void validate(java.util.HashMap whereParams)
validate(VariableValueManager) insteadwhereParams - A Map of public void validate(VariableValueManager vMgr)
public java.lang.String toString()
toString in class java.util.Vectorpublic static boolean isTemporaryVariable(Variable var)
var - The variable to be checkedpublic static boolean isTemporaryVariableOfKind(Variable var, java.lang.String kind)
public static boolean isViewCriteriaTypeVariable(Variable var)
var - The variable to be checkedpublic static java.lang.String addTableAliasSuffix(java.lang.String origAlias,
                                   java.lang.String suffix)
origAlias - the original alias for the tables if they were not part
 of the subquerysuffix - representing how deep the table is nested in the sub-querypublic boolean isTemporaryVariableBelongs(Variable var)
var - The variable to be checkedpublic java.util.HashMap<java.lang.String,ViewCriteria> getNestedViewCriteria(java.util.HashMap<java.lang.String,ViewCriteria> criteriaMap)
public boolean hasVariables()
getAllBindVariables() API.hasVariables in interface VariableManagerOwnerBasepublic VariableValueManager getVariableManager()
VariableManagerOwnerBasenull if Variable Value Manager has
 been initialized.
 When a framework object is first created, its Variable Value Manager may be null. This method does not initialize (create) the Variable Value Manager.
 VariableManagerOwnerBase.ensureVariableManager()
getVariableManager in interface VariableManagerOwnerBasepublic void setVariableManager(VariableValueManager variableManager)
variableManager - view criteria is assigned a variable manager
 by the view object to set and get variable values.public VariableValueManager ensureVariableManager()
VariableManagerOwnerBaseensureVariableManager in interface VariableManagerOwnerBasepublic java.lang.Class getMessageBundleClass()
getMessageBundleClass in interface VariableManagerOwnerBasepublic ResourceBundleDef getResourceBundleDef()
getResourceBundleDef in interface VariableManagerOwnerBasepublic void setSavedVariables(java.util.HashMap<java.lang.String,java.lang.Object> savedVariablesMap)
savedVariablesMap - stores the variable name value pairs that
 the user customizes for this view criteria. If the values are not changed
 subsequently they are pushed into the variable manager prior to query executepublic java.util.HashMap<java.lang.String,java.lang.Object> getSavedVariables()
public void setSavedValuesInVariableMgr()
public void add(int index,
       java.lang.Object element)
add in interface java.util.Listadd in class java.util.Vectorpublic boolean add(java.lang.Object o)
add in interface java.util.Collectionadd in interface java.util.Listadd in class java.util.Vectorpublic boolean addAll(java.util.Collection c)
addAll in interface java.util.CollectionaddAll in interface java.util.ListaddAll in class java.util.Vectorpublic boolean addAll(int index,
             java.util.Collection c)
addAll in interface java.util.ListaddAll in class java.util.Vectorpublic void addElement(java.lang.Object obj)
addElement in class java.util.Vectorpublic void clear()
clear in interface java.util.Collectionclear in interface java.util.Listclear in class java.util.Vectorpublic void insertElementAt(java.lang.Object obj,
                   int index)
insertElementAt in class java.util.Vectorpublic java.lang.Object remove(int index)
remove in interface java.util.Listremove in class java.util.Vectorpublic boolean remove(java.lang.Object o)
remove in interface java.util.Collectionremove in interface java.util.Listremove in class java.util.Vectorpublic boolean removeAll(java.util.Collection c)
removeAll in interface java.util.CollectionremoveAll in interface java.util.ListremoveAll in class java.util.Vectorpublic void removeAllElements()
removeAllElements in class java.util.Vectorpublic boolean removeElement(java.lang.Object obj)
removeElement in class java.util.Vectorpublic void removeElementAt(int index)
removeElementAt in class java.util.Vectorprotected void removeRange(int fromIndex,
               int toIndex)
removeRange in class java.util.Vectorpublic boolean retainAll(java.util.Collection c)
retainAll in interface java.util.CollectionretainAll in interface java.util.ListretainAll in class java.util.Vectorpublic java.lang.Object set(int index,
                   java.lang.Object element)
set in interface java.util.Listset in class java.util.Vectorpublic void setElementAt(java.lang.Object obj,
                int index)
setElementAt in class java.util.Vectorpublic java.lang.String getLocaleName(LocaleContext locale, java.lang.String sName)
locale - the locale context for the current thread of executionsName - the name of the property that needs to be resolvedprotected void getResourcesFromBundle(LocaleContext locale, java.util.HashMap map)
locale - locale of the resources to be retrieved.map - the retrieved resources will be added to the map.public java.lang.Object getProperty(java.lang.String property,
                           LocaleContext locale)
getProperty in interface Propertiesproperty - the name of the propertylocale - the locale context for the current thread of executionpublic java.lang.Object getProperty(java.lang.String property)
PropertiesgetProperty in interface Propertiesproperty - the name of the propertypublic java.lang.Object refreshProperty(java.lang.String hintName)
refreshProperty in interface PropertieshintName - the property that needs to be re-resolved from the message bundlepublic java.util.Hashtable getLocalAndResourceProperties()
public java.util.Hashtable getProperties()
PropertiesgetProperties in interface PropertiesgetProperties(LocaleContext) because it will
 return a value by looking up the message bundle and for a given localepublic java.util.Hashtable getProperties(LocaleContext context)
context - the locale context for the current thread of executionpublic void setProperty(java.lang.String hintName,
               java.lang.Object hintValue)
hintName - name of the propertyhintValue - value of the property. If the property needs to be
 passivated and activated the value needs to be converted to a String by
 the caller.public void removeProperty(java.lang.String hintName)
hintName - the name of the propertypublic void setProperties(java.util.Hashtable properties)
properties - the view criteria will store a reference to the
 hash table passed in the argument and use it for all property lookups.public final java.lang.String getDisplayName(LocaleContext locale)
getProperty(String, LocaleContext) instead. For the property name
 argument pass ViewCriteriaHints.CRITERIA_DISPLAY_NAME.locale - protected VariableManager getVoVariableManager()
public java.lang.String getCriteriaAlias(ViewCriteria vc)
public void putCriteriaAlias(ViewCriteria vc, java.lang.String vcAlias)
public java.lang.String putDefaultCriteriaAlias(ViewCriteria vc, boolean isNested)
public void setSubQueryAliasEnabled(boolean bEnabled)
public boolean isSubQueryAliasEnabled()
protected java.lang.Object[] convertMapToArray(java.util.HashMap<java.lang.String,java.lang.Object> varsMap)
protected java.util.HashMap<java.lang.String,java.lang.Object> convertArrayToMap(java.lang.Object[] valuesArr)
public void setExtendedDataForVarName(java.lang.String varName,
                             java.lang.Object extendedData)
public java.lang.Object getExtendedDataForVarName(java.lang.String varName)
public void setExtendedDataOffset(int offset,
                         boolean bSkipIfAlreadySet)
public boolean getKeepExtendedDataOffset()
public void setKeepExtendedDataOffset(boolean keepExtendedDataOffset)
public int getExtendedDataOffset()
public boolean clausesCacheDisabled()
public void setConjunctionOnChildren(int conjunction)
conjunction - The conjunction that the child objects should be using.protected LocaleContext getLocale()
public VariableValueManager getContextualVariableManager()
public static VariableValueManager convertVarMapToVarMgr(java.util.Map varMap)
protected void cleanUpClonedBindVariables()
public boolean hasTransientAttrs()