This project has retired. For details please refer to its Attic page.
JdoUser xref
View Javadoc

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.users.jdo;
7   
8   /**
9    * Class JdoUser.
10   * 
11   * @version $Revision$ $Date$
12   */
13  public class JdoUser
14      implements org.apache.archiva.redback.users.User, java.io.Serializable
15  {
16  
17        //--------------------------/
18       //- Class/Member Variables -/
19      //--------------------------/
20  
21      /**
22       * Field username.
23       */
24      private String username;
25  
26      /**
27       * Field password.
28       */
29      private String password;
30  
31      /**
32       * Field encodedPassword.
33       */
34      private String encodedPassword;
35  
36      /**
37       * Field fullName.
38       */
39      private String fullName;
40  
41      /**
42       * Field email.
43       */
44      private String email;
45  
46      /**
47       * Field lastPasswordChange.
48       */
49      private java.util.Date lastPasswordChange;
50  
51      /**
52       * Field lastLoginDate.
53       */
54      private java.util.Date lastLoginDate;
55  
56      /**
57       * Field countFailedLoginAttempts.
58       */
59      private int countFailedLoginAttempts = 0;
60  
61      /**
62       * Field locked.
63       */
64      private boolean locked = false;
65  
66      /**
67       * Field permanent.
68       */
69      private boolean permanent = false;
70  
71      /**
72       * Field validated.
73       */
74      private boolean validated = false;
75  
76      /**
77       * Field passwordChangeRequired.
78       */
79      private boolean passwordChangeRequired = false;
80  
81      /**
82       * Field previousEncodedPasswords.
83       */
84      private java.util.List/*<String>*/ previousEncodedPasswords;
85  
86      /**
87       * Field accountCreationDate.
88       */
89      private java.util.Date accountCreationDate;
90  
91  
92        //-----------/
93       //- Methods -/
94      //-----------/
95  
96      /**
97       * Method addPreviousEncodedPassword.
98       * 
99       * @param string
100      */
101     public void addPreviousEncodedPassword( String string )
102     {
103         getPreviousEncodedPasswords().add( string );
104     } //-- void addPreviousEncodedPassword( String )
105 
106     /**
107      * Method equals.
108      * 
109      * @param other
110      * @return boolean
111      */
112     public boolean equals( Object other )
113     {
114         if ( this == other )
115         {
116             return true;
117         }
118 
119         if ( !( other instanceof JdoUser ) )
120         {
121             return false;
122         }
123 
124         JdoUser that = (JdoUser) other;
125         boolean result = true;
126 
127         result = result && ( getUsername() == null ? that.getUsername() == null : getUsername().equals( that.getUsername() ) );
128         result = result && ( getPassword() == null ? that.getPassword() == null : getPassword().equals( that.getPassword() ) );
129         result = result && ( getEncodedPassword() == null ? that.getEncodedPassword() == null : getEncodedPassword().equals( that.getEncodedPassword() ) );
130         result = result && ( getFullName() == null ? that.getFullName() == null : getFullName().equals( that.getFullName() ) );
131         result = result && ( getEmail() == null ? that.getEmail() == null : getEmail().equals( that.getEmail() ) );
132         result = result && locked == that.locked;
133         result = result && permanent == that.permanent;
134         result = result && validated == that.validated;
135         result = result && passwordChangeRequired == that.passwordChangeRequired;
136 
137         return result;
138     } //-- boolean equals( Object )
139 
140     /**
141      * Get the accountCreationDate field.
142      * 
143      * @return Date
144      */
145     public java.util.Date getAccountCreationDate()
146     {
147         return this.accountCreationDate;
148     } //-- java.util.Date getAccountCreationDate()
149 
150     /**
151      * Get the countFailedLoginAttempts field.
152      * 
153      * @return int
154      */
155     public int getCountFailedLoginAttempts()
156     {
157         return this.countFailedLoginAttempts;
158     } //-- int getCountFailedLoginAttempts()
159 
160     /**
161      * Get the email field.
162      * 
163      * @return String
164      */
165     public String getEmail()
166     {
167         return this.email;
168     } //-- String getEmail()
169 
170     /**
171      * Get the encodedPassword field.
172      * 
173      * @return String
174      */
175     public String getEncodedPassword()
176     {
177         return this.encodedPassword;
178     } //-- String getEncodedPassword()
179 
180     /**
181      * Get the fullName field.
182      * 
183      * @return String
184      */
185     public String getFullName()
186     {
187         return this.fullName;
188     } //-- String getFullName()
189 
190     /**
191      * Get the lastLoginDate field.
192      * 
193      * @return Date
194      */
195     public java.util.Date getLastLoginDate()
196     {
197         return this.lastLoginDate;
198     } //-- java.util.Date getLastLoginDate()
199 
200     /**
201      * Get the lastPasswordChange field.
202      * 
203      * @return Date
204      */
205     public java.util.Date getLastPasswordChange()
206     {
207         return this.lastPasswordChange;
208     } //-- java.util.Date getLastPasswordChange()
209 
210     /**
211      * Get the password field.
212      * 
213      * @return String
214      */
215     public String getPassword()
216     {
217         return this.password;
218     } //-- String getPassword()
219 
220     /**
221      * Method getPreviousEncodedPasswords.
222      * 
223      * @return List
224      */
225     public java.util.List/*<String>*/ getPreviousEncodedPasswords()
226     {
227         if ( this.previousEncodedPasswords == null )
228         {
229             this.previousEncodedPasswords = new java.util.ArrayList/*<String>*/();
230         }
231 
232         return this.previousEncodedPasswords;
233     } //-- java.util.List/*<String>*/ getPreviousEncodedPasswords()
234 
235     /**
236      * Get the username field.
237      * 
238      * @return String
239      */
240     public String getUsername()
241     {
242         return this.username;
243     } //-- String getUsername()
244 
245     /**
246      * Method hashCode.
247      * 
248      * @return int
249      */
250     public int hashCode()
251     {
252         int result = 17;
253 
254         result = 37 * result + ( username != null ? username.hashCode() : 0 );
255         result = 37 * result + ( password != null ? password.hashCode() : 0 );
256         result = 37 * result + ( encodedPassword != null ? encodedPassword.hashCode() : 0 );
257         result = 37 * result + ( fullName != null ? fullName.hashCode() : 0 );
258         result = 37 * result + ( email != null ? email.hashCode() : 0 );
259         result = 37 * result + ( locked ? 0 : 1 );
260         result = 37 * result + ( permanent ? 0 : 1 );
261         result = 37 * result + ( validated ? 0 : 1 );
262         result = 37 * result + ( passwordChangeRequired ? 0 : 1 );
263 
264         return result;
265     } //-- int hashCode()
266 
267     /**
268      * Get the locked field.
269      * 
270      * @return boolean
271      */
272     public boolean isLocked()
273     {
274         return this.locked;
275     } //-- boolean isLocked()
276 
277     /**
278      * Get the passwordChangeRequired field.
279      * 
280      * @return boolean
281      */
282     public boolean isPasswordChangeRequired()
283     {
284         return this.passwordChangeRequired;
285     } //-- boolean isPasswordChangeRequired()
286 
287     /**
288      * Get the permanent field.
289      * 
290      * @return boolean
291      */
292     public boolean isPermanent()
293     {
294         return this.permanent;
295     } //-- boolean isPermanent()
296 
297     /**
298      * Get the validated field.
299      * 
300      * @return boolean
301      */
302     public boolean isValidated()
303     {
304         return this.validated;
305     } //-- boolean isValidated()
306 
307     /**
308      * Method removePreviousEncodedPassword.
309      * 
310      * @param string
311      */
312     public void removePreviousEncodedPassword( String string )
313     {
314         getPreviousEncodedPasswords().remove( string );
315     } //-- void removePreviousEncodedPassword( String )
316 
317     /**
318      * Set the accountCreationDate field.
319      * 
320      * @param accountCreationDate
321      */
322     public void setAccountCreationDate( java.util.Date accountCreationDate )
323     {
324         this.accountCreationDate = accountCreationDate;
325     } //-- void setAccountCreationDate( java.util.Date )
326 
327     /**
328      * Set the countFailedLoginAttempts field.
329      * 
330      * @param countFailedLoginAttempts
331      */
332     public void setCountFailedLoginAttempts( int countFailedLoginAttempts )
333     {
334         this.countFailedLoginAttempts = countFailedLoginAttempts;
335     } //-- void setCountFailedLoginAttempts( int )
336 
337     /**
338      * Set the email field.
339      * 
340      * @param email
341      */
342     public void setEmail( String email )
343     {
344         this.email = email;
345     } //-- void setEmail( String )
346 
347     /**
348      * Set the encodedPassword field.
349      * 
350      * @param encodedPassword
351      */
352     public void setEncodedPassword( String encodedPassword )
353     {
354         this.encodedPassword = encodedPassword;
355     } //-- void setEncodedPassword( String )
356 
357     /**
358      * Set the fullName field.
359      * 
360      * @param fullName
361      */
362     public void setFullName( String fullName )
363     {
364         this.fullName = fullName;
365     } //-- void setFullName( String )
366 
367     /**
368      * Set the lastLoginDate field.
369      * 
370      * @param lastLoginDate
371      */
372     public void setLastLoginDate( java.util.Date lastLoginDate )
373     {
374         this.lastLoginDate = lastLoginDate;
375     } //-- void setLastLoginDate( java.util.Date )
376 
377     /**
378      * Set the lastPasswordChange field.
379      * 
380      * @param lastPasswordChange
381      */
382     public void setLastPasswordChange( java.util.Date lastPasswordChange )
383     {
384         this.lastPasswordChange = lastPasswordChange;
385     } //-- void setLastPasswordChange( java.util.Date )
386 
387     /**
388      * Set the locked field.
389      * 
390      * @param locked
391      */
392     public void setLocked( boolean locked )
393     {
394         this.locked = locked;
395     } //-- void setLocked( boolean )
396 
397     /**
398      * Set the password field.
399      * 
400      * @param password
401      */
402     public void setPassword( String password )
403     {
404         this.password = password;
405     } //-- void setPassword( String )
406 
407     /**
408      * Set the passwordChangeRequired field.
409      * 
410      * @param passwordChangeRequired
411      */
412     public void setPasswordChangeRequired( boolean passwordChangeRequired )
413     {
414         this.passwordChangeRequired = passwordChangeRequired;
415     } //-- void setPasswordChangeRequired( boolean )
416 
417     /**
418      * Set the permanent field.
419      * 
420      * @param permanent
421      */
422     public void setPermanent( boolean permanent )
423     {
424         this.permanent = permanent;
425     } //-- void setPermanent( boolean )
426 
427     /**
428      * Set the previousEncodedPasswords field.
429      * 
430      * @param previousEncodedPasswords
431      */
432     public void setPreviousEncodedPasswords( java.util.List/*<String>*/ previousEncodedPasswords )
433     {
434         this.previousEncodedPasswords = previousEncodedPasswords;
435     } //-- void setPreviousEncodedPasswords( java.util.List )
436 
437     /**
438      * Set the username field.
439      * 
440      * @param username
441      */
442     public void setUsername( String username )
443     {
444         this.username = username;
445     } //-- void setUsername( String )
446 
447     /**
448      * Set the validated field.
449      * 
450      * @param validated
451      */
452     public void setValidated( boolean validated )
453     {
454         this.validated = validated;
455     } //-- void setValidated( boolean )
456 
457     /**
458      * Method toString.
459      * 
460      * @return String
461      */
462     public java.lang.String toString()
463     {
464         StringBuffer buf = new StringBuffer( 128 );
465 
466         buf.append( "username = '" );
467         buf.append( getUsername() );
468         buf.append( "'" );
469         buf.append( "\n" ); 
470         buf.append( "password = '" );
471         buf.append( getPassword() );
472         buf.append( "'" );
473         buf.append( "\n" ); 
474         buf.append( "encodedPassword = '" );
475         buf.append( getEncodedPassword() );
476         buf.append( "'" );
477         buf.append( "\n" ); 
478         buf.append( "fullName = '" );
479         buf.append( getFullName() );
480         buf.append( "'" );
481         buf.append( "\n" ); 
482         buf.append( "email = '" );
483         buf.append( getEmail() );
484         buf.append( "'" );
485         buf.append( "\n" ); 
486         buf.append( "locked = '" );
487         buf.append( isLocked() );
488         buf.append( "'" );
489         buf.append( "\n" ); 
490         buf.append( "permanent = '" );
491         buf.append( isPermanent() );
492         buf.append( "'" );
493         buf.append( "\n" ); 
494         buf.append( "validated = '" );
495         buf.append( isValidated() );
496         buf.append( "'" );
497         buf.append( "\n" ); 
498         buf.append( "passwordChangeRequired = '" );
499         buf.append( isPasswordChangeRequired() );
500         buf.append( "'" );
501 
502         return buf.toString();
503     } //-- java.lang.String toString()
504 
505     
506               public JdoUser()
507               {
508                  // Intentionally initialize List to avoid JPOX NullPointerException Issues.
509               	 previousEncodedPasswords = new java.util.ArrayList<String>();
510               }
511               public String getUserManagerId()
512               {
513                 return "jdo";
514               }
515 
516           
517 }