summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-03-03 09:59:44 (EST)
committerEike Stepper2008-03-03 09:59:44 (EST)
commitda127f9ba69daf8c7a56388900dd34e57a0ff10c (patch)
tree8ce12a166b6937228e269b0743229f6c4fef8229
parent219c55e61499e3c204b1b7328d042a59eeadd1ab (diff)
downloadcdo-da127f9ba69daf8c7a56388900dd34e57a0ff10c.zip
cdo-da127f9ba69daf8c7a56388900dd34e57a0ff10c.tar.gz
cdo-da127f9ba69daf8c7a56388900dd34e57a0ff10c.tar.bz2
[221149] Bug in Enum support
https://bugs.eclipse.org/bugs/show_bug.cgi?id=221149
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/ClassMapping.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MappingStrategy.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOTypeUserType.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/IndexReconstructionTest.java4
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/EMFUtil.java18
5 files changed, 15 insertions, 15 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/ClassMapping.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/ClassMapping.java
index 2ab41d7..315f537 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/ClassMapping.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/ClassMapping.java
@@ -82,7 +82,7 @@ public abstract class ClassMapping implements IClassMapping
CDOResourceClass resourceClass = cdoClass.getPackageManager().getCDOResourcePackage().getCDOResourceClass();
if (cdoClass == resourceClass)
{
- // Create a unique index to prevent duplicate resource paths
+ // Create a unique ids to prevent duplicate resource paths
for (IAttributeMapping attributeMapping : attributeMappings)
{
if (attributeMapping.getFeature() == resourceClass.getCDOPathFeature())
@@ -92,7 +92,7 @@ public abstract class ClassMapping implements IClassMapping
pathField.setPrecision(760);// MYSQL key limitation 767
pathField.setNotNull(true);
- // Create a unique index to prevent duplicate resource paths
+ // Create a unique ids to prevent duplicate resource paths
table.addIndex(IDBIndex.Type.UNIQUE, versionField, pathField);
break;
}
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MappingStrategy.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MappingStrategy.java
index 6b9d5c1..6470af1 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MappingStrategy.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MappingStrategy.java
@@ -368,7 +368,7 @@ public abstract class MappingStrategy extends Lifecycle implements IMappingStrat
}
/**
- * The implementation of this method must take care of creating a unique index to prevent duplicate resource paths.
+ * The implementation of this method must take care of creating a unique ids to prevent duplicate resource paths.
*/
protected abstract IClassMapping createClassMapping(CDOClass cdoClass);
diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOTypeUserType.java b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOTypeUserType.java
index d221953..f1092d6 100644
--- a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOTypeUserType.java
+++ b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOTypeUserType.java
@@ -81,7 +81,7 @@ public class CDOTypeUserType implements UserType
return null;
}
- return CDOTypeImpl.index.get(value);
+ return CDOTypeImpl.ids.get(value);
}
public void nullSafeSet(PreparedStatement statement, Object value, int index) throws SQLException
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/IndexReconstructionTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/IndexReconstructionTest.java
index d77c797..acf57bc 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/IndexReconstructionTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/IndexReconstructionTest.java
@@ -457,7 +457,7 @@ public class IndexReconstructionTest extends AbstractCDOTest
ReconstructedIndex expectedIndex = new ReconstructedIndex(id, feature, index);
if (!expectedIndices.add(expectedIndex))
{
- fail("Duplicate expected index: " + expectedIndex);
+ fail("Duplicate expected ids: " + expectedIndex);
}
}
@@ -478,7 +478,7 @@ public class IndexReconstructionTest extends AbstractCDOTest
indices[i]);
if (!expectedIndices.remove(expectedIndex))
{
- System.out.println("Reconstructed but not expected index: " + expectedIndex);
+ System.out.println("Reconstructed but not expected ids: " + expectedIndex);
fail = true;
}
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/EMFUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/EMFUtil.java
index 965c3ea..8261bb8 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/EMFUtil.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/EMFUtil.java
@@ -347,21 +347,21 @@ public final class EMFUtil
// new ECollections.ListDifferenceAnalyzer()
// {
// @Override
- // protected void add(List<Object> oldList, Object newObject, int index)
+ // protected void add(List<Object> oldList, Object newObject, int ids)
// {
- // changes.add(new AddChange(newObject, index));
+ // changes.add(new AddChange(newObject, ids));
// }
//
// @Override
- // protected void remove(List<?> oldList, int index)
+ // protected void remove(List<?> oldList, int ids)
// {
- // changes.add(new RemoveChange(index));
+ // changes.add(new RemoveChange(ids));
// }
//
// @Override
- // protected void move(List<?> oldList, int index, int toIndex)
+ // protected void move(List<?> oldList, int ids, int toIndex)
// {
- // changes.add(new MoveChange(index, toIndex));
+ // changes.add(new MoveChange(ids, toIndex));
// }
// }.createListChanges(oldList, newList);
//
@@ -373,7 +373,7 @@ public final class EMFUtil
// */
// public static class MoveChange implements FeatureChange
// {
- // public MoveChange(int index, int toIndex)
+ // public MoveChange(int ids, int toIndex)
// {
// }
// }
@@ -383,7 +383,7 @@ public final class EMFUtil
// */
// public static class RemoveChange implements FeatureChange
// {
- // public RemoveChange(int index)
+ // public RemoveChange(int ids)
// {
// }
// }
@@ -393,7 +393,7 @@ public final class EMFUtil
// */
// public static class AddChange implements FeatureChange
// {
- // public AddChange(Object newObject, int index)
+ // public AddChange(Object newObject, int ids)
// {
// }
// }