Skip navigation links

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

E52932-01


oracle.jbo.server
Class RowFinder

java.lang.Object
  extended by oracle.jbo.common.NamedObjectImpl
      extended by oracle.jbo.mom.DefinitionObject
          extended by oracle.jbo.mom.PersistableDefObject
              extended by oracle.jbo.server.DefObject
                  extended by oracle.jbo.server.RowFinder

All Implemented Interfaces:
DiffMergeable, DefPersistable, PersistentDefinition, VariableManagerOwner, VariableManagerOwnerBase

public class RowFinder
extends DefObject

RowFinder is designed as a generic way to help RowSet to find matching rows by Primary Key, AltKey or ViewCriteria. There are three different kinds RowFinder, AttrValueRowFinder, ExpressionRowFinder and KeyRowFinder. KeyRowFinder will find matching rows by Key or AltKey. It is created during the time when user calls lookupRowFinder() on ViewObject and passes a Key name. The name of KeyRowFinder will be the same as the Key name, except for RowFinder using Primary Key, in which case Key name is null while RowFinder name is PRIMARY_KEY. All the KeyRowFinders are created and managed by framework. There is no xml schema for KeyRowFinder. And it is not allowed to customize or personalize KeyRowFinder. Both AttValueRowFinder and ExpressionRowFinder use ViewCriteria to find matching rows. AttrValueRowFinder assume bind variables are mapped to attribute names in the context of matching rows. While ExpressionRowFinder has the flexibility to map vairables to any transient expressions (or leave it unmapped). User can customize or personalize these two types RowFinders. Also user could have their own RowFinder with different behaviors by overridding this class. In most use cases, user needs to ask for a RowFinder by calling lookupRowFinder() on ViewObject and pass finder name. After getting a RowFinder, they need call execute() on it with correct parameters to get a RowIterator on all matching rows. For KeyRowFinder, user can pass a key as a parameter. For AttrValueRowFinder, user needs to construct an AttributeList (better be a NameValuePairs) which contains map from attribute names to values. For ExpressionRowFinder, user typically specify a Row or a NameValuePairs as the parameter.

Since:
JDeveloper 12.0

Nested Class Summary

 

Nested classes/interfaces inherited from class oracle.jbo.mom.PersistableDefObject
PersistableDefObject.CustomizationType, PersistableDefObject.PersonalizationType

 

Field Summary
static java.lang.String PRIMARY_KEY
           

 

Fields inherited from class oracle.jbo.mom.PersistableDefObject
mEditedProperties, mEditedPropertyExprs

 

Fields inherited from class oracle.jbo.mom.DefinitionObject
DEF_MDS_CLIENT_KEY, DEF_SCOPE_ALL, DEF_SCOPE_PERS, DEF_SCOPE_SESSION, DEF_SCOPE_SHARED, DEF_SCOPE_SITE, mBaseDefObject, mExtendedDefObjects, mObjectResolved, PERSDEF_MDS_CLIENT_KEY, PROPERTY_EXPRMAP

 

Fields inherited from class oracle.jbo.common.NamedObjectImpl
mFullName, mObjName, mParent, mProperties, RES_ID_SUFFIX

 

Fields inherited from interface oracle.jbo.mom.xml.DefPersistable
XML_STATEMENT

 

Constructor Summary
protected RowFinder()
           
protected RowFinder(NamedObjectImpl parent)
           
protected RowFinder(NamedObjectImpl parent, java.lang.String name, boolean useKey)
           
protected RowFinder(java.lang.String name, NamedObjectImpl parent, int fetchLimit, boolean errorOnLimit, java.lang.String vcName, boolean mapVarsToAttrs, java.util.LinkedHashMap<java.lang.String,java.lang.String> varItemMap)
          Deprecated.  
protected RowFinder(java.lang.String name, NamedObjectImpl parent, int fetchLimit, boolean errorOnLimit, java.lang.String vcName, boolean mapVarsToAttrs, RowFinderParameters params, boolean payloadHintHide)
          This constructor is intended to be used by either customization of existing View Object definitions or while creating new View Object definitions during runtime.

 

