item.getProperties().put(property.getName(), propertyValue);
}
}
protected void addModelEntityProperties(IModelEntity item) {
ModelPropertyMeta property;
String propertyValue;
for (int i = 0; i < ModelPropertiesMeta.entityProperties.length; i++) {
property = ModelPropertiesMeta.entityProperties[i];
propertyValue = modelProperties.getProperty(item, property.getName());
// property not set
if(propertyValue == null) {
if(property.isOptional() == false) {
throw new SpagoBIRuntimeException("Impossible to initialize property [" + property.getName() + "] of entity [" + item.getUniqueName() + "]");
}
propertyValue = property.getDefaultValue();
}
// property not set + property default value not set
if(propertyValue == null && property.isInherited()) {
propertyValue = getInheritedProperty(item, property.getName());
}
item.getProperties().put(property.getName(), propertyValue);
}
}