提交 88a24da0 编写于 作者: S serge-rider

Connection create/copy model

上级 3412d6a7
......@@ -96,6 +96,8 @@ public interface DBPDataSourceContainer extends DBSObject, DBDPreferences, DBPNa
void setSavePassword(boolean savePassword);
void setDescription(String description);
boolean isDefaultAutoCommit();
void setDefaultAutoCommit(boolean autoCommit, @Nullable DBCExecutionContext updateContext, boolean updateConnection, @Nullable Runnable onFinish)
......
......@@ -58,6 +58,8 @@ public interface DBPDataSourceRegistry extends DBPObject {
DBPDataSourceContainer createDataSource(DBPDriver driver, DBPConnectionConfiguration connConfig);
DBPDataSourceContainer createDataSource(DBPDataSourceContainer source);
void addDataSourceListener(DBPEventListener listener);
boolean removeDataSourceListener(DBPEventListener listener);
......
......@@ -600,6 +600,7 @@ public class DataSourceDescriptor
return this;
}
@Override
public void setDescription(@Nullable String description)
{
this.description = description;
......
......@@ -225,6 +225,13 @@ public class DataSourceRegistry implements DBPDataSourceRegistry
return new DataSourceDescriptor(this, DataSourceDescriptor.generateNewId(driver), (DriverDescriptor) driver, connConfig);
}
@Override
public DBPDataSourceContainer createDataSource(DBPDataSourceContainer source) {
DataSourceDescriptor newDS = new DataSourceDescriptor((DataSourceDescriptor) source);
newDS.setId(DataSourceDescriptor.generateNewId(source.getDriver()));
return newDS;
}
@Override
public List<? extends DBPDataSourceFolder> getAllFolders() {
return dataSourceFolders;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册