Class InstalledDriver


  • public final class InstalledDriver
    extends Object
    Metadata describing a JDBC driver that has been installed as a service in the runtime.
    Author:
    Brian Stansberry (c) 2011 Red Hat Inc.
    • Constructor Detail

      • InstalledDriver

        public InstalledDriver​(String driverName,
                               org.jboss.modules.ModuleIdentifier moduleName,
                               String driverClassName,
                               String dataSourceClassName,
                               String xaDataSourceClassName,
                               int majorVersion,
                               int minorVersion,
                               boolean jdbcCompliant)
        Creates a new InstalledDriver for a driver that was loaded from the module path.
        Parameters:
        driverName - the symbolic name of the driver was loaded
        moduleName - the name of the module from which the driver was loaded
        driverClassName - the name of the Driver implementation class
        dataSourceClassName - the name of the DataSource implementation class
        xaDataSourceClassName - the name of the XADataSource implementation class
        majorVersion - the driver major version
        minorVersion - the driver minor version
        jdbcCompliant - whether the driver is JDBC compliant
      • InstalledDriver

        public InstalledDriver​(String deploymentUnitName,
                               String driverClassName,
                               String dataSourceClassName,
                               String xaDataSourceClassName,
                               int majorVersion,
                               int minorVersion,
                               boolean jdbcCompliant)
        Creates a new InstalledDriver for a driver that was installed from a deployment.
        Parameters:
        deploymentUnitName - the name of the deployment unit from which the driver was installed
        driverClassName - the name of the Driver implementation class
        dataSourceClassName - the name of the DataSource implementation class
        xaDataSourceClassName - the name of the XADataSource implementation class
        majorVersion - the driver major version
        minorVersion - the driver minor version
        jdbcCompliant - whether the driver is JDBC compliant
    • Method Detail

      • getModuleName

        public org.jboss.modules.ModuleIdentifier getModuleName()
        Gets the name of the module from which the driver was loaded, if it was loaded from the module path.
        Returns:
        the module name, or null if isFromDeployment() returns true
      • getDeploymentUnitName

        public String getDeploymentUnitName()
        Gets the name of the deployment unit from which the driver was loaded, if it was loaded from a deployment.
        Returns:
        the deployment unit name, or null if isFromDeployment() returns false
      • getDriverClassName

        public String getDriverClassName()
        Gets the fully qualified class name of the driver's implementation of Driver
        Returns:
        the class name. Will not be null
      • getMajorVersion

        public int getMajorVersion()
        Gets the driver's major version number.
        Returns:
        the major version number
      • getMinorVersion

        public int getMinorVersion()
        Gets the driver's minor version number.
        Returns:
        the minor version number
      • isJdbcCompliant

        public boolean isJdbcCompliant()
        Gets whether the driver is JDBC compliant.
        Returns:
        true if the driver is JDBC compliant; false if not
      • isFromDeployment

        public boolean isFromDeployment()
        Gets whether the driver was loaded from a deployment unit.
        Returns:
        true if the driver was loaded from a deployment unit; false if it was loaded from a module on the module path
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getDriverName

        public String getDriverName()
      • getDataSourceClassName

        public String getDataSourceClassName()
      • getXaDataSourceClassName

        public String getXaDataSourceClassName()