Class SqlFactory


  • public class SqlFactory
    extends ConfigReader
    Finds the SQL Configuration file and uses it to open the database with the correct database name, user name and password.

    See load() for where and in which order the file will be looked for.

    Author:
    Christian
    • Constructor Detail

      • SqlFactory

        public SqlFactory()
    • Method Detail

      • createTheSQLAccess

        public static SQLAccess createTheSQLAccess()
                                            throws BridgeDBException
        Create a wrapper around the live SQL Database, using the database name, user name and password found in the config file.
        Returns:
        sqlAccess - a wrapper around the individual SQL database drivers
        Throws:
        BridgeDBException - - if something goes wrong with the connection
      • createASQLAccess

        public static SQLAccess createASQLAccess​(String database)
                                          throws BridgeDBException
        Create a wrapper around the live SQL Database, using the database name, user name and password found in the config file.
        Parameters:
        database - - the name of the database
        Returns:
        sqlAccess - a wrapper around the individual SQL database drivers
        Throws:
        BridgeDBException - - if something goes wrong with the connection
      • setUseMySQL

        public static void setUseMySQL​(boolean forceMySQL)
      • configs

        public static String configs()
      • engineSetting

        public static String engineSetting()