assert nocheck || checkValidStateValue(value) : value; assert nocheck || checkTypeHasAttribute(id, attribute); assert nocheck || checkMultiplicity(id, attribute, OAVAttributeType.MULTIPLICITIES_MULT); assert nocheck || checkValueCompatibility(id, attribute, value);
assert nocheck || checkValidStateValue(value) : value; assert nocheck || checkTypeHasAttribute(id, attribute); assert nocheck || checkMultiplicity(id, attribute, OAVAttributeType.MULTIPLICITIES_MULT); assert nocheck || checkValueCompatibility(id, attribute, value);
assert nocheck || checkValidStateObjectRead(id); assert nocheck || checkTypeHasAttribute(id, attribute); assert nocheck || checkMultiplicity(id, attribute, OAVAttributeType.MULTIPLICITIES_MULT);
assert nocheck || checkValidStateObjectRead(id); assert nocheck || checkTypeHasAttribute(id, attribute); assert nocheck || checkMultiplicity(id, attribute, OAVAttributeType.MULTIPLICITIES_MAPS);
assert nocheck || checkValidStateObjectRead(id); assert nocheck || checkTypeHasAttribute(id, attribute); assert nocheck || checkMultiplicity(id, attribute, OAVAttributeType.MULTIPLICITIES_MAPS);
assert nocheck || checkValidStateObjectRead(id); assert nocheck || checkTypeHasAttribute(id, attribute); assert nocheck || checkMultiplicity(id, attribute, OAVAttributeType.MULTIPLICITIES_MULT);
assert nocheck || checkValidStateObjectRead(id); assert nocheck || checkTypeHasAttribute(id, attribute); assert nocheck || checkMultiplicity(id, attribute, OAVAttributeType.MULTIPLICITIES_MAPS);
assert nocheck || checkValidStateObjectRead(id); assert nocheck || checkTypeHasAttribute(id, attribute); assert nocheck || checkMultiplicity(id, attribute, OAVAttributeType.MULTIPLICITIES_MAPS);
assert nocheck || checkValidStateObjectRead(id); assert nocheck || checkTypeHasAttribute(id, attribute); assert nocheck || checkMultiplicity(id, attribute, OAVAttributeType.MULTIPLICITIES_MAPS);
assert nocheck || checkValidStateObjectRead(id); assert nocheck || checkTypeHasAttribute(id, attribute); assert nocheck || checkMultiplicity(id, attribute, OAVAttributeType.MULTIPLICITIES_MAPS);
assert nocheck || checkValidStateObjectRead(id) : id; assert nocheck || checkTypeHasAttribute(id, attribute); assert nocheck || checkMultiplicity(id, attribute, OAVAttributeType.NONE);
assert nocheck || checkValidStateValue(value); assert nocheck || checkTypeHasAttribute(id, attribute); assert nocheck || checkMultiplicity(id, attribute, OAVAttributeType.MULTIPLICITIES_MULT);
assert nocheck || checkValidStateValue(value); assert nocheck || checkTypeHasAttribute(id, attribute); assert nocheck || checkMultiplicity(id, attribute, OAVAttributeType.MULTIPLICITIES_MULT);
assert nocheck || checkValidStateObjectRead(id) : id; assert nocheck || checkTypeHasAttribute(id, attribute); assert nocheck || checkMultiplicity(id, attribute, OAVAttributeType.NONE);
/** * Set an attribute of an object (oid) to the given value. * @param id The identifier of the object. * @param attribute The attribute identifier. * @param value The value (basic, object id or java object). */ public void setAttributeValue(Object id, OAVAttributeType attribute, Object value) { // #ifndef MIDP assert nocheck || generator.isId(id); assert nocheck || checkValidStateObject(id): id+" "+attribute+" "+value; assert nocheck || checkValidStateValue(value); assert nocheck || checkTypeHasAttribute(id, attribute); assert nocheck || checkMultiplicity(id, attribute, OAVAttributeType.NONE); assert nocheck || checkValueCompatibility(id, attribute, value); // #endif Map theobject = getObject(id); Object oldvalue = theobject.put(attribute, value); // Notification before removal in order to be capable to save the oldvalue reference. if(!equals(oldvalue, value)) { eventhandler.objectModified(id, getType(id), attribute, oldvalue, value); removeObjectUsage(id, attribute, oldvalue, null, false); addObjectUsage(id, attribute, value); } }
/** * Set an attribute of an object (oid) to the given value. * @param id The identifier of the object. * @param attribute The attribute identifier. * @param value The value (basic, object id or java object). */ public void setAttributeValue(Object id, OAVAttributeType attribute, Object value) { // #ifndef MIDP assert nocheck || generator.isId(id); assert nocheck || checkValidStateObject(id): id+" "+attribute+" "+value; assert nocheck || checkValidStateValue(value); assert nocheck || checkTypeHasAttribute(id, attribute); assert nocheck || checkMultiplicity(id, attribute, OAVAttributeType.NONE); assert nocheck || checkValueCompatibility(id, attribute, value); // #endif Map theobject = getObject(id); Object oldvalue = theobject.put(attribute, value); // Notification before removal in order to be capable to save the oldvalue reference. if(!equals(oldvalue, value)) { eventhandler.objectModified(id, getType(id), attribute, oldvalue, value); removeObjectUsage(id, attribute, oldvalue, null, false); addObjectUsage(id, attribute, value); } }