return;
}
}
// Doesn't exist in deployment descriptor -- add new
PersistenceUnitRefType persistenceUnitRef = annotatedApp.addNewPersistenceUnitRef();
//------------------------------------------------------------------------------
// <persistence-unit-ref> required elements:
//------------------------------------------------------------------------------
// persistence-unit-ref-name
JndiNameType unitRefName = persistenceUnitRef.addNewPersistenceUnitRefName();
unitRefName.setStringValue(persistenceUnitRefName);
//------------------------------------------------------------------------------
// <persistence-unit-ref> optional elements:
//------------------------------------------------------------------------------
// persistence-unit-name
String unitNameAnnotation = annotation.unitName();
if (!unitNameAnnotation.equals("")) {
org.apache.geronimo.xbeans.javaee.String persistenceUnitName = persistenceUnitRef.addNewPersistenceUnitName();
persistenceUnitName.setStringValue(unitNameAnnotation);
}
// injection targets
if (method != null || field != null) {
configureInjectionTarget(persistenceUnitRef.addNewInjectionTarget(), method, field);
}
}