Class DataSourceFactory


  • public abstract class DataSourceFactory
    extends java.lang.Object
    • Field Detail

      • DATABASE_URL

        public static final java.lang.String DATABASE_URL
        Database URL.
        See Also:
        Constant Field Values
      • DATABASE_DRIVER

        public static final java.lang.String DATABASE_DRIVER
        Database driver.
        See Also:
        Constant Field Values
      • DATABASE_USERNAME

        public static final java.lang.String DATABASE_USERNAME
        Database connection username.
        See Also:
        Constant Field Values
      • DATABASE_PASSWORD

        public static final java.lang.String DATABASE_PASSWORD
        Database connection password.
        See Also:
        Constant Field Values
      • DATABASE_SCHEMA

        public static final java.lang.String DATABASE_SCHEMA
        Database schema (some DBs don't use that).
        See Also:
        Constant Field Values
      • DATABASE_CATALOG

        public static final java.lang.String DATABASE_CATALOG
        Database catalog (some DBs don't use that).
        See Also:
        Constant Field Values
      • ENCRYPT_ALGORITHM

        public static final java.lang.String ENCRYPT_ALGORITHM
        type of encrypting algorithm.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DataSourceFactory

        protected DataSourceFactory​(DBType dbType,
                                    java.lang.String driverClass,
                                    java.lang.String name)
    • Method Detail

      • getDBType

        public final DBType getDBType()
      • getDriverClass

        public final java.lang.String getDriverClass()
      • getName

        public final java.lang.String getName()
      • createDataSource

        public final BaseDataSource createDataSource​(java.util.Properties initProps)
      • doCreateDataSource

        protected abstract BaseDataSource doCreateDataSource​(java.util.Properties initProps)
      • findDataSourceFactory

        public static DataSourceFactory findDataSourceFactory​(java.util.Properties initProps)
        Parameters:
        initProps - properties which determine requested DB type of DataSourceFactory.
        Returns:
        DataSourceFactory for DB type found in initProps. Might be null if there is no registered factory for given database type.