|
Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.adf.model.generic.RowImpl
The RowImpl class is used to access the data inside a row using the Row interface
AttributeDef
Field Summary |
Fields inherited from interface oracle.jbo.Row |
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 |
Constructor Summary | |
protected |
RowImpl(java.lang.Object rowDataProvider,
DCRowSetIteratorImpl rowSetIterator)
|
Method Summary | |
boolean |
equals(java.lang.Object obj)
|
ApplicationModule |
getApplicationModule()
|
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 |
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. |
java.lang.Object[] |
getAttributeValues()
Returns an array of attribute values in this list. |
java.lang.Object |
getDataProvider()
|
Key |
getKey()
Returns the key of the row. |
StructureDef |
getStructureDef()
Returns the structure of the row. |
boolean |
isAttributeUpdateable(int index)
Tests if an attribute is updateable. |
void |
lock()
Acquire the row provider data to be modified in this transaction space. |
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()
Delete 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. |
void |
resetKey()
Call this if the correpsonding dataProvider row object has a change in key object values. |
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 |
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,
com.sun.java.util.collections.HashMap voAttrMap)
Renders data in a canonical XML-format. |
Node |
writeXML(long options,
com.sun.java.util.collections.HashMap voAttrMap,
XSLStylesheet xslt)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected RowImpl(java.lang.Object rowDataProvider, DCRowSetIteratorImpl rowSetIterator)
Method Detail |
public boolean equals(java.lang.Object obj)
public java.lang.Object getAttribute(int index)
getAttribute
in interface AttributeList
index
- attribute index
public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface AttributeList
name
- attribute name
public boolean isAttributeUpdateable(int index)
Row
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.
isAttributeUpdateable
in interface Row
index
- the index of the attribute.
true
if the attribute is updateable in this row.
false
if not.public StructureDef getStructureDef()
Row
getStructureDef
in interface Row
public void setAttribute(int index, java.lang.Object value)
setAttribute
in interface AttributeList
index
- The attribute index.value
- The value.public void setAttribute(java.lang.String name, java.lang.Object value)
setAttribute
in interface AttributeList
value
- The value.name
- the attribute's name.public int getAttributeCount()
getAttributeCount
in interface AttributeList
public int getAttributeIndexOf(java.lang.String name)
getAttributeIndexOf
in interface AttributeList
name
- The attribute name
public java.lang.String[] getAttributeNames()
AttributeList
getAttributeNames
in interface AttributeList
public java.lang.Object[] getAttributeValues()
AttributeList
getAttributeValues
in interface AttributeList
public ApplicationModule getApplicationModule()
public Key getKey()
getKey
in interface Row
public void resetKey()
public void validate()
validate
in interface Row
EntityImpl.validate()
,
ViewRowImpl.validate()
public void revert()
public void refresh(int refreshMode)
Row
refreshMode
should be a combination of REFRESH_...
.
See REFRESH_...
constants for further information.
refresh
in interface Row
refreshMode
- the refresh mode.public void lock()
lock
in interface Row
public void remove()
remove
in interface Row
public void removeFromCollection()
Row
This method differs from
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.remove()
.
Row.removeAndRetain()
removeFromCollection
in interface Row
public void removeAndRetain()
Row
This method differs from
in that
it just removes the row from the collection. It does not
remove the underlying Entity row(s) or database row(s).
Row.remove()
This method also differs from
in that after the row is removed from the collection, it can be inserted
back into the collection at another location.
Row.removeFromCollection()
removeAndRetain
in interface Row
public Node writeXML(long options, com.sun.java.util.collections.HashMap voAttrMap)
XMLInterface
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:
EntityImpl
. 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.
writeXML
in interface XMLInterface
options
- a set of bit flags that will control the writeXMLvoAttrMap
- HashMap containing Definition names of ViewObjects and an
array of AttributeDef to render for a ViewObject of that definition type.public Node writeXML(int depthCount, long options)
XMLInterface
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:
EntityImpl
.
writeXML
in interface XMLInterface
depthCount
- represents to what level the rendering should recurse.options
- a set of bit flags that will control the writeXML
behavior.public void readXML(Element elem, int depthCount)
readXML
in interface XMLInterface
public Node writeXML(long options, com.sun.java.util.collections.HashMap voAttrMap, XSLStylesheet xslt)
writeXML
in interface XMLInterface
public Node writeXML(int depthCount, long options, XSLStylesheet xslt)
writeXML
in interface XMLInterface
public void readXML(Element elem, int depthCount, XSLStylesheet xslt)
readXML
in interface XMLInterface
public void setNewRowState(byte state)
Row
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.
setNewRowState
in interface Row
state
- This could be STATUS_NEW or STATUS_INITIALIZED.public java.lang.Object getDataProvider()
|
Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.