KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > webapps > fichotheque > User


1 package org.jahia.webapps.fichotheque;
2
3
4 import java.util.*;
5
6
7 /**
8  * Holds details of the current logged user, and the current period worked on
9  * by the user (read "worked on" as: "performing actions within the
10  * application").
11  * Details of the user include: login and role.
12  * It is intended that an instance of this class should be placed
13  * in the user's HTTP session.
14  *
15  * @author <a HREF="mailto:boury@mycomponents.com">Stephane Boury</a>
16  * @version 1.0
17  * @see Period
18  */

19 public class User {
20
21     private int userId=0;
22     /** the login of this User */
23     private String JavaDoc userLogin = "";
24
25     private String JavaDoc userLastName;
26     private String JavaDoc userFirstName;
27     private String JavaDoc userPasswd;
28
29     /**
30         * Default constructor required by OJB
31         */

32        public User(){
33
34            // accept default values
35
}
36
37
38        public User(int id, String JavaDoc login, String JavaDoc password, String JavaDoc lastname) {
39
40       this.userId = id;
41       this.userPasswd= password;
42       this.userLogin = login;
43       this.userLastName=lastname;
44     }
45
46
47
48
49     /**
50      * Sets the login for this <code>User</code>.
51      *
52      * @param login the new login
53      */

54
55     /**
56      * Gets the login of this <code>User</code>.
57      *
58      * @return the <code>User</code> login
59      */

60
61
62
63
64
65   public String JavaDoc getUserFirstName() {
66     return userFirstName;
67   }
68   public void setUserFirstName(String JavaDoc userFirstName) {
69     this.userFirstName = userFirstName;
70   }
71   public int getUserId() {
72     return userId;
73   }
74   public void setUserId(int userId) {
75     this.userId = userId;
76   }
77   public String JavaDoc getUserLastName() {
78     return userLastName;
79   }
80   public void setUserLastName(String JavaDoc userLastName) {
81     this.userLastName = userLastName;
82   }
83   public void setUserLogin(String JavaDoc userLogin) {
84     this.userLogin = userLogin;
85   }
86   public String JavaDoc getUserLogin() {
87     return userLogin;
88   }
89   public String JavaDoc getUserPasswd() {
90     return userPasswd;
91   }
92   public void setUserPasswd(String JavaDoc userPasswd) {
93     this.userPasswd = userPasswd;
94   }
95 }
96
Popular Tags