Kereta Yarsi Indonesia
|
Public Member Functions | |
Ticket (String ticketID, int userID, int passengerID, int trainID, int stationID, Timestamp currentTimestamp) | |
Ticket (String ticketID, int userID, int passengerID, int trainID, int stationID) | |
Ticket () | |
int | getUserID () |
void | setUserID (int userID) |
int | getPassengerID () |
void | setPassengerID (int passengerID) |
int | getTrainID () |
void | setTrainID (int trainID) |
int | getStationID () |
void | setStationID (int stationID) |
Timestamp | getCurrentTimestamp () |
void | setCurrentTimestamp (Timestamp currentTimestamp) |
String | getTicketID () |
void | setTicketID (String ticketID) |
The Ticket
class represents a ticket in the system. It includes details such as the ticket ID, user ID, passenger ID, train ID, station ID, and timestamp of the ticket.
This class provides methods to get and set the values of these fields.
The class provides constructors for creating a ticket with all fields, with all fields except timestamp, and a default constructor with placeholder values.
|
inline |
Constructs a Ticket
with the specified details.
ticketID | the ID of the ticket |
userID | the ID of the user |
passengerID | the ID of the passenger |
trainID | the ID of the train |
stationID | the ID of the station |
currentTimestamp | the timestamp of the ticket |
|
inline |
Constructs a Ticket
with the specified details except timestamp.
ticketID | the ID of the ticket |
userID | the ID of the user |
passengerID | the ID of the passenger |
trainID | the ID of the train |
stationID | the ID of the station |
|
inline |
Constructs a Ticket
with placeholder values.
|
inline |
Gets the current timestamp.
|
inline |
Gets the passenger ID.
|
inline |
Gets the station ID.
|
inline |
Gets the ticket ID.
|
inline |
Gets the train ID.
|
inline |
Gets the user ID.
|
inline |
Sets the current timestamp.
currentTimestamp | the current timestamp to set |
|
inline |
Sets the passenger ID.
passengerID | the passenger ID to set |
|
inline |
Sets the station ID.
stationID | the station ID to set |
|
inline |
Sets the ticket ID.
ticketID | the ticket ID to set |
|
inline |
Sets the train ID.
trainID | the train ID to set |
|
inline |
Sets the user ID.
userID | the user ID to set |