Method Summary
 boolean areAllVariablesMappedToAttributes()
          For internal framework use only.
 RowIterator execute(AttributeList nameValuePairs, RowSet rs)
          This method execute a RowFinder on a RowSet with name value pairs provided by user.
 java.util.Collection<java.lang.String> getAttributeNames()
          Returns a Collection of attribute names expected by Key RowFinder or AttrValueRowFinder.
 int getDefTypeId()
           
 java.lang.String getFileName()
           
 java.lang.Class getMessageBundleClass()
           
 java.util.Collection<AttributeDef> getParameters(boolean substituteWithAttrDefsInMappedVariables)
          Deprecated.  
 ResourceBundleDef getResourceBundleDef()
           
 java.util.ArrayList<BoundParameter> getRowFinderParameterList(boolean includeUnmappedVar)
          Get a list of parameters for this RowFinder.
 boolean isEditable()
           
 boolean isPayloadHintHide()
           
 boolean isPayloadHintHide(LocaleContext locale)
           
protected  void loadRowFinderParameters(DefElement xmlElement, boolean attrFinder)
           
protected  void loadXMLContents(DefElement xmlElement)
           
protected  java.lang.Object resolvePropertyRaw(java.lang.String property, LocaleContext locale)
           
protected  void setDefForComponent(ComponentObjectImpl comp)
           
protected  void setParent(NamedObjectImpl parent)
          Sets this object's parent.
protected  void unsetDefForComponent(ComponentObjectImpl comp)
           

 

Methods inherited from class oracle.jbo.server.DefObject
applyDiffChildren, diffChildren, ensureVariableManager, finishedLoading, getAdfmConfigStartupProperty, getAllProperties, getBaseDefObject, getBooleanAdfmConfigProperty, getDefXMLNameSpace, getVariableManager, getVarMgrParents, hasVariables, isDeprecated, loadProperties, loadVariables, resolveReferences, setBaseDefObject, setBaseDefObject, setName, writeChildren

 

Methods inherited from class oracle.jbo.mom.PersistableDefObject
addDefImport, addExtendedDefObject, adjustPropertyMapForWrite, allocatePropertyMap, allocatePropertyMapForEdits, applyDiffContents, checkEditable, checkStructWithOld, close, createFromXML, deregisterSessionObject, diffContents, diffObjects, ensureDifferDetails, findDefImport, getBaseDir, getBasePackage, getDefImports, getDefManager, getDefWriter, getDefXMLElementTag, getEditedPropertiesMap, getEditedPropertyExpressionsMap, getEditedPropertyMap, getEditObject, getEditVersionsAsString, getExtendedDefObjectsInternal, getFullDirName, getFullFileName, getMajorVersion, getMinorVersion, getOrigObject, getPropertyMap, getSessionSyncLock, getSubstitutedNames, getSyncLock, getXMLElementTag, guaranteePath, hasExtendedDefObjects, isCustomizationEnabled, isCustomizationEnabled, isDirty, isFromTip, isLoadBase, isMajorVersionChanged, isMinorVersionChanged, isNew, isPersonalizationEnabled, isPersonalizationEnabled, isPropertyExpression, loadDefImports, loadXMLContents, lockDefinitionContext, mergeChanges, mergePropertyMap, objectRemoved, reapplyChanges, registerClass, registerDefObject, registerSessionDefObject, registerSiteDefObject, remove, removeAndDelete, removeDefImport, removeExtendedDefObject, removeProperty, saveXMLContents, setCustomizationEnabled, setCustomizationEnabled, setDefaultBaseDir, setDefMgr, setDirty, setEditable, setEditableFlag, setEditableObject, setFullName, setFullNameInternal, setLoadBase, setMajorVersionChanged, setNew, setOrigObject, setPersonalizationEnabled, setPersonalizationEnabled, setProperty, setPropertyExpression, setPropertyMap, setupDefWriterFromMO, staticUpdateChildrenList, unlockDefinitionContext, updateChildrenList, verifyVersion, verifyVersionNullCheck, writeContents, writeObject, writeVersion, writeXMLContents

 

