ObjectId getArcSnapshotValue(String propertyName) { Object value = arcSnapshot != null ? arcSnapshot.get(propertyName) : null; if (value instanceof Fault) { Persistent target = (Persistent) ((Fault) value).resolveFault(object, propertyName); value = target != null ? target.getObjectId() : null; arcSnapshot.put(propertyName, value); } return (ObjectId) value; }
ObjectId getArcSnapshotValue(String propertyName) { Object value = arcSnapshot != null ? arcSnapshot.get(propertyName) : null; if (value instanceof Fault) { Persistent source = (Persistent) objectStore.getNode(nodeId); Persistent target = (Persistent) ((Fault) value).resolveFault( source, propertyName); value = target != null ? target.getObjectId() : null; arcSnapshot.put(propertyName, value); } return (ObjectId) value; }
protected ValueHolder createCollectionValueHolder(Object object) throws PropertyAccessException { if (!(object instanceof Persistent)) { throw new PropertyAccessException( "ValueHolders for non-persistent objects are not supported.", this, object); } return (ValueHolder) Fault.getToManyFault().resolveFault( (Persistent) object, getName()); } }
@Override public void injectValueHolder(Object object) throws PropertyException { if (readPropertyDirectly(object) == null) { writePropertyDirectly(object, null, fault.resolveFault((Persistent) object, getName())); } }
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 Object readProperty(Object object) throws PropertyAccessException { Object value = super.readProperty(object); if (value instanceof Fault) { Object resolved = ((Fault) value) .resolveFault((Persistent) object, getName()); writePropertyDirectly(object, value, resolved); value = resolved; } return value; }
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; }