Kereta Yarsi Indonesia
Loading...
Searching...
No Matches
model.Ticket Class Reference

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)
 

Detailed Description

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.

Author
Muhammad Rizal Anditama Nugraha

Constructor & Destructor Documentation

◆ Ticket() [1/3]

model.Ticket.Ticket ( String  ticketID,
int  userID,
int  passengerID,
int  trainID,
int  stationID,
Timestamp  currentTimestamp 
)
inline

Constructs a Ticket with the specified details.

Parameters
ticketIDthe ID of the ticket
userIDthe ID of the user
passengerIDthe ID of the passenger
trainIDthe ID of the train
stationIDthe ID of the station
currentTimestampthe timestamp of the ticket

◆ Ticket() [2/3]

model.Ticket.Ticket ( String  ticketID,
int  userID,
int  passengerID,
int  trainID,
int  stationID 
)
inline

Constructs a Ticket with the specified details except timestamp.

Parameters
ticketIDthe ID of the ticket
userIDthe ID of the user
passengerIDthe ID of the passenger
trainIDthe ID of the train
stationIDthe ID of the station

◆ Ticket() [3/3]

model.Ticket.Ticket ( )
inline

Constructs a Ticket with placeholder values.

Member Function Documentation

◆ getCurrentTimestamp()

Timestamp model.Ticket.getCurrentTimestamp ( )
inline

Gets the current timestamp.

Returns
the current timestamp

◆ getPassengerID()

int model.Ticket.getPassengerID ( )
inline

Gets the passenger ID.

Returns
the passenger ID

◆ getStationID()

int model.Ticket.getStationID ( )
inline

Gets the station ID.

Returns
the station ID

◆ getTicketID()

String model.Ticket.getTicketID ( )
inline

Gets the ticket ID.

Returns
the ticket ID

◆ getTrainID()

int model.Ticket.getTrainID ( )
inline

Gets the train ID.

Returns
the train ID

◆ getUserID()

int model.Ticket.getUserID ( )
inline

Gets the user ID.

Returns
the user ID

◆ setCurrentTimestamp()

void model.Ticket.setCurrentTimestamp ( Timestamp  currentTimestamp)
inline

Sets the current timestamp.

Parameters
currentTimestampthe current timestamp to set

◆ setPassengerID()

void model.Ticket.setPassengerID ( int  passengerID)
inline

Sets the passenger ID.

Parameters
passengerIDthe passenger ID to set

◆ setStationID()

void model.Ticket.setStationID ( int  stationID)
inline

Sets the station ID.

Parameters
stationIDthe station ID to set

◆ setTicketID()

void model.Ticket.setTicketID ( String  ticketID)
inline

Sets the ticket ID.

Parameters
ticketIDthe ticket ID to set

◆ setTrainID()

void model.Ticket.setTrainID ( int  trainID)
inline

Sets the train ID.

Parameters
trainIDthe train ID to set

◆ setUserID()

void model.Ticket.setUserID ( int  userID)
inline

Sets the user ID.

Parameters
userIDthe user ID to set

The documentation for this class was generated from the following file: