01: /*
02: * Created on 22 juin 2005
03: */
04: package abook.data;
05:
06: /**
07: * Provides object of type Session mapping the data stored in the sql database
08: */
09: public class Session {
10:
11: private User owner;
12: private String sessionId;
13:
14: /**
15: * Constructs a new Session object
16: * @param sessionId The session identifier
17: */
18: public Session(String sessionId) {
19: this .sessionId = sessionId;
20: }
21:
22: /**
23: * Constructs a new Author object
24: * @param owner The session owner
25: * @param sessionId The session identifier
26: */
27: public Session(User owner, String sessionId) {
28: this .owner = owner;
29: this .sessionId = sessionId;
30: }
31:
32: /**
33: * @return Returns the owner login.
34: */
35: public User getOwner() {
36: return owner;
37: }
38:
39: /**
40: * @param owner The owner login to set.
41: */
42: public void setOwner(User owner) {
43: this .owner = owner;
44: }
45:
46: /**
47: * @return Returns the sessionId.
48: */
49: public String getSessionId() {
50: return sessionId;
51: }
52:
53: /**
54: * @param sessionId The sessionId to set.
55: */
56: public void setSessionId(String sessionId) {
57: this.sessionId = sessionId;
58: }
59: }
|