}
}
if (metadata.getContainers() != null
&& !metadata.getContainers().isEmpty()) {
for (EntityContainer entityContainer : metadata.getContainers()) {
Schema schema = entityContainer.getSchema();
// Generate Service subclass
StringBuffer className = new StringBuffer();
if (serviceClassName != null) {
// Try to use the Client preference
if (entityContainer.isDefaultEntityContainer()) {
className.append(serviceClassName);
} else if (metadata.getContainers().size() == 1) {
className.append(serviceClassName);
} else {
className.append(schema.getNamespace()
.getNormalizedName().substring(0, 1)
.toUpperCase());
className.append(schema.getNamespace()
.getNormalizedName().substring(1));
className.append("Service");
}
} else {
className.append(schema.getNamespace().getNormalizedName()
.substring(0, 1).toUpperCase());
className.append(schema.getNamespace().getNormalizedName()
.substring(1));
className.append("Service");
}
Map<String, Object> dataModel = new HashMap<String, Object>();