Package mondrian.gui

Class JdbcMetaData


  • public class JdbcMetaData
    extends Object
    • Constructor Detail

      • JdbcMetaData

        public JdbcMetaData​(Workbench wb,
                            String jdbcDriverClassName,
                            String jdbcConnectionUrl,
                            String jdbcUsername,
                            String jdbcPassword,
                            String jdbcSchema,
                            boolean requireSchema)
      • JdbcMetaData

        public JdbcMetaData​(String jdbcDriverClassName,
                            String jdbcConnectionUrl,
                            String jdbcUsername,
                            String jdbcPassword)
        Tests database connection. Called from Preferences dialog button test connection.
    • Method Detail

      • getRequireSchema

        public boolean getRequireSchema()
      • getResourceConverter

        public I18n getResourceConverter()
        Returns:
        the workbench i18n converter
      • initConnection

        public String initConnection()
      • closeConnection

        public void closeConnection()
      • listAllSchemas

        public List<String> listAllSchemas()
      • getAllSchemas

        public List<String> getAllSchemas()
      • getAllTables

        public List<String> getAllTables​(String schemaName)
        Returns all tables in a given schema.
      • getAllTables

        public List<String> getAllTables​(String schemaName,
                                         String minusTable)
        Returns all tables in given schema minus the given table name.
      • getDimensionTables

        public List<String> getDimensionTables​(String schemaName,
                                               String factTable)
        Gets all possible cases of dimension tables which are linked to given fact table by foreign keys.
      • isTableExists

        public boolean isTableExists​(String schemaName,
                                     String tableName)
      • isColExists

        public boolean isColExists​(String schemaName,
                                   String tableName,
                                   String colName)
      • getAllColumns

        public List<String> getAllColumns​(String schemaName,
                                          String tableName)
        Gets all columns of given table in schema. column string is formatted.
      • getAllDbColumns

        public List<JdbcMetaData.DbColumn> getAllDbColumns​(String schemaName,
                                                           String tableName)
        Returns all columns of given table in schema. Column string is formatted.
      • getColumnDataType

        public int getColumnDataType​(String schemaName,
                                     String tableName,
                                     String colName)
      • getColumnDefinition

        public JdbcMetaData.DbColumn getColumnDefinition​(String schemaName,
                                                         String tableName,
                                                         String colName)
        Gets column definition of given table and its col.
        Parameters:
        schemaName - Schema name
        tableName - Table name
        colName - Column name
        Returns:
        Column definition
      • getDbCatalogName

        public String getDbCatalogName()
      • getDatabaseProductName

        public String getDatabaseProductName()
      • getJdbcConnectionUrl

        public String getJdbcConnectionUrl()
      • getErrMsg

        public String getErrMsg()
      • main

        public static void main​(String[] args)