com.sap.ip.me.api.smartsync
Interface RowDescriptor


public interface RowDescriptor

A RowDescriptor instance describes the metadata definition for a Row object. It provides access to the following:

Example usage:
Where parentRow is a Row

 RowDescriptor rowDesc = parentRow.getRowDescriptor();

 //To get a FieldDescriptor of a Field.
 FieldDescriptor fieldDesc = rowDesc.getFieldDescriptor("field name");

 //To get the row name
 String rowName = rowDesc.getRowName();

 //To check if this is mandatory
 boolean mandatory = rowDesc.isMandatory();

 //To get the field descriptor of the key field
 FieldDescriptor fieldDescKey =  rowDesc.getKeyFieldDescriptor();
 

Version:
2.1
Author:
SAP

Method Summary
 FieldDescriptorIterator getAllFieldDescriptors()
          Returns all FieldDescriptor instances belonging to this RowDescriptor instance
 int getFieldCount()
          Returns the number of fields in the Row defined by this RowDescriptor
 FieldDescriptor getFieldDescriptor(java.lang.String fieldName)
          Returns the FieldDescriptor instance for the speficied field name
 int getFieldIndex(FieldDescriptor fieldDescriptor)
          Returns the index number of the field attribute for the specified FieldDescriptor
 FieldDescriptor getKeyFieldDescriptor()
          Returns the key field's FieldDescriptor.
 RelationDescriptorIterator getRelatingRelations()
          Returns all RelationDescriptor instances which are relating to the Row defined by this RowDescriptor.
 java.lang.String getRowName()
          Returns the name of the Row defined by this RowDescriptor
 SyncBoDescriptor getSyncBoDescriptor()
          Returns the SyncBoDescriptor instance this RowDescriptor instance belongs.
 boolean hasFieldDescriptor(FieldDescriptor fieldDescriptor)
          Returns a boolean value indicating whether the specified FieldDescriptor is a member of this RowDescriptor instance.
 boolean isMandatory()
          Returns the boolean attribute value indicating whether the Row object defined by this RowDescriptor is mandatory or not.
 boolean isTop()
          Returns a boolean value indicating whether this RowDescriptor is a TOP RowDescriptor.
 

Method Detail

getRowName

public java.lang.String getRowName()
Returns the name of the Row defined by this RowDescriptor

Returns:
the name of the Row defined by this RowDescriptor

isMandatory

public boolean isMandatory()
Returns the boolean attribute value indicating whether the Row object defined by this RowDescriptor is mandatory or not. Mandatory means that a SyncBo object having this defined Row as a child Row should have at least one row existing.
NOTE:
On SP2, this permission flag is not used on any data validity tests as the corresponding server-side component that validates/implements this feature is not yet available.

Returns:
true if the described Row is mandatory, otherwise false

getKeyFieldDescriptor

public FieldDescriptor getKeyFieldDescriptor()
Returns the key field's FieldDescriptor. This is equivalent to getFieldDescriptor("SYNC_KEY").

Returns:
the FieldDescriptor of this Row's key field

getFieldDescriptor

public FieldDescriptor getFieldDescriptor(java.lang.String fieldName)
Returns the FieldDescriptor instance for the speficied field name

Parameters:
fieldName - the name of the field
Returns:
the FieldDescriptor instance for the speficied field name

getAllFieldDescriptors

public FieldDescriptorIterator getAllFieldDescriptors()
Returns all FieldDescriptor instances belonging to this RowDescriptor instance

Returns:
the FieldDescriptorIterator instance of all FieldDescriptor instances belonging to this RowDescriptor instance

getRelatingRelations

public RelationDescriptorIterator getRelatingRelations()
Returns all RelationDescriptor instances which are relating to the Row defined by this RowDescriptor.

Returns:
all RelationDescriptorIterator instances which are relating to this RowDescriptor

getSyncBoDescriptor

public SyncBoDescriptor getSyncBoDescriptor()
Returns the SyncBoDescriptor instance this RowDescriptor instance belongs.

Returns:
the SyncBoDescriptor instance which this RowDescriptor instance belongs.

getFieldCount

public int getFieldCount()
Returns the number of fields in the Row defined by this RowDescriptor

Returns:
the number of fields in the Row

getFieldIndex

public int getFieldIndex(FieldDescriptor fieldDescriptor)
Returns the index number of the field attribute for the specified FieldDescriptor

Parameters:
fieldDescriptor - the specified FieldDescriptor
Returns:
the field index number of the specified FieldDescriptor

hasFieldDescriptor

public boolean hasFieldDescriptor(FieldDescriptor fieldDescriptor)
Returns a boolean value indicating whether the specified FieldDescriptor is a member of this RowDescriptor instance.

Parameters:
fieldDescriptor - the FieldDescriptor instance that is to be checked.
Returns:
true true if the specified FieldDescriptor is member of this RowDescriptor object; otherwise false

isTop

public boolean isTop()
Returns a boolean value indicating whether this RowDescriptor is a TOP RowDescriptor.

Returns:
true if a TOP RowDescriptor; else false


Copyright © 2005 SAP AG. All Rights Reserved.