/** * Write the given type of database out to a CSV file at the given location. * * @param type The type of database to write. Person or Item (general or controlled) * @param path The location which the file will be stored at */ public static void adminWriteOutDatabase(String type, String path) { switch (type) { case (SQLInterface.TABPERSON): personDatabase.writeDatabaseCSV(path); break; default: itemDatabase.writeDatabaseCSV(type, path); } }
/** * Write out the CSV version of the database for the admin. * * @param type SQLInterface.TABPERSON for the person database or "Produt" for the product database */ public static void adminWriteOutDatabase(String type) { switch (type) { case (SQLInterface.TABPERSON): personDatabase.writeDatabaseCSV("adminPersonDatabase.csv"); break; case (SQLInterface.TABITEM): itemDatabase.writeDatabaseCSV(type, "adminItemDatabase.csv"); break; case (SQLInterface.TABGENERAL): itemDatabase.writeDatabaseCSV(type, "adminGeneralDatabase.csv"); break; case (SQLInterface.TABCONTROLLED): itemDatabase.writeDatabaseCSV(type, "adminControlledDatabase.csv"); break; default: personDatabase.writeDatabaseCSV("adminItemDatabase.csv"); } }