Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.3.0)

E17483-04


oracle.jbo.client.remote
Class RowImpl

java.lang.Object
  extended by oracle.jbo.client.remote.RowImpl

All Implemented Interfaces:
AttributeList, DomainOwnerInterface, ExprWrappable, Row, XMLInterface

public class RowImpl
extends java.lang.Object
implements Row, DomainOwnerInterface

The RowImpl class is used to access the data inside a row using the Row interface

See Also:
AttributeDef

Field Summary

 

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, STATUS_NEW

 

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
RowImpl()
           

 

Method Summary
 void domainToBeModified(DomainInterface domain)
          Notification method that this domain calls whenever any of its attribute values are about to be modified.
 ApplicationModule getApplicationModule()
           
 ApplicationModuleImpl getApplicationModuleImpl()
           
protected  ApplicationModuleImpl getApplicationModuleProxy()
           
 java.lang.Object getAttribute(int index)
          Returns the data for the attribute at the given index.
 java.lang.Object getAttribute(java.lang.String name)
          Returns the data for the attribute with the given name.
 int getAttributeCount()
          Get the attribute count
 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 name)
          Get the index for an attribute given the name
 java.lang.String[] getAttributeNames()
          Returns an array of attribute names in this list.
 SecurityHints getAttributeSecurityHints(int attrIndex)
          Returns the SecurityHints object for the specified attribute for the row.
 SecurityHints getAttributeSecurityHints(java.lang.String attrName)
          Returns the SecurityHints object for the specified attribute for the row.
 java.lang.Object[] getAttributeValues()
          Returns an array of attribute values in this list.
 int getEffectiveDateMode()
          Get the current effective date mode.
protected  int getHandleAsInt()
           
 Key getKey()
          Returns the key of the row.
protected  ObjectMarshaller getObjectMarshaller()
           
protected  byte[] getPiggyback()
           
 RowSet getRowSet()
           
 RowSetIterator getRowSetIterator()
           
protected  int getRSIId()
           
 SecurityHints getSecurityHints()
          Returns the SecurityHints object for the row.
protected  ServiceMessage getServiceMessage()
           
 StructureDef getStructureDef()
          Returns the structure of the row.
protected  ViewUsageImpl getViewObjectImpl()
           
protected  void initialize(int st, java.lang.Object[] rowData, oracle.jbo.client.remote.RowSetIteratorImpl rowSetIterator, java.lang.Object handle, byte newRowState, int numUnmarshalledAttrs, int viewDefId)
           
 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.
 void lock()
          Locks the row(s) in the database table.
protected  void processPiggyback(byte[] pb)
           
protected  java.util.ArrayList processServiceMessage(ServiceMessage svcMsg)
           
 void readXML(Element elem, int depthCount)
           
 void readXML(Element elem, int depthCount, XSLStylesheet xslt)
           
 void refresh(int refreshMode)
          Refreshes the row's attributes with values from database.
 void remove()
          Removes the row from the database table.
 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.
 void revert()
          Revert the row to the Database state.
 void setAttribute(int index, java.lang.Object value)
          Set the value for an attribute at a given index.
 void setAttribute(java.lang.String name, java.lang.Object value)
          Set the value for an attribute with a given name.
 void setAttributeValues(java.util.List names, java.util.List values)
          Set attribute values for the given list of attributes names.
 void setEffectiveDateMode(int mode)
          Set the Effective Date mode in which the row updates need to be carried out.
 void setNewRowState(byte state)
          Sets a new unposted row, created in this transaction, to either STATUS_NEW or STATUS_INITIALIZED mode.
 void validate()
          Invoke validate method for the validators attached to this Row
 Node writeXML(int depthCount, long options)
          Renders data in a canonical XML-format.
 Node writeXML(int depthCount, long options, XSLStylesheet xslt)
           
 Node writeXML(long options, java.util.HashMap voAttrMap)
          Renders data in a canonical XML-format.
 Node writeXML(long options, java.util.HashMap voAttrMap, XSLStylesheet xslt)
           

 

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

 

Constructor Detail

RowImpl

public RowImpl()

Method Detail

initialize

protected void initialize(int st,
                          java.lang.Object[] rowData,
                          oracle.jbo.client.remote.RowSetIteratorImpl rowSetIterator,
                          java.lang.Object handle,
                          byte newRowState,
                          int numUnmarshalledAttrs,
                          int viewDefId)

getAttribute

public java.lang.Object getAttribute(int index)
Returns the data for the attribute at the given index.
Specified by:
getAttribute in interface AttributeList
Parameters:
index - attribute index
Returns:
The value of the attribute

getAttribute

public final java.lang.Object getAttribute(java.lang.String name)
Returns the data for the attribute with the given name.
Specified by:
getAttribute in interface AttributeList
Parameters:
name - attribute name
Returns:
The value of the attribute

isAttributeUpdateable

public boolean isAttributeUpdateable(int index)
Description copied from interface: Row
Tests if an attribute is updateable. Returns false if the attribute is read-only and true if it is updateable.

The following logic is used for determining if the attribute is updateable. If this attribute for a View row and is one which is mapped to an Entity Attribute, and if the Entity base is marked as read-only in the View Object, the attribute is read-only.

If the Entity base is marked updateable, a check is made to see if the the current user has updateable privilege on the underlying Entity row. If not, the attribute is read-only.

After this, we check the View Object's Attribute Definition. If the Attribute Definition indicates that it is READONLY, this method returns false (read-only). If the Attribute Definition says UPDATEABLE, it drops to the Entity level to determine if the Entity level Attribute Definition says it is updateable. If the attribute is UPDATEABLE_WHILE_NEW We check to see if the 'row' is new or not. (If this attribute comes from an Entity Row, the 'row' is the Entity Row. Otherwise, the 'row' is the View Row.) If the row is new, the attribute is updateable.

Specified by:
isAttributeUpdateable in interface Row
Parameters:
index - the index of the attribute.
Returns:
true if the attribute is updateable in this row. false if not.

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
Returns:
true if the row is dead.

getStructureDef

public StructureDef getStructureDef()
Description copied from interface: Row
Returns the structure of the row.
Specified by:
getStructureDef in interface Row
Returns:
StructureDef that describes the structure of the row.

getViewObjectImpl

protected ViewUsageImpl getViewObjectImpl()

setAttributeValues

public void setAttributeValues(java.util.List names,
                               java.util.List values)
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

setAttribute

public void setAttribute(int index,
                         java.lang.Object value)
Set the value for an attribute at a given index.
Specified by:
setAttribute in interface AttributeList
Parameters:
index - The attribute index.
value - The value.

setAttribute

public final void setAttribute(java.lang.String name,
                               java.lang.Object value)
Set the value for an attribute with a given name.
Specified by:
setAttribute in interface AttributeList
Parameters:
name - The attribute name.
value - The value.

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.

getAttributeCount

public int getAttributeCount()
Get the attribute count
Specified by:
getAttributeCount in interface AttributeList
Returns:
the number of attributes.

getAttributeIndexOf

public int getAttributeIndexOf(java.lang.String name)
Get the index for an attribute given the name
Specified by:
getAttributeIndexOf in interface AttributeList
Parameters:
name - The attribute name
Returns:
numerical index for given attribute name

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.

getApplicationModule

public ApplicationModule getApplicationModule()
Returns:
The ApplicationModule this Row belongs

getApplicationModuleImpl

public ApplicationModuleImpl getApplicationModuleImpl()

getKey

public Key getKey()
Returns the key of the row.
Specified by:
getKey in interface Row
Returns:
The key object

validate

public void validate()
Invoke validate method for the validators attached to this Row
Specified by:
validate in interface Row
See Also:
EntityImpl.validate(), ViewRowImpl.validate()

revert

public void revert()
Revert the row to the Database state.

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.

domainToBeModified

public void domainToBeModified(DomainInterface domain)
Description copied from interface: DomainOwnerInterface
Notification method that this domain calls whenever any of its attribute values are about to be modified. This Domain should always notify its owner.
Specified by:
domainToBeModified in interface DomainOwnerInterface
Parameters:
domain - the domain being modified.

lock

public void lock()
Locks the row(s) in the database table.
Specified by:
lock in interface Row
See Also:
Row.lock()

remove

public void remove()
Removes the row from the database table.
Specified by:
remove in interface Row
See Also:
Row.remove()

removeFromCollection

public void removeFromCollection()
Removes the row from the collection.
Specified by:
removeFromCollection in interface Row
See Also:
Row.removeFromCollection()

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

getPiggyback

protected byte[] getPiggyback()

getServiceMessage

protected ServiceMessage getServiceMessage()

processPiggyback

protected void processPiggyback(byte[] pb)

processServiceMessage

protected java.util.ArrayList processServiceMessage(ServiceMessage svcMsg)

getRSIId

protected final int getRSIId()

getHandleAsInt

protected final int getHandleAsInt()

getRowSetIterator

public RowSetIterator getRowSetIterator()

getRowSet

public RowSet getRowSet()

getObjectMarshaller

protected ObjectMarshaller getObjectMarshaller()

writeXML

public Node writeXML(long options,
                     java.util.HashMap voAttrMap)
Description copied from interface: XMLInterface
Renders data in a canonical XML-format. The classes ViewObjectImpl and ViewRowImpl implement this method to render data in XML.

