Business Components

oracle.jbo.server
Class RowImpl

java.lang.Object
  |
  +--oracle.jbo.common.BaseObject
        |
        +--oracle.jbo.server.RowImpl
Direct Known Subclasses:
EntityImpl, ViewRowImpl

public abstract class RowImpl
extends BaseObject
implements Row

Provides the internal access mechanism for ViewRow and Entity row objects.

Since:
JDeveloper 3.0
See Also:
ViewRowImpl, Entity

Fields inherited from class oracle.jbo.common.BaseObject
TRACE_EVERY_ALLOC, TRACE_NONE, TRACE_OCCASIONAL, TRACE_UNINITIALIZED
 
Constructor Summary
RowImpl()
           
 
Method Summary
protected abstract  void create(AttributeList nameValuePair)
          This method is called to let subclasses of RowImpl to set programmatic default values for attributes.
abstract  int getAttributeCount()
          Counts the attributes in this row.
abstract  int getAttributeIndexOf(java.lang.String name)
          Finds the index of a named attribute.
protected abstract  java.lang.Object getAttributeInternal(int index)
          Gets the the attribute value by index.
protected  java.lang.Object getAttributeInternal(java.lang.String name)
          Gets the attribute value by name.
abstract  Key getKey()
          Gets the identifier object for this row.
abstract  boolean isAttributeUpdateable(int index)
          Tests if an attribute is updateable.
abstract  void lock()
          Locks the row object and the corresponding row in the database.
protected abstract  void populateAttribute(int index, java.lang.Object value)
           
abstract  void remove()
          Marks the row as removed and removes it from row iterators.
protected abstract  void setAttributeInternal(int index, java.lang.Object value)
          Sets the attribute value by index after performing declarative attribute-level validations.
protected  void setAttributeInternal(java.lang.String name, java.lang.Object value)
          Sets the attribute value by name.
abstract  void validate()
          Invokes the validate method for the validators attached to this business object.
 
Methods inherited from class oracle.jbo.common.BaseObject
dumpState, setTraceLevel, setTraceWriter
 
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

create

protected abstract void create(AttributeList nameValuePair)
This method is called to let subclasses of RowImpl to set programmatic default values for attributes. If sub-classed, super.create should be called to let the framework setup initial states on the row.


getAttributeInternal

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

getAttributeInternal

protected final java.lang.Object getAttributeInternal(java.lang.String name)
Gets the attribute value by name. This method throws a JboException if an attribute of given name is not found.
Parameters:
name - attribute name
Returns:
attribute value

setAttributeInternal

protected abstract void setAttributeInternal(int index,
                                             java.lang.Object value)
Sets the attribute value by index after performing declarative attribute-level validations.

This method is used by code-gen facility in accessors for entity attributes.

Parameters:
index - attribute index
value - attribute value

setAttributeInternal

protected final void setAttributeInternal(java.lang.String name,
                                          java.lang.Object value)
Sets the attribute value by name. Find index for given attribute and invoke setAttributeInternal(index, value)

This method is used by code-gen facility in accessors for viewrow attributes.

Parameters:
name - column name.
value - column data.

lock

public abstract void lock()
Locks the row object and the corresponding row in the database.
Specified by:
lock in interface Row
Tags copied from interface: Row
Throws:
JboException, - a runtime exception, if an exception occurs during access.

getAttributeCount

public abstract int getAttributeCount()
Counts the attributes in this row.
Returns:
the number of attributes.

getAttributeIndexOf

public abstract int getAttributeIndexOf(java.lang.String name)
Finds the index of a named attribute.
Parameters:
an - attribute name.
Returns:
the index of name, or -1 if not found.

populateAttribute

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

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:
true if the row is marked UPDATEABLE, or if the row is marked UPDATEABLE_WHILE_NEW and the current row is new.

getKey

public abstract Key getKey()
Gets the identifier object for this row.
Specified by:
getKey in interface Row
Returns:
the row's key.

validate

public abstract void validate()
Invokes the validate method for the validators attached to this business object.
Specified by:
validate in interface Row
Tags copied from interface: Row
Throws:
JboException, - a runtime exception, if the recipient wishes the property change to be rolled back.

remove

public abstract void remove()
Marks the row as removed and removes it from row iterators.
Specified by:
remove in interface Row
Tags copied from interface: Row
Throws:
JboException, - a runtime exception, if an exception occurs during access.

Business Components