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

E10653-05

oracle.jbo.server
Class ViewRowImpl

java.lang.Object
  extended by oracle.jbo.server.RowImpl
      extended by oracle.jbo.server.ViewRowImpl
All Implemented Interfaces:
AttributeList, XmlSerializable, JIReservedVarNames, ExprValueSupplier, JboReservedVarNames, Row, VariableManagerOwnerBase, XMLInterface
Direct Known Subclasses:
DCDataRow, RowIdViewObjRowImpl

public class ViewRowImpl
extends RowImpl
implements XmlSerializable, JboReservedVarNames

A View Object Row. This class provides access to a View Object Row. The View Object Row can contain one or more Entity Object Rows in addition to derived attributes such as calculated columns.

The Business Components for Java framework instantiates an object of this class for each record that is returned by the row's View Object query. This class can be referred to by middle-tier customer application logic in order to access View Object Row data.

Customers can extend this class with custom View Object Row implementations. For example, the Business Components for Java View Object wizard can be used to generate sub-classes of this class that define type-safe accessors/mutators for the attributes of a row. Custom sub-classes should be declard to the Business Components for Java framework through the View Object wizard.

Customer applications should not access this class on the client-tier of an application. Instead, the Row interface should be used for client tier access.

Since:
JDeveloper 3.0
See Also:
RowImpl, Row

Field Summary
static byte CURRENT_VERSION
           
static byte ORIGINAL_VERSION
           
static java.lang.String XML_POSTSTATE_REMOVE
           
static java.lang.String XML_POSTSTATE_TAG
           
 
Fields inherited from interface oracle.jbo.JboReservedVarNames
RESERVED_VAR_AGG_AVG, RESERVED_VAR_AGG_COUNT, RESERVED_VAR_AGG_MAX, RESERVED_VAR_AGG_MIN, RESERVED_VAR_AGG_SUM, RESERVED_VAR_AGGVAL_PREFIX, RESERVED_VAR_STRUCTURE_DEF
 
Fields inherited from interface oracle.jbo.expr.JIReservedVarNames
RESERVED_VAR_VALUE
 
Fields inherited from interface oracle.jbo.Row
EFFDT_DELETE_FUTURE_CHANGE_MODE, EFFDT_DELETE_MODE, EFFDT_DELETE_NEXT_CHANGE_MODE, EFFDT_DELETE_THIS_CHANGE_MODE, EFFDT_DELETE_ZAP_MODE, EFFDT_EXPERT_MODE, EFFDT_NONE_MODE, EFFDT_UPDATE_CHANGE_INSERT_MODE, EFFDT_UPDATE_CORRECTION, EFFDT_UPDATE_MODE, EFFDT_UPDATE_NEW_EARLIEST_CHANGE_MODE, EFFDT_UPDATE_OVERRIDE_MODE, REFRESH_CONTAINEES, REFRESH_FORGET_NEW_ROWS, REFRESH_REMOVE_NEW_ROWS, REFRESH_UNDO_CHANGES, REFRESH_WITH_DB_FORGET_CHANGES, REFRESH_WITH_DB_ONLY_IF_UNCHANGED, STATUS_INITIALIZED
 
Fields inherited from interface oracle.jbo.XMLInterface
XML_IGNORE_DEPTH_COUNT, XML_OPT_ALL_ROWS, XML_OPT_ASSOC_CONSISTENT, XML_OPT_CHANGES_ONLY, XML_OPT_LIMIT_RANGE, XML_PASSIVATION_USE
 
Constructor Summary
ViewRowImpl()
          Public constructor for this class.
 
Method Summary
protected  java.util.List _internal_dbg_debug_data()
          framework use only
protected  void appendXMLElementNodes(Document xmlDoc, Node node, int depthCount, long options, AttributeDefImpl[] attrs)
          Writes XML-element nodes for each attribute in this row and appends it to the given row-node.
protected  void appendXMLElementNodes(Document xmlDoc, Node node, int depthCount, long options, java.util.HashMap voAttrMap, AttributeDef[] attrs)
          Writes XML-element nodes for each attribute in this row and appends it to the given row-node.
protected  void checkForOuterJoins()
          Check the Entities in this View Row for Outer Joins.
protected  void clearAttributeException(int index)
          Cleans any exception of an attribute of the given name was set earlier and threw an exception which was cached as the transaction is in deferred mode.
protected  void clearAttributeException(java.lang.String name)
          Cleans any exception of an attribute of the given name was set earlier and threw an exception which was cached as the transaction is in deferred mode.
protected  void copyFrom(ViewRowImpl other)
          For subclasses to implement copy of transient members in the subclass This method is invoked when a new row is created with attributes copied from the other row for move into a new collection in makeRowCopy.
protected  void create(AttributeList nvp)
          Initialization method to be over-ridden in generated code for custom defaulting.
protected  EntityImpl[] createEntities()
          Creates blank instances of the Entity Objects that this row is composed of.
protected  ListBinding createListBinding(ListBindingDef lbDef, RowSetIterator rsi)
          Internal: Applications should not use this method.
protected  EntityImpl[] createMissingEntitiesFromViewDef(ViewDefImpl viewDef, int[] eoIndices, EntityImpl[] entities, java.sql.ResultSet resultSet, AttributeList initValues, boolean isNewRow, ApplicationModule viewAccessorAM)
           
protected  RowSet createViewAccessorRS(java.lang.String vaName)
          Internal: Applications should not use this method.
protected  RowSet createViewAccessorRS(ViewAccessorDef va)
          Internal: Applications should not use this method.
protected  ViewRowAttrHintsImpl createViewRowAttrHints(AttributeDefImpl attrDef)
          Create a map to store attribute hints for this row.
