1
2
3
4
5
6
7
8 package org.codehaus.plexus.security.keys.jdo.v0_9_0;
9
10
11
12
13
14
15
16
17
18
19 public class JdoAuthenticationKey
20 implements org.codehaus.plexus.security.keys.AuthenticationKey, java.io.Serializable
21 {
22
23
24
25
26
27
28
29
30 private String key;
31
32
33
34
35 private String forPrincipal;
36
37
38
39
40 private String purpose;
41
42
43
44
45 private java.util.Date dateCreated;
46
47
48
49
50 private java.util.Date dateExpires;
51
52
53
54
55
56
57
58
59
60
61
62
63 public boolean equals( Object other )
64 {
65 if ( this == other )
66 {
67 return true;
68 }
69
70 if ( !( other instanceof JdoAuthenticationKey ) )
71 {
72 return false;
73 }
74
75 JdoAuthenticationKey that = (JdoAuthenticationKey) other;
76 boolean result = true;
77
78 result = result && ( getKey() == null ? that.getKey() == null : getKey().equals( that.getKey() ) );
79 result = result && ( getForPrincipal() == null ? that.getForPrincipal() == null : getForPrincipal().equals( that.getForPrincipal() ) );
80
81 return result;
82 }
83
84
85
86
87
88
89 public java.util.Date getDateCreated()
90 {
91 return this.dateCreated;
92 }
93
94
95
96
97
98
99 public java.util.Date getDateExpires()
100 {
101 return this.dateExpires;
102 }
103
104
105
106
107
108
109 public String getForPrincipal()
110 {
111 return this.forPrincipal;
112 }
113
114
115
116
117
118
119 public String getKey()
120 {
121 return this.key;
122 }
123
124
125
126
127
128
129 public String getPurpose()
130 {
131 return this.purpose;
132 }
133
134
135
136
137
138
139 public int hashCode()
140 {
141 int result = 17;
142
143 result = 37 * result + ( key != null ? key.hashCode() : 0 );
144 result = 37 * result + ( forPrincipal != null ? forPrincipal.hashCode() : 0 );
145
146 return result;
147 }
148
149
150
151
152
153
154 public void setDateCreated( java.util.Date dateCreated )
155 {
156 this.dateCreated = dateCreated;
157 }
158
159
160
161
162
163
164 public void setDateExpires( java.util.Date dateExpires )
165 {
166 this.dateExpires = dateExpires;
167 }
168
169
170
171
172
173
174 public void setForPrincipal( String forPrincipal )
175 {
176 this.forPrincipal = forPrincipal;
177 }
178
179
180
181
182
183
184 public void setKey( String key )
185 {
186 this.key = key;
187 }
188
189
190
191
192
193
194 public void setPurpose( String purpose )
195 {
196 this.purpose = purpose;
197 }
198
199
200
201
202
203
204 public java.lang.String toString()
205 {
206 StringBuffer buf = new StringBuffer( 128 );
207
208 buf.append( "key = '" );
209 buf.append( getKey() );
210 buf.append( "'" );
211 buf.append( "\n" );
212 buf.append( "forPrincipal = '" );
213 buf.append( getForPrincipal() );
214 buf.append( "'" );
215
216 return buf.toString();
217 }
218
219 }