summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-07-14 04:07:40 (EDT)
committerEike Stepper2007-07-14 04:07:40 (EDT)
commit17b0ea6fdee533a99bc5278fb0c5048d3a4f6fc4 (patch)
tree61a0b3fb91e04920876c7bcce537474d0e0c9f29
parent2e4ea5399a6f7762e181863d60d7db2d5ce1be0c (diff)
downloadcdo-17b0ea6fdee533a99bc5278fb0c5048d3a4f6fc4.zip
cdo-17b0ea6fdee533a99bc5278fb0c5048d3a4f6fc4.tar.gz
cdo-17b0ea6fdee533a99bc5278fb0c5048d3a4f6fc4.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo.server/.classpath2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/EmptyStoreManager.java42
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/EmptyStoreTransaction.java57
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerIndication.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerProtocol.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionIndication.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/OpenSessionIndication.java18
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/RegisterPackagesIndication.java55
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IRepository.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ITransaction.java34
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/StoreUtil.java86
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/.cvsignore1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/model/model1.ecore68
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Address.java110
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Category.java37
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Company.java56
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Customer.java45
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Factory.java47
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Package.java740
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Order.java50
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/OrderDetail.java57
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Product.java23
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/PurchaseOrder.java26
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/SalesOrder.java33
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Supplier.java41
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/AddressImpl.java125
-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.java32
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CustomerImpl.java41
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1FactoryImpl.java76
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1PackageImpl.java346
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderDetailImpl.java35
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderImpl.java77
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/ProductImpl.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/PurchaseOrderImpl.java25
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SalesOrderImpl.java25
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SupplierImpl.java40
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1AdapterFactory.java169
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java249
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/validation/AddressValidator.java23
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/validation/OrderDetailValidator.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/validation/OrderValidator.java24
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/validation/SupplierValidator.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java3
-rw-r--r--plugins/org.eclipse.emf.cdo/.classpath2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOSession.java10
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java17
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java18
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionFactory.java2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java63
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStore.java45
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java57
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/bundle/Activator.java7
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadObjectRequest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/OpenSessionRequest.java17
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/OpenSessionResult.java12
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/RegisterPackagesRequest.java58
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/EMFUtil.java130
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/PackageClosure.java (renamed from plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/LinearPackageHull.java)19
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/TreeTraversal.java2
-rw-r--r--plugins/org.eclipse.net4j.db/.classpath2
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBStoreManager.java33
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBStoreTransaction.java23
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBStoreManager.java145
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBStoreTransaction.java42
-rw-r--r--plugins/org.eclipse.net4j.util/.classpath2
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/transaction/StoreManager.java67
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/transaction/StoreTransaction.java32
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/transaction/IStoreManager.java37
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/transaction/IStoreTransaction.java19
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/transaction/StoreException.java38
73 files changed, 2097 insertions, 1787 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/.classpath b/plugins/org.eclipse.emf.cdo.server/.classpath
index 0ffb2ff..304e861 100644
--- a/plugins/org.eclipse.emf.cdo.server/.classpath
+++ b/plugins/org.eclipse.emf.cdo.server/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry excluding="org/eclipse/emf/cdo/server/ModelManager.java|org/eclipse/emf/cdo/server/Model.java|org/eclipse/emf/cdo/internal/server/ModelManagerImpl.java|org/eclipse/emf/cdo/internal/server/protocol/LoadResourcePathIndication.java|org/eclipse/emf/cdo/internal/server/protocol/AddModelsIndication.java|org/eclipse/emf/cdo/server/ITransaction.java|org/eclipse/emf/cdo/server/StoreUtil.java|org/eclipse/emf/cdo/internal/server/EmptyStoreManager.java|org/eclipse/emf/cdo/internal/server/EmptyStoreTransaction.java" kind="src" path="src"/>
+ <classpathentry kind="src" path="src"/>
<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="output" path="bin"/>
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/EmptyStoreManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/EmptyStoreManager.java
deleted file mode 100644
index d83e2d5..0000000
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/EmptyStoreManager.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2007 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.internal.server;
-
-import org.eclipse.emf.cdo.server.ITransaction;
-
-import org.eclipse.net4j.internal.util.transaction.StoreManager;
-
-/**
- * @author Eike Stepper
- */
-public class EmptyStoreManager extends StoreManager<ITransaction>
-{
- private static final String STORE_TYPE = "EMPTY";
-
- public EmptyStoreManager()
- {
- super(STORE_TYPE);
- setInstanceID(STORE_TYPE);
- }
-
- public ITransaction startTransaction()
- {
- return new EmptyStoreTransaction(this);
- }
-
- public void commitTransaction(ITransaction transaction)
- {
- }
-
- public void rollbackTransaction(ITransaction transaction)
- {
- }
-}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/EmptyStoreTransaction.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/EmptyStoreTransaction.java
deleted file mode 100644
index 4cfc295..0000000
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/EmptyStoreTransaction.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2007 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.internal.server;
-
-import org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionImpl;
-import org.eclipse.emf.cdo.protocol.CDOID;
-import org.eclipse.emf.cdo.server.ITransaction;
-
-import org.eclipse.net4j.internal.util.transaction.StoreTransaction;
-import org.eclipse.net4j.util.transaction.IStoreManager;
-
-/**
- * @author Eike Stepper
- */
-public class EmptyStoreTransaction extends StoreTransaction implements ITransaction
-{
- public EmptyStoreTransaction(IStoreManager<ITransaction> storeManager)
- {
- super(storeManager);
- }
-
- public void registerResource(CDOID id, String path)
- {
- }
-
- public CDOID getResourceID(String path)
- {
- return null;
- }
-
- public String getResourcePath(CDOID id)
- {
- return null;
- }
-
- public void addRevision(CDORevisionImpl revision)
- {
- }
-
- public CDORevisionImpl getRevision(CDOID id, long timeStamp)
- {
- return null;
- }
-
- public CDORevisionImpl getRevision(CDOID id)
- {
- return null;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
index 6d1f4f2..a19e1a3 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
@@ -11,6 +11,7 @@
package org.eclipse.emf.cdo.internal.server;
import org.eclipse.emf.cdo.internal.protocol.CDOIDImpl;
+import org.eclipse.emf.cdo.internal.protocol.model.CDOPackageManagerImpl;
import org.eclipse.emf.cdo.protocol.CDOID;
import org.eclipse.emf.cdo.server.IRepository;
import org.eclipse.emf.cdo.server.IStore;
@@ -32,6 +33,8 @@ public class Repository extends Lifecycle implements IRepository
private String uuid;
+ private CDOPackageManagerImpl packageManager;
+
private SessionManager sessionManager;
private ResourceManager resourceManager;
@@ -45,6 +48,7 @@ public class Repository extends Lifecycle implements IRepository
this.name = name;
this.store = store;
this.uuid = UUID.randomUUID().toString();
+ packageManager = new CDOPackageManagerImpl();
sessionManager = new SessionManager(this);
resourceManager = new ResourceManager(this);
revisionManager = new RevisionManager(this);
@@ -65,6 +69,11 @@ public class Repository extends Lifecycle implements IRepository
return uuid;
}
+ public CDOPackageManagerImpl getPackageManager()
+ {
+ return packageManager;
+ }
+
public SessionManager getSessionManager()
{
return sessionManager;
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java
index d07af92..31455a8 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java
@@ -23,9 +23,12 @@ public class RevisionManager extends CDORevisionResolverImpl implements IRevisio
{
private Repository repository;
+ private CDOPathFeatureImpl cdoPathFeature;
+
public RevisionManager(Repository repository)
{
this.repository = repository;
+ cdoPathFeature = repository.getPackageManager().getCDOResourcePackage().getCDOResourceClass().getCDOPathFeature();
}
public Repository getRepository()
@@ -39,7 +42,7 @@ public class RevisionManager extends CDORevisionResolverImpl implements IRevisio
repository.getStore().addRevision(this, revision);
if (revision.isResource())
{
- String path = (String)revision.getData().get(CDOPathFeatureImpl.INSTANCE, -1);
+ String path = (String)revision.getData().get(cdoPathFeature, -1);
repository.getResourceManager().registerResource(revision.getID(), path);
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerIndication.java
index 9fa4701..6348489 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerIndication.java
@@ -10,6 +10,7 @@
**************************************************************************/
package org.eclipse.emf.cdo.internal.server.protocol;
+import org.eclipse.emf.cdo.internal.protocol.model.CDOPackageManagerImpl;
import org.eclipse.emf.cdo.internal.server.Repository;
import org.eclipse.emf.cdo.internal.server.ResourceManager;
import org.eclipse.emf.cdo.internal.server.RevisionManager;
@@ -39,6 +40,11 @@ public abstract class CDOServerIndication extends IndicationWithResponse
return signalID;
}
+ protected CDOPackageManagerImpl getPackageManager()
+ {
+ return getRepository().getPackageManager();
+ }
+
protected SessionManager getSessionManager()
{
return getSession().getSessionManager();
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerProtocol.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerProtocol.java
index 8c06590..60e3c9b 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerProtocol.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerProtocol.java
@@ -59,6 +59,9 @@ public class CDOServerProtocol extends SignalProtocol
case CDOProtocolConstants.LOAD_OBJECT_SIGNAL:
return new LoadObjectIndication();
+ case CDOProtocolConstants.REGISTER_PACKAGES_SIGNAL:
+ return new RegisterPackagesIndication();
+
case CDOProtocolConstants.COMMIT_TRANSACTION_SIGNAL:
return new CommitTransactionIndication();
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionIndication.java
index 894e29a..aa68500 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CommitTransactionIndication.java
@@ -12,6 +12,7 @@ package org.eclipse.emf.cdo.internal.server.protocol;
import org.eclipse.emf.cdo.internal.protocol.CDOIDImpl;
import org.eclipse.emf.cdo.internal.protocol.bundle.CDOProtocol;
+import org.eclipse.emf.cdo.internal.protocol.model.CDOPackageManagerImpl;
import org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionImpl;
import org.eclipse.emf.cdo.internal.server.RevisionManager;
import org.eclipse.emf.cdo.protocol.CDOID;
@@ -96,10 +97,11 @@ public class CommitTransactionIndication extends CDOServerIndication
private CDORevisionImpl[] readRevisions(ExtendedDataInputStream in, int size) throws IOException
{
+ CDOPackageManagerImpl packageManager = getRepository().getPackageManager();
CDORevisionImpl[] revisions = new CDORevisionImpl[size];
for (int i = 0; i < size; i++)
{
- revisions[i] = new CDORevisionImpl(in);
+ revisions[i] = new CDORevisionImpl(packageManager, in);
mapTemporaryID(revisions[i]);
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/OpenSessionIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/OpenSessionIndication.java
index 6c23209..a988696 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/OpenSessionIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/OpenSessionIndication.java
@@ -16,6 +16,8 @@ import org.eclipse.emf.cdo.internal.server.RepositoryManager;
import org.eclipse.emf.cdo.internal.server.Session;
import org.eclipse.emf.cdo.internal.server.SessionManager;
import org.eclipse.emf.cdo.protocol.CDOProtocolConstants;
+import org.eclipse.emf.cdo.protocol.model.CDOPackage;
+import org.eclipse.emf.cdo.protocol.model.CDOPackageManager;
import org.eclipse.emf.cdo.server.IRepository;
import org.eclipse.emf.cdo.server.ISession;
@@ -88,6 +90,7 @@ public class OpenSessionIndication extends IndicationWithResponse
serverProtocol.setSession(session);
writeSessionID(out, session);
writeRepositoryUUID(out, repository);
+ writePackageURIs(out, repository.getPackageManager());
}
private void writeSessionID(ExtendedDataOutputStream out, ISession session) throws IOException
@@ -109,4 +112,19 @@ public class OpenSessionIndication extends IndicationWithResponse
out.writeString(repository.getUUID());
}
+
+ private void writePackageURIs(ExtendedDataOutputStream out, CDOPackageManager packageManager) throws IOException
+ {
+ CDOPackage[] packages = packageManager.getPackages();
+ out.writeInt(packages.length);
+ for (CDOPackage p : packages)
+ {
+ if (PROTOCOL.isEnabled())
+ {
+ PROTOCOL.format("Writing package URI: {0}", p.getPackageURI());
+ }
+
+ out.writeString(p.getPackageURI());
+ }
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/RegisterPackagesIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/RegisterPackagesIndication.java
new file mode 100644
index 0000000..1d1ceb4
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/RegisterPackagesIndication.java
@@ -0,0 +1,55 @@
+/***************************************************************************
+ * Copyright (c) 2004-2007 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.internal.server.protocol;
+
+import org.eclipse.emf.cdo.internal.protocol.model.CDOPackageImpl;
+import org.eclipse.emf.cdo.internal.protocol.model.CDOPackageManagerImpl;
+import org.eclipse.emf.cdo.protocol.CDOProtocolConstants;
+
+import org.eclipse.net4j.util.stream.ExtendedDataInputStream;
+import org.eclipse.net4j.util.stream.ExtendedDataOutputStream;
+
+import java.io.IOException;
+
+/**
+ * @author Eike Stepper
+ */
+@SuppressWarnings("unused")
+public class RegisterPackagesIndication extends CDOServerIndication
+{
+ public RegisterPackagesIndication()
+ {
+ super(CDOProtocolConstants.REGISTER_PACKAGES_SIGNAL);
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws IOException
+ {
+ CDOPackageManagerImpl packageManager = getPackageManager();
+ int size = in.readInt();
+ CDOPackageImpl[] newPackages = new CDOPackageImpl[size];
+ for (int i = 0; i < size; i++)
+ {
+ newPackages[i] = new CDOPackageImpl(packageManager, in);
+ packageManager.addPackage(newPackages[i]);
+ }
+
+ for (int i = 0; i < size; i++)
+ {
+ newPackages[i].initialize();
+ }
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws IOException
+ {
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IRepository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IRepository.java
index b2d59ea..06086ef 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IRepository.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IRepository.java
@@ -10,6 +10,7 @@
**************************************************************************/
package org.eclipse.emf.cdo.server;
+import org.eclipse.emf.cdo.protocol.model.CDOPackageManager;
/**
* @author Eike Stepper
@@ -22,6 +23,8 @@ public interface IRepository
public String getUUID();
+ public CDOPackageManager getPackageManager();
+
public ISessionManager getSessionManager();
public IResourceManager getResourceManager();
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ITransaction.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ITransaction.java
deleted file mode 100644
index 926aa0b..0000000
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ITransaction.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2007 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.server;
-
-import org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionImpl;
-import org.eclipse.emf.cdo.protocol.CDOID;
-
-import org.eclipse.net4j.util.transaction.IStoreTransaction;
-
-/**
- * @author Eike Stepper
- */
-public interface ITransaction extends IStoreTransaction
-{
- public void registerResource(CDOID id, String path);
-
- public CDOID getResourceID(String path);
-
- public String getResourcePath(CDOID id);
-
- public void addRevision(CDORevisionImpl revision);
-
- public CDORevisionImpl getRevision(CDOID id);
-
- public CDORevisionImpl getRevision(CDOID id, long timeStamp);
-}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/StoreUtil.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/StoreUtil.java
deleted file mode 100644
index ec4f693..0000000
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/StoreUtil.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2007 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.server;
-
-import org.eclipse.net4j.util.transaction.IStoreManager;
-import org.eclipse.net4j.util.transaction.StoreException;
-import org.eclipse.net4j.util.transaction.IStoreManager.TransactedOperation;
-
-/**
- * @author Eike Stepper
- */
-public final class StoreUtil
-{
- private static ThreadLocal<ITransaction> cdotx = new InheritableThreadLocal();
-
- private StoreUtil()
- {
- }
-
- public static void transact(IStoreManager<ITransaction> storeManager, final Runnable runnable) throws StoreException
- {
- TransactedOperation operation = new TransactedOperation<ITransaction>()
- {
- public void run(ITransaction transaction) throws Exception
- {
- setTransaction(transaction);
- try
- {
- runnable.run();
- }
- finally
- {
- unsetTransaction();
- }
- }
- };
-
- storeManager.transact(operation);
- }
-
- public static ITransaction getTransaction()
- {
- ITransaction transaction = cdotx.get();
- if (transaction == null)
- {
- throw new IllegalStateException("No transaction ongoing");
- }
-
- return transaction;
- }
-
- private static void setTransaction(ITransaction transaction)
- {
- if (transaction == null)
- {
- throw new IllegalArgumentException("transaction == null");
- }
-
- ITransaction existingTransaction = cdotx.get();
- if (existingTransaction != null)
- {
- throw new IllegalStateException("Transaction already ongoing");
- }
-
- cdotx.set(transaction);
- }
-
- private static void unsetTransaction()
- {
- ITransaction transaction = cdotx.get();
- if (transaction == null)
- {
- throw new IllegalStateException("No transaction ongoing");
- }
-
- cdotx.set(null);
- }
-}
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/.cvsignore b/plugins/org.eclipse.emf.cdo.tests.model1/.cvsignore
index 6938697..6ffb221 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/.cvsignore
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/.cvsignore
@@ -1,2 +1,3 @@
bin
doc
+text
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 256ae94..2288e23 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/model/model1.ecore
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/model/model1.ecore
@@ -3,22 +3,51 @@
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="model1"
nsURI="http://www.eclipse.org/emf/CDO/tests/model1/1.0.0" nsPrefix="model1">
- <eClassifiers xsi:type="ecore:EClass" name="Supplier">
+ <eClassifiers xsi:type="ecore:EClass" name="Address">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="street" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="city" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="PurchaseOrder">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="date" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDate"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="supplier" eType="#//Supplier"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Company" eSuperTypes="#//Address">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="categories" upperBound="-1"
+ eType="#//Category" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="suppliers" upperBound="-1"
+ eType="#//Supplier" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="customers" upperBound="-1"
+ eType="#//Customer" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="purchaseOrders" upperBound="-1"
+ eType="#//PurchaseOrder" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="salesOrders" upperBound="-1"
+ eType="#//SalesOrder" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Supplier" eSuperTypes="#//Address">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="purchaseOrders" upperBound="-1"
+ eType="#//PurchaseOrder" eOpposite="#//PurchaseOrder/supplier"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Customer" eSuperTypes="#//Address">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="salesOrders" upperBound="-1"
+ eType="#//SalesOrder" eOpposite="#//SalesOrder/customer"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Order">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="orderDetails" upperBound="-1"
+ eType="#//OrderDetail" containment="true" eOpposite="#//OrderDetail/order"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="OrderDetail">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="order" lowerBound="1" eType="#//Order"
+ eOpposite="#//Order/orderDetails"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="product" eType="#//Product"
eOpposite="#//Product/orderDetails"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="price" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloat"/>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Product">
- <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"/>
+ <eClassifiers xsi:type="ecore:EClass" name="PurchaseOrder" eSuperTypes="#//Order">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="date" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDate"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="supplier" lowerBound="1"
+ eType="#//Supplier" eOpposite="#//Supplier/purchaseOrders"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="SalesOrder" eSuperTypes="#//Order">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="customer" lowerBound="1"
+ eType="#//Customer" eOpposite="#//Customer/salesOrders"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Category">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
@@ -27,26 +56,9 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="products" upperBound="-1"
eType="#//Product" containment="true"/>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Company">
- <eStructuralFeatures xsi:type="ecore:EReference" name="categories" upperBound="-1"
- eType="#//Category" containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="suppliers" upperBound="-1"
- eType="#//Supplier" containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="purchaseOrders" upperBound="-1"
- eType="#//PurchaseOrder" containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="customers" upperBound="-1"
- eType="#//Customer" containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="salesOrders" upperBound="-1"
- eType="#//SalesOrder" containment="true"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Customer">
+ <eClassifiers xsi:type="ecore:EClass" name="Product">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="salesOrders" upperBound="-1"
- eType="#//SalesOrder" eOpposite="#//SalesOrder/customer"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="SalesOrder">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="customer" eType="#//Customer"
- eOpposite="#//Customer/salesOrders"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="orderDetails" upperBound="-1"
+ eType="#//OrderDetail" eOpposite="#//OrderDetail/product"/>
</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
new file mode 100644
index 0000000..570dfa6
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Address.java
@@ -0,0 +1,110 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.emf.cdo.tests.model1;
+
+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>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getAddress()
+ * @model
+ * @extends CDOObject
+ * @generated
+ */
+public interface Address extends CDOObject
+{
+ /**
+ * 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()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Address#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * 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()
+ * @model
+ * @generated
+ */
+ String getStreet();
+
+ /**
+ * 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.
+ * @see #getStreet()
+ * @generated
+ */
+ void setStreet(String value);
+
+ /**
+ * 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()
+ * @model
+ * @generated
+ */
+ String getCity();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Address#getCity <em>City</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>City</em>' attribute.
+ * @see #getCity()
+ * @generated
+ */
+ void setCity(String value);
+
+} // Address
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 b00bd7f..c7ec2d4 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
@@ -13,15 +13,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
@@ -47,28 +48,24 @@ public interface Category extends CDOObject
String getName();
/**
- * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Category#getName <em>Name</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Name</em>' attribute.
+ * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Category#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
* @see #getName()
* @generated
*/
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.
+ * @return the value of the '<em>Categories</em>' containment reference list.
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCategory_Categories()
* @model containment="true"
* @generated
@@ -76,17 +73,15 @@ 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.
+ * @return the value of the '<em>Products</em>' containment reference list.
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCategory_Products()
* @model containment="true"
* @generated
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 8f6985d..7196781 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
@@ -13,36 +13,34 @@ 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#getPurchaseOrders <em>Purchase Orders</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#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
- * @extends CDOObject
* @generated
*/
-public interface Company extends CDOObject
+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.
+ * @return the value of the '<em>Categories</em>' containment reference list.
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCompany_Categories()
* @model containment="true"
* @generated
@@ -50,17 +48,15 @@ public interface Company extends CDOObject
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.
+ * @return the value of the '<em>Suppliers</em>' containment reference list.
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCompany_Suppliers()
* @model containment="true"
* @generated
@@ -88,17 +84,15 @@ public interface Company extends CDOObject
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.
+ * @return the value of the '<em>Customers</em>' containment reference list.
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCompany_Customers()
* @model containment="true"
* @generated
@@ -106,18 +100,16 @@ public interface Company extends CDOObject
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.
+ * @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"
* @generated
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 876628f..e875ed2 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
@@ -13,61 +13,30 @@ 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#getName <em>Name</em>}</li>
- * <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
- * @extends CDOObject
* @generated
*/
-public interface Customer extends CDOObject
+public interface Customer extends Address
{
/**
- * 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#getCustomer_Name()
- * @model
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Customer#getName <em>Name</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
- /**
- * 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 d31786c..b47910c 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,24 +11,32 @@ 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 --> <!--
+ * 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>Supplier</em>'. <!-- begin-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 -->
- *
* @return a new object of class '<em>Supplier</em>'.
* @generated
*/
@@ -53,42 +61,51 @@ public interface Model1Factory extends EFactory
OrderDetail createOrderDetail();
/**
- * Returns a new object of class '<em>Product</em>'. <!-- begin-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
+ * 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
+ * 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
+ * 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 -->
+ * @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 -->
*
@@ -98,9 +115,9 @@ public interface Model1Factory extends EFactory
SalesOrder createSalesOrder();
/**
- * Returns the package supported by this factory. <!-- begin-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 d09f891..7676fb7 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
@@ -21,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
@@ -29,145 +28,252 @@ 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 --> <!--
+ * The singleton instance of the package.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
*/
Model1Package eINSTANCE = org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl.init();
/**
- * 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()
+ * 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
*/
- int SUPPLIER = 0;
+ 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 SUPPLIER__NAME = 0;
+ int ADDRESS__NAME = 0;
/**
- * The number of structural features of the '<em>Supplier</em>' class.
- * <!-- 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_FEATURE_COUNT = 1;
+ int ADDRESS__STREET = 1;
/**
- * 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 feature id for the '<em><b>City</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ADDRESS__CITY = 2;
+
+ /**
+ * The number of structural features of the '<em>Address</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ADDRESS_FEATURE_COUNT = 3;
+
+ /**
+ * 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
+ */
+ 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 -->
* @see org.eclipse.emf.cdo.tests.model1.impl.PurchaseOrderImpl
* @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getPurchaseOrder()
* @generated
*/
- int PURCHASE_ORDER = 1;
+ int PURCHASE_ORDER = 6;
/**
- * The feature id for the '<em><b>Date</b></em>' attribute. <!--
- * 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
+ */
+ int ORDER_DETAIL = 5;
+
+ /**
+ * 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
+ */
+ int PRODUCT = 9;
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Address <em>Address</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Address</em>'.
+ * @see org.eclipse.emf.cdo.tests.model1.Address
+ * @generated
+ */
+ EClass getAddress();
+
+ /**
+ * 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()
+ * @generated
+ */
+ EAttribute getAddress_Name();
+
+ /**
+ * 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()
+ * @generated
+ */
+ EAttribute getAddress_Street();
+
+ /**
+ * 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()
+ * @generated
+ */
+ EAttribute getAddress_City();
+
+ /**
+ * 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
+ */
+ int CATEGORY = 8;
+
+ /**
+ * 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
+ */
+ int COMPANY = 1;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
* @ordered
*/
- int PURCHASE_ORDER__DATE = 0;
+ int COMPANY__NAME = ADDRESS__NAME;
/**
- * The feature id for the '<em><b>Supplier</b></em>' reference. <!--
- * 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 PURCHASE_ORDER__SUPPLIER = 1;
+ int COMPANY__STREET = ADDRESS__STREET;
/**
- * The number of structural features of the '<em>Purchase Order</em>'
- * class. <!-- 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 PURCHASE_ORDER_FEATURE_COUNT = 2;
+ int COMPANY__CITY = ADDRESS__CITY;
/**
- * 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()
+ * The feature id for the '<em><b>Categories</b></em>' containment reference list.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
+ * @ordered
*/
- int ORDER_DETAIL = 2;
+ int COMPANY__CATEGORIES = ADDRESS_FEATURE_COUNT + 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>Suppliers</b></em>' containment reference list.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
- int ORDER_DETAIL__PRODUCT = 0;
+ int COMPANY__SUPPLIERS = ADDRESS_FEATURE_COUNT + 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>Customers</b></em>' containment reference list.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
* @ordered
*/
- int ORDER_DETAIL__PRICE = 1;
+ int COMPANY__CUSTOMERS = ADDRESS_FEATURE_COUNT + 2;
/**
- * The number of structural features of the '<em>Order Detail</em>' class.
+ * The feature id for the '<em><b>Purchase Orders</b></em>' containment reference list.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
- int ORDER_DETAIL_FEATURE_COUNT = 2;
+ int COMPANY__PURCHASE_ORDERS = ADDRESS_FEATURE_COUNT + 3;
/**
- * 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 -->
+ * The feature id for the '<em><b>Sales Orders</b></em>' containment reference list.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMPANY__SALES_ORDERS = ADDRESS_FEATURE_COUNT + 4;
+
+ /**
+ * The number of structural features of the '<em>Company</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
+ * @ordered
*/
- int PRODUCT = 3;
+ int COMPANY_FEATURE_COUNT = ADDRESS_FEATURE_COUNT + 5;
/**
* The feature id for the '<em><b>Name</b></em>' attribute. <!--
@@ -176,35 +282,51 @@ public interface Model1Package extends EPackage
* @generated
* @ordered
*/
- int PRODUCT__NAME = 0;
+ int SUPPLIER__NAME = ADDRESS__NAME;
/**
- * The feature id for the '<em><b>Order Details</b></em>' reference list.
- * <!-- 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 PRODUCT__ORDER_DETAILS = 1;
+ int SUPPLIER__STREET = ADDRESS__STREET;
/**
- * The number of structural features of the '<em>Product</em>' class. <!--
- * 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 PRODUCT_FEATURE_COUNT = 2;
+ int SUPPLIER__CITY = ADDRESS__CITY;
/**
- * 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()
+ * The feature id for the '<em><b>Purchase Orders</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUPPLIER__PURCHASE_ORDERS = ADDRESS_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Supplier</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
+ * @ordered
*/
- int CATEGORY = 4;
+ int SUPPLIER_FEATURE_COUNT = ADDRESS_FEATURE_COUNT + 1;
+
+ /**
+ * 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
+ */
+ int CUSTOMER = 3;
/**
* The feature id for the '<em><b>Name</b></em>' attribute. <!--
@@ -213,140 +335,143 @@ public interface Model1Package extends EPackage
* @generated
* @ordered
*/
- int CATEGORY__NAME = 0;
+ int CUSTOMER__NAME = ADDRESS__NAME;
/**
- * The feature id for the '<em><b>Categories</b></em>' containment
- * reference list. <!-- 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 CATEGORY__CATEGORIES = 1;
+ int CUSTOMER__STREET = ADDRESS__STREET;
/**
- * The feature id for the '<em><b>Products</b></em>' containment
- * reference list. <!-- 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 CATEGORY__PRODUCTS = 2;
+ int CUSTOMER__CITY = ADDRESS__CITY;
/**
- * The number of structural features of the '<em>Category</em>' class.
+ * The feature id for the '<em><b>Sales Orders</b></em>' reference list.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
- int CATEGORY_FEATURE_COUNT = 3;
+ int CUSTOMER__SALES_ORDERS = ADDRESS_FEATURE_COUNT + 0;
/**
- * 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()
+ * The number of structural features of the '<em>Customer</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
+ * @ordered
*/
- int COMPANY = 5;
+ int CUSTOMER_FEATURE_COUNT = ADDRESS_FEATURE_COUNT + 1;
/**
- * The feature id for the '<em><b>Categories</b></em>' containment
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The meta object id 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
- * @ordered
*/
- int COMPANY__CATEGORIES = 0;
+ int ORDER = 4;
/**
- * The feature id for the '<em><b>Suppliers</b></em>' containment
- * reference list. <!-- begin-user-doc --> <!-- end-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 COMPANY__SUPPLIERS = 1;
+ int ORDER__ORDER_DETAILS = 0;
/**
- * The feature id for the '<em><b>Purchase Orders</b></em>' containment
- * reference list. <!-- 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
*/
- int COMPANY__PURCHASE_ORDERS = 2;
+ int ORDER_FEATURE_COUNT = 1;
/**
- * The feature id for the '<em><b>Customers</b></em>' containment
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The feature id for the '<em><b>Order</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
* @ordered
*/
- int COMPANY__CUSTOMERS = 3;
+ int ORDER_DETAIL__ORDER = 0;
/**
- * The feature id for the '<em><b>Sales Orders</b></em>' containment
- * reference list. <!-- 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 COMPANY__SALES_ORDERS = 4;
+ int ORDER_DETAIL__PRODUCT = 1;
/**
- * The number of structural features of the '<em>Company</em>' class. <!--
+ * The feature id for the '<em><b>Price</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
* @generated
* @ordered
*/
- int COMPANY_FEATURE_COUNT = 5;
+ int ORDER_DETAIL__PRICE = 2;
/**
- * 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()
+ * The number of structural features of the '<em>Order Detail</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
+ * @ordered
*/
- int CUSTOMER = 6;
+ int ORDER_DETAIL_FEATURE_COUNT = 3;
/**
- * The feature id for the '<em><b>Name</b></em>' attribute. <!--
+ * 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 -->
*
* @generated
* @ordered
*/
- int CUSTOMER__NAME = 0;
+ int PURCHASE_ORDER__DATE = ORDER_FEATURE_COUNT + 0;
/**
- * The feature id for the '<em><b>Sales Orders</b></em>' reference list.
- * <!-- 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 CUSTOMER__SALES_ORDERS = 1;
+ int PURCHASE_ORDER__SUPPLIER = ORDER_FEATURE_COUNT + 1;
/**
- * The number of structural features of the '<em>Customer</em>' class.
+ * The number of structural features of the '<em>Purchase Order</em>' class.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
* @ordered
*/
- int CUSTOMER_FEATURE_COUNT = 2;
+ 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
@@ -354,13 +479,22 @@ 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 -->
+ * <!-- 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 -->
*
* @generated
* @ordered
*/
- int SALES_ORDER__ID = 0;
+ int SALES_ORDER__ID = ORDER_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Customer</b></em>' reference. <!--
@@ -369,21 +503,78 @@ public interface Model1Package extends EPackage
* @generated
* @ordered
*/
- int SALES_ORDER__CUSTOMER = 1;
+ int SALES_ORDER__CUSTOMER = ORDER_FEATURE_COUNT + 1;
/**
* 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 -->
*
* @generated
* @ordered
*/
- int SALES_ORDER_FEATURE_COUNT = 2;
+ int CATEGORY__NAME = 0;
/**
- * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Supplier <em>Supplier</em>}'.
+ * 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 --> <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CATEGORY__PRODUCTS = 2;
+
+ /**
+ * The number of structural features of the '<em>Category</em>' class.
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CATEGORY_FEATURE_COUNT = 3;
+
+ /**
+ * 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 --> <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PRODUCT__ORDER_DETAILS = 1;
+
+ /**
+ * The number of structural features of the '<em>Product</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
*
+ * @generated
+ * @ordered
+ */
+ int PRODUCT_FEATURE_COUNT = 2;
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Supplier <em>Supplier</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @return the meta object for class '<em>Supplier</em>'.
* @see org.eclipse.emf.cdo.tests.model1.Supplier
* @generated
@@ -391,20 +582,19 @@ public interface Model1Package extends EPackage
EClass getSupplier();
/**
- * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Supplier#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.Supplier#getName()
+ * 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()
* @generated
*/
- EAttribute getSupplier_Name();
+ EReference getSupplier_PurchaseOrders();
/**
* 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
@@ -414,7 +604,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()
@@ -425,7 +614,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()
@@ -436,7 +624,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
@@ -444,9 +631,19 @@ public interface Model1Package extends EPackage
EClass getOrderDetail();
/**
+ * 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()
+ * @generated
+ */
+ EReference getOrderDetail_Order();
+
+ /**
* 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()
@@ -457,7 +654,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()
@@ -468,7 +664,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Product <em>Product</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for class '<em>Product</em>'.
* @see org.eclipse.emf.cdo.tests.model1.Product
* @generated
@@ -478,7 +673,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()
@@ -489,7 +683,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()
@@ -500,7 +693,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Category <em>Category</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for class '<em>Category</em>'.
* @see org.eclipse.emf.cdo.tests.model1.Category
* @generated
@@ -510,7 +702,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()
@@ -521,7 +712,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()
@@ -532,7 +722,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()
@@ -543,7 +732,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Company <em>Company</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for class '<em>Company</em>'.
* @see org.eclipse.emf.cdo.tests.model1.Company
* @generated
@@ -553,7 +741,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()
@@ -564,7 +751,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()
@@ -575,7 +761,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()
@@ -586,7 +771,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()
@@ -597,7 +781,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()
@@ -608,7 +791,6 @@ public interface Model1Package extends EPackage
/**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Customer <em>Customer</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @return the meta object for class '<em>Customer</em>'.
* @see org.eclipse.emf.cdo.tests.model1.Customer
* @generated
@@ -616,20 +798,8 @@ public interface Model1Package extends EPackage
EClass getCustomer();
/**
- * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Customer#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.Customer#getName()
- * @see #getCustomer()
- * @generated
- */
- EAttribute getCustomer_Name();
-
- /**
* 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()
@@ -638,9 +808,29 @@ public interface Model1Package extends EPackage
EReference getCustomer_SalesOrders();
/**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Order <em>Order</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Order</em>'.
+ * @see org.eclipse.emf.cdo.tests.model1.Order
+ * @generated
+ */
+ EClass getOrder();
+
+ /**
+ * 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()
+ * @generated
+ */
+ EReference getOrder_OrderDetails();
+
+ /**
* 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
@@ -650,7 +840,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()
@@ -661,7 +850,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()
@@ -688,15 +876,47 @@ 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.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.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
+ */
+ EClass ADDRESS = eINSTANCE.getAddress();
+
+ /**
+ * 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 -->
+ * <!-- 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 -->
+ * <!-- 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 -->
* @see org.eclipse.emf.cdo.tests.model1.impl.SupplierImpl
* @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getSupplier()
* @generated
@@ -704,17 +924,16 @@ public interface Model1Package extends EPackage
EClass SUPPLIER = eINSTANCE.getSupplier();
/**
- * The meta object literal for the '<em><b>Name</b></em>' attribute
- * feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The meta object literal for the '<em><b>Purchase Orders</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
- EAttribute SUPPLIER__NAME = eINSTANCE.getSupplier_Name();
+ 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
@@ -722,25 +941,22 @@ 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 --> <!-- end-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 --> <!-- end-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
@@ -748,25 +964,30 @@ public interface Model1Package extends EPackage
EClass ORDER_DETAIL = eINSTANCE.getOrderDetail();
/**
- * The meta object literal for the '<em><b>Product</b></em>' reference
- * feature. <!-- begin-user-doc --> <!-- end-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 --> <!-- 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 --> <!-- end-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
@@ -774,25 +995,22 @@ 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 --> <!-- end-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 --> <!-- end-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 '{@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
@@ -800,35 +1018,31 @@ 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 --> <!-- end-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();
/**
- * The meta object literal for the '<em><b>Categories</b></em>'
- * containment reference list feature. <!-- begin-user-doc --> <!--
+ * The meta object literal for the '<em><b>Categories</b></em>' containment reference list feature.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
*/
EReference CATEGORY__CATEGORIES = eINSTANCE.getCategory_Categories();
/**
- * The meta object literal for the '<em><b>Products</b></em>'
- * containment reference list feature. <!-- begin-user-doc --> <!--
+ * The meta object literal for the '<em><b>Products</b></em>' containment reference list feature.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
*/
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
@@ -836,54 +1050,48 @@ public interface Model1Package extends EPackage
EClass COMPANY = eINSTANCE.getCompany();
/**
- * The meta object literal for the '<em><b>Categories</b></em>'
- * containment reference list feature. <!-- begin-user-doc --> <!--
+ * The meta object literal for the '<em><b>Categories</b></em>' containment reference list feature.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
*/
EReference COMPANY__CATEGORIES = eINSTANCE.getCompany_Categories();
/**
- * The meta object literal for the '<em><b>Suppliers</b></em>'
- * containment reference list feature. <!-- begin-user-doc --> <!--
+ * The meta object literal for the '<em><b>Suppliers</b></em>' containment reference list feature.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
*/
EReference COMPANY__SUPPLIERS = eINSTANCE.getCompany_Suppliers();
/**
- * The meta object literal for the '<em><b>Purchase Orders</b></em>'
- * containment reference list feature. <!-- begin-user-doc --> <!--
+ * The meta object literal for the '<em><b>Purchase Orders</b></em>' containment reference list feature.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
*/
EReference COMPANY__PURCHASE_ORDERS = eINSTANCE.getCompany_PurchaseOrders();
/**
- * The meta object literal for the '<em><b>Customers</b></em>'
- * containment reference list feature. <!-- begin-user-doc --> <!--
+ * The meta object literal for the '<em><b>Customers</b></em>' containment reference list feature.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
*/
EReference COMPANY__CUSTOMERS = eINSTANCE.getCompany_Customers();
/**
- * The meta object literal for the '<em><b>Sales Orders</b></em>'
- * containment reference list feature. <!-- begin-user-doc --> <!--
+ * The meta object literal for the '<em><b>Sales Orders</b></em>' containment reference list feature.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
*/
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
@@ -891,25 +1099,33 @@ public interface Model1Package extends EPackage
EClass CUSTOMER = eINSTANCE.getCustomer();
/**
- * The meta object literal for the '<em><b>Name</b></em>' attribute
- * feature. <!-- begin-user-doc --> <!-- end-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();
+
+ /**
+ * 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
*/
- EAttribute CUSTOMER__NAME = eINSTANCE.getCustomer_Name();
+ EClass ORDER = eINSTANCE.getOrder();
/**
- * The meta object literal for the '<em><b>Sales Orders</b></em>'
- * reference list feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The meta object literal for the '<em><b>Order Details</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
- EReference CUSTOMER__SALES_ORDERS = eINSTANCE.getCustomer_SalesOrders();
+ 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
@@ -917,17 +1133,15 @@ 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 --> <!-- end-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 --> <!-- end-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
new file mode 100644
index 0000000..3383697
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Order.java
@@ -0,0 +1,50 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.emf.cdo.tests.model1;
+
+import org.eclipse.emf.cdo.CDOObject;
+
+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>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrder()
+ * @model
+ * @extends CDOObject
+ * @generated
+ */
+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>}'.
+ * <!-- 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
+ * @model opposite="order" containment="true"
+ * @generated
+ */
+ EList<OrderDetail> getOrderDetails();
+
+} // Order
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 e2e69fe..de08237 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
@@ -11,14 +11,16 @@ import org.eclipse.emf.cdo.CDOObject;
/**
* <!-- begin-user-doc --> A representation of the model object '<em><b>Order Detail</b></em>'.
* <!-- end-user-doc -->
+ *
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getProduct <em>Product</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getPrice <em>Price</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getOrder <em>Order</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getProduct <em>Product</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getPrice <em>Price</em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrderDetail()
* @model
* @extends CDOObject
@@ -27,15 +29,42 @@ import org.eclipse.emf.cdo.CDOObject;
public interface OrderDetail extends CDOObject
{
/**
- * 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>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()
+ * @see org.eclipse.emf.cdo.tests.model1.Order#getOrderDetails
+ * @model opposite="orderDetails" required="true" transient="false"
+ * @generated
+ */
+ 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.
+ * @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>}'.
* <!-- 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()
@@ -46,11 +75,9 @@ 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
*/
@@ -74,11 +101,9 @@ public interface OrderDetail extends CDOObject
float getPrice();
/**
- * 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.
+ * 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.
* @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 ce5d30c..7e5ebbe 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
@@ -13,14 +13,15 @@ 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>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getProduct()
* @model
* @extends CDOObject
@@ -46,28 +47,24 @@ public interface Product extends CDOObject
String getName();
/**
- * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Product#getName <em>Name</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Name</em>' attribute.
+ * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Product#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
* @see #getName()
* @generated
*/
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
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 4955f51..93dbecf 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
@@ -13,20 +13,20 @@ import java.util.Date;
/**
* <!-- begin-user-doc --> A representation of the model object '<em><b>Purchase Order</b></em>'.
* <!-- end-user-doc -->
+ *
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getDate <em>Date</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getSupplier <em>Supplier</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getDate <em>Date</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getSupplier <em>Supplier</em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getPurchaseOrder()
* @model
- * @extends CDOObject
* @generated
*/
-public interface PurchaseOrder extends CDOObject
+public interface PurchaseOrder extends Order
{
/**
* Returns the value of the '<em><b>Date</b></em>' attribute. <!--
@@ -46,11 +46,9 @@ public interface PurchaseOrder extends CDOObject
Date getDate();
/**
- * 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.
+ * 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.
* @see #getDate()
* @generated
*/
@@ -74,11 +72,9 @@ public interface PurchaseOrder extends CDOObject
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 610b57b..c1f9d2d 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
@@ -11,20 +11,20 @@ import org.eclipse.emf.cdo.CDOObject;
/**
* <!-- begin-user-doc --> A representation of the model object '<em><b>Sales Order</b></em>'.
* <!-- end-user-doc -->
+ *
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getId <em>Id</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getCustomer <em>Customer</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getId <em>Id</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getCustomer <em>Customer</em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.emf.cdo.tests.model1.Model1Package#getSalesOrder()
* @model
- * @extends CDOObject
* @generated
*/
-public interface SalesOrder extends CDOObject
+public interface SalesOrder extends Order
{
/**
* Returns the value of the '<em><b>Id</b></em>' attribute. <!--
@@ -44,41 +44,36 @@ public interface SalesOrder extends CDOObject
int getId();
/**
- * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getId <em>Id</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Id</em>' attribute.
+ * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getId <em>Id</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @param value the new value of the '<em>Id</em>' attribute.
* @see #getId()
* @generated
*/
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()
* @see org.eclipse.emf.cdo.tests.model1.Customer#getSalesOrders
- * @model opposite="salesOrders"
+ * @model opposite="salesOrders" required="true"
* @generated
*/
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 167e085..655154b 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
@@ -6,51 +6,42 @@
*/
package org.eclipse.emf.cdo.tests.model1;
+import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.cdo.CDOObject;
/**
* <!-- 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#getName <em>Name</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
- * @extends CDOObject
* @generated
*/
-public interface Supplier extends CDOObject
+public interface Supplier extends Address
{
/**
- * Returns the value of the '<em><b>Name</b></em>' attribute. <!--
- * begin-user-doc -->
+ * 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>Name</em>' attribute isn't clear, there
- * really should be more of a description here...
+ * 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>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getSupplier_Name()
- * @model
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Supplier#getName <em>Name</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Name</em>' attribute.
- * @see #getName()
+ * @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
+ * @model opposite="supplier"
* @generated
*/
- void setName(String value);
+ EList<PurchaseOrder> getPurchaseOrders();
} // Supplier
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
new file mode 100644
index 0000000..5f0709c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/AddressImpl.java
@@ -0,0 +1,125 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.emf.cdo.tests.model1.impl;
+
+import org.eclipse.emf.cdo.tests.model1.Address;
+import org.eclipse.emf.cdo.tests.model1.Model1Package;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.internal.cdo.CDOObjectImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Address</b></em>'.
+ * <!-- end-user-doc -->
+ * <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>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class AddressImpl extends CDOObjectImpl implements Address
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AddressImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return Model1Package.Literals.ADDRESS;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected int eStaticFeatureCount()
+ {
+ return 0;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return (String)eGet(Model1Package.Literals.ADDRESS__NAME, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName)
+ {
+ eSet(Model1Package.Literals.ADDRESS__NAME, newName);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getStreet()
+ {
+ return (String)eGet(Model1Package.Literals.ADDRESS__STREET, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setStreet(String newStreet)
+ {
+ eSet(Model1Package.Literals.ADDRESS__STREET, newStreet);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getCity()
+ {
+ return (String)eGet(Model1Package.Literals.ADDRESS__CITY, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCity(String newCity)
+ {
+ eSet(Model1Package.Literals.ADDRESS__CITY, newCity);
+ }
+
+} //AddressImpl
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 4209e58..e5fb16b 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.internal.cdo.CDOObjectImpl;
* <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 919f453..01e8981 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
@@ -24,21 +24,20 @@ import org.eclipse.emf.internal.cdo.CDOObjectImpl;
* <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#getPurchaseOrders <em>Purchase Orders</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#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 CDOObjectImpl implements Company
+public class CompanyImpl extends AddressImpl implements Company
{
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
protected CompanyImpl()
@@ -48,7 +47,6 @@ public class CompanyImpl extends CDOObjectImpl implements Company
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -59,18 +57,6 @@ public class CompanyImpl extends CDOObjectImpl implements Company
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected int eStaticFeatureCount()
- {
- return 0;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
@@ -81,7 +67,6 @@ public class CompanyImpl extends CDOObjectImpl implements Company
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
@@ -92,7 +77,6 @@ public class CompanyImpl extends CDOObjectImpl implements Company
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
@@ -103,7 +87,6 @@ public class CompanyImpl extends CDOObjectImpl implements Company
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
@@ -114,7 +97,6 @@ public class CompanyImpl extends CDOObjectImpl 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 af95dbe..a141c07 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
@@ -20,18 +20,16 @@ import org.eclipse.emf.internal.cdo.CDOObjectImpl;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.CustomerImpl#getName <em>Name</em>}</li>
- * <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 CDOObjectImpl implements Customer
+public class CustomerImpl extends AddressImpl implements Customer
{
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
protected CustomerImpl()
@@ -41,7 +39,6 @@ public class CustomerImpl extends CDOObjectImpl implements Customer
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -52,38 +49,6 @@ public class CustomerImpl extends CDOObjectImpl implements Customer
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected int eStaticFeatureCount()
- {
- return 0;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String getName()
- {
- return (String)eGet(Model1Package.Literals.CUSTOMER__NAME, true);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setName(String newName)
- {
- eSet(Model1Package.Literals.CUSTOMER__NAME, newName);
- }
-
- /**
- * <!-- 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 2ff4386..11b89eb 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.Category;
import org.eclipse.emf.cdo.tests.model1.Company;
import org.eclipse.emf.cdo.tests.model1.Customer;
@@ -26,23 +27,21 @@ 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 --> <!--
+ * 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,9 +55,9 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
}
/**
- * Creates an instance of the factory. <!-- begin-user-doc --> <!--
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
*/
public Model1FactoryImpl()
@@ -68,7 +67,6 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -76,30 +74,34 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
{
switch (eClass.getClassifierID())
{
- case Model1Package.SUPPLIER:
- return (EObject)createSupplier();
- case Model1Package.PURCHASE_ORDER:
- return (EObject)createPurchaseOrder();
- case Model1Package.ORDER_DETAIL:
- return (EObject)createOrderDetail();
- case Model1Package.PRODUCT:
- return (EObject)createProduct();
- case Model1Package.CATEGORY:
- return (EObject)createCategory();
- case Model1Package.COMPANY:
- return (EObject)createCompany();
- case Model1Package.CUSTOMER:
- return (EObject)createCustomer();
- case Model1Package.SALES_ORDER:
- return (EObject)createSalesOrder();
- 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
+ */
+ public Address createAddress()
+ {
+ AddressImpl address = new AddressImpl();
+ return address;
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Supplier createSupplier()
@@ -110,7 +112,6 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public PurchaseOrder createPurchaseOrder()
@@ -121,7 +122,6 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public OrderDetail createOrderDetail()
@@ -132,7 +132,6 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Product createProduct()
@@ -143,7 +142,6 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Category createCategory()
@@ -154,7 +152,6 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Company createCompany()
@@ -165,7 +162,6 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Customer createCustomer()
@@ -175,8 +171,18 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Order createOrder()
+ {
+ OrderImpl order = new OrderImpl();
+ return order;
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public SalesOrder createSalesOrder()
@@ -187,7 +193,6 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Model1Package getModel1Package()
@@ -197,7 +202,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 6b438dc..640e40b 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
@@ -6,11 +6,13 @@
*/
package org.eclipse.emf.cdo.tests.model1.impl;
+import org.eclipse.emf.cdo.tests.model1.Address;
import org.eclipse.emf.cdo.tests.model1.Category;
import org.eclipse.emf.cdo.tests.model1.Company;
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;
@@ -26,63 +28,68 @@ 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 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;
@@ -109,27 +116,26 @@ 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 --> <!-- end-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()
@@ -137,13 +143,10 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
*/
public static Model1Package init()
{
- if (isInited)
- return (Model1Package)EPackage.Registry.INSTANCE.getEPackage(Model1Package.eNS_URI);
+ 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;
@@ -160,8 +163,47 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getAddress()
+ {
+ return addressEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getAddress_Name()
+ {
+ return (EAttribute)addressEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getAddress_Street()
+ {
+ return (EAttribute)addressEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getAddress_City()
+ {
+ return (EAttribute)addressEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EClass getSupplier()
@@ -170,18 +212,17 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
}
/**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
- public EAttribute getSupplier_Name()
+ public EReference getSupplier_PurchaseOrders()
{
- return (EAttribute)supplierEClass.getEStructuralFeatures().get(0);
+ return (EReference)supplierEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EClass getPurchaseOrder()
@@ -191,7 +232,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EAttribute getPurchaseOrder_Date()
@@ -201,7 +241,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getPurchaseOrder_Supplier()
@@ -211,7 +250,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EClass getOrderDetail()
@@ -220,28 +258,35 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getOrderDetail_Order()
+ {
+ return (EReference)orderDetailEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getOrderDetail_Product()
{
- return (EReference)orderDetailEClass.getEStructuralFeatures().get(0);
+ return (EReference)orderDetailEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EAttribute getOrderDetail_Price()
{
- return (EAttribute)orderDetailEClass.getEStructuralFeatures().get(1);
+ return (EAttribute)orderDetailEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EClass getProduct()
@@ -251,7 +296,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EAttribute getProduct_Name()
@@ -261,7 +305,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getProduct_OrderDetails()
@@ -271,7 +314,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EClass getCategory()
@@ -281,7 +323,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EAttribute getCategory_Name()
@@ -291,7 +332,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getCategory_Categories()
@@ -301,7 +341,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getCategory_Products()
@@ -311,7 +350,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EClass getCompany()
@@ -321,7 +359,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getCompany_Categories()
@@ -331,7 +368,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getCompany_Suppliers()
@@ -341,27 +377,24 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getCompany_PurchaseOrders()
{
- return (EReference)companyEClass.getEStructuralFeatures().get(2);
+ return (EReference)companyEClass.getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getCompany_Customers()
{
- return (EReference)companyEClass.getEStructuralFeatures().get(3);
+ return (EReference)companyEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getCompany_SalesOrders()
@@ -371,7 +404,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EClass getCustomer()
@@ -381,27 +413,35 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
- public EAttribute getCustomer_Name()
+ public EReference getCustomer_SalesOrders()
{
- return (EAttribute)customerEClass.getEStructuralFeatures().get(0);
+ return (EReference)customerEClass.getEStructuralFeatures().get(0);
}
/**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
- public EReference getCustomer_SalesOrders()
+ public EClass getOrder()
+ {
+ return orderEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getOrder_OrderDetails()
{
- return (EReference)customerEClass.getEStructuralFeatures().get(1);
+ return (EReference)orderEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EClass getSalesOrder()
@@ -411,7 +451,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EAttribute getSalesOrder_Id()
@@ -421,7 +460,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EReference getSalesOrder_Customer()
@@ -431,7 +469,6 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Model1Factory getModel1Factory()
@@ -441,64 +478,69 @@ 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 -->
+ * 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()
{
- if (isCreated)
- return;
+ if (isCreated) return;
isCreated = true;
// Create classes and their features
- supplierEClass = createEClass(SUPPLIER);
- createEAttribute(supplierEClass, SUPPLIER__NAME);
-
- purchaseOrderEClass = createEClass(PURCHASE_ORDER);
- createEAttribute(purchaseOrderEClass, PURCHASE_ORDER__DATE);
- createEReference(purchaseOrderEClass, PURCHASE_ORDER__SUPPLIER);
-
- orderDetailEClass = createEClass(ORDER_DETAIL);
- createEReference(orderDetailEClass, ORDER_DETAIL__PRODUCT);
- createEAttribute(orderDetailEClass, ORDER_DETAIL__PRICE);
-
- productEClass = createEClass(PRODUCT);
- createEAttribute(productEClass, PRODUCT__NAME);
- createEReference(productEClass, PRODUCT__ORDER_DETAILS);
-
- categoryEClass = createEClass(CATEGORY);
- createEAttribute(categoryEClass, CATEGORY__NAME);
- createEReference(categoryEClass, CATEGORY__CATEGORIES);
- createEReference(categoryEClass, CATEGORY__PRODUCTS);
+ addressEClass = createEClass(ADDRESS);
+ createEAttribute(addressEClass, ADDRESS__NAME);
+ createEAttribute(addressEClass, ADDRESS__STREET);
+ createEAttribute(addressEClass, ADDRESS__CITY);
companyEClass = createEClass(COMPANY);
createEReference(companyEClass, COMPANY__CATEGORIES);
createEReference(companyEClass, COMPANY__SUPPLIERS);
- createEReference(companyEClass, COMPANY__PURCHASE_ORDERS);
createEReference(companyEClass, COMPANY__CUSTOMERS);
+ createEReference(companyEClass, COMPANY__PURCHASE_ORDERS);
createEReference(companyEClass, COMPANY__SALES_ORDERS);
+ supplierEClass = createEClass(SUPPLIER);
+ createEReference(supplierEClass, SUPPLIER__PURCHASE_ORDERS);
+
customerEClass = createEClass(CUSTOMER);
- createEAttribute(customerEClass, CUSTOMER__NAME);
createEReference(customerEClass, CUSTOMER__SALES_ORDERS);
+ orderEClass = createEClass(ORDER);
+ createEReference(orderEClass, ORDER__ORDER_DETAILS);
+
+ orderDetailEClass = createEClass(ORDER_DETAIL);
+ createEReference(orderDetailEClass, ORDER_DETAIL__ORDER);
+ createEReference(orderDetailEClass, ORDER_DETAIL__PRODUCT);
+ createEAttribute(orderDetailEClass, ORDER_DETAIL__PRICE);
+
+ purchaseOrderEClass = createEClass(PURCHASE_ORDER);
+ createEAttribute(purchaseOrderEClass, PURCHASE_ORDER__DATE);
+ createEReference(purchaseOrderEClass, PURCHASE_ORDER__SUPPLIER);
+
salesOrderEClass = createEClass(SALES_ORDER);
createEAttribute(salesOrderEClass, SALES_ORDER__ID);
createEReference(salesOrderEClass, SALES_ORDER__CUSTOMER);
+
+ categoryEClass = createEClass(CATEGORY);
+ createEAttribute(categoryEClass, CATEGORY__NAME);
+ createEReference(categoryEClass, CATEGORY__CATEGORIES);
+ createEReference(categoryEClass, CATEGORY__PRODUCTS);
+
+ productEClass = createEClass(PRODUCT);
+ createEAttribute(productEClass, PRODUCT__NAME);
+ createEReference(productEClass, PRODUCT__ORDER_DETAILS);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
private boolean isInitialized = false;
@@ -512,8 +554,7 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
*/
public void initializePackageContents()
{
- if (isInitialized)
- return;
+ if (isInitialized) return;
isInitialized = true;
// Initialize package
@@ -526,76 +567,55 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
// Set bounds for type parameters
// Add supertypes to classes
+ companyEClass.getESuperTypes().add(this.getAddress());
+ supplierEClass.getESuperTypes().add(this.getAddress());
+ customerEClass.getESuperTypes().add(this.getAddress());
+ purchaseOrderEClass.getESuperTypes().add(this.getOrder());
+ salesOrderEClass.getESuperTypes().add(this.getOrder());
// 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);
+
+ 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);
+
initEClass(supplierEClass, Supplier.class, "Supplier", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getSupplier_Name(), ecorePackage.getEString(), "name", null, 0, 1, Supplier.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(), null, "supplier", null, 0, 1, PurchaseOrder.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_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);
+ 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(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);
+ 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);
- 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);
+ 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(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_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_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_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(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(customerEClass, Customer.class, "Customer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getCustomer_Name(), ecorePackage.getEString(), "name", null, 0, 1, Customer.class, !IS_TRANSIENT,
- !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, 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(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, 0,
- 1, SalesOrder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
- !IS_UNSETTABLE, 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);
+
+ 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);
// 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 ff00f24..0e4a609 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
@@ -7,6 +7,7 @@
package org.eclipse.emf.cdo.tests.model1.impl;
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;
@@ -19,18 +20,18 @@ import org.eclipse.emf.internal.cdo.CDOObjectImpl;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.OrderDetailImpl#getProduct <em>Product</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.OrderDetailImpl#getPrice <em>Price</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.OrderDetailImpl#getOrder <em>Order</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.OrderDetailImpl#getProduct <em>Product</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.OrderDetailImpl#getPrice <em>Price</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class OrderDetailImpl extends CDOObjectImpl implements OrderDetail
{
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
protected OrderDetailImpl()
@@ -40,7 +41,6 @@ public class OrderDetailImpl extends CDOObjectImpl implements OrderDetail
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -51,7 +51,6 @@ public class OrderDetailImpl extends CDOObjectImpl implements OrderDetail
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -61,8 +60,27 @@ public class OrderDetailImpl extends CDOObjectImpl implements OrderDetail
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Order getOrder()
+ {
+ return (Order)eGet(Model1Package.Literals.ORDER_DETAIL__ORDER, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setOrder(Order newOrder)
+ {
+ eSet(Model1Package.Literals.ORDER_DETAIL__ORDER, newOrder);
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Product getProduct()
@@ -72,7 +90,6 @@ public class OrderDetailImpl extends CDOObjectImpl implements OrderDetail
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setProduct(Product newProduct)
@@ -82,7 +99,6 @@ public class OrderDetailImpl extends CDOObjectImpl implements OrderDetail
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public float getPrice()
@@ -92,7 +108,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
new file mode 100644
index 0000000..94b143a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderImpl.java
@@ -0,0 +1,77 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.emf.cdo.tests.model1.impl;
+
+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.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.internal.cdo.CDOObjectImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Order</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <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()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return Model1Package.Literals.ORDER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected int eStaticFeatureCount()
+ {
+ return 0;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EList<OrderDetail> getOrderDetails()
+ {
+ return (EList<OrderDetail>)eGet(Model1Package.Literals.ORDER__ORDER_DETAILS, true);
+ }
+
+} //OrderImpl
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 0e97041..95ee44d 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
@@ -20,18 +20,17 @@ import org.eclipse.emf.internal.cdo.CDOObjectImpl;
* <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>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class ProductImpl extends CDOObjectImpl implements Product
{
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
protected ProductImpl()
@@ -41,7 +40,6 @@ public class ProductImpl extends CDOObjectImpl implements Product
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -52,7 +50,6 @@ public class ProductImpl extends CDOObjectImpl implements Product
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -63,7 +60,6 @@ public class ProductImpl extends CDOObjectImpl implements Product
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public String getName()
@@ -73,7 +69,6 @@ public class ProductImpl extends CDOObjectImpl implements Product
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setName(String newName)
@@ -83,7 +78,6 @@ public class ProductImpl extends CDOObjectImpl implements Product
/**
* <!-- 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/PurchaseOrderImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/PurchaseOrderImpl.java
index 643bb48..f6f8a3c 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
@@ -21,18 +21,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 CDOObjectImpl implements PurchaseOrder
+public class PurchaseOrderImpl extends OrderImpl implements PurchaseOrder
{
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
protected PurchaseOrderImpl()
@@ -42,7 +41,6 @@ public class PurchaseOrderImpl extends CDOObjectImpl implements PurchaseOrder
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -53,18 +51,6 @@ public class PurchaseOrderImpl extends CDOObjectImpl implements PurchaseOrder
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected int eStaticFeatureCount()
- {
- return 0;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Date getDate()
@@ -74,7 +60,6 @@ public class PurchaseOrderImpl extends CDOObjectImpl implements PurchaseOrder
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setDate(Date newDate)
@@ -84,7 +69,6 @@ public class PurchaseOrderImpl extends CDOObjectImpl implements PurchaseOrder
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Supplier getSupplier()
@@ -94,7 +78,6 @@ public class PurchaseOrderImpl extends CDOObjectImpl 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 0589413..7f88c4a 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
@@ -19,18 +19,17 @@ import org.eclipse.emf.internal.cdo.CDOObjectImpl;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.SalesOrderImpl#getId <em>Id</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.SalesOrderImpl#getCustomer <em>Customer</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.SalesOrderImpl#getId <em>Id</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.SalesOrderImpl#getCustomer <em>Customer</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
-public class SalesOrderImpl extends CDOObjectImpl implements SalesOrder
+public class SalesOrderImpl extends OrderImpl implements SalesOrder
{
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
protected SalesOrderImpl()
@@ -40,7 +39,6 @@ public class SalesOrderImpl extends CDOObjectImpl implements SalesOrder
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -51,18 +49,6 @@ public class SalesOrderImpl extends CDOObjectImpl implements SalesOrder
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected int eStaticFeatureCount()
- {
- return 0;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public int getId()
@@ -72,7 +58,6 @@ public class SalesOrderImpl extends CDOObjectImpl implements SalesOrder
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setId(int newId)
@@ -82,7 +67,6 @@ public class SalesOrderImpl extends CDOObjectImpl implements SalesOrder
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Customer getCustomer()
@@ -92,7 +76,6 @@ public class SalesOrderImpl extends CDOObjectImpl 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 4f18a66..4e0a69a 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
@@ -7,8 +7,10 @@
package org.eclipse.emf.cdo.tests.model1.impl;
import org.eclipse.emf.cdo.tests.model1.Model1Package;
+import org.eclipse.emf.cdo.tests.model1.PurchaseOrder;
import org.eclipse.emf.cdo.tests.model1.Supplier;
+import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.internal.cdo.CDOObjectImpl;
@@ -18,17 +20,16 @@ import org.eclipse.emf.internal.cdo.CDOObjectImpl;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.SupplierImpl#getName <em>Name</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 CDOObjectImpl implements Supplier
+public class SupplierImpl extends AddressImpl implements Supplier
{
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
protected SupplierImpl()
@@ -38,7 +39,6 @@ public class SupplierImpl extends CDOObjectImpl implements Supplier
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -48,34 +48,14 @@ public class SupplierImpl extends CDOObjectImpl implements Supplier
}
/**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected int eStaticFeatureCount()
- {
- return 0;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String getName()
- {
- return (String)eGet(Model1Package.Literals.SUPPLIER__NAME, true);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
- public void setName(String newName)
+ @SuppressWarnings("unchecked")
+ public EList<PurchaseOrder> getPurchaseOrders()
{
- eSet(Model1Package.Literals.SUPPLIER__NAME, newName);
+ return (EList<PurchaseOrder>)eGet(Model1Package.Literals.SUPPLIER__PURCHASE_ORDERS, true);
}
} // SupplierImpl
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 80b0092..e59e5a9 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.Category;
import org.eclipse.emf.cdo.tests.model1.Company;
import org.eclipse.emf.cdo.tests.model1.Customer;
@@ -25,23 +26,22 @@ 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 --> <!--
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
*/
public Model1AdapterFactory()
@@ -82,68 +82,69 @@ public class Model1AdapterFactory extends AdapterFactoryImpl
* @generated
*/
protected Model1Switch<Adapter> modelSwitch = new Model1Switch<Adapter>()
- {
- @Override
- public Adapter caseSupplier(Supplier object)
- {
- return createSupplierAdapter();
- }
-
- @Override
- public Adapter casePurchaseOrder(PurchaseOrder object)
- {
- return createPurchaseOrderAdapter();
- }
-
- @Override
- public Adapter caseOrderDetail(OrderDetail object)
- {
- return createOrderDetailAdapter();
- }
-
- @Override
- public Adapter caseProduct(Product object)
- {
- return createProductAdapter();
- }
-
- @Override
- public Adapter caseCategory(Category object)
- {
- return createCategoryAdapter();
- }
-
- @Override
- public Adapter caseCompany(Company object)
- {
- return createCompanyAdapter();
- }
-
- @Override
- public Adapter caseCustomer(Customer object)
{
- return createCustomerAdapter();
- }
-
- @Override
- public Adapter caseSalesOrder(SalesOrder object)
- {
- return createSalesOrderAdapter();
- }
-
- @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 -->
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
- * @param target
- * the object to adapt.
+ * @param target the object to adapt.
* @return the adapter for the <code>target</code>.
* @generated
*/
@@ -154,11 +155,25 @@ 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
+ */
+ public Adapter createAddressAdapter()
+ {
+ return null;
+ }
+
+ /**
* 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
@@ -173,7 +188,6 @@ public class Model1AdapterFactory extends AdapterFactoryImpl
* <!-- 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
@@ -188,7 +202,6 @@ public class Model1AdapterFactory extends AdapterFactoryImpl
* <!-- 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
@@ -203,7 +216,6 @@ public class Model1AdapterFactory extends AdapterFactoryImpl
* <!-- 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
@@ -218,7 +230,6 @@ public class Model1AdapterFactory extends AdapterFactoryImpl
* <!-- 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
@@ -233,7 +244,6 @@ public class Model1AdapterFactory extends AdapterFactoryImpl
* <!-- 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
@@ -248,7 +258,6 @@ public class Model1AdapterFactory extends AdapterFactoryImpl
* <!-- 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
@@ -259,11 +268,25 @@ 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
+ */
+ public Adapter createOrderAdapter()
+ {
+ return null;
+ }
+
+ /**
* 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
@@ -274,9 +297,9 @@ public class Model1AdapterFactory extends AdapterFactoryImpl
}
/**
- * Creates a new adapter for the default case. <!-- begin-user-doc --> This
+ * 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 15d0478..90ca4e2 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
@@ -20,6 +20,7 @@ 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
@@ -28,23 +29,22 @@ import java.util.List;
* 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 --> <!--
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @generated
*/
public Model1Switch()
@@ -56,12 +56,10 @@ 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 --> <!--
+ * 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.
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
public T doSwitch(EObject theEObject)
@@ -70,12 +68,10 @@ 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 --> <!--
+ * 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.
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
protected T doSwitch(EClass theEClass, EObject theEObject)
@@ -87,99 +83,124 @@ 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 --> <!--
+ * 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.
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
protected T doSwitch(int classifierID, EObject theEObject)
{
switch (classifierID)
{
- case Model1Package.SUPPLIER:
- {
- Supplier supplier = (Supplier)theEObject;
- T result = caseSupplier(supplier);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case Model1Package.PURCHASE_ORDER:
- {
- PurchaseOrder purchaseOrder = (PurchaseOrder)theEObject;
- T result = casePurchaseOrder(purchaseOrder);
- 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.PRODUCT:
- {
- Product product = (Product)theEObject;
- T result = caseProduct(product);
- 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.COMPANY:
- {
- Company company = (Company)theEObject;
- T result = caseCompany(company);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case Model1Package.CUSTOMER:
- {
- Customer customer = (Customer)theEObject;
- T result = caseCustomer(customer);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case Model1Package.SALES_ORDER:
- {
- SalesOrder salesOrder = (SalesOrder)theEObject;
- T result = caseSalesOrder(salesOrder);
- 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 -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @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
+ */
+ public T caseAddress(Address object)
+ {
+ return null;
+ }
+
+ /**
* 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
@@ -193,9 +214,7 @@ public class Model1Switch<T>
* 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
@@ -209,9 +228,7 @@ public class Model1Switch<T>
* 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
@@ -225,9 +242,7 @@ public class Model1Switch<T>
* 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
@@ -241,9 +256,7 @@ public class Model1Switch<T>
* 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
@@ -257,9 +270,7 @@ public class Model1Switch<T>
* 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
@@ -273,9 +284,7 @@ public class Model1Switch<T>
* 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
@@ -286,12 +295,26 @@ public class Model1Switch<T>
}
/**
+ * 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.
+ * @return the result of interpreting the object as an instance of '<em>Order</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseOrder(Order object)
+ {
+ return null;
+ }
+
+ /**
* 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
@@ -306,9 +329,7 @@ public class Model1Switch<T>
* <!-- 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.model1/src/org/eclipse/emf/cdo/tests/model1/validation/AddressValidator.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/validation/AddressValidator.java
new file mode 100644
index 0000000..8e0644b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/validation/AddressValidator.java
@@ -0,0 +1,23 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.emf.cdo.tests.model1.validation;
+
+
+/**
+ * A sample validator interface for {@link org.eclipse.emf.cdo.tests.model1.Address}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface AddressValidator
+{
+ boolean validate();
+
+ boolean validateName(String value);
+ boolean validateStreet(String value);
+ boolean validateCity(String value);
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/validation/OrderDetailValidator.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/validation/OrderDetailValidator.java
index 9f7c324..d301a7f 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/validation/OrderDetailValidator.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/validation/OrderDetailValidator.java
@@ -6,6 +6,7 @@
*/
package org.eclipse.emf.cdo.tests.model1.validation;
+import org.eclipse.emf.cdo.tests.model1.Order;
import org.eclipse.emf.cdo.tests.model1.Product;
/**
@@ -20,6 +21,8 @@ public interface OrderDetailValidator
{
boolean validate();
+ boolean validateOrder(Order value);
+
boolean validateProduct(Product value);
boolean validatePrice(float value);
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/validation/OrderValidator.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/validation/OrderValidator.java
new file mode 100644
index 0000000..cd2f035
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/validation/OrderValidator.java
@@ -0,0 +1,24 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.emf.cdo.tests.model1.validation;
+
+import org.eclipse.emf.cdo.tests.model1.OrderDetail;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * A sample validator interface for {@link org.eclipse.emf.cdo.tests.model1.Order}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface OrderValidator
+{
+ boolean validate();
+
+ boolean validateOrderDetails(EList<OrderDetail> value);
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/validation/SupplierValidator.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/validation/SupplierValidator.java
index 15e436b..0f2f489 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/validation/SupplierValidator.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/validation/SupplierValidator.java
@@ -6,6 +6,9 @@
*/
package org.eclipse.emf.cdo.tests.model1.validation;
+import org.eclipse.emf.cdo.tests.model1.PurchaseOrder;
+import org.eclipse.emf.common.util.EList;
+
/**
* A sample validator interface for
* {@link org.eclipse.emf.cdo.tests.model1.Supplier}. This doesn't really do
@@ -18,5 +21,7 @@ public interface SupplierValidator
{
boolean validate();
+ boolean validatePurchaseOrders(EList<PurchaseOrder> value);
+
boolean validateName(String value);
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
index cffa48a..378ee18 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
@@ -15,7 +15,6 @@ import org.eclipse.emf.cdo.internal.ui.bundle.OM;
import org.eclipse.emf.cdo.internal.ui.views.CDOEventHandler;
import org.eclipse.emf.cdo.protocol.model.CDOClass;
import org.eclipse.emf.cdo.protocol.model.CDOPackage;
-import org.eclipse.emf.cdo.protocol.model.CDOPackageManager;
import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.net4j.ui.actions.LongRunningAction;
@@ -1980,7 +1979,7 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
private boolean populateManager(MenuManager menuManager)
{
boolean populated = false;
- CDOPackage[] cdoPackages = CDOPackageManager.INSTANCE.getPackages();
+ CDOPackage[] cdoPackages = view.getSession().getPackageManager().getPackages();
for (CDOPackage cdoPackage : cdoPackages)
{
CDOClass[] cdoClasses = cdoPackage.getConcreteClasses();
diff --git a/plugins/org.eclipse.emf.cdo/.classpath b/plugins/org.eclipse.emf.cdo/.classpath
index ab96b0f..304e861 100644
--- a/plugins/org.eclipse.emf.cdo/.classpath
+++ b/plugins/org.eclipse.emf.cdo/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry excluding="org/eclipse/emf/internal/cdo/CDOModelManagerImpl.java|org/eclipse/emf/cdo/CDOResource.java|org/eclipse/emf/cdo/CDOLocal.java|org/eclipse/emf/internal/cdo/CDOLocalInternal.java|org/eclipse/emf/internal/cdo/util/ResourceUtil.java|org/eclipse/emf/internal/cdo/util/TransientStore.java|org/eclipse/emf/cdo/CDOResourceManager.java|org/eclipse/emf/internal/cdo/CDOResourceManagerImpl.java|org/eclipse/emf/internal/cdo/protocol/LoadResourcePathRequest.java|org/eclipse/emf/internal/cdo/protocol/AddModelsRequest.java|org/eclipse/emf/internal/cdo/CDOResourceImpl.java" kind="src" path="src"/>
+ <classpathentry kind="src" path="src"/>
<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="output" path="bin"/>
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOSession.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOSession.java
index 01e7655..6e5c6ad 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOSession.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOSession.java
@@ -10,6 +10,8 @@
**************************************************************************/
package org.eclipse.emf.cdo;
+import org.eclipse.emf.cdo.protocol.model.CDOPackageManager;
+
import org.eclipse.net4j.IChannel;
import org.eclipse.net4j.util.container.IContainer;
@@ -30,6 +32,8 @@ public interface CDOSession extends IContainer<CDOView>
public String getRepositoryUUID();
+ public CDOPackageManager getPackageManager();
+
public CDORevisionManager getRevisionManager();
public CDOView[] getViews();
@@ -40,5 +44,11 @@ public interface CDOSession extends IContainer<CDOView>
public CDOView openView(ResourceSet resourceSet);
+ public CDOView openView(long timeStamp);
+
+ public CDOView openView(boolean readOnly);
+
+ public CDOView openView();
+
public void close();
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java
index 0c77637..3df3681 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java
@@ -10,14 +10,15 @@
**************************************************************************/
package org.eclipse.emf.cdo.util;
-import org.eclipse.emf.cdo.CDOView;
import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.CDOSession;
+import org.eclipse.emf.cdo.CDOView;
import org.eclipse.emf.cdo.eresource.CDOResourceFactory;
import org.eclipse.emf.cdo.internal.protocol.CDOIDImpl;
import org.eclipse.emf.cdo.protocol.CDOID;
import org.eclipse.emf.cdo.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.protocol.model.CDOClass;
+import org.eclipse.emf.cdo.protocol.model.CDOPackageManager;
import org.eclipse.net4j.ConnectorException;
import org.eclipse.net4j.IConnector;
@@ -27,6 +28,7 @@ import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.Resource.Factory.Registry;
import org.eclipse.emf.ecore.util.EcoreUtil;
@@ -40,19 +42,28 @@ import java.util.Map;
*/
public final class CDOUtil
{
+ public static final CDOPackageManager PACKAGE_MANAGER = EMFUtil.PACKAGE_MANAGER;
+
private CDOUtil()
{
}
- public static CDOSession openSession(IConnector connector, String repositoryName) throws ConnectorException
+ @Deprecated
+ public static CDOSession openSession(IConnector connector, String repositoryName, EPackage.Registry ePackageRegistry)
+ throws ConnectorException
{
- CDOSessionImpl session = new CDOSessionImpl();
+ CDOSessionImpl session = new CDOSessionImpl(ePackageRegistry);
session.setConnector(connector);
session.setRepositoryName(repositoryName);
LifecycleUtil.activate(session);
return session;
}
+ public static CDOSession openSession(IConnector connector, String repositoryName) throws ConnectorException
+ {
+ return openSession(connector, repositoryName, null);
+ }
+
public static CDOView getView(ResourceSet resourceSet)
{
EList<Adapter> adapters = resourceSet.eAdapters();
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 d684bac..87b83be 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
@@ -60,7 +60,7 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements CDOObject
public CDOClassImpl cdoClass()
{
- return EMFUtil.getCDOClass(eClass());
+ return EMFUtil.getCDOClass(eClass(), cdoView().getSession().getPackageManager());
}
public CDOID cdoID()
@@ -127,11 +127,11 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements CDOObject
}
}
- void setAdapter(CDOViewImpl adapter)
+ void setAdapter(CDOViewImpl view)
{
if (this instanceof CDOResourceImpl)
{
- ((CDOResourceImpl)this).cdoSetView(adapter);
+ ((CDOResourceImpl)this).cdoSetView(view);
}
}
@@ -207,7 +207,7 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements CDOObject
TRACER.format("Finalizing revision for {0}", this);
}
- CDOViewImpl adapter = cdoView();
+ CDOViewImpl view = cdoView();
revision.setVersion(1);
revision.setContainerID(eContainer == null ? CDOID.NULL : ((CDOObjectImpl)eContainer).cdoID());
revision.setContainingFeature(eContainerFeatureID);
@@ -222,17 +222,17 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements CDOObject
EStructuralFeature eFeature = eDynamicFeature(i);
if (!eFeature.isTransient())
{
- finalizeRevisionFeature(adapter, revision, i, setting, eFeature);
+ finalizeRevisionFeature(view, revision, i, setting, eFeature);
}
}
}
}
}
- private void finalizeRevisionFeature(CDOViewImpl adapter, CDORevisionImpl revision, int i, Object setting,
+ private void finalizeRevisionFeature(CDOViewImpl view, CDORevisionImpl revision, int i, Object setting,
EStructuralFeature eFeature)
{
- CDOFeatureImpl cdoFeature = EMFUtil.getCDOFeature(eFeature);
+ CDOFeatureImpl cdoFeature = EMFUtil.getCDOFeature(eFeature, cdoView().getSession().getPackageManager());
if (TRACER.isEnabled())
{
TRACER.format("Finalizing feature {0}", cdoFeature);
@@ -247,7 +247,7 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements CDOObject
{
if (isReference)
{
- value = CDOStore.convertToID(adapter, value);
+ value = CDOStore.convertToID(view, value);
}
revision.add(cdoFeature, index++, value);
@@ -257,7 +257,7 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements CDOObject
{
if (isReference)
{
- setting = CDOStore.convertToID(adapter, setting);
+ setting = CDOStore.convertToID(view, setting);
}
revision.set(cdoFeature, 0, setting);
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionFactory.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionFactory.java
index 993a1ed..3353edb 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionFactory.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionFactory.java
@@ -35,7 +35,7 @@ public class CDOSessionFactory extends Factory<CDOSession>
public CDOSession create(String description)
{
- CDOSessionImpl session = new CDOSessionImpl();
+ CDOSessionImpl session = new CDOSessionImpl(null);
session.setRepositoryName(getRepositoryName(description));
return session;
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
index 5a9a6ab..178307d 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
@@ -14,6 +14,7 @@ import org.eclipse.emf.cdo.CDOSession;
import org.eclipse.emf.cdo.CDOSessionInvalidationEvent;
import org.eclipse.emf.cdo.CDOSessionViewsEvent;
import org.eclipse.emf.cdo.CDOView;
+import org.eclipse.emf.cdo.internal.protocol.model.CDOPackageManagerImpl;
import org.eclipse.emf.cdo.protocol.CDOID;
import org.eclipse.emf.cdo.util.CDOUtil;
@@ -31,11 +32,15 @@ import org.eclipse.net4j.util.event.IListener;
import org.eclipse.net4j.util.lifecycle.ILifecycle;
import org.eclipse.net4j.util.om.trace.ContextTracer;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EPackageRegistryImpl;
import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.internal.cdo.bundle.CDO;
import org.eclipse.emf.internal.cdo.protocol.CDOClientProtocol;
import org.eclipse.emf.internal.cdo.protocol.OpenSessionRequest;
import org.eclipse.emf.internal.cdo.protocol.OpenSessionResult;
+import org.eclipse.emf.internal.cdo.util.EMFUtil;
import java.text.MessageFormat;
import java.util.Collection;
@@ -60,6 +65,12 @@ public class CDOSessionImpl extends Lifecycle implements CDOSession
private String repositoryUUID;
+ private Set<String> packageURIs;
+
+ private EPackage.Registry ePackageRegistry;
+
+ private CDOPackageManagerImpl packageManager;
+
private CDORevisionManagerImpl revisionManager;
private Map<ResourceSet, CDOViewImpl> views = new HashMap();
@@ -75,8 +86,19 @@ public class CDOSessionImpl extends Lifecycle implements CDOSession
}
};
- public CDOSessionImpl()
+ public CDOSessionImpl(EPackage.Registry ePackageRegistry)
{
+ if (ePackageRegistry == null)
+ {
+ ePackageRegistry = EPackage.Registry.INSTANCE;
+ packageManager = EMFUtil.PACKAGE_MANAGER;
+ }
+ else
+ {
+ this.ePackageRegistry = ePackageRegistry;
+ packageManager = new CDOPackageManagerImpl();
+ }
+
revisionManager = new CDORevisionManagerImpl(this);
}
@@ -128,6 +150,11 @@ public class CDOSessionImpl extends Lifecycle implements CDOSession
return repositoryUUID;
}
+ public Set<String> getPackageURIs()
+ {
+ return packageURIs;
+ }
+
public boolean isOpen()
{
return channel != null;
@@ -138,6 +165,16 @@ public class CDOSessionImpl extends Lifecycle implements CDOSession
deactivate();
}
+ public EPackage.Registry getEPackageRegistry()
+ {
+ return ePackageRegistry;
+ }
+
+ public CDOPackageManagerImpl getPackageManager()
+ {
+ return packageManager;
+ }
+
public CDORevisionManagerImpl getRevisionManager()
{
return revisionManager;
@@ -160,6 +197,21 @@ public class CDOSessionImpl extends Lifecycle implements CDOSession
return attach(resourceSet, new CDOViewImpl(++lastViewID, this, timeStamp));
}
+ public CDOView openView(boolean readOnly)
+ {
+ return openView(createResourceSet(), readOnly);
+ }
+
+ public CDOView openView(long timeStamp)
+ {
+ return openView(createResourceSet(), timeStamp);
+ }
+
+ public CDOView openView()
+ {
+ return openView(createResourceSet());
+ }
+
public CDOViewImpl[] getViews()
{
Collection<CDOViewImpl> values;
@@ -241,6 +293,7 @@ public class CDOSessionImpl extends Lifecycle implements CDOSession
OpenSessionResult result = request.send();
sessionID = result.getSessionID();
repositoryUUID = result.getRepositoryUUID();
+ packageURIs = result.getPackageURIs();
}
@Override
@@ -259,14 +312,20 @@ public class CDOSessionImpl extends Lifecycle implements CDOSession
super.doDeactivate();
}
+ private ResourceSet createResourceSet()
+ {
+ return new ResourceSetImpl();
+ }
+
private void prepare(ResourceSet resourceSet)
{
CDOView view = CDOUtil.getView(resourceSet);
if (view != null)
{
- throw new IllegalStateException("CDO view already present: " + view);
+ throw new IllegalStateException("CDO view already open: " + view);
}
+ resourceSet.setPackageRegistry(new EPackageRegistryImpl(ePackageRegistry));
CDOUtil.addResourceFactory(resourceSet);
}
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 bf34c55..2e094c3 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
@@ -10,9 +10,10 @@
**************************************************************************/
package org.eclipse.emf.internal.cdo;
-import org.eclipse.emf.cdo.CDOView;
import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.CDOView;
import org.eclipse.emf.cdo.internal.protocol.model.CDOFeatureImpl;
+import org.eclipse.emf.cdo.internal.protocol.model.CDOPackageManagerImpl;
import org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionImpl;
import org.eclipse.emf.cdo.protocol.CDOID;
import org.eclipse.emf.cdo.protocol.util.ImplementationError;
@@ -89,7 +90,7 @@ public final class CDOStore implements EStore
public Object get(InternalEObject eObject, EStructuralFeature eFeature, int index)
{
CDOObjectImpl cdoObject = (CDOObjectImpl)eObject;
- CDOFeatureImpl cdoFeature = EMFUtil.getCDOFeature(eFeature);
+ CDOFeatureImpl cdoFeature = getCDOFeature(cdoObject, eFeature);
if (TRACER.isEnabled())
{
TRACER.format("get({0}, {1}, {2})", cdoObject, cdoFeature, index);
@@ -108,7 +109,7 @@ public final class CDOStore implements EStore
public boolean isSet(InternalEObject eObject, EStructuralFeature eFeature)
{
CDOObjectImpl cdoObject = (CDOObjectImpl)eObject;
- CDOFeatureImpl cdoFeature = EMFUtil.getCDOFeature(eFeature);
+ CDOFeatureImpl cdoFeature = getCDOFeature(cdoObject, eFeature);
if (TRACER.isEnabled())
{
TRACER.format("isSet({0}, {1})", cdoObject, cdoFeature);
@@ -121,7 +122,7 @@ public final class CDOStore implements EStore
public int size(InternalEObject eObject, EStructuralFeature eFeature)
{
CDOObjectImpl cdoObject = (CDOObjectImpl)eObject;
- CDOFeatureImpl cdoFeature = EMFUtil.getCDOFeature(eFeature);
+ CDOFeatureImpl cdoFeature = getCDOFeature(cdoObject, eFeature);
if (TRACER.isEnabled())
{
TRACER.format("size({0}, {1})", cdoObject, cdoFeature);
@@ -134,7 +135,7 @@ public final class CDOStore implements EStore
public boolean isEmpty(InternalEObject eObject, EStructuralFeature eFeature)
{
CDOObjectImpl cdoObject = (CDOObjectImpl)eObject;
- CDOFeatureImpl cdoFeature = EMFUtil.getCDOFeature(eFeature);
+ CDOFeatureImpl cdoFeature = getCDOFeature(cdoObject, eFeature);
if (TRACER.isEnabled())
{
TRACER.format("isEmpty({0}, {1})", cdoObject, cdoFeature);
@@ -147,7 +148,7 @@ public final class CDOStore implements EStore
public boolean contains(InternalEObject eObject, EStructuralFeature eFeature, Object value)
{
CDOObjectImpl cdoObject = (CDOObjectImpl)eObject;
- CDOFeatureImpl cdoFeature = EMFUtil.getCDOFeature(eFeature);
+ CDOFeatureImpl cdoFeature = getCDOFeature(cdoObject, eFeature);
if (TRACER.isEnabled())
{
TRACER.format("contains({0}, {1}, {2})", cdoObject, cdoFeature, value);
@@ -165,7 +166,7 @@ public final class CDOStore implements EStore
public int indexOf(InternalEObject eObject, EStructuralFeature eFeature, Object value)
{
CDOObjectImpl cdoObject = (CDOObjectImpl)eObject;
- CDOFeatureImpl cdoFeature = EMFUtil.getCDOFeature(eFeature);
+ CDOFeatureImpl cdoFeature = getCDOFeature(cdoObject, eFeature);
if (TRACER.isEnabled())
{
TRACER.format("indexOf({0}, {1}, {2})", cdoObject, cdoFeature, value);
@@ -183,7 +184,7 @@ public final class CDOStore implements EStore
public int lastIndexOf(InternalEObject eObject, EStructuralFeature eFeature, Object value)
{
CDOObjectImpl cdoObject = (CDOObjectImpl)eObject;
- CDOFeatureImpl cdoFeature = EMFUtil.getCDOFeature(eFeature);
+ CDOFeatureImpl cdoFeature = getCDOFeature(cdoObject, eFeature);
if (TRACER.isEnabled())
{
TRACER.format("lastIndexOf({0}, {1}, {2})", cdoObject, cdoFeature, value);
@@ -201,7 +202,7 @@ public final class CDOStore implements EStore
public int hashCode(InternalEObject eObject, EStructuralFeature eFeature)
{
CDOObjectImpl cdoObject = (CDOObjectImpl)eObject;
- CDOFeatureImpl cdoFeature = EMFUtil.getCDOFeature(eFeature);
+ CDOFeatureImpl cdoFeature = getCDOFeature(cdoObject, eFeature);
if (TRACER.isEnabled())
{
TRACER.format("hashCode({0}, {1})", cdoObject, cdoFeature);
@@ -214,7 +215,7 @@ public final class CDOStore implements EStore
public Object[] toArray(InternalEObject eObject, EStructuralFeature eFeature)
{
CDOObjectImpl cdoObject = (CDOObjectImpl)eObject;
- CDOFeatureImpl cdoFeature = EMFUtil.getCDOFeature(eFeature);
+ CDOFeatureImpl cdoFeature = getCDOFeature(cdoObject, eFeature);
if (TRACER.isEnabled())
{
TRACER.format("toArray({0}, {1})", cdoObject, cdoFeature);
@@ -242,7 +243,7 @@ public final class CDOStore implements EStore
public Object set(InternalEObject eObject, EStructuralFeature eFeature, int index, Object value)
{
CDOObjectImpl cdoObject = (CDOObjectImpl)eObject;
- CDOFeatureImpl cdoFeature = EMFUtil.getCDOFeature(eFeature);
+ CDOFeatureImpl cdoFeature = getCDOFeature(cdoObject, eFeature);
if (TRACER.isEnabled())
{
TRACER.format("set({0}, {1}, {2}, {3})", cdoObject, cdoFeature, index, value);
@@ -271,7 +272,7 @@ public final class CDOStore implements EStore
public void unset(InternalEObject eObject, EStructuralFeature eFeature)
{
CDOObjectImpl cdoObject = (CDOObjectImpl)eObject;
- CDOFeatureImpl cdoFeature = EMFUtil.getCDOFeature(eFeature);
+ CDOFeatureImpl cdoFeature = getCDOFeature(cdoObject, eFeature);
if (TRACER.isEnabled())
{
TRACER.format("unset({0}, {1})", cdoObject, cdoFeature);
@@ -284,7 +285,7 @@ public final class CDOStore implements EStore
public void add(InternalEObject eObject, EStructuralFeature eFeature, int index, Object value)
{
CDOObjectImpl cdoObject = (CDOObjectImpl)eObject;
- CDOFeatureImpl cdoFeature = EMFUtil.getCDOFeature(eFeature);
+ CDOFeatureImpl cdoFeature = getCDOFeature(cdoObject, eFeature);
if (TRACER.isEnabled())
{
TRACER.format("add({0}, {1}, {2}, {3})", cdoObject, cdoFeature, index, value);
@@ -307,7 +308,7 @@ public final class CDOStore implements EStore
public Object remove(InternalEObject eObject, EStructuralFeature eFeature, int index)
{
CDOObjectImpl cdoObject = (CDOObjectImpl)eObject;
- CDOFeatureImpl cdoFeature = EMFUtil.getCDOFeature(eFeature);
+ CDOFeatureImpl cdoFeature = getCDOFeature(cdoObject, eFeature);
if (TRACER.isEnabled())
{
TRACER.format("remove({0}, {1}, {2})", cdoObject, cdoFeature, index);
@@ -326,7 +327,7 @@ public final class CDOStore implements EStore
public void clear(InternalEObject eObject, EStructuralFeature eFeature)
{
CDOObjectImpl cdoObject = (CDOObjectImpl)eObject;
- CDOFeatureImpl cdoFeature = EMFUtil.getCDOFeature(eFeature);
+ CDOFeatureImpl cdoFeature = getCDOFeature(cdoObject, eFeature);
if (TRACER.isEnabled())
{
TRACER.format("clear({0}, {1})", cdoObject, cdoFeature);
@@ -339,7 +340,7 @@ public final class CDOStore implements EStore
public Object move(InternalEObject eObject, EStructuralFeature eFeature, int target, int source)
{
CDOObjectImpl cdoObject = (CDOObjectImpl)eObject;
- CDOFeatureImpl cdoFeature = EMFUtil.getCDOFeature(eFeature);
+ CDOFeatureImpl cdoFeature = getCDOFeature(cdoObject, eFeature);
if (TRACER.isEnabled())
{
TRACER.format("move({0}, {1}, {2}, {3})", cdoObject, cdoFeature, target, source);
@@ -410,6 +411,18 @@ public final class CDOStore implements EStore
return potentialID;
}
+ private static CDOFeatureImpl getCDOFeature(CDOObjectImpl cdoObject, EStructuralFeature eFeature)
+ {
+ CDOViewImpl view = cdoObject.cdoView();
+ if (view == null)
+ {
+ throw new IllegalStateException("view == null");
+ }
+
+ CDOPackageManagerImpl packageManager = view.getSession().getPackageManager();
+ return EMFUtil.getCDOFeature(eFeature, packageManager);
+ }
+
private static CDORevisionImpl getRevisionForReading(CDOObjectImpl cdoObject)
{
CDOStateMachine.INSTANCE.read(cdoObject);
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java
index fa7ed66..8d47e61 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java
@@ -11,17 +11,28 @@
package org.eclipse.emf.internal.cdo;
import org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl;
+import org.eclipse.emf.cdo.internal.protocol.model.CDOPackageImpl;
+import org.eclipse.emf.cdo.internal.protocol.model.CDOPackageManagerImpl;
+import org.eclipse.emf.cdo.internal.protocol.model.core.CDOCorePackageImpl;
+import org.eclipse.emf.cdo.internal.protocol.model.resource.CDOResourcePackageImpl;
import org.eclipse.emf.cdo.protocol.CDOID;
import org.eclipse.emf.cdo.protocol.util.ImplementationError;
+import org.eclipse.net4j.IChannel;
import org.eclipse.net4j.util.om.trace.ContextTracer;
+import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.internal.cdo.bundle.CDO;
import org.eclipse.emf.internal.cdo.protocol.CommitTransactionRequest;
import org.eclipse.emf.internal.cdo.protocol.CommitTransactionResult;
+import org.eclipse.emf.internal.cdo.protocol.RegisterPackagesRequest;
+import org.eclipse.emf.internal.cdo.util.EMFUtil;
+import org.eclipse.emf.internal.cdo.util.PackageClosure;
+import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
+import java.util.Set;
/**
* @author Eike Stepper
@@ -100,9 +111,11 @@ public class CDOTransactionImpl
try
{
CDOSessionImpl session = view.getSession();
- CommitTransactionRequest signal = new CommitTransactionRequest(session.getChannel(), this);
- CommitTransactionResult result = signal.send();
+ IChannel channel = session.getChannel();
+ new RegisterPackagesRequest(channel, calculateNewPackages()).send();
+
+ CommitTransactionResult result = new CommitTransactionRequest(channel, this).send();
postCommit(newResources, result);
postCommit(newObjects, result);
postCommit(dirtyObjects, result);
@@ -196,4 +209,44 @@ public class CDOTransactionImpl
}
}
}
+
+ private Collection<CDOPackageImpl> calculateNewPackages()
+ {
+ CDOSessionImpl session = view.getSession();
+ CDOPackageManagerImpl packageManager = session.getPackageManager();
+ CDOCorePackageImpl corePackage = packageManager.getCDOCorePackage();
+ CDOResourcePackageImpl resourcePackage = packageManager.getCDOResourcePackage();
+
+ Set<String> knownPackages = session.getPackageURIs();
+ Map<String, CDOPackageImpl> newPackages = new HashMap();
+ for (CDOObjectImpl cdoObject : newObjects.values())
+ {
+ CDOPackageImpl cdoPackage = cdoObject.cdoClass().getContainingPackage();
+ String uri = cdoPackage.getPackageURI();
+ if (!newPackages.containsKey(uri) && !knownPackages.contains(uri))
+ {
+ EPackage ePackage = EMFUtil.getEPackage(cdoPackage);
+ Set<EPackage> ePackages = PackageClosure.calculate(ePackage);
+ for (EPackage eP : ePackages)
+ {
+ CDOPackageImpl cdoP = eP == ePackage ? cdoPackage : EMFUtil.getCDOPackage(eP, packageManager);
+ if (cdoP == null)
+ {
+ throw new IllegalStateException("Not a CDO package: " + eP);
+ }
+
+ if (cdoP != corePackage && cdoP != resourcePackage)
+ {
+ uri = cdoP.getPackageURI();
+ if (!newPackages.containsKey(uri) && !knownPackages.contains(uri))
+ {
+ newPackages.put(uri, cdoP);
+ }
+ }
+ }
+ }
+ }
+
+ return newPackages.values();
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/bundle/Activator.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/bundle/Activator.java
index b694bbc..757e635 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/bundle/Activator.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/bundle/Activator.java
@@ -48,7 +48,7 @@ public final class Activator extends EMFPlugin
{
super.start(context);
CDO.BUNDLE.setBundleContext(context);
- EMFUtil.addModelInfos();
+ EMFUtil.addModelInfos(EMFUtil.PACKAGE_MANAGER);
IExtensionRegistry registry = Platform.getExtensionRegistry();
IConfigurationElement[] elements = registry.getConfigurationElementsFor(CDO.BUNDLE_ID,
CDO.PERSISTENT_PACKAGE_EXT_POINT);
@@ -59,7 +59,7 @@ public final class Activator extends EMFPlugin
EPackage ePackage = EPackage.Registry.INSTANCE.getEPackage(uri);
if (ePackage != null)
{
- EMFUtil.getCDOPackage(ePackage);
+ EMFUtil.getCDOPackage(ePackage, EMFUtil.PACKAGE_MANAGER);
}
else
{
@@ -75,8 +75,7 @@ public final class Activator extends EMFPlugin
{
IExtensionRegistry registry = Platform.getExtensionRegistry();
registry.removeRegistryChangeListener(this);
- // TODO Clear CDOPackageManager
- EMFUtil.removeModelInfos();
+ EMFUtil.removeModelInfos(EMFUtil.PACKAGE_MANAGER);
plugin = null;
CDO.BUNDLE.setBundleContext(null);
super.stop(context);
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadObjectRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadObjectRequest.java
index aae1add..d60cc9b 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadObjectRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadObjectRequest.java
@@ -74,6 +74,6 @@ public class LoadObjectRequest extends CDOClientRequest<CDORevisionImpl>
@Override
protected CDORevisionImpl confirming(ExtendedDataInputStream in) throws IOException
{
- return new CDORevisionImpl(in);
+ return new CDORevisionImpl(getSession().getPackageManager(), in);
}
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/OpenSessionRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/OpenSessionRequest.java
index 893c2c7..c7db1f0 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/OpenSessionRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/OpenSessionRequest.java
@@ -22,6 +22,8 @@ import org.eclipse.net4j.util.stream.ExtendedDataOutputStream;
import java.io.IOException;
import java.text.MessageFormat;
+import java.util.HashSet;
+import java.util.Set;
/**
* @author Eike Stepper
@@ -82,6 +84,19 @@ public class OpenSessionRequest extends RequestWithConfirmation<OpenSessionResul
PROTOCOL.format("Read repositoryUUID: {0}", repositoryUUID);
}
- return new OpenSessionResult(sessionID, repositoryUUID);
+ Set<String> packageURIs = new HashSet();
+ int size = in.readInt();
+ for (int i = 0; i < size; i++)
+ {
+ String packageURI = in.readString();
+ if (PROTOCOL.isEnabled())
+ {
+ PROTOCOL.format("Read package URI: {0}", packageURI);
+ }
+
+ packageURIs.add(packageURI);
+ }
+
+ return new OpenSessionResult(sessionID, repositoryUUID, packageURIs);
}
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/OpenSessionResult.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/OpenSessionResult.java
index b5d90c4..cfd7c7d 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/OpenSessionResult.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/OpenSessionResult.java
@@ -10,6 +10,8 @@
**************************************************************************/
package org.eclipse.emf.internal.cdo.protocol;
+import java.util.Set;
+
/**
* @author Eike Stepper
*/
@@ -19,10 +21,13 @@ public final class OpenSessionResult
private String repositoryUUID;
- public OpenSessionResult(int sessionID, String repositoryUUID)
+ private Set<String> packageURIs;
+
+ public OpenSessionResult(int sessionID, String repositoryUUID, Set<String> packageURIs)
{
this.sessionID = sessionID;
this.repositoryUUID = repositoryUUID;
+ this.packageURIs = packageURIs;
}
public int getSessionID()
@@ -34,4 +39,9 @@ public final class OpenSessionResult
{
return repositoryUUID;
}
+
+ public Set<String> getPackageURIs()
+ {
+ return packageURIs;
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/RegisterPackagesRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/RegisterPackagesRequest.java
new file mode 100644
index 0000000..84f7abb
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/RegisterPackagesRequest.java
@@ -0,0 +1,58 @@
+/***************************************************************************
+ * Copyright (c) 2004-2007 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.internal.cdo.protocol;
+
+import org.eclipse.emf.cdo.internal.protocol.model.CDOPackageImpl;
+import org.eclipse.emf.cdo.protocol.CDOProtocolConstants;
+
+import org.eclipse.net4j.IChannel;
+import org.eclipse.net4j.util.stream.ExtendedDataInputStream;
+import org.eclipse.net4j.util.stream.ExtendedDataOutputStream;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Set;
+
+/**
+ * @author Eike Stepper
+ */
+public class RegisterPackagesRequest extends CDOClientRequest
+{
+ private Collection<CDOPackageImpl> newPackages;
+
+ public RegisterPackagesRequest(IChannel channel, Collection<CDOPackageImpl> newPackages)
+ {
+ super(channel, CDOProtocolConstants.REGISTER_PACKAGES_SIGNAL);
+ this.newPackages = newPackages;
+ }
+
+ @Override
+ protected void requesting(ExtendedDataOutputStream out) throws IOException
+ {
+ out.writeInt(newPackages.size());
+ for (CDOPackageImpl newPackage : newPackages)
+ {
+ newPackage.write(out);
+ }
+ }
+
+ @Override
+ protected Object confirming(ExtendedDataInputStream in) throws IOException
+ {
+ Set<String> knownPackages = getSession().getPackageURIs();
+ for (CDOPackageImpl newPackage : newPackages)
+ {
+ knownPackages.add(newPackage.getPackageURI());
+ }
+
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/EMFUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/EMFUtil.java
index 86652e5..bcf882c 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/EMFUtil.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/EMFUtil.java
@@ -13,23 +13,23 @@ package org.eclipse.emf.internal.cdo.util;
import org.eclipse.emf.cdo.eresource.EresourcePackage;
import org.eclipse.emf.cdo.internal.protocol.bundle.CDOProtocol;
import org.eclipse.emf.cdo.internal.protocol.model.CDOClassImpl;
+import org.eclipse.emf.cdo.internal.protocol.model.CDOClassProxy;
import org.eclipse.emf.cdo.internal.protocol.model.CDOClassRefImpl;
import org.eclipse.emf.cdo.internal.protocol.model.CDOFeatureImpl;
import org.eclipse.emf.cdo.internal.protocol.model.CDOPackageImpl;
import org.eclipse.emf.cdo.internal.protocol.model.CDOPackageManagerImpl;
import org.eclipse.emf.cdo.internal.protocol.model.CDOTypeImpl;
import org.eclipse.emf.cdo.internal.protocol.model.core.CDOCorePackageImpl;
-import org.eclipse.emf.cdo.internal.protocol.model.core.CDOObjectClassImpl;
-import org.eclipse.emf.cdo.internal.protocol.model.resource.CDOContentsFeatureImpl;
-import org.eclipse.emf.cdo.internal.protocol.model.resource.CDOPathFeatureImpl;
import org.eclipse.emf.cdo.internal.protocol.model.resource.CDOResourceClassImpl;
import org.eclipse.emf.cdo.internal.protocol.model.resource.CDOResourcePackageImpl;
import org.eclipse.emf.cdo.protocol.model.CDOClass;
import org.eclipse.emf.cdo.protocol.model.CDOFeature;
import org.eclipse.emf.cdo.protocol.model.CDOPackage;
+import org.eclipse.emf.cdo.protocol.util.ImplementationError;
import org.eclipse.net4j.util.om.trace.ContextTracer;
+import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.EPackage;
@@ -45,7 +45,7 @@ import java.util.List;
*/
public final class EMFUtil
{
- private static final CDOPackageManagerImpl PACKAGE_MANAGER = CDOPackageManagerImpl.INSTANCE;
+ public static final CDOPackageManagerImpl PACKAGE_MANAGER = new CDOPackageManagerImpl();
@SuppressWarnings("unused")
private static final ContextTracer TRACER = new ContextTracer(CDOProtocol.DEBUG_MODEL, EMFUtil.class);
@@ -80,10 +80,10 @@ public final class EMFUtil
return result;
}
- public static List<EStructuralFeature> getPersistentFeatures(EClass eClass)
+ public static List<EStructuralFeature> getPersistentFeatures(EList<EStructuralFeature> eFeatues)
{
List<EStructuralFeature> result = new ArrayList();
- for (EStructuralFeature feature : eClass.getEStructuralFeatures())
+ for (EStructuralFeature feature : eFeatues)
{
if (!feature.isTransient())
{
@@ -152,28 +152,28 @@ public final class EMFUtil
return CDOTypeImpl.STRING;
}
- public static CDOPackageImpl getCDOPackage(EPackage ePackage)
+ public static CDOPackageImpl getCDOPackage(EPackage ePackage, CDOPackageManagerImpl packageManager)
{
String packageURI = ePackage.getNsURI();
- CDOPackageImpl cdoPackage = PACKAGE_MANAGER.lookupPackage(packageURI);
+ CDOPackageImpl cdoPackage = packageManager.lookupPackage(packageURI);
if (cdoPackage == null)
{
- cdoPackage = convertPackage(ePackage);
- PACKAGE_MANAGER.addPackage(cdoPackage);
+ cdoPackage = convertPackage(ePackage, packageManager);
+ packageManager.addPackage(cdoPackage);
}
return cdoPackage;
}
- public static CDOClassImpl getCDOClass(EClass eClass)
+ public static CDOClassImpl getCDOClass(EClass eClass, CDOPackageManagerImpl packageManager)
{
- CDOPackageImpl cdoPackage = getCDOPackage(eClass.getEPackage());
+ CDOPackageImpl cdoPackage = getCDOPackage(eClass.getEPackage(), packageManager);
return cdoPackage.lookupClass(eClass.getClassifierID());
}
- public static CDOFeatureImpl getCDOFeature(EStructuralFeature eFeature)
+ public static CDOFeatureImpl getCDOFeature(EStructuralFeature eFeature, CDOPackageManagerImpl packageManager)
{
- CDOClassImpl cdoClass = getCDOClass(eFeature.getEContainingClass());
+ CDOClassImpl cdoClass = getCDOClass(eFeature.getEContainingClass(), packageManager);
return cdoClass.lookupFeature(eFeature.getFeatureID());
}
@@ -192,74 +192,89 @@ public final class EMFUtil
return (EStructuralFeature)cdoFeature.getClientInfo();
}
- public static void addModelInfos()
+ public static void addModelInfos(CDOPackageManagerImpl packageManager)
{
// Ecore
- CDOCorePackageImpl.INSTANCE.setClientInfo(EcorePackage.eINSTANCE);
- CDOObjectClassImpl.INSTANCE.setClientInfo(EcorePackage.eINSTANCE.getEObject());
+ CDOCorePackageImpl corePackage = packageManager.getCDOCorePackage();
+ corePackage.setClientInfo(EcorePackage.eINSTANCE);
+ corePackage.getCDOObjectClass().setClientInfo(EcorePackage.eINSTANCE.getEObject());
// Eresource
- CDOResourcePackageImpl.INSTANCE.setClientInfo(EresourcePackage.eINSTANCE);
- CDOResourceClassImpl.INSTANCE.setClientInfo(EresourcePackage.eINSTANCE.getCDOResource());
- CDOContentsFeatureImpl.INSTANCE.setClientInfo(EresourcePackage.eINSTANCE.getCDOResource_Contents());
- CDOPathFeatureImpl.INSTANCE.setClientInfo(EresourcePackage.eINSTANCE.getCDOResource_Path());
+ CDOResourcePackageImpl resourcePackage = packageManager.getCDOResourcePackage();
+ resourcePackage.setClientInfo(EresourcePackage.eINSTANCE);
+ CDOResourceClassImpl resourceClass = resourcePackage.getCDOResourceClass();
+ resourceClass.setClientInfo(EresourcePackage.eINSTANCE.getCDOResource());
+ resourceClass.getCDOContentsFeature().setClientInfo(EresourcePackage.eINSTANCE.getCDOResource_Contents());
+ resourceClass.getCDOPathFeature().setClientInfo(EresourcePackage.eINSTANCE.getCDOResource_Path());
}
- public static void removeModelInfos()
+ public static void removeModelInfos(CDOPackageManagerImpl packageManager)
{
// Ecore
- CDOCorePackageImpl.INSTANCE.setClientInfo(null);
- CDOObjectClassImpl.INSTANCE.setClientInfo(null);
+ CDOCorePackageImpl corePackage = packageManager.getCDOCorePackage();
+ corePackage.setClientInfo(null);
+ corePackage.getCDOObjectClass().setClientInfo(null);
// Eresource
- CDOResourcePackageImpl.INSTANCE.setClientInfo(null);
- CDOResourceClassImpl.INSTANCE.setClientInfo(null);
- CDOContentsFeatureImpl.INSTANCE.setClientInfo(null);
- CDOPathFeatureImpl.INSTANCE.setClientInfo(null);
+ CDOResourcePackageImpl resourcePackage = packageManager.getCDOResourcePackage();
+ resourcePackage.setClientInfo(null);
+ CDOResourceClassImpl resourceClass = resourcePackage.getCDOResourceClass();
+ resourceClass.setClientInfo(null);
+ resourceClass.getCDOContentsFeature().setClientInfo(null);
+ resourceClass.getCDOPathFeature().setClientInfo(null);
}
- private static CDOPackageImpl convertPackage(EPackage ePackage)
+ private static CDOPackageImpl convertPackage(EPackage ePackage, CDOPackageManagerImpl packageManager)
{
- CDOPackageImpl cdoPackage = new CDOPackageImpl(ePackage.getNsURI(), ePackage.getName());
+ CDOPackageImpl cdoPackage = new CDOPackageImpl(packageManager, ePackage.getNsURI(), ePackage.getName());
cdoPackage.setClientInfo(ePackage);
for (EClass eClass : getPersistentClasses(ePackage))
{
- CDOClassImpl cdoClass = convertClass(eClass);
+ CDOClassImpl cdoClass = convertClass(eClass, packageManager);
cdoPackage.addClass(cdoClass);
}
return cdoPackage;
}
- private static CDOClassImpl convertClass(EClass eClass)
+ private static CDOClassImpl convertClass(EClass eClass, CDOPackageManagerImpl packageManager)
{
CDOClassImpl cdoClass = new CDOClassImpl(eClass.getClassifierID(), eClass.getName(), eClass.isAbstract());
cdoClass.setClientInfo(eClass);
- for (EStructuralFeature eFeature : getPersistentFeatures(eClass))
+
+ for (EClass superEClass : eClass.getESuperTypes())
+ {
+ CDOClassRefImpl classRef = createClassRef(superEClass);
+ cdoClass.addSuperType(classRef);
+ }
+
+ for (EStructuralFeature eFeature : getPersistentFeatures(eClass.getEStructuralFeatures()))
{
- CDOFeatureImpl cdoFeature = convertFeature(eFeature);
+ CDOFeatureImpl cdoFeature = convertFeature(eFeature, packageManager);
cdoClass.addFeature(cdoFeature);
}
+ initAllSuperTypes(cdoClass, packageManager);
+ initAllFeatures(cdoClass, packageManager);
return cdoClass;
}
- private static CDOFeatureImpl convertFeature(EStructuralFeature eFeature)
+ private static CDOFeatureImpl convertFeature(EStructuralFeature eFeature, CDOPackageManagerImpl packageManager)
{
- CDOFeatureImpl cdoFeature = //
- isReference(eFeature) ? convertReference(eFeature) : convertAttribute(eFeature);
+ CDOFeatureImpl cdoFeature = isReference(eFeature) ? convertReference(eFeature, packageManager)
+ : convertAttribute(eFeature);
cdoFeature.setClientInfo(eFeature);
return cdoFeature;
}
- private static CDOFeatureImpl convertReference(EStructuralFeature eFeature)
+ private static CDOFeatureImpl convertReference(EStructuralFeature eFeature, CDOPackageManagerImpl packageManager)
{
int featureID = eFeature.getFeatureID();
String name = eFeature.getName();
CDOClassRefImpl classRef = createClassRef(eFeature.getEType());
boolean many = eFeature.isMany();
boolean containment = isContainment(eFeature);
- return new CDOFeatureImpl(featureID, name, classRef, many, containment);
+ return new CDOFeatureImpl(featureID, name, new CDOClassProxy(classRef, packageManager), many, containment);
}
private static CDOFeatureImpl convertAttribute(EStructuralFeature eFeature)
@@ -271,6 +286,43 @@ public final class EMFUtil
return new CDOFeatureImpl(featureID, name, type, many);
}
+ private static void initAllSuperTypes(CDOClassImpl cdoClass, CDOPackageManagerImpl packageManager)
+ {
+ EClass eClass = getEClass(cdoClass);
+ EList<EClass> eClasses = eClass.getEAllSuperTypes();
+ CDOClassImpl[] allSuperTypes = new CDOClassImpl[eClasses.size()];
+
+ int i = 0;
+ for (EClass superEClass : eClasses)
+ {
+ CDOClassImpl superType = getCDOClass(superEClass, packageManager);
+ allSuperTypes[i++] = superType;
+ }
+
+ cdoClass.setAllSuperTypes(allSuperTypes);
+ }
+
+ private static void initAllFeatures(CDOClassImpl cdoClass, CDOPackageManagerImpl packageManager)
+ {
+ EClass eClass = getEClass(cdoClass);
+ List<EStructuralFeature> eFeatures = getPersistentFeatures(eClass.getEAllStructuralFeatures());
+ CDOFeatureImpl[] allFeatures = new CDOFeatureImpl[eFeatures.size()];
+
+ int i = 0;
+ for (EStructuralFeature eFeature : eFeatures)
+ {
+ CDOFeatureImpl cdoFeature = getCDOFeature(eFeature, packageManager);
+ if (cdoFeature.getFeatureID() != i)
+ {
+ throw new ImplementationError("Wrong featureID: " + cdoFeature);
+ }
+
+ allFeatures[i++] = cdoFeature;
+ }
+
+ cdoClass.setAllFeatures(allFeatures);
+ }
+
// public static List<Change> analyzeListDifferences(CDORevisionImpl
// oldRevision,
// CDORevisionImpl newRevision, CDOFeatureImpl feature)
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/LinearPackageHull.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/PackageClosure.java
index 1477406..d433e42 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/LinearPackageHull.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/PackageClosure.java
@@ -29,13 +29,17 @@ import java.util.List;
import java.util.Set;
/**
+ * TODO Handle generic types and type parameters
+ *
* @author Eike Stepper
*/
-public final class LinearPackageHull
+public final class PackageClosure
{
- private static final ContextTracer TRACER = new ContextTracer(CDOProtocol.DEBUG_MODEL, LinearPackageHull.class);
+ private static final ContextTracer TRACER = new ContextTracer(CDOProtocol.DEBUG_MODEL, PackageClosure.class);
+
+ private static final Set<EPackage> EMPTY_CLOSURE = Collections.emptySet();
- private LinearPackageHull()
+ private PackageClosure()
{
}
@@ -44,20 +48,20 @@ public final class LinearPackageHull
// Optimize no packages
if (ePackages.isEmpty())
{
- return Collections.EMPTY_SET;
+ return EMPTY_CLOSURE;
}
// Optimize 1 package
if (ePackages.size() == 1)
{
- return LinearPackageHull.calculate(ePackages.iterator().next());
+ return calculate(ePackages.iterator().next());
}
// Handle >1 packages
Set<EPackage> result = new HashSet();
for (EPackage ePackage : ePackages)
{
- Set<EPackage> packages = LinearPackageHull.calculate(ePackage);
+ Set<EPackage> packages = calculate(ePackage);
result.addAll(packages);
}
@@ -71,7 +75,7 @@ public final class LinearPackageHull
{
if (TRACER.isEnabled())
{
- TRACER.trace("Linear package hull for " + ePackage.getNsURI());
+ TRACER.trace("Package closure for " + ePackage.getNsURI());
}
Set<EClass> visited = new HashSet();
@@ -170,5 +174,4 @@ public final class LinearPackageHull
handleEClassifier(superType, visited);
}
}
-
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/TreeTraversal.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/TreeTraversal.java
index 506d97e..7ac893b 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/TreeTraversal.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/TreeTraversal.java
@@ -15,7 +15,7 @@ public class TreeTraversal
{
private CDOObjectImpl root;
- private List<CDOObjectImpl> objects = new ArrayList();
+ private List<CDOObjectImpl> objects = new ArrayList(0);
public TreeTraversal(CDOObjectImpl root)
{
diff --git a/plugins/org.eclipse.net4j.db/.classpath b/plugins/org.eclipse.net4j.db/.classpath
index a44345a..751c8f2 100644
--- a/plugins/org.eclipse.net4j.db/.classpath
+++ b/plugins/org.eclipse.net4j.db/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry excluding="org/eclipse/net4j/db/IDBStoreManager.java|org/eclipse/net4j/db/IDBStoreTransaction.java|org/eclipse/net4j/internal/db/DBStoreManager.java|org/eclipse/net4j/internal/db/DBStoreTransaction.java" kind="src" path="src"/>
+ <classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBStoreManager.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBStoreManager.java
deleted file mode 100644
index 3e6b86a..0000000
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBStoreManager.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2007 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.net4j.db;
-
-import org.eclipse.net4j.util.transaction.IStoreManager;
-
-import javax.sql.DataSource;
-
-import java.sql.Connection;
-
-/**
- * @author Eike Stepper
- */
-public interface IDBStoreManager<TRANSACTION extends IDBStoreTransaction> extends IStoreManager<TRANSACTION>
-{
- public static final String STORE_TYPE = "JDBC";
-
- public IDBAdapter getDBAdapter();
-
- public DataSource getDataSource();
-
- public Connection getConnection();
-
- public void initDatabase();
-}
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBStoreTransaction.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBStoreTransaction.java
deleted file mode 100644
index 45abc25..0000000
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBStoreTransaction.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2007 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.net4j.db;
-
-import org.eclipse.net4j.util.transaction.IStoreTransaction;
-
-import java.sql.Connection;
-
-/**
- * @author Eike Stepper
- */
-public interface IDBStoreTransaction extends IStoreTransaction
-{
- public Connection getConnection();
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBStoreManager.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBStoreManager.java
deleted file mode 100644
index 1b397e2..0000000
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBStoreManager.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2007 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.net4j.internal.db;
-
-import org.eclipse.net4j.db.IDBAdapter;
-import org.eclipse.net4j.db.IDBStoreManager;
-import org.eclipse.net4j.db.IDBSchema;
-import org.eclipse.net4j.internal.util.transaction.StoreManager;
-import org.eclipse.net4j.util.transaction.StoreException;
-
-import javax.sql.DataSource;
-
-import java.sql.Connection;
-import java.sql.SQLException;
-
-/**
- * @author Eike Stepper
- */
-public abstract class DBStoreManager<TRANSACTION extends DBStoreTransaction> extends StoreManager<TRANSACTION>
- implements IDBStoreManager<TRANSACTION>
-{
- private static final String STORE_TYPE = "JDBC";
-
- private IDBSchema schema;
-
- private IDBAdapter dbAdapter;
-
- private DataSource dataSource;
-
- public DBStoreManager(IDBSchema schema, IDBAdapter dbAdapter, DataSource dataSource)
- {
- super(STORE_TYPE);
- if (dbAdapter == null)
- {
- throw new IllegalArgumentException("dbAdapter == null");
- }
-
- if (dataSource == null)
- {
- throw new IllegalArgumentException("dataSource == null");
- }
-
- this.schema = schema;
- this.dbAdapter = dbAdapter;
- this.dataSource = dataSource;
- }
-
- public IDBSchema getSchema()
- {
- return schema;
- }
-
- public IDBAdapter getDBAdapter()
- {
- return dbAdapter;
- }
-
- public DataSource getDataSource()
- {
- return dataSource;
- }
-
- public Connection getConnection()
- {
- try
- {
- return dataSource.getConnection();
- }
- catch (SQLException ex)
- {
- throw new StoreException(ex);
- }
- }
-
- public void initDatabase()
- {
- schema.create(dbAdapter, dataSource);
- }
-
- public TRANSACTION startTransaction() throws StoreException
- {
- try
- {
- Connection connection = getConnection();
- connection.setAutoCommit(false);
- return createTransaction(connection);
- }
- catch (SQLException ex)
- {
- throw new StoreException(ex);
- }
- }
-
- public void commitTransaction(TRANSACTION transaction) throws StoreException
- {
- try
- {
- Connection connection = transaction.getConnection();
- connection.commit();
- }
- catch (StoreException ex)
- {
- throw ex;
- }
- catch (Exception ex)
- {
- throw new StoreException(ex);
- }
- finally
- {
- transaction.dispose();
- }
- }
-
- public void rollbackTransaction(TRANSACTION transaction) throws StoreException
- {
- try
- {
- Connection connection = transaction.getConnection();
- connection.rollback();
- }
- catch (StoreException ex)
- {
- throw ex;
- }
- catch (Exception ex)
- {
- throw new StoreException(ex);
- }
- finally
- {
- transaction.dispose();
- }
- }
-
- protected abstract TRANSACTION createTransaction(Connection connection);
-}
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBStoreTransaction.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBStoreTransaction.java
deleted file mode 100644
index 3f8a4e2..0000000
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/DBStoreTransaction.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2007 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.net4j.internal.db;
-
-import org.eclipse.net4j.db.IDBStoreTransaction;
-import org.eclipse.net4j.internal.util.transaction.StoreTransaction;
-import org.eclipse.net4j.util.transaction.IStoreManager;
-import org.eclipse.net4j.util.transaction.IStoreTransaction;
-
-import java.sql.Connection;
-
-/**
- * @author Eike Stepper
- */
-public class DBStoreTransaction extends StoreTransaction implements IDBStoreTransaction
-{
- private Connection connection;
-
- public DBStoreTransaction(IStoreManager<? extends IStoreTransaction> storeManager, Connection connection)
- {
- super(storeManager);
- this.connection = connection;
- }
-
- public Connection getConnection()
- {
- return connection;
- }
-
- public void dispose()
- {
- connection = null;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.net4j.util/.classpath b/plugins/org.eclipse.net4j.util/.classpath
index 6a78c74..304e861 100644
--- a/plugins/org.eclipse.net4j.util/.classpath
+++ b/plugins/org.eclipse.net4j.util/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry excluding="org/eclipse/net4j/internal/util/transaction/StoreManager.java|org/eclipse/net4j/internal/util/transaction/StoreTransaction.java|org/eclipse/net4j/util/transaction/IStoreManager.java|org/eclipse/net4j/util/transaction/IStoreTransaction.java|org/eclipse/net4j/util/transaction/StoreException.java" kind="src" path="src"/>
+ <classpathentry kind="src" path="src"/>
<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="output" path="bin"/>
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/transaction/StoreManager.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/transaction/StoreManager.java
deleted file mode 100644
index 414c011..0000000
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/transaction/StoreManager.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2007 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.net4j.internal.util.transaction;
-
-import org.eclipse.net4j.internal.util.lifecycle.Lifecycle;
-import org.eclipse.net4j.util.transaction.IStoreManager;
-import org.eclipse.net4j.util.transaction.IStoreTransaction;
-import org.eclipse.net4j.util.transaction.StoreException;
-
-/**
- * @author Eike Stepper
- */
-public abstract class StoreManager<TRANSACTION extends IStoreTransaction> extends Lifecycle implements
- IStoreManager<TRANSACTION>
-{
- private String storeType;
-
- private String instanceID;
-
- public StoreManager(String storeType)
- {
- this.storeType = storeType;
- }
-
- public String getStoreType()
- {
- return storeType;
- }
-
- public String getInstanceID()
- {
- return instanceID;
- }
-
- public void setInstanceID(String instanceID)
- {
- this.instanceID = instanceID;
- }
-
- public void transact(TransactedOperation<TRANSACTION> operation) throws StoreException
- {
- TRANSACTION transaction = startTransaction();
- try
- {
- operation.run(transaction);
- commitTransaction(transaction);
- }
- catch (StoreException ex)
- {
- rollbackTransaction(transaction);
- throw ex;
- }
- catch (Exception ex)
- {
- rollbackTransaction(transaction);
- throw new StoreException(ex);
- }
- }
-}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/transaction/StoreTransaction.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/transaction/StoreTransaction.java
deleted file mode 100644
index 6c9af2c..0000000
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/transaction/StoreTransaction.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2007 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.net4j.internal.util.transaction;
-
-import org.eclipse.net4j.util.transaction.IStoreManager;
-import org.eclipse.net4j.util.transaction.IStoreTransaction;
-
-/**
- * @author Eike Stepper
- */
-public abstract class StoreTransaction implements IStoreTransaction
-{
- private IStoreManager<? extends IStoreTransaction> storeManager;
-
- public StoreTransaction(IStoreManager<? extends IStoreTransaction> storeManager)
- {
- this.storeManager = storeManager;
- }
-
- public IStoreManager<? extends IStoreTransaction> getStoreManager()
- {
- return storeManager;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/transaction/IStoreManager.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/transaction/IStoreManager.java
deleted file mode 100644
index 69c9142..0000000
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/transaction/IStoreManager.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2007 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.net4j.util.transaction;
-
-/**
- * @author Eike Stepper
- */
-public interface IStoreManager<TRANSACTION extends IStoreTransaction>
-{
- public String getStoreType();
-
- public String getInstanceID();
-
- public TRANSACTION startTransaction() throws StoreException;
-
- public void commitTransaction(TRANSACTION transaction) throws StoreException;
-
- public void rollbackTransaction(TRANSACTION transaction) throws StoreException;
-
- public void transact(TransactedOperation<TRANSACTION> operation) throws StoreException;
-
- /**
- * @author Eike Stepper
- */
- public interface TransactedOperation<TRANSACTION extends IStoreTransaction>
- {
- public void run(TRANSACTION transaction) throws Exception;
- }
-}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/transaction/IStoreTransaction.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/transaction/IStoreTransaction.java
deleted file mode 100644
index 1d52187..0000000
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/transaction/IStoreTransaction.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2007 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.net4j.util.transaction;
-
-/**
- * @author Eike Stepper
- */
-public interface IStoreTransaction
-{
- public IStoreManager<? extends IStoreTransaction> getStoreManager();
-}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/transaction/StoreException.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/transaction/StoreException.java
deleted file mode 100644
index 130b50d..0000000
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/transaction/StoreException.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2007 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.net4j.util.transaction;
-
-/**
- * @author Eike Stepper
- */
-public class StoreException extends RuntimeException
-{
- private static final long serialVersionUID = 1L;
-
- public StoreException()
- {
- }
-
- public StoreException(String message)
- {
- super(message);
- }
-
- public StoreException(Throwable cause)
- {
- super(cause);
- }
-
- public StoreException(String message, Throwable cause)
- {
- super(message, cause);
- }
-}