use of org.apache.openejb.jee.sun.SunCmpMappings in project tomee by apache.
the class SunConversion method convertModule.
public void convertModule(final EjbModule ejbModule, final EntityMappings entityMappings) {
final Map<String, EntityData> entities = new TreeMap<>();
if (entityMappings != null) {
for (final Entity entity : entityMappings.getEntity()) {
entities.put(entity.getDescription(), new EntityData(entity));
}
}
// merge data from sun-ejb-jar.xml file
final SunEjbJar sunEjbJar = getSunEjbJar(ejbModule);
mergeEjbConfig(ejbModule, sunEjbJar);
mergeEntityMappings(entities, ejbModule.getModuleId(), ejbModule.getEjbJar(), ejbModule.getOpenejbJar(), sunEjbJar);
// merge data from sun-cmp-mappings.xml file
final SunCmpMappings sunCmpMappings = getSunCmpMappings(ejbModule);
if (sunCmpMappings != null) {
for (final SunCmpMapping sunCmpMapping : sunCmpMappings.getSunCmpMapping()) {
mergeEntityMappings(entities, ejbModule.getModuleId(), ejbModule, entityMappings, sunCmpMapping);
}
}
}
Aggregations