//set up naming schemes
MisoEntityNamingSchemeResolverService entityNamingSchemeResolverService = (MisoEntityNamingSchemeResolverService)context.getBean("entityNamingSchemeResolverService");
Collection<MisoNamingScheme<?>> mnss = entityNamingSchemeResolverService.getNamingSchemes();
MisoNameGeneratorResolverService nameGeneratorResolverService = (MisoNameGeneratorResolverService)context.getBean("nameGeneratorResolverService");
Collection<NameGenerator<?>> ngs = nameGeneratorResolverService.getNameGenerators();
for (MisoNamingScheme<?> mns : mnss) {
log.info("Got naming scheme: " + mns.getSchemeName());
String classname = mns.namingSchemeFor().getSimpleName().toLowerCase();
if (misoProperties.containsKey("miso.naming.scheme."+classname) && misoProperties.get("miso.naming.scheme."+classname).equals(mns.getSchemeName())) {
for (String key : misoProperties.keySet()) {
if (key.startsWith("miso.naming.generator."+classname)) {
String genprop = key.substring(key.lastIndexOf(".")+1);
NameGenerator ng = nameGeneratorResolverService.getNameGenerator(misoProperties.get("miso.naming.generator."+classname+"."+genprop));
if (ng != null) {
mns.registerCustomNameGenerator(genprop, ng);
}
}
}