// only include identifier for the root class.
if ( pc.hasIdentifierProperty() ) {
properties.add( pc.getIdentifierProperty() );
}
else if ( pc.hasEmbeddedIdentifier() ) {
Component embeddedComponent = (Component) pc.getIdentifier();
iterators.add( embeddedComponent.getPropertyIterator() );
}
/*if(clazz.isVersioned() ) { // version is already in property set
properties.add(clazz.getVersion() );
}*/
}
// iterators.add( pc.getPropertyIterator() );
// Need to skip <properties> element which are defined via "embedded" components
// Best if we could return an intelligent iterator, but for now we just iterate explicitly.
Iterator pit = pc.getPropertyIterator();
while(pit.hasNext())
{
Property element = (Property) pit.next();
if ( element.getValue() instanceof Component
&& element.getPropertyAccessorName().equals( "embedded" )) {
Component component = (Component) element.getValue();
// need to "explode" property to get proper sequence in java code.
Iterator embeddedProperty = component.getPropertyIterator();
while(embeddedProperty.hasNext()) {
properties.add(embeddedProperty.next());
}
} else {
properties.add(element);