forked from fanruan/finekit
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.1 KiB
52 lines
1.1 KiB
6 years ago
|
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;
|
||
|
}
|
||
|
}
|