// --------------------------------------------------------------------
LOG.info( "Begin: Walking the mapping descriptor via objects" );
MappingRoot mappingRoot = _mapping.getRoot();
ClassMapping classMap;
FieldMapping fieldMap;
FieldMapping[] fieldMaps;
int mappingCount = mappingRoot.getClassMappingCount();
// loop over the classes
for ( int i = 0; i < mappingCount; ++i )
{
classMap = mappingRoot.getClassMapping( i );
LOG.debug( "Class name: " + classMap.getName() );
int fieldCount = classMap.getClassChoice().getFieldMappingCount();
fieldMaps = classMap.getClassChoice().getFieldMapping();
LOG.debug( "fieldMaps.length: " + fieldMaps.length );
// loop over the fields in each class
for ( int j = 0; j < fieldMaps.length; ++j )
{
fieldMap = fieldMaps[j];
LOG.debug( " Field name: " + fieldMap.getName() );
LOG.debug( " Field type: " + fieldMap.getType() );
}
}
LOG.info( "End: Walking the mapping descriptor via objects" );
// --------------------------------------------------------------------