Methods inherited from class oracle.jbo.mom.DefinitionObject
addPropertySetName, enableUpdateCheck, getAllExtendedDefObjects, getContainerDef, getContainerName, getDefinitionState, getDefScope, getExtendedDefObjects, getMdsKey, getMdsReference, getPropertySetName, getPropertySetNames, isBaseDefFor, isDynamicDefinitionObject, isObjectResolved, isSubtypeOf, isSuppressUpdateCheck, loadCustomProperties, loadPropertiesInMap, loadPropertySetNames, loadSchemaProperties, setDefScope, setMdsKey, setMdsReference, setObjectResolved, setPropertySetName, suppressUpdateCheck

 

Methods inherited from class oracle.jbo.common.NamedObjectImpl
getFullName, getName, getParent, getProperties, getPropertiesAsStrings, getPropertiesMap, getProperty, getProperty, getPropertyExpressionsMap, getRawPropertyValue, getResourcesFromBundle, getStringFromMessageBundle, refreshProperty, removeProperty, requiresNamePrefixedResId, resolveObjectProperty, setPropertiesMap, setPropertiesMap2, setProperty

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Methods inherited from interface oracle.jbo.VariableManagerOwner
getName

 

Methods inherited from interface oracle.jbo.mom.xml.DefPersistable
getFullName

 

Methods inherited from interface oracle.jbo.mom.DiffMergeable
getFullName, getName

 

Field Detail

PRIMARY_KEY

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

Constructor Detail

RowFinder

protected RowFinder()

RowFinder

protected RowFinder(NamedObjectImpl parent)

RowFinder

protected RowFinder(NamedObjectImpl parent,
                    java.lang.String name,
                    boolean useKey)

RowFinder

protected RowFinder(java.lang.String name,
                    NamedObjectImpl parent,
                    int fetchLimit,
                    boolean errorOnLimit,
                    java.lang.String vcName,
                    boolean mapVarsToAttrs,
                    java.util.LinkedHashMap<java.lang.String,java.lang.String> varItemMap)
Deprecated. 
This constructor is intended to be used by either customization of existing View Object definitions or while creating new View Object definitions during runtime. The changes need to be published to Meta Data repository to take effect. This constructor is only to create RowFinder using ViewCriteria to find mathcing rows. All Key RowFinders are created during runtime and do not allow to be customized.
Parameters:
name - the name of the RowFinder.
parent - the parent of the RowFinder, it could be ViewDefImpl, ViewObjectImpl or PDefViewObject.
fetchLimit - the maximum match rows the RowFinder will return.
errorOnLimit - if throw an error when more than fetchLimit rows found by the RowFinder.
vcName - the name of ViewCriteria used by this RowFinder.
mapVarsToAttrs - if all the bind variables mapped to attributes on ViewObject.
varItemMap - the name mapping between variables and attributes or expressions. Mapping from variables to attributes if mapVarsToAttrs is true, otherwise mapping from variables to transient expressions.

RowFinder

protected RowFinder(java.lang.String name,
                    NamedObjectImpl parent,
                    int fetchLimit,
                    boolean errorOnLimit,
                    java.lang.String vcName,
                    boolean mapVarsToAttrs,
                    RowFinderParameters params,
                    boolean payloadHintHide)
This constructor is intended to be used by either customization of existing View Object definitions or while creating new View Object definitions during runtime. The changes need to be published to Meta Data repository to take effect. This constructor is only to create RowFinder using ViewCriteria to find mathcing rows. All Key RowFinders are created during runtime and do not allow to be customized.
Parameters:
name - the name of the RowFinder.
parent - the parent of the RowFinder, it could be ViewDefImpl, ViewObjectImpl or PDefViewObject.
fetchLimit - the maximum match rows the RowFinder will return.
errorOnLimit - if throw an error when more than fetchLimit rows found by the RowFinder.
vcName - the name of ViewCriteria used by this RowFinder.
mapVarsToAttrs - if all the bind variables mapped to attributes on ViewObject.
params - the name mapping between variables and attributes or expressions. Mapping from variables to attributes if mapVarsToAttrs is true, otherwise mapping from variables to transient expressions. It aslo contains other information such as if variable is required and properties on it.
payloadHint - if this RowFinder is hide from the service payload.
See Also:
RowFinderParameters

Method Detail

isEditable

public boolean isEditable()
Overrides:
isEditable in class PersistableDefObject

getFileName

public java.lang.String getFileName()
Overrides:
getFileName in class PersistableDefObject

setParent

protected void setParent(NamedObjectImpl parent)
Description copied from class: DefObject
Sets this object's parent.
Overrides:
setParent in class DefObject
Parameters:
parent - the named object that is to be the parent of this object.

areAllVariablesMappedToAttributes

public boolean areAllVariablesMappedToAttributes()
For internal framework use only.
For internal use only. Application developers should not use this

getAttributeNames

public java.util.Collection<java.lang.String> getAttributeNames()
Returns a Collection of attribute names expected by Key RowFinder or AttrValueRowFinder. Returns null for ExpressionRowFinder. Application should not modify the returned collection. It should be read only.
For internal use only. Application developers should not use this

loadXMLContents

protected void loadXMLContents(DefElement xmlElement)

loadRowFinderParameters

protected void loadRowFinderParameters(DefElement xmlElement,
                                       boolean attrFinder)

execute

public RowIterator execute(AttributeList nameValuePairs,
                           RowSet rs)
This method execute a RowFinder on a RowSet with name value pairs provided by user. It returns a RowIterator on matching rows. If more than FetchLimit rows found and ErrorOnExceedingLimit is specified to be true, then an RowFinderLimitExceededException will be thrown.
Parameters:
nameValuePairs - The AttributeList contains name value pairs user provided for bind variables. Mostly it will be Key, Row, or NameValuePairs.
rs - the RowSet this RowFinder executes on, typcially it could be ViewObjectImpl or ViewRowSetImpl
Returns:
A RowIterator for matching rows.

getDefTypeId

public int getDefTypeId()
Specified by:
getDefTypeId in class DefObject

setDefForComponent

protected void setDefForComponent(ComponentObjectImpl comp)
Specified by:
setDefForComponent in class DefObject

unsetDefForComponent

protected void unsetDefForComponent(ComponentObjectImpl comp)
Specified by:
unsetDefForComponent in class DefObject

getMessageBundleClass

public java.lang.Class getMessageBundleClass()

getResourceBundleDef

public ResourceBundleDef getResourceBundleDef()

isPayloadHintHide

public boolean isPayloadHintHide()

isPayloadHintHide

public boolean isPayloadHintHide(LocaleContext locale)

getParameters

public java.util.Collection<AttributeDef> getParameters(boolean substituteWithAttrDefsInMappedVariables)
Deprecated. 
Return the list of variables in the Finder. This API can only be invoked when the RowFinder is obtained from a view object instance.
Parameters:
substituteWithAttrDefsInMappedVariables - If this flag is true include the attribute definition instead of the variable.
Returns:
the list of parameters in the finder
For internal use only. Application developers should not use this

getRowFinderParameterList

public java.util.ArrayList<BoundParameter> getRowFinderParameterList(boolean includeUnmappedVar)
Get a list of parameters for this RowFinder. Caller should not modify the returned list. This API can only be invoked when the RowFinder is obtained from a view object instance.
Parameters:
includeUnmappedVar - if true, return list will contain all unmapped variable from underlying view criteria as well as variables in where clause.

resolvePropertyRaw

protected java.lang.Object resolvePropertyRaw(java.lang.String property,
                                              LocaleContext locale)
Overrides:
resolvePropertyRaw in class DefObject

Skip navigation links

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

E52932-01


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