KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > samples > flow > prefs > User


1 /*
2 * Copyright 1999-2004 The Apache Software Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */

16 /*
17     User.java
18
19     Representation of a user.
20
21     Author: Ovidiu Predescu <ovidiu@apache.org>
22     Date: August 28, 2002
23
24  */

25 package org.apache.cocoon.samples.flow.prefs;
26
27 /**
28  *
29  * @version CVS $Id: User.java 30932 2004-07-29 17:35:38Z vgritsenko $
30  */

31 public class User
32 {
33   String JavaDoc login;
34   String JavaDoc password;
35   String JavaDoc firstName;
36   String JavaDoc lastName;
37   String JavaDoc email;
38
39   public User(String JavaDoc login, String JavaDoc password,
40               String JavaDoc firstName, String JavaDoc lastName, String JavaDoc email)
41   {
42     this.login = login;
43     this.password = password;
44     this.firstName = firstName;
45     this.lastName = lastName;
46     this.email = email;
47   }
48
49   public int hashCode()
50   {
51     return login.hashCode();
52   }
53
54   public boolean equals(Object JavaDoc obj)
55   {
56     User anotherUser = (User)obj;
57     return anotherUser.login.equals(login);
58   }
59   
60   /**
61    * Sets the value of login
62    *
63    * @param argLogin Value to assign to this.login
64    */

65   public void setLogin(String JavaDoc argLogin)
66   {
67     this.login = argLogin;
68   }
69   /**
70    * Gets the value of login
71    *
72    * @return the value of login
73    */

74   public String JavaDoc getLogin()
75   {
76     return this.login;
77   }
78
79   /**
80    * Gets the value of password
81    *
82    * @return the value of password
83    */

84   public String JavaDoc getPassword()
85   {
86     return this.password;
87   }
88
89   /**
90    * Sets the value of password
91    *
92    * @param argPassword Value to assign to this.password
93    */

94   public void setPassword(String JavaDoc argPassword)
95   {
96     this.password = argPassword;
97   }
98
99   /**
100    * Gets the value of firstName
101    *
102    * @return the value of firstName
103    */

104   public String JavaDoc getFirstName()
105   {
106     return this.firstName;
107   }
108
109   /**
110    * Sets the value of firstName
111    *
112    * @param argFirstName Value to assign to this.firstName
113    */

114   public void setFirstName(String JavaDoc argFirstName)
115   {
116     this.firstName = argFirstName;
117   }
118
119   /**
120    * Gets the value of lastName
121    *
122    * @return the value of lastName
123    */

124   public String JavaDoc getLastName()
125   {
126     return this.lastName;
127   }
128
129   /**
130    * Sets the value of lastName
131    *
132    * @param argLastName Value to assign to this.lastName
133    */

134   public void setLastName(String JavaDoc argLastName)
135   {
136     this.lastName = argLastName;
137   }
138
139   /**
140    * Gets the value of email
141    *
142    * @return the value of email
143    */

144   public String JavaDoc getEmail()
145   {
146     return this.email;
147   }
148
149   /**
150    * Sets the value of email
151    *
152    * @param argEmail Value to assign to this.email
153    */

154   public void setEmail(String JavaDoc argEmail)
155   {
156     this.email = argEmail;
157   }
158 }
159
Popular Tags