summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2009-11-30 03:10:40 +0000
committerBrett Porter <brett@apache.org>2009-11-30 03:10:40 +0000
commitd6c5ea064e90818d7a27ff00b68cf262371a8b74 (patch)
treea8b7752d133d895b5eebc91e32f6882eadd5b053 /archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api
parent0caebfc6b621579481aca223a76e24be0be9f0c3 (diff)
downloadarchiva-d6c5ea064e90818d7a27ff00b68cf262371a8b74.tar.gz
archiva-d6c5ea064e90818d7a27ff00b68cf262371a8b74.zip
[MRM-1288] migrate getDependees() to new API
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1025@885319 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api')
-rw-r--r--archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/Artifact.java49
1 files changed, 49 insertions, 0 deletions
diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/Artifact.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/Artifact.java
index 7c1176cac..8ea155574 100644
--- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/Artifact.java
+++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/Artifact.java
@@ -45,6 +45,55 @@ public class Artifact
}
+ @Override
+ public boolean equals( Object o )
+ {
+ if ( this == o )
+ {
+ return true;
+ }
+ if ( o == null || getClass() != o.getClass() )
+ {
+ return false;
+ }
+
+ Artifact artifact = (Artifact) o;
+
+ if ( !artifactId.equals( artifact.artifactId ) )
+ {
+ return false;
+ }
+ if ( !groupId.equals( artifact.groupId ) )
+ {
+ return false;
+ }
+ if ( !repositoryId.equals( artifact.repositoryId ) )
+ {
+ return false;
+ }
+ if ( type != null ? !type.equals( artifact.type ) : artifact.type != null )
+ {
+ return false;
+ }
+ if ( !version.equals( artifact.version ) )
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ int result = repositoryId.hashCode();
+ result = 31 * result + groupId.hashCode();
+ result = 31 * result + artifactId.hashCode();
+ result = 31 * result + version.hashCode();
+ result = 31 * result + ( type != null ? type.hashCode() : 0 );
+ return result;
+ }
+
public Artifact( String repositoryId, String groupId, String artifactId, String version, String type )
// String type, Date whenGathered )
{