-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTicketDatabaseManager.java
More file actions
49 lines (36 loc) · 1.46 KB
/
TicketDatabaseManager.java
File metadata and controls
49 lines (36 loc) · 1.46 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
// can probably delete
public class TicketDatabaseManager {
TicketDatabaseManager(){}
public boolean addTicketToDB(Ticket ticket) {
// takes ticket and saves it on DB
// if successful, return TRUE
return false;
}
public boolean updateTicketStatus(Ticket ticket) {
// uses the ticketStatus attribute of ticket to update the ticketStatus on DB
// if successful, return TRUE
return false;
}
public int produceTicketID() {
// takes max ticket ID from the ticket table from DB and increments it by 1
// returns this int
// wait i think this could also be done in the databse but idk which way we wanna implememnt this
// --> we can but i was jus thinking for addTicketToDB the ticket object should alr have an id before insertion ahhh
return 0;
}
public boolean fetchCancellationEligibility(Ticket ticket) {
// queries DB if the ticketID associated with the ticket is still eligible for cancellation
// returns this value
return false;
}
public Ticket fetchTicket(int ticketID) {
// queries DB for existing ticket info, based on ticketID
// using this info, make and return a Ticket object
return null;
}
public boolean updateShowtimeSeats(Showtime showtime) {
// saves showtime AvailableRUSeats and AvailableOUSeats in DB
// returns TRUE if successful
return false;
}
}