-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSession.java
More file actions
97 lines (66 loc) · 2.02 KB
/
Session.java
File metadata and controls
97 lines (66 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
package MESS;
public class Session {
private final static Session instance = new Session();
public static Session getInstance(){
return instance;
}
// global DBConnector
private DBConnector dbc;
// string to hold current dbID (aka Theater ID. ie "mess_01")
private String dbID;
// string to hold current dbAdmin
private String dbAdmin = "mess_admin1";
// string to hold current dbPass
private String dbPass;
// string to hold current Employee ID
private String employeeID;
// TheaterState from Database
private TheaterState theater = new TheaterState();
// if timeOut = true, return to EmployeeScene
boolean timeOut = false;
int currentScene = 1; // 1, theater login 2, employee login, 3, main vendor screen
// currentTransaction
private Transaction currentTransaction = new Transaction();
public Transaction getCurrentTransaction() {
return currentTransaction;
}
public void setCurrentTransaction(Transaction currentTransaction) {
this.currentTransaction = currentTransaction;
}
public void setDBConnector(String dbcPath, String dbcAdmin, String dbcPass){
dbc = new DBConnector(dbcPath, dbcAdmin, dbcPass);
}
public void setTheater(TheaterState theater) {
this.theater = theater;
}
public TheaterState getTheater() {
return theater;
}
public DBConnector getDBConnector(){
return this.dbc;
}
public void setDbAdmin(String newDbAdmin){
this.dbAdmin = newDbAdmin;
}
public String getDbAdmin(){
return dbAdmin;
}
public String getDbPass(){
return dbPass;
}
public void setDbPass(String newDbPass){
dbPass = newDbPass;
}
public String getDbID(){
return dbID;
}
public void setDbID(String newDbID){
dbID = newDbID;
}
public String getEmployeeID(){
return employeeID;
}
public void setEmployeeID(String empID){
employeeID = empID;
}
}