|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
The FieldGroupDescriptor is a metadata interface that holds the description of a certain FieldGroup instance. Here is an example for usage. We assume that the following a part of meta data is stored in SyncBoDescriptorFacade repository.
<SyncBO id="SAP001" version="1" type="timedTwoWay" allowCreate="true" allowModify="true" allowDelete="true" reqDirectSync="false">
<TopStructure name="TOP">
<Field name="SYNC_KEY" type="N" length="10" decimalLength="0" signed="false" isKey="true" isIndex="true">
<Input type="create">false</Input>
<Input type="modify">false</Input>
</Field>
<Field name="NFIELD" type="N" length="10" decimalLength="0" signed="false" isKey="false" isIndex="false" />
<Field name="CFIELD" type="C" length="50" decimalLength="0" signed="false" isKey="false" isIndex="false" />
<Field name="DFIELD" type="D" length="8" decimalLength="0" signed="false" isKey="false" isIndex="false" />
<Field name="TFIELD" type="T" length="6" decimalLength="0" signed="false" isKey="false" isIndex="false" />
<Field name="PFIELD" type="P" length="10" decimalLength="3" signed="false" isKey="false" isIndex="false" />
<FieldGroup name="GROUP1" type="T">
<Field name="DFIELD" />
<Field name="TFIELD" />
</FieldGroup>
</TopStructure>
</SyncBO>
To get user defined group name, use getName() method.
FieldGroupDescriptor group1 = dFieldDescriptor.getFieldGroupDescriptor(FieldGroupType.T);
String name = group1.getName();
System.out.println("name is "+name);
Output: name is GROUP1
To get group type, use getFieldGroupType().
FieldGroupType type = group1.getFieldGroupType();
System.out.println("type is "+type.toString());
* Output: name is T
To get an iterator over a collection of FieldDescriptor in the group, use getAllFieldDescriptors() method.
FieldDescriptorIterator itr = group1.getAllFieldDescriptors();
while(itr.hasNext()) {
FieldDescriptor fieldDesc = itr.next();
String fName = fieldDesc.getFieldName();
System.out.println("field name:"+fName+" ");
}
Output: field name is DFIELD
filed name is TFIELD
| Method Summary | |
FieldDescriptorIterator |
getAllFieldDescriptors()
return an iterator over a collection of FieldDescriptor objects. |
FieldGroupType |
getFieldGroupType()
returns FieldGroupType that currently has the followings. |
java.lang.String |
getName()
return user specified group name |
| Method Detail |
public FieldGroupType getFieldGroupType()
public java.lang.String getName()
public FieldDescriptorIterator getAllFieldDescriptors()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||