*/
private static void parsePersistentElements(
final Element root,
final PersistenceDefinition definition) {
for (Iterator it1 = root.elementIterator("persistent"); it1.hasNext();) {
final PersistentObjectDefinition persistentDef =
new PersistentObjectDefinition();
final Element persistent = (Element)it1.next();
for (Iterator it2 = persistent.attributeIterator(); it2.hasNext();) {
Attribute attribute = (Attribute)it2.next();
String name = attribute.getName().trim();
String value = attribute.getValue().trim();
if (name.equals("class")) {
persistentDef.setClassName(value);
continue;
}
}
for (Iterator it2 = persistent.elementIterator(); it2.hasNext();) {
Element nestedAdviceElement = (Element)it2.next();
if (nestedAdviceElement.getName().trim().equals("index-ref")) {
IndexRefDefinition indexDef = new IndexRefDefinition();
indexDef.setName(nestedAdviceElement.attributeValue("name"));
indexDef.setMethod(nestedAdviceElement.attributeValue("method"));
persistentDef.addIndexRef(indexDef);
}
}
definition.addPersistentObject(persistentDef);
}