|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Row
A Row is a data repository object having a set of fields represented by array or Field objects. One of the field instance serves as a key field that is assigned a globally unique value.
Examples:
Getting a Field instance from an existing Row:
//retrieving a field instance from a Row using the FieldDescriptor
Field delvDateField = existingRow.getField(delvDateFieldDescriptor);
//retrieving the Row's key field
Field keyField = existingRow.getKeyField();
Retrieving the relating Row objects to this Row using Query:
//retrieving all relating Row objects whose delvDate field is greater than 1999-12-25
Condition condition = queryFactory.createCondition(delvDateFieldDescriptor, RelationalOperatorType.GREATER_THAN, java.sql.Date.valueOf("1999-12-25"));
Query query = queryFactory.createQuery(rowDescriptor, condition);
RowList resultingList = thisRow.getRelatingRows(query);
//retrieving all relating Row objects whose delvDate field is greater than 1999-12-25 and delvTime equals to 12:00:00
Condition dateCondition = queryFactory.createCondition(delvDateFieldDescriptor, RelationalOperatorType.GREATER_THAN, java.sql.Date.valueOf("1999-12-25"));
Condition timeCondition = queryFactory.createCondition(delvTimeFieldDescriptor, RelationalOperatorType.EQUALS, java.sql.Time.valueOf("12:00:00"));
Condition condition = queryFactory.createCondition(new Condition[]{dateCondition, timeCondition}, LogicalOperatorType.AND);
Query query = queryFactory.createQuery(rowDescriptor, condition);
RowList resultingList = thisRow.getRelatingRows(query);
| Method Summary | |
|---|---|
Row |
createInitialCopy()
Returns a copy of Row. |
Row |
createUnlinkedCopy()
Deprecated. use modifyFieldValue(FieldDescriptor, Object) in conjunction
with SyncBo.modifyRow(Row). |
CharacterField |
getCharacterField(FieldDescriptor fieldDescriptor)
Retrieve a StringField object for a specific FieldDescriptor. |
DateField |
getDateField(FieldDescriptor fieldDescriptor)
Retrieve a DateField object for a specific FieldDescriptor. |
DecimalField |
getDecimalField(FieldDescriptor fieldDescriptor)
Retrieve a DecimalField object for a specific FieldDescriptor. |
Field |
getField(FieldDescriptor fieldDescriptor)
Retrieve a Field object for a specific FieldDescriptor. |
Field[] |
getFields()
Retrieve the array of Field objects of this Row. |
java.lang.Object |
getFieldValue(FieldDescriptor fieldDescriptor)
Deprecated. since 2.5. Use new MI 2.5 data types in conjunction with Field.getValue() instead. |
MeIterator |
getFieldValues()
Returns an iterator for the field values of this Row object |
Field[] |
getGroupFields(FieldGroupDescriptor fieldGroupDescriptor)
Returns the array of Field objects that are of the same groups as specified in the FieldGroupDescriptor |
java.lang.String |
getKey()
Returns the key field value of this Row object. |
Field |
getKeyField()
Returns the Field instance of the key field value |
NumericField |
getNumericField(FieldDescriptor fieldDescriptor)
Retrieve a NumericField object for a specific FieldDescriptor. |
Row |
getRelatedRow(RowDescriptor relatedRow)
Returns the Row instance of the related Row described by the specified RowDescriptor. |
RowList |
getRelatingRows(Query query)
Returns a list of the Row objects complying to the specified Query relating to this Row |
RowList |
getRelatingRows(RowDescriptor relatingRowDescriptor)
Returns a list of the Row objects relating to this Row. |
RowDescriptor |
getRowDescriptor()
Returns the RowDescriptor attribute of this Row object |
StatusType |
getStatus()
Returns the status attribute of this Row object. |
SyncBo |
getSyncBo()
Returns the SyncBo object which this Row instance belongs to |
java.lang.String |
getSyncKey()
|
TimeField |
getTimeField(FieldDescriptor fieldDescriptor)
Retrieve a TimeField object for a specific FieldDescriptor. |
void |
modifyFieldValue(FieldDescriptor field,
java.lang.Object fieldValue)
Modifies the field value of this Row. |
void |
setFieldValue(FieldDescriptor fieldDescriptor,
java.lang.Object fieldValue)
Deprecated. use modifyFieldValue(FieldDescriptor, Object) |
| Method Detail |
|---|
RowDescriptor getRowDescriptor()
java.lang.Object getFieldValue(FieldDescriptor fieldDescriptor)
Field.getValue() instead.
fieldDescriptor - the FieldDescriptor of the field value to be
retrieved
for the returned data types in 2.1 versionMeIterator getFieldValues()
void setFieldValue(FieldDescriptor fieldDescriptor,
java.lang.Object fieldValue)
throws ModificationNotAllowedException,
PersistenceException
modifyFieldValue(FieldDescriptor, Object)
fieldDescriptor - the FieldDescriptor of the
field attribute to be modifiedfieldValue - the new field value to be set
ModificationNotAllowedException - is thrown for the following cases: use instead.NOTE:
- if the specified FieldDescriptor belongs to the key field
- if the SyncBo which this Row belongs and the Row itself have a GLOBAL status and the SyncBo's modify permission is false.
- if the SyncBo which this Row belongs is in synchronization state i.e. having an IN_SYNC status.
From 2.1 SP02, the data validity check is left to the application side. The application may use the FieldDescriptor.checkFieldValue method to verify the field value to be set.
PersistenceException - is thrown if a persistent
related error occurred during the value updatefor the data type mapping in 2.1 version
RowList getRelatingRows(RowDescriptor relatingRowDescriptor)
throws PersistenceException
relatingRowDescriptor - the RowDescriptor of the Row object
instance
PersistenceException - is thrown if a persistent related error
occurred during the attribute retrieval
RowList getRelatingRows(Query query)
throws PersistenceException
query - the Query instance specifying the criteria of the Row objects to be returned
PersistenceException - is thrown if a persistent related error
occurred during the attribute retrieval
Row getRelatedRow(RowDescriptor relatedRow)
throws PersistenceException
relatedRow - the RowDescriptor of the Row object
related to this Row instance
PersistenceException - is thrown if a persistent related error
occurred during the attribute retrieval
SyncBo getSyncBo()
throws PersistenceException
PersistenceException - is thrown if a persistent related error
occurred during the object retrievalRow createUnlinkedCopy()
modifyFieldValue(FieldDescriptor, Object) in conjunction
with SyncBo.modifyRow(Row).
SyncBo.replaceRow(Row row) .
NOTE:
Row createInitialCopy()
SyncBo.insertRow(Row row)
.
java.lang.String getKey()
StatusType getStatus()
StatusType
Field getField(FieldDescriptor fieldDescriptor)
throws SmartSyncException
fieldDescriptor - descriptor for identification a field
SmartSyncExceptionField
Field getKeyField()
throws SmartSyncException
SmartSyncExceptionField[] getFields()
Field
DateField getDateField(FieldDescriptor fieldDescriptor)
throws SmartSyncException
fieldDescriptor - descriptor for identification a field
SmartSyncExceptionField
TimeField getTimeField(FieldDescriptor fieldDescriptor)
throws SmartSyncException
fieldDescriptor - descriptor for identification a field
SmartSyncExceptionField
NumericField getNumericField(FieldDescriptor fieldDescriptor)
throws SmartSyncException
fieldDescriptor - descriptor for identification a field
SmartSyncExceptionField
DecimalField getDecimalField(FieldDescriptor fieldDescriptor)
throws SmartSyncException
fieldDescriptor - descriptor for identification a field
SmartSyncExceptionField
CharacterField getCharacterField(FieldDescriptor fieldDescriptor)
throws SmartSyncException
fieldDescriptor - descriptor for identification a field
SmartSyncExceptionField
Field[] getGroupFields(FieldGroupDescriptor fieldGroupDescriptor)
throws SmartSyncException
fieldGroupDescriptor - the FieldGroupDescriptor instance
SmartSyncException - if the specified fieldGroupDescriptor is not defined for this Row.java.lang.String getSyncKey()
void modifyFieldValue(FieldDescriptor field,
java.lang.Object fieldValue)
throws ModificationNotAllowedException
setFieldValue(FieldDescriptor, Object) is that this method does the modification
only transient on this object.
To persist the change you need to call SyncBo.modifyRow(Row)
with this Row as parameter.
field - fieldValue -
ModificationNotAllowedException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||