protected  oracle.adf.share.security.authorization.PrivilegeHolder doAllowsOperation(java.lang.String operationName)
           
protected  void doAutoClearAttribute(java.lang.String attrName)
           
 void entityCacheAdd()
          Populate the caches from the values of the rows.
 boolean equals(java.lang.Object other)
          Tests if the specified value is equal to this ViewRowImpl object.
protected  RowSet findAssociatedObjects(java.lang.String name)
          Finds Objects in a ViewRowSetImpl that follow the given association.
 AttributeDef findAttributeDef(java.lang.String attrName)
           
protected  java.lang.String findListBindingName(java.lang.String attrName, java.lang.String lbName)
          Internal: Applications should not use this method.
protected  RowSetIterator findListBindingRSI(java.lang.String attrName, java.lang.String lbName, java.lang.String prefCrName)
          Internal: Applications should not use this method.
protected  ViewObject findOrCreateLocalViewObject(ViewAccessorDef vaDef)
          Find or create the local view instance from the local view usage name.
 RowSet findOrCreateViewAccessorRS(java.lang.String vaName)
           
protected  RowSet findOrCreateViewAccessorRS(ViewAccessorDef va)
          Internal: Applications should not use this method.
 ViewRowSetImpl findRowSetForRow(java.lang.Object accessKey)
           
 ViewAccessorDef findViewAccessorDef(java.lang.String name)
          This method returns ViewAccessorDef with the specified name.
 ApplicationModule getApplicationModule()
          Gets the Application Module to which the containing View Object belongs.
protected  ApplicationModule getApplicationModuleForViewAccessor()
          Internal: Applications should not use this method.
 java.lang.Object getAttribute(int ix)
          Selects the attribute at the given index.
 java.lang.Object getAttribute(java.lang.String name)
          Gets the value of an attribute by name.
 int getAttributeCount()
          Gets the attribute count in this ViewRow.
 AttributeHints getAttributeHints(int attrIndex)
          Returns the AttributeHints object for the specified attribute for the row.
 AttributeHints getAttributeHints(java.lang.String attrName)
          Returns the AttributeHints object for the specified attribute for the row.
 int getAttributeIndexOf(java.lang.String attrName)
          Gets the index of the attribute, given it's name.
protected  java.lang.Object getAttributeInternal(int index)
          Gets the value of the attribute by index.
 java.lang.Object getAttributeInternal(int index, byte version)
           
 java.lang.String[] getAttributeNames()
          Returns an array of attribute names in this list.
 java.lang.Object[] getAttributeValues()
          Returns an array of attribute values in this list.
protected  java.lang.Object getAttrInvokeAccessor(int ix, AttributeDefImpl attrRef)
           
 java.util.HashMap<java.lang.String,java.util.HashMap> getCtrlHints(java.util.List<java.lang.String> attrNames, java.lang.String localeName)
           
 DBTransaction getDBTransaction()
           
 java.lang.Object getEffectiveDate()
          Obtain the Effective Date Value of this row.
 java.lang.String getElementTagName()
           
 EntityImpl[] getEntities()
          Gets an array of Entity objects.
 EntityImpl getEntity(int index)
          Gets the Entity at the given index.
 AttributeDefImpl getEntityAttrForAttribute(java.lang.String attrName)
           
 int getEntityCount()
          Counts the number of Entity Objects in this row.
 Entity getEntityForAttribute(java.lang.String attrName)
          Gets an entity object that contains the given attribute name.
protected  EntityImpl getEntityForListBinding(java.lang.String eoName)
          Method to retrieve the entity for locating entity level view accessor to be used in list binding.
 java.lang.Object getExprVarVal(java.lang.String varName)
           
 java.lang.Object getHandle()
          Creates a row identifier that is unique in the query collection.
 Key getKey()
          Returns the identifier object for this row.
 int getListBindingCount()
           
protected  RowSetIterator getListBindingRSI(ListBindingDef def)
          Internal: Applications should not use this method.
protected  java.util.List getListBindings()
          Internal: Applications should not use this method.
 java.lang.String getLookupDescription(java.lang.String attrName)
           
 byte getNewRowState()
           
protected  VariableValueManager getParentVariableManager()
           
protected  RowSetIterator getPreferredListBindingRSI(ListBindingDef def, java.lang.String prefCrName)
          Internal: Applications should not use this method.
 QueryCollection getQueryCollection(java.lang.Object accessKey)
          Gets the QueryCollection this row exists in.
 RowSet getRowSet()
          Internal: Applications should not use this method.
protected  oracle.jbo.server.ViewRowStorage getRowStorageInternal()
           
 StructureDef getStructureDef()
          Returns the structure of the row.
 ViewDefImpl getViewDef()
          Get the ViewDefImpl associated with this View Row.
 ViewDefImpl getViewLogicGroupDef()
           
 ViewObject getViewObject()
          Gets the View Object to which this row belongs.
 java.lang.String getXMLElementTag()
          Returns the XML-element tag for this row.
protected  void handleListBindingMismatch(ListBinding lb, java.util.Map valuesMap, RowIterator listRSI)
          Internal: Applications should not use this method.
protected  boolean hasAttributeException(int index)
          Returns true if an attribute at the given index was set earlier and threw an exception which was cached as the transaction is in deferred mode.
 boolean hasDeferredExceptions()
           
 boolean hasExtendedViewDef()
           
 int hashCode()
          Computes an integer hash code for this ViewRowImpl object
 boolean hasListBindings()
          Internal: Applications should not use this method.
