Class VendorDatabaseIdProvider

  • All Implemented Interfaces:
    DatabaseIdProvider
    Direct Known Subclasses:
    DefaultDatabaseIdProvider

    public class VendorDatabaseIdProvider
    extends java.lang.Object
    implements DatabaseIdProvider
    Vendor DatabaseId provider. It returns database product name as a databaseId. If the user provides a properties it uses it to translate database product name key="Microsoft SQL Server", value="ms" will return "ms". It can return null, if no database product name or a properties was specified and no translation was found.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Properties properties  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDatabaseId​(javax.sql.DataSource dataSource)  
      private java.lang.String getDatabaseName​(javax.sql.DataSource dataSource)  
      private java.lang.String getDatabaseProductName​(javax.sql.DataSource dataSource)  
      void setProperties​(java.util.Properties p)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • properties

        private java.util.Properties properties
    • Constructor Detail

      • VendorDatabaseIdProvider

        public VendorDatabaseIdProvider()
    • Method Detail

      • getDatabaseName

        private java.lang.String getDatabaseName​(javax.sql.DataSource dataSource)
                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getDatabaseProductName

        private java.lang.String getDatabaseProductName​(javax.sql.DataSource dataSource)
                                                 throws java.sql.SQLException
        Throws:
        java.sql.SQLException