public void writeProperty(String propName, Object val) { if (objectContext != null) { // pass "false" to avoid unneeded fault processing objectContext.prepareForAccess(this, propName, false); // note how we notify ObjectContext of change BEFORE the object is // actually // changed... this is needed to take a valid current snapshot Object oldValue = readPropertyDirectly(propName); objectContext.propertyChanged(this, propName, oldValue, val); } writePropertyDirectly(propName, val); }
public Object readProperty(String propName) { if (objectContext != null) { objectContext.prepareForAccess(this, propName); } Object object = readPropertyDirectly(propName); // must resolve faults immediately if (object instanceof Fault) { object = ((Fault) object).resolveFault(this, propName); writePropertyDirectly(propName, object); } return object; }
public void writeProperty(String propName, Object val) { if (objectContext != null) { objectContext.prepareForAccess(this, propName); // note how we notify DataContext of change BEFORE the object is actually // changed... this is needed to take a valid current snapshot Object oldValue = readPropertyDirectly(propName); objectContext.propertyChanged(this, propName, oldValue, val); } writePropertyDirectly(propName, val); }
public Object readProperty(String propertyName) { if (objectContext != null) { // will resolve faults ourselves below as checking class descriptors // for the // "lazyFaulting" flag is inefficient. Passing "false" here to // suppress fault // processing objectContext.prepareForAccess(this, propertyName, false); } Object object = readPropertyDirectly(propertyName); if (object instanceof Fault) { object = ((Fault) object).resolveFault(this, propertyName); writePropertyDirectly(propertyName, object); } return object; }
DbAttribute dbAttribute = objAttribute.getDbAttribute(); Object value = this.readPropertyDirectly(objAttribute.getName()); if (dbAttribute.isMandatory()) { ValidationFailure failure = BeanValidationFailure.validateNotNull( Object value = this.readPropertyDirectly(relationship.getName()); ValidationFailure failure = BeanValidationFailure.validateNotNull( this,
Object value = this.readPropertyDirectly(next.getName()); if (dbAttribute.isMandatory()) { ValidationFailure failure = BeanValidationFailure.validateNotNull(this, next.getName(), value); Object value = this.readPropertyDirectly(relationship.getName()); ValidationFailure failure = BeanValidationFailure.validateNotNull(this, relationship.getName(), value);