001/* 002// This software is subject to the terms of the Eclipse Public License v1.0 003// Agreement, available at the following URL: 004// http://www.eclipse.org/legal/epl-v10.html. 005// You must accept the terms of that agreement to use this software. 006// 007// Copyright (C) 2008-2009 Pentaho and others 008// All Rights Reserved. 009*/ 010package mondrian.gui.validate; 011 012/** 013 * Validation for database schema, table, and columns. Extracted interface from 014 * <code>mondrian.gui.JDBCMetaData</code>. 015 * 016 * @author mlowery 017 */ 018public interface JdbcValidator { 019 /** 020 * Returns the data type of given column. 021 * 022 * @return SQL type from java.sql.Types 023 */ 024 int getColumnDataType(String schemaName, String tableName, String colName); 025 026 /** 027 * Returns true if column exists. 028 */ 029 boolean isColExists(String schemaName, String tableName, String colName); 030 031 /** 032 * Returns true if table exists. 033 */ 034 boolean isTableExists(String schemaName, String tableName); 035 036 /** 037 * Returns true if this object successfully connected to database (and 038 * validation methods can now be called). 039 */ 040 boolean isInitialized(); 041 042 /** 043 * Returns true if schema exists. 044 */ 045 boolean isSchemaExists(String schemaName); 046} 047 048// End JdbcValidator.java