diff options
Diffstat (limited to 'examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid')
19 files changed, 0 insertions, 1919 deletions
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/Child.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/Child.java deleted file mode 100644 index 016ea0c3d..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/Child.java +++ /dev/null @@ -1,21 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: Child.java,v 1.1 2006/07/11 16:56:57 mtaal Exp $ - */ -package org.eclipse.emf.teneo.samples.emf.annotations.compositeid; - - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Child</b></em>'. - * <!-- end-user-doc --> - * - * - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.CompositeidPackage#getChild() - * @model - * @generated - */ -public interface Child extends Person { -} // Child diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/CompositeidFactory.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/CompositeidFactory.java deleted file mode 100644 index 3d171e78d..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/CompositeidFactory.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: CompositeidFactory.java,v 1.1 2006/07/11 16:56:57 mtaal Exp $ - */ -package org.eclipse.emf.teneo.samples.emf.annotations.compositeid; - -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.teneo.samples.emf.annotations.compositeid.CompositeidPackage - * @generated - */ -public interface CompositeidFactory extends EFactory { - /** - * The singleton instance of the factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - CompositeidFactory eINSTANCE = org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.CompositeidFactoryImpl.init(); - - /** - * Returns a new object of class '<em>Parent</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>Parent</em>'. - * @generated - */ - Parent createParent(); - - /** - * Returns a new object of class '<em>Child</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>Child</em>'. - * @generated - */ - Child createChild(); - - /** - * Returns a new object of class '<em>Person</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>Person</em>'. - * @generated - */ - Person createPerson(); - - /** - * Returns the package supported by this factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the package supported by this factory. - * @generated - */ - CompositeidPackage getCompositeidPackage(); - -} //CompositeidFactory diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/CompositeidPackage.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/CompositeidPackage.java deleted file mode 100644 index 1dc357658..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/CompositeidPackage.java +++ /dev/null @@ -1,324 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: CompositeidPackage.java,v 1.1 2006/07/11 16:56:57 mtaal Exp $ - */ -package org.eclipse.emf.teneo.samples.emf.annotations.compositeid; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -/** - * <!-- begin-user-doc --> - * The <b>Package</b> for the model. - * It contains accessors for the meta objects to represent - * <ul> - * <li>each class,</li> - * <li>each feature of each class,</li> - * <li>each enum,</li> - * <li>and each data type</li> - * </ul> - * <!-- end-user-doc --> - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.CompositeidFactory - * @model kind="package" - * @generated - */ -public interface CompositeidPackage extends EPackage { - /** - * The package name. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String eNAME = "compositeid"; - - /** - * The package namespace URI. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String eNS_URI = "http:///org/elver/samples/emf/annotations/compositeid.ecore"; - - /** - * The package namespace name. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - String eNS_PREFIX = "org.eclipse.emf.teneo.samples.emf.annotations.compositeid"; - - /** - * The singleton instance of the package. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - CompositeidPackage eINSTANCE = org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.CompositeidPackageImpl.init(); - - /** - * The meta object id for the '{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.PersonImpl <em>Person</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.PersonImpl - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.CompositeidPackageImpl#getPerson() - * @generated - */ - int PERSON = 2; - - /** - * The feature id for the '<em><b>First Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PERSON__FIRST_NAME = 0; - - /** - * The feature id for the '<em><b>Last Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PERSON__LAST_NAME = 1; - - /** - * The number of structural features of the '<em>Person</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PERSON_FEATURE_COUNT = 2; - - /** - * The meta object id for the '{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.ParentImpl <em>Parent</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.ParentImpl - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.CompositeidPackageImpl#getParent() - * @generated - */ - int PARENT = 0; - - /** - * The feature id for the '<em><b>First Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARENT__FIRST_NAME = PERSON__FIRST_NAME; - - /** - * The feature id for the '<em><b>Last Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARENT__LAST_NAME = PERSON__LAST_NAME; - - /** - * The feature id for the '<em><b>Children</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARENT__CHILDREN = PERSON_FEATURE_COUNT + 0; - - /** - * The number of structural features of the '<em>Parent</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PARENT_FEATURE_COUNT = PERSON_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.ChildImpl <em>Child</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.ChildImpl - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.CompositeidPackageImpl#getChild() - * @generated - */ - int CHILD = 1; - - /** - * The feature id for the '<em><b>First Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int CHILD__FIRST_NAME = PERSON__FIRST_NAME; - - /** - * The feature id for the '<em><b>Last Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int CHILD__LAST_NAME = PERSON__LAST_NAME; - - /** - * The number of structural features of the '<em>Child</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int CHILD_FEATURE_COUNT = PERSON_FEATURE_COUNT + 0; - - - /** - * Returns the meta object for class '{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Parent <em>Parent</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>Parent</em>'. - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Parent - * @generated - */ - EClass getParent(); - - /** - * Returns the meta object for the reference list '{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Parent#getChildren <em>Children</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the reference list '<em>Children</em>'. - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Parent#getChildren() - * @see #getParent() - * @generated - */ - EReference getParent_Children(); - - /** - * Returns the meta object for class '{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Child <em>Child</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>Child</em>'. - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Child - * @generated - */ - EClass getChild(); - - /** - * Returns the meta object for class '{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Person <em>Person</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>Person</em>'. - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Person - * @generated - */ - EClass getPerson(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Person#getFirstName <em>First Name</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>First Name</em>'. - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Person#getFirstName() - * @see #getPerson() - * @generated - */ - EAttribute getPerson_FirstName(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Person#getLastName <em>Last Name</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Last Name</em>'. - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Person#getLastName() - * @see #getPerson() - * @generated - */ - EAttribute getPerson_LastName(); - - /** - * Returns the factory that creates the instances of the model. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the factory that creates the instances of the model. - * @generated - */ - CompositeidFactory getCompositeidFactory(); - - /** - * <!-- begin-user-doc --> - * Defines literals for the meta objects that represent - * <ul> - * <li>each class,</li> - * <li>each feature of each class,</li> - * <li>each enum,</li> - * <li>and each data type</li> - * </ul> - * <!-- end-user-doc --> - * @generated - */ - interface Literals { - /** - * The meta object literal for the '{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.ParentImpl <em>Parent</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.ParentImpl - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.CompositeidPackageImpl#getParent() - * @generated - */ - EClass PARENT = eINSTANCE.getParent(); - - /** - * The meta object literal for the '<em><b>Children</b></em>' reference list feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EReference PARENT__CHILDREN = eINSTANCE.getParent_Children(); - - /** - * The meta object literal for the '{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.ChildImpl <em>Child</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.ChildImpl - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.CompositeidPackageImpl#getChild() - * @generated - */ - EClass CHILD = eINSTANCE.getChild(); - - /** - * The meta object literal for the '{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.PersonImpl <em>Person</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.PersonImpl - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.CompositeidPackageImpl#getPerson() - * @generated - */ - EClass PERSON = eINSTANCE.getPerson(); - - /** - * The meta object literal for the '<em><b>First Name</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute PERSON__FIRST_NAME = eINSTANCE.getPerson_FirstName(); - - /** - * The meta object literal for the '<em><b>Last Name</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute PERSON__LAST_NAME = eINSTANCE.getPerson_LastName(); - - } - -} //CompositeidPackage diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/Parent.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/Parent.java deleted file mode 100644 index ce780b4e6..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/Parent.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: Parent.java,v 1.5 2008/04/06 13:45:43 mtaal Exp $ - */ -package org.eclipse.emf.teneo.samples.emf.annotations.compositeid; - -import org.eclipse.emf.common.util.EList; - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Parent</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Parent#getChildren <em>Children</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.CompositeidPackage#getParent() - * @model - * @generated - */ -public interface Parent extends Person { - /** - * Returns the value of the '<em><b>Children</b></em>' reference list. - * The list contents are of type {@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Child}. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Children</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>Children</em>' reference list. - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.CompositeidPackage#getParent_Children() - * @model annotation="teneo.jpa appinfo='@JoinColumns({\n\t@JoinColumn(name=\"myParentFirstName\", referencedColumnName=\"firstName\"),\n\t@JoinColumn(name=\"myParentLastName\", referencedColumnName=\"lastName\")\n})'" - * @generated - */ - EList<Child> getChildren(); - -} // Parent diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/Person.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/Person.java deleted file mode 100644 index 81457ccfa..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/Person.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: Person.java,v 1.2 2006/11/07 10:22:28 mtaal Exp $ - */ -package org.eclipse.emf.teneo.samples.emf.annotations.compositeid; - -import org.eclipse.emf.ecore.EObject; - -/** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Person</b></em>'. - * <!-- end-user-doc --> - * - * <p> - * The following features are supported: - * <ul> - * <li>{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Person#getFirstName <em>First Name</em>}</li> - * <li>{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Person#getLastName <em>Last Name</em>}</li> - * </ul> - * </p> - * - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.CompositeidPackage#getPerson() - * @model annotation="teneo.jpa appinfo='@IdClass(org.eclipse.emf.teneo.samples.emf.annotations.compositeid.PersonID)'" - * @generated - */ -public interface Person extends EObject { - /** - * Returns the value of the '<em><b>First Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>First 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>First Name</em>' attribute. - * @see #setFirstName(String) - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.CompositeidPackage#getPerson_FirstName() - * @model annotation="teneo.jpa appinfo='@Id'" - * @generated - */ - String getFirstName(); - - /** - * Sets the value of the '{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Person#getFirstName <em>First Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>First Name</em>' attribute. - * @see #getFirstName() - * @generated - */ - void setFirstName(String value); - - /** - * Returns the value of the '<em><b>Last Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Last 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>Last Name</em>' attribute. - * @see #setLastName(String) - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.CompositeidPackage#getPerson_LastName() - * @model annotation="teneo.jpa appinfo='@Id'" - * @generated - */ - String getLastName(); - - /** - * Sets the value of the '{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Person#getLastName <em>Last Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Last Name</em>' attribute. - * @see #getLastName() - * @generated - */ - void setLastName(String value); - -} // Person diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/PersonID.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/PersonID.java deleted file mode 100644 index 5f45f1ea9..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/PersonID.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * <copyright> - * - * Copyright (c) 2005, 2006, 2007, 2008 Springsite BV (The Netherlands) and others - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Martin Taal - * </copyright> - * - * $Id: PersonID.java,v 1.4 2008/02/28 07:08:07 mtaal Exp $ - */ - -package org.eclipse.emf.teneo.samples.emf.annotations.compositeid; - - -import java.io.Serializable; - -/** - * The id class used in the composite id test case - * - * @author <a href="mailto:mtaal@elver.org">Martin Taal</a> - * @version $Revision: 1.4 $ -*/ -public class PersonID implements Serializable { - - private static String delimiter = "__;__"; - - public String firstName; - public String lastName; - - /** No-arg constructor */ - public PersonID() {} - - /** Arg constructor */ - public PersonID(String idString) { - String[] fields = idString.split(delimiter); - firstName = fields[0]; - lastName = fields[1]; - } - - public int hashCode() { - return firstName.hashCode() + lastName.hashCode(); - } - - public String toString() { - return firstName + delimiter + lastName; - } - - public boolean equals(Object other) { - if (other != null && (other instanceof PersonID)) { - PersonID p = (PersonID)other; - return p.firstName.equals(firstName) && p.lastName.equals(lastName); - } - return false; - } - - /** - * @return the firstName - */ - public String getFirstName() { - return firstName; - } - - /** - * @param firstName the firstName to set - */ - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - /** - * @return the lastName - */ - public String getLastName() { - return lastName; - } - - /** - * @param lastName the lastName to set - */ - public void setLastName(String lastName) { - this.lastName = lastName; - } -}
\ No newline at end of file diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/impl/ChildImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/impl/ChildImpl.java deleted file mode 100644 index 8e8a088b4..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/impl/ChildImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: ChildImpl.java,v 1.4 2007/02/08 23:09:17 mtaal Exp $ - */ -package org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Child; -import org.eclipse.emf.teneo.samples.emf.annotations.compositeid.CompositeidPackage; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Child</b></em>'. - * <!-- end-user-doc --> - * <p> - * </p> - * - * @generated - */ -public class ChildImpl extends PersonImpl implements Child { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected ChildImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - protected EClass eStaticClass() { - return CompositeidPackage.Literals.CHILD; - } - -} //ChildImpl
\ No newline at end of file diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/impl/CompositeidFactoryImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/impl/CompositeidFactoryImpl.java deleted file mode 100644 index 63b5c7855..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/impl/CompositeidFactoryImpl.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: CompositeidFactoryImpl.java,v 1.6 2007/02/08 23:09:17 mtaal Exp $ - */ -package org.eclipse.emf.teneo.samples.emf.annotations.compositeid.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.annotations.compositeid.*; - -import org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Child; -import org.eclipse.emf.teneo.samples.emf.annotations.compositeid.CompositeidFactory; -import org.eclipse.emf.teneo.samples.emf.annotations.compositeid.CompositeidPackage; -import org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Parent; -import org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Person; - -/** - * <!-- begin-user-doc --> - * An implementation of the model <b>Factory</b>. - * <!-- end-user-doc --> - * @generated - */ -public class CompositeidFactoryImpl extends EFactoryImpl implements CompositeidFactory { - /** - * Creates the default factory implementation. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public static CompositeidFactory init() { - try { - CompositeidFactory theCompositeidFactory = (CompositeidFactory)EPackage.Registry.INSTANCE.getEFactory("http:///org/elver/samples/emf/annotations/compositeid.ecore"); - if (theCompositeidFactory != null) { - return theCompositeidFactory; - } - } - catch (Exception exception) { - EcorePlugin.INSTANCE.log(exception); - } - return new CompositeidFactoryImpl(); - } - - /** - * Creates an instance of the factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public CompositeidFactoryImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case CompositeidPackage.PARENT: return createParent(); - case CompositeidPackage.CHILD: return createChild(); - case CompositeidPackage.PERSON: return createPerson(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Parent createParent() { - ParentImpl parent = new ParentImpl(); - return parent; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Child createChild() { - ChildImpl child = new ChildImpl(); - return child; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Person createPerson() { - PersonImpl person = new PersonImpl(); - return person; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public CompositeidPackage getCompositeidPackage() { - return (CompositeidPackage)getEPackage(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @deprecated - * @generated - */ - @Deprecated - public static CompositeidPackage getPackage() { - return CompositeidPackage.eINSTANCE; - } - -} //CompositeidFactoryImpl diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/impl/CompositeidPackageImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/impl/CompositeidPackageImpl.java deleted file mode 100644 index 665acc4b1..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/impl/CompositeidPackageImpl.java +++ /dev/null @@ -1,291 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: CompositeidPackageImpl.java,v 1.6 2008/04/06 13:45:43 mtaal Exp $ - */ -package org.eclipse.emf.teneo.samples.emf.annotations.compositeid.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.teneo.samples.emf.annotations.compositeid.Child; -import org.eclipse.emf.teneo.samples.emf.annotations.compositeid.CompositeidFactory; -import org.eclipse.emf.teneo.samples.emf.annotations.compositeid.CompositeidPackage; -import org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Parent; -import org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Person; - -/** - * <!-- begin-user-doc --> - * An implementation of the model <b>Package</b>. - * <!-- end-user-doc --> - * @generated - */ -public class CompositeidPackageImpl extends EPackageImpl implements CompositeidPackage { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass parentEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass childEClass = null; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass personEClass = 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.annotations.compositeid.CompositeidPackage#eNS_URI - * @see #init() - * @generated - */ - private CompositeidPackageImpl() { - super(eNS_URI, CompositeidFactory.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 CompositeidPackage init() { - if (isInited) return (CompositeidPackage)EPackage.Registry.INSTANCE.getEPackage(CompositeidPackage.eNS_URI); - - // Obtain or create and register package - CompositeidPackageImpl theCompositeidPackage = (CompositeidPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof CompositeidPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new CompositeidPackageImpl()); - - isInited = true; - - // Create package meta-data objects - theCompositeidPackage.createPackageContents(); - - // Initialize created meta-data - theCompositeidPackage.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theCompositeidPackage.freeze(); - - return theCompositeidPackage; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getParent() { - return parentEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EReference getParent_Children() { - return (EReference)parentEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getChild() { - return childEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getPerson() { - return personEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getPerson_FirstName() { - return (EAttribute)personEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getPerson_LastName() { - return (EAttribute)personEClass.getEStructuralFeatures().get(1); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public CompositeidFactory getCompositeidFactory() { - return (CompositeidFactory)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 - parentEClass = createEClass(PARENT); - createEReference(parentEClass, PARENT__CHILDREN); - - childEClass = createEClass(CHILD); - - personEClass = createEClass(PERSON); - createEAttribute(personEClass, PERSON__FIRST_NAME); - createEAttribute(personEClass, PERSON__LAST_NAME); - } - - /** - * <!-- 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); - - // Create type parameters - - // Set bounds for type parameters - - // Add supertypes to classes - parentEClass.getESuperTypes().add(this.getPerson()); - childEClass.getESuperTypes().add(this.getPerson()); - - // Initialize classes and features; add operations and parameters - initEClass(parentEClass, Parent.class, "Parent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getParent_Children(), this.getChild(), null, "children", null, 0, -1, Parent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(childEClass, Child.class, "Child", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(personEClass, Person.class, "Person", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getPerson_FirstName(), ecorePackage.getEString(), "firstName", null, 0, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getPerson_LastName(), ecorePackage.getEString(), "lastName", null, 0, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - // Create resource - createResource(eNS_URI); - - // Create annotations - // teneo.jpa - createTeneoAnnotations(); - } - - /** - * Initializes the annotations for <b>teneo.jpa</b>. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected void createTeneoAnnotations() { - String source = "teneo.jpa"; - addAnnotation - (getParent_Children(), - source, - new String[] { - "appinfo", "@JoinColumns({\n\t@JoinColumn(name=\"myParentFirstName\", referencedColumnName=\"firstName\"),\n\t@JoinColumn(name=\"myParentLastName\", referencedColumnName=\"lastName\")\n})" - }); - addAnnotation - (personEClass, - source, - new String[] { - "appinfo", "@IdClass(org.eclipse.emf.teneo.samples.emf.annotations.compositeid.PersonID)" - }); - addAnnotation - (getPerson_FirstName(), - source, - new String[] { - "appinfo", "@Id" - }); - addAnnotation - (getPerson_LastName(), - source, - new String[] { - "appinfo", "@Id" - }); - } - -} //CompositeidPackageImpl diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/impl/ParentImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/impl/ParentImpl.java deleted file mode 100644 index d6ca28c38..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/impl/ParentImpl.java +++ /dev/null @@ -1,133 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: ParentImpl.java,v 1.5 2008/04/06 13:45:43 mtaal Exp $ - */ -package org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.util.EObjectResolvingEList; -import org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Child; -import org.eclipse.emf.teneo.samples.emf.annotations.compositeid.CompositeidPackage; -import org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Parent; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Parent</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.ParentImpl#getChildren <em>Children</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class ParentImpl extends PersonImpl implements Parent { - /** - * The cached value of the '{@link #getChildren() <em>Children</em>}' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getChildren() - * @generated - * @ordered - */ - protected EList<Child> children; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected ParentImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - protected EClass eStaticClass() { - return CompositeidPackage.Literals.PARENT; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EList<Child> getChildren() { - if (children == null) { - children = new EObjectResolvingEList<Child>(Child.class, this, CompositeidPackage.PARENT__CHILDREN); - } - return children; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case CompositeidPackage.PARENT__CHILDREN: - return getChildren(); - } - 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 CompositeidPackage.PARENT__CHILDREN: - getChildren().clear(); - getChildren().addAll((Collection<? extends Child>)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case CompositeidPackage.PARENT__CHILDREN: - getChildren().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case CompositeidPackage.PARENT__CHILDREN: - return children != null && !children.isEmpty(); - } - return super.eIsSet(featureID); - } - -} //ParentImpl
\ No newline at end of file diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/impl/PersonImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/impl/PersonImpl.java deleted file mode 100644 index 8cd58aaea..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/impl/PersonImpl.java +++ /dev/null @@ -1,218 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: PersonImpl.java,v 1.4 2007/02/08 23:09:17 mtaal Exp $ - */ -package org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.teneo.samples.emf.annotations.compositeid.CompositeidPackage; -import org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Person; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Person</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * <ul> - * <li>{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.PersonImpl#getFirstName <em>First Name</em>}</li> - * <li>{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.PersonImpl#getLastName <em>Last Name</em>}</li> - * </ul> - * </p> - * - * @generated - */ -public class PersonImpl extends EObjectImpl implements Person { - /** - * The default value of the '{@link #getFirstName() <em>First Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getFirstName() - * @generated - * @ordered - */ - protected static final String FIRST_NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getFirstName() <em>First Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getFirstName() - * @generated - * @ordered - */ - protected String firstName = FIRST_NAME_EDEFAULT; - - /** - * The default value of the '{@link #getLastName() <em>Last Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getLastName() - * @generated - * @ordered - */ - protected static final String LAST_NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getLastName() <em>Last Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getLastName() - * @generated - * @ordered - */ - protected String lastName = LAST_NAME_EDEFAULT; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected PersonImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - protected EClass eStaticClass() { - return CompositeidPackage.Literals.PERSON; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getFirstName() { - return firstName; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setFirstName(String newFirstName) { - String oldFirstName = firstName; - firstName = newFirstName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CompositeidPackage.PERSON__FIRST_NAME, oldFirstName, firstName)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getLastName() { - return lastName; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setLastName(String newLastName) { - String oldLastName = lastName; - lastName = newLastName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, CompositeidPackage.PERSON__LAST_NAME, oldLastName, lastName)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case CompositeidPackage.PERSON__FIRST_NAME: - return getFirstName(); - case CompositeidPackage.PERSON__LAST_NAME: - return getLastName(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case CompositeidPackage.PERSON__FIRST_NAME: - setFirstName((String)newValue); - return; - case CompositeidPackage.PERSON__LAST_NAME: - setLastName((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case CompositeidPackage.PERSON__FIRST_NAME: - setFirstName(FIRST_NAME_EDEFAULT); - return; - case CompositeidPackage.PERSON__LAST_NAME: - setLastName(LAST_NAME_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case CompositeidPackage.PERSON__FIRST_NAME: - return FIRST_NAME_EDEFAULT == null ? firstName != null : !FIRST_NAME_EDEFAULT.equals(firstName); - case CompositeidPackage.PERSON__LAST_NAME: - return LAST_NAME_EDEFAULT == null ? lastName != null : !LAST_NAME_EDEFAULT.equals(lastName); - } - 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(" (firstName: "); - result.append(firstName); - result.append(", lastName: "); - result.append(lastName); - result.append(')'); - return result.toString(); - } - -} //PersonImpl
\ No newline at end of file diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/impl/package.jdo b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/impl/package.jdo deleted file mode 100644 index 39c061215..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/impl/package.jdo +++ /dev/null @@ -1,43 +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.annotations.compositeid.impl"> - <class name="org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.ParentImpl" requires-extent="true" persistence-modifier="persistence-capable" detachable="true" identity-type="application"> - <implements name="org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Parent"/> - <inheritance strategy="superclass-table"> - <discriminator value="Parent"/> - </inheritance> - <version strategy="version-number" column="e_version"/> - <field name="children" persistence-modifier="persistent" delete-action="restrict"> - <collection element-type="org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.ChildImpl" dependent-element="false"> - <extension vendor-name="jpox" key="cache-lazy-loading" value="true"/> - </collection> - <element> - <column name="myParentFirstName" allows-null="true"/> - <column name="myParentLastName" allows-null="true"/> - </element> - <order column="PARENT_CHILDREN_IDX"/> - <foreign-key delete-action="restrict" update-action="cascade" name="parent_children"/> - </field> - </class> - <class name="org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.ChildImpl" requires-extent="true" persistence-modifier="persistence-capable" detachable="true" identity-type="application"> - <implements name="org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Child"/> - <inheritance strategy="superclass-table"> - <discriminator value="Child"/> - </inheritance> - <version strategy="version-number" column="e_version"/> - </class> - <class name="org.eclipse.emf.teneo.samples.emf.annotations.compositeid.impl.PersonImpl" requires-extent="true" persistence-modifier="persistence-capable" detachable="true" objectid-class="org.eclipse.emf.teneo.samples.emf.annotations.compositeid.PersonID" table="person" identity-type="application"> - <implements name="org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Person"/> - <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="Person"/> - </inheritance> - <version strategy="version-number" column="e_version"/> - <field name="firstName" persistence-modifier="persistent" primary-key="true"/> - <field name="lastName" persistence-modifier="persistent" primary-key="true"/> - </class> - </package> -</jdo>
\ No newline at end of file diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/model/compositeid.ecore b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/model/compositeid.ecore deleted file mode 100644 index 72cb5840a..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/model/compositeid.ecore +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ecore:EPackage xmi:version="2.0" - 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="compositeid" - nsURI="http:///org/elver/samples/emf/annotations/compositeid.ecore" nsPrefix="org.eclipse.emf.teneo.samples.emf.annotations.compositeid"> - <eClassifiers xsi:type="ecore:EClass" name="Parent" eSuperTypes="#//Person"> - <eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1" - eType="#//Child"> - <eAnnotations source="teneo.jpa"> - <details key="appinfo" value="@JoinColumns({
	@JoinColumn(name="myParentFirstName", referencedColumnName="firstName"),
	@JoinColumn(name="myParentLastName", referencedColumnName="lastName")
})"/> - </eAnnotations> - </eStructuralFeatures> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="Child" eSuperTypes="#//Person"/> - <eClassifiers xsi:type="ecore:EClass" name="Person"> - <eAnnotations source="teneo.jpa"> - <details key="appinfo" value="@IdClass(org.eclipse.emf.teneo.samples.emf.annotations.compositeid.PersonID)"/> - </eAnnotations> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="firstName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> - <eAnnotations source="teneo.jpa"> - <details key="appinfo" value="@Id"/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="lastName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> - <eAnnotations source="teneo.jpa"> - <details key="appinfo" value="@Id"/> - </eAnnotations> - </eStructuralFeatures> - </eClassifiers> -</ecore:EPackage> diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/model/compositeid.genmodel b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/model/compositeid.genmodel deleted file mode 100644 index ce3000597..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/model/compositeid.genmodel +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<genmodel:GenModel xmi:version="2.0" - xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" - xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.emf.teneo.samples/src" - modelPluginID="org.eclipse.emf.teneo.samples" modelName="Compositeid" importerID="org.eclipse.emf.importer.ecore" - complianceLevel="5.0"> - <foreignModel>compositeid.ecore</foreignModel> - <genPackages prefix="Compositeid" basePackage="org.eclipse.emf.teneo.samples.emf.annotations" - disposableProviderFactory="true" ecorePackage="compositeid.ecore#/"> - <genClasses ecoreClass="compositeid.ecore#//Parent"> - <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference compositeid.ecore#//Parent/children"/> - </genClasses> - <genClasses ecoreClass="compositeid.ecore#//Child"/> - <genClasses ecoreClass="compositeid.ecore#//Person"> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute compositeid.ecore#//Person/firstName"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute compositeid.ecore#//Person/lastName"/> - </genClasses> - </genPackages> -</genmodel:GenModel> diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/util/CompositeidAdapterFactory.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/util/CompositeidAdapterFactory.java deleted file mode 100644 index 354f4f437..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/util/CompositeidAdapterFactory.java +++ /dev/null @@ -1,160 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: CompositeidAdapterFactory.java,v 1.2 2007/02/08 23:09:26 mtaal Exp $ - */ -package org.eclipse.emf.teneo.samples.emf.annotations.compositeid.util; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; - -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; - -import org.eclipse.emf.ecore.EObject; - -import org.eclipse.emf.teneo.samples.emf.annotations.compositeid.*; - -/** - * <!-- 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.teneo.samples.emf.annotations.compositeid.CompositeidPackage - * @generated - */ -public class CompositeidAdapterFactory extends AdapterFactoryImpl { - /** - * The cached model package. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected static CompositeidPackage modelPackage; - - /** - * Creates an instance of the adapter factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public CompositeidAdapterFactory() { - if (modelPackage == null) { - modelPackage = CompositeidPackage.eINSTANCE; - } - } - - /** - * Returns whether this factory is applicable for the type of the object. - * <!-- begin-user-doc --> - * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. - * <!-- end-user-doc --> - * @return whether this factory is applicable for the type of the object. - * @generated - */ - @Override - public boolean isFactoryForType(Object object) { - if (object == modelPackage) { - return true; - } - if (object instanceof EObject) { - return ((EObject)object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch the delegates to the <code>createXXX</code> methods. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected CompositeidSwitch<Adapter> modelSwitch = - new CompositeidSwitch<Adapter>() { - @Override - public Adapter caseParent(Parent object) { - return createParentAdapter(); - } - @Override - public Adapter caseChild(Child object) { - return createChildAdapter(); - } - @Override - public Adapter casePerson(Person object) { - return createPersonAdapter(); - } - @Override - public Adapter defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - - /** - * Creates an adapter for the <code>target</code>. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param target the object to adapt. - * @return the adapter for the <code>target</code>. - * @generated - */ - @Override - public Adapter createAdapter(Notifier target) { - return modelSwitch.doSwitch((EObject)target); - } - - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Parent <em>Parent</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.teneo.samples.emf.annotations.compositeid.Parent - * @generated - */ - public Adapter createParentAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Child <em>Child</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.teneo.samples.emf.annotations.compositeid.Child - * @generated - */ - public Adapter createChildAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Person <em>Person</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.teneo.samples.emf.annotations.compositeid.Person - * @generated - */ - public Adapter createPersonAdapter() { - return null; - } - - /** - * Creates a new adapter for the default case. - * <!-- begin-user-doc --> - * This default implementation returns null. - * <!-- end-user-doc --> - * @return the new adapter. - * @generated - */ - public Adapter createEObjectAdapter() { - return null; - } - -} //CompositeidAdapterFactory diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/util/CompositeidSwitch.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/util/CompositeidSwitch.java deleted file mode 100644 index 80da693ed..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/util/CompositeidSwitch.java +++ /dev/null @@ -1,174 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: CompositeidSwitch.java,v 1.3 2008/04/06 13:45:43 mtaal Exp $ - */ -package org.eclipse.emf.teneo.samples.emf.annotations.compositeid.util; - -import java.util.List; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; - -import org.eclipse.emf.teneo.samples.emf.annotations.compositeid.*; - -/** - * <!-- begin-user-doc --> - * The <b>Switch</b> for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch(EObject) doSwitch(object)} - * to invoke the <code>caseXXX</code> method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * <!-- end-user-doc --> - * @see org.eclipse.emf.teneo.samples.emf.annotations.compositeid.CompositeidPackage - * @generated - */ -public class CompositeidSwitch<T> { - /** - * The cached model package - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected static CompositeidPackage modelPackage; - - /** - * Creates an instance of the switch. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public CompositeidSwitch() { - if (modelPackage == null) { - modelPackage = CompositeidPackage.eINSTANCE; - } - } - - /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the first non-null result returned by a <code>caseXXX</code> call. - * @generated - */ - public T doSwitch(EObject theEObject) { - return doSwitch(theEObject.eClass(), theEObject); - } - - /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the first non-null result returned by a <code>caseXXX</code> call. - * @generated - */ - protected T doSwitch(EClass theEClass, EObject theEObject) { - if (theEClass.eContainer() == modelPackage) { - return doSwitch(theEClass.getClassifierID(), theEObject); - } - else { - List<EClass> eSuperTypes = theEClass.getESuperTypes(); - return - eSuperTypes.isEmpty() ? - defaultCase(theEObject) : - doSwitch(eSuperTypes.get(0), theEObject); - } - } - - /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the first non-null result returned by a <code>caseXXX</code> call. - * @generated - */ - protected T doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case CompositeidPackage.PARENT: { - Parent parent = (Parent)theEObject; - T result = caseParent(parent); - if (result == null) result = casePerson(parent); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CompositeidPackage.CHILD: { - Child child = (Child)theEObject; - T result = caseChild(child); - if (result == null) result = casePerson(child); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CompositeidPackage.PERSON: { - Person person = (Person)theEObject; - T result = casePerson(person); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Parent</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>Parent</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseParent(Parent object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Child</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>Child</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseChild(Child object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Person</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>Person</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T casePerson(Person object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>EObject</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - public T defaultCase(EObject object) { - return null; - } - -} //CompositeidSwitch diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/validation/ChildValidator.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/validation/ChildValidator.java deleted file mode 100644 index 5049972d8..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/validation/ChildValidator.java +++ /dev/null @@ -1,19 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: ChildValidator.java,v 1.1 2007/02/08 23:09:25 mtaal Exp $ - */ -package org.eclipse.emf.teneo.samples.emf.annotations.compositeid.validation; - - -/** - * A sample validator interface for {@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Child}. - * 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 ChildValidator { - boolean validate(); - -} diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/validation/ParentValidator.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/validation/ParentValidator.java deleted file mode 100644 index ab0d81a60..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/validation/ParentValidator.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: ParentValidator.java,v 1.1 2007/02/08 23:09:25 mtaal Exp $ - */ -package org.eclipse.emf.teneo.samples.emf.annotations.compositeid.validation; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Child; - -/** - * A sample validator interface for {@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Parent}. - * 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 ParentValidator { - boolean validate(); - - boolean validateChildren(EList<Child> value); -} diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/validation/PersonValidator.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/validation/PersonValidator.java deleted file mode 100644 index bce8520c8..000000000 --- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/validation/PersonValidator.java +++ /dev/null @@ -1,21 +0,0 @@ -/** - * <copyright> - * </copyright> - * - * $Id: PersonValidator.java,v 1.1 2007/02/08 23:09:25 mtaal Exp $ - */ -package org.eclipse.emf.teneo.samples.emf.annotations.compositeid.validation; - - -/** - * A sample validator interface for {@link org.eclipse.emf.teneo.samples.emf.annotations.compositeid.Person}. - * 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 PersonValidator { - boolean validate(); - - boolean validateFirstName(String value); - boolean validateLastName(String value); -} |