01: /*
02: * This program is free software; you can redistribute it and/or modify
03: * it under the terms of the GNU General Public License as published by
04: * the Free Software Foundation; either version 2 of the License, or
05: * (at your option) any later version.
06: *
07: * This program is distributed in the hope that it will be useful,
08: * but WITHOUT ANY WARRANTY; without even the implied warranty of
09: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10: * GNU Library General Public License for more details.
11: *
12: * You should have received a copy of the GNU General Public License
13: * along with this program; if not, write to the Free Software
14: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15: */
16: package dlog4j.formbean;
17:
18: import java.io.Serializable;
19: import java.util.Date;
20:
21: import javax.servlet.http.HttpServletRequest;
22:
23: /**
24: * 用于跟踪用户登录信息的对象
25: * @author Liudong
26: */
27: public class LoginTrackBean implements Serializable {
28:
29: int id;
30: UserForm user;
31: String ipAddr;
32: Date loginTime;
33:
34: public LoginTrackBean() {
35: }
36:
37: public LoginTrackBean(HttpServletRequest request) {
38: user = UserForm.getLoginUser(request);
39: ipAddr = request.getRemoteAddr();
40: loginTime = new Date();
41: }
42:
43: public int getId() {
44: return id;
45: }
46:
47: public void setId(int id) {
48: this .id = id;
49: }
50:
51: public String getIpAddr() {
52: return ipAddr;
53: }
54:
55: public void setIpAddr(String ipAddr) {
56: this .ipAddr = ipAddr;
57: }
58:
59: public Date getLoginTime() {
60: return loginTime;
61: }
62:
63: public void setLoginTime(Date loginTime) {
64: this .loginTime = loginTime;
65: }
66:
67: public UserForm getUser() {
68: return user;
69: }
70:
71: public void setUser(UserForm user) {
72: this.user = user;
73: }
74: }
|