/** * Makes any edits necessary in the SQL string for it to be compatible with the database in use. * * @return * @throws SQLException */ public static String getScrubSQL(String sql) throws SQLException { if (isMapNull()) throw new NullDatabaseMapException("No database map set!"); return dbMap.getScrubSQL(sql); }
public static String getSelectLastInsertIdentity() { if (isMapNull()) throw new NullDatabaseMapException("No database map set!"); return dbMap.getSelectLastInsertIdentity(); }
public static int getResultSetType() { if (isMapNull()) throw new NullDatabaseMapException("No database map set!"); return dbMap.getResultSetType(); }
/** * Sets what database will be used and loads the database driver, based on what DBmap is provided. */ private static void LoadSQLiteDriver() { if (isMapNull()) throw new NullDatabaseMapException("Error in DatabaseConfig: DatabaseMap has not been set."); try { Class.forName(dbMap.getDriverClassName()).newInstance(); } catch (InstantiationException e) { throw new CannotLoadDatabaseMapDriverException("Error in DatabaseConfig: SQLite driver could not be instantiated;", e); } catch (IllegalAccessException e) { throw new CannotLoadDatabaseMapDriverException("Error in DatabaseConfig: SQLite driver could not be accessed;", e); } catch (ClassNotFoundException e) { throw new CannotLoadDatabaseMapDriverException("Error in DatabaseConfig: SQLite driver class could not be found;", e); } isLoaded = true; }