protected  void initDefaults()
           
 boolean isAttributeChanged(java.lang.String attrName)
          Advanced method: Applications should typically not use this method. Invokes isAttributeChanged(index) after looking up the entity for an attribute with this name.
 boolean isAttributeUpdateable(int index)
          Tests if an attribute is updateable.
 boolean isDead()
          An attempt to access a dead view row will lead to a DeadViewRowAccessException.
protected  boolean isRefreshRequired(ViewAccessorDef va, java.lang.String[] attrNames, java.lang.Object[] attrValues, RowSet rs)
           
 boolean isSubclassRow()
           
protected  boolean isViewAccessorAttribute(int indexAttribute)
          Check if an attribute is the attribute to store view accessor RowSetIterator.
 void lock()
          Locks the referenced Entity Rows.
 AttributeDef lookupAttributeDef(java.lang.String attrName)
          final void setViewDef(ViewDefImpl vDef) { try { useInner(); mInner.setViewDef(vDef); } finally { releaseInner(); } }
protected  void markViewAccessorsDirty(java.lang.String[] attrNames)
           
protected  void populate(java.sql.ResultSet resultSet)
          Internal: Applications should not use this method.
protected  void populateAttribute(int index, java.lang.Object value)
          Populates the attribute at the given index with the given attribute value.
protected  void populateAttributeAsChanged(int index, java.lang.Object value)
           
protected  void readAttributeFromXMLElement(Node rowElt, AttributeDefImpl ad)
           
 void readXML(Element rowElt, int depthCount)
          Reads the content of the row and updates the attributes, from given XML document.
 void refresh(int refreshMode)
          Refreshes the row's attributes with values from database.
protected  void refreshViewAccessor(ViewAccessorDef va, java.util.Map attrNameValues, RowSet rs)
           
protected  void registerAttributeException(AttributeDef attrDef, java.lang.Object val, JboException ex)
           
 void remove()
          Deletes the row.
 void removeAndRetain()
          Removes the row from the collection and then retain it for insertion into another location.
 void removeFromCollection()
          Removes the row from the collection.
protected  Element renderAttributeInXMLElement(Document xmlDoc, AttributeDefImpl ad, boolean explicitNull)
           
protected  Element renderAttributeInXMLElement(Document xmlDoc, AttributeDefImpl ad, boolean explicitNull, byte version)
           
 void revert()
          Reverts this row back to its initial state.
 void setAttribute(int index, java.lang.Object val)
          Sets an attribute.
 void setAttribute(java.lang.String name, java.lang.Object val)
          Sets the value of an attribute by name.
protected  void setAttributeInternal(int index, java.lang.Object val)
          This is an "inner" accessor for an attribute and does not call out to the getXXX() method.
 void setAttributeValues(java.util.List names, java.util.List values)
          Set attribute values for the given list of attributes names.
protected  void setAttrInvokeAccessor(int index, java.lang.Object val, AttributeDefImpl attrRef)
           
 void setEffectiveDateMode(int mode)
          Set the Effective Date mode in which the row updates need to be carried out.
protected  void setEffectiveDateOnEntities()
          Sets the Effective Date on the underlying entity rows.
protected  void setEntities(EntityImpl[] rows)
          Sets the entities that this view row is composed of.
protected  void setEntity(int index, EntityImpl row)
          Sets the entity (at index) for this view row.
 void setNewRowState(byte state)
          void setIterator(ViewRowSetIteratorImpl rsi) { mRSI = rsi; } public ViewRowSetIteratorImpl getIterator() { return mRSI; }
protected  void setStateOnEntity(EntityImpl entity, int state)
           
 void setTransientAttributeValue(ViewAttributeDefImpl vad, java.lang.Object val)
          Deprecated. for internal framework use only.
protected  boolean shouldAddViewAccessorRSToRow()
          Internal: Applications should not use this method.
 boolean throwOnListBindingMismatch()
           
 java.lang.String toString()
           
 void validate()
          Calls validate on each this view row's Entity Objects.
 void writeAsXml(XmlOutput out, Node node, Criteria rules)
           
 void writeAsXml(XmlOutput output, Node node, Criteria rules, byte version)
           
 Node writeXML(long options, java.util.HashMap voAttrRules)
          Writes this row as XML in the given XML document.
 
Methods inherited from class oracle.jbo.server.RowImpl
addListBindingsForAttribute, clearAllExceptions, clearRowExceptions, createXMLDefinition, ensureVariableManager, findAttrAndGetIndex, forceFilterListExecute, getAllExceptions, getAttributeInternal, getAttributeSecurityHints, getAttributeSecurityHints, getCombinedAttrNames, getEffectiveDateMode, getExprMethodVal, getHints, getMessageBundleClass, getMethodKind, getResourceBundleDef, getRowExceptions, getSecurityHints, getVariableManager, getViewAccessorResultIndex, hasAttributeException, hasVariables, isRefreshRequired, isRefreshRequired, lookupListBinding, printXMLDefinition, readXML, refreshViewAccessor, refreshViewAccessor, registerRowException, setAttributeInternal, setExprVarVal, setInMultiSetter, skipFilterListOnKeyAttributes, variablesAdded, writeXML, writeXML, writeXML
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CURRENT_VERSION

public static final byte CURRENT_VERSION
See Also:
Constant Field Values

ORIGINAL_VERSION

public static final byte ORIGINAL_VERSION
See Also:
Constant Field Values

XML_POSTSTATE_TAG

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

XML_POSTSTATE_REMOVE

public static final java.lang.String XML_POSTSTATE_REMOVE
See Also:
Constant Field Values
Constructor Detail

ViewRowImpl

public ViewRowImpl()
Public constructor for this class.

Method Detail

initDefaults

protected void initDefaults()

getRowStorageInternal

protected oracle.jbo.server.ViewRowStorage getRowStorageInternal()

