Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations')
-rwxr-xr-xtests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/Price.java2
-rwxr-xr-xtests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/impl/InheritancemappingFactoryImpl.java2
-rwxr-xr-xtests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/impl/InheritancemappingPackageImpl.java2
-rwxr-xr-xtests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/inheritancemapping.ecore8
-rwxr-xr-xtests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/inheritancemapping.genmodel8
-rwxr-xr-xtests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/util/InheritancemappingSwitch.java36
6 files changed, 20 insertions, 38 deletions
diff --git a/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/Price.java b/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/Price.java
index 8198d5cbf..182fc00e9 100755
--- a/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/Price.java
+++ b/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/Price.java
@@ -24,7 +24,7 @@ import org.eclipse.emf.ecore.EObject;
* </p>
*
* @see org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.InheritancemappingPackage#getPrice()
- * @model annotation="teneo.jpa appinfo='\n\t\t\t\t@Table(name=\"myprice\")\n\t\t\t\t@Inheritance(strategy=SINGLE_TABLE)\n\t\t\t\t@DiscriminatorColumn(name=\"DISCRIMINATOR\", discriminatorType=STRING, column=@Column(index=\"discrIndex,ohterindex\", length=120))\n\t\t\t\t@DiscriminatorValue(\"myPrice\")\n\t\t\t'"
+ * @model annotation="teneo.jpa appinfo='\t\t\t\t@Table(name=\"myprice\")\n\t\t\t\t@Inheritance(strategy=SINGLE_TABLE)\n\t\t\t\t@DiscriminatorColumn(name=\"DISCRIMINATOR\", discriminatorType=STRING, columnDefinition=\"character varying (100) \", column=@Column(index=\"discrIndex,ohterindex\", length=120))\n\t\t\t\t@DiscriminatorValue(\"myPrice\")\n\t\t\t'"
* extendedMetaData="name='Price' kind='elementOnly'"
* @generated
*/
diff --git a/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/impl/InheritancemappingFactoryImpl.java b/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/impl/InheritancemappingFactoryImpl.java
index 5c6199c66..a2b899918 100755
--- a/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/impl/InheritancemappingFactoryImpl.java
+++ b/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/impl/InheritancemappingFactoryImpl.java
@@ -39,7 +39,7 @@ public class InheritancemappingFactoryImpl extends EFactoryImpl implements Inher
*/
public static InheritancemappingFactory init() {
try {
- InheritancemappingFactory theInheritancemappingFactory = (InheritancemappingFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping");
+ InheritancemappingFactory theInheritancemappingFactory = (InheritancemappingFactory)EPackage.Registry.INSTANCE.getEFactory(InheritancemappingPackage.eNS_URI);
if (theInheritancemappingFactory != null) {
return theInheritancemappingFactory;
}
diff --git a/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/impl/InheritancemappingPackageImpl.java b/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/impl/InheritancemappingPackageImpl.java
index 054579e7e..cb32747db 100755
--- a/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/impl/InheritancemappingPackageImpl.java
+++ b/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/impl/InheritancemappingPackageImpl.java
@@ -711,7 +711,7 @@ public class InheritancemappingPackageImpl extends EPackageImpl implements Inher
(priceEClass,
source,
new String[] {
- "appinfo", "\n\t\t\t\t@Table(name=\"myprice\")\n\t\t\t\t@Inheritance(strategy=SINGLE_TABLE)\n\t\t\t\t@DiscriminatorColumn(name=\"DISCRIMINATOR\", discriminatorType=STRING, column=@Column(index=\"discrIndex,ohterindex\", length=120))\n\t\t\t\t@DiscriminatorValue(\"myPrice\")\n\t\t\t"
+ "appinfo", "\t\t\t\t@Table(name=\"myprice\")\n\t\t\t\t@Inheritance(strategy=SINGLE_TABLE)\n\t\t\t\t@DiscriminatorColumn(name=\"DISCRIMINATOR\", discriminatorType=STRING, columnDefinition=\"character varying (100) \", column=@Column(index=\"discrIndex,ohterindex\", length=120))\n\t\t\t\t@DiscriminatorValue(\"myPrice\")\n\t\t\t"
});
addAnnotation
(usAddressEClass,
diff --git a/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/inheritancemapping.ecore b/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/inheritancemapping.ecore
index 47178a467..3c5dcdc47 100755
--- a/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/inheritancemapping.ecore
+++ b/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/inheritancemapping.ecore
@@ -1,8 +1,6 @@
<?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="inheritancemapping"
- nsURI="http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping"
+<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="inheritancemapping" nsURI="http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping"
nsPrefix="inheritancemapping">
<eClassifiers xsi:type="ecore:EClass" name="Address" abstract="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
@@ -99,7 +97,7 @@
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Price">
<eAnnotations source="teneo.jpa">
- <details key="appinfo" value="&#xA;&#x9;&#x9;&#x9;&#x9;@Table(name=&quot;myprice&quot;)&#xA;&#x9;&#x9;&#x9;&#x9;@Inheritance(strategy=SINGLE_TABLE)&#xA;&#x9;&#x9;&#x9;&#x9;@DiscriminatorColumn(name=&quot;DISCRIMINATOR&quot;, discriminatorType=STRING, column=@Column(index=&quot;discrIndex,ohterindex&quot;, length=120))&#xA;&#x9;&#x9;&#x9;&#x9;@DiscriminatorValue(&quot;myPrice&quot;)&#xA;&#x9;&#x9;&#x9;"/>
+ <details key="appinfo" value="&#x9;&#x9;&#x9;&#x9;@Table(name=&quot;myprice&quot;)&#xA;&#x9;&#x9;&#x9;&#x9;@Inheritance(strategy=SINGLE_TABLE)&#xA;&#x9;&#x9;&#x9;&#x9;@DiscriminatorColumn(name=&quot;DISCRIMINATOR&quot;, discriminatorType=STRING, columnDefinition=&quot;character varying (100) &quot;, column=@Column(index=&quot;discrIndex,ohterindex&quot;, length=120))&#xA;&#x9;&#x9;&#x9;&#x9;@DiscriminatorValue(&quot;myPrice&quot;)&#xA;&#x9;&#x9;&#x9;"/>
</eAnnotations>
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="Price"/>
diff --git a/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/inheritancemapping.genmodel b/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/inheritancemapping.genmodel
index 6b6edb917..e9061e2b5 100755
--- a/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/inheritancemapping.genmodel
+++ b/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/inheritancemapping.genmodel
@@ -1,9 +1,7 @@
<?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="inheritancemapping" importerID="org.eclipse.emf.importer.ecore"
- complianceLevel="5.0">
+<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="inheritancemapping" importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0">
<foreignModel>inheritancemapping.ecore</foreignModel>
<genPackages prefix="Inheritancemapping" basePackage="org.eclipse.emf.teneo.samples.emf.annotations"
resource="XML" disposableProviderFactory="true" ecorePackage="inheritancemapping.ecore#/">
diff --git a/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/util/InheritancemappingSwitch.java b/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/util/InheritancemappingSwitch.java
index 0e3485da5..63dcd9a69 100755
--- a/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/util/InheritancemappingSwitch.java
+++ b/tests/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/util/InheritancemappingSwitch.java
@@ -11,6 +11,8 @@ import java.util.List;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.Switch;
import org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.*;
/**
@@ -26,7 +28,7 @@ import org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.*;
* @see org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.InheritancemappingPackage
* @generated
*/
-public class InheritancemappingSwitch<T> {
+public class InheritancemappingSwitch<T> extends Switch<T> {
/**
* The cached model package
* <!-- begin-user-doc -->
@@ -48,34 +50,16 @@ public class InheritancemappingSwitch<T> {
}
/**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * Checks whether this is a switch for the given package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
* @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);
- }
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
}
/**
@@ -85,6 +69,7 @@ public class InheritancemappingSwitch<T> {
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
+ @Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case InheritancemappingPackage.ADDRESS: {
@@ -383,6 +368,7 @@ public class InheritancemappingSwitch<T> {
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
*/
+ @Override
public T defaultCase(EObject object) {
return null;
}

Back to the top