summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-03-03 10:01:50 (EST)
committerEike Stepper2008-03-03 10:01:50 (EST)
commitd3b5e85bb3af0778823319505f4a507cfb660eb4 (patch)
tree9e7b030b07c10839413340387cecafabc92a22c2
parentda127f9ba69daf8c7a56388900dd34e57a0ff10c (diff)
downloadcdo-d3b5e85bb3af0778823319505f4a507cfb660eb4.zip
cdo-d3b5e85bb3af0778823319505f4a507cfb660eb4.tar.gz
cdo-d3b5e85bb3af0778823319505f4a507cfb660eb4.tar.bz2
[217117] Develop a HibernateStore
https://bugs.eclipse.org/bugs/show_bug.cgi?id=217117
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.hibernate/.classpath1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.hibernate/HibernateServer.launch (renamed from plugins/org.eclipse.emf.cdo.tests.hibernate/HibernateTest.launch)10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.hibernate/META-INF/MANIFEST.MF20
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.hibernate/build.properties3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.hibernate/lib/.cvsignore2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/AllTests.java31
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/HibernateServer.java137
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/HibernateTest.java391
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.hibernate/test.xml47
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/model/model1.ecore6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Address.java25
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Category.java25
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Company.java43
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Customer.java11
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Factory.java49
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Package.java380
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Order.java11
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/OrderDetail.java32
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Product.java48
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/PurchaseOrder.java20
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/SalesOrder.java16
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Supplier.java11
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/VAT.java254
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/AddressImpl.java17
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CategoryImpl.java15
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CompanyImpl.java19
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CustomerImpl.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1FactoryImpl.java117
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1PackageImpl.java228
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderDetailImpl.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderImpl.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/ProductImpl.java34
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/PurchaseOrderImpl.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SalesOrderImpl.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SupplierImpl.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1AdapterFactory.java161
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java260
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTests.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/EnumTest.java79
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java11
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStore.java11
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ModelUtil.java11
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java3
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelector.java2
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/ExtendedIOUtil.java8
45 files changed, 1304 insertions, 1295 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.hibernate/.classpath b/plugins/org.eclipse.emf.cdo.tests.hibernate/.classpath
index 64c5e31..7ed56e2 100644
--- a/plugins/org.eclipse.emf.cdo.tests.hibernate/.classpath
+++ b/plugins/org.eclipse.emf.cdo.tests.hibernate/.classpath
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry exported="true" kind="lib" path="lib/mysql-connector-java-5.1.5-bin.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
diff --git a/plugins/org.eclipse.emf.cdo.tests.hibernate/HibernateTest.launch b/plugins/org.eclipse.emf.cdo.tests.hibernate/HibernateServer.launch
index 89fc71f..3cd1aff 100644
--- a/plugins/org.eclipse.emf.cdo.tests.hibernate/HibernateTest.launch
+++ b/plugins/org.eclipse.emf.cdo.tests.hibernate/HibernateServer.launch
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/HibernateTest.java"/>
+<listEntry value="/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/HibernateServer.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
@@ -10,10 +10,6 @@
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.cdo.tests.hibernate.HibernateTest"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.cdo.tests.hibernate.HibernateServer"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.emf.cdo.tests.hibernate"/>
</launchConfiguration>
diff --git a/plugins/org.eclipse.emf.cdo.tests.hibernate/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.tests.hibernate/META-INF/MANIFEST.MF
index 51c1d53..bedbefe 100644
--- a/plugins/org.eclipse.emf.cdo.tests.hibernate/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.tests.hibernate/META-INF/MANIFEST.MF
@@ -8,8 +8,20 @@ Bundle-Localization: plugin
Bundle-Activator: org.eclipse.emf.cdo.tests.hibernate.Activator
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-ClassPath: .
+Bundle-ClassPath: .,
+ lib/mysql-connector-java-5.1.5-bin.jar
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.emf.cdo.tests;bundle-version="[0.8.0,0.9.0)";visibility:=reexport,
- org.eclipse.emf.cdo.server.hibernate;bundle-version="[0.8.0,0.9.0)";visibility:=reexport
-Export-Package: org.eclipse.emf.cdo.tests.hibernate
+ org.eclipse.net4j.tcp;bundle-version="[0.8.0,0.9.0)",
+ org.eclipse.emf.cdo.server.hibernate;bundle-version="[0.8.0,0.9.0)"
+Export-Package: com.mysql.jdbc,
+ com.mysql.jdbc.exceptions,
+ com.mysql.jdbc.exceptions.jdbc4,
+ com.mysql.jdbc.integration.c3p0,
+ com.mysql.jdbc.integration.jboss,
+ com.mysql.jdbc.interceptors,
+ com.mysql.jdbc.jdbc2.optional,
+ com.mysql.jdbc.log,
+ com.mysql.jdbc.profiler,
+ com.mysql.jdbc.util,
+ org.eclipse.emf.cdo.tests.hibernate,
+ org.gjt.mm.mysql
diff --git a/plugins/org.eclipse.emf.cdo.tests.hibernate/build.properties b/plugins/org.eclipse.emf.cdo.tests.hibernate/build.properties
index e842be8..3f108f6 100644
--- a/plugins/org.eclipse.emf.cdo.tests.hibernate/build.properties
+++ b/plugins/org.eclipse.emf.cdo.tests.hibernate/build.properties
@@ -22,4 +22,5 @@ bin.includes = META-INF/,\
about.ini,\
about.mappings,\
about.properties,\
- modeling32.png
+ modeling32.png,\
+ lib/mysql-connector-java-5.1.5-bin.jar
diff --git a/plugins/org.eclipse.emf.cdo.tests.hibernate/lib/.cvsignore b/plugins/org.eclipse.emf.cdo.tests.hibernate/lib/.cvsignore
new file mode 100644
index 0000000..25b9dde
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.hibernate/lib/.cvsignore
@@ -0,0 +1,2 @@
+*.jar
+*.zip
diff --git a/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/AllTests.java b/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/AllTests.java
deleted file mode 100644
index 3369358..0000000
--- a/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/AllTests.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.emf.cdo.tests.hibernate;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-/**
- * @author Eike Stepper
- */
-public class AllTests
-{
- public static Test suite()
- {
- TestSuite suite = new TestSuite("Tests for CDO Hibernate");
-
- // $JUnit-BEGIN$
- suite.addTestSuite(HibernateTest.class);
- // $JUnit-END$
-
- return suite;
- }
-}
diff --git a/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/HibernateServer.java b/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/HibernateServer.java
new file mode 100644
index 0000000..22cdf5b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/HibernateServer.java
@@ -0,0 +1,137 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2008 Eike Stepper, Germany, and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ * Martin Taal - extended testcase
+ **************************************************************************/
+package org.eclipse.emf.cdo.tests.hibernate;
+
+import org.eclipse.emf.cdo.server.CDOServerUtil;
+import org.eclipse.emf.cdo.server.IRepository;
+import org.eclipse.emf.cdo.server.IStore;
+import org.eclipse.emf.cdo.server.IRepository.Props;
+import org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore;
+
+import org.eclipse.net4j.Net4jUtil;
+import org.eclipse.net4j.internal.util.om.log.PrintLogHandler;
+import org.eclipse.net4j.internal.util.om.trace.PrintTraceHandler;
+import org.eclipse.net4j.tcp.TCPUtil;
+import org.eclipse.net4j.util.container.ContainerUtil;
+import org.eclipse.net4j.util.container.IManagedContainer;
+import org.eclipse.net4j.util.io.IOUtil;
+import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
+import org.eclipse.net4j.util.om.OMPlatform;
+
+import org.hibernate.cfg.Environment;
+import org.hibernate.dialect.MySQLInnoDBDialect;
+
+import java.io.FileNotFoundException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.sql.Driver;
+import java.sql.DriverManager;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author Eike Stepper
+ */
+public class HibernateServer
+{
+ private static final String REPOSITORY_NAME = "repo1";
+
+ private static final boolean TRACE_TO_CONSOLE = true;
+
+ private static final boolean TRACE_TO_FILE = false;
+
+ private static PrintStream traceStream;
+
+ public static void main(String[] args) throws Exception
+ {
+ try
+ {
+ IManagedContainer container = initContainer();
+ TCPUtil.getAcceptor(container, "0.0.0.0:2036"); // Start the JVM transport
+ CDOServerUtil.addRepository(container, createRepository()); // Start a CDO respository
+
+ IOUtil.OUT().println();
+ IOUtil.OUT().println("Hit any key to shut down...");
+ while (System.in.read() == -1)
+ {
+ Thread.sleep(500);
+ }
+
+ LifecycleUtil.deactivate(container);
+ }
+ finally
+ {
+ IOUtil.close(traceStream);
+ }
+ }
+
+ private static IManagedContainer initContainer() throws FileNotFoundException
+ {
+ // Turn on tracing
+ OMPlatform.INSTANCE.setDebugging(true);
+ OMPlatform.INSTANCE.addLogHandler(PrintLogHandler.CONSOLE);
+ if (TRACE_TO_FILE)
+ {
+ traceStream = new PrintStream("trace.txt");
+ OMPlatform.INSTANCE.addTraceHandler(new PrintTraceHandler(traceStream));
+ }
+
+ if (TRACE_TO_CONSOLE)
+ {
+ OMPlatform.INSTANCE.addTraceHandler(PrintTraceHandler.CONSOLE);
+ }
+
+ // Prepare the standalone infra structure (not needed when running inside Eclipse)
+ IManagedContainer container = ContainerUtil.createContainer(); // Create a wiring container
+ Net4jUtil.prepareContainer(container); // Prepare the Net4j kernel
+ TCPUtil.prepareContainer(container); // Prepare the TCP transport
+ CDOServerUtil.prepareContainer(container); // Prepare the CDO server
+ return container;
+ }
+
+ private static IRepository createRepository() throws Exception
+ {
+ Map<String, String> props = new HashMap<String, String>();
+ props.put(Props.PROP_SUPPORTING_AUDITS, "false");
+ props.put(Props.PROP_SUPPORTING_REVISION_DELTAS, "false");
+ props.put(Props.PROP_VERIFYING_REVISIONS, "false");
+ props.put(Props.PROP_CURRENT_LRU_CAPACITY, "10000");
+ props.put(Props.PROP_REVISED_LRU_CAPACITY, "10000");
+ addHibernateTeneoProperties(props);
+
+ return CDOServerUtil.createRepository(REPOSITORY_NAME, createStore(), props);
+ }
+
+ private static void addHibernateTeneoProperties(Map<String, String> props) throws Exception
+ {
+ DriverManager.setLogWriter(new PrintWriter(System.out));
+ Driver driver = new com.mysql.jdbc.Driver();
+ DriverManager.registerDriver(driver);
+ String driverName = driver.getClass().getName();
+ String dialectName = MySQLInnoDBDialect.class.getName();
+
+ props.put(Environment.DRIVER, driverName);
+ props.put(Environment.URL, "jdbc:mysql://localhost/cdohibernate");
+ props.put(Environment.USER, "cdo");
+ // props.setProperty(Environment.PASS, "root");
+ props.put(Environment.DIALECT, dialectName);
+ props.put(Environment.SHOW_SQL, "true");
+ props.put("hibernate.hbm2ddl.auto", "create-drop");
+ }
+
+ private static IStore createStore() throws Exception
+ {
+ // IHibernateMappingProvider mappingProvider = new TeneoHibernateMappingProvider();
+ // return new HibernateStore(props, mappingProvider);
+ return new HibernateStore(null);
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/HibernateTest.java b/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/HibernateTest.java
deleted file mode 100644
index 7bf7450..0000000
--- a/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/HibernateTest.java
+++ /dev/null
@@ -1,391 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany, and others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- * Martin Taal - extended testcase
- **************************************************************************/
-package org.eclipse.emf.cdo.tests.hibernate;
-
-import org.eclipse.emf.cdo.CDOSession;
-import org.eclipse.emf.cdo.CDOTransaction;
-import org.eclipse.emf.cdo.server.CDOServerUtil;
-import org.eclipse.emf.cdo.server.IRepository;
-import org.eclipse.emf.cdo.server.IStore;
-import org.eclipse.emf.cdo.server.IRepository.Props;
-import org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore;
-import org.eclipse.emf.cdo.tests.model1.Category;
-import org.eclipse.emf.cdo.tests.model1.Customer;
-import org.eclipse.emf.cdo.tests.model1.Model1Factory;
-import org.eclipse.emf.cdo.tests.model1.Model1Package;
-import org.eclipse.emf.cdo.tests.model1.Order;
-import org.eclipse.emf.cdo.tests.model1.OrderDetail;
-import org.eclipse.emf.cdo.tests.model1.Product;
-import org.eclipse.emf.cdo.tests.model1.PurchaseOrder;
-import org.eclipse.emf.cdo.tests.model1.SalesOrder;
-import org.eclipse.emf.cdo.tests.model1.Supplier;
-import org.eclipse.emf.cdo.util.CDOUtil;
-
-import org.eclipse.net4j.Net4jUtil;
-import org.eclipse.net4j.connector.IConnector;
-import org.eclipse.net4j.internal.util.om.log.PrintLogHandler;
-import org.eclipse.net4j.internal.util.om.trace.PrintTraceHandler;
-import org.eclipse.net4j.jvm.JVMUtil;
-import org.eclipse.net4j.tests.AbstractOMTest;
-import org.eclipse.net4j.util.container.ContainerUtil;
-import org.eclipse.net4j.util.container.IManagedContainer;
-import org.eclipse.net4j.util.io.IOUtil;
-import org.eclipse.net4j.util.om.OMPlatform;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-
-import org.hibernate.cfg.Environment;
-import org.hibernate.dialect.MySQLInnoDBDialect;
-
-import java.io.FileNotFoundException;
-import java.io.PrintStream;
-import java.io.PrintWriter;
-import java.sql.Driver;
-import java.sql.DriverManager;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author Eike Stepper
- */
-public class HibernateTest extends AbstractOMTest
-{
- private static final String REPOSITORY_NAME = "repo1";
-
- private static final int NO_OF_BUSINESS_PARTNERS = 3;
-
- private static final int NO_OF_PRODUCTS = 7;
-
- private static final int NO_OF_ORDERS = 11;
-
- private static final long BASE_MILLIS = new Date().getTime();
-
- private static final boolean TRACE_TO_CONSOLE = true;
-
- private static final boolean TRACE_TO_FILE = false;
-
- private static PrintStream traceStream;
-
- public void testHibernate() throws Exception
- {
- try
- {
- IManagedContainer container = initContainer();
- JVMUtil.getAcceptor(container, "default"); // Start the JVM transport
- CDOServerUtil.addRepository(container, createRepository()); // Start a CDO respository
- IConnector connector = JVMUtil.getConnector(container, "default"); // Open a JVM connection
-
- CDOSession session = CDOUtil.openSession(connector, REPOSITORY_NAME, true);// Open a CDO session
- session.getPackageRegistry().putEPackage(Model1Package.eINSTANCE);// Not needed after first commit!!!
- CDOTransaction transaction = session.openTransaction();
- Resource resource = transaction.createResource("/my/big/resource");
- resource.getContents().add(getInputModel());
-
- // note that specific setters are not always called because of bi-directional
- // relations, so adding an orderdetail to an order.getOrderDetails list will
- // set the order feature of the orderdetail
- final Category productCategory = createCategory("SalesPurchase");
- final List<Customer> customers = new ArrayList<Customer>();
- final List<Supplier> suppliers = new ArrayList<Supplier>();
- final List<Order> orders = new ArrayList<Order>();
- for (int j = 0; j < NO_OF_BUSINESS_PARTNERS; j++)
- {
- final Customer customer = createCustomer(j);
- customers.add(customer);
- for (int i = 0; i < NO_OF_ORDERS; i++)
- {
- customer.getSalesOrders().add(createSalesOrder(j * 1000 + i, customer, productCategory.getProducts()));
- }
-
- orders.addAll(customer.getSalesOrders());
-
- final Supplier supplier = createSupplier(j);
- suppliers.add(supplier);
- for (int i = 0; i < NO_OF_ORDERS; i++)
- {
- supplier.getPurchaseOrders().add(createPurchaseOrder(j * 1000 + i, supplier, productCategory.getProducts()));
- }
-
- orders.addAll(supplier.getPurchaseOrders());
- }
-
- resource.getContents().add(productCategory);
- resource.getContents().addAll(customers);
- resource.getContents().addAll(suppliers);
- resource.getContents().addAll(orders);
-
- transaction.commit();
- session.close();
-
- CDOSession session2 = CDOUtil.openSession(connector, REPOSITORY_NAME, true);// Open a CDO session
- CDOTransaction transaction2 = session2.openTransaction();
- Resource resource2 = transaction2.getResource("/my/big/resource");
- Category category = (Category)resource2.getContents().get(0);
- assertEquals("CAT1", category.getName());
- assertEquals("CAT2", category.getCategories().get(0).getName());
- assertEquals("P1", category.getProducts().get(0).getName());
- assertEquals("P2", category.getProducts().get(1).getName());
- assertEquals("P3", category.getCategories().get(0).getProducts().get(0).getName());
- assertEquals(category, category.getProducts().get(1).eContainer());
-
- checkTestData(resource2);
-
- transaction.close();
-
- // Cleanup
- session2.close();
- connector.disconnect();
- }
- finally
- {
- IOUtil.close(traceStream);
- }
- }
-
- private static IManagedContainer initContainer() throws FileNotFoundException
- {
- // Turn on tracing
- OMPlatform.INSTANCE.setDebugging(true);
- OMPlatform.INSTANCE.addLogHandler(PrintLogHandler.CONSOLE);
- if (TRACE_TO_FILE)
- {
- traceStream = new PrintStream("trace.txt");
- OMPlatform.INSTANCE.addTraceHandler(new PrintTraceHandler(traceStream));
- }
-
- if (!TRACE_TO_CONSOLE)
- {
- OMPlatform.INSTANCE.removeTraceHandler(PrintTraceHandler.CONSOLE);
- }
-
- // Prepare the standalone infra structure (not needed when running inside Eclipse)
- IManagedContainer container = ContainerUtil.createContainer(); // Create a wiring container
- Net4jUtil.prepareContainer(container); // Prepare the Net4j kernel
- JVMUtil.prepareContainer(container); // Prepare the JVM transport
- CDOServerUtil.prepareContainer(container); // Prepare the CDO server
- CDOUtil.prepareContainer(container, false); // Prepare the CDO client
- return container;
- }
-
- private static IRepository createRepository() throws Exception
- {
- Map<String, String> props = new HashMap<String, String>();
- props.put(Props.PROP_SUPPORTING_AUDITS, "false");
- props.put(Props.PROP_SUPPORTING_REVISION_DELTAS, "false");
- props.put(Props.PROP_VERIFYING_REVISIONS, "false");
- props.put(Props.PROP_CURRENT_LRU_CAPACITY, "10000");
- props.put(Props.PROP_REVISED_LRU_CAPACITY, "10000");
-
- addHibernateTeneoProperties(props);
-
- return CDOServerUtil.createRepository(REPOSITORY_NAME, createStore(), props);
- }
-
- private static void addHibernateTeneoProperties(Map<String, String> props) throws Exception
- {
- DriverManager.setLogWriter(new PrintWriter(System.out));
- Driver driver = new com.mysql.jdbc.Driver();
- DriverManager.registerDriver(driver);
- String driverName = driver.getClass().getName();
- String dialectName = MySQLInnoDBDialect.class.getName();
-
- props.put(Environment.DRIVER, driverName);
- props.put(Environment.URL, "jdbc:mysql://localhost/cdohibernate");
- props.put(Environment.USER, "cdo");
- // props.setProperty(Environment.PASS, "root");
- props.put(Environment.DIALECT, dialectName);
- props.put(Environment.SHOW_SQL, "true");
- props.put("hibernate.hbm2ddl.auto", "create-drop");
- }
-
- private static IStore createStore() throws Exception
- {
- // IHibernateMappingProvider mappingProvider = new TeneoHibernateMappingProvider();
- // return new HibernateStore(props, mappingProvider);
- return new HibernateStore(null);
- }
-
- private static EObject getInputModel()
- {
- Category cat1 = Model1Factory.eINSTANCE.createCategory();
- cat1.setName("CAT1");
- Category cat2 = Model1Factory.eINSTANCE.createCategory();
- cat2.setName("CAT2");
- cat1.getCategories().add(cat2);
- Product p1 = Model1Factory.eINSTANCE.createProduct();
- p1.setName("P1");
- cat1.getProducts().add(p1);
- Product p2 = Model1Factory.eINSTANCE.createProduct();
- p2.setName("P2");
- cat1.getProducts().add(p2);
- Product p3 = Model1Factory.eINSTANCE.createProduct();
- p3.setName("P3");
- cat2.getProducts().add(p3);
- return cat1;
- }
-
- private void checkTestData(Resource res)
- {
- final Category productCategory = (Category)res.getContents().get(1);
-
- int startIndex = 2;
- int customerIndex = 0;
- int numOfBPs = 0;
- int numOfOrders = 0;
- for (int i = startIndex; i < startIndex + NO_OF_BUSINESS_PARTNERS; i++)
- {
- final Customer c = (Customer)res.getContents().get(i);
- assertEquals(NO_OF_ORDERS, c.getSalesOrders().size());
- assertEquals("Amsterdam" + customerIndex, c.getCity());
- assertEquals("Customer" + customerIndex, c.getName());
- assertEquals("Leidseplein" + customerIndex, c.getStreet());
- int orderIndex = 0;
- for (SalesOrder so : c.getSalesOrders())
- {
- assertEquals(NO_OF_PRODUCTS, so.getOrderDetails().size());
- assertEquals(customerIndex * 1000 + orderIndex, so.getId());
- float price = 1.0f;
- int detailIndex = 0;
- for (OrderDetail od : so.getOrderDetails())
- {
- assertTrue(productCategory.getProducts().contains(od.getProduct()));
- assertEquals(so, od.getOrder());
- assertEquals(so, od.eContainer());
- assertEquals(price, od.getPrice(), 0.0001f);
- assertEquals("SalesPurchaseProduct" + detailIndex, od.getProduct().getName());
- assertTrue(od.getProduct().getOrderDetails().contains(od));
- price += 1.0f;
- detailIndex++;
- }
-
- assertTrue(res.getContents().contains(so));
- orderIndex++;
- numOfOrders++;
- }
-
- customerIndex++;
- numOfBPs++;
- }
-
- startIndex = 2 + NO_OF_BUSINESS_PARTNERS;
- int supplierIndex = 0;
- for (int i = startIndex; i < startIndex + NO_OF_BUSINESS_PARTNERS; i++)
- {
- Supplier s = (Supplier)res.getContents().get(i);
- assertEquals("Berlin" + supplierIndex, s.getCity());
- assertEquals("Supplier" + supplierIndex, s.getName());
- assertEquals("Potsdamer Platz" + supplierIndex, s.getStreet());
-
- int orderIndex = 0;
- for (PurchaseOrder po : s.getPurchaseOrders())
- {
- assertEquals(BASE_MILLIS + supplierIndex * 1000 + orderIndex, po.getDate().getTime());
-
- float price = 1000.0f;
- int detailIndex = 0;
- for (OrderDetail od : po.getOrderDetails())
- {
- assertTrue(productCategory.getProducts().contains(od.getProduct()));
- assertEquals(po, od.getOrder());
- assertEquals(po, od.eContainer());
- assertEquals(price, od.getPrice(), 0.0001f);
- assertEquals("SalesPurchaseProduct" + detailIndex, od.getProduct().getName());
- assertTrue(od.getProduct().getOrderDetails().contains(od));
- price += 1.0f;
- detailIndex++;
- }
-
- orderIndex++;
- numOfOrders++;
- }
-
- numOfBPs++;
- supplierIndex++;
- }
-
- // 2 is for the categories
- assertEquals(2 + numOfBPs + numOfOrders, res.getContents().size());
- }
-
- private static Category createCategory(String prefix)
- {
- Category catalog = Model1Factory.eINSTANCE.createCategory();
- catalog.setName(prefix + "Catalog");
- for (int i = 0; i < NO_OF_PRODUCTS; i++)
- {
- Product p = Model1Factory.eINSTANCE.createProduct();
- p.setName(prefix + "Product" + i);
- catalog.getProducts().add(p);
- }
-
- return catalog;
- }
-
- private static Customer createCustomer(int index)
- {
- final Customer c = Model1Factory.eINSTANCE.createCustomer();
- c.setCity("Amsterdam" + index);
- c.setName("Customer" + index);
- c.setStreet("Leidseplein" + index);
- return c;
- }
-
- private static Supplier createSupplier(int index)
- {
- final Supplier s = Model1Factory.eINSTANCE.createSupplier();
- s.setName("Supplier" + index);
- s.setCity("Berlin" + index);
- s.setStreet("Potsdamer Platz" + index);
- return s;
- }
-
- private static SalesOrder createSalesOrder(int index, Customer c, List<Product> products)
- {
- final SalesOrder so = Model1Factory.eINSTANCE.createSalesOrder();
- so.setId(index);
- so.getOrderDetails().addAll(createOrderDetails(products, 1.0f));
- return so;
- }
-
- private static PurchaseOrder createPurchaseOrder(int index, Supplier supplier, List<Product> products)
- {
- final PurchaseOrder po = Model1Factory.eINSTANCE.createPurchaseOrder();
- po.setDate(new Date(BASE_MILLIS + index));
- po.getOrderDetails().addAll(createOrderDetails(products, 1000.0f));
- return po;
- }
-
- private static List<OrderDetail> createOrderDetails(List<Product> products, float basePrice)
- {
- final List<OrderDetail> ods = new ArrayList<OrderDetail>();
- float price = basePrice;
- for (Product p : products)
- {
- ods.add(createOrderDetail(p, price));
- price += 1f;
- }
-
- return ods;
- }
-
- private static OrderDetail createOrderDetail(Product product, float price)
- {
- final OrderDetail od = Model1Factory.eINSTANCE.createOrderDetail();
- od.setPrice(price);
- od.setProduct(product);
- return od;
- }
-}
diff --git a/plugins/org.eclipse.emf.cdo.tests.hibernate/test.xml b/plugins/org.eclipse.emf.cdo.tests.hibernate/test.xml
deleted file mode 100644
index 43b07a3..0000000
--- a/plugins/org.eclipse.emf.cdo.tests.hibernate/test.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="testsuite" default="run" basedir=".">
- <!-- The property ${eclipse-home} should be passed into this script -->
- <!-- Set a meaningful default value for when it is not. -->
- <property name="eclipse-home" value="${basedir}\..\.."/>
-
- <!-- sets the properties plugin-name, and library-file -->
- <property name="plugin-name" value="org.eclipse.emf.cdo.tests"/>
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp/>
- <delete>
- <fileset dir="${eclipse-home}" includes="org*.xml"/>
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
- <property name="emf-folder" value="${eclipse-home}/emf_folder"/>
- <delete dir="${emf-folder}" quiet="true"/>
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${emf-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.emf.cdo.tests.AllTests"/>
- </ant>
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-</project> \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/model/model1.ecore b/plugins/org.eclipse.emf.cdo.tests.model1/model/model1.ecore
index 1c90dd2..ac921a1 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/model/model1.ecore
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/model/model1.ecore
@@ -60,5 +60,11 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="orderDetails" upperBound="-1"
eType="#//OrderDetail" eOpposite="#//OrderDetail/product"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="vat" eType="#//VAT" defaultValueLiteral="vat15"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="VAT">
+ <eLiterals name="vat0"/>
+ <eLiterals name="vat7" value="7"/>
+ <eLiterals name="vat15" value="15"/>
</eClassifiers>
</ecore:EPackage>
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Address.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Address.java
index e70ef30..72710b1 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Address.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Address.java
@@ -10,15 +10,16 @@ import org.eclipse.emf.cdo.CDOObject;
/**
* <!-- begin-user-doc --> A representation of the model object '<em><b>Address</b></em>'. <!-- end-user-doc -->
+ *
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.Address#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.Address#getStreet <em>Street</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.Address#getCity <em>City</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.Address#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.Address#getStreet <em>Street</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.Address#getCity <em>City</em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getAddress()
* @model
* @extends CDOObject
@@ -27,13 +28,13 @@ import org.eclipse.emf.cdo.CDOObject;
public interface Address extends CDOObject
{
/**
- * Returns the value of the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Name</em>' attribute isn't clear, there really should be more of a description
* here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getAddress_Name()
@@ -54,13 +55,13 @@ public interface Address extends CDOObject
void setName(String value);
/**
- * Returns the value of the '<em><b>Street</b></em>' attribute. <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Street</b></em>' attribute.
+ * <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Street</em>' attribute isn't clear, there really should be more of a description
* here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Street</em>' attribute.
* @see #setStreet(String)
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getAddress_Street()
@@ -72,22 +73,20 @@ public interface Address extends CDOObject
/**
* Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Address#getStreet <em>Street</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Street</em>' attribute.
+ * @param value the new value of the '<em>Street</em>' attribute.
* @see #getStreet()
* @generated
*/
void setStreet(String value);
/**
- * Returns the value of the '<em><b>City</b></em>' attribute. <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>City</b></em>' attribute.
+ * <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>City</em>' attribute isn't clear, there really should be more of a description
* here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>City</em>' attribute.
* @see #setCity(String)
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getAddress_City()
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Category.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Category.java
index 2e80c87..7713929 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Category.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Category.java
@@ -12,15 +12,16 @@ import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc --> A representation of the model object '<em><b>Category</b></em>'. <!-- end-user-doc -->
+ *
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.Category#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.Category#getCategories <em>Categories</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.Category#getProducts <em>Products</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.Category#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.Category#getCategories <em>Categories</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.Category#getProducts <em>Products</em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCategory()
* @model
* @extends CDOObject
@@ -29,13 +30,13 @@ import org.eclipse.emf.common.util.EList;
public interface Category extends CDOObject
{
/**
- * Returns the value of the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Name</em>' attribute isn't clear, there really should be more of a description
* here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCategory_Name()
@@ -56,14 +57,14 @@ public interface Category extends CDOObject
void setName(String value);
/**
- * Returns the value of the '<em><b>Categories</b></em>' containment reference list. The list contents are of
- * type {@link org.eclipse.emf.cdo.tests.model1.Category}. <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Categories</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.Category}.
+ * <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Categories</em>' containment reference list isn't clear, there really should be more
* of a description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Categories</em>' containment reference list.
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCategory_Categories()
* @model containment="true"
@@ -72,14 +73,14 @@ public interface Category extends CDOObject
EList<Category> getCategories();
/**
- * Returns the value of the '<em><b>Products</b></em>' containment reference list. The list contents are of type
- * {@link org.eclipse.emf.cdo.tests.model1.Product}. <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Products</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.Product}.
+ * <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Products</em>' containment reference list isn't clear, there really should be more
* of a description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Products</em>' containment reference list.
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCategory_Products()
* @model containment="true"
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Company.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Company.java
index eb4c433..4b48bf8 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Company.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Company.java
@@ -10,17 +10,18 @@ import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc --> A representation of the model object '<em><b>Company</b></em>'. <!-- end-user-doc -->
+ *
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.Company#getCategories <em>Categories</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.Company#getSuppliers <em>Suppliers</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.Company#getCustomers <em>Customers</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.Company#getPurchaseOrders <em>Purchase Orders</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.Company#getSalesOrders <em>Sales Orders</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.Company#getCategories <em>Categories</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.Company#getSuppliers <em>Suppliers</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.Company#getCustomers <em>Customers</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.Company#getPurchaseOrders <em>Purchase Orders</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.Company#getSalesOrders <em>Sales Orders</em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCompany()
* @model
* @generated
@@ -28,14 +29,14 @@ import org.eclipse.emf.common.util.EList;
public interface Company extends Address
{
/**
- * Returns the value of the '<em><b>Categories</b></em>' containment reference list. The list contents are of
- * type {@link org.eclipse.emf.cdo.tests.model1.Category}. <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Categories</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.Category}.
+ * <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Categories</em>' containment reference list isn't clear, there really should be more
* of a description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Categories</em>' containment reference list.
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCompany_Categories()
* @model containment="true"
@@ -44,14 +45,14 @@ public interface Company extends Address
EList<Category> getCategories();
/**
- * Returns the value of the '<em><b>Suppliers</b></em>' containment reference list. The list contents are of type
- * {@link org.eclipse.emf.cdo.tests.model1.Supplier}. <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Suppliers</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.Supplier}.
+ * <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Suppliers</em>' containment reference list isn't clear, there really should be more
* of a description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Suppliers</em>' containment reference list.
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCompany_Suppliers()
* @model containment="true"
@@ -60,14 +61,14 @@ public interface Company extends Address
EList<Supplier> getSuppliers();
/**
- * Returns the value of the '<em><b>Purchase Orders</b></em>' containment reference list. The list contents are
- * of type {@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder}. <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Purchase Orders</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder}.
+ * <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Purchase Orders</em>' containment reference list isn't clear, there really should be
* more of a description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Purchase Orders</em>' containment reference list.
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCompany_PurchaseOrders()
* @model containment="true"
@@ -76,14 +77,14 @@ public interface Company extends Address
EList<PurchaseOrder> getPurchaseOrders();
/**
- * Returns the value of the '<em><b>Customers</b></em>' containment reference list. The list contents are of type
- * {@link org.eclipse.emf.cdo.tests.model1.Customer}. <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Customers</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.Customer}.
+ * <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Customers</em>' containment reference list isn't clear, there really should be more
* of a description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Customers</em>' containment reference list.
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCompany_Customers()
* @model containment="true"
@@ -92,14 +93,14 @@ public interface Company extends Address
EList<Customer> getCustomers();
/**
- * Returns the value of the '<em><b>Sales Orders</b></em>' containment reference list. The list contents are of
- * type {@link org.eclipse.emf.cdo.tests.model1.SalesOrder}. <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Sales Orders</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.SalesOrder}.
+ * <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Sales Orders</em>' containment reference list isn't clear, there really should be
* more of a description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Sales Orders</em>' containment reference list.
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCompany_SalesOrders()
* @model containment="true"
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Customer.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Customer.java
index c306e00..3d7ffe2 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Customer.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Customer.java
@@ -10,13 +10,14 @@ import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc --> A representation of the model object '<em><b>Customer</b></em>'. <!-- end-user-doc -->
+ *
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.Customer#getSalesOrders <em>Sales Orders</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.Customer#getSalesOrders <em>Sales Orders</em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCustomer()
* @model
* @generated
@@ -24,15 +25,15 @@ import org.eclipse.emf.common.util.EList;
public interface Customer extends Address
{
/**
- * Returns the value of the '<em><b>Sales Orders</b></em>' reference list. The list contents are of type
- * {@link org.eclipse.emf.cdo.tests.model1.SalesOrder}. It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getCustomer <em>Customer</em>}'.
+ * Returns the value of the '<em><b>Sales Orders</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.SalesOrder}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getCustomer <em>Customer</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Sales Orders</em>' reference list isn't clear, there really should be more of a
* description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Sales Orders</em>' reference list.
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCustomer_SalesOrders()
* @see org.eclipse.emf.cdo.tests.model1.SalesOrder#getCustomer
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Factory.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Factory.java
index 686ca83..aced551 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Factory.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Factory.java
@@ -11,102 +11,101 @@ import org.eclipse.emf.ecore.EFactory;
/**
* <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a create method for each non-abstract class of
* the model. <!-- end-user-doc -->
- *
* @see org.eclipse.emf.cdo.tests.model1.Model1Package
* @generated
*/
public interface Model1Factory extends EFactory
{
/**
- * The singleton instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
Model1Factory eINSTANCE = org.eclipse.emf.cdo.tests.model1.impl.Model1FactoryImpl.init();
/**
- * Returns a new object of class '<em>Address</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * Returns a new object of class '<em>Address</em>'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @return a new object of class '<em>Address</em>'.
* @generated
*/
Address createAddress();
/**
- * Returns a new object of class '<em>Supplier</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * Returns a new object of class '<em>Supplier</em>'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @return a new object of class '<em>Supplier</em>'.
* @generated
*/
Supplier createSupplier();
/**
- * Returns a new object of class '<em>Purchase Order</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * Returns a new object of class '<em>Purchase Order</em>'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @return a new object of class '<em>Purchase Order</em>'.
* @generated
*/
PurchaseOrder createPurchaseOrder();
/**
- * Returns a new object of class '<em>Order Detail</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * Returns a new object of class '<em>Order Detail</em>'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @return a new object of class '<em>Order Detail</em>'.
* @generated
*/
OrderDetail createOrderDetail();
/**
- * Returns a new object of class '<em>Product</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * Returns a new object of class '<em>Product</em>'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @return a new object of class '<em>Product</em>'.
* @generated
*/
Product createProduct();
/**
- * Returns a new object of class '<em>Category</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * Returns a new object of class '<em>Category</em>'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @return a new object of class '<em>Category</em>'.
* @generated
*/
Category createCategory();
/**
- * Returns a new object of class '<em>Company</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * Returns a new object of class '<em>Company</em>'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @return a new object of class '<em>Company</em>'.
* @generated
*/
Company createCompany();
/**
- * Returns a new object of class '<em>Customer</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * Returns a new object of class '<em>Customer</em>'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @return a new object of class '<em>Customer</em>'.
* @generated
*/
Customer createCustomer();
/**
- * Returns a new object of class '<em>Order</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * Returns a new object of class '<em>Order</em>'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @return a new object of class '<em>Order</em>'.
* @generated
*/
Order createOrder();
/**
- * Returns a new object of class '<em>Sales Order</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * Returns a new object of class '<em>Sales Order</em>'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @return a new object of class '<em>Sales Order</em>'.
* @generated
*/
SalesOrder createSalesOrder();
/**
- * Returns the package supported by this factory. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @return the package supported by this factory.
* @generated
*/
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Package.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Package.java
index fe21048..7ab5018 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Package.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Package.java
@@ -8,6 +8,7 @@ package org.eclipse.emf.cdo.tests.model1;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
@@ -20,7 +21,6 @@ import org.eclipse.emf.ecore.EReference;
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
- *
* @see org.eclipse.emf.cdo.tests.model1.Model1Factory
* @model kind="package"
* @generated
@@ -28,29 +28,29 @@ import org.eclipse.emf.ecore.EReference;
public interface Model1Package extends EPackage
{
/**
- * The package name. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The package name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
String eNAME = "model1";
/**
- * The package namespace URI. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The package namespace URI.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
String eNS_URI = "http://www.eclipse.org/emf/CDO/tests/model1/1.0.0";
/**
- * The package namespace name. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The package namespace name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
String eNS_PREFIX = "model1";
/**
- * The singleton instance of the package. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The singleton instance of the package.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
Model1Package eINSTANCE = org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl.init();
@@ -58,7 +58,6 @@ public interface Model1Package extends EPackage
/**
* The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.AddressImpl <em>Address</em>}' class.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @see org.eclipse.emf.cdo.tests.model1.impl.AddressImpl
* @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getAddress()
* @generated
@@ -66,24 +65,24 @@ public interface Model1Package extends EPackage
int ADDRESS = 0;
/**
- * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
int ADDRESS__NAME = 0;
/**
- * The feature id for the '<em><b>Street</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The feature id for the '<em><b>Street</b></em>' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
int ADDRESS__STREET = 1;
/**
- * The feature id for the '<em><b>City</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The feature id for the '<em><b>City</b></em>' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
@@ -101,7 +100,6 @@ public interface Model1Package extends EPackage
/**
* The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.SupplierImpl <em>Supplier</em>}' class.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @see org.eclipse.emf.cdo.tests.model1.impl.SupplierImpl
* @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getSupplier()
* @generated
@@ -109,9 +107,8 @@ public interface Model1Package extends EPackage
int SUPPLIER = 2;
/**
- * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.PurchaseOrderImpl <em>Purchase Order</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.PurchaseOrderImpl <em>Purchase Order</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @see org.eclipse.emf.cdo.tests.model1.impl.PurchaseOrderImpl
* @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getPurchaseOrder()
* @generated
@@ -119,9 +116,8 @@ public interface Model1Package extends EPackage
int PURCHASE_ORDER = 6;
/**
- * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.OrderDetailImpl <em>Order Detail</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.OrderDetailImpl <em>Order Detail</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @see org.eclipse.emf.cdo.tests.model1.impl.OrderDetailImpl
* @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getOrderDetail()
* @generated
@@ -131,7 +127,6 @@ public interface Model1Package extends EPackage
/**
* The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.ProductImpl <em>Product</em>}' class.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @see org.eclipse.emf.cdo.tests.model1.impl.ProductImpl
* @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getProduct()
* @generated
@@ -151,7 +146,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Address#getName <em>Name</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the attribute '<em>Name</em>'.
* @see org.eclipse.emf.cdo.tests.model1.Address#getName()
* @see #getAddress()
@@ -162,7 +156,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Address#getStreet <em>Street</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the attribute '<em>Street</em>'.
* @see org.eclipse.emf.cdo.tests.model1.Address#getStreet()
* @see #getAddress()
@@ -173,7 +166,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Address#getCity <em>City</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the attribute '<em>City</em>'.
* @see org.eclipse.emf.cdo.tests.model1.Address#getCity()
* @see #getAddress()
@@ -184,7 +176,6 @@ public interface Model1Package extends EPackage
/**
* The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.CategoryImpl <em>Category</em>}' class.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @see org.eclipse.emf.cdo.tests.model1.impl.CategoryImpl
* @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getCategory()
* @generated
@@ -194,7 +185,6 @@ public interface Model1Package extends EPackage
/**
* The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl <em>Company</em>}' class.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @see org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl
* @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getCompany()
* @generated
@@ -202,69 +192,69 @@ public interface Model1Package extends EPackage
int COMPANY = 1;
/**
- * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
int COMPANY__NAME = ADDRESS__NAME;
/**
- * The feature id for the '<em><b>Street</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The feature id for the '<em><b>Street</b></em>' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
int COMPANY__STREET = ADDRESS__STREET;
/**
- * The feature id for the '<em><b>City</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The feature id for the '<em><b>City</b></em>' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
int COMPANY__CITY = ADDRESS__CITY;
/**
- * The feature id for the '<em><b>Categories</b></em>' containment reference list. <!-- begin-user-doc --> <!--
+ * The feature id for the '<em><b>Categories</b></em>' containment reference list.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
* @ordered
*/
int COMPANY__CATEGORIES = ADDRESS_FEATURE_COUNT + 0;
/**
- * The feature id for the '<em><b>Suppliers</b></em>' containment reference list. <!-- begin-user-doc --> <!--
+ * The feature id for the '<em><b>Suppliers</b></em>' containment reference list.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
* @ordered
*/
int COMPANY__SUPPLIERS = ADDRESS_FEATURE_COUNT + 1;
/**
- * The feature id for the '<em><b>Customers</b></em>' containment reference list. <!-- begin-user-doc --> <!--
+ * The feature id for the '<em><b>Customers</b></em>' containment reference list.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
* @ordered
*/
int COMPANY__CUSTOMERS = ADDRESS_FEATURE_COUNT + 2;
/**
- * The feature id for the '<em><b>Purchase Orders</b></em>' containment reference list. <!-- begin-user-doc -->
+ * The feature id for the '<em><b>Purchase Orders</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
int COMPANY__PURCHASE_ORDERS = ADDRESS_FEATURE_COUNT + 3;
/**
- * The feature id for the '<em><b>Sales Orders</b></em>' containment reference list. <!-- begin-user-doc --> <!--
+ * The feature id for the '<em><b>Sales Orders</b></em>' containment reference list.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -280,33 +270,33 @@ public interface Model1Package extends EPackage
int COMPANY_FEATURE_COUNT = ADDRESS_FEATURE_COUNT + 5;
/**
- * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUPPLIER__NAME = ADDRESS__NAME;
/**
- * The feature id for the '<em><b>Street</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The feature id for the '<em><b>Street</b></em>' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUPPLIER__STREET = ADDRESS__STREET;
/**
- * The feature id for the '<em><b>City</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The feature id for the '<em><b>City</b></em>' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
int SUPPLIER__CITY = ADDRESS__CITY;
/**
- * The feature id for the '<em><b>Purchase Orders</b></em>' reference list. <!-- begin-user-doc --> <!--
+ * The feature id for the '<em><b>Purchase Orders</b></em>' reference list.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -324,7 +314,6 @@ public interface Model1Package extends EPackage
/**
* The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.CustomerImpl <em>Customer</em>}' class.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @see org.eclipse.emf.cdo.tests.model1.impl.CustomerImpl
* @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getCustomer()
* @generated
@@ -332,33 +321,33 @@ public interface Model1Package extends EPackage
int CUSTOMER = 3;
/**
- * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
int CUSTOMER__NAME = ADDRESS__NAME;
/**
- * The feature id for the '<em><b>Street</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The feature id for the '<em><b>Street</b></em>' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
int CUSTOMER__STREET = ADDRESS__STREET;
/**
- * The feature id for the '<em><b>City</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The feature id for the '<em><b>City</b></em>' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
int CUSTOMER__CITY = ADDRESS__CITY;
/**
- * The feature id for the '<em><b>Sales Orders</b></em>' reference list. <!-- begin-user-doc --> <!--
+ * The feature id for the '<em><b>Sales Orders</b></em>' reference list.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -384,17 +373,17 @@ public interface Model1Package extends EPackage
int ORDER = 4;
/**
- * The feature id for the '<em><b>Order Details</b></em>' containment reference list. <!-- begin-user-doc -->
+ * The feature id for the '<em><b>Order Details</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
int ORDER__ORDER_DETAILS = 0;
/**
- * The number of structural features of the '<em>Order</em>' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The number of structural features of the '<em>Order</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
@@ -410,68 +399,67 @@ public interface Model1Package extends EPackage
int ORDER_DETAIL__ORDER = 0;
/**
- * The feature id for the '<em><b>Product</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The feature id for the '<em><b>Product</b></em>' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
int ORDER_DETAIL__PRODUCT = 1;
/**
- * The feature id for the '<em><b>Price</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The feature id for the '<em><b>Price</b></em>' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
int ORDER_DETAIL__PRICE = 2;
/**
- * The number of structural features of the '<em>Order Detail</em>' class. <!-- begin-user-doc --> <!--
+ * The number of structural features of the '<em>Order Detail</em>' class.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
* @ordered
*/
int ORDER_DETAIL_FEATURE_COUNT = 3;
/**
- * The feature id for the '<em><b>Order Details</b></em>' containment reference list. <!-- begin-user-doc -->
+ * The feature id for the '<em><b>Order Details</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
int PURCHASE_ORDER__ORDER_DETAILS = ORDER__ORDER_DETAILS;
/**
- * The feature id for the '<em><b>Date</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The feature id for the '<em><b>Date</b></em>' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
int PURCHASE_ORDER__DATE = ORDER_FEATURE_COUNT + 0;
/**
- * The feature id for the '<em><b>Supplier</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The feature id for the '<em><b>Supplier</b></em>' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
int PURCHASE_ORDER__SUPPLIER = ORDER_FEATURE_COUNT + 1;
/**
- * The number of structural features of the '<em>Purchase Order</em>' class. <!-- begin-user-doc --> <!--
+ * The number of structural features of the '<em>Purchase Order</em>' class.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
* @ordered
*/
int PURCHASE_ORDER_FEATURE_COUNT = ORDER_FEATURE_COUNT + 2;
/**
- * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.SalesOrderImpl <em>Sales Order</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.SalesOrderImpl <em>Sales Order</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @see org.eclipse.emf.cdo.tests.model1.impl.SalesOrderImpl
* @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getSalesOrder()
* @generated
@@ -479,60 +467,60 @@ public interface Model1Package extends EPackage
int SALES_ORDER = 7;
/**
- * The feature id for the '<em><b>Order Details</b></em>' containment reference list. <!-- begin-user-doc -->
+ * The feature id for the '<em><b>Order Details</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
int SALES_ORDER__ORDER_DETAILS = ORDER__ORDER_DETAILS;
/**
- * The feature id for the '<em><b>Id</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The feature id for the '<em><b>Id</b></em>' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
int SALES_ORDER__ID = ORDER_FEATURE_COUNT + 0;
/**
- * The feature id for the '<em><b>Customer</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The feature id for the '<em><b>Customer</b></em>' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
int SALES_ORDER__CUSTOMER = ORDER_FEATURE_COUNT + 1;
/**
- * The number of structural features of the '<em>Sales Order</em>' class. <!-- begin-user-doc --> <!--
+ * The number of structural features of the '<em>Sales Order</em>' class.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
* @ordered
*/
int SALES_ORDER_FEATURE_COUNT = ORDER_FEATURE_COUNT + 2;
/**
- * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
int CATEGORY__NAME = 0;
/**
- * The feature id for the '<em><b>Categories</b></em>' containment reference list. <!-- begin-user-doc --> <!--
+ * The feature id for the '<em><b>Categories</b></em>' containment reference list.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
* @ordered
*/
int CATEGORY__CATEGORIES = 1;
/**
- * The feature id for the '<em><b>Products</b></em>' containment reference list. <!-- begin-user-doc --> <!--
+ * The feature id for the '<em><b>Products</b></em>' containment reference list.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
* @ordered
*/
@@ -548,30 +536,49 @@ public interface Model1Package extends EPackage
int CATEGORY_FEATURE_COUNT = 3;
/**
- * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
int PRODUCT__NAME = 0;
/**
- * The feature id for the '<em><b>Order Details</b></em>' reference list. <!-- begin-user-doc --> <!--
+ * The feature id for the '<em><b>Order Details</b></em>' reference list.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
* @ordered
*/
int PRODUCT__ORDER_DETAILS = 1;
/**
+ * The feature id for the '<em><b>Vat</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PRODUCT__VAT = 2;
+
+ /**
* The number of structural features of the '<em>Product</em>' class. <!-- begin-user-doc --> <!-- end-user-doc
* -->
*
* @generated
* @ordered
*/
- int PRODUCT_FEATURE_COUNT = 2;
+ int PRODUCT_FEATURE_COUNT = 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.VAT <em>VAT</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.tests.model1.VAT
+ * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getVAT()
+ * @generated
+ */
+ int VAT = 10;
/**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Supplier <em>Supplier</em>}'. <!--
@@ -586,7 +593,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model1.Supplier#getPurchaseOrders <em>Purchase Orders</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the reference list '<em>Purchase Orders</em>'.
* @see org.eclipse.emf.cdo.tests.model1.Supplier#getPurchaseOrders()
* @see #getSupplier()
@@ -597,7 +603,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder <em>Purchase Order</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for class '<em>Purchase Order</em>'.
* @see org.eclipse.emf.cdo.tests.model1.PurchaseOrder
* @generated
@@ -607,7 +612,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getDate <em>Date</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the attribute '<em>Date</em>'.
* @see org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getDate()
* @see #getPurchaseOrder()
@@ -618,7 +622,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getSupplier <em>Supplier</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the reference '<em>Supplier</em>'.
* @see org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getSupplier()
* @see #getPurchaseOrder()
@@ -629,7 +632,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail <em>Order Detail</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for class '<em>Order Detail</em>'.
* @see org.eclipse.emf.cdo.tests.model1.OrderDetail
* @generated
@@ -639,7 +641,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the container reference '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getOrder <em>Order</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the container reference '<em>Order</em>'.
* @see org.eclipse.emf.cdo.tests.model1.OrderDetail#getOrder()
* @see #getOrderDetail()
@@ -650,7 +651,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getProduct <em>Product</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the reference '<em>Product</em>'.
* @see org.eclipse.emf.cdo.tests.model1.OrderDetail#getProduct()
* @see #getOrderDetail()
@@ -661,7 +661,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getPrice <em>Price</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the attribute '<em>Price</em>'.
* @see org.eclipse.emf.cdo.tests.model1.OrderDetail#getPrice()
* @see #getOrderDetail()
@@ -682,7 +681,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Product#getName <em>Name</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the attribute '<em>Name</em>'.
* @see org.eclipse.emf.cdo.tests.model1.Product#getName()
* @see #getProduct()
@@ -693,7 +691,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model1.Product#getOrderDetails <em>Order Details</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the reference list '<em>Order Details</em>'.
* @see org.eclipse.emf.cdo.tests.model1.Product#getOrderDetails()
* @see #getProduct()
@@ -702,6 +699,27 @@ public interface Model1Package extends EPackage
EReference getProduct_OrderDetails();
/**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Product#getVat <em>Vat</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Vat</em>'.
+ * @see org.eclipse.emf.cdo.tests.model1.Product#getVat()
+ * @see #getProduct()
+ * @generated
+ */
+ EAttribute getProduct_Vat();
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.emf.cdo.tests.model1.VAT <em>VAT</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>VAT</em>'.
+ * @see org.eclipse.emf.cdo.tests.model1.VAT
+ * @generated
+ */
+ EEnum getVAT();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Category <em>Category</em>}'. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
@@ -714,7 +732,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Category#getName <em>Name</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the attribute '<em>Name</em>'.
* @see org.eclipse.emf.cdo.tests.model1.Category#getName()
* @see #getCategory()
@@ -725,7 +742,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.model1.Category#getCategories <em>Categories</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the containment reference list '<em>Categories</em>'.
* @see org.eclipse.emf.cdo.tests.model1.Category#getCategories()
* @see #getCategory()
@@ -736,7 +752,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.model1.Category#getProducts <em>Products</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the containment reference list '<em>Products</em>'.
* @see org.eclipse.emf.cdo.tests.model1.Category#getProducts()
* @see #getCategory()
@@ -757,7 +772,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.model1.Company#getCategories <em>Categories</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the containment reference list '<em>Categories</em>'.
* @see org.eclipse.emf.cdo.tests.model1.Company#getCategories()
* @see #getCompany()
@@ -768,7 +782,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.model1.Company#getSuppliers <em>Suppliers</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the containment reference list '<em>Suppliers</em>'.
* @see org.eclipse.emf.cdo.tests.model1.Company#getSuppliers()
* @see #getCompany()
@@ -779,7 +792,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.model1.Company#getPurchaseOrders <em>Purchase Orders</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the containment reference list '<em>Purchase Orders</em>'.
* @see org.eclipse.emf.cdo.tests.model1.Company#getPurchaseOrders()
* @see #getCompany()
@@ -790,7 +802,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.model1.Company#getCustomers <em>Customers</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the containment reference list '<em>Customers</em>'.
* @see org.eclipse.emf.cdo.tests.model1.Company#getCustomers()
* @see #getCompany()
@@ -801,7 +812,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.model1.Company#getSalesOrders <em>Sales Orders</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the containment reference list '<em>Sales Orders</em>'.
* @see org.eclipse.emf.cdo.tests.model1.Company#getSalesOrders()
* @see #getCompany()
@@ -822,7 +832,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model1.Customer#getSalesOrders <em>Sales Orders</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the reference list '<em>Sales Orders</em>'.
* @see org.eclipse.emf.cdo.tests.model1.Customer#getSalesOrders()
* @see #getCustomer()
@@ -843,7 +852,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.model1.Order#getOrderDetails <em>Order Details</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the containment reference list '<em>Order Details</em>'.
* @see org.eclipse.emf.cdo.tests.model1.Order#getOrderDetails()
* @see #getOrder()
@@ -854,7 +862,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder <em>Sales Order</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for class '<em>Sales Order</em>'.
* @see org.eclipse.emf.cdo.tests.model1.SalesOrder
* @generated
@@ -864,7 +871,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getId <em>Id</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the attribute '<em>Id</em>'.
* @see org.eclipse.emf.cdo.tests.model1.SalesOrder#getId()
* @see #getSalesOrder()
@@ -875,7 +881,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getCustomer <em>Customer</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for the reference '<em>Customer</em>'.
* @see org.eclipse.emf.cdo.tests.model1.SalesOrder#getCustomer()
* @see #getSalesOrder()
@@ -884,8 +889,8 @@ public interface Model1Package extends EPackage
EReference getSalesOrder_Customer();
/**
- * Returns the factory that creates the instances of the model. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @return the factory that creates the instances of the model.
* @generated
*/
@@ -900,15 +905,13 @@ public interface Model1Package extends EPackage
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
- *
* @generated
*/
interface Literals
{
/**
- * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model1.impl.AddressImpl <em>Address</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model1.impl.AddressImpl <em>Address</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @see org.eclipse.emf.cdo.tests.model1.impl.AddressImpl
* @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getAddress()
* @generated
@@ -916,33 +919,32 @@ public interface Model1Package extends EPackage
EClass ADDRESS = eINSTANCE.getAddress();
/**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature. <!-- begin-user-doc --> <!--
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
*/
EAttribute ADDRESS__NAME = eINSTANCE.getAddress_Name();
/**
- * The meta object literal for the '<em><b>Street</b></em>' attribute feature. <!-- begin-user-doc --> <!--
+ * The meta object literal for the '<em><b>Street</b></em>' attribute feature.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
*/
EAttribute ADDRESS__STREET = eINSTANCE.getAddress_Street();
/**
- * The meta object literal for the '<em><b>City</b></em>' attribute feature. <!-- begin-user-doc --> <!--
+ * The meta object literal for the '<em><b>City</b></em>' attribute feature.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
*/
EAttribute ADDRESS__CITY = eINSTANCE.getAddress_City();
/**
- * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model1.impl.SupplierImpl <em>Supplier</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model1.impl.SupplierImpl <em>Supplier</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @see org.eclipse.emf.cdo.tests.model1.impl.SupplierImpl
* @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getSupplier()
* @generated
@@ -958,9 +960,8 @@ public interface Model1Package extends EPackage
EReference SUPPLIER__PURCHASE_ORDERS = eINSTANCE.getSupplier_PurchaseOrders();
/**
- * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model1.impl.PurchaseOrderImpl <em>Purchase Order</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model1.impl.PurchaseOrderImpl <em>Purchase Order</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @see org.eclipse.emf.cdo.tests.model1.impl.PurchaseOrderImpl
* @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getPurchaseOrder()
* @generated
@@ -968,25 +969,24 @@ public interface Model1Package extends EPackage
EClass PURCHASE_ORDER = eINSTANCE.getPurchaseOrder();
/**
- * The meta object literal for the '<em><b>Date</b></em>' attribute feature. <!-- begin-user-doc --> <!--
+ * The meta object literal for the '<em><b>Date</b></em>' attribute feature.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
*/
EAttribute PURCHASE_ORDER__DATE = eINSTANCE.getPurchaseOrder_Date();
/**
- * The meta object literal for the '<em><b>Supplier</b></em>' reference feature. <!-- begin-user-doc --> <!--
+ * The meta object literal for the '<em><b>Supplier</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
*/
EReference PURCHASE_ORDER__SUPPLIER = eINSTANCE.getPurchaseOrder_Supplier();
/**
- * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model1.impl.OrderDetailImpl <em>Order Detail</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model1.impl.OrderDetailImpl <em>Order Detail</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @see org.eclipse.emf.cdo.tests.model1.impl.OrderDetailImpl
* @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getOrderDetail()
* @generated
@@ -994,33 +994,32 @@ public interface Model1Package extends EPackage
EClass ORDER_DETAIL = eINSTANCE.getOrderDetail();
/**
- * The meta object literal for the '<em><b>Order</b></em>' container reference feature. <!-- begin-user-doc -->
+ * The meta object literal for the '<em><b>Order</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
EReference ORDER_DETAIL__ORDER = eINSTANCE.getOrderDetail_Order();
/**
- * The meta object literal for the '<em><b>Product</b></em>' reference feature. <!-- begin-user-doc --> <!--
+ * The meta object literal for the '<em><b>Product</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
*/
EReference ORDER_DETAIL__PRODUCT = eINSTANCE.getOrderDetail_Product();
/**
- * The meta object literal for the '<em><b>Price</b></em>' attribute feature. <!-- begin-user-doc --> <!--
+ * The meta object literal for the '<em><b>Price</b></em>' attribute feature.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
*/
EAttribute ORDER_DETAIL__PRICE = eINSTANCE.getOrderDetail_Price();
/**
- * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model1.impl.ProductImpl <em>Product</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model1.impl.ProductImpl <em>Product</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @see org.eclipse.emf.cdo.tests.model1.impl.ProductImpl
* @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getProduct()
* @generated
@@ -1028,25 +1027,42 @@ public interface Model1Package extends EPackage
EClass PRODUCT = eINSTANCE.getProduct();
/**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature. <!-- begin-user-doc --> <!--
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
*/
EAttribute PRODUCT__NAME = eINSTANCE.getProduct_Name();
/**
- * The meta object literal for the '<em><b>Order Details</b></em>' reference list feature. <!-- begin-user-doc
+ * The meta object literal for the '<em><b>Order Details</b></em>' reference list feature.
+ * <!-- begin-user-doc
* --> <!-- end-user-doc -->
- *
* @generated
*/
EReference PRODUCT__ORDER_DETAILS = eINSTANCE.getProduct_OrderDetails();
/**
- * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model1.impl.CategoryImpl <em>Category</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The meta object literal for the '<em><b>Vat</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PRODUCT__VAT = eINSTANCE.getProduct_Vat();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model1.VAT <em>VAT</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.tests.model1.VAT
+ * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getVAT()
+ * @generated
+ */
+ EEnum VAT = eINSTANCE.getVAT();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model1.impl.CategoryImpl <em>Category</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @see org.eclipse.emf.cdo.tests.model1.impl.CategoryImpl
* @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getCategory()
* @generated
@@ -1054,9 +1070,9 @@ public interface Model1Package extends EPackage
EClass CATEGORY = eINSTANCE.getCategory();
/**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature. <!-- begin-user-doc --> <!--
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
*/
EAttribute CATEGORY__NAME = eINSTANCE.getCategory_Name();
@@ -1078,9 +1094,8 @@ public interface Model1Package extends EPackage
EReference CATEGORY__PRODUCTS = eINSTANCE.getCategory_Products();
/**
- * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl <em>Company</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl <em>Company</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @see org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl
* @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getCompany()
* @generated
@@ -1128,9 +1143,8 @@ public interface Model1Package extends EPackage
EReference COMPANY__SALES_ORDERS = eINSTANCE.getCompany_SalesOrders();
/**
- * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model1.impl.CustomerImpl <em>Customer</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model1.impl.CustomerImpl <em>Customer</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @see org.eclipse.emf.cdo.tests.model1.impl.CustomerImpl
* @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getCustomer()
* @generated
@@ -1138,9 +1152,9 @@ public interface Model1Package extends EPackage
EClass CUSTOMER = eINSTANCE.getCustomer();
/**
- * The meta object literal for the '<em><b>Sales Orders</b></em>' reference list feature. <!-- begin-user-doc
+ * The meta object literal for the '<em><b>Sales Orders</b></em>' reference list feature.
+ * <!-- begin-user-doc
* --> <!-- end-user-doc -->
- *
* @generated
*/
EReference CUSTOMER__SALES_ORDERS = eINSTANCE.getCustomer_SalesOrders();
@@ -1148,7 +1162,6 @@ public interface Model1Package extends EPackage
/**
* The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model1.impl.OrderImpl <em>Order</em>}' class.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @see org.eclipse.emf.cdo.tests.model1.impl.OrderImpl
* @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getOrder()
* @generated
@@ -1164,9 +1177,8 @@ public interface Model1Package extends EPackage
EReference ORDER__ORDER_DETAILS = eINSTANCE.getOrder_OrderDetails();
/**
- * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model1.impl.SalesOrderImpl <em>Sales Order</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model1.impl.SalesOrderImpl <em>Sales Order</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @see org.eclipse.emf.cdo.tests.model1.impl.SalesOrderImpl
* @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getSalesOrder()
* @generated
@@ -1174,17 +1186,17 @@ public interface Model1Package extends EPackage
EClass SALES_ORDER = eINSTANCE.getSalesOrder();
/**
- * The meta object literal for the '<em><b>Id</b></em>' attribute feature. <!-- begin-user-doc --> <!--
+ * The meta object literal for the '<em><b>Id</b></em>' attribute feature.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
*/
EAttribute SALES_ORDER__ID = eINSTANCE.getSalesOrder_Id();
/**
- * The meta object literal for the '<em><b>Customer</b></em>' reference feature. <!-- begin-user-doc --> <!--
+ * The meta object literal for the '<em><b>Customer</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
*/
EReference SALES_ORDER__CUSTOMER = eINSTANCE.getSalesOrder_Customer();
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Order.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Order.java
index eb83edc..94b5143 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Order.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Order.java
@@ -12,13 +12,14 @@ import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc --> A representation of the model object '<em><b>Order</b></em>'. <!-- end-user-doc -->
+ *
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.Order#getOrderDetails <em>Order Details</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.Order#getOrderDetails <em>Order Details</em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrder()
* @model
* @extends CDOObject
@@ -27,15 +28,15 @@ import org.eclipse.emf.common.util.EList;
public interface Order extends CDOObject
{
/**
- * Returns the value of the '<em><b>Order Details</b></em>' containment reference list. The list contents are of
- * type {@link org.eclipse.emf.cdo.tests.model1.OrderDetail}. It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getOrder <em>Order</em>}'.
+ * Returns the value of the '<em><b>Order Details</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.OrderDetail}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getOrder <em>Order</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Order Details</em>' containment reference list isn't clear, there really should be
* more of a description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Order Details</em>' containment reference list.
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrder_OrderDetails()
* @see org.eclipse.emf.cdo.tests.model1.OrderDetail#getOrder
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/OrderDetail.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/OrderDetail.java
index 726d9b3..9f37f22 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/OrderDetail.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/OrderDetail.java
@@ -28,14 +28,14 @@ import org.eclipse.emf.cdo.CDOObject;
public interface OrderDetail extends CDOObject
{
/**
- * Returns the value of the '<em><b>Order</b></em>' container reference. It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.Order#getOrderDetails <em>Order Details</em>}'.
+ * Returns the value of the '<em><b>Order</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.Order#getOrderDetails <em>Order Details</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Order</em>' container reference isn't clear, there really should be more of a
* description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Order</em>' container reference.
* @see #setOrder(Order)
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrderDetail_Order()
@@ -46,25 +46,23 @@ public interface OrderDetail extends CDOObject
Order getOrder();
/**
- * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getOrder <em>Order</em>}' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Order</em>' container reference.
+ * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getOrder <em>Order</em>}' container reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @param value the new value of the '<em>Order</em>' container reference.
* @see #getOrder()
* @generated
*/
void setOrder(Order value);
/**
- * Returns the value of the '<em><b>Product</b></em>' reference. It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.Product#getOrderDetails <em>Order Details</em>}'.
+ * Returns the value of the '<em><b>Product</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.Product#getOrderDetails <em>Order Details</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Product</em>' reference isn't clear, there really should be more of a description
* here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Product</em>' reference.
* @see #setProduct(Product)
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrderDetail_Product()
@@ -75,24 +73,22 @@ public interface OrderDetail extends CDOObject
Product getProduct();
/**
- * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getProduct <em>Product</em>}'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Product</em>' reference.
+ * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getProduct <em>Product</em>}' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @param value the new value of the '<em>Product</em>' reference.
* @see #getProduct()
* @generated
*/
void setProduct(Product value);
/**
- * Returns the value of the '<em><b>Price</b></em>' attribute. <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Price</b></em>' attribute.
+ * <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Price</em>' attribute isn't clear, there really should be more of a description
* here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Price</em>' attribute.
* @see #setPrice(float)
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrderDetail_Price()
@@ -104,9 +100,7 @@ public interface OrderDetail extends CDOObject
/**
* Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getPrice <em>Price</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Price</em>' attribute.
+ * @param value the new value of the '<em>Price</em>' attribute.
* @see #getPrice()
* @generated
*/
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Product.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Product.java
index f6080dc..6fd2aba 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Product.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Product.java
@@ -12,14 +12,16 @@ import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc --> A representation of the model object '<em><b>Product</b></em>'. <!-- end-user-doc -->
+ *
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.Product#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.Product#getOrderDetails <em>Order Details</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.Product#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.Product#getOrderDetails <em>Order Details</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.Product#getVat <em>Vat</em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getProduct()
* @model
* @extends CDOObject
@@ -28,13 +30,13 @@ import org.eclipse.emf.common.util.EList;
public interface Product extends CDOObject
{
/**
- * Returns the value of the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Name</em>' attribute isn't clear, there really should be more of a description
* here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getProduct_Name()
@@ -55,15 +57,15 @@ public interface Product extends CDOObject
void setName(String value);
/**
- * Returns the value of the '<em><b>Order Details</b></em>' reference list. The list contents are of type
- * {@link org.eclipse.emf.cdo.tests.model1.OrderDetail}. It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getProduct <em>Product</em>}'.
+ * Returns the value of the '<em><b>Order Details</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.OrderDetail}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getProduct <em>Product</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Order Details</em>' reference list isn't clear, there really should be more of a
* description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Order Details</em>' reference list.
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getProduct_OrderDetails()
* @see org.eclipse.emf.cdo.tests.model1.OrderDetail#getProduct
@@ -72,4 +74,34 @@ public interface Product extends CDOObject
*/
EList<OrderDetail> getOrderDetails();
+ /**
+ * Returns the value of the '<em><b>Vat</b></em>' attribute.
+ * The default value is <code>"vat15"</code>.
+ * The literals are from the enumeration {@link org.eclipse.emf.cdo.tests.model1.VAT}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Vat</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Vat</em>' attribute.
+ * @see org.eclipse.emf.cdo.tests.model1.VAT
+ * @see #setVat(VAT)
+ * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getProduct_Vat()
+ * @model default="vat15"
+ * @generated
+ */
+ VAT getVat();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Product#getVat <em>Vat</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Vat</em>' attribute.
+ * @see org.eclipse.emf.cdo.tests.model1.VAT
+ * @see #getVat()
+ * @generated
+ */
+ void setVat(VAT value);
+
} // Product
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/PurchaseOrder.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/PurchaseOrder.java
index 7997455..73d0523 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/PurchaseOrder.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/PurchaseOrder.java
@@ -26,13 +26,13 @@ import java.util.Date;
public interface PurchaseOrder extends Order
{
/**
- * Returns the value of the '<em><b>Date</b></em>' attribute. <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Date</b></em>' attribute.
+ * <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Date</em>' attribute isn't clear, there really should be more of a description
* here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Date</em>' attribute.
* @see #setDate(Date)
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getPurchaseOrder_Date()
@@ -44,23 +44,21 @@ public interface PurchaseOrder extends Order
/**
* Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getDate <em>Date</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Date</em>' attribute.
+ * @param value the new value of the '<em>Date</em>' attribute.
* @see #getDate()
* @generated
*/
void setDate(Date value);
/**
- * Returns the value of the '<em><b>Supplier</b></em>' reference. It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.Supplier#getPurchaseOrders <em>Purchase Orders</em>}'.
+ * Returns the value of the '<em><b>Supplier</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.Supplier#getPurchaseOrders <em>Purchase Orders</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Supplier</em>' reference isn't clear, there really should be more of a description
* here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Supplier</em>' reference.
* @see #setSupplier(Supplier)
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getPurchaseOrder_Supplier()
@@ -71,11 +69,9 @@ public interface PurchaseOrder extends Order
Supplier getSupplier();
/**
- * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getSupplier <em>Supplier</em>}'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Supplier</em>' reference.
+ * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getSupplier <em>Supplier</em>}' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @param value the new value of the '<em>Supplier</em>' reference.
* @see #getSupplier()
* @generated
*/
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/SalesOrder.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/SalesOrder.java
index 7ecf63a..7975cc0 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/SalesOrder.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/SalesOrder.java
@@ -24,12 +24,12 @@ package org.eclipse.emf.cdo.tests.model1;
public interface SalesOrder extends Order
{
/**
- * Returns the value of the '<em><b>Id</b></em>' attribute. <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Id</em>' attribute isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Id</em>' attribute.
* @see #setId(int)
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getSalesOrder_Id()
@@ -50,14 +50,14 @@ public interface SalesOrder extends Order
void setId(int value);
/**
- * Returns the value of the '<em><b>Customer</b></em>' reference. It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.Customer#getSalesOrders <em>Sales Orders</em>}'.
+ * Returns the value of the '<em><b>Customer</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.Customer#getSalesOrders <em>Sales Orders</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Customer</em>' reference isn't clear, there really should be more of a description
* here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Customer</em>' reference.
* @see #setCustomer(Customer)
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getSalesOrder_Customer()
@@ -68,11 +68,9 @@ public interface SalesOrder extends Order
Customer getCustomer();
/**
- * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getCustomer <em>Customer</em>}'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Customer</em>' reference.
+ * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getCustomer <em>Customer</em>}' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @param value the new value of the '<em>Customer</em>' reference.
* @see #getCustomer()
* @generated
*/
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Supplier.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Supplier.java
index 21fda2e..93a2989 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Supplier.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Supplier.java
@@ -10,13 +10,14 @@ import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc --> A representation of the model object '<em><b>Supplier</b></em>'. <!-- end-user-doc -->
+ *
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.Supplier#getPurchaseOrders <em>Purchase Orders</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.Supplier#getPurchaseOrders <em>Purchase Orders</em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getSupplier()
* @model
* @generated
@@ -24,15 +25,15 @@ import org.eclipse.emf.common.util.EList;
public interface Supplier extends Address
{
/**
- * Returns the value of the '<em><b>Purchase Orders</b></em>' reference list. The list contents are of type
- * {@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder}. It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getSupplier <em>Supplier</em>}'.
+ * Returns the value of the '<em><b>Purchase Orders</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getSupplier <em>Supplier</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Purchase Orders</em>' reference list isn't clear, there really should be more of a
* description here...
* </p>
* <!-- end-user-doc -->
- *
* @return the value of the '<em>Purchase Orders</em>' reference list.
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getSupplier_PurchaseOrders()
* @see org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getSupplier
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/VAT.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/VAT.java
new file mode 100644
index 0000000..c54788e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/VAT.java
@@ -0,0 +1,254 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: VAT.java,v 1.1 2008-03-03 15:01:42 estepper Exp $
+ */
+package org.eclipse.emf.cdo.tests.model1;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>VAT</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getVAT()
+ * @model
+ * @generated
+ */
+public enum VAT implements Enumerator
+{
+ /**
+ * The '<em><b>Vat0</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #VAT0_VALUE
+ * @generated
+ * @ordered
+ */
+ VAT0(0, "vat0", "vat0"),
+
+ /**
+ * The '<em><b>Vat7</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #VAT7_VALUE
+ * @generated
+ * @ordered
+ */
+ VAT7(7, "vat7", "vat7"),
+
+ /**
+ * The '<em><b>Vat15</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #VAT15_VALUE
+ * @generated
+ * @ordered
+ */
+ VAT15(15, "vat15", "vat15");
+
+ /**
+ * The '<em><b>Vat0</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>Vat0</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #VAT0
+ * @model name="vat0"
+ * @generated
+ * @ordered
+ */
+ public static final int VAT0_VALUE = 0;
+
+ /**
+ * The '<em><b>Vat7</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>Vat7</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #VAT7
+ * @model name="vat7"
+ * @generated
+ * @ordered
+ */
+ public static final int VAT7_VALUE = 7;
+
+ /**
+ * The '<em><b>Vat15</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>Vat15</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #VAT15
+ * @model name="vat15"
+ * @generated
+ * @ordered
+ */
+ public static final int VAT15_VALUE = 15;
+
+ /**
+ * An array of all the '<em><b>VAT</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final VAT[] VALUES_ARRAY =
+ new VAT[]
+ {
+ VAT0,
+ VAT7,
+ VAT15,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>VAT</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<VAT> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>VAT</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static VAT get(String literal)
+ {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i)
+ {
+ VAT result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal))
+ {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>VAT</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static VAT getByName(String name)
+ {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i)
+ {
+ VAT result = VALUES_ARRAY[i];
+ if (result.getName().equals(name))
+ {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>VAT</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static VAT get(int value)
+ {
+ switch (value)
+ {
+ case VAT0_VALUE: return VAT0;
+ case VAT7_VALUE: return VAT7;
+ case VAT15_VALUE: return VAT15;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private VAT(int value, String name, String literal)
+ {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue()
+ {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral()
+ {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ return literal;
+ }
+
+} //VAT
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/AddressImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/AddressImpl.java
index be3af2e..19ca551 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/AddressImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/AddressImpl.java
@@ -18,19 +18,18 @@ import org.eclipse.emf.ecore.EClass;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.AddressImpl#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.AddressImpl#getStreet <em>Street</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.AddressImpl#getCity <em>City</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.AddressImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.AddressImpl#getStreet <em>Street</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.AddressImpl#getCity <em>City</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class AddressImpl extends CDOObjectImpl implements Address
{
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
protected AddressImpl()
@@ -40,7 +39,6 @@ public class AddressImpl extends CDOObjectImpl implements Address
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -51,7 +49,6 @@ public class AddressImpl extends CDOObjectImpl implements Address
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -62,7 +59,6 @@ public class AddressImpl extends CDOObjectImpl implements Address
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public String getName()
@@ -72,7 +68,6 @@ public class AddressImpl extends CDOObjectImpl implements Address
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setName(String newName)
@@ -82,7 +77,6 @@ public class AddressImpl extends CDOObjectImpl implements Address
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public String getStreet()
@@ -92,7 +86,6 @@ public class AddressImpl extends CDOObjectImpl implements Address
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setStreet(String newStreet)
@@ -102,7 +95,6 @@ public class AddressImpl extends CDOObjectImpl implements Address
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public String getCity()
@@ -112,7 +104,6 @@ public class AddressImpl extends CDOObjectImpl implements Address
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setCity(String newCity)
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CategoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CategoryImpl.java
index 54eee3f..a73f01b 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CategoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CategoryImpl.java
@@ -20,19 +20,18 @@ import org.eclipse.emf.ecore.EClass;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.CategoryImpl#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.CategoryImpl#getCategories <em>Categories</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.CategoryImpl#getProducts <em>Products</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.CategoryImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.CategoryImpl#getCategories <em>Categories</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.CategoryImpl#getProducts <em>Products</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class CategoryImpl extends CDOObjectImpl implements Category
{
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
protected CategoryImpl()
@@ -42,7 +41,6 @@ public class CategoryImpl extends CDOObjectImpl implements Category
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -53,7 +51,6 @@ public class CategoryImpl extends CDOObjectImpl implements Category
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -64,7 +61,6 @@ public class CategoryImpl extends CDOObjectImpl implements Category
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public String getName()
@@ -74,7 +70,6 @@ public class CategoryImpl extends CDOObjectImpl implements Category
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setName(String newName)
@@ -84,7 +79,6 @@ public class CategoryImpl extends CDOObjectImpl implements Category
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
@@ -95,7 +89,6 @@ public class CategoryImpl extends CDOObjectImpl implements Category
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CompanyImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CompanyImpl.java
index f860781..08affa9 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CompanyImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CompanyImpl.java
@@ -22,21 +22,20 @@ import org.eclipse.emf.ecore.EClass;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl#getCategories <em>Categories</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl#getSuppliers <em>Suppliers</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl#getCustomers <em>Customers</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl#getPurchaseOrders <em>Purchase Orders</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl#getSalesOrders <em>Sales Orders</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl#getCategories <em>Categories</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl#getSuppliers <em>Suppliers</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl#getCustomers <em>Customers</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl#getPurchaseOrders <em>Purchase Orders</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl#getSalesOrders <em>Sales Orders</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class CompanyImpl extends AddressImpl implements Company
{
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
protected CompanyImpl()
@@ -46,7 +45,6 @@ public class CompanyImpl extends AddressImpl implements Company
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -57,7 +55,6 @@ public class CompanyImpl extends AddressImpl implements Company
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
@@ -68,7 +65,6 @@ public class CompanyImpl extends AddressImpl implements Company
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
@@ -79,7 +75,6 @@ public class CompanyImpl extends AddressImpl implements Company
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
@@ -90,7 +85,6 @@ public class CompanyImpl extends AddressImpl implements Company
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
@@ -101,7 +95,6 @@ public class CompanyImpl extends AddressImpl implements Company
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CustomerImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CustomerImpl.java
index 2f3ae75..9547460 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CustomerImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CustomerImpl.java
@@ -18,17 +18,16 @@ import org.eclipse.emf.ecore.EClass;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.CustomerImpl#getSalesOrders <em>Sales Orders</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.CustomerImpl#getSalesOrders <em>Sales Orders</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class CustomerImpl extends AddressImpl implements Customer
{
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
protected CustomerImpl()
@@ -38,7 +37,6 @@ public class CustomerImpl extends AddressImpl implements Customer
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -49,7 +47,6 @@ public class CustomerImpl extends AddressImpl implements Customer
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
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 e022fac..655dbd4 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
@@ -6,6 +6,7 @@
*/
package org.eclipse.emf.cdo.tests.model1.impl;
+import org.eclipse.emf.cdo.tests.model1.*;
import org.eclipse.emf.cdo.tests.model1.Address;
import org.eclipse.emf.cdo.tests.model1.Category;
import org.eclipse.emf.cdo.tests.model1.Company;
@@ -20,6 +21,7 @@ import org.eclipse.emf.cdo.tests.model1.SalesOrder;
import org.eclipse.emf.cdo.tests.model1.Supplier;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
@@ -27,22 +29,20 @@ import org.eclipse.emf.ecore.plugin.EcorePlugin;
/**
* <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!-- end-user-doc -->
- *
* @generated
*/
public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
{
/**
- * Creates the default factory implementation. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
public static Model1Factory init()
{
try
{
- Model1Factory theModel1Factory = (Model1Factory)EPackage.Registry.INSTANCE
- .getEFactory("http://www.eclipse.org/emf/CDO/tests/model1/1.0.0");
+ Model1Factory theModel1Factory = (Model1Factory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/emf/CDO/tests/model1/1.0.0");
if (theModel1Factory != null)
{
return theModel1Factory;
@@ -56,8 +56,8 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
}
/**
- * Creates an instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
public Model1FactoryImpl()
@@ -67,7 +67,6 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -75,34 +74,57 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
{
switch (eClass.getClassifierID())
{
- case Model1Package.ADDRESS:
- return (EObject)createAddress();
- case Model1Package.COMPANY:
- return (EObject)createCompany();
- case Model1Package.SUPPLIER:
- return (EObject)createSupplier();
- case Model1Package.CUSTOMER:
- return (EObject)createCustomer();
- case Model1Package.ORDER:
- return (EObject)createOrder();
- case Model1Package.ORDER_DETAIL:
- return (EObject)createOrderDetail();
- case Model1Package.PURCHASE_ORDER:
- return (EObject)createPurchaseOrder();
- case Model1Package.SALES_ORDER:
- return (EObject)createSalesOrder();
- case Model1Package.CATEGORY:
- return (EObject)createCategory();
- case Model1Package.PRODUCT:
- return (EObject)createProduct();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ case Model1Package.ADDRESS: return (EObject)createAddress();
+ case Model1Package.COMPANY: return (EObject)createCompany();
+ case Model1Package.SUPPLIER: return (EObject)createSupplier();
+ case Model1Package.CUSTOMER: return (EObject)createCustomer();
+ case Model1Package.ORDER: return (EObject)createOrder();
+ case Model1Package.ORDER_DETAIL: return (EObject)createOrderDetail();
+ case Model1Package.PURCHASE_ORDER: return (EObject)createPurchaseOrder();
+ case Model1Package.SALES_ORDER: return (EObject)createSalesOrder();
+ case Model1Package.CATEGORY: return (EObject)createCategory();
+ case Model1Package.PRODUCT: return (EObject)createProduct();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue)
+ {
+ switch (eDataType.getClassifierID())
+ {
+ case Model1Package.VAT:
+ return createVATFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue)
+ {
+ switch (eDataType.getClassifierID())
+ {
+ case Model1Package.VAT:
+ return convertVATToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Address createAddress()
@@ -113,7 +135,6 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Supplier createSupplier()
@@ -124,7 +145,6 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public PurchaseOrder createPurchaseOrder()
@@ -135,7 +155,6 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public OrderDetail createOrderDetail()
@@ -146,7 +165,6 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Product createProduct()
@@ -156,8 +174,29 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public VAT createVATFromString(EDataType eDataType, String initialValue)
+ {
+ VAT result = VAT.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertVATToString(EDataType eDataType, Object instanceValue)
+ {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Category createCategory()
@@ -168,7 +207,6 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Company createCompany()
@@ -179,7 +217,6 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Customer createCustomer()
@@ -190,7 +227,6 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Order createOrder()
@@ -201,7 +237,6 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public SalesOrder createSalesOrder()
@@ -212,7 +247,6 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Model1Package getModel1Package()
@@ -222,7 +256,6 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @deprecated
* @generated
*/
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1PackageImpl.java
index e1fb2b4..bcfe86b 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1PackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1PackageImpl.java
@@ -21,83 +21,80 @@ import org.eclipse.emf.cdo.tests.model1.Supplier;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;
/**
* <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!-- end-user-doc -->
- *
* @generated
*/
public class Model1PackageImpl extends EPackageImpl implements Model1Package
{
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
private EClass addressEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
private EClass supplierEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
private EClass purchaseOrderEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
private EClass orderDetailEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
private EClass productEClass = null;
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum vatEEnum = null;
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
private EClass categoryEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
private EClass companyEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
private EClass customerEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
private EClass orderEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
private EClass salesOrderEClass = null;
@@ -122,24 +119,27 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
private static boolean isInited = false;
/**
- * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
- * Simple dependencies are satisfied by calling this method on all dependent packages before doing anything else. This
- * method drives initialization for interdependent packages directly, in parallel with this package, itself.
- * <p>
- * Of this package and its interdependencies, all packages which have not yet been registered by their URI values are
- * first created and registered. The packages are then initialized in two steps: meta-model objects for all of the
- * packages are created before any are initialized, since one package's meta-model objects may refer to those of
- * another.
- * <p>
- * Invocation of this method will not affect any packages that have already been initialized. <!-- begin-user-doc -->
+ * Creates, registers, and initializes the <b>Package</b> for this
+ * model, and for any others upon which it depends. Simple
+ * dependencies are satisfied by calling this method on all
+ * dependent packages before doing anything else. This method drives
+ * initialization for interdependent packages directly, in parallel
+ * with this package, itself.
+ * <p>Of this package and its interdependencies, all packages which
+ * have not yet been registered by their URI values are first created
+ * and registered. The packages are then initialized in two steps:
+ * meta-model objects for all of the packages are created before any
+ * are initialized, since one package's meta-model objects may refer to
+ * those of another.
+ * <p>Invocation of this method will not affect any packages that have
+ * already been initialized.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
@@ -150,9 +150,7 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
if (isInited) return (Model1Package)EPackage.Registry.INSTANCE.getEPackage(Model1Package.eNS_URI);
// Obtain or create and register package
- Model1PackageImpl theModel1Package = (Model1PackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof Model1PackageImpl ? EPackage.Registry.INSTANCE
- .getEPackage(eNS_URI)
- : new Model1PackageImpl());
+ Model1PackageImpl theModel1Package = (Model1PackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof Model1PackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new Model1PackageImpl());
isInited = true;
@@ -170,7 +168,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EClass getAddress()
@@ -180,7 +177,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EAttribute getAddress_Name()
@@ -190,7 +186,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EAttribute getAddress_Street()
@@ -200,7 +195,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EAttribute getAddress_City()
@@ -210,7 +204,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EClass getSupplier()
@@ -220,7 +213,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getSupplier_PurchaseOrders()
@@ -230,7 +222,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EClass getPurchaseOrder()
@@ -240,7 +231,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EAttribute getPurchaseOrder_Date()
@@ -250,7 +240,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getPurchaseOrder_Supplier()
@@ -260,7 +249,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EClass getOrderDetail()
@@ -270,7 +258,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getOrderDetail_Order()
@@ -280,7 +267,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getOrderDetail_Product()
@@ -290,7 +276,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EAttribute getOrderDetail_Price()
@@ -300,7 +285,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EClass getProduct()
@@ -310,7 +294,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EAttribute getProduct_Name()
@@ -320,7 +303,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getProduct_OrderDetails()
@@ -329,8 +311,27 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getProduct_Vat()
+ {
+ return (EAttribute)productEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EEnum getVAT()
+ {
+ return vatEEnum;
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EClass getCategory()
@@ -340,7 +341,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EAttribute getCategory_Name()
@@ -350,7 +350,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getCategory_Categories()
@@ -360,7 +359,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getCategory_Products()
@@ -370,7 +368,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EClass getCompany()
@@ -380,7 +377,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getCompany_Categories()
@@ -390,7 +386,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getCompany_Suppliers()
@@ -400,7 +395,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getCompany_PurchaseOrders()
@@ -410,7 +404,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getCompany_Customers()
@@ -420,7 +413,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getCompany_SalesOrders()
@@ -430,7 +422,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EClass getCustomer()
@@ -440,7 +431,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getCustomer_SalesOrders()
@@ -450,7 +440,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EClass getOrder()
@@ -460,7 +449,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getOrder_OrderDetails()
@@ -470,7 +458,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EClass getSalesOrder()
@@ -480,7 +467,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EAttribute getSalesOrder_Id()
@@ -490,7 +476,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getSalesOrder_Customer()
@@ -500,7 +485,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Model1Factory getModel1Factory()
@@ -510,15 +494,14 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
private boolean isCreated = false;
/**
- * Creates the meta-model objects for the package. This method is guarded to have no affect on any invocation but its
- * first. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
public void createPackageContents()
@@ -569,19 +552,22 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
productEClass = createEClass(PRODUCT);
createEAttribute(productEClass, PRODUCT__NAME);
createEReference(productEClass, PRODUCT__ORDER_DETAILS);
+ createEAttribute(productEClass, PRODUCT__VAT);
+
+ // Create enums
+ vatEEnum = createEEnum(VAT);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
private boolean isInitialized = false;
/**
- * Complete the initialization of the package and its meta-model. This method is guarded to have no affect on any
- * invocation but its first. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
public void initializePackageContents()
@@ -607,88 +593,54 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
// Initialize classes and features; add operations and parameters
initEClass(addressEClass, Address.class, "Address", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getAddress_Name(), ecorePackage.getEString(), "name", null, 0, 1, Address.class, !IS_TRANSIENT,
- !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getAddress_Street(), ecorePackage.getEString(), "street", null, 0, 1, Address.class, !IS_TRANSIENT,
- !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getAddress_City(), ecorePackage.getEString(), "city", null, 0, 1, Address.class, !IS_TRANSIENT,
- !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getAddress_Name(), ecorePackage.getEString(), "name", null, 0, 1, Address.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getAddress_Street(), ecorePackage.getEString(), "street", null, 0, 1, Address.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getAddress_City(), ecorePackage.getEString(), "city", null, 0, 1, Address.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(companyEClass, Company.class, "Company", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getCompany_Categories(), this.getCategory(), null, "categories", null, 0, -1, Company.class,
- !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
- !IS_DERIVED, IS_ORDERED);
- initEReference(getCompany_Suppliers(), this.getSupplier(), null, "suppliers", null, 0, -1, Company.class,
- !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
- !IS_DERIVED, IS_ORDERED);
- initEReference(getCompany_Customers(), this.getCustomer(), null, "customers", null, 0, -1, Company.class,
- !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
- !IS_DERIVED, IS_ORDERED);
- initEReference(getCompany_PurchaseOrders(), this.getPurchaseOrder(), null, "purchaseOrders", null, 0, -1,
- Company.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
- IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getCompany_SalesOrders(), this.getSalesOrder(), null, "salesOrders", null, 0, -1, Company.class,
- !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
- !IS_DERIVED, IS_ORDERED);
+ initEReference(getCompany_Categories(), this.getCategory(), null, "categories", null, 0, -1, Company.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getCompany_Suppliers(), this.getSupplier(), null, "suppliers", null, 0, -1, Company.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getCompany_Customers(), this.getCustomer(), null, "customers", null, 0, -1, Company.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getCompany_PurchaseOrders(), this.getPurchaseOrder(), null, "purchaseOrders", null, 0, -1, Company.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getCompany_SalesOrders(), this.getSalesOrder(), null, "salesOrders", null, 0, -1, Company.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(supplierEClass, Supplier.class, "Supplier", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getSupplier_PurchaseOrders(), this.getPurchaseOrder(), this.getPurchaseOrder_Supplier(),
- "purchaseOrders", null, 0, -1, Supplier.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
- IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getSupplier_PurchaseOrders(), this.getPurchaseOrder(), this.getPurchaseOrder_Supplier(), "purchaseOrders", null, 0, -1, Supplier.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(customerEClass, Customer.class, "Customer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getCustomer_SalesOrders(), this.getSalesOrder(), this.getSalesOrder_Customer(), "salesOrders", null,
- 0, -1, Customer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
- !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getCustomer_SalesOrders(), this.getSalesOrder(), this.getSalesOrder_Customer(), "salesOrders", null, 0, -1, Customer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(orderEClass, Order.class, "Order", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getOrder_OrderDetails(), this.getOrderDetail(), this.getOrderDetail_Order(), "orderDetails", null,
- 0, -1, Order.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
- !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(orderDetailEClass, OrderDetail.class, "OrderDetail", !IS_ABSTRACT, !IS_INTERFACE,
- IS_GENERATED_INSTANCE_CLASS);
- initEReference(getOrderDetail_Order(), this.getOrder(), this.getOrder_OrderDetails(), "order", null, 1, 1,
- OrderDetail.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES,
- !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getOrderDetail_Product(), this.getProduct(), this.getProduct_OrderDetails(), "product", null, 0, 1,
- OrderDetail.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
- !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getOrderDetail_Price(), ecorePackage.getEFloat(), "price", null, 0, 1, OrderDetail.class,
- !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(purchaseOrderEClass, PurchaseOrder.class, "PurchaseOrder", !IS_ABSTRACT, !IS_INTERFACE,
- IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getPurchaseOrder_Date(), ecorePackage.getEDate(), "date", null, 0, 1, PurchaseOrder.class,
- !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getPurchaseOrder_Supplier(), this.getSupplier(), this.getSupplier_PurchaseOrders(), "supplier",
- null, 1, 1, PurchaseOrder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
- !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(salesOrderEClass, SalesOrder.class, "SalesOrder", !IS_ABSTRACT, !IS_INTERFACE,
- IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getSalesOrder_Id(), ecorePackage.getEInt(), "id", null, 0, 1, SalesOrder.class, !IS_TRANSIENT,
- !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getSalesOrder_Customer(), this.getCustomer(), this.getCustomer_SalesOrders(), "customer", null, 1,
- 1, SalesOrder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
- !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getOrder_OrderDetails(), this.getOrderDetail(), this.getOrderDetail_Order(), "orderDetails", null, 0, -1, Order.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(orderDetailEClass, OrderDetail.class, "OrderDetail", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getOrderDetail_Order(), this.getOrder(), this.getOrder_OrderDetails(), "order", null, 1, 1, OrderDetail.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getOrderDetail_Product(), this.getProduct(), this.getProduct_OrderDetails(), "product", null, 0, 1, OrderDetail.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getOrderDetail_Price(), ecorePackage.getEFloat(), "price", null, 0, 1, OrderDetail.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(purchaseOrderEClass, PurchaseOrder.class, "PurchaseOrder", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getPurchaseOrder_Date(), ecorePackage.getEDate(), "date", null, 0, 1, PurchaseOrder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPurchaseOrder_Supplier(), this.getSupplier(), this.getSupplier_PurchaseOrders(), "supplier", null, 1, 1, PurchaseOrder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(salesOrderEClass, SalesOrder.class, "SalesOrder", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getSalesOrder_Id(), ecorePackage.getEInt(), "id", null, 0, 1, SalesOrder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getSalesOrder_Customer(), this.getCustomer(), this.getCustomer_SalesOrders(), "customer", null, 1, 1, SalesOrder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(categoryEClass, Category.class, "Category", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getCategory_Name(), ecorePackage.getEString(), "name", null, 0, 1, Category.class, !IS_TRANSIENT,
- !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getCategory_Categories(), this.getCategory(), null, "categories", null, 0, -1, Category.class,
- !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
- !IS_DERIVED, IS_ORDERED);
- initEReference(getCategory_Products(), this.getProduct(), null, "products", null, 0, -1, Category.class,
- !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
- !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getCategory_Name(), ecorePackage.getEString(), "name", null, 0, 1, Category.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getCategory_Categories(), this.getCategory(), null, "categories", null, 0, -1, Category.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getCategory_Products(), this.getProduct(), null, "products", null, 0, -1, Category.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(productEClass, Product.class, "Product", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getProduct_Name(), ecorePackage.getEString(), "name", null, 0, 1, Product.class, !IS_TRANSIENT,
- !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getProduct_OrderDetails(), this.getOrderDetail(), this.getOrderDetail_Product(), "orderDetails",
- null, 0, -1, Product.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
- !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getProduct_Name(), ecorePackage.getEString(), "name", null, 0, 1, Product.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getProduct_OrderDetails(), this.getOrderDetail(), this.getOrderDetail_Product(), "orderDetails", null, 0, -1, Product.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getProduct_Vat(), this.getVAT(), "vat", "vat15", 0, 1, Product.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Initialize enums and add enum literals
+ initEEnum(vatEEnum, org.eclipse.emf.cdo.tests.model1.VAT.class, "VAT");
+ addEEnumLiteral(vatEEnum, org.eclipse.emf.cdo.tests.model1.VAT.VAT0);
+ addEEnumLiteral(vatEEnum, org.eclipse.emf.cdo.tests.model1.VAT.VAT7);
+ addEEnumLiteral(vatEEnum, org.eclipse.emf.cdo.tests.model1.VAT.VAT15);
// Create resource
createResource(eNS_URI);
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderDetailImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderDetailImpl.java
index 3605a70..3b1781d 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderDetailImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderDetailImpl.java
@@ -33,7 +33,6 @@ public class OrderDetailImpl extends CDOObjectImpl implements OrderDetail
{
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
protected OrderDetailImpl()
@@ -43,7 +42,6 @@ public class OrderDetailImpl extends CDOObjectImpl implements OrderDetail
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -54,7 +52,6 @@ public class OrderDetailImpl extends CDOObjectImpl implements OrderDetail
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -65,7 +62,6 @@ public class OrderDetailImpl extends CDOObjectImpl implements OrderDetail
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Order getOrder()
@@ -75,7 +71,6 @@ public class OrderDetailImpl extends CDOObjectImpl implements OrderDetail
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setOrder(Order newOrder)
@@ -85,7 +80,6 @@ public class OrderDetailImpl extends CDOObjectImpl implements OrderDetail
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Product getProduct()
@@ -95,7 +89,6 @@ public class OrderDetailImpl extends CDOObjectImpl implements OrderDetail
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setProduct(Product newProduct)
@@ -105,7 +98,6 @@ public class OrderDetailImpl extends CDOObjectImpl implements OrderDetail
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public float getPrice()
@@ -115,7 +107,6 @@ public class OrderDetailImpl extends CDOObjectImpl implements OrderDetail
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setPrice(float newPrice)
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderImpl.java
index 39cd402..c47b7a3 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderImpl.java
@@ -20,17 +20,16 @@ import org.eclipse.emf.ecore.EClass;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.OrderImpl#getOrderDetails <em>Order Details</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.OrderImpl#getOrderDetails <em>Order Details</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class OrderImpl extends CDOObjectImpl implements Order
{
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
protected OrderImpl()
@@ -40,7 +39,6 @@ public class OrderImpl extends CDOObjectImpl implements Order
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -51,7 +49,6 @@ public class OrderImpl extends CDOObjectImpl implements Order
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -62,7 +59,6 @@ public class OrderImpl extends CDOObjectImpl implements Order
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/ProductImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/ProductImpl.java
index 3d242a4..f100bbf 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/ProductImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/ProductImpl.java
@@ -10,6 +10,7 @@ import org.eclipse.emf.cdo.tests.model1.Model1Package;
import org.eclipse.emf.cdo.tests.model1.OrderDetail;
import org.eclipse.emf.cdo.tests.model1.Product;
+import org.eclipse.emf.cdo.tests.model1.VAT;
import org.eclipse.emf.internal.cdo.CDOObjectImpl;
import org.eclipse.emf.common.util.EList;
@@ -20,18 +21,18 @@ import org.eclipse.emf.ecore.EClass;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.ProductImpl#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.ProductImpl#getOrderDetails <em>Order Details</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.ProductImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.ProductImpl#getOrderDetails <em>Order Details</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.ProductImpl#getVat <em>Vat</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class ProductImpl extends CDOObjectImpl implements Product
{
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
protected ProductImpl()
@@ -41,7 +42,6 @@ public class ProductImpl extends CDOObjectImpl implements Product
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -52,7 +52,6 @@ public class ProductImpl extends CDOObjectImpl implements Product
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -63,7 +62,6 @@ public class ProductImpl extends CDOObjectImpl implements Product
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public String getName()
@@ -73,7 +71,6 @@ public class ProductImpl extends CDOObjectImpl implements Product
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setName(String newName)
@@ -83,7 +80,6 @@ public class ProductImpl extends CDOObjectImpl implements Product
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
@@ -92,4 +88,24 @@ public class ProductImpl extends CDOObjectImpl implements Product
return (EList<OrderDetail>)eGet(Model1Package.Literals.PRODUCT__ORDER_DETAILS, true);
}
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public VAT getVat()
+ {
+ return (VAT)eGet(Model1Package.Literals.PRODUCT__VAT, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setVat(VAT newVat)
+ {
+ eSet(Model1Package.Literals.PRODUCT__VAT, newVat);
+ }
+
} // ProductImpl
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/PurchaseOrderImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/PurchaseOrderImpl.java
index e21a8bb..16adde2 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/PurchaseOrderImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/PurchaseOrderImpl.java
@@ -20,18 +20,17 @@ import java.util.Date;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.PurchaseOrderImpl#getDate <em>Date</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.PurchaseOrderImpl#getSupplier <em>Supplier</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.PurchaseOrderImpl#getDate <em>Date</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.PurchaseOrderImpl#getSupplier <em>Supplier</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class PurchaseOrderImpl extends OrderImpl implements PurchaseOrder
{
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
protected PurchaseOrderImpl()
@@ -41,7 +40,6 @@ public class PurchaseOrderImpl extends OrderImpl implements PurchaseOrder
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -52,7 +50,6 @@ public class PurchaseOrderImpl extends OrderImpl implements PurchaseOrder
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Date getDate()
@@ -62,7 +59,6 @@ public class PurchaseOrderImpl extends OrderImpl implements PurchaseOrder
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setDate(Date newDate)
@@ -72,7 +68,6 @@ public class PurchaseOrderImpl extends OrderImpl implements PurchaseOrder
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Supplier getSupplier()
@@ -82,7 +77,6 @@ public class PurchaseOrderImpl extends OrderImpl implements PurchaseOrder
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setSupplier(Supplier newSupplier)
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SalesOrderImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SalesOrderImpl.java
index f5ca649..4460935 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SalesOrderImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SalesOrderImpl.java
@@ -29,7 +29,6 @@ public class SalesOrderImpl extends OrderImpl implements SalesOrder
{
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
protected SalesOrderImpl()
@@ -39,7 +38,6 @@ public class SalesOrderImpl extends OrderImpl implements SalesOrder
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -50,7 +48,6 @@ public class SalesOrderImpl extends OrderImpl implements SalesOrder
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public int getId()
@@ -60,7 +57,6 @@ public class SalesOrderImpl extends OrderImpl implements SalesOrder
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setId(int newId)
@@ -70,7 +66,6 @@ public class SalesOrderImpl extends OrderImpl implements SalesOrder
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Customer getCustomer()
@@ -80,7 +75,6 @@ public class SalesOrderImpl extends OrderImpl implements SalesOrder
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setCustomer(Customer newCustomer)
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SupplierImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SupplierImpl.java
index 25208d4..d989ed0 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SupplierImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SupplierImpl.java
@@ -18,17 +18,16 @@ import org.eclipse.emf.ecore.EClass;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.SupplierImpl#getPurchaseOrders <em>Purchase Orders</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.SupplierImpl#getPurchaseOrders <em>Purchase Orders</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class SupplierImpl extends AddressImpl implements Supplier
{
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
protected SupplierImpl()
@@ -38,7 +37,6 @@ public class SupplierImpl extends AddressImpl implements Supplier
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -49,7 +47,6 @@ public class SupplierImpl extends AddressImpl implements Supplier
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1AdapterFactory.java
index 007220c..8a8dc9c 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1AdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1AdapterFactory.java
@@ -6,6 +6,7 @@
*/
package org.eclipse.emf.cdo.tests.model1.util;
+import org.eclipse.emf.cdo.tests.model1.*;
import org.eclipse.emf.cdo.tests.model1.Address;
import org.eclipse.emf.cdo.tests.model1.Category;
import org.eclipse.emf.cdo.tests.model1.Company;
@@ -26,22 +27,21 @@ import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides an adapter <code>createXXX</code>
* method for each class of the model. <!-- end-user-doc -->
- *
* @see org.eclipse.emf.cdo.tests.model1.Model1Package
* @generated
*/
public class Model1AdapterFactory extends AdapterFactoryImpl
{
/**
- * The cached model package. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The cached model package.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
protected static Model1Package modelPackage;
/**
- * Creates an instance of the adapter factory. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
public Model1AdapterFactory()
@@ -53,10 +53,10 @@ public class Model1AdapterFactory extends AdapterFactoryImpl
}
/**
- * Returns whether this factory is applicable for the type of the object. <!-- begin-user-doc --> This implementation
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc --> This implementation
* returns <code>true</code> if the object is either the model's package or is an instance object of the model. <!--
* end-user-doc -->
- *
* @return whether this factory is applicable for the type of the object.
* @generated
*/
@@ -75,84 +75,73 @@ public class Model1AdapterFactory extends AdapterFactoryImpl
}
/**
- * The switch that delegates to the <code>createXXX</code> methods. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
protected Model1Switch<Adapter> modelSwitch = new Model1Switch<Adapter>()
- {
- @Override
- public Adapter caseAddress(Address object)
- {
- return createAddressAdapter();
- }
-
- @Override
- public Adapter caseCompany(Company object)
- {
- return createCompanyAdapter();
- }
-
- @Override
- public Adapter caseSupplier(Supplier object)
- {
- return createSupplierAdapter();
- }
-
- @Override
- public Adapter caseCustomer(Customer object)
- {
- return createCustomerAdapter();
- }
-
- @Override
- public Adapter caseOrder(Order object)
- {
- return createOrderAdapter();
- }
-
- @Override
- public Adapter caseOrderDetail(OrderDetail object)
{
- return createOrderDetailAdapter();
- }
-
- @Override
- public Adapter casePurchaseOrder(PurchaseOrder object)
- {
- return createPurchaseOrderAdapter();
- }
-
- @Override
- public Adapter caseSalesOrder(SalesOrder object)
- {
- return createSalesOrderAdapter();
- }
-
- @Override
- public Adapter caseCategory(Category object)
- {
- return createCategoryAdapter();
- }
-
- @Override
- public Adapter caseProduct(Product object)
- {
- return createProductAdapter();
- }
-
- @Override
- public Adapter defaultCase(EObject object)
- {
- return createEObjectAdapter();
- }
- };
+ @Override
+ public Adapter caseAddress(Address object)
+ {
+ return createAddressAdapter();
+ }
+ @Override
+ public Adapter caseCompany(Company object)
+ {
+ return createCompanyAdapter();
+ }
+ @Override
+ public Adapter caseSupplier(Supplier object)
+ {
+ return createSupplierAdapter();
+ }
+ @Override
+ public Adapter caseCustomer(Customer object)
+ {
+ return createCustomerAdapter();
+ }
+ @Override
+ public Adapter caseOrder(Order object)
+ {
+ return createOrderAdapter();
+ }
+ @Override
+ public Adapter caseOrderDetail(OrderDetail object)
+ {
+ return createOrderDetailAdapter();
+ }
+ @Override
+ public Adapter casePurchaseOrder(PurchaseOrder object)
+ {
+ return createPurchaseOrderAdapter();
+ }
+ @Override
+ public Adapter caseSalesOrder(SalesOrder object)
+ {
+ return createSalesOrderAdapter();
+ }
+ @Override
+ public Adapter caseCategory(Category object)
+ {
+ return createCategoryAdapter();
+ }
+ @Override
+ public Adapter caseProduct(Product object)
+ {
+ return createProductAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object)
+ {
+ return createEObjectAdapter();
+ }
+ };
/**
- * Creates an adapter for the <code>target</code>. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param target
- * the object to adapt.
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @param target the object to adapt.
* @return the adapter for the <code>target</code>.
* @generated
*/
@@ -166,7 +155,6 @@ public class Model1AdapterFactory extends AdapterFactoryImpl
* Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Address <em>Address</em>}'.
* <!-- begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful to
* ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc -->
- *
* @return the new adapter.
* @see org.eclipse.emf.cdo.tests.model1.Address
* @generated
@@ -180,7 +168,6 @@ public class Model1AdapterFactory extends AdapterFactoryImpl
* Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Supplier <em>Supplier</em>}'.
* <!-- begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful to
* ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc -->
- *
* @return the new adapter.
* @see org.eclipse.emf.cdo.tests.model1.Supplier
* @generated
@@ -194,7 +181,6 @@ public class Model1AdapterFactory extends AdapterFactoryImpl
* Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder <em>Purchase Order</em>}'.
* <!-- begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful to
* ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc -->
- *
* @return the new adapter.
* @see org.eclipse.emf.cdo.tests.model1.PurchaseOrder
* @generated
@@ -208,7 +194,6 @@ public class Model1AdapterFactory extends AdapterFactoryImpl
* Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail <em>Order Detail</em>}'.
* <!-- begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful to
* ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc -->
- *
* @return the new adapter.
* @see org.eclipse.emf.cdo.tests.model1.OrderDetail
* @generated
@@ -222,7 +207,6 @@ public class Model1AdapterFactory extends AdapterFactoryImpl
* Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Product <em>Product</em>}'.
* <!-- begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful to
* ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc -->
- *
* @return the new adapter.
* @see org.eclipse.emf.cdo.tests.model1.Product
* @generated
@@ -236,7 +220,6 @@ public class Model1AdapterFactory extends AdapterFactoryImpl
* Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Category <em>Category</em>}'.
* <!-- begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful to
* ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc -->
- *
* @return the new adapter.
* @see org.eclipse.emf.cdo.tests.model1.Category
* @generated
@@ -250,7 +233,6 @@ public class Model1AdapterFactory extends AdapterFactoryImpl
* Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Company <em>Company</em>}'.
* <!-- begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful to
* ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc -->
- *
* @return the new adapter.
* @see org.eclipse.emf.cdo.tests.model1.Company
* @generated
@@ -264,7 +246,6 @@ public class Model1AdapterFactory extends AdapterFactoryImpl
* Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Customer <em>Customer</em>}'.
* <!-- begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful to
* ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc -->
- *
* @return the new adapter.
* @see org.eclipse.emf.cdo.tests.model1.Customer
* @generated
@@ -278,7 +259,6 @@ public class Model1AdapterFactory extends AdapterFactoryImpl
* Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Order <em>Order</em>}'.
* <!-- begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful to
* ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc -->
- *
* @return the new adapter.
* @see org.eclipse.emf.cdo.tests.model1.Order
* @generated
@@ -292,7 +272,6 @@ public class Model1AdapterFactory extends AdapterFactoryImpl
* Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder <em>Sales Order</em>}'.
* <!-- begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful to
* ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc -->
- *
* @return the new adapter.
* @see org.eclipse.emf.cdo.tests.model1.SalesOrder
* @generated
@@ -303,9 +282,9 @@ public class Model1AdapterFactory extends AdapterFactoryImpl
}
/**
- * Creates a new adapter for the default case. <!-- begin-user-doc --> This default implementation returns null. <!--
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc --> This default implementation returns null. <!--
* end-user-doc -->
- *
* @return the new adapter.
* @generated
*/
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java
index 633e291..87e7cb6 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java
@@ -22,28 +22,28 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import java.util.List;
+import org.eclipse.emf.cdo.tests.model1.*;
/**
* <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance hierarchy. It supports the call
* {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method for each class of the model,
* starting with the actual class of the object and proceeding up the inheritance hierarchy until a non-null result is
* returned, which is the result of the switch. <!-- end-user-doc -->
- *
* @see org.eclipse.emf.cdo.tests.model1.Model1Package
* @generated
*/
public class Model1Switch<T>
{
/**
- * The cached model package <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The cached model package
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
protected static Model1Package modelPackage;
/**
- * Creates an instance of the switch. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
public Model1Switch()
@@ -55,9 +55,8 @@ public class Model1Switch<T>
}
/**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that
- * result. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
@@ -67,9 +66,8 @@ public class Model1Switch<T>
}
/**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that
- * result. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
@@ -82,14 +80,16 @@ public class Model1Switch<T>
else
{
List<EClass> eSuperTypes = theEClass.getESuperTypes();
- return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
+ return
+ eSuperTypes.isEmpty() ?
+ defaultCase(theEObject) :
+ doSwitch(eSuperTypes.get(0), theEObject);
}
}
/**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that
- * result. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
@@ -97,92 +97,90 @@ public class Model1Switch<T>
{
switch (classifierID)
{
- case Model1Package.ADDRESS:
- {
- Address address = (Address)theEObject;
- T result = caseAddress(address);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case Model1Package.COMPANY:
- {
- Company company = (Company)theEObject;
- T result = caseCompany(company);
- if (result == null) result = caseAddress(company);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case Model1Package.SUPPLIER:
- {
- Supplier supplier = (Supplier)theEObject;
- T result = caseSupplier(supplier);
- if (result == null) result = caseAddress(supplier);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case Model1Package.CUSTOMER:
- {
- Customer customer = (Customer)theEObject;
- T result = caseCustomer(customer);
- if (result == null) result = caseAddress(customer);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case Model1Package.ORDER:
- {
- Order order = (Order)theEObject;
- T result = caseOrder(order);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case Model1Package.ORDER_DETAIL:
- {
- OrderDetail orderDetail = (OrderDetail)theEObject;
- T result = caseOrderDetail(orderDetail);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case Model1Package.PURCHASE_ORDER:
- {
- PurchaseOrder purchaseOrder = (PurchaseOrder)theEObject;
- T result = casePurchaseOrder(purchaseOrder);
- if (result == null) result = caseOrder(purchaseOrder);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case Model1Package.SALES_ORDER:
- {
- SalesOrder salesOrder = (SalesOrder)theEObject;
- T result = caseSalesOrder(salesOrder);
- if (result == null) result = caseOrder(salesOrder);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case Model1Package.CATEGORY:
- {
- Category category = (Category)theEObject;
- T result = caseCategory(category);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case Model1Package.PRODUCT:
- {
- Product product = (Product)theEObject;
- T result = caseProduct(product);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- default:
- return defaultCase(theEObject);
+ case Model1Package.ADDRESS:
+ {
+ Address address = (Address)theEObject;
+ T result = caseAddress(address);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Model1Package.COMPANY:
+ {
+ Company company = (Company)theEObject;
+ T result = caseCompany(company);
+ if (result == null) result = caseAddress(company);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Model1Package.SUPPLIER:
+ {
+ Supplier supplier = (Supplier)theEObject;
+ T result = caseSupplier(supplier);
+ if (result == null) result = caseAddress(supplier);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Model1Package.CUSTOMER:
+ {
+ Customer customer = (Customer)theEObject;
+ T result = caseCustomer(customer);
+ if (result == null) result = caseAddress(customer);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Model1Package.ORDER:
+ {
+ Order order = (Order)theEObject;
+ T result = caseOrder(order);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Model1Package.ORDER_DETAIL:
+ {
+ OrderDetail orderDetail = (OrderDetail)theEObject;
+ T result = caseOrderDetail(orderDetail);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Model1Package.PURCHASE_ORDER:
+ {
+ PurchaseOrder purchaseOrder = (PurchaseOrder)theEObject;
+ T result = casePurchaseOrder(purchaseOrder);
+ if (result == null) result = caseOrder(purchaseOrder);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Model1Package.SALES_ORDER:
+ {
+ SalesOrder salesOrder = (SalesOrder)theEObject;
+ T result = caseSalesOrder(salesOrder);
+ if (result == null) result = caseOrder(salesOrder);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Model1Package.CATEGORY:
+ {
+ Category category = (Category)theEObject;
+ T result = caseCategory(category);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Model1Package.PRODUCT:
+ {
+ Product product = (Product)theEObject;
+ T result = caseProduct(product);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
}
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Address</em>'. <!-- begin-user-doc -->
+ * Returns the result of interpreting the object as an instance of '<em>Address</em>'.
+ * <!-- begin-user-doc -->
* This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Address</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -193,11 +191,10 @@ public class Model1Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Supplier</em>'. <!-- begin-user-doc -->
+ * Returns the result of interpreting the object as an instance of '<em>Supplier</em>'.
+ * <!-- begin-user-doc -->
* This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Supplier</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -208,11 +205,10 @@ public class Model1Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Purchase Order</em>'. <!-- begin-user-doc
+ * Returns the result of interpreting the object as an instance of '<em>Purchase Order</em>'.
+ * <!-- begin-user-doc
* --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Purchase Order</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -223,11 +219,10 @@ public class Model1Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Order Detail</em>'. <!-- begin-user-doc
+ * Returns the result of interpreting the object as an instance of '<em>Order Detail</em>'.
+ * <!-- begin-user-doc
* --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Order Detail</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -238,11 +233,10 @@ public class Model1Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Product</em>'. <!-- begin-user-doc -->
+ * Returns the result of interpreting the object as an instance of '<em>Product</em>'.
+ * <!-- begin-user-doc -->
* This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Product</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -253,11 +247,10 @@ public class Model1Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Category</em>'. <!-- begin-user-doc -->
+ * Returns the result of interpreting the object as an instance of '<em>Category</em>'.
+ * <!-- begin-user-doc -->
* This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Category</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -268,11 +261,10 @@ public class Model1Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Company</em>'. <!-- begin-user-doc -->
+ * Returns the result of interpreting the object as an instance of '<em>Company</em>'.
+ * <!-- begin-user-doc -->
* This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Company</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -283,11 +275,10 @@ public class Model1Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Customer</em>'. <!-- begin-user-doc -->
+ * Returns the result of interpreting the object as an instance of '<em>Customer</em>'.
+ * <!-- begin-user-doc -->
* This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Customer</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -298,11 +289,10 @@ public class Model1Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Order</em>'. <!-- begin-user-doc --> This
+ * Returns the result of interpreting the object as an instance of '<em>Order</em>'.
+ * <!-- begin-user-doc --> This
* implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Order</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -313,11 +303,10 @@ public class Model1Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Sales Order</em>'. <!-- begin-user-doc -->
+ * Returns the result of interpreting the object as an instance of '<em>Sales Order</em>'.
+ * <!-- begin-user-doc -->
* This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Sales Order</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -328,12 +317,11 @@ public class Model1Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. <!-- begin-user-doc -->
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
* This implementation returns null; returning a non-null result will terminate the switch, but this is the last case
* anyway. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>EObject</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTests.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTests.java
index 8a3c0dc..476b2fd 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTests.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTests.java
@@ -24,6 +24,7 @@ public class AllTests
// $JUnit-BEGIN$
suite.addTestSuite(InitialTest.class);
+ suite.addTestSuite(EnumTest.class);
suite.addTestSuite(StateMachineTest.class);
suite.addTestSuite(ViewTest.class);
suite.addTestSuite(ResourceTest.class);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/EnumTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/EnumTest.java
new file mode 100644
index 0000000..3e6c74d
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/EnumTest.java
@@ -0,0 +1,79 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ **************************************************************************/
+package org.eclipse.emf.cdo.tests;
+
+import org.eclipse.emf.cdo.CDOSession;
+import org.eclipse.emf.cdo.CDOTransaction;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.tests.model1.Category;
+import org.eclipse.emf.cdo.tests.model1.Model1Factory;
+import org.eclipse.emf.cdo.tests.model1.Product;
+import org.eclipse.emf.cdo.tests.model1.VAT;
+
+/**
+ * @author Eike Stepper
+ */
+public class EnumTest extends AbstractCDOTest
+{
+ public void testTransient() throws Exception
+ {
+ {
+ Product product = Model1Factory.eINSTANCE.createProduct();
+ product.setName("Normal Product");
+ product.setVat(VAT.VAT7);
+
+ CDOSession session = openModel1Session();
+ CDOTransaction transaction = session.openTransaction();
+ CDOResource resource = transaction.createResource("/my/resource");
+ resource.getContents().add(product);
+ transaction.commit();
+ session.close();
+ }
+
+ {
+ CDOSession session = openModel1Session();
+ CDOTransaction transaction = session.openTransaction();
+ CDOResource resource = transaction.getResource("/my/resource");
+ Product product = (Product)resource.getContents().get(0);
+ assertEquals(VAT.VAT7, product.getVat());
+ session.close();
+ }
+ }
+
+ public void testAttached() throws Exception
+ {
+ {
+ Category category = Model1Factory.eINSTANCE.createCategory();
+ CDOSession session = openModel1Session();
+ CDOTransaction transaction = session.openTransaction();
+ CDOResource resource = transaction.createResource("/my/resource");
+ resource.getContents().add(category);
+
+ Product product = Model1Factory.eINSTANCE.createProduct();
+ product.setName("Normal Product");
+ product.setVat(VAT.VAT7);
+ category.getProducts().add(product);
+
+ transaction.commit();
+ session.close();
+ }
+
+ {
+ CDOSession session = openModel1Session();
+ CDOTransaction transaction = session.openTransaction();
+ CDOResource resource = transaction.getResource("/my/resource");
+ Category category = (Category)resource.getContents().get(0);
+ Product product = category.getProducts().get(0);
+ assertEquals(VAT.VAT7, product.getVat());
+ session.close();
+ }
+ }
+}
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 dc318ca..d7f528b 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
@@ -18,6 +18,7 @@ import org.eclipse.emf.cdo.internal.protocol.revision.InternalCDORevision;
import org.eclipse.emf.cdo.protocol.id.CDOID;
import org.eclipse.emf.cdo.protocol.model.CDOClass;
import org.eclipse.emf.cdo.protocol.model.CDOFeature;
+import org.eclipse.emf.cdo.protocol.model.CDOType;
import org.eclipse.emf.cdo.protocol.revision.CDORevision;
import org.eclipse.emf.internal.cdo.bundle.OM;
@@ -32,6 +33,7 @@ import org.eclipse.emf.common.util.ECollections;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.EStoreEObjectImpl;
@@ -41,6 +43,7 @@ import org.eclipse.emf.ecore.util.DelegatingEcoreEList;
import org.eclipse.emf.ecore.util.DelegatingFeatureMap;
import org.eclipse.emf.ecore.util.EcoreEList;
import org.eclipse.emf.ecore.util.EcoreEMap;
+import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.util.FeatureMap;
import java.util.Collection;
@@ -248,6 +251,10 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
{
setting = view.convertObjectToID(setting);
}
+ else if (cdoFeature.getType() == CDOType.CUSTOM)
+ {
+ setting = EcoreUtil.convertToString((EDataType)eFeature.getEType(), setting);
+ }
revision.set(cdoFeature, 0, setting);
}
@@ -322,6 +329,10 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
{
value = view.getObject((CDOID)value, true);
}
+ else if (cdoFeature.getType() == CDOType.CUSTOM)
+ {
+ value = EcoreUtil.createFromString((EDataType)eFeature.getEType(), (String)value);
+ }
eSettings[i] = value;
}
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 a3ce644..039f9bd 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
@@ -21,6 +21,7 @@ import org.eclipse.emf.cdo.internal.protocol.revision.delta.CDOSetFeatureDeltaIm
import org.eclipse.emf.cdo.internal.protocol.revision.delta.CDOUnsetFeatureDeltaImpl;
import org.eclipse.emf.cdo.protocol.id.CDOID;
import org.eclipse.emf.cdo.protocol.model.CDOFeature;
+import org.eclipse.emf.cdo.protocol.model.CDOType;
import org.eclipse.emf.cdo.protocol.revision.CDOReferenceProxy;
import org.eclipse.emf.cdo.protocol.revision.delta.CDOFeatureDelta;
@@ -32,10 +33,12 @@ import org.eclipse.net4j.internal.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.collection.MoveableList;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.InternalEObject.EStore;
+import org.eclipse.emf.ecore.util.EcoreUtil;
import java.text.MessageFormat;
import java.util.HashSet;
@@ -129,6 +132,10 @@ public final class CDOStore implements EStore
value = view.convertIDToObject(value);
}
+ else if (cdoFeature.getType() == CDOType.CUSTOM)
+ {
+ value = EcoreUtil.createFromString((EDataType)eFeature.getEType(), (String)value);
+ }
view.getFeatureAnalyzer().postTraverseFeature(cdoObject, cdoFeature, index, value);
return value;
@@ -364,6 +371,10 @@ public final class CDOStore implements EStore
handleContainmentAdd(cdoObject, value);
}
}
+ else if (cdoFeature.getType() == CDOType.CUSTOM)
+ {
+ value = EcoreUtil.convertToString((EDataType)eFeature.getEType(), value);
+ }
Object result = revision.set(cdoFeature, index, value);
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ModelUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ModelUtil.java
index e6d9a9d..07aba8f 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ModelUtil.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ModelUtil.java
@@ -39,6 +39,7 @@ import org.eclipse.net4j.util.ImplementationError;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
@@ -94,10 +95,18 @@ public final class ModelUtil
}
return type;
+
+ case EcorePackage.ESTRING:
+ return CDOType.STRING;
}
}
- return CDOType.STRING;
+ if (classifier instanceof EDataType)
+ {
+ return CDOType.CUSTOM;
+ }
+
+ throw new IllegalArgumentException("Invalid attribute type: " + classifier);
}
public static void initializeCDOPackage(EPackage ePackage, CDOPackage cdoPackage)
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
index 0463922..d8e9333 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
@@ -29,6 +29,7 @@ import org.eclipse.net4j.util.security.INegotiationContext;
import org.eclipse.internal.net4j.channel.InternalChannel;
import org.eclipse.internal.net4j.connector.Connector;
+import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.ClosedChannelException;
import java.nio.channels.SelectionKey;
@@ -175,7 +176,7 @@ public abstract class TCPConnector extends Connector implements ITCPConnector, I
inputBuffer = null;
}
}
- catch (ClosedChannelException ex)
+ catch (IOException ex)
{
deactivate();
}
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelector.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelector.java
index 467785b..abb204a 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelector.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelector.java
@@ -173,7 +173,7 @@ public class TCPSelector extends Lifecycle implements ITCPSelector, Runnable
}
catch (Exception ex)
{
- OM.LOG.error(ex);
+ OM.LOG.info(ex.getMessage());
selKey.cancel();
}
}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/ExtendedIOUtil.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/ExtendedIOUtil.java
index 972fc8d..3c0aa81 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/ExtendedIOUtil.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/ExtendedIOUtil.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.util.io;
import org.eclipse.net4j.internal.util.bundle.OM;
+import org.eclipse.net4j.internal.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.WrappedException;
import java.io.DataInput;
@@ -29,6 +30,8 @@ import java.io.OutputStream;
*/
public final class ExtendedIOUtil
{
+ private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG, ExtendedIOUtil.class);
+
private static final int UTF_HEADER_SIZE = 2;
private static final int MAX_16_BIT = (1 << 16) - 1;
@@ -151,6 +154,11 @@ public final class ExtendedIOUtil
{
if (classResolver != null)
{
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Deserializing class {0}", desc.getName());
+ }
+
Class<?> c = classResolver.resolveClass(desc);
if (c != null)
{