Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/impl/NamedQueryImpl.java')
-rwxr-xr-xhibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/impl/NamedQueryImpl.java217
1 files changed, 217 insertions, 0 deletions
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/impl/NamedQueryImpl.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/impl/NamedQueryImpl.java
new file mode 100755
index 000000000..58863acc4
--- /dev/null
+++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/hbannotation/impl/NamedQueryImpl.java
@@ -0,0 +1,217 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: NamedQueryImpl.java,v 1.2 2010/02/04 11:03:42 mtaal Exp $
+ */
+package org.eclipse.emf.teneo.hibernate.hbannotation.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.teneo.hibernate.hbannotation.HbannotationPackage;
+import org.eclipse.emf.teneo.hibernate.hbannotation.NamedQuery;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Named Query</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.teneo.hibernate.hbannotation.impl.NamedQueryImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.teneo.hibernate.hbannotation.impl.NamedQueryImpl#getQuery <em>Query</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class NamedQueryImpl extends HbAnnotationImpl implements NamedQuery {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getQuery() <em>Query</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getQuery()
+ * @generated
+ * @ordered
+ */
+ protected static final String QUERY_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getQuery() <em>Query</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getQuery()
+ * @generated
+ * @ordered
+ */
+ protected String query = QUERY_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected NamedQueryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return HbannotationPackage.Literals.NAMED_QUERY;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HbannotationPackage.NAMED_QUERY__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getQuery() {
+ return query;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setQuery(String newQuery) {
+ String oldQuery = query;
+ query = newQuery;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HbannotationPackage.NAMED_QUERY__QUERY, oldQuery, query));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case HbannotationPackage.NAMED_QUERY__NAME:
+ return getName();
+ case HbannotationPackage.NAMED_QUERY__QUERY:
+ return getQuery();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case HbannotationPackage.NAMED_QUERY__NAME:
+ setName((String)newValue);
+ return;
+ case HbannotationPackage.NAMED_QUERY__QUERY:
+ setQuery((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case HbannotationPackage.NAMED_QUERY__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case HbannotationPackage.NAMED_QUERY__QUERY:
+ setQuery(QUERY_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case HbannotationPackage.NAMED_QUERY__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case HbannotationPackage.NAMED_QUERY__QUERY:
+ return QUERY_EDEFAULT == null ? query != null : !QUERY_EDEFAULT.equals(query);
+ }
+ 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(" (name: ");
+ result.append(name);
+ result.append(", query: ");
+ result.append(query);
+ result.append(')');
+ return result.toString();
+ }
+
+} //NamedQueryImpl

Back to the top