diff options
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PostPersist.java')
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PostPersist.java | 158 |
1 files changed, 4 insertions, 154 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PostPersist.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PostPersist.java index 5a442de088..7c43acaddf 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PostPersist.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PostPersist.java @@ -9,12 +9,9 @@ ******************************************************************************/ package org.eclipse.jpt.core.resource.orm; -import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.jpt.core.internal.resource.xml.translators.SimpleTranslator; -import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject; import org.eclipse.wst.common.internal.emf.resource.Translator; /** @@ -33,28 +30,9 @@ import org.eclipse.wst.common.internal.emf.resource.Translator; * @model kind="class" * @generated */ -public class PostPersist extends AbstractJpaEObject implements EventMethod +public class PostPersist extends EventMethod { /** - * The default value of the '{@link #getMethodName() <em>Method Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getMethodName() - * @generated - * @ordered - */ - protected static final String METHOD_NAME_EDEFAULT = null; - /** - * The cached value of the '{@link #getMethodName() <em>Method Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getMethodName() - * @generated - * @ordered - */ - protected String methodName = METHOD_NAME_EDEFAULT; - - /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated @@ -74,127 +52,10 @@ public class PostPersist extends AbstractJpaEObject implements EventMethod { return OrmPackage.Literals.POST_PERSIST; } - - /** - * Returns the value of the '<em><b>Method Name</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Method 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>Method Name</em>' attribute. - * @see #setMethodName(String) - * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getEventMethod_MethodName() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true" - * @generated - */ - public String getMethodName() - { - return methodName; - } - - /** - * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.PostPersist#getMethodName <em>Method Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Method Name</em>' attribute. - * @see #getMethodName() - * @generated - */ - public void setMethodName(String newMethodName) - { - String oldMethodName = methodName; - methodName = newMethodName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.POST_PERSIST__METHOD_NAME, oldMethodName, methodName)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case OrmPackage.POST_PERSIST__METHOD_NAME: - return getMethodName(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case OrmPackage.POST_PERSIST__METHOD_NAME: - setMethodName((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public void eUnset(int featureID) - { - switch (featureID) - { - case OrmPackage.POST_PERSIST__METHOD_NAME: - setMethodName(METHOD_NAME_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case OrmPackage.POST_PERSIST__METHOD_NAME: - return METHOD_NAME_EDEFAULT == null ? methodName != null : !METHOD_NAME_EDEFAULT.equals(methodName); - } - 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(" (methodName: "); - result.append(methodName); - result.append(')'); - return result.toString(); - } + // ********** translators ********** - + public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) { return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren()); } @@ -204,15 +65,4 @@ public class PostPersist extends AbstractJpaEObject implements EventMethod JPA.POST_PERSIST, OrmPackage.eINSTANCE.getXmlEventMethodContainer_PostPersist()); } - - private static Translator[] buildTranslatorChildren() { - return new Translator[] { - buildMethodNameTranslator() - }; - } - - protected static Translator buildMethodNameTranslator() { - return new Translator(JPA.METHOD_NAME, OrmPackage.eINSTANCE.getEventMethod_MethodName(), Translator.DOM_ATTRIBUTE); - } - -} // PostPersist +} |