diff options
Diffstat (limited to 'tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/UsertypePackageImpl.java')
-rwxr-xr-x | tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/UsertypePackageImpl.java | 461 |
1 files changed, 244 insertions, 217 deletions
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/UsertypePackageImpl.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/UsertypePackageImpl.java index e8eb533ea..4a78075a8 100755 --- a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/UsertypePackageImpl.java +++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/impl/UsertypePackageImpl.java @@ -25,82 +25,72 @@ import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.UsertypePackage; /** * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!-- end-user-doc --> - * * @generated */ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage { /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ private EClass personEClass = null; /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ private EClass addressEClass = null; /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ private EClass cityEClass = null; /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ private EClass certificateEClass = null; /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ private EEnum citySizeEEnum = null; /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ private EDataType nameEDataType = null; /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ private EDataType phoneNumberEDataType = null; /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ private EDataType intArrayEDataType = null; /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ private EDataType myDoubleTypeEDataType = 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 --> - * + * {@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.hibernate.usertype.UsertypePackage#eNS_URI * @see #init() @@ -112,33 +102,26 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage /** * <!-- 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. - * - * <p> - * This method is used to initialize {@link UsertypePackage#eINSTANCE} when that field is - * accessed. Clients should not invoke it directly. Instead, they should simply access that field - * to obtain the package. <!-- begin-user-doc --> <!-- end-user-doc --> + * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. * + * <p>This method is used to initialize {@link UsertypePackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * <!-- begin-user-doc --> <!-- end-user-doc --> * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() * @generated */ public static UsertypePackage init() { - if (isInited) - return (UsertypePackage) EPackage.Registry.INSTANCE.getEPackage(UsertypePackage.eNS_URI); + if (isInited) return (UsertypePackage)EPackage.Registry.INSTANCE.getEPackage(UsertypePackage.eNS_URI); // Obtain or create and register package - UsertypePackageImpl theUsertypePackage = (UsertypePackageImpl) (EPackage.Registry.INSTANCE - .get(eNS_URI) instanceof UsertypePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) - : new UsertypePackageImpl()); + UsertypePackageImpl theUsertypePackage = (UsertypePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof UsertypePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new UsertypePackageImpl()); isInited = true; @@ -151,6 +134,7 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage // Mark meta-data to indicate it can't be changed theUsertypePackage.freeze(); + // Update the registry and return the package EPackage.Registry.INSTANCE.put(UsertypePackage.eNS_URI, theUsertypePackage); return theUsertypePackage; @@ -158,7 +142,6 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EClass getPerson() { @@ -167,88 +150,78 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EAttribute getPerson_Name() { - return (EAttribute) personEClass.getEStructuralFeatures().get(0); + return (EAttribute)personEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EAttribute getPerson_Numbers() { - return (EAttribute) personEClass.getEStructuralFeatures().get(1); + return (EAttribute)personEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EAttribute getPerson_PhoneNumbers() { - return (EAttribute) personEClass.getEStructuralFeatures().get(2); + return (EAttribute)personEClass.getEStructuralFeatures().get(2); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EAttribute getPerson_EmergencyContact() { - return (EAttribute) personEClass.getEStructuralFeatures().get(3); + return (EAttribute)personEClass.getEStructuralFeatures().get(3); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EReference getPerson_Addresses() { - return (EReference) personEClass.getEStructuralFeatures().get(4); + return (EReference)personEClass.getEStructuralFeatures().get(4); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EAttribute getPerson_BirthPlace() { - return (EAttribute) personEClass.getEStructuralFeatures().get(5); + return (EAttribute)personEClass.getEStructuralFeatures().get(5); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EAttribute getPerson_Double() { - return (EAttribute) personEClass.getEStructuralFeatures().get(6); + return (EAttribute)personEClass.getEStructuralFeatures().get(6); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EReference getPerson_Certificate() { - return (EReference) personEClass.getEStructuralFeatures().get(7); + return (EReference)personEClass.getEStructuralFeatures().get(7); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EReference getPerson_Certificates() { - return (EReference) personEClass.getEStructuralFeatures().get(8); + return (EReference)personEClass.getEStructuralFeatures().get(8); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EClass getAddress() { @@ -257,25 +230,22 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EAttribute getAddress_AddressInfo() { - return (EAttribute) addressEClass.getEStructuralFeatures().get(0); + return (EAttribute)addressEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EReference getAddress_Person() { - return (EReference) addressEClass.getEStructuralFeatures().get(1); + return (EReference)addressEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EClass getCity() { @@ -284,25 +254,22 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EAttribute getCity_Id() { - return (EAttribute) cityEClass.getEStructuralFeatures().get(0); + return (EAttribute)cityEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EAttribute getCity_Size() { - return (EAttribute) cityEClass.getEStructuralFeatures().get(1); + return (EAttribute)cityEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EClass getCertificate() { @@ -311,25 +278,22 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EAttribute getCertificate_Name() { - return (EAttribute) certificateEClass.getEStructuralFeatures().get(0); + return (EAttribute)certificateEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EAttribute getCertificate_Length() { - return (EAttribute) certificateEClass.getEStructuralFeatures().get(1); + return (EAttribute)certificateEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EEnum getCitySize() { @@ -338,7 +302,6 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EDataType getName_() { @@ -347,7 +310,6 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EDataType getPhoneNumber() { @@ -356,7 +318,6 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EDataType getIntArray() { @@ -365,7 +326,6 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public EDataType getmyDoubleType() { @@ -374,29 +334,26 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ public UsertypeFactory getUsertypeFactory() { - return (UsertypeFactory) getEFactoryInstance(); + return (UsertypeFactory)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 --> - * + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ public void createPackageContents() { - if (isCreated) - return; + if (isCreated) return; isCreated = true; // Create classes and their features @@ -435,20 +392,18 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * * @generated */ private boolean isInitialized = false; /** - * Complete the initialization of the package and its meta-model. This method is guarded to have - * no affect on any invocation but its first. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ public void initializePackageContents() { - if (isInitialized) - return; + if (isInitialized) return; isInitialized = true; // Initialize package @@ -456,80 +411,47 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); + // Create type parameters + + // Set bounds for type parameters + // Add supertypes to classes // Initialize classes and features; add operations and parameters - initEClass(personEClass, Person.class, "Person", !IS_ABSTRACT, !IS_INTERFACE, - IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getPerson_Name(), this.getName_(), "name", null, 1, 1, Person.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, - !IS_DERIVED, IS_ORDERED); - initEAttribute(getPerson_Numbers(), this.getIntArray(), "numbers", null, 1, 1, Person.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, - !IS_DERIVED, IS_ORDERED); - initEAttribute(getPerson_PhoneNumbers(), this.getPhoneNumber(), "phoneNumbers", null, 0, 100, - Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getPerson_EmergencyContact(), this.getPhoneNumber(), "emergencyContact", "", 0, - 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getPerson_Addresses(), this.getAddress(), this.getAddress_Person(), "addresses", - null, 0, -1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, - IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getPerson_BirthPlace(), ecorePackage.getEString(), "birthPlace", null, 1, 1, - Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getPerson_Double(), this.getmyDoubleType(), "double", "0", 1, 1, Person.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, - !IS_DERIVED, IS_ORDERED); - initEReference(getPerson_Certificate(), this.getCertificate(), null, "certificate", null, 0, 1, - Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, - IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getPerson_Certificates(), this.getCertificate(), null, "certificates", null, 0, - -1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, - IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(addressEClass, Address.class, "Address", !IS_ABSTRACT, !IS_INTERFACE, - IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getAddress_AddressInfo(), ecorePackage.getEString(), "addressInfo", null, 1, 1, - Address.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, - !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getAddress_Person(), this.getPerson(), this.getPerson_Addresses(), "person", - null, 0, 1, Address.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, - IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(cityEClass, City.class, "City", !IS_ABSTRACT, !IS_INTERFACE, - IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getCity_Id(), ecorePackage.getELong(), "id", "0", 0, 1, City.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, - IS_ORDERED); - initEAttribute(getCity_Size(), this.getCitySize(), "size", "MEDIUM", 0, 1, City.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, - IS_ORDERED); - - initEClass(certificateEClass, Certificate.class, "Certificate", !IS_ABSTRACT, !IS_INTERFACE, - IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getCertificate_Name(), ecorePackage.getEString(), "name", null, 1, 1, - Certificate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, - !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getCertificate_Length(), ecorePackage.getEInt(), "length", null, 1, 1, - Certificate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, - !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(personEClass, Person.class, "Person", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getPerson_Name(), this.getName_(), "name", null, 1, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getPerson_Numbers(), this.getIntArray(), "numbers", null, 1, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getPerson_PhoneNumbers(), this.getPhoneNumber(), "phoneNumbers", null, 0, 100, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getPerson_EmergencyContact(), this.getPhoneNumber(), "emergencyContact", "", 0, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getPerson_Addresses(), this.getAddress(), this.getAddress_Person(), "addresses", null, 0, -1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getPerson_BirthPlace(), ecorePackage.getEString(), "birthPlace", null, 1, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getPerson_Double(), this.getmyDoubleType(), "double", "0", 1, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getPerson_Certificate(), this.getCertificate(), null, "certificate", null, 0, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getPerson_Certificates(), this.getCertificate(), null, "certificates", null, 0, -1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(addressEClass, Address.class, "Address", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getAddress_AddressInfo(), ecorePackage.getEString(), "addressInfo", null, 1, 1, Address.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getAddress_Person(), this.getPerson(), this.getPerson_Addresses(), "person", null, 0, 1, Address.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(cityEClass, City.class, "City", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCity_Id(), ecorePackage.getELong(), "id", "0", 0, 1, City.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCity_Size(), this.getCitySize(), "size", "MEDIUM", 0, 1, City.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(certificateEClass, Certificate.class, "Certificate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCertificate_Name(), ecorePackage.getEString(), "name", null, 1, 1, Certificate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCertificate_Length(), ecorePackage.getEInt(), "length", null, 1, 1, Certificate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); // Initialize enums and add enum literals initEEnum(citySizeEEnum, CitySize.class, "CitySize"); - addEEnumLiteral(citySizeEEnum, CitySize.SMALL_LITERAL); - addEEnumLiteral(citySizeEEnum, CitySize.MEDIUM_LITERAL); - addEEnumLiteral(citySizeEEnum, CitySize.LARGE_LITERAL); + addEEnumLiteral(citySizeEEnum, CitySize.SMALL); + addEEnumLiteral(citySizeEEnum, CitySize.MEDIUM); + addEEnumLiteral(citySizeEEnum, CitySize.LARGE); // Initialize data types initEDataType(nameEDataType, Name.class, "Name", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(phoneNumberEDataType, UsaPhoneNumber.class, "PhoneNumber", IS_SERIALIZABLE, - !IS_GENERATED_INSTANCE_CLASS); - initEDataType(intArrayEDataType, int[].class, "IntArray", IS_SERIALIZABLE, - !IS_GENERATED_INSTANCE_CLASS); - initEDataType(myDoubleTypeEDataType, Double.class, "myDoubleType", IS_SERIALIZABLE, - !IS_GENERATED_INSTANCE_CLASS); + initEDataType(phoneNumberEDataType, UsaPhoneNumber.class, "PhoneNumber", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); + initEDataType(intArrayEDataType, int[].class, "IntArray", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); + initEDataType(myDoubleTypeEDataType, Double.class, "myDoubleType", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); // Create resource createResource(eNS_URI); @@ -541,93 +463,198 @@ public class UsertypePackageImpl extends EPackageImpl implements UsertypePackage createTeneo_1Annotations(); // http:///org/eclipse/emf/ecore/util/ExtendedMetaData createExtendedMetaDataAnnotations(); + // teneo.jpa.auditing + createTeneo_2Annotations(); } /** - * Initializes the annotations for <b>teneo.hibernate</b>. <!-- begin-user-doc --> <!-- + * Initializes the annotations for <b>teneo.hibernate</b>. + * <!-- begin-user-doc --> <!-- * end-user-doc --> - * * @generated */ protected void createTeneoAnnotations() { - String source = "teneo.hibernate"; - addAnnotation( - this, - source, - new String[] { - "appinfo", - "\t\t\t\t\t\t@NamedQuery(name=\"getPersonByBirthPlace2\" query=\"select p from Person p where p.birthPlace=?\")\n\t\t\t\t\t" }); - addAnnotation( - personEClass, - source, - new String[] { - "appinfo", - "@NamedQuery(name=\"getPersonByBirthPlace\" query=\"select p from Person p where p.birthPlace=?\")\n@HbEntity(dynamicInsert=true, dynamicUpdate=true, mutable=true, selectBeforeUpdate=true, persister=\"org.hibernate.persister.entity.SingleTableEntityPersister\", optimisticLock=NONE, polymorphism=EXPLICIT)" }); - } - - /** - * Initializes the annotations for <b>teneo.jpa</b>. <!-- begin-user-doc --> <!-- end-user-doc --> - * + String source = "teneo.hibernate"; + addAnnotation + (this, + source, + new String[] { + "appinfo", "\t\t\t\t\t\t@NamedQuery(name=\"getPersonByBirthPlace2\" query=\"select p from Person p where p.birthPlace=?\")\n\t\t\t\t\t" + }); + addAnnotation + (personEClass, + source, + new String[] { + "appinfo", "@NamedQuery(name=\"getPersonByBirthPlace\" query=\"select p from Person p where p.birthPlace=?\")\n@HbEntity(dynamicInsert=true, dynamicUpdate=true, mutable=true, selectBeforeUpdate=true, persister=\"org.hibernate.persister.entity.SingleTableEntityPersister\", optimisticLock=NONE, polymorphism=EXPLICIT)" + }); + } + + /** + * Initializes the annotations for <b>teneo.jpa</b>. + * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ protected void createTeneo_1Annotations() { - String source = "teneo.jpa"; - addAnnotation( - nameEDataType, - source, - new String[] { - "appinfo", - "\n\t\t\t\t\t\t@TypeDef(name=\"nameType\" typeClass=\"org.eclipse.emf.teneo.samples.emf.hibernate.usertype.NameType\")\n\t\t\t\t\t\t@Columns({@Column(name=\"first_name\"), @Column(name=\"last_name\")})\n\t\t\t\t\t" }); - addAnnotation(getPerson_Addresses(), source, new String[] { "appinfo", - "@OnDelete(action=OnDeleteAction.CASCADE)\n@OneToMany(indexed=false, unique=true)" }); - addAnnotation(getPerson_Certificate(), source, new String[] { "appinfo", - "@Columns({@Column(name=\"cert_name\"), @Column(name=\"cert_length\")})\n\t\t\t\t\t" }); - addAnnotation(getPerson_Certificates(), source, new String[] { "appinfo", - "@Columns({@Column(name=\"cert_name\"), @Column(name=\"cert_length\")})\n\t\t\t\t\t" }); - addAnnotation( - intArrayEDataType, - source, - new String[] { - "appinfo", - "\n\t\t\t\t\t\t@TypeDef(name=\"intArrayType\" typeClass=\"org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType\", parameters={@Parameter(name=\"epackage\" value=\"http://www.elver.org/samples/emf/hibernate/usertype\"), @Parameter(name=\"edatatype\", value=\"IntArray\")})\n\t\t\t\t\t" }); - addAnnotation( - myDoubleTypeEDataType, - source, - new String[] { - "appinfo", - "\n\t\t\t\t\t\t@Type(type=\"org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType\", parameters={@Parameter(name=\"epackage\" value=\"http://www.elver.org/samples/emf/hibernate/usertype\"), @Parameter(name=\"edatatype\", value=\"myDoubleType\")})\n\t\t\t\t\t" }); - addAnnotation(getCity_Id(), source, new String[] { "value", - "@GeneratedValue(strategy=\"ASSIGNED\")" }); - addAnnotation( - certificateEClass, - source, - new String[] { "appinfo", - "@Type(type=\"org.eclipse.emf.teneo.samples.emf.hibernate.usertype.CertificateType\")\n\t\t\t\t\t" }); + String source = "teneo.jpa"; + addAnnotation + (nameEDataType, + source, + new String[] { + "appinfo", "\n\t\t\t\t\t\t@TypeDef(name=\"nameType\" typeClass=\"org.eclipse.emf.teneo.samples.emf.hibernate.usertype.NameType\")\n\t\t\t\t\t\t@Columns({@Column(name=\"first_name\"), @Column(name=\"last_name\")})\n\t\t\t\t\t" + }); + addAnnotation + (getPerson_Addresses(), + source, + new String[] { + "appinfo", "@OnDelete(action=OnDeleteAction.CASCADE)\n@OneToMany(indexed=false, unique=true)" + }); + addAnnotation + (getPerson_Certificate(), + source, + new String[] { + "appinfo", "@Columns({@Column(name=\"cert_name\"), @Column(name=\"cert_length\")})\t\t" + }); + addAnnotation + (getPerson_Certificates(), + source, + new String[] { + "appinfo", "@Columns({@Column(name=\"cert_name\"), @Column(name=\"cert_length\")})\n\t\t\t\t\t" + }); + addAnnotation + (intArrayEDataType, + source, + new String[] { + "appinfo", "\n\t\t\t\t\t\t@TypeDef(name=\"intArrayType\" typeClass=\"org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType\", parameters={@Parameter(name=\"epackage\" value=\"http://www.elver.org/samples/emf/hibernate/usertype\"), @Parameter(name=\"edatatype\", value=\"IntArray\")})\n\t\t\t\t\t" + }); + addAnnotation + (myDoubleTypeEDataType, + source, + new String[] { + "appinfo", "\n\t\t\t\t\t\t@Type(type=\"org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserType\", parameters={@Parameter(name=\"epackage\" value=\"http://www.elver.org/samples/emf/hibernate/usertype\"), @Parameter(name=\"edatatype\", value=\"myDoubleType\")})\n\t\t\t\t\t" + }); + addAnnotation + (getCity_Id(), + source, + new String[] { + "value", "@GeneratedValue(strategy=\"ASSIGNED\")" + }); + addAnnotation + (certificateEClass, + source, + new String[] { + "appinfo", "@Type(type=\"org.eclipse.emf.teneo.samples.emf.hibernate.usertype.CertificateType\")\t\t\t\t\t" + }); } /** * 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(nameEDataType, source, new String[] { "name", "Name" }); - addAnnotation(personEClass, source, new String[] { "name", "Person", "kind", "elementOnly" }); - addAnnotation(getPerson_Name(), source, new String[] { "kind", "element", "name", "name" }); - addAnnotation(getPerson_Numbers(), source, - new String[] { "kind", "element", "name", "intArray" }); - addAnnotation(getPerson_Double(), source, - new String[] { "kind", "element", "name", "intArray" }); - addAnnotation(intArrayEDataType, source, new String[] { "name", "IntArray" }); - addAnnotation(addressEClass, source, new String[] { "name", "Person", "kind", "elementOnly" }); - addAnnotation(getAddress_AddressInfo(), source, new String[] { "kind", "element", "name", - "name" }); - addAnnotation(myDoubleTypeEDataType, source, new String[] { "name", "IntArray" }); - addAnnotation(getCertificate_Name(), source, new String[] { "kind", "element", "name", "name" }); - addAnnotation(getCertificate_Length(), source, - new String[] { "kind", "element", "name", "name" }); + String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; + addAnnotation + (nameEDataType, + source, + new String[] { + "name", "Name" + }); + addAnnotation + (personEClass, + source, + new String[] { + "name", "Person", + "kind", "elementOnly" + }); + addAnnotation + (getPerson_Name(), + source, + new String[] { + "kind", "element", + "name", "name" + }); + addAnnotation + (getPerson_Numbers(), + source, + new String[] { + "kind", "element", + "name", "intArray" + }); + addAnnotation + (getPerson_Double(), + source, + new String[] { + "kind", "element", + "name", "intArray" + }); + addAnnotation + (intArrayEDataType, + source, + new String[] { + "name", "IntArray" + }); + addAnnotation + (addressEClass, + source, + new String[] { + "name", "Person", + "kind", "elementOnly" + }); + addAnnotation + (getAddress_AddressInfo(), + source, + new String[] { + "kind", "element", + "name", "name" + }); + addAnnotation + (myDoubleTypeEDataType, + source, + new String[] { + "name", "IntArray" + }); + addAnnotation + (getCertificate_Name(), + source, + new String[] { + "kind", "element", + "name", "name" + }); + addAnnotation + (getCertificate_Length(), + source, + new String[] { + "kind", "element", + "name", "name" + }); + } + + /** + * Initializes the annotations for <b>teneo.jpa.auditing</b>. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ + protected void createTeneo_2Annotations() { + String source = "teneo.jpa.auditing"; + addAnnotation + (getPerson_Certificate(), + source, + new String[] { + "appinfo", "@Columns({@Column(name=\"cert_name\"), @Column(name=\"cert_length\")})\t\t" + }); + addAnnotation + (getPerson_Certificates(), + source, + new String[] { + "appinfo", "@Columns({@Column(name=\"cert_name\"), @Column(name=\"cert_length\")})\n\t\t\t\t\t" + }); + addAnnotation + (certificateEClass, + source, + new String[] { + "appinfo", "@Type(type=\"org.eclipse.emf.teneo.samples.emf.hibernate.usertype.CertificateType\")\t\t\t\t\t" + }); } } // UsertypePackageImpl |