Currently, only the User class in datbase.tables is set up to extend the functionality and methods of the AbstractTableEntry class. The Orders class also needs to extend this functionality (and possibly be renamed to Order, since it technically only represents one entry) in a manner similar to User so that orders can be added to the ORDERS table using the insertRow(AbstractTableEntry) method in AbstractDatabaseManager.
Namely, the following needs to be done for the Orders class:
Modify the class definition to make it extend AbstractTableEntry
Add a private static final String field for the name of the ORDERS table
Add a private static final String[] field for the array of column names
Add a constructor that calls super(TABLE_NAME, COLUMN_NAMES) and creates a new order using the parameters passed in
Add a toSQLRepresentation() method used to get the SQL representation of an order's values in String form. The string should have the form "(value_1, value_2, value_3,...)". Bear in mind that Strings in SQL must be surrounded by the " character, so be sure to surround string values with \" marks in the SQL representation.
Be sure to look at User.java to see how all of these steps are taken.
Currently, only the User class in datbase.tables is set up to extend the functionality and methods of the AbstractTableEntry class. The Orders class also needs to extend this functionality (and possibly be renamed to Order, since it technically only represents one entry) in a manner similar to User so that orders can be added to the ORDERS table using the insertRow(AbstractTableEntry) method in AbstractDatabaseManager.
Namely, the following needs to be done for the Orders class:
Be sure to look at User.java to see how all of these steps are taken.