diff options
author | Simon McDuff | 2008-11-13 14:40:27 +0000 |
---|---|---|
committer | Simon McDuff | 2008-11-13 14:40:27 +0000 |
commit | 28a5d638cdb89afca9d212409ac22cf4b7225cba (patch) | |
tree | 88ac368b5d03c864336babc3c31c8082985d8110 /plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo | |
parent | 3b3218b3b2acc46d831e77b65b167fbef920ec2f (diff) | |
download | cdo-28a5d638cdb89afca9d212409ac22cf4b7225cba.tar.gz cdo-28a5d638cdb89afca9d212409ac22cf4b7225cba.tar.xz cdo-28a5d638cdb89afca9d212409ac22cf4b7225cba.zip |
[228190] Provide support for multivalued attributes
https://bugs.eclipse.org/bugs/show_bug.cgi?id=228190
Diffstat (limited to 'plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo')
10 files changed, 32 insertions, 32 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOCollectionLoadingPolicyImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOCollectionLoadingPolicyImpl.java index f41ac72ece..65ffc2fdf3 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOCollectionLoadingPolicyImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOCollectionLoadingPolicyImpl.java @@ -16,7 +16,7 @@ import org.eclipse.emf.cdo.common.model.CDOFeature; import org.eclipse.emf.cdo.common.revision.CDORevision; import org.eclipse.emf.cdo.spi.common.InternalCDORevision; -import org.eclipse.emf.internal.cdo.revision.CDOReferenceProxy; +import org.eclipse.emf.internal.cdo.revision.CDOElementProxy; import org.eclipse.net4j.util.collection.MoveableList; @@ -71,7 +71,7 @@ public class CDOCollectionLoadingPolicyImpl implements CDOCollectionLoadingPolic { if (alternation) { - if (!maxReached && toIndex < size - 1 && list.get(toIndex + 1) instanceof CDOReferenceProxy) + if (!maxReached && toIndex < size - 1 && list.get(toIndex + 1) instanceof CDOElementProxy) { ++toIndex; } @@ -87,7 +87,7 @@ public class CDOCollectionLoadingPolicyImpl implements CDOCollectionLoadingPolic } else { - if (!minReached && fromIndex > 0 && list.get(fromIndex - 1) instanceof CDOReferenceProxy) + if (!minReached && fromIndex > 0 && list.get(fromIndex - 1) instanceof CDOElementProxy) { --fromIndex; } diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDORevisionManagerImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDORevisionManagerImpl.java index fd43c7b4dd..b6d3d63445 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDORevisionManagerImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDORevisionManagerImpl.java @@ -64,7 +64,7 @@ public class CDORevisionManagerImpl extends CDORevisionResolverImpl implements C /** * @since 2.0 */ - public Object resolveReferenceProxy(CDORevision revision, CDOFeature feature, int accessIndex, int serverIndex) + public Object resolveElementProxy(CDORevision revision, CDOFeature feature, int accessIndex, int serverIndex) { return session.getCollectionLoadingPolicy().resolveProxy(this, revision, feature, accessIndex, serverIndex); } diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStore.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStore.java index 4107944a02..157616af35 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStore.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStore.java @@ -34,7 +34,7 @@ import org.eclipse.emf.cdo.internal.common.revision.delta.CDOUnsetFeatureDeltaIm import org.eclipse.emf.cdo.spi.common.InternalCDORevision; import org.eclipse.emf.internal.cdo.bundle.OM; -import org.eclipse.emf.internal.cdo.revision.CDOReferenceProxy; +import org.eclipse.emf.internal.cdo.revision.CDOElementProxy; import org.eclipse.emf.internal.cdo.util.FSMUtil; import org.eclipse.emf.internal.cdo.util.GenUtil; @@ -519,10 +519,10 @@ public final class CDOStore implements EStore */ public Object resolveProxy(InternalCDORevision revision, CDOFeature cdoFeature, int index, Object value) { - if (value instanceof CDOReferenceProxy) + if (value instanceof CDOElementProxy) { - value = ((CDOReferenceProxy)value).resolve(getView().getSession().getRevisionManager(), revision, cdoFeature, - index); + value = ((CDOElementProxy)value) + .resolve(getView().getSession().getRevisionManager(), revision, cdoFeature, index); } return value; diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientIndication.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientIndication.java index 4ef5b6fd10..5e7ee80521 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientIndication.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientIndication.java @@ -22,7 +22,7 @@ import org.eclipse.emf.cdo.internal.common.CDODataInputImpl; import org.eclipse.emf.internal.cdo.CDORevisionManagerImpl; import org.eclipse.emf.internal.cdo.CDOSessionImpl; import org.eclipse.emf.internal.cdo.CDOSessionPackageManagerImpl; -import org.eclipse.emf.internal.cdo.revision.CDOListReferenceProxyImpl; +import org.eclipse.emf.internal.cdo.revision.CDOListWithElementProxiesImpl; import org.eclipse.net4j.signal.Indication; import org.eclipse.net4j.util.io.ExtendedDataInputStream; @@ -102,7 +102,7 @@ public abstract class CDOClientIndication extends Indication @Override protected CDOListFactory getListFactory() { - return CDOListReferenceProxyImpl.FACTORY; + return CDOListWithElementProxiesImpl.FACTORY; } }); } diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientRequest.java index e5e7035421..24a34c3bc3 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientRequest.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientRequest.java @@ -25,7 +25,7 @@ import org.eclipse.emf.cdo.internal.common.CDODataOutputImpl; import org.eclipse.emf.internal.cdo.CDORevisionManagerImpl; import org.eclipse.emf.internal.cdo.CDOSessionImpl; import org.eclipse.emf.internal.cdo.CDOSessionPackageManagerImpl; -import org.eclipse.emf.internal.cdo.revision.CDOListReferenceProxyImpl; +import org.eclipse.emf.internal.cdo.revision.CDOListWithElementProxiesImpl; import org.eclipse.net4j.signal.RequestWithConfirmation; import org.eclipse.net4j.util.io.ExtendedDataInputStream; @@ -129,7 +129,7 @@ public abstract class CDOClientRequest<RESULT> extends RequestWithConfirmation<R @Override protected CDOListFactory getListFactory() { - return CDOListReferenceProxyImpl.FACTORY; + return CDOListWithElementProxiesImpl.FACTORY; } }); } 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 68ddd64a1d..f6aa949d91 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 @@ -40,7 +40,7 @@ import org.eclipse.emf.internal.cdo.CDORevisionManagerImpl; import org.eclipse.emf.internal.cdo.CDOSessionImpl; import org.eclipse.emf.internal.cdo.CDOSessionPackageManagerImpl; import org.eclipse.emf.internal.cdo.bundle.OM; -import org.eclipse.emf.internal.cdo.revision.CDOListReferenceProxyImpl; +import org.eclipse.emf.internal.cdo.revision.CDOListWithElementProxiesImpl; import org.eclipse.net4j.signal.RequestWithMonitoring; import org.eclipse.net4j.util.io.ExtendedDataInputStream; @@ -165,7 +165,7 @@ public class CommitTransactionRequest extends RequestWithMonitoring<CommitTransa @Override protected CDOListFactory getListFactory() { - return CDOListReferenceProxyImpl.FACTORY; + return CDOListWithElementProxiesImpl.FACTORY; } }, monitor); } diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/revision/CDOReferenceProxy.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/revision/CDOElementProxy.java index 40d5cd83ab..ae3a50f428 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/revision/CDOReferenceProxy.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/revision/CDOElementProxy.java @@ -19,7 +19,7 @@ import org.eclipse.emf.cdo.common.revision.CDORevision; * @author Eike Stepper * @noimplement This interface is not intended to be implemented by clients. */ -public interface CDOReferenceProxy +public interface CDOElementProxy { public int getIndex(); diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/revision/CDOReferenceProxyImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/revision/CDOElementProxyImpl.java index cbeefaeab4..187a0d6715 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/revision/CDOReferenceProxyImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/revision/CDOElementProxyImpl.java @@ -22,11 +22,11 @@ import java.text.MessageFormat; /** * @author Eike Stepper */ -public final class CDOReferenceProxyImpl implements CDOReferenceProxy +public final class CDOElementProxyImpl implements CDOElementProxy { private int index; - public CDOReferenceProxyImpl(int index) + public CDOElementProxyImpl(int index) { this.index = index; } @@ -43,12 +43,12 @@ public final class CDOReferenceProxyImpl implements CDOReferenceProxy public Object resolve(CDORevisionManager revisionManager, CDORevision revision, CDOFeature feature, int index) { - return ((CDORevisionManagerImpl)revisionManager).resolveReferenceProxy(revision, feature, index, getIndex()); + return ((CDORevisionManagerImpl)revisionManager).resolveElementProxy(revision, feature, index, getIndex()); } @Override public String toString() { - return MessageFormat.format("CDOReferenceProxy[{0}]", index); + return MessageFormat.format("CDOElementProxy[{0}]", index); } } diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/revision/CDOListReferenceProxyImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/revision/CDOListWithElementProxiesImpl.java index 69d3a01343..86c14585ef 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/revision/CDOListReferenceProxyImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/revision/CDOListWithElementProxiesImpl.java @@ -20,25 +20,25 @@ import org.eclipse.emf.cdo.spi.common.InternalCDORevision; /** * @author Simon McDuff */ -public class CDOListReferenceProxyImpl extends CDOListImpl +public class CDOListWithElementProxiesImpl extends CDOListImpl { public static final CDOListFactory FACTORY = new CDOListFactory() { public CDOList createList(int initialCapacity, int size, int initialChunk) { - return new CDOListReferenceProxyImpl(initialCapacity, size, initialChunk); + return new CDOListWithElementProxiesImpl(initialCapacity, size, initialChunk); } }; private static final long serialVersionUID = 1L; - public CDOListReferenceProxyImpl(int initialCapacity, int size, int initialChunk) + public CDOListWithElementProxiesImpl(int initialCapacity, int size, int initialChunk) { super(initialCapacity, initialChunk); for (int j = initialChunk; j < size; j++) { - this.add(new CDOReferenceProxyImpl(j)); + this.add(new CDOElementProxyImpl(j)); } } @@ -52,15 +52,15 @@ public class CDOListReferenceProxyImpl extends CDOListImpl Object element = super.get(index); - return element instanceof CDOReferenceProxy ? InternalCDORevision.UNINITIALIZED : element; + return element instanceof CDOElementProxy ? InternalCDORevision.UNINITIALIZED : element; } @Override protected void handleAdjustReference(int index, Object element) { - if (element instanceof CDOReferenceProxy) + if (element instanceof CDOElementProxy) { - ((CDOReferenceProxyImpl)element).setIndex(index); + ((CDOElementProxyImpl)element).setIndex(index); } } @@ -68,14 +68,14 @@ public class CDOListReferenceProxyImpl extends CDOListImpl public InternalCDOList clone(CDOType type) { int size = size(); - InternalCDOList list = new CDOListReferenceProxyImpl(size, 0, 0); + InternalCDOList list = new CDOListWithElementProxiesImpl(size, 0, 0); for (int j = 0; j < size; j++) { Object value = this.get(j); - if (value instanceof CDOReferenceProxy) + if (value instanceof CDOElementProxy) { - list.add(j, new CDOReferenceProxyImpl(((CDOReferenceProxy)value).getIndex())); + list.add(j, new CDOElementProxyImpl(((CDOElementProxy)value).getIndex())); } else { diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/RevisionAdjuster.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/RevisionAdjuster.java index 46035dd616..09d7b10b02 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/RevisionAdjuster.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/RevisionAdjuster.java @@ -25,7 +25,7 @@ import org.eclipse.emf.cdo.internal.common.revision.delta.CDOListFeatureDeltaImp import org.eclipse.emf.cdo.spi.common.InternalCDOList; import org.eclipse.emf.cdo.spi.common.InternalCDORevision; -import org.eclipse.emf.internal.cdo.revision.CDOReferenceProxy; +import org.eclipse.emf.internal.cdo.revision.CDOElementProxy; /** * @author Simon McDuff @@ -67,7 +67,7 @@ public class RevisionAdjuster extends CDOFeatureDeltaVisitorImpl { CDOFeature feature = delta.getFeature(); Object value = delta.getValue(); - if (value != null && feature.isReference() && !(value instanceof CDOReferenceProxy)) + if (value != null && feature.isReference() && !(value instanceof CDOElementProxy)) { revision.setValue(feature, referenceAdjuster.adjustReference(value)); } @@ -86,7 +86,7 @@ public class RevisionAdjuster extends CDOFeatureDeltaVisitorImpl { int index = indices[i]; Object value = list.get(index); - if (value != null && !(value instanceof CDOReferenceProxy)) + if (value != null && !(value instanceof CDOElementProxy)) { value = referenceAdjuster.adjustReference(value); list.set(index, value); |