You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by mc...@apache.org on 2008/05/26 08:50:48 UTC
svn commit: r660109 - in
/geronimo/devtools/eclipse-plugin/branches/2.0.1/plugins/org.apache.geronimo.v11.deployment.model/src:
./ org/ org/apache/ org/apache/geronimo/ org/apache/geronimo/xml/
org/apache/geronimo/xml/ns/ org/apache/geronimo/xml/ns/dep...
Author: mcconne
Date: Sun May 25 23:50:47 2008
New Revision: 660109
URL: http://svn.apache.org/viewvc?rev=660109&view=rev
Log:
GERONIMODEVTOOLS-347 Implement hashCode() and equals() methods for the hashmaps in DependencyManager
Added:
geronimo/devtools/eclipse-plugin/branches/2.0.1/plugins/org.apache.geronimo.v11.deployment.model/src/
geronimo/devtools/eclipse-plugin/branches/2.0.1/plugins/org.apache.geronimo.v11.deployment.model/src/org/
geronimo/devtools/eclipse-plugin/branches/2.0.1/plugins/org.apache.geronimo.v11.deployment.model/src/org/apache/
geronimo/devtools/eclipse-plugin/branches/2.0.1/plugins/org.apache.geronimo.v11.deployment.model/src/org/apache/geronimo/
geronimo/devtools/eclipse-plugin/branches/2.0.1/plugins/org.apache.geronimo.v11.deployment.model/src/org/apache/geronimo/xml/
geronimo/devtools/eclipse-plugin/branches/2.0.1/plugins/org.apache.geronimo.v11.deployment.model/src/org/apache/geronimo/xml/ns/
geronimo/devtools/eclipse-plugin/branches/2.0.1/plugins/org.apache.geronimo.v11.deployment.model/src/org/apache/geronimo/xml/ns/deployment/
geronimo/devtools/eclipse-plugin/branches/2.0.1/plugins/org.apache.geronimo.v11.deployment.model/src/org/apache/geronimo/xml/ns/deployment/impl/
geronimo/devtools/eclipse-plugin/branches/2.0.1/plugins/org.apache.geronimo.v11.deployment.model/src/org/apache/geronimo/xml/ns/deployment/impl/ArtifactTypeImpl.java (with props)
Added: geronimo/devtools/eclipse-plugin/branches/2.0.1/plugins/org.apache.geronimo.v11.deployment.model/src/org/apache/geronimo/xml/ns/deployment/impl/ArtifactTypeImpl.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.0.1/plugins/org.apache.geronimo.v11.deployment.model/src/org/apache/geronimo/xml/ns/deployment/impl/ArtifactTypeImpl.java?rev=660109&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.0.1/plugins/org.apache.geronimo.v11.deployment.model/src/org/apache/geronimo/xml/ns/deployment/impl/ArtifactTypeImpl.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.0.1/plugins/org.apache.geronimo.v11.deployment.model/src/org/apache/geronimo/xml/ns/deployment/impl/ArtifactTypeImpl.java Sun May 25 23:50:47 2008
@@ -0,0 +1,387 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.xml.ns.deployment.impl;
+
+import org.apache.geronimo.xml.ns.deployment.ArtifactType;
+import org.apache.geronimo.xml.ns.deployment.DeploymentPackage;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Artifact Type</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.apache.geronimo.xml.ns.deployment.impl.ArtifactTypeImpl#getGroupId <em>Group Id</em>}</li>
+ * <li>{@link org.apache.geronimo.xml.ns.deployment.impl.ArtifactTypeImpl#getArtifactId <em>Artifact Id</em>}</li>
+ * <li>{@link org.apache.geronimo.xml.ns.deployment.impl.ArtifactTypeImpl#getVersion <em>Version</em>}</li>
+ * <li>{@link org.apache.geronimo.xml.ns.deployment.impl.ArtifactTypeImpl#getType <em>Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ *
+ * @version $Rev$ $Date$
+ *
+ */
+public class ArtifactTypeImpl extends EObjectImpl implements ArtifactType
+{
+ /**
+ * The default value of the '{@link #getGroupId() <em>Group Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getGroupId()
+ * @generated
+ * @ordered
+ */
+ protected static final String GROUP_ID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getGroupId() <em>Group Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getGroupId()
+ * @generated
+ * @ordered
+ */
+ protected String groupId = GROUP_ID_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getArtifactId() <em>Artifact Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getArtifactId()
+ * @generated
+ * @ordered
+ */
+ protected static final String ARTIFACT_ID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getArtifactId() <em>Artifact Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getArtifactId()
+ * @generated
+ * @ordered
+ */
+ protected String artifactId = ARTIFACT_ID_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getVersion() <em>Version</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getVersion()
+ * @generated
+ * @ordered
+ */
+ protected static final String VERSION_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getVersion() <em>Version</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getVersion()
+ * @generated
+ * @ordered
+ */
+ protected String version = VERSION_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getType() <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected static final String TYPE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected String type = TYPE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ArtifactTypeImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EClass eStaticClass()
+ {
+ return DeploymentPackage.Literals.ARTIFACT_TYPE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getGroupId()
+ {
+ return groupId;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setGroupId(String newGroupId)
+ {
+ String oldGroupId = groupId;
+ groupId = newGroupId;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DeploymentPackage.ARTIFACT_TYPE__GROUP_ID, oldGroupId, groupId));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getArtifactId()
+ {
+ return artifactId;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setArtifactId(String newArtifactId)
+ {
+ String oldArtifactId = artifactId;
+ artifactId = newArtifactId;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DeploymentPackage.ARTIFACT_TYPE__ARTIFACT_ID, oldArtifactId, artifactId));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getVersion()
+ {
+ return version;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setVersion(String newVersion)
+ {
+ String oldVersion = version;
+ version = newVersion;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DeploymentPackage.ARTIFACT_TYPE__VERSION, oldVersion, version));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getType()
+ {
+ return type;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setType(String newType)
+ {
+ String oldType = type;
+ type = newType;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DeploymentPackage.ARTIFACT_TYPE__TYPE, oldType, type));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case DeploymentPackage.ARTIFACT_TYPE__GROUP_ID:
+ return getGroupId();
+ case DeploymentPackage.ARTIFACT_TYPE__ARTIFACT_ID:
+ return getArtifactId();
+ case DeploymentPackage.ARTIFACT_TYPE__VERSION:
+ return getVersion();
+ case DeploymentPackage.ARTIFACT_TYPE__TYPE:
+ return getType();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case DeploymentPackage.ARTIFACT_TYPE__GROUP_ID:
+ setGroupId((String)newValue);
+ return;
+ case DeploymentPackage.ARTIFACT_TYPE__ARTIFACT_ID:
+ setArtifactId((String)newValue);
+ return;
+ case DeploymentPackage.ARTIFACT_TYPE__VERSION:
+ setVersion((String)newValue);
+ return;
+ case DeploymentPackage.ARTIFACT_TYPE__TYPE:
+ setType((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case DeploymentPackage.ARTIFACT_TYPE__GROUP_ID:
+ setGroupId(GROUP_ID_EDEFAULT);
+ return;
+ case DeploymentPackage.ARTIFACT_TYPE__ARTIFACT_ID:
+ setArtifactId(ARTIFACT_ID_EDEFAULT);
+ return;
+ case DeploymentPackage.ARTIFACT_TYPE__VERSION:
+ setVersion(VERSION_EDEFAULT);
+ return;
+ case DeploymentPackage.ARTIFACT_TYPE__TYPE:
+ setType(TYPE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case DeploymentPackage.ARTIFACT_TYPE__GROUP_ID:
+ return GROUP_ID_EDEFAULT == null ? groupId != null : !GROUP_ID_EDEFAULT.equals(groupId);
+ case DeploymentPackage.ARTIFACT_TYPE__ARTIFACT_ID:
+ return ARTIFACT_ID_EDEFAULT == null ? artifactId != null : !ARTIFACT_ID_EDEFAULT.equals(artifactId);
+ case DeploymentPackage.ARTIFACT_TYPE__VERSION:
+ return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version);
+ case DeploymentPackage.ARTIFACT_TYPE__TYPE:
+ return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (groupId: ");
+ result.append(groupId);
+ result.append(", artifactId: ");
+ result.append(artifactId);
+ result.append(", version: ");
+ result.append(version);
+ result.append(", type: ");
+ result.append(type);
+ result.append(')');
+ return result.toString();
+ }
+
+ /**
+ *
+ */
+ public boolean equals(Object o) {
+
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ final ArtifactType that = (ArtifactType) o;
+
+ if (groupId != null ? !groupId.equals(that.getGroupId()) : that.getGroupId() != null) return false;
+ if (artifactId != null ? !artifactId.equals(that.getArtifactId()) : that.getArtifactId() != null) return false;
+ if (version != null ? !version.equals(that.getVersion()) : that.getVersion() != null) return false;
+ if (type != null ? !type.equals(that.getType()) : that.getType() != null) return false;
+
+ return true;
+ }
+
+ /**
+ *
+ */
+ public int hashCode() {
+ int result;
+ result = (groupId != null ? groupId.hashCode() : 0);
+ result = 29 * result + (artifactId != null? artifactId.hashCode() : 0);
+ result = 29 * result + (version != null ? version.hashCode() : 0);
+ result = 29 * result + (type != null ? type.hashCode() : 0);
+ return result;
+ }
+
+
+} //ArtifactTypeImpl
Propchange: geronimo/devtools/eclipse-plugin/branches/2.0.1/plugins/org.apache.geronimo.v11.deployment.model/src/org/apache/geronimo/xml/ns/deployment/impl/ArtifactTypeImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/branches/2.0.1/plugins/org.apache.geronimo.v11.deployment.model/src/org/apache/geronimo/xml/ns/deployment/impl/ArtifactTypeImpl.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/branches/2.0.1/plugins/org.apache.geronimo.v11.deployment.model/src/org/apache/geronimo/xml/ns/deployment/impl/ArtifactTypeImpl.java
------------------------------------------------------------------------------
svn:mime-type = text/plain