throwOnListBindingMismatch

public boolean throwOnListBindingMismatch()

create

protected void create(AttributeList nvp)
Initialization method to be over-ridden in generated code for custom defaulting.

This method invokes create(AttributeList) on each of the "new" entities that make up this View Row.

The attribute list nvp is simply passed to the new entity rows that make up this View Row.

Note: the names in the attribute list are not transformed into entity-relative names hoping that the caller has done so already. If not, the entity's create() method might fail.

Parameters:
nvp - the list of attributtes.

getQueryCollection

public QueryCollection getQueryCollection(java.lang.Object accessKey)
Gets the QueryCollection this row exists in.

Returns:
the QueryCollection that the row exists in.

findRowSetForRow

public ViewRowSetImpl findRowSetForRow(java.lang.Object accessKey)

getHandle

public java.lang.Object getHandle()
Creates a row identifier that is unique in the query collection.

Each row in a collection can be identified by either its Java object reference or by its row handle. The row handle, together with the collection name, forms an identifier that can be stored externally, in order to identify the row in future operations.

Applications should not rely on indentifier having a specific format: it is subject to change.

A row handle can be converted to a string using toString() methods, and compared using equals

Returns:
a unique row identifier.

getKey

public Key getKey()
Returns the identifier object for this row.

Specified by:
getKey in interface Row
Specified by:
getKey in class RowImpl
Returns:
the key of the row.

validate

public void validate()
Calls validate on each this view row's Entity Objects.

Specified by:
validate in interface Row
Specified by:
validate in class RowImpl
Throws:
JboException - if validation fails.
See Also:
EntityImpl.validate(), validate()

getAttributeInternal

protected java.lang.Object getAttributeInternal(int index)
Gets the value of the attribute by index. If the attribute is mapped to an entity-attribute, invoke that entity.getAttribute() with the mapped index. For all other attributes, return the value from the ViewRow's storage.

Note that this is an "inner" accessor for an attribute and does not callout to the generated getXXX() method on a subclass of a ViewRowImpl. getAttribute() methods are the "outer" methods that callout to a subclass's getXXX() method where XXX is the name of the attribute.

Specified by:
getAttributeInternal in class RowImpl
Parameters:
index - the index of the attribute.
Returns:
the value of the column at the index.

getAttribute

public java.lang.Object getAttribute(int ix)
Description copied from interface: AttributeList
Selects the attribute at the given index.

Specified by:
getAttribute in interface AttributeList
Parameters:
ix - an integer in the range 0 to getAttributeCount() - 1.
Returns:
the attribute associated with index.

getAttrInvokeAccessor

protected java.lang.Object getAttrInvokeAccessor(int ix,
                                                 AttributeDefImpl attrRef)
                                          throws java.lang.Exception
Throws:
java.lang.Exception

getAttributeHints

public AttributeHints getAttributeHints(java.lang.String attrName)
Description copied from interface: Row
Returns the AttributeHints object for the specified attribute for the row.

Specified by:
getAttributeHints in interface Row
Parameters:
attrName - the name of the attribute.
Returns:
AttributeHints that describes the structure of the row.

getAttributeHints

public AttributeHints getAttributeHints(int attrIndex)
Description copied from interface: Row
Returns the AttributeHints object for the specified attribute for the row.

Specified by:
getAttributeHints in interface Row
Parameters:
attrIndex - the index of the attribute.
Returns:
AttributeHints that describes the structure of the row.

createViewRowAttrHints

protected ViewRowAttrHintsImpl createViewRowAttrHints(AttributeDefImpl attrDef)
Create a map to store attribute hints for this row.

Parameters:
attrDef - The attribute defintion for which the hints need to be created.
Returns:
an instance of ViewRowAttrHintsImpl

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Gets the value of an attribute by name.

Specified by:
getAttribute in interface AttributeList
Parameters:
name - the name of the attribute.
Returns:
the value of the attribute.

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object val)
Sets the value of an attribute by name.

Specified by:
setAttribute in interface AttributeList
Parameters:
name - the name of the attribute.
val - the value of the attribute.

setAttribute

public void setAttribute(int index,
                         java.lang.Object val)
Sets an attribute.

This method performs a type-check on the value, so that it matches the Java type of the attribute.

Specified by:
setAttribute in interface AttributeList
Parameters:
index - the index of the attribute.
val - the new value.
Throws:
ReadOnlyAttrException - if the attribute is not updateable.
InvalidOperException - if this row belongs is to a forward-only View Object.
DataCreationException - if the given value is not convertible to the Java type of the attribute.
AttrSetValException - if any validation logic fails while setting this attribute to the mapped Entity Object attribute.

hasAttributeException

protected boolean hasAttributeException(int index)
Description copied from class: RowImpl
Returns true if an attribute at the given index was set earlier and threw an exception which was cached as the transaction is in deferred mode.

Overrides:
hasAttributeException in class RowImpl

hasDeferredExceptions

public boolean hasDeferredExceptions()
Overrides:
hasDeferredExceptions in class RowImpl

clearAttributeException

protected void clearAttributeException(java.lang.String name)
Cleans any exception of an attribute of the given name was set earlier and threw an exception which was cached as the transaction is in deferred mode. If the attribute is entity derived, clear the attribute exception at the entity level.

Overrides:
clearAttributeException in class RowImpl

clearAttributeException

protected void clearAttributeException(int index)
Cleans any exception of an attribute of the given name was set earlier and threw an exception which was cached as the transaction is in deferred mode. If the attribte is entity derived clear the attribute exception at entity level.

Overrides:
clearAttributeException in class RowImpl

registerAttributeException

