summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-07-19 03:28:40 (EDT)
committerEike Stepper2007-07-19 03:28:40 (EDT)
commit619ccf8ff5811ee78b59b0794f3802d586f33af8 (patch)
tree563e56e1044d4e08e40d79b59575f1d8825b1a0a
parenteda9f65121d82b043f24287578c61cbfc41a3c53 (diff)
downloadcdo-619ccf8ff5811ee78b59b0794f3802d586f33af8.zip
cdo-619ccf8ff5811ee78b59b0794f3802d586f33af8.tar.gz
cdo-619ccf8ff5811ee78b59b0794f3802d586f33af8.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java17
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java34
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java20
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/InternalCDOObject.java16
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionRequest.java10
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/TreeTraversal.java18
6 files changed, 58 insertions, 57 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
index 59846d1..f8dc7f0 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
@@ -12,6 +12,7 @@ package org.eclipse.emf.internal.cdo;
import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.CDOState;
+import org.eclipse.emf.cdo.CDOView;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl;
import org.eclipse.emf.cdo.internal.protocol.model.CDOClassImpl;
@@ -103,7 +104,7 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
return cdoState == CDOState.TRANSIENT || cdoState == CDOState.PREPARED_ATTACH;
}
- public void setID(CDOID id)
+ public void cdoInternalSetID(CDOID id)
{
if (id == null)
{
@@ -118,7 +119,7 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
this.id = id;
}
- public void setState(CDOState state)
+ public void cdoInternalSetState(CDOState state)
{
if (this.state != state)
{
@@ -131,15 +132,15 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
}
}
- public void setAdapter(CDOViewImpl view)
+ public void cdoInternalSetView(CDOView view)
{
if (this instanceof CDOResourceImpl)
{
- ((CDOResourceImpl)this).cdoSetView(view);
+ ((CDOResourceImpl)this).cdoSetView((CDOViewImpl)view);
}
}
- public void setResource(CDOResource resource)
+ public void cdoInternalSetResource(CDOResource resource)
{
if (this instanceof CDOResourceImpl)
{
@@ -154,7 +155,7 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
this.resource = (CDOResourceImpl)resource;
}
- public void setRevision(CDORevision revision)
+ public void cdoInternalSetRevision(CDORevision revision)
{
if (TRACER.isEnabled())
{
@@ -204,7 +205,7 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
}
}
- public void finalizeRevision()
+ public void cdoInternalFinalizeRevision()
{
if (TRACER.isEnabled())
{
@@ -273,7 +274,7 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
}
}
- public CDORevisionImpl copyRevision()
+ public CDORevisionImpl cdoInternalCopyRevision()
{
return revision = new CDORevisionImpl(revision);
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
index c77cbe2..b45194d 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
@@ -311,16 +311,16 @@ public final class CDOStateMachine
// Prepare object
CDOID id = CDOIDImpl.create(transaction.getNextTemporaryID());
- object.setID(id);
- object.setResource(resource);
- object.setAdapter(view);
- object.setState(CDOState.PREPARED_ATTACH);
+ object.cdoInternalSetID(id);
+ object.cdoInternalSetResource(resource);
+ object.cdoInternalSetView(view);
+ object.cdoInternalSetState(CDOState.PREPARED_ATTACH);
// Create new revision
CDORevisionImpl revision = new CDORevisionImpl((CDOClassImpl)object.cdoClass(), id);
revision.setVersion(1);
revision.setResourceID(resource.cdoID());
- object.setRevision(revision);
+ object.cdoInternalSetRevision(revision);
// Register object
view.registerObject(object);
@@ -345,8 +345,8 @@ public final class CDOStateMachine
@Override
protected void doExecute(InternalCDOObject object, Event event, Object data1, Object data2)
{
- object.finalizeRevision();
- object.setState(CDOState.NEW);
+ object.cdoInternalFinalizeRevision();
+ object.cdoInternalSetState(CDOState.NEW);
// Prepare content tree
for (EObject content : object.eContents())
@@ -389,7 +389,7 @@ public final class CDOStateMachine
CDOID newID = idMappings.get(id);
if (newID != null)
{
- object.setID(newID);
+ object.cdoInternalSetID(newID);
view.remapObject(id);
id = newID;
}
@@ -401,7 +401,7 @@ public final class CDOStateMachine
revision.adjustReferences(idMappings);
view.getSession().getRevisionManager().addRevision(revision);
- object.setState(CDOState.CLEAN);
+ object.cdoInternalSetState(CDOState.CLEAN);
}
}
@@ -413,14 +413,14 @@ public final class CDOStateMachine
@Override
protected void doExecute(InternalCDOObject object, Event event, Object data1, Object data2)
{
- CDORevisionImpl revision = object.copyRevision();
+ CDORevisionImpl revision = (CDORevisionImpl)object.cdoInternalCopyRevision();
revision.increaseVersion();
CDOViewImpl view = (CDOViewImpl)object.cdoView();
CDOTransactionImpl transaction = getTransaction(view);
transaction.registerDirty(object);
- object.setState(CDOState.DIRTY);
+ object.cdoInternalSetState(CDOState.DIRTY);
}
}
@@ -434,7 +434,7 @@ public final class CDOStateMachine
{
long timeStamp = (Long)data1;
((CDORevisionImpl)object.cdoRevision()).setRevised(timeStamp - 1);
- object.setState(CDOState.PROXY);
+ object.cdoInternalSetState(CDOState.PROXY);
}
}
@@ -456,8 +456,8 @@ public final class CDOStateMachine
CDOID id = object.cdoID();
CDOViewImpl view = (CDOViewImpl)object.cdoView();
CDORevisionImpl revision = view.getRevision(id);
- object.setRevision(revision);
- object.setState(CDOState.CLEAN);
+ object.cdoInternalSetRevision(revision);
+ object.cdoInternalSetState(CDOState.CLEAN);
if (forWrite)
{
@@ -483,10 +483,10 @@ public final class CDOStateMachine
}
// Prepare object
- object.setID(id);
+ object.cdoInternalSetID(id);
// object.setRevision(revision);
- object.setResource(resource);
- object.setAdapter(view);
+ object.cdoInternalSetResource(resource);
+ object.cdoInternalSetView(view);
// Register object
view.registerObject(object);
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
index 5db6246..f1581f1 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
@@ -175,10 +175,10 @@ public class CDOViewImpl extends org.eclipse.net4j.internal.util.event.Notifier
resource.setPath(path);
InternalCDOObject resourceObject = resource;
- resourceObject.setID(resourceID);
- resourceObject.setAdapter(this);
- resourceObject.setResource(resource);
- resourceObject.setState(CDOState.PROXY);
+ resourceObject.cdoInternalSetID(resourceID);
+ resourceObject.cdoInternalSetView(this);
+ resourceObject.cdoInternalSetResource(resource);
+ resourceObject.cdoInternalSetState(CDOState.PROXY);
return resource;
}
@@ -455,7 +455,7 @@ public class CDOViewImpl extends org.eclipse.net4j.internal.util.event.Notifier
{
try
{
- ((InternalCDOObject)cdoResource).setState(CDOState.NEW);
+ ((InternalCDOObject)cdoResource).cdoInternalSetState(CDOState.NEW);
resourceSet.getResources().remove(cdoResource);
}
catch (RuntimeException ignore)
@@ -511,17 +511,17 @@ public class CDOViewImpl extends org.eclipse.net4j.internal.util.event.Notifier
InternalCDOObject object = newInstance(cdoClass);
if (object instanceof CDOResourceImpl)
{
- object.setResource((CDOResourceImpl)object);
+ object.cdoInternalSetResource((CDOResourceImpl)object);
}
else
{
CDOResourceImpl resource = getResource(resourceID);
- object.setResource(resource);
+ object.cdoInternalSetResource(resource);
}
- object.setRevision(revision);
- object.setID(revision.getID());
- object.setState(CDOState.CLEAN);
+ object.cdoInternalSetRevision(revision);
+ object.cdoInternalSetID(revision.getID());
+ object.cdoInternalSetState(CDOState.CLEAN);
return object;
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/InternalCDOObject.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/InternalCDOObject.java
index 97870b0..41b6f9b 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/InternalCDOObject.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/InternalCDOObject.java
@@ -12,8 +12,8 @@ package org.eclipse.emf.internal.cdo;
import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.CDOState;
+import org.eclipse.emf.cdo.CDOView;
import org.eclipse.emf.cdo.eresource.CDOResource;
-import org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionImpl;
import org.eclipse.emf.cdo.protocol.CDOID;
import org.eclipse.emf.cdo.protocol.revision.CDORevision;
@@ -22,17 +22,17 @@ import org.eclipse.emf.cdo.protocol.revision.CDORevision;
*/
public interface InternalCDOObject extends CDOObject
{
- public void setID(CDOID id);
+ public void cdoInternalSetID(CDOID id);
- public void setResource(CDOResource resource);
+ public void cdoInternalSetResource(CDOResource resource);
- public void setAdapter(CDOViewImpl view);
+ public void cdoInternalSetView(CDOView view);
- public void setState(CDOState prepared_attach);
+ public void cdoInternalSetState(CDOState state);
- public void setRevision(CDORevision revision);
+ public void cdoInternalSetRevision(CDORevision revision);
- public CDORevisionImpl copyRevision();
+ public CDORevision cdoInternalCopyRevision();
- public void finalizeRevision();
+ public void cdoInternalFinalizeRevision();
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionRequest.java
index c1aac85..9dcde0c 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionRequest.java
@@ -23,9 +23,9 @@ import org.eclipse.net4j.internal.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-import org.eclipse.emf.internal.cdo.CDOObjectImpl;
import org.eclipse.emf.internal.cdo.CDOStore;
import org.eclipse.emf.internal.cdo.CDOTransactionImpl;
+import org.eclipse.emf.internal.cdo.InternalCDOObject;
import org.eclipse.emf.internal.cdo.bundle.OM;
import java.io.IOException;
@@ -109,7 +109,7 @@ public class CommitTransactionRequest extends CDOClientRequest<CommitTransaction
private void writeNewObjects(ExtendedDataOutputStream out) throws IOException
{
- Collection<CDOObjectImpl> newObjects = transaction.getNewObjects().values();
+ Collection<InternalCDOObject> newObjects = transaction.getNewObjects().values();
if (PROTOCOL.isEnabled())
{
PROTOCOL.format("Writing {0} new objects", newObjects.size());
@@ -120,7 +120,7 @@ public class CommitTransactionRequest extends CDOClientRequest<CommitTransaction
private void writeDirtyObjects(ExtendedDataOutputStream out) throws IOException
{
- Collection<CDOObjectImpl> dirtyObjects = transaction.getDirtyObjects().values();
+ Collection<InternalCDOObject> dirtyObjects = transaction.getDirtyObjects().values();
if (PROTOCOL.isEnabled())
{
PROTOCOL.format("Writing {0} dirty objects", dirtyObjects.size());
@@ -134,8 +134,8 @@ public class CommitTransactionRequest extends CDOClientRequest<CommitTransaction
out.writeInt(objects.size());
for (Iterator it = objects.iterator(); it.hasNext();)
{
- CDOObjectImpl object = (CDOObjectImpl)it.next();
- CDORevisionImpl revision = object.cdoRevision();
+ InternalCDOObject object = (InternalCDOObject)it.next();
+ CDORevisionImpl revision = (CDORevisionImpl)object.cdoRevision();
revision.write(out, converter);
}
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/TreeTraversal.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/TreeTraversal.java
index 7ac893b..7c1087e 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/TreeTraversal.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/TreeTraversal.java
@@ -2,7 +2,7 @@ package org.eclipse.emf.internal.cdo.util;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.internal.cdo.CDOObjectImpl;
+import org.eclipse.emf.internal.cdo.InternalCDOObject;
import java.util.ArrayList;
import java.util.List;
@@ -13,22 +13,22 @@ import java.util.List;
@Deprecated
public class TreeTraversal
{
- private CDOObjectImpl root;
+ private InternalCDOObject root;
- private List<CDOObjectImpl> objects = new ArrayList(0);
+ private List<InternalCDOObject> objects = new ArrayList(0);
- public TreeTraversal(CDOObjectImpl root)
+ public TreeTraversal(InternalCDOObject root)
{
this.root = root;
collectContents();
}
- public CDOObjectImpl getRoot()
+ public InternalCDOObject getRoot()
{
return root;
}
- public List<CDOObjectImpl> getObjects()
+ public List<InternalCDOObject> getObjects()
{
return objects;
}
@@ -55,9 +55,9 @@ public class TreeTraversal
for (TreeIterator<EObject> it = root.eAllContents(); it.hasNext();)
{
Object content = it.next();
- if (content instanceof CDOObjectImpl)
+ if (content instanceof InternalCDOObject)
{
- objects.add(((CDOObjectImpl)content));
+ objects.add(((InternalCDOObject)content));
}
}
}
@@ -67,6 +67,6 @@ public class TreeTraversal
*/
public interface ObjectHandler
{
- public void handleObject(final CDOObjectImpl object);
+ public void handleObject(final InternalCDOObject object);
}
} \ No newline at end of file