This project has retired. For details please refer to its
Attic page.
Dependency xref
1 package org.apache.archiva.rest.api.model;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import javax.xml.bind.annotation.XmlRootElement;
23 import java.io.Serializable;
24
25 @XmlRootElement( name = "dependency" )
26 public class Dependency
27 implements Serializable
28 {
29 private String groupId;
30
31 private String artifactId;
32
33 private String version;
34
35 private String classifier;
36
37 private String type;
38
39 private String scope;
40
41 public Dependency()
42 {
43
44 }
45
46
47 public Dependency( String groupId, String artifactId, String version, String classifier, String type, String scope )
48 {
49 this.groupId = groupId;
50 this.artifactId = artifactId;
51 this.version = version;
52 this.classifier = classifier;
53 this.type = type;
54 this.scope = scope;
55 }
56
57 public String getGroupId()
58 {
59 return groupId;
60 }
61
62 public void setGroupId( String groupId )
63 {
64 this.groupId = groupId;
65 }
66
67 public String getArtifactId()
68 {
69 return artifactId;
70 }
71
72 public void setArtifactId( String artifactId )
73 {
74 this.artifactId = artifactId;
75 }
76
77 public String getVersion()
78 {
79 return version;
80 }
81
82 public void setVersion( String version )
83 {
84 this.version = version;
85 }
86
87 public String getClassifier()
88 {
89 return classifier;
90 }
91
92 public void setClassifier( String classifier )
93 {
94 this.classifier = classifier;
95 }
96
97 public String getType()
98 {
99 return type;
100 }
101
102 public void setType( String type )
103 {
104 this.type = type;
105 }
106
107 public String getScope()
108 {
109 return scope;
110 }
111
112 public void setScope( String scope )
113 {
114 this.scope = scope;
115 }
116
117 @Override
118 public String toString()
119 {
120 return "Dependency{" + "groupId='" + groupId + '\'' + ", artifactId='" + artifactId + '\'' + ", version='"
121 + version + '\'' + ", classifier='" + classifier + '\'' + ", type='" + type + '\'' + ", scope='" + scope
122 + '\'' + '}';
123 }
124
125 @Override
126 public boolean equals( Object o )
127 {
128 if ( this == o )
129 {
130 return true;
131 }
132 if ( o == null || getClass() != o.getClass() )
133 {
134 return false;
135 }
136
137 Dependency that = (Dependency) o;
138
139 if ( !artifactId.equals( that.artifactId ) )
140 {
141 return false;
142 }
143 if ( classifier != null ? !classifier.equals( that.classifier ) : that.classifier != null )
144 {
145 return false;
146 }
147 if ( !groupId.equals( that.groupId ) )
148 {
149 return false;
150 }
151 if ( scope != null ? !scope.equals( that.scope ) : that.scope != null )
152 {
153 return false;
154 }
155 if ( type != null ? !type.equals( that.type ) : that.type != null )
156 {
157 return false;
158 }
159 if ( !version.equals( that.version ) )
160 {
161 return false;
162 }
163
164 return true;
165 }
166
167 @Override
168 public int hashCode()
169 {
170 int result = groupId.hashCode();
171 result = 31 * result + artifactId.hashCode();
172 result = 31 * result + version.hashCode();
173 result = 31 * result + ( classifier != null ? classifier.hashCode() : 0 );
174 result = 31 * result + ( type != null ? type.hashCode() : 0 );
175 result = 31 * result + ( scope != null ? scope.hashCode() : 0 );
176 return result;
177 }
178 }