diff options
Diffstat (limited to 'examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachtest/impl')
6 files changed, 0 insertions, 1246 deletions
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachtest/impl/DetachtestFactoryImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachtest/impl/DetachtestFactoryImpl.java deleted file mode 100644 index d903cacb3..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachtest/impl/DetachtestFactoryImpl.java +++ /dev/null @@ -1,120 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: DetachtestFactoryImpl.java,v 1.2 2007/02/08 23:09:23 mtaal Exp $ - */ -package org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; - -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.impl.EFactoryImpl; - -import org.eclipse.emf.ecore.plugin.EcorePlugin; -import org.eclipse.emf.teneo.samples.emf.detach.detachtest.*; - -/** - * <!-- begin-user-doc --> - * An implementation of the model <b>Factory</b>. - * <!-- end-user-doc --> - * @generated - */ -public class DetachtestFactoryImpl extends EFactoryImpl implements DetachtestFactory { - /** - * Creates the default factory implementation. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static DetachtestFactory init() { - try { - DetachtestFactory theDetachtestFactory = (DetachtestFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/emf/teneo/samples/emf/detach/detachtest"); - if (theDetachtestFactory != null) { - return theDetachtestFactory; - } - } - catch (Exception exception) { - EcorePlugin.INSTANCE.log(exception); - } - return new DetachtestFactoryImpl(); - } - - /** - * Creates an instance of the factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public DetachtestFactoryImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case DetachtestPackage.TEST_A: return createTestA(); - case DetachtestPackage.TEST_B: return createTestB(); - case DetachtestPackage.TEST_C: return createTestC(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public TestA createTestA() { - TestAImpl testA = new TestAImpl(); - return testA; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public TestB createTestB() { - TestBImpl testB = new TestBImpl(); - return testB; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public TestC createTestC() { - TestCImpl testC = new TestCImpl(); - return testC; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public DetachtestPackage getDetachtestPackage() { - return (DetachtestPackage)getEPackage(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @deprecated - * @generated - */ - @Deprecated - public static DetachtestPackage getPackage() { - return DetachtestPackage.eINSTANCE; - } - -} //DetachtestFactoryImpl diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachtest/impl/DetachtestPackageImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachtest/impl/DetachtestPackageImpl.java deleted file mode 100644 index cd099ec62..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachtest/impl/DetachtestPackageImpl.java +++ /dev/null @@ -1,373 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: DetachtestPackageImpl.java,v 1.4 2007/07/04 19:45:41 mtaal Exp $ - */ -package org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -import org.eclipse.emf.ecore.impl.EPackageImpl; - -import org.eclipse.emf.ecore.xml.type.XMLTypePackage; - -import org.eclipse.emf.ecore.xml.type.impl.XMLTypePackageImpl; - -import org.eclipse.emf.teneo.samples.emf.detach.detachtest.DetachtestFactory; -import org.eclipse.emf.teneo.samples.emf.detach.detachtest.DetachtestPackage; -import org.eclipse.emf.teneo.samples.emf.detach.detachtest.TestA; -import org.eclipse.emf.teneo.samples.emf.detach.detachtest.TestB; -import org.eclipse.emf.teneo.samples.emf.detach.detachtest.TestC; - -/** - * <!-- begin-user-doc --> - * An implementation of the model <b>Package</b>. - * <!-- end-user-doc --> - * @generated - */ -public class DetachtestPackageImpl extends EPackageImpl implements DetachtestPackage { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass testAEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass testBEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass testCEClass = null; - - /** - * Creates an instance of the model <b>Package</b>, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package - * package URI value. - * <p>Note: the correct way to create the package is via the static - * factory method {@link #init init()}, which also performs - * initialization of the package, or returns the registered package, - * if one already exists. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see org.eclipse.emf.teneo.samples.emf.detach.detachtest.DetachtestPackage#eNS_URI - * @see #init() - * @generated - */ - private DetachtestPackageImpl() { - super(eNS_URI, DetachtestFactory.eINSTANCE); - } - - /** - * <!-- 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 --> - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static DetachtestPackage init() { - if (isInited) return (DetachtestPackage)EPackage.Registry.INSTANCE.getEPackage(DetachtestPackage.eNS_URI); - - // Obtain or create and register package - DetachtestPackageImpl theDetachtestPackage = (DetachtestPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof DetachtestPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new DetachtestPackageImpl()); - - isInited = true; - - // Initialize simple dependencies - XMLTypePackage.eINSTANCE.eClass(); - - // Create package meta-data objects - theDetachtestPackage.createPackageContents(); - - // Initialize created meta-data - theDetachtestPackage.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theDetachtestPackage.freeze(); - - return theDetachtestPackage; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getTestA() { - return testAEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getTestA_Code() { - return (EAttribute)testAEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getTestA_TestB() { - return (EReference)testAEClass.getEStructuralFeatures().get(1); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getTestB() { - return testBEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getTestB_Code() { - return (EAttribute)testBEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getTestC() { - return testCEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getTestC_Code() { - return (EAttribute)testCEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getTestC_MyDate() { - return (EAttribute)testCEClass.getEStructuralFeatures().get(1); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getTestC_TestB() { - return (EReference)testCEClass.getEStructuralFeatures().get(2); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public DetachtestFactory getDetachtestFactory() { - return (DetachtestFactory)getEFactoryInstance(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void createPackageContents() { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - testAEClass = createEClass(TEST_A); - createEAttribute(testAEClass, TEST_A__CODE); - createEReference(testAEClass, TEST_A__TEST_B); - - testBEClass = createEClass(TEST_B); - createEAttribute(testBEClass, TEST_B__CODE); - - testCEClass = createEClass(TEST_C); - createEAttribute(testCEClass, TEST_C__CODE); - createEAttribute(testCEClass, TEST_C__MY_DATE); - createEReference(testCEClass, TEST_C__TEST_B); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void initializePackageContents() { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI); - - // Create type parameters - - // Set bounds for type parameters - - // Add supertypes to classes - - // Initialize classes and features; add operations and parameters - initEClass(testAEClass, TestA.class, "TestA", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getTestA_Code(), theXMLTypePackage.getString(), "code", null, 1, 1, TestA.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getTestA_TestB(), this.getTestB(), null, "testB", null, 1, 1, TestA.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(testBEClass, TestB.class, "TestB", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getTestB_Code(), theXMLTypePackage.getString(), "code", null, 1, 1, TestB.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(testCEClass, TestC.class, "TestC", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getTestC_Code(), theXMLTypePackage.getString(), "code", null, 1, 1, TestC.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getTestC_MyDate(), theXMLTypePackage.getDate(), "myDate", null, 1, 1, TestC.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getTestC_TestB(), this.getTestB(), null, "testB", null, 1, -1, TestC.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); - - // Create annotations - // http:///org/eclipse/emf/ecore/util/ExtendedMetaData - createExtendedMetaDataAnnotations(); - } - - /** - * Initializes the annotations for <b>http:///org/eclipse/emf/ecore/util/ExtendedMetaData</b>. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected void createExtendedMetaDataAnnotations() { - String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; - addAnnotation - (testAEClass, - source, - new String[] { - "name", "TestA", - "kind", "elementOnly" - }); - addAnnotation - (getTestA_Code(), - source, - new String[] { - "kind", "element", - "name", "code" - }); - addAnnotation - (getTestA_TestB(), - source, - new String[] { - "kind", "element", - "name", "testB" - }); - addAnnotation - (testBEClass, - source, - new String[] { - "name", "TestB", - "kind", "elementOnly" - }); - addAnnotation - (getTestB_Code(), - source, - new String[] { - "kind", "element", - "name", "code" - }); - addAnnotation - (testCEClass, - source, - new String[] { - "name", "TestC", - "kind", "elementOnly" - }); - addAnnotation - (getTestC_Code(), - source, - new String[] { - "kind", "element", - "name", "code" - }); - addAnnotation - (getTestC_MyDate(), - source, - new String[] { - "kind", "element", - "name", "myDate" - }); - addAnnotation - (getTestC_TestB(), - source, - new String[] { - "kind", "element", - "name", "testB" - }); - } - -} //DetachtestPackageImpl diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachtest/impl/TestAImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachtest/impl/TestAImpl.java deleted file mode 100644 index 0faf87aac..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachtest/impl/TestAImpl.java +++ /dev/null @@ -1,250 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: TestAImpl.java,v 1.4 2007/07/04 19:45:41 mtaal Exp $ - */ -package org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; - -import org.eclipse.emf.teneo.samples.emf.detach.detachtest.DetachtestPackage; -import org.eclipse.emf.teneo.samples.emf.detach.detachtest.TestA; -import org.eclipse.emf.teneo.samples.emf.detach.detachtest.TestB; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Test A</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl.TestAImpl#getCode <em>Code</em>}</li> - * <li>{@link org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl.TestAImpl#getTestB <em>Test B</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class TestAImpl extends EObjectImpl implements TestA { - /** - * The default value of the '{@link #getCode() <em>Code</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getCode() - * @generated - * @ordered - */ - protected static final String CODE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getCode() <em>Code</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getCode() - * @generated - * @ordered - */ - protected String code = CODE_EDEFAULT; - - /** - * The cached value of the '{@link #getTestB() <em>Test B</em>}' containment reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getTestB() - * @generated - * @ordered - */ - protected TestB testB; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected TestAImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - protected EClass eStaticClass() { - return DetachtestPackage.Literals.TEST_A; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getCode() { - return code; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setCode(String newCode) { - String oldCode = code; - code = newCode; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DetachtestPackage.TEST_A__CODE, oldCode, code)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public TestB getTestB() { - return testB; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain basicSetTestB(TestB newTestB, NotificationChain msgs) { - TestB oldTestB = testB; - testB = newTestB; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DetachtestPackage.TEST_A__TEST_B, oldTestB, newTestB); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setTestB(TestB newTestB) { - if (newTestB != testB) { - NotificationChain msgs = null; - if (testB != null) - msgs = ((InternalEObject)testB).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DetachtestPackage.TEST_A__TEST_B, null, msgs); - if (newTestB != null) - msgs = ((InternalEObject)newTestB).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DetachtestPackage.TEST_A__TEST_B, null, msgs); - msgs = basicSetTestB(newTestB, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DetachtestPackage.TEST_A__TEST_B, newTestB, newTestB)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case DetachtestPackage.TEST_A__TEST_B: - return basicSetTestB(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case DetachtestPackage.TEST_A__CODE: - return getCode(); - case DetachtestPackage.TEST_A__TEST_B: - return getTestB(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case DetachtestPackage.TEST_A__CODE: - setCode((String)newValue); - return; - case DetachtestPackage.TEST_A__TEST_B: - setTestB((TestB)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case DetachtestPackage.TEST_A__CODE: - setCode(CODE_EDEFAULT); - return; - case DetachtestPackage.TEST_A__TEST_B: - setTestB((TestB)null); - return; - } - super.eUnset(featureID); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case DetachtestPackage.TEST_A__CODE: - return CODE_EDEFAULT == null ? code != null : !CODE_EDEFAULT.equals(code); - case DetachtestPackage.TEST_A__TEST_B: - return testB != null; - } - return super.eIsSet(featureID); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (code: "); - result.append(code); - result.append(')'); - return result.toString(); - } - -} //TestAImpl diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachtest/impl/TestBImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachtest/impl/TestBImpl.java deleted file mode 100644 index d1cfa5069..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachtest/impl/TestBImpl.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: TestBImpl.java,v 1.2 2007/02/08 23:09:23 mtaal Exp $ - */ -package org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl; - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; - -import org.eclipse.emf.teneo.samples.emf.detach.detachtest.DetachtestPackage; -import org.eclipse.emf.teneo.samples.emf.detach.detachtest.TestB; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Test B</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl.TestBImpl#getCode <em>Code</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class TestBImpl extends EObjectImpl implements TestB { - /** - * The default value of the '{@link #getCode() <em>Code</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getCode() - * @generated - * @ordered - */ - protected static final String CODE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getCode() <em>Code</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getCode() - * @generated - * @ordered - */ - protected String code = CODE_EDEFAULT; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected TestBImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - protected EClass eStaticClass() { - return DetachtestPackage.Literals.TEST_B; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getCode() { - return code; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setCode(String newCode) { - String oldCode = code; - code = newCode; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DetachtestPackage.TEST_B__CODE, oldCode, code)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case DetachtestPackage.TEST_B__CODE: - return getCode(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case DetachtestPackage.TEST_B__CODE: - setCode((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case DetachtestPackage.TEST_B__CODE: - setCode(CODE_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case DetachtestPackage.TEST_B__CODE: - return CODE_EDEFAULT == null ? code != null : !CODE_EDEFAULT.equals(code); - } - return super.eIsSet(featureID); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (code: "); - result.append(code); - result.append(')'); - return result.toString(); - } - -} //TestBImpl diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachtest/impl/TestCImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachtest/impl/TestCImpl.java deleted file mode 100644 index b69f3de44..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachtest/impl/TestCImpl.java +++ /dev/null @@ -1,282 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: TestCImpl.java,v 1.3 2007/07/04 19:29:56 mtaal Exp $ - */ -package org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl; - -import java.util.Collection; - -import javax.xml.datatype.XMLGregorianCalendar; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; - -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; - -import org.eclipse.emf.teneo.samples.emf.detach.detachtest.DetachtestPackage; -import org.eclipse.emf.teneo.samples.emf.detach.detachtest.TestB; -import org.eclipse.emf.teneo.samples.emf.detach.detachtest.TestC; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Test C</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl.TestCImpl#getCode <em>Code</em>}</li> - * <li>{@link org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl.TestCImpl#getMyDate <em>My Date</em>}</li> - * <li>{@link org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl.TestCImpl#getTestB <em>Test B</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class TestCImpl extends EObjectImpl implements TestC { - /** - * The default value of the '{@link #getCode() <em>Code</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getCode() - * @generated - * @ordered - */ - protected static final String CODE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getCode() <em>Code</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getCode() - * @generated - * @ordered - */ - protected String code = CODE_EDEFAULT; - - /** - * The default value of the '{@link #getMyDate() <em>My Date</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getMyDate() - * @generated - * @ordered - */ - protected static final XMLGregorianCalendar MY_DATE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getMyDate() <em>My Date</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getMyDate() - * @generated - * @ordered - */ - protected XMLGregorianCalendar myDate = MY_DATE_EDEFAULT; - - /** - * The cached value of the '{@link #getTestB() <em>Test B</em>}' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getTestB() - * @generated - * @ordered - */ - protected EList<TestB> testB; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected TestCImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - protected EClass eStaticClass() { - return DetachtestPackage.Literals.TEST_C; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getCode() { - return code; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setCode(String newCode) { - String oldCode = code; - code = newCode; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DetachtestPackage.TEST_C__CODE, oldCode, code)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public XMLGregorianCalendar getMyDate() { - return myDate; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setMyDate(XMLGregorianCalendar newMyDate) { - XMLGregorianCalendar oldMyDate = myDate; - myDate = newMyDate; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, DetachtestPackage.TEST_C__MY_DATE, oldMyDate, myDate)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EList<TestB> getTestB() { - if (testB == null) { - testB = new EObjectContainmentEList<TestB>(TestB.class, this, DetachtestPackage.TEST_C__TEST_B); - } - return testB; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case DetachtestPackage.TEST_C__TEST_B: - return ((InternalEList<?>)getTestB()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case DetachtestPackage.TEST_C__CODE: - return getCode(); - case DetachtestPackage.TEST_C__MY_DATE: - return getMyDate(); - case DetachtestPackage.TEST_C__TEST_B: - return getTestB(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case DetachtestPackage.TEST_C__CODE: - setCode((String)newValue); - return; - case DetachtestPackage.TEST_C__MY_DATE: - setMyDate((XMLGregorianCalendar)newValue); - return; - case DetachtestPackage.TEST_C__TEST_B: - getTestB().clear(); - getTestB().addAll((Collection<? extends TestB>)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case DetachtestPackage.TEST_C__CODE: - setCode(CODE_EDEFAULT); - return; - case DetachtestPackage.TEST_C__MY_DATE: - setMyDate(MY_DATE_EDEFAULT); - return; - case DetachtestPackage.TEST_C__TEST_B: - getTestB().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case DetachtestPackage.TEST_C__CODE: - return CODE_EDEFAULT == null ? code != null : !CODE_EDEFAULT.equals(code); - case DetachtestPackage.TEST_C__MY_DATE: - return MY_DATE_EDEFAULT == null ? myDate != null : !MY_DATE_EDEFAULT.equals(myDate); - case DetachtestPackage.TEST_C__TEST_B: - return testB != null && !testB.isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (code: "); - result.append(code); - result.append(", myDate: "); - result.append(myDate); - result.append(')'); - return result.toString(); - } - -} //TestCImpl diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachtest/impl/package.jdo b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachtest/impl/package.jdo deleted file mode 100644 index 7ee44e33e..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/detach/detachtest/impl/package.jdo +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE jdo SYSTEM "file:/javax/jdo/jdo.dtd"> - -<jdo> - <package name="org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl"> - <class name="org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl.TestAImpl" requires-extent="true" persistence-modifier="persistence-capable" detachable="true" table="testa" identity-type="datastore"> - <implements name="org.eclipse.emf.teneo.samples.emf.detach.detachtest.TestA"/> - <implements name="org.eclipse.emf.ecore.EObject"/> - <implements name="org.eclipse.emf.common.notify.Notifier"/> - <inheritance strategy="new-table"> - <discriminator column="dtype" strategy="value-map" value="TestA"/> - </inheritance> - <version strategy="version-number" column="e_version"/> - <field name="code" persistence-modifier="persistent" null-value="exception"/> - <field name="testB" persistence-modifier="persistent" dependent="true" delete-action="restrict" null-value="none"> - <foreign-key name="testa_testb"/> - <column name="testb_testb_e_id" allows-null="false"/> - <extension vendor-name="jpox" key="implementation-classes" value="org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl.TestBImpl"/> - </field> - </class> - <class name="org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl.TestBImpl" requires-extent="true" persistence-modifier="persistence-capable" detachable="true" table="testb" identity-type="datastore"> - <implements name="org.eclipse.emf.teneo.samples.emf.detach.detachtest.TestB"/> - <implements name="org.eclipse.emf.ecore.EObject"/> - <implements name="org.eclipse.emf.common.notify.Notifier"/> - <inheritance strategy="new-table"> - <discriminator column="dtype" strategy="value-map" value="TestB"/> - </inheritance> - <version strategy="version-number" column="e_version"/> - <field name="code" persistence-modifier="persistent" null-value="exception"/> - </class> - <class name="org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl.TestCImpl" requires-extent="true" persistence-modifier="persistence-capable" detachable="true" table="testc" identity-type="datastore"> - <implements name="org.eclipse.emf.teneo.samples.emf.detach.detachtest.TestC"/> - <implements name="org.eclipse.emf.ecore.EObject"/> - <implements name="org.eclipse.emf.common.notify.Notifier"/> - <inheritance strategy="new-table"> - <discriminator column="dtype" strategy="value-map" value="TestC"/> - </inheritance> - <version strategy="version-number" column="e_version"/> - <field name="code" persistence-modifier="persistent" null-value="exception"/> - <field name="myDate" persistence-modifier="persistent" null-value="exception" embedded="true"/> - <field name="testB" persistence-modifier="persistent" delete-action="restrict"> - <collection element-type="org.eclipse.emf.teneo.samples.emf.detach.detachtest.impl.TestBImpl" dependent-element="true"> - <extension vendor-name="jpox" key="cache-lazy-loading" value="true"/> - </collection> - <element> - <column name="testc_testb_e_id" allows-null="true"/> - </element> - <order column="TESTC_TESTB_IDX"/> - <foreign-key delete-action="cascade" update-action="cascade" name="testc_testb"/> - </field> - </class> - </package> -</jdo>
\ No newline at end of file |