protected void registerAttributeException(AttributeDef attrDef,
                                          java.lang.Object val,
                                          JboException ex)
Specified by:
registerAttributeException in class RowImpl

setAttrInvokeAccessor

protected void setAttrInvokeAccessor(int index,
                                     java.lang.Object val,
                                     AttributeDefImpl attrRef)
                              throws java.lang.Exception
Throws:
java.lang.Exception

setAttributeInternal

protected void setAttributeInternal(int index,
                                    java.lang.Object val)
This is an "inner" accessor for an attribute and does not call out to the getXXX() method. This method sets the value to the mapping entity attribute or stores the value in ViewRow cache for the given attribute.

This method also does not perform any type-check for the value's java type and assumes that the value-type is same as the java-type for this attribute.

Specified by:
setAttributeInternal in class RowImpl
Parameters:
index - The index of the attribute.
val - The value.
Throws:
ReadOnlyAttrException - if the attribute is not updateable.
AttrSetValException - if any validation logic fails while setting this attribute to the mapped Entity attribute.

handleListBindingMismatch

protected void handleListBindingMismatch(ListBinding lb,
                                         java.util.Map valuesMap,
                                         RowIterator listRSI)
Description copied from class: RowImpl
Internal: Applications should not use this method.

Specified by:
handleListBindingMismatch in class RowImpl

hasListBindings

public boolean hasListBindings()
Description copied from class: RowImpl
Internal: Applications should not use this method.

Specified by:
hasListBindings in class RowImpl

getListBindingCount

public int getListBindingCount()

setTransientAttributeValue

public void setTransientAttributeValue(ViewAttributeDefImpl vad,
                                       java.lang.Object val)
Deprecated. for internal framework use only.

For internal use only. Application developers should not use this
*** For internal framework use only ***

setAttributeValues

public void setAttributeValues(java.util.List names,
                               java.util.List values)
Description copied from class: RowImpl
Set attribute values for the given list of attributes names. This implementation may invoke setAttribute(name, value) for each name, value pair. List size for names and values list should match up. If there are more names than values, then the names with no corresponding value entry in the values list will be ignored.

Specified by:
setAttributeValues in interface Row
Specified by:
setAttributeValues in class RowImpl

getRowSet

public final RowSet getRowSet()
Internal: Applications should not use this method.


getViewObject

public final ViewObject getViewObject()
Gets the View Object to which this row belongs.

Returns:
the View Object.

getStructureDef

public StructureDef getStructureDef()
Description copied from interface: Row
Returns the structure of the row.

Specified by:
getStructureDef in interface Row
Specified by:
getStructureDef in class RowImpl
Returns:
StructureDef that describes the structure of the row.

getListBindings

protected java.util.List getListBindings()
Internal: Applications should not use this method.

Specified by:
getListBindings in class RowImpl

doAutoClearAttribute

protected void doAutoClearAttribute(java.lang.String attrName)
Overrides:
doAutoClearAttribute in class RowImpl

createListBinding

protected ListBinding createListBinding(ListBindingDef lbDef,
                                        RowSetIterator rsi)
Internal: Applications should not use this method.

Parameters:
lbDef - The definition object
rsi - The Rowset that is created from the Accessor Definiton specified in List binding definition
Returns:
the list binding instance associated with this row

findListBindingName

protected java.lang.String findListBindingName(java.lang.String attrName,
                                               java.lang.String lbName)
Description copied from class: RowImpl
Internal: Applications should not use this method.

Overrides:
findListBindingName in class RowImpl

findListBindingRSI

protected RowSetIterator findListBindingRSI(java.lang.String attrName,
                                            java.lang.String lbName,
                                            java.lang.String prefCrName)
Internal: Applications should not use this method.


getEntityForListBinding

protected EntityImpl getEntityForListBinding(java.lang.String eoName)
Method to retrieve the entity for locating entity level view accessor to be used in list binding. This method is overriden by the subclass DCDataRow which returns different value from this method than from getEntity(String)

Parameters:
eoName - name of the entity to be returned
Returns:
the Entity for locating entity level view accessor

getPreferredListBindingRSI

protected RowSetIterator getPreferredListBindingRSI(ListBindingDef def,
                                                    java.lang.String prefCrName)
Internal: Applications should not use this method.


getListBindingRSI

protected RowSetIterator getListBindingRSI(ListBindingDef def)
Internal: Applications should not use this method.

Specified by:
getListBindingRSI in class RowImpl

getApplicationModuleForViewAccessor

protected ApplicationModule getApplicationModuleForViewAccessor()
Internal: Applications should not use this method.


shouldAddViewAccessorRSToRow

protected boolean shouldAddViewAccessorRSToRow()
Internal: Applications should not use this method.


findOrCreateViewAccessorRS

protected RowSet findOrCreateViewAccessorRS(ViewAccessorDef va)
Internal: Applications should not use this method.


findOrCreateViewAccessorRS

public RowSet findOrCreateViewAccessorRS(java.lang.String vaName)
Overrides:
findOrCreateViewAccessorRS in class RowImpl

createViewAccessorRS

protected RowSet createViewAccessorRS(ViewAccessorDef va)
Internal: Applications should not use this method.


createViewAccessorRS

protected RowSet createViewAccessorRS(java.lang.String vaName)
Internal: Applications should not use this method.


getApplicationModule

public final ApplicationModule getApplicationModule()
Gets the Application Module to which the containing View Object belongs.

Returns:
an Application Module.

getViewDef

public final ViewDefImpl getViewDef()
Get the ViewDefImpl associated with this View Row.

Returns:
the ViewDefImpl

isSubclassRow

public boolean isSubclassRow()

getCtrlHints

