KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > test > lob > User


1 // $Id: User.java,v 1.4 2005/02/12 07:27:27 steveebersole Exp $
2
package org.hibernate.test.lob;
3
4 import java.io.Serializable JavaDoc;
5
6 /**
7  * Implementation of User.
8  *
9  * @author Steve
10  */

11 public class User implements Serializable JavaDoc {
12     private Long JavaDoc id;
13     private String JavaDoc handle;
14     private String JavaDoc password;
15     private Name name;
16     private String JavaDoc email;
17     private Serializable JavaDoc serialData;
18
19     public String JavaDoc getHandle() {
20         return handle;
21     }
22
23     public void setHandle(String JavaDoc handle) {
24         this.handle = handle;
25     }
26
27     public Long JavaDoc getId() {
28         return id;
29     }
30
31     protected void setId(Long JavaDoc id) {
32         this.id = id;
33     }
34
35     public Name getName() {
36         return name;
37     }
38
39     public void setName(Name name) {
40         this.name = name;
41     }
42
43     public String JavaDoc getPassword() {
44         return password;
45     }
46
47     public void setPassword(String JavaDoc password) {
48         this.password = password;
49     }
50
51     public String JavaDoc getEmail() {
52         return email;
53     }
54
55     public void setEmail(String JavaDoc email) {
56         this.email = email;
57     }
58
59     public boolean equals(Object JavaDoc other) {
60         if (other==null) return false;
61         if ( !(other instanceof User) ) return false;
62         return ( (User) other ).getHandle().equals(handle);
63     }
64
65     public int hashCode() {
66         return handle.hashCode();
67     }
68
69
70    public Serializable JavaDoc getSerialData()
71    {
72       return serialData;
73    }
74
75    public void setSerialData(Serializable JavaDoc serialData)
76    {
77       this.serialData = serialData;
78    }
79 }
80
Popular Tags