public class DbInt extends Object
Constructor and Description |
---|
DbInt() |
Modifier and Type | Method and Description |
---|---|
static void |
baselineDatabse(String database) |
static Boolean |
createDb(String DB)
Creates a database with specified name
|
static void |
createSetAndTables() |
static void |
deleteAllDB() |
static void |
deleteDb(String DB) |
static Iterable<String> |
getAllCustomerNames() |
static Iterable<Customer> |
getAllCustomers() |
static String |
getCategoryDate(String catName,
String year) |
static Connection |
getConnection()
Creates a Prepared statemtn from provided Parameters.
|
static Connection |
getConnection(String Db) |
static User |
getCurrentUser() |
static String |
getCustInf(String yearL,
Integer ID,
String info,
String defaultVal)
Gets the specified Utilities.Customer info
|
static String |
getCustInf(String yearL,
int id,
String info)
Gets the specified Utilities.Customer info
|
static Version |
getDatabaseVersion() |
static ArrayList<String> |
getDatabses() |
static Version |
getStoredProgramVersion(String Database) |
static User |
getUser(String year) |
static String |
getUserName() |
static ArrayList<User> |
getUsers() |
static ArrayList<String> |
getUserYears() |
static ArrayList<String> |
getYears() |
static String |
getYearsForUser(String uName) |
static boolean |
isAdmin() |
static void |
migrateDatabase(String database,
String location) |
static void |
setPrefix(String newPrefix) |
static boolean |
testConnection() |
static Boolean |
verifyLogin(javafx.util.Pair<String,String> userPass) |
static Boolean |
verifyLoginAndUser(javafx.util.Pair<String,String> userPass) |
public static String prefix
public static void setPrefix(String newPrefix)
public static String getCustInf(String yearL, int id, String info)
yearL
- The year to searchinfo
- The info to search forpublic static String getCustInf(String yearL, Integer ID, String info, String defaultVal)
yearL
- The year to searchinfo
- The info to search fordefaultVal
- The default value to return if there is no datapublic static Connection getConnection(String Db) throws SQLException
SQLException
public static boolean testConnection()
public static Connection getConnection() throws SQLException
SQLException
public static Boolean createDb(String DB)
DB
- The name of the DB to createpublic static void deleteAllDB()
public static void createSetAndTables()
public static ArrayList<User> getUsers() throws AccessException
AccessException
public static void deleteDb(String DB)
public static String getUserName()
public static User getCurrentUser() throws SQLException
SQLException
public static void migrateDatabase(String database, String location) throws AccessException
AccessException
public static void baselineDatabse(String database) throws AccessException
AccessException
public static Boolean verifyLoginAndUser(javafx.util.Pair<String,String> userPass)
public static boolean isAdmin()
public static Version getDatabaseVersion()
Copyright © 2014–2018. All rights reserved.