|
||||||||||
| 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 Form| Field Summary | |
|---|---|
protected static Integer |
DELETING
Internal state for DELETING. |
protected static Integer |
DETAILS_CHANGED
Internal state for changed detail rows. |
protected static Integer |
INSERTING
Internal state for INSERTING. |
protected static int |
INTERNAL_OFFSET
Internal Offset in the AbstractStorage Array for the Inserting, etc.. states. |
protected static Integer |
UPDATING
Internal state for UPDATING. |
protected static 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,
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()
Returns the corresponding IDataPage of the IDataRow. |
IDataRow |
getOriginalRow()
Returns the original row, before the first change is made. |
int |
getRowIndex()
Returns the row index of the IDataRows in the IDataPage. |
Object |
getUID()
Returns the internal unique identifier for a IChangeableDataRow, which
isInserting(). |
boolean |
isDeleting()
Returns if this row is deleted. |
boolean |
isDetailChanged()
Returns true if under this row in the detail DataBook one or more changed (isInserting/Updating/Deleting() == true) detail rows existing. |
boolean |
isInserting()
Returns if this row is new. |
boolean |
isUpdating()
Returns if this row is changed. |
boolean |
isWritableColumnChanged()
Returns true if one isWritableColumnChanged() column is 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(Object pUID)
Sets the internal Unique Identifier for the ChangeableDataRow. |
protected void |
setUpdating()
It marks this ChangeableDataRow as UPDATING. |
protected void |
setValueDRInternal(String pColumnName,
Object pValue)
Sets the value of the named column in this IDataRow. |
protected void |
store()
It stores the changes in memory as stored. |
String |
toString()
|
| Methods inherited from class com.sibvisions.rad.model.mem.DataRow |
|---|
addControl, cancelEditingControls, compareTo, compareTo, createDataRow, createEmptyRow, equals, equals, eventValuesChanged, getControls, getRowDefinition, getValue, getValue, getValueAsString, getValues, getValuesAsString, hashCode, invokeCancelEditingControls, invokeRepaintListeners, invokeSaveEditingControls, notifyRepaintControls, removeControl, saveEditingControls, setDefaultValues, setValue, setValues |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.rad.model.IDataRow |
|---|
addControl, compareTo, createDataRow, createEmptyRow, equals, eventValuesChanged, getControls, getRowDefinition, getValue, getValue, getValueAsString, getValues, getValuesAsString, removeControl, setValue, setValues |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Field Detail |
|---|
protected static final int INTERNAL_OFFSET
protected static final Integer INSERTING
protected static final Integer UPDATING
protected static final Integer WRITABLE_COLUMN_CHANGED
protected static final Integer DELETING
protected static final Integer DETAILS_CHANGED
| Constructor Detail |
|---|
protected ChangeableDataRow()
public ChangeableDataRow(IRowDefinition pRowDefinition)
DataRow with a given IRowDefinition.
pRowDefinition - the IRowDefinition
protected ChangeableDataRow(IRowDefinition pRowDefinition,
Object[] pData,
IDataPage pDataPage,
int pRowIndex)
DataRow with a given IRowDefinition
and initialize it a copy of the Object[]<> data.
pRowDefinition - the IRowDefinitionpData - the Object[]<> with data of the DataRow.pDataPage - the correspondingIDataPage of the IDataRow in the IDataBookpRowIndex - the row index of the IDataRow in the IDataBook| Method Detail |
|---|
public IDataPage getDataPage()
IDataPage of the IDataRow.
That returns != null only if the IDataRow is from a IDataBook
getDataPage in interface IChangeableDataRowIDataPage of the IDataRow.public int getRowIndex()
IDataRows in the IDataPage.
That returns != -1 only if the IDataRow is from a IDataPage
getRowIndex in interface IChangeableDataRowIDataRows in the IDataPage.
public Object getUID()
throws ModelException
IChangeableDataRow, which
isInserting().
getUID in interface IChangeableDataRowIChangeableDataRow, which
isInserting().
ModelException - if UID couldn't determined
public boolean isInserting()
throws ModelException
isInserting in interface IChangeableDataRowModelException - if is inserting couldn't determined
public boolean isUpdating()
throws ModelException
isUpdating in interface IChangeableDataRowModelException - if is updating couldn't determined
public boolean isDeleting()
throws ModelException
isDeleting in interface IChangeableDataRowModelException - if is deleting couldn't determined
public boolean isDetailChanged()
throws ModelException
isDetailChanged in interface IChangeableDataRowModelException - if is detail changed couldn't determined
public IDataRow getOriginalRow()
throws ModelException
getOriginalRow in interface IChangeableDataRowModelException - if original row couldn't determined
public boolean isWritableColumnChanged()
throws ModelException
isWritableColumnChanged in interface IChangeableDataRowModelException - if writable column changed couldn't determinedpublic String toString()
toString in class DataRow
protected void setValueDRInternal(String pColumnName,
Object pValue)
throws ModelException
IDataRow.
setValueDRInternal in class DataRowpColumnName - the column namepValue - the new value for the column in this IDataRow
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(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 | |||||||||