001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: /*
018: User.java
019:
020: Representation of a user.
021:
022: Author: Ovidiu Predescu <ovidiu@apache.org>
023: Date: August 28, 2002
024:
025: */
026: package org.apache.cocoon.samples.flow.prefs;
027:
028: /**
029: *
030: * @version CVS $Id: User.java 433543 2006-08-22 06:22:54Z crossley $
031: */
032: public class User {
033: String login;
034: String password;
035: String firstName;
036: String lastName;
037: String email;
038:
039: public User(String login, String password, String firstName,
040: String lastName, String email) {
041: this .login = login;
042: this .password = password;
043: this .firstName = firstName;
044: this .lastName = lastName;
045: this .email = email;
046: }
047:
048: public int hashCode() {
049: return login.hashCode();
050: }
051:
052: public boolean equals(Object obj) {
053: User anotherUser = (User) obj;
054: return anotherUser.login.equals(login);
055: }
056:
057: /**
058: * Sets the value of login
059: *
060: * @param argLogin Value to assign to this.login
061: */
062: public void setLogin(String argLogin) {
063: this .login = argLogin;
064: }
065:
066: /**
067: * Gets the value of login
068: *
069: * @return the value of login
070: */
071: public String getLogin() {
072: return this .login;
073: }
074:
075: /**
076: * Gets the value of password
077: *
078: * @return the value of password
079: */
080: public String getPassword() {
081: return this .password;
082: }
083:
084: /**
085: * Sets the value of password
086: *
087: * @param argPassword Value to assign to this.password
088: */
089: public void setPassword(String argPassword) {
090: this .password = argPassword;
091: }
092:
093: /**
094: * Gets the value of firstName
095: *
096: * @return the value of firstName
097: */
098: public String getFirstName() {
099: return this .firstName;
100: }
101:
102: /**
103: * Sets the value of firstName
104: *
105: * @param argFirstName Value to assign to this.firstName
106: */
107: public void setFirstName(String argFirstName) {
108: this .firstName = argFirstName;
109: }
110:
111: /**
112: * Gets the value of lastName
113: *
114: * @return the value of lastName
115: */
116: public String getLastName() {
117: return this .lastName;
118: }
119:
120: /**
121: * Sets the value of lastName
122: *
123: * @param argLastName Value to assign to this.lastName
124: */
125: public void setLastName(String argLastName) {
126: this .lastName = argLastName;
127: }
128:
129: /**
130: * Gets the value of email
131: *
132: * @return the value of email
133: */
134: public String getEmail() {
135: return this .email;
136: }
137:
138: /**
139: * Sets the value of email
140: *
141: * @param argEmail Value to assign to this.email
142: */
143: public void setEmail(String argEmail) {
144: this.email = argEmail;
145: }
146: }
|