This project has retired. For details please refer to its
Attic page.
ProjectVersionReference xref
1 package org.apache.archiva.metadata.model;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 public class ProjectVersionReference
23 {
24 private ReferenceType referenceType;
25
26 private String projectId;
27
28 private String namespace;
29
30 private String projectVersion;
31
32 public ProjectVersionReference()
33 {
34
35 }
36
37 public ProjectVersionReference( ReferenceType referenceType, String projectId, String namespace,
38 String projectVersion )
39 {
40 this.referenceType = referenceType;
41 this.projectId = projectId;
42 this.namespace = namespace;
43 this.projectVersion = projectVersion;
44 }
45
46 public void setReferenceType( ReferenceType referenceType )
47 {
48 this.referenceType = referenceType;
49 }
50
51 public void setNamespace( String namespace )
52 {
53 this.namespace = namespace;
54 }
55
56 public void setProjectId( String projectId )
57 {
58 this.projectId = projectId;
59 }
60
61 public ReferenceType getReferenceType()
62 {
63 return referenceType;
64 }
65
66 public String getProjectId()
67 {
68 return projectId;
69 }
70
71 public String getProjectVersion()
72 {
73 return projectVersion;
74 }
75
76 public String getNamespace()
77 {
78 return namespace;
79 }
80
81 public void setProjectVersion( String projectVersion )
82 {
83 this.projectVersion = projectVersion;
84 }
85
86 public enum ReferenceType
87 {
88 DEPENDENCY,
89 PARENT
90 }
91
92 @Override
93 public boolean equals( Object o )
94 {
95 if ( this == o )
96 {
97 return true;
98 }
99 if ( o == null || getClass() != o.getClass() )
100 {
101 return false;
102 }
103
104 ProjectVersionReferenceorg/apache/archiva/metadata/model/ProjectVersionReference.html#ProjectVersionReference">ProjectVersionReference that = (ProjectVersionReference) o;
105
106 if ( !namespace.equals( that.namespace ) )
107 {
108 return false;
109 }
110 if ( !projectId.equals( that.projectId ) )
111 {
112 return false;
113 }
114 if ( !projectVersion.equals( that.projectVersion ) )
115 {
116 return false;
117 }
118 if ( referenceType != that.referenceType )
119 {
120 return false;
121 }
122
123 return true;
124 }
125
126 @Override
127 public int hashCode()
128 {
129 int result = referenceType.hashCode();
130 result = 31 * result + projectId.hashCode();
131 result = 31 * result + namespace.hashCode();
132 result = 31 * result + projectVersion.hashCode();
133 return result;
134 }
135 }