1 /* 2 * Licensed under the GPL License. You may not use this file except in compliance with the License. 3 * You may obtain a copy of the License at 4 * 5 * https://www.gnu.org/licenses/old-licenses/gpl-2.0.html 6 * 7 * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 8 * WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 9 * PURPOSE. 10 */ 11 package psiprobe.beans.accessors; 12 13 import java.sql.SQLException; 14 15 import psiprobe.model.DataSourceInfo; 16 17 /** 18 * Part of datasource type abstraction layer. Allows to extent Probe functionality to any kind of 19 * datasources. 20 */ 21 public interface DatasourceAccessor { 22 23 /** 24 * Gets the info. 25 * 26 * @param resource the resource 27 * @return the info 28 * @throws SQLException the sql exception 29 */ 30 DataSourceInfo getInfo(Object resource) throws SQLException; 31 32 /** 33 * Reset. 34 * 35 * @param resource the resource 36 * @return true, if successful 37 * @throws SQLException the sql exception 38 */ 39 boolean reset(Object resource) throws SQLException; 40 41 /** 42 * Can map. 43 * 44 * @param resource the resource 45 * @return true, if successful 46 */ 47 boolean canMap(Object resource); 48 }