Use this method whenever data is required in XML format, either to present a UI (after converting XML data into some HTTP format using a stylesheet) or to pass the data as payload for messages via JMS.

The options parameter represents a set of bit flags that will control the writeXML behavior. The following bit flags have been defined:

The voAttrMap parameter represents in a hashmap, the mapping between a given ViewObject's definition type and the corresponding Attributes/accessors to render. A null entry in the hashmap means, render all attributes and accessors of that viewobject type.

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

writeXML

public Node writeXML(int depthCount,
                     long options)
Description copied from interface: XMLInterface
Renders data in a canonical XML-format. The classes ViewObjectImpl and ViewRowImpl implement this method to render data in XML.

Use this method whenever data is required in XML format, either to present a UI (after converting XML data into some HTTP format using a stylesheet) or to pass the data as payload for messages via JMS.

The depthcount parameter represents to what level the rendering should recurse. A depthcount of zero (0) means do not traverse any View Links while rendering. One (1) means traverse the View Links on this object but no View Links thereafter, and so on.

The options parameter represents a set of bit flags that will control the writeXML behavior. The following bit flags have been defined:

Specified by:
writeXML in interface XMLInterface
Parameters:
depthCount - represents to what level the rendering should recurse.
options - a set of bit flags that will control the writeXML behavior.

readXML

public void readXML(Element elem,
                    int depthCount)
Specified by:
readXML in interface XMLInterface

writeXML

public Node writeXML(long options,
                     java.util.HashMap voAttrMap,
                     XSLStylesheet xslt)
Specified by:
writeXML in interface XMLInterface

writeXML

public Node writeXML(int depthCount,
                     long options,
                     XSLStylesheet xslt)
Specified by:
writeXML in interface XMLInterface

readXML

public void readXML(Element elem,
                    int depthCount,
                    XSLStylesheet xslt)
Specified by:
readXML in interface XMLInterface

setNewRowState

public void setNewRowState(byte state)
Description copied from interface: Row
Sets a new unposted row, created in this transaction, to either STATUS_NEW or STATUS_INITIALIZED mode. Calling this method on a row in any other state will be a no-op.

This method should be used to create a row and then to mark it temporary (STATUS_INITIALIZED) so that an app can use the created Row to fill UIs like Table UIs with valid default values for rows. Then when the Row values are updated, UIs should once again call this method to turn the Row into new (STATUS_NEW) state before any setAttribute calls on the Row, so that the changes are validated and posted.

When a created row is in STATUS_NEW (by default) state and this method is called to turn the row in to STATUS_INITIALIZED, all updateable entities that this row comprises of, de=registers themselves from their respective transaction and validation managers. Assocation and ViewLink finders will not find/include these rows. Only the collection into which this row was inserted into will contain a reference to this row and when that collection is re-executed this row cannot be reached via the framework. To include this row again an app should call this method again with STATUS_NEW as the method-argument

When this row is in STATUS_INITIALIZED state and this method is called with STATUS_NEW state then, this new row is added back into it's relevant transaction and validation manager and will then participate in validation, transaction cycles.

Note that incase of composition if a master/detail hierarchy is being created with the intention of making them temporary (STATUS_INITIALIZED) then the logic should be: Create Master row, insert Master row into a collection, create Detail row insert detail row into a relevant collection, make detail row initialized, create/insert/change-to-initialized more detail rows and at the end set the master row as initialized.

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

getApplicationModuleProxy

protected ApplicationModuleImpl getApplicationModuleProxy()

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
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

getEffectiveDateMode

public int getEffectiveDateMode()
Description copied from interface: Row
Get the current effective date mode.
Specified by:
getEffectiveDateMode in interface Row
Returns:
The current mode of an effective dated row.
See Also:
Row.setEffectiveDateMode(int)

getAttributeSecurityHints

public SecurityHints getAttributeSecurityHints(int attrIndex)
Description copied from interface: Row
Returns the SecurityHints object for the specified attribute for the row.
Specified by:
getAttributeSecurityHints in interface Row
Parameters:
attrIndex - the index of the attribute.
Returns:
SecurityHints of the row.

getAttributeSecurityHints

public SecurityHints getAttributeSecurityHints(java.lang.String attrName)
Description copied from interface: Row
Returns the SecurityHints object for the specified attribute for the row.
Specified by:
getAttributeSecurityHints in interface Row
Parameters:
attrName - the name of the attribute.
Returns:
SecurityHints of the row.

getSecurityHints

public SecurityHints getSecurityHints()
Description copied from interface: Row
Returns the SecurityHints object for the row.
Specified by:
getSecurityHints in interface Row
Returns:
SecurityHints of the row.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.3.0)

E17483-04


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