Browse Source

数据连接抽象类

remotes/1611766341912730171/master
richie 5 years ago
parent
commit
0fc41e9f70
  1. 51
      src/main/java/com/fanruan/api/data/open/BaseConnection.java

51
src/main/java/com/fanruan/api/data/open/BaseConnection.java

@ -0,0 +1,51 @@
package com.fanruan.api.data.open;
import com.fanruan.api.util.ArrayKit;
import com.fr.data.impl.AbstractDatabaseConnection;
import com.fr.data.impl.Connection;
/**
* @author richie
* @version 10.0
* Created by richie on 2019-09-06
* 用于数据连接插件的抽象类
*/
public abstract class BaseConnection extends AbstractDatabaseConnection {
/**
* 测试连接
*
* @throws Exception 异常
*/
@Override
public abstract void testConnection() throws Exception;
/**
* 创建连接
*
* @return 返回连接
* @throws Exception 异常
*/
@Override
public java.sql.Connection createConnection() throws Exception {
return Connection.IGNORE;
}
/**
* 连接成功或失败时给出的信息
*
* @return 信息
*/
@Override
public abstract String connectMessage(boolean status);
/**
* 获取数据连接的摘要信息
*
* @return 摘要
*/
public String[] summary(String... args) {
return ArrayKit.EMPTY_STRING_ARRAY;
}
}
Loading…
Cancel
Save