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.
51 lines
1.2 KiB
51 lines
1.2 KiB
package com.fr.plugin.demo.dataset.transfer; |
|
|
|
import com.fanruan.api.conf.HolderKit; |
|
import com.fanruan.api.data.open.BaseConnection; |
|
import com.fr.config.holder.Conf; |
|
|
|
/** |
|
* Created by richie on 2017/5/15. |
|
*/ |
|
public class DemoConnection extends BaseConnection { |
|
|
|
private static final long serialVersionUID = 1450808242114897557L; |
|
private Conf<String> host = HolderKit.simple(""); |
|
private Conf<String> username = HolderKit.simple(""); |
|
|
|
public String getHost() { |
|
return host.get(); |
|
} |
|
|
|
public void setHost(String host) { |
|
this.host.set(host); |
|
} |
|
|
|
public String getUsername() { |
|
return username.get(); |
|
} |
|
|
|
public void setUsername(String username) { |
|
this.username.set(username); |
|
} |
|
|
|
@Override |
|
public String getDriver() { |
|
return null; |
|
} |
|
|
|
@Override |
|
public void testConnection() throws Exception { |
|
return; |
|
} |
|
|
|
@Override |
|
public String connectMessage(boolean status) { |
|
if (status) { |
|
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Connection_Successfully") + "!"; |
|
} else { |
|
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed") + "!"; |
|
} |
|
} |
|
|
|
}
|
|
|