Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.jbo.server
Class RowImpl

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

public abstract class RowImpl
extends java.lang.Object
implements Row, ExprValueSupplier, JboReservedVarNames

Base class for other row types, such as Entity and View


Field Summary
static java.lang.Class CLASS_INSTANCE
           
 
Fields inherited from interface oracle.jbo.Row
EFFDT_DELETE_FUTURE_CHANGE_MODE, EFFDT_DELETE_MODE, EFFDT_DELETE_NEXT_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_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.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
 
Constructor Summary
RowImpl()
           
RowImpl(int initialSize)
          What's the current state of this row, i.e.
 
Method Summary
protected  void addListBindingsForAttribute(List lbs, List attrNames, java.lang.String attrName, ArrayList derivedNames, ArrayList al)
          Internal: Applications should not use this method.
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 doSetAttribute(int index, java.lang.Object value)
           
protected  void doSetAttribute(java.lang.String name, java.lang.Object value)
           
protected  int findAttrAndGetIndex(java.lang.String name)
           
 ViewAccessorDef findViewAccessorDef(java.lang.String name)
          This method returns ViewAccessorDef with the specified name.
protected  ArrayList getAllExceptions()
           
 java.lang.Object getAttribute(int index)
          Get an attribute value by index
 java.lang.Object getAttribute(java.lang.String name)
          Get an attribute value by name
 int getAttributeCount()
          Gets the # of attributes in this row
 int getAttributeIndexOf(java.lang.String name)
          Gets the index of the named attribute
protected abstract  java.lang.Object getAttributeInternal(int index)
          Gets the attribute value by index.
 java.lang.String getAttributeNameOf(int index)
          Gets the name of the specified attribute index
 java.lang.String[] getAttributeNames()
          Gets a list of the names of all attributes
 java.lang.Object[] getAttributeValues()
          Gets a list of the values of all attributes
 AttributeDefImpl[] getChangedAttributeDefImpls()
          Get an array of Attribute indices that would participate in an UPDATE statement
protected  java.lang.String[] getCombinedAttrNames(java.lang.Object[] attrNames, List derivedNames)
          This method combines the given attribute names with the derived attribute names It throws an exception if the derived attribute names overlap the given names This would happen in a case were the user or a program attempts to set a couple of attributes but the associated list bindings will override at least one of them.
 java.lang.Object getEffectiveDate()
          Simple String representation of this row.
 int getEffectiveDateMode()
          Get the current effective date mode.
 java.lang.Object getExprVarVal(java.lang.String varName)
           
 AttributeDefImpl[] getInsertAttributeDefImpls()
          Get an array of Attribute indices that would participate in an INSERT statement
abstract  Key getKey()
          Returns the row's key.
protected abstract  RowSetIterator getListBindingRSI(ListBindingDef def)
           
protected abstract  List getListBindings()
           
static java.lang.String getStateAsString(int state)
          Utility function to convert the STATE to a string
abstract  StructureDef getStructureDef()
          Returns the structure of the row.
protected abstract  void handleListBindingMismatch(ListBinding lb, Map valuesMap, RowIterator listRSI)
           
protected abstract  boolean hasListBindings()
           
protected  void init(int initialSize)
           
abstract  boolean isAttributeUpdateable(int index)
          Tests if an attribute is updateable.
abstract  boolean isDead()
          Tests this row to determine if it is dead
 boolean isDirty(int i)
           
protected  boolean isRefreshRequired(ViewAccessorDef va, java.lang.String[] attrNames)
          Check if a view accessor should be refreshed when a list of attribute get changed.
protected  boolean isRefreshRequired(ViewAccessorDef va, java.lang.String[] attrNames, java.lang.Object[] attrValues)
          Check if a view accessor should be refreshed when a list of attribute get changed.
protected  boolean isRefreshRequired(ViewAccessorDef va, java.lang.String[] attrNames, java.lang.Object[] attrValues, RowSet rs)
           
 void lock()
          Locks the row in the corresponding database table
protected  void markViewAccessorsDirty(java.lang.String[] attrNames)
           
protected abstract  void populateAttribute(int index, java.lang.Object value)
          Populates the attribute at the given index with the given attribute value.
abstract  void refresh(int refreshMode)
          Refreshes the row's attributes with values from database.
protected  void refreshViewAccessor(ViewAccessorDef va)
           
protected  void refreshViewAccessor(ViewAccessorDef va, Map attrNameValues)
           
protected  void refreshViewAccessor(ViewAccessorDef va, Map attrNameValues, RowSet rs)
           
abstract  void remove()
          Marks the row as removed and removes it from row iterators.
abstract  void removeAndRetain()
          Removes the row from the collection and then retain it for insertion into another location.
