|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
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()
Returns a clone of 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 |
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()
Deprecated. use @link Row#getSyncKey() instead. |
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()
Deprecated. |
SyncBo |
getSyncBo()
Returns the SyncBo object which this Row instance belongs to |
TimeField |
getTimeField(FieldDescriptor fieldDescriptor)
Retrieve a TimeField object for a specific FieldDescriptor. |
void |
setFieldValue(FieldDescriptor fieldDescriptor,
java.lang.Object fieldValue)
Deprecated. since 2.5 |
| Method Detail |
public RowDescriptor getRowDescriptor()
public java.lang.Object getFieldValue(FieldDescriptor fieldDescriptor)
fieldDescriptor - the FieldDescriptor of the field value to be
retrieved
for the returned data types in 2.1 versionpublic MeIterator getFieldValues()
public void setFieldValue(FieldDescriptor fieldDescriptor,
java.lang.Object fieldValue)
throws ModificationNotAllowedException,
PersistenceException
fieldDescriptor - the FieldDescriptor of the
field attribute to be modifiedfieldValue - the new field value to be set
ModificationNotAllowedException - is thrown for the following cases: 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
public 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
public 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
public 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
public SyncBo getSyncBo()
throws PersistenceException
PersistenceException - is thrown if a persistent related error
occurred during the object retrievalpublic Row createUnlinkedCopy()
SyncBo.replaceRow(Row row) .
NOTE:
public Row createInitialCopy()
SyncBo.insertRow(Row row)
.
public java.lang.String getKey()
public StatusType getStatus()
StatusType
public Field getField(FieldDescriptor fieldDescriptor)
throws SmartSyncException
SmartSyncExceptionField
public Field getKeyField()
throws SmartSyncException
SmartSyncExceptionpublic Field[] getFields()
Field
public DateField getDateField(FieldDescriptor fieldDescriptor)
throws SmartSyncException
SmartSyncExceptionField
public TimeField getTimeField(FieldDescriptor fieldDescriptor)
throws SmartSyncException
SmartSyncExceptionField
public NumericField getNumericField(FieldDescriptor fieldDescriptor)
throws SmartSyncException
SmartSyncExceptionField
public DecimalField getDecimalField(FieldDescriptor fieldDescriptor)
throws SmartSyncException
fieldDescriptor - descriptor for identification a field
SmartSyncExceptionField
public CharacterField getCharacterField(FieldDescriptor fieldDescriptor)
throws SmartSyncException
fieldDescriptor - descriptor for identification a field
SmartSyncExceptionField
public Field[] getGroupFields(FieldGroupDescriptor fieldGroupDescriptor)
throws SmartSyncException
fieldGroupDescriptor - the FieldGroupDescriptor instance
SmartSyncException - if the specified fieldGroupDescriptor is not defined for this Row.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||