|
Kereta Yarsi Indonesia
|
Public Member Functions | |
| boolean | createTicket (Ticket ticket) |
| ResultSet | getTicket (String ticketId) |
| ResultSet | getAllJoin (String ticketId) |
Public Member Functions inherited from controller.Controller | |
| void | setFirstStuff (String stasiunAsal, String stasiunAkhir, Date tanggalPergi, Date tanggalPulang) |
| int | countFoundTrain (String stasiunAwal, String stasiunAkhir, Date tanggal) |
| ResultSet | findSpecificTrain (String stasiunAwal, String stasiunAkhir, Date tanggal) |
| ResultSet | findAll (String table) |
| ResultSet | findWhere (String table, String columnName, Object keyword) |
| ResultSet | executeQuery (String sql) |
| ResultSet | executeQuery (String sql, Object... values) |
| boolean | executeUpdate (String sql, Object... values) |
| boolean | insert (String table, boolean withID, Object... value) |
| void | errorMessage (String title, String message) throws HeadlessException |
| void | warningMessage (String message) throws HeadlessException |
| void | infoMessage (String message) throws HeadlessException |
| String[] | getColumnName (String table) |
| int | getColumnCount (String table) |
| int | getRowCount (String table) |
| boolean | checkForDatabase (String database) throws SQLException |
| int | getRowCountWhere (String table, String columnName, String keyword) |
| boolean | hasWhitespace (String str) |
| boolean | hasSpecialChar (String str) |
| boolean | hasUpperCase (String str) |
| byte[] | generateKey (int keyLength) |
| String | hashPassword (String str) |
| boolean | createTicket (Ticket ticket) |
| ResultSet | getTicket (String ticketId) |
| ResultSet | getAllJoin (String ticketId) |
Static Public Member Functions | |
| static synchronized TicketController | getInstance () |
Static Public Member Functions inherited from controller.Controller | |
| static synchronized Controller | getInstance () |
| static synchronized Session | getSession () |
| static byte[] | generateSalt (int saltIteration) |
| static String | encryptPBKDF2 (String password, byte[] salt) |
| static boolean | verifyPassword (String inputPassword, String storedPassword, byte[] salt) |
| static DefaultTableModel | buildTableModel (ResultSet rs) throws SQLException |
| static Statement | getSt () |
| static void | setSt (Statement aSt) |
| static ResultSet | getRs () |
| static void | setRs (ResultSet aRs) |
| static PreparedStatement | getPs () |
| static void | setPs (PreparedStatement aPs) |
Additional Inherited Members | |
Public Attributes inherited from controller.Controller | |
| boolean | response = false |
| Session | session = Session.getInstance() |
Static Public Attributes inherited from controller.Controller | |
| static Statement | st |
| static ResultSet | rs |
| static PreparedStatement | ps |
Protected Member Functions inherited from controller.Controller | |
| Controller (DatabaseConnector databaseConnector) | |
Static Protected Attributes inherited from controller.Controller | |
| static DatabaseConnector | databaseConnector |
| static Connection | con |
| static String | sql |
Controller class for handling operations related to tickets. Implements the TicketDAO interface to provide data access methods for tickets.
This class uses the singleton pattern to ensure that only one instance of the controller exists.
Example usage:
TicketController controller = TicketController.getInstance(); boolean isCreateTicketSuccessful = controller.createTicket(ticket);
|
inline |
Creates a new ticket in the database.
| ticket | the ticket to create |
Implements model.TicketDAO.
|
inline |
Retrieves detailed information about a ticket and its related entities by the ticket ID. Joins multiple tables to get comprehensive ticket details.
| ticketId | the ID of the ticket to retrieve |
Implements model.TicketDAO.
|
inlinestatic |
Returns the single instance of TicketController. If no instance exists, it creates one using the provided DatabaseConnector.
Reimplemented from controller.Controller.
|
inline |
Retrieves a ticket from the database by its ID.
| ticketId | the ID of the ticket to retrieve |
Implements model.TicketDAO.