abstract  void removeFromCollection()
          Removes the row from the collection.
protected  void reserve(AttributeDefImpl[] attrDefs)
          Reserves space in the underlying storage for all the attributes in this row by inserting appropriate keys and null values
 void setAttribute(int index, java.lang.Object value)
          Set an attribute to the given value
 void setAttribute(java.lang.String name, java.lang.Object value)
          Set an attribute to the given value
 void setEffectiveDateMode(int mode)
          Set the Effective Date mode in which the row updates need to be carried out.
 void setExprVarVal(java.lang.String varName, java.lang.Object val)
           
protected  void setInMultiSetter(List al)
           
abstract  void validate()
          Validates the row
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface oracle.jbo.Row
setAttributeValues, setNewRowState
 

Field Detail

CLASS_INSTANCE

public static final java.lang.Class CLASS_INSTANCE
Constructor Detail

RowImpl

public RowImpl(int initialSize)
What's the current state of this row, i.e. is it new, modified, etc.?


RowImpl

public RowImpl()
Method Detail

init

protected void init(int initialSize)

isDirty

public boolean isDirty(int i)

getKey

public abstract Key getKey()
Returns the row's key.

Specified by:
getKey in interface Row
Returns:
the row's Key.

getStructureDef

public abstract StructureDef getStructureDef()
Returns the structure of the row.

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

isAttributeUpdateable

public abstract boolean isAttributeUpdateable(int index)
Tests if an attribute is updateable.

Specified by:
isAttributeUpdateable in interface Row
Parameters:
index - the index of the attribute.
Returns:
false if the attribute is read-only and true if it is updateable.

isDead

public abstract boolean isDead()
Tests this row to determine if it is dead

Specified by:
isDead in interface Row
Returns:
true if row is dead, false otherwise.

lock

public void lock()
Locks the row in the corresponding database table

Specified by:
lock in interface Row

refresh

public abstract void refresh(int refreshMode)
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 abstract void remove()
Marks the row as removed and removes it from row iterators.

Specified by:
remove in interface Row

removeAndRetain

public abstract void removeAndRetain()
Removes the row from the collection and then retain it for insertion into another location.

This method differs from 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 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

removeFromCollection

public abstract void removeFromCollection()
Removes the row from the collection.

This method differs from 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 removeAndRetain().

Specified by:
removeFromCollection in interface Row

validate

public abstract void validate()
Validates the row

Specified by:
validate in interface Row
See Also:
EntityImpl.validate(), ViewRowImpl.validate()

getAttribute

public java.lang.Object getAttribute(int index)
Get an attribute value by index

Specified by:
getAttribute in interface AttributeList
Parameters:
index - an integer in the range 0 to getAttributeCount() - 1.
Returns:
Attribute value, if index is valid, or null if it is not

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Get an attribute value by name

Specified by:
getAttribute in interface AttributeList
Parameters:
name - an attribute name.
Returns:
Attribute value, if index is valid, or null if it is not

getAttributeCount

public int getAttributeCount()
Gets the # of attributes in this row

Specified by:
getAttributeCount in interface AttributeList
Returns:
# of attributes

getAttributeIndexOf

public int getAttributeIndexOf(java.lang.String name)
Gets the index of the named attribute

Specified by:
getAttributeIndexOf in interface AttributeList
Parameters:
name - the attribute's name.
Returns:
0-based index of the named attribute, or -1 if attribute name is not found

getAttributeNameOf

public java.lang.String getAttributeNameOf(int index)
Gets the name of the specified attribute index

Parameters:
index - 0-based index
Returns:
Corresponding name of attribute

getAttributeNames

public java.lang.String[] getAttributeNames()
Gets a list of the names of all attributes

Specified by:
getAttributeNames in interface AttributeList
Returns:
An array containing all attribute names. Returns a 0-length array if there are none. Note that the array elements are ordered by attribute index

getAttributeValues

public java.lang.Object[] getAttributeValues()
Gets a list of the values of all attributes

Specified by:
getAttributeValues in interface AttributeList
Returns:
An array containing all attribute values. Returns a 0-length array if there are none. Note that the array elements are ordered by attribute index

setAttribute

public void setAttribute(int index,
                         java.lang.Object value)
Set an attribute to the given value

Specified by:
setAttribute in interface AttributeList
Parameters:
index - 0-based index of attribute
value - New value to assign

doSetAttribute

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

doSetAttribute

protected void doSetAttribute(java.lang.String name,
                              java.lang.Object value)

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
Set an attribute to the given value

Specified by:
setAttribute in interface AttributeList
Parameters:
name - Name of attribute
value - New value for attribute

getChangedAttributeDefImpls

