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