Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Taal2012-11-22 22:09:04 +0000
committerMartin Taal2012-11-22 22:09:04 +0000
commit2733ad456c3b00471ea3cbbc9bfb0f4145ef66be (patch)
treed486107b90bc7048b67cbcac2298c2f2cf76bb6f /plugins
parent1f45d176c34a595f30f8afeeb6f9262282904a1d (diff)
downloadcdo-2733ad456c3b00471ea3cbbc9bfb0f4145ef66be.tar.gz
cdo-2733ad456c3b00471ea3cbbc9bfb0f4145ef66be.tar.xz
cdo-2733ad456c3b00471ea3cbbc9bfb0f4145ef66be.zip
Make sure that the product has a unique name, for the hibernate store
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1FactoryImpl.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1FactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1FactoryImpl.java
index d522133a5f..63e5b45c2a 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1FactoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1FactoryImpl.java
@@ -62,6 +62,8 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
return new Model1FactoryImpl();
}
+ private int productCounter = 0;
+
/**
* Creates an instance of the factory.
* <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -208,8 +210,10 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
{
VAT result = VAT.get(initialValue);
if (result == null)
+ {
throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '"
+ eDataType.getName() + "'");
+ }
return result;
}
@@ -234,11 +238,12 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
+ * @generated NOT
*/
public Product1 createProduct1()
{
Product1Impl product1 = new Product1Impl();
+ product1.setName(productCounter++ + "");
return product1;
}

Back to the top