public boolean isDeserializable(final ResolveState newState) { if(newState == null) { throw new ResolveException("new state must be specified"); } if(!(newState == SERIALIZING_TRANSIENT || newState == RESOLVING_PART || newState == RESOLVING || newState == UPDATING)) { throw new ResolveException("state must be one of SERIALIZING_TRANSIENT; RESOLVING_PART; RESOLVING; or UPDATING"); } if (this == TRANSIENT || this == GHOST || this == PART_RESOLVED || this == RESOLVED) { return isValidToChangeTo(newState); } return false; }
public boolean isTransient() { return object != null && object.getResolveState().isTransient(); }
private boolean executeRemotely(final NakedObject target) { return target.getResolveState().isPersistent(); }
public int canOpen(final Content content) { NakedCollection collection = ((CollectionContent) content).getCollection(); if (collection.getResolveState().isGhost()) { return UNKNOWN; } else { return collection.size() > 0 ? CAN_OPEN : CANT_OPEN; } }
/** * Returns false while object is having its field set up. */ public boolean respondToChangesInPersistentObjects() { // note: SERIALIZING_TRANSIENT is included twice here, through either isTransient() or isSerializing() return !( isNew() || isTransient() || isResolving() || isUpdating() || isSerializing() ); }
private void processChangedOid(final Oid oid) { if (oid.hasPrevious()) { Oid previous = oid.getPrevious(); NakedObject object = (NakedObject) identites.get(previous); if (object != null) { identites.remove(previous); Oid oidFromObject = object.getOid(); oidFromObject.copyFrom(oid); identites.put(oidFromObject, object); } } }
public ConcurrencyException(final NakedReference object, final Version updated) { this(object.getVersion().getUser() + " changed " + object.titleString() + " at " + DATE_TIME.format(object.getVersion().getTime()) + "\n\n" + object.getVersion() + " ~ " + updated + "", object.getOid()); }
private boolean isPersistent(final NakedReference object) { return object.getResolveState().isPersistent(); }
public void end(final NakedReference object) { ResolveState finalState = object.getResolveState().getEndState(); ((DummyNakedObject) object).setupResolveState(finalState); }
public void changeState(final ResolveState state) { this.state.isValidToChangeTo(state); this.state = state; }
public void execute(final Workspace workspace, final View view, final Location at) { collection.changeState(ResolveState.GHOST); } });
public String title() { return naked.titleString(); } }
public boolean isTransient() { return object != null && object.getResolveState().isTransient(); }
private boolean executeRemotely(final NakedObject target) { return target.getResolveState().isPersistent(); }
/** * Returns true if the state reflects some form of non-resolved state (GHOST, PART_RESOLVED) or is * resolved and it needs to be updated. The specified new state, which you intend to resolve at should be * one of: RESOLVING_PART; RESOLVING; or UPDATING). */ public boolean isResolvable(final ResolveState newState) { if(!(newState == RESOLVING || newState == RESOLVING_PART || newState == UPDATING)) { throw new ResolveException("state must be one of RESOLVING_PART; RESOLVING; or UPDATING"); } if (this == RESOLVED || this == PART_RESOLVED || this == GHOST) { return isValidToChangeTo(newState); } return false; }
public void changeState(final ResolveState state) { this.state.isValidToChangeTo(state); this.state = state; }
public boolean isTransient() { return object.getResolveState().isTransient(); }
private boolean executeRemotely(final NakedObject target) { return target.getResolveState().isPersistent(); }
public boolean isTransient() { return object != null && object.getResolveState().isTransient(); }
public boolean isTransient() { return object != null && object.getResolveState().isTransient(); }