001    package mondrian.gui.validate;
002    
003    /**
004     * Validation for database schema, table, and columns. Extracted interface from
005     * <code>mondrian.gui.JDBCMetaData</code>.
006     *
007     * @author mlowery
008     */
009    public interface JDBCValidator {
010        /**
011         * Returns the data type of given column.
012         *
013         * @return SQL type from java.sql.Types
014         */
015        int getColumnDataType(String schemaName, String tableName, String colName);
016    
017        /**
018         * Returns true if column exists.
019         */
020        boolean isColExists(String schemaName, String tableName, String colName);
021    
022        /**
023         * Returns true if table exists.
024         */
025        boolean isTableExists(String schemaName, String tableName);
026    
027        /**
028         * Returns true if this object successfully connected to database (and
029         * validation methods can now be called).
030         */
031        boolean isInitialized();
032    }
033    
034    // End JDBCValidator.java