|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sibvisions.rad.model.mem.DataRow
com.sibvisions.rad.model.mem.ChangeableDataRow
public class ChangeableDataRow
An IChangeableDataRow
extends the IDataRow
with support for
the change state of the row, some supporting methods and an unique ID column.
IDataRow
,
IDataPage
,
IDataBook
,
Serialized FormField Summary | |
---|---|
protected static java.lang.Integer |
DELETING
Internal state for DELETING. |
protected static java.lang.Integer |
DETAILS_CHANGED
Internal state for changed detail rows. |
protected IDataPage |
dpDataPage
The corresponding IDataPage of the IDataRow in the IDataBook . |
protected static java.lang.Integer |
INSERTING
Internal state for INSERTING. |
protected static int |
INTERNAL_OFFSET
Internal Offset in the AbstractStorage Array for the Inserting, etc.. states. |
protected int |
iRowIndex
The row index of the IDataRow in the IDataBook . |
protected static java.lang.Integer |
UPDATING
Internal state for UPDATING. |
protected static java.lang.Integer |
WRITABLE_COLUMN_CHANGED
Internal state for UPDATING, if minimum one writeable column is involved. |
Fields inherited from class com.sibvisions.rad.model.mem.DataRow |
---|
oaStorage, rdRowDefinition |
Constructor Summary | |
---|---|
protected |
ChangeableDataRow()
Internal default constructor for the MemDataBook. |
|
ChangeableDataRow(IRowDefinition pRowDefinition)
Constructs a DataRow with a given IRowDefinition . |
protected |
ChangeableDataRow(IRowDefinition pRowDefinition,
java.lang.Object[] pData,
IDataPage pDataPage,
int pRowIndex)
Constructs a DataRow with a given IRowDefinition
and initialize it a copy of the Object[] data. |
Method Summary | |
---|---|
IDataPage |
getDataPage()
Gets the parent IDataPage . |
IDataRow |
getOriginalDataRow()
Gets the original IDataRow , before any changes were performed. |
IDataRow |
getOriginalRow()
Deprecated. |
int |
getRowIndex()
Gets the row index within the parent IDataPage . |
java.lang.Object |
getUID()
Gets the internal unique identifier for this IDataRow . |
boolean |
isDeleting()
Gets if this row is currently being deleted, which means that it has been removed/deleted but this action has not yet been finalized. |
boolean |
isDetailChanged()
Gets if any associated detail rows have been modified. |
boolean |
isInserting()
Gets if this row is currently being inserted, which means that it has been created but has not yet been saved/finalized. |
boolean |
isUpdating()
Gets if this row is currently being updated, which means that its values are changed but these changes have not yet been saved/finalized. |
boolean |
isWritableColumnChanged()
Gets if there was a writeable column changed. |
protected void |
restore()
It clears all changes in the ChangeableDataRow, and use the original values before the changes. |
protected void |
setDeleting()
It marks this ChangeableDataRow as DELETING. |
protected void |
setDetailChanged(boolean bChanged)
True, If under this row in the detail DataBook one or more changed (isInserting/Updating/Deleting() == true) detail rows existing. |
protected void |
setInserting()
It marks this ChangeableDataRow as INSERTING. |
protected void |
setUID(java.lang.Object pUID)
Sets the internal Unique Identifier for the ChangeableDataRow. |
protected void |
setUpdating()
It marks this ChangeableDataRow as UPDATING. |
protected void |
setValueIntern(int pColumnIndex,
java.lang.Object pValue,
ColumnDefinition pColumnDefinition)
Sets the value of the named column in this IDataRow . |
protected void |
store()
It stores the changes in memory as stored. |
java.lang.String |
toString()
|
Methods inherited from class com.sibvisions.rad.model.mem.DataRow |
---|
addControl, cancelEditingControls, compareTo, compareTo, createDataRow, createEmptyDataRow, createEmptyRow, equals, equals, eventValuesChanged, eventValuesChanged, getControls, getRowDefinition, getValue, getValue, getValueAsString, getValues, getValuesAsString, hasControls, hashCode, invokeCancelEditingControls, invokeRepaintListeners, invokeSaveEditingControls, notifyRepaintControls, removeControl, saveEditingControls, setDefaultValues, setValue, setValues, setValuesIntern |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.rad.model.IDataRow |
---|
addControl, cancelEditingControls, compareTo, createDataRow, createEmptyDataRow, createEmptyRow, equals, eventValuesChanged, eventValuesChanged, getControls, getRowDefinition, getValue, getValue, getValueAsString, getValues, getValuesAsString, notifyRepaintControls, removeControl, saveEditingControls, setValue, setValues |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Field Detail |
---|
protected static final int INTERNAL_OFFSET
protected static final java.lang.Integer INSERTING
protected static final java.lang.Integer UPDATING
protected static final java.lang.Integer WRITABLE_COLUMN_CHANGED
protected static final java.lang.Integer DELETING
protected static final java.lang.Integer DETAILS_CHANGED
protected transient IDataPage dpDataPage
IDataPage
of the IDataRow
in the IDataBook
.
protected transient int iRowIndex
IDataRow
in the IDataBook
.
Constructor Detail |
---|
protected ChangeableDataRow()
public ChangeableDataRow(IRowDefinition pRowDefinition)
DataRow
with a given IRowDefinition
.
pRowDefinition
- the IRowDefinition
protected ChangeableDataRow(IRowDefinition pRowDefinition, java.lang.Object[] pData, IDataPage pDataPage, int pRowIndex)
DataRow
with a given IRowDefinition
and initialize it a copy of the Object[]
data.
pRowDefinition
- the IRowDefinition
pData
- the Object[]
with data of the DataRow
.pDataPage
- the correspondingIDataPage
of the IDataRow
in the IDataBook
pRowIndex
- the row index of the IDataRow
in the IDataBook
Method Detail |
---|
public IDataPage getDataPage()
IDataPage
.
getDataPage
in interface IChangeableDataRow
IDataPage
, can null
if there is no
parent IDataPage
.public int getRowIndex()
IDataPage
.
getRowIndex
in interface IChangeableDataRow
IDataPage
, can be
-1
if there is no parent IDataPage
.public java.lang.Object getUID() throws ModelException
IDataRow
.
getUID
in interface IChangeableDataRow
IDataRow
.
ModelException
- if the unique identifier could not be determined.public boolean isInserting() throws ModelException
isInserting
in interface IChangeableDataRow
true
if this row is currently being inserted.
ModelException
- if the state could not be determined.public boolean isUpdating() throws ModelException
isUpdating
in interface IChangeableDataRow
true
if this row is currently being changed.
ModelException
- if the state could not be determined.public boolean isDeleting() throws ModelException
isDeleting
in interface IChangeableDataRow
ModelException
- if the state could not be determined.public boolean isDetailChanged() throws ModelException
isDetailChanged
in interface IChangeableDataRow
true
if any associated detail rows have been modified.
ModelException
- if the state of the detail rows could not be
determined.@Deprecated public IDataRow getOriginalRow() throws ModelException
IDataRow
, before any changes were performed.
getOriginalRow
in interface IChangeableDataRow
IDataRow
, before any changes were performed.
ModelException
- if the original IDataRow
could not be got.public IDataRow getOriginalDataRow() throws ModelException
IDataRow
, before any changes were performed.
getOriginalDataRow
in interface IChangeableDataRow
IDataRow
, before any changes were performed.
ModelException
- if the original IDataRow
could not be got.public boolean isWritableColumnChanged() throws ModelException
isWritableColumnChanged
in interface IChangeableDataRow
true
if there was a writeable column changed.
ModelException
- if the state could not be determined.public java.lang.String toString()
toString
in class DataRow
protected void setValueIntern(int pColumnIndex, java.lang.Object pValue, ColumnDefinition pColumnDefinition) throws ModelException
IDataRow
.
setValueIntern
in class DataRow
pColumnIndex
- the column namepValue
- the new value for the column in this IDataRow
pColumnDefinition
- the ColumnDefinition
ModelException
- if the column name is not in this IDataRow
or the pValue is not convertible/too large to/for the IDataType
of the columnprotected void setUID(java.lang.Object pUID)
pUID
- the new Unique Identifierprotected void setInserting()
protected void setUpdating()
protected void setDeleting()
protected void restore() throws ModelException
ModelException
- if isUpdate() couldn't correct determined.protected void store() throws ModelException
ModelException
- that the override methods could throw an exceptionprotected void setDetailChanged(boolean bChanged)
bChanged
- true if changed detail rows exists
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |