Commit e0e9ba18 authored by helene ortiz's avatar helene ortiz
Browse files

No commit message

No commit message
parent 4a025bc0
......@@ -288,20 +288,24 @@ public class PropertyManager {
*/
public Property getProperty(int servantId, String propertyName) {
Property property = propertyMap.get(servantId).get(propertyName);
if (propertyMap.containsKey(servantId)) {
if (property == null) {
Property property = propertyMap.get(servantId).get(propertyName);
int propertyId = PropertyDatabase.getInstance().getPropertyIdForServant(servantId, propertyName);
if (property == null) {
// create the property from database
// container id should not be important unless for properties of command box that should already have been created
// should we test is command box?
property = PropertyFactory.getInstance().createProperty(0, propertyId, "unknown", false);
propertyMap.get(servantId).put(propertyName, property);
}
int propertyId = PropertyDatabase.getInstance().getPropertyIdForServant(servantId, propertyName);
return property;
// create the property from database
// container id should not be important unless for properties of command box that should already have been created
// should we test is command box?
property = PropertyFactory.getInstance().createProperty(0, propertyId, "unknown", false);
propertyMap.get(servantId).put(propertyName, property);
}
return property;
}
return null;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment