public CDORevisableImpl(CDORevisable source) { super(source.getBranch(), source.getVersion()); timeStamp = source.getTimeStamp(); revised = source.getRevised(); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof CDORevisable) { CDORevisable that = (CDORevisable)obj; return timeStamp == that.getTimeStamp() && revised == that.getRevised() && getBranch().equals(that.getBranch()) && getVersion() == that.getVersion(); } return false; }
private int getNewVersion(CDORevisionKey key) { if (key instanceof CDORevisionDelta) { CDORevisionDelta delta = (CDORevisionDelta)key; CDORevisable target = delta.getTarget(); if (target != null && key.getBranch() == target.getBranch()) { return target.getVersion(); } } return key.getVersion() + 1; } }
private int getNewVersion(CDORevisionKey key) { if (key instanceof CDORevisionDelta) { CDORevisionDelta delta = (CDORevisionDelta)key; CDORevisable target = delta.getTarget(); if (target != null && key.getBranch() == target.getBranch()) { return target.getVersion(); } } return key.getVersion() + 1; } }
public void writeCDORevisable(CDORevisable revisable) throws IOException { writeCDOBranch(revisable.getBranch()); writeInt(revisable.getVersion()); writeLong(revisable.getTimeStamp()); writeLong(revisable.getRevised()); }