Object object = Reflector.getInstance(constructor, domainModel);
entity = (IEntity) object;
if (entity == null) {
String error = "Error in ModelMeta.createEntities: "
+ entityClassName;
throw new DmException(error);
}
ConceptConfig conceptConfig = entity.getConceptConfig();
if (conceptConfig != null) {
PropertiesConfig propertiesConfig = conceptConfig
.getPropertiesConfig();
for (IEntity config : propertiesConfig) {
PropertyConfig propertyConfig = (PropertyConfig) config;
if (propertyConfig.getDefaultValue() != null) {
String propertyCode = propertyConfig.getCode();
Object property = entity.getProperty(propertyCode);
setPropertyDefaultValue(entity, propertyConfig,
property);
}
}
}
} catch (Exception e) {
String error = "Error in ModelMeta.createEntity: "
+ entityClassName;
log.error(error + " === " + e.getMessage());
throw new DmException(error);
}
return entity;
}