KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > xpetstore > domain > Account


1 /*
2  * Generated file - Do not edit!
3  */

4 package xpetstore.domain;
5
6 import java.io.Serializable JavaDoc;
7
8
9 /**
10  *
11  * @author <a HREF="mailto:tchbansi@sourceforge.net">Herve Tchepannou</a>
12  *
13  * @hibernate.class
14  * table="T_ACCOUNT"
15  */

16 public class Account
17     implements Serializable JavaDoc
18 {
19     //~ Instance fields --------------------------------------------------------
20

21     private String JavaDoc _userId = "";
22     private String JavaDoc _password = "";
23
24     //~ Constructors -----------------------------------------------------------
25

26     public Account( )
27     {
28         super( );
29     }
30
31     //~ Methods ----------------------------------------------------------------
32

33     public boolean matchPassword( String JavaDoc password )
34     {
35         return ( password == null )
36                ? ( _password == null )
37                : password.equals( _password );
38     }
39
40     /**
41      * @return String
42      *
43      * @hibernate.property
44      * column="pwd"
45      * length="10"
46      * not-null="true"
47      */

48     public String JavaDoc getPassword( )
49     {
50         return _password;
51     }
52
53     /**
54      * @return String
55      *
56      * @hibernate.id
57      * generator-class="assigned"
58      * length="10"
59      */

60     public String JavaDoc getUserId( )
61     {
62         return _userId;
63     }
64
65     public void set( Account account )
66     {
67         _password = account.getPassword( );
68     }
69
70     /**
71      * Sets the password.
72      * @param password The password to set
73      */

74     public void setPassword( String JavaDoc password )
75     {
76         _password = password;
77     }
78
79     /**
80      * Sets the userId.
81      * @param userId The userId to set
82      */

83     public void setUserId( String JavaDoc userId )
84     {
85         _userId = userId;
86     }
87 }
88
Popular Tags