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.
17 lines
489 B
17 lines
489 B
6 years ago
|
package com.fanruan.api.data;
|
||
|
import com.fr.data.impl.Connection;
|
||
|
import com.fr.file.DatasourceManager;
|
||
|
|
||
|
public class ConnectionKit {
|
||
|
/**
|
||
|
* 获取指定名字和指定类型的数据连接
|
||
|
* @param name 数据连接的名字
|
||
|
* @param type 类型
|
||
|
* @return 数据连接
|
||
|
*
|
||
|
*/
|
||
|
public <T extends Connection> T getConnection(String name, Class<? extends Connection> type) {
|
||
|
return DatasourceManager.getInstance().getConnection(name, type);
|
||
|
}
|
||
|
}
|