Lines 18-25
Link Here
|
18 |
import org.eclipse.emf.cdo.protocol.model.CDOClassRef; |
18 |
import org.eclipse.emf.cdo.protocol.model.CDOClassRef; |
19 |
import org.eclipse.emf.cdo.protocol.model.CDOFeature; |
19 |
import org.eclipse.emf.cdo.protocol.model.CDOFeature; |
20 |
import org.eclipse.emf.cdo.protocol.model.CDOPackageInfo; |
20 |
import org.eclipse.emf.cdo.protocol.model.CDOPackageInfo; |
21 |
import org.eclipse.emf.cdo.protocol.revision.CDODuplicateRevisionException; |
|
|
22 |
import org.eclipse.emf.cdo.protocol.revision.CDORevision; |
21 |
import org.eclipse.emf.cdo.protocol.revision.CDORevision; |
|
|
22 |
import org.eclipse.emf.cdo.server.DuplicateRevisionException; |
23 |
import org.eclipse.emf.cdo.server.ISession; |
23 |
import org.eclipse.emf.cdo.server.ISession; |
24 |
import org.eclipse.emf.cdo.server.IStoreChunkReader; |
24 |
import org.eclipse.emf.cdo.server.IStoreChunkReader; |
25 |
import org.eclipse.emf.cdo.server.IStoreReader; |
25 |
import org.eclipse.emf.cdo.server.IStoreReader; |
Lines 85-91
Link Here
|
85 |
public CDORevision readRevision(CDOID id, int referenceChunk) |
85 |
public CDORevision readRevision(CDOID id, int referenceChunk) |
86 |
{ |
86 |
{ |
87 |
CDORevisionImpl revStore = (CDORevisionImpl)getStore().getRevision(id); |
87 |
CDORevisionImpl revStore = (CDORevisionImpl)getStore().getRevision(id); |
88 |
CDORevisionImpl newRevision = new CDORevisionImpl(this.getStore().getRepository().getRevisionManager(), revStore |
88 |
CDORevisionImpl newRevision = new CDORevisionImpl(getStore().getRepository().getRevisionManager(), revStore |
89 |
.getCDOClass(), revStore.getID()); |
89 |
.getCDOClass(), revStore.getID()); |
90 |
newRevision.setResourceID(revStore.getResourceID()); |
90 |
newRevision.setResourceID(revStore.getResourceID()); |
91 |
|
91 |
|
Lines 127-147
Link Here
|
127 |
{ |
127 |
{ |
128 |
} |
128 |
} |
129 |
|
129 |
|
130 |
public void writeRevision(CDORevisionImpl revision) |
130 |
public void writeRevision(CDORevisionImpl revision) throws DuplicateRevisionException |
131 |
{ |
131 |
{ |
132 |
getStore().addRevision(revision); |
132 |
getStore().addRevision(revision); |
133 |
} |
133 |
} |
134 |
|
134 |
|
135 |
@Override |
135 |
@Override |
136 |
public void writeRevisionDelta(CDORevisionDeltaImpl delta) |
136 |
public void writeRevisionDelta(CDORevisionDeltaImpl delta) throws DuplicateRevisionException |
137 |
{ |
137 |
{ |
138 |
CDORevisionImpl revision2 = (CDORevisionImpl)getStore().getRevision(delta.getID()); |
138 |
CDORevisionImpl revision = (CDORevisionImpl)getStore().getRevision(delta.getID()); |
139 |
if (delta.getOriginVersion() != revision2.getVersion()) |
139 |
if (delta.getOriginVersion() != revision.getVersion()) |
140 |
{ |
140 |
{ |
141 |
throw new CDODuplicateRevisionException(revision2); |
141 |
throw new DuplicateRevisionException(revision); |
142 |
} |
142 |
} |
143 |
|
143 |
|
144 |
CDORevisionImpl newRevision = new CDORevisionImpl(revision2); |
144 |
CDORevisionImpl newRevision = new CDORevisionImpl(revision); |
145 |
delta.apply(newRevision); |
145 |
delta.apply(newRevision); |
146 |
listToCommit.add(newRevision); |
146 |
listToCommit.add(newRevision); |
147 |
} |
147 |
} |
Lines 149-156
Link Here
|
149 |
@Override |
149 |
@Override |
150 |
public void release() |
150 |
public void release() |
151 |
{ |
151 |
{ |
152 |
for (CDORevisionImpl rev : listToCommit) |
152 |
for (CDORevisionImpl revision : listToCommit) |
153 |
getStore().addRevision(rev); |
153 |
{ |
|
|
154 |
getStore().addRevision(revision); |
155 |
} |
154 |
} |
156 |
} |
155 |
|
157 |
|
156 |
public void rollback(IView view, ITransaction<IStoreWriter> storeTransaction) |
158 |
public void rollback(IView view, ITransaction<IStoreWriter> storeTransaction) |