public AttributeDefImpl[] getChangedAttributeDefImpls()
Get an array of Attribute indices that would participate in an UPDATE statement

Returns:

getInsertAttributeDefImpls

public AttributeDefImpl[] getInsertAttributeDefImpls()
Get an array of Attribute indices that would participate in an INSERT statement

Returns:

reserve

protected void reserve(AttributeDefImpl[] attrDefs)
Reserves space in the underlying storage for all the attributes in this row by inserting appropriate keys and null values


getEffectiveDate

public java.lang.Object getEffectiveDate()
Simple String representation of this row. Key-value pairs are separated by '=', and tuples are separated by '; '.

Returns:
A String like "Name=Parag; Street=Clairemont Ave; Role=Developer"

getAttributeInternal

protected abstract java.lang.Object getAttributeInternal(int index)
Gets the attribute value by index.

Parameters:
index - attribute index
Returns:
attribute value

getStateAsString

public static java.lang.String getStateAsString(int state)
Utility function to convert the STATE to a string

Returns:
The state of this row.
See Also:
Row

getListBindings

protected abstract List getListBindings()

getListBindingRSI

protected abstract RowSetIterator getListBindingRSI(ListBindingDef def)

hasListBindings

protected abstract boolean hasListBindings()

handleListBindingMismatch

protected abstract void handleListBindingMismatch(ListBinding lb,
                                                  Map valuesMap,
                                                  RowIterator listRSI)

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)

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_DELETE_MODE, Row.EFFDT_DELETE_NEXT_CHANGE_MODE, Row.EFFDT_DELETE_FUTURE_CHANGE_MODE, Row.EFFDT_DELETE_ZAP_MODE

getAllExceptions

protected ArrayList getAllExceptions()

populateAttribute

protected abstract void populateAttribute(int index,
                                          java.lang.Object value)
Populates the attribute at the given index with the given attribute value.

Parameters:
index - an attribute position.
value - the value to be assigned to the attribute.

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.


getCombinedAttrNames

protected final java.lang.String[] getCombinedAttrNames(java.lang.Object[] attrNames,
                                                        List derivedNames)
This method combines the given attribute names with the derived attribute names It throws an exception if the derived attribute names overlap the given names This would happen in a case were the user or a program attempts to set a couple of attributes but the associated list bindings will override at least one of them.

Parameters:
attrNames - list of attribute names to change
derivedNames - list of attribute names that are derived from the listbindings associated with the attributes to change

addListBindingsForAttribute

protected void addListBindingsForAttribute(List lbs,
                                           List attrNames,
                                           java.lang.String attrName,
                                           ArrayList derivedNames,
                                           ArrayList al)
Internal: Applications should not use this method.


setInMultiSetter

protected final void setInMultiSetter(List al)

findAttrAndGetIndex

protected int findAttrAndGetIndex(java.lang.String name)

getExprVarVal

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

setExprVarVal

public void setExprVarVal(java.lang.String varName,
                          java.lang.Object val)
Specified by:
setExprVarVal in interface ExprValueSupplier

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.


isRefreshRequired

protected boolean isRefreshRequired(ViewAccessorDef va,
                                    java.lang.String[] attrNames)
Check if a view accessor should be refreshed when a list of attribute get changed.

Parameters:
va - The View Accessor to be checked.
attrNames - The array of changed attribute.
Returns:
Return true if the View Accessor should be refreshed, orelse, false.

isRefreshRequired

protected boolean isRefreshRequired(ViewAccessorDef va,
                                    java.lang.String[] attrNames,
                                    java.lang.Object[] attrValues)
Check if a view accessor should be refreshed when a list of attribute get changed.

Parameters:
va - The View Accessor to be checked.
attrNames - The array of changed attribute.
attrValues - The array of values for the changed attribute if values are not in the current row.
Returns:
Return true if the View Accessor should be refreshed, orelse, false.

isRefreshRequired

protected boolean isRefreshRequired(ViewAccessorDef va,
                                    java.lang.String[] attrNames,
                                    java.lang.Object[] attrValues,
                                    RowSet rs)

refreshViewAccessor

protected void refreshViewAccessor(ViewAccessorDef va)

refreshViewAccessor

protected void refreshViewAccessor(ViewAccessorDef va,
                                   Map attrNameValues)

refreshViewAccessor

protected void refreshViewAccessor(ViewAccessorDef va,
                                   Map attrNameValues,
                                   RowSet rs)

findViewAccessorDef

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

Parameters:
name - The name of the ViewAccessorDef.
Returns:
The ViewAccessorDef

markViewAccessorsDirty

protected void markViewAccessorsDirty(java.lang.String[] attrNames)

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.