diff options
Diffstat (limited to 'tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/util/UsertypeSwitch.java')
-rwxr-xr-x | tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/util/UsertypeSwitch.java | 180 |
1 files changed, 89 insertions, 91 deletions
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/util/UsertypeSwitch.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/util/UsertypeSwitch.java index dc29ed3dd..e6c70bcdc 100755 --- a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/util/UsertypeSwitch.java +++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/samples/emf/hibernate/usertype/util/UsertypeSwitch.java @@ -10,38 +10,33 @@ import java.util.List; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.*; import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Address; +import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Certificate; import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.City; import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.Person; import org.eclipse.emf.teneo.samples.emf.hibernate.usertype.UsertypePackage; /** - * <!-- 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. + * <!-- 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.hibernate.usertype.UsertypePackage * @generated */ public class UsertypeSwitch { /** - * The cached model package - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * The cached model package <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ protected static UsertypePackage modelPackage; /** - * Creates an instance of the switch. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * Creates an instance of the switch. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ public UsertypeSwitch() { @@ -51,9 +46,9 @@ public class UsertypeSwitch { } /** - * 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 --> + * 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 */ @@ -62,70 +57,73 @@ public class UsertypeSwitch { } /** - * 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 --> + * 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 Object doSwitch(EClass theEClass, EObject theEObject) { if (theEClass.eContainer() == modelPackage) { return doSwitch(theEClass.getClassifierID(), theEObject); - } - else { + } else { + @SuppressWarnings("rawtypes") List eSuperTypes = theEClass.getESuperTypes(); - return - eSuperTypes.isEmpty() ? - defaultCase(theEObject) : - doSwitch((EClass)eSuperTypes.get(0), theEObject); + return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch( + (EClass) 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 --> + * 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 Object doSwitch(int classifierID, EObject theEObject) { switch (classifierID) { - case UsertypePackage.PERSON: { - Person person = (Person)theEObject; - Object result = casePerson(person); - if (result == null) result = defaultCase(theEObject); - return result; - } - case UsertypePackage.ADDRESS: { - Address address = (Address)theEObject; - Object result = caseAddress(address); - if (result == null) result = defaultCase(theEObject); - return result; - } - case UsertypePackage.CITY: { - City city = (City)theEObject; - Object result = caseCity(city); - if (result == null) result = defaultCase(theEObject); - return result; - } - case UsertypePackage.CERTIFICATE: { - Certificate certificate = (Certificate)theEObject; - Object result = caseCertificate(certificate); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); + case UsertypePackage.PERSON: { + Person person = (Person) theEObject; + Object result = casePerson(person); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case UsertypePackage.ADDRESS: { + Address address = (Address) theEObject; + Object result = caseAddress(address); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case UsertypePackage.CITY: { + City city = (City) theEObject; + Object result = caseCity(city); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case UsertypePackage.CERTIFICATE: { + Certificate certificate = (Certificate) theEObject; + Object result = caseCertificate(certificate); + if (result == null) + result = defaultCase(theEObject); + return result; + } + default: + return defaultCase(theEObject); } } /** - * 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>'. + * 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 */ @@ -134,13 +132,13 @@ public class UsertypeSwitch { } /** - * Returns the result of interpreting the object as an instance of '<em>Address</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Address</em>'. + * Returns the result of interpreting the object as an instance of ' <em>Address</em>'. <!-- + * begin-user-doc --> This implementation returns null; returning a non-null result will terminate + * the switch. <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of ' <em>Address</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ @@ -149,13 +147,13 @@ public class UsertypeSwitch { } /** - * Returns the result of interpreting the object as an instance of '<em>City</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>City</em>'. + * Returns the result of interpreting the object as an instance of ' <em>City</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>City</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ @@ -164,13 +162,13 @@ public class UsertypeSwitch { } /** - * Returns the result of interpreting the object as an instance of '<em>Certificate</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>Certificate</em>'. + * Returns the result of interpreting the object as an instance of ' <em>Certificate</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>Certificate</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ @@ -179,13 +177,13 @@ public class UsertypeSwitch { } /** - * 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>'. + * 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 */ @@ -193,4 +191,4 @@ public class UsertypeSwitch { return null; } -} //UsertypeSwitch +} // UsertypeSwitch |