if (properties.containsKey("xplanner.hibernate.mappingtransform")) {
String transformerFileName = properties.getProperty("xplanner.hibernate.mappingtransform");
log.info("Using Hibernate mapping transformer: " + transformerFileName);
transformer = createTransformer(transformerFileName);
}
Configuration cfg = new Configuration();
cfg.addInputStream(getMappingStream("mappings/Attribute.xml", transformer));
cfg.addInputStream(getMappingStream("mappings/Permission.xml", transformer));
cfg.addInputStream(getMappingStream("mappings/RoleAssociation.xml", transformer));
cfg.addInputStream(getMappingStream("mappings/DataSample.xml", transformer));
cfg.addInputStream(getMappingStream("mappings/Project.xml", transformer));
cfg.addInputStream(getMappingStream("mappings/Iteration.xml", transformer));
cfg.addInputStream(getMappingStream("mappings/UserStory.xml", transformer));
cfg.addInputStream(getMappingStream("mappings/Task.xml", transformer));
cfg.addInputStream(getMappingStream("mappings/TimeEntry.xml", transformer));
cfg.addInputStream(getMappingStream("mappings/Integration.xml", transformer));
cfg.addInputStream(getMappingStream("mappings/Note.xml", transformer));
cfg.addInputStream(getMappingStream("mappings/Role.xml", transformer));
cfg.addInputStream(getMappingStream("mappings/Person.xml", transformer));
cfg.addInputStream(getMappingStream("mappings/HistoricalEvent.xml", transformer));
cfg.addInputStream(getMappingStream("mappings/File.xml", transformer));
cfg.addInputStream(getMappingStream("mappings/Directory.xml", transformer));
cfg.addProperties(new XPlannerProperties().get());
EHCacheHelper.configure(cfg);
return cfg;
} catch (Exception e) {
throw new HibernateException(e);
}