public java.util.HashMap<java.lang.String,java.util.HashMap> getCtrlHints(java.util.List<java.lang.String> attrNames,
                                                                          java.lang.String localeName)

hasExtendedViewDef

public final boolean hasExtendedViewDef()

lookupAttributeDef

public AttributeDef lookupAttributeDef(java.lang.String attrName)
final void setViewDef(ViewDefImpl vDef) { try { useInner(); mInner.setViewDef(vDef); } finally { releaseInner(); } }


findAttributeDef

public AttributeDef findAttributeDef(java.lang.String attrName)

getAttributeIndexOf

public int getAttributeIndexOf(java.lang.String attrName)
Gets the index of the attribute, given it's name.

Specified by:
getAttributeIndexOf in interface AttributeList
Specified by:
getAttributeIndexOf in class RowImpl
Parameters:
attrName - the alias of the attribute.
Returns:
the attribute's index.

getAttributeNames

public java.lang.String[] getAttributeNames()
Description copied from interface: AttributeList
Returns an array of attribute names in this list.

Specified by:
getAttributeNames in interface AttributeList
Returns:
an array of attribute names.

getAttributeValues

public java.lang.Object[] getAttributeValues()
Description copied from interface: AttributeList
Returns an array of attribute values in this list.

Specified by:
getAttributeValues in interface AttributeList
Returns:
an array of attribute values.

getExprVarVal

public java.lang.Object getExprVarVal(java.lang.String varName)
Specified by:
getExprVarVal in interface ExprValueSupplier
Overrides:
getExprVarVal in class RowImpl

createEntities

protected EntityImpl[] createEntities()
Creates blank instances of the Entity Objects that this row is composed of. Advanced method used by subclasses to create their own instances of entities based on custom-logic to bypass entity-creation from the framework.

Returns:
array of EntityImpls that is then set as the array of Entities this ViewRow is composed of.

createMissingEntitiesFromViewDef

protected EntityImpl[] createMissingEntitiesFromViewDef(ViewDefImpl viewDef,
                                                        int[] eoIndices,
                                                        EntityImpl[] entities,
                                                        java.sql.ResultSet resultSet,
                                                        AttributeList initValues,
                                                        boolean isNewRow,
                                                        ApplicationModule viewAccessorAM)

setStateOnEntity

protected void setStateOnEntity(EntityImpl entity,
                                int state)

lock

public void lock()
Locks the referenced Entity Rows. This method uses the design-time View Object metadata to determine which of the Entity Rows that are referenced by the View Object are updateable and should consequently be locked.

Specified by:
lock in interface Row
Specified by:
lock in class RowImpl

revert

public void revert()
Reverts this row back to its initial state. If a row is used in multiple View Objects, this operation's effect will be visible to all.


refresh

public void refresh(int refreshMode)
Description copied from interface: Row
Refreshes the row's attributes with values from database. refreshMode should be a combination of REFRESH_.... See REFRESH_... constants for further information.

Specified by:
refresh in interface Row
Parameters:
refreshMode - the refresh mode.

remove

public void remove()
Deletes the row. This method will invoke remove on the updateable Entity Rows that are referenced by this View Object Row. After the referenced, updateable entity rows have been removed this method will remove the View Object Row from the View Object's RowSet.

Specified by:
remove in interface Row
Specified by:
remove in class RowImpl

removeFromCollection

public void removeFromCollection()
Description copied from interface: Row
Removes the row from the collection.

This method differs from Row.remove() in that it just removes the row from the collection. It does not remove the underlying Entity row(s) or database row(s). However, once the row is removed, it cannot be used any more. If you want to remove the row from the collection and insert it elsewhere, call Row.removeAndRetain().

Specified by:
removeFromCollection in interface Row

removeAndRetain

public void removeAndRetain()
Description copied from interface: Row
Removes the row from the collection and then retain it for insertion into another location.

This method differs from Row.remove() in that it just removes the row from the collection. It does not remove the underlying Entity row(s) or database row(s).

This method also differs from Row.removeFromCollection() in that after the row is removed from the collection, it can be inserted back into the collection at another location.

Specified by:
removeAndRetain in interface Row

getEntityCount

public int getEntityCount()
Counts the number of Entity Objects in this row.

Returns:
the number of Entity Objects in the row.

getEntity

public final EntityImpl getEntity(int index)
Gets the Entity at the given index. Used in generated code for viewrow to get to the attribute mapped to an entity.

Parameters:
index - the index of the Entity.

getEntityForAttribute

public final Entity getEntityForAttribute(java.lang.String attrName)
Gets an entity object that contains the given attribute name.

Parameters:
attrName - name of an attribute
Returns:
an entity object.

getEntityAttrForAttribute

public final AttributeDefImpl getEntityAttrForAttribute(java.lang.String attrName)

getEntities

public EntityImpl[] getEntities()
Gets an array of Entity objects.

This method makes a copy of the internal list of Entity rows and returns that copy to the caller.

Returns:
a copy of the list of Entity rows.

setEntities

protected void setEntities(EntityImpl[] rows)
Sets the entities that this view row is composed of.

This method is called by framework, after entites are created for this row. This must be protected because subclasses can create their own entity instances and have the viewrow manage them.

For example, assume there is a ViewRow on the Doc Entity where Doc has subclasses PO and Req, the ViewRow subclass can create PO/Req instances of entities based on some logic and have ViewRow manage them as an entity of type Doc.


setEntity

protected void setEntity(int index,
                         EntityImpl row)
Sets the entity (at index) for this view row.

A view row is based on entity rows. This method can be used to set the entity row for the specified entity index. For example, a view row may consist of two entity rows, Emp and Dept. To set the entity row for the Dept part, one can call this method with index of 1.

Parameters:
index - index of the entity

getAttributeCount

public final int getAttributeCount()
Gets the attribute count in this ViewRow.

Specified by:
getAttributeCount in interface AttributeList
Specified by:
getAttributeCount in class RowImpl
Returns:
the number of attributes.

isAttributeUpdateable

public boolean isAttributeUpdateable(int index)
Description copied from class: RowImpl
Tests if an attribute is updateable.

Specified by:
isAttributeUpdateable in interface Row
Specified by:
isAttributeUpdateable in class RowImpl
Parameters:
index - the index of the attribute.
Returns:
true if the row is marked UPDATEABLE, or if the row is marked UPDATEABLE_WHILE_NEW and the current row is new.

isDead

public boolean isDead()
Description copied from interface: Row
An attempt to access a dead view row will lead to a DeadViewRowAccessException. Using this API method, client code can test the row state.

Specified by:
isDead in interface Row
Specified by:
isDead in class RowImpl
Returns:
true if the row is dead.

isAttributeChanged

public final boolean isAttributeChanged(java.lang.String attrName)
Advanced method: Applications should typically not use this method. Invokes isAttributeChanged(index) after looking up the entity for an attribute with this name. This accessor is exposed for use in expressions only.


entityCacheAdd

public void entityCacheAdd()
Populate the caches from the values of the rows.


populate

protected void populate(java.sql.ResultSet resultSet)
Internal: Applications should not use this method.

Populate this row from the ResultSet.

This is a Framework-internal method. This method is used to fill in entity-attributes from a JDBC ResultSet that is returned by executeQuery().

Note that the method works on the current row of the result set and any currecy change on the ResultSet could throw it off. This method is protected to let sub-ViewRows fill in custom-entities created based on data.

For example, if fax is a subtype of doc and based on a column value, either doc is created or a fax is created for a given entity type, this method may be used to create entities based on the data values. Note that the developer needs to know exact position of values in the JDBC ResultSet.

Parameters:
resultSet - the JDBC ResultSet containing the row data.

populateAttribute

protected void populateAttribute(int index,
                                 java.lang.Object value)
Description copied from class: RowImpl
Populates the attribute at the given index with the given attribute value.

Specified by:
populateAttribute in class RowImpl
Parameters:
index - an attribute position.
value - the value to be assigned to the attribute.

populateAttributeAsChanged

protected void populateAttributeAsChanged(int index,
                                          java.lang.Object value)

getNewRowState

public byte getNewRowState()

findAssociatedObjects

protected RowSet findAssociatedObjects(java.lang.String name)
Finds Objects in a ViewRowSetImpl that follow the given association.

Parameters:
name - that defines the association
Returns:
A set of associated object/s.

getDBTransaction

public DBTransaction getDBTransaction()

hashCode

public int hashCode()
Computes an integer hash code for this ViewRowImpl object

Overrides:
hashCode in class java.lang.Object
Returns:
the hash code of this ViewRowImpl object.

equals

public boolean equals(java.lang.Object other)
Tests if the specified value is equal to this ViewRowImpl object.

Overrides:
equals in class java.lang.Object
Parameters:
other - the object to which the ViewRowImpl should be compared.
Returns:
true if the specified object is equal to the this ViewRowImpl.

getXMLElementTag

public java.lang.String getXMLElementTag()
Returns the XML-element tag for this row. If no custom-property (of the name XML_ROW_ELEMENT) is found, it returns the name of the View Object + the suffix "Row". For example, "EmpViewRow".


writeXML

public final Node writeXML(long options,
                           java.util.HashMap voAttrRules)
Writes this row as XML in the given XML document.

Specified by:
writeXML in interface XMLInterface
Overrides:
writeXML in class RowImpl
Parameters:
options - a set of bit flags that will control the writeXML behavior.
voAttrRules - HashMap containing Definition names of ViewObjects and an array of AttributeDef to render for a ViewObject of that definition type.

appendXMLElementNodes

protected void appendXMLElementNodes(Document xmlDoc,
                                     Node node,
                                     int depthCount,
                                     long options,
                                     java.util.HashMap voAttrMap,
                                     AttributeDef[] attrs)
Writes XML-element nodes for each attribute in this row and appends it to the given row-node.

Override this method to perform custom XML-rendering on a Row.

Parameters:
xmlDoc - name of the XML document where the node resides.
node - the name of the Row object node where new nodes will be appended.
depthCount - number of child levels deep to appendrow nodes.
options - a set of bit flags that will control the writeXML behavior.
voAttrMap - of what attributes to xmlize for different ViewObjects.
attrs - an array of AttriubuteDefImpls.

appendXMLElementNodes

protected void appendXMLElementNodes(Document xmlDoc,
                                     Node node,
                                     int depthCount,
                                     long options,
                                     AttributeDefImpl[] attrs)
Writes XML-element nodes for each attribute in this row and appends it to the given row-node.

Override this method to perform custom XML-rendering on a Row.

Parameters:
xmlDoc - name of the XML document where the node resides.
node - the name of the Row object node where new nodes will be appended.
depthCount - number of child levels deep to appendrow nodes.
options - a set of bit flags that will control the writeXML behavior.
attrs - an array of AttriubuteDefImpls.

renderAttributeInXMLElement

protected Element renderAttributeInXMLElement(Document xmlDoc,
                                              AttributeDefImpl ad,
                                              boolean explicitNull,
                                              byte version)

renderAttributeInXMLElement

protected Element renderAttributeInXMLElement(Document xmlDoc,
                                              AttributeDefImpl ad,
                                              boolean explicitNull)

readAttributeFromXMLElement

protected void readAttributeFromXMLElement(Node rowElt,
                                           AttributeDefImpl ad)

readXML

public final void readXML(Element rowElt,
                          int depthCount)
Reads the content of the row and updates the attributes, from given XML document. If the xml row element has an attribute like, bc4j-action="remove" then this method calls remove() on this row.

Specified by:
readXML in interface XMLInterface
Specified by:
readXML in class RowImpl
Parameters:
rowElt - name of the XML element.
depthCount - the number of child levels deep to which data should be read.

setNewRowState

public void setNewRowState(byte state)
void setIterator(ViewRowSetIteratorImpl rsi) { mRSI = rsi; } public ViewRowSetIteratorImpl getIterator() { return mRSI; }

Specified by:
setNewRowState in interface Row
Specified by:
setNewRowState in class RowImpl
Parameters:
state - This could be STATUS_NEW or STATUS_INITIALIZED.

getElementTagName

public java.lang.String getElementTagName()
Specified by:
getElementTagName in interface XmlSerializable

writeAsXml

public void writeAsXml(XmlOutput out,
                       Node node,
                       Criteria rules)
Specified by:
writeAsXml in interface XmlSerializable

getAttributeInternal

public java.lang.Object getAttributeInternal(int index,
                                             byte version)

writeAsXml

public void writeAsXml(XmlOutput output,
                       Node node,
                       Criteria rules,
                       byte version)

getParentVariableManager

protected VariableValueManager getParentVariableManager()
Specified by:
getParentVariableManager in class RowImpl

copyFrom

protected void copyFrom(ViewRowImpl other)
For subclasses to implement copy of transient members in the subclass This method is invoked when a new row is created with attributes copied from the other row for move into a new collection in makeRowCopy.

Parameters:
other -

checkForOuterJoins

protected void checkForOuterJoins()
Check the Entities in this View Row for Outer Joins. If an Entity reference with a null key is found in an Outer Join make sure it is not added to the Entity Cache so that validation does not fail and the Entity is not included during posting the changes to the database.


isViewAccessorAttribute

protected boolean isViewAccessorAttribute(int indexAttribute)
Check if an attribute is the attribute to store view accessor RowSetIterator.

Parameters:
indexAttribute - The index of the attribute.
Returns:
true if the attribute stores view accessor RowSetIterator, orelse return false.

setEffectiveDateOnEntities

protected void setEffectiveDateOnEntities()
Sets the Effective Date on the underlying entity rows. The entity will use this effective date while doing its DML. If more than one view row changes the same entity, the effective date from the last view row wins.


refreshViewAccessor

protected void refreshViewAccessor(ViewAccessorDef va,
                                   java.util.Map attrNameValues,
                                   RowSet rs)
Overrides:
refreshViewAccessor in class RowImpl

isRefreshRequired

protected boolean isRefreshRequired(ViewAccessorDef va,
                                    java.lang.String[] attrNames,
                                    java.lang.Object[] attrValues,
                                    RowSet rs)
Overrides:
isRefreshRequired in class RowImpl

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getEffectiveDate

public java.lang.Object getEffectiveDate()
Obtain the Effective Date Value of this row. A search for a valid value is carried out in the following order:
  1. The value of the SysEffectiveDate transient attribute
  2. The SysEffectiveDate property value on the Root Application Module
  3. Current Date

Overrides:
getEffectiveDate in class RowImpl
Returns:
The effective date of this row.

setEffectiveDateMode

public void setEffectiveDateMode(int mode)
Description copied from interface: Row
Set the Effective Date mode in which the row updates need to be carried out. The mode needs to be set prior to the changes.

Specified by:
setEffectiveDateMode in interface Row
Overrides:
setEffectiveDateMode in class RowImpl
Parameters:
mode - One of the effective date mode constants.
See Also:
Row.EFFDT_NONE_MODE, Row.EFFDT_UPDATE_CORRECTION, Row.EFFDT_UPDATE_MODE, Row.EFFDT_UPDATE_OVERRIDE_MODE, Row.EFFDT_UPDATE_CHANGE_INSERT_MODE, Row.EFFDT_UPDATE_NEW_EARLIEST_CHANGE_MODE, Row.EFFDT_DELETE_MODE, Row.EFFDT_DELETE_THIS_CHANGE_MODE, Row.EFFDT_DELETE_NEXT_CHANGE_MODE, Row.EFFDT_DELETE_FUTURE_CHANGE_MODE, Row.EFFDT_DELETE_ZAP_MODE

findViewAccessorDef

public ViewAccessorDef findViewAccessorDef(java.lang.String name)
This method returns ViewAccessorDef with the specified name.

Overrides:
findViewAccessorDef in class RowImpl
Parameters:
name - The name of the ViewAccessorDef.
Returns:
The ViewAccessorDef

findOrCreateLocalViewObject

protected ViewObject findOrCreateLocalViewObject(ViewAccessorDef vaDef)
Find or create the local view instance from the local view usage name.

Parameters:
vaDef - The ViewAccessorDef.
Returns:
The local view object.

doAllowsOperation

protected oracle.adf.share.security.authorization.PrivilegeHolder doAllowsOperation(java.lang.String operationName)
Overrides:
doAllowsOperation in class RowImpl

markViewAccessorsDirty

protected void markViewAccessorsDirty(java.lang.String[] attrNames)
Overrides:
markViewAccessorsDirty in class RowImpl

_internal_dbg_debug_data

protected java.util.List _internal_dbg_debug_data()
framework use only

Returns:
null
For internal use only. Application developers should not use this

getViewLogicGroupDef

public ViewDefImpl getViewLogicGroupDef()

getLookupDescription

public java.lang.String getLookupDescription(java.lang.String attrName)

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

E10653-05

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