Class SQLSourceConfig
- java.lang.Object
-
- cc.carm.plugin.minesql.api.source.SQLSourceConfig
-
public class SQLSourceConfig extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SQLSourceConfig(@NotNull java.lang.String driverClassName, @NotNull java.lang.String jdbcURL, @Nullable cc.carm.lib.easysql.api.function.SQLHandler<cc.carm.lib.easysql.api.SQLManager> initializer, @Nullable SQLPoolSettings settings)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SQLSourceConfig
create(@NotNull SQLDriverType sourceType, @NotNull java.lang.String url)
static SQLSourceConfig
create(@NotNull java.lang.String driverClass, @NotNull java.lang.String jdbcURL)
static SQLSourceConfig
create(@NotNull java.lang.String driverClassName, @NotNull java.lang.String jdbcURL, @Nullable cc.carm.lib.easysql.api.function.SQLHandler<cc.carm.lib.easysql.api.SQLManager> initializer)
static SQLSourceConfig
create(@NotNull java.lang.String driverClassName, @NotNull java.lang.String jdbcURL, @Nullable cc.carm.lib.easysql.api.function.SQLHandler<cc.carm.lib.easysql.api.SQLManager> initializer, @Nullable SQLPoolSettings settings)
static SQLSourceConfig
createH2File(@NotNull java.io.File file)
static SQLSourceConfig
createH2File(@NotNull java.lang.String filePath)
static SQLSourceConfig
createH2Mem(@Nullable java.lang.String databaseName)
static SQLSourceConfig
createMariaDB(@NotNull java.lang.String host, int port, @NotNull java.lang.String database, @NotNull java.lang.String username, @Nullable java.lang.String password, @Nullable java.lang.String extraSettings)
static SQLSourceConfig
createMySQL(@NotNull java.lang.String host, int port, @NotNull java.lang.String database, @NotNull java.lang.String username, @Nullable java.lang.String password, @Nullable java.lang.String extraSettings)
SQLSourceConfig
editSettings(java.util.function.Consumer<SQLPoolSettings> consumer)
@NotNull java.lang.String
getDriverClassName()
@Nullable cc.carm.lib.easysql.api.function.SQLHandler<cc.carm.lib.easysql.api.SQLManager>
getInitializer()
@NotNull java.lang.String
getJdbcURL()
@Nullable java.lang.String
getPassword()
@NotNull SQLPoolSettings
getSettings()
@Nullable java.lang.String
getUsername()
SQLSourceConfig
setDriverClassName(java.lang.String driverClassName)
SQLSourceConfig
setInitializer(cc.carm.lib.easysql.api.function.SQLHandler<cc.carm.lib.easysql.api.SQLManager> initializer)
SQLSourceConfig
setJdbcURL(java.lang.String jdbcURL)
SQLSourceConfig
setPassword(java.lang.String password)
SQLSourceConfig
setSettings(SQLPoolSettings settings)
SQLSourceConfig
setUsername(java.lang.String username)
-
-
-
Constructor Detail
-
SQLSourceConfig
public SQLSourceConfig(@NotNull @NotNull java.lang.String driverClassName, @NotNull @NotNull java.lang.String jdbcURL, @Nullable @Nullable cc.carm.lib.easysql.api.function.SQLHandler<cc.carm.lib.easysql.api.SQLManager> initializer, @Nullable @Nullable SQLPoolSettings settings)
-
-
Method Detail
-
createMySQL
public static SQLSourceConfig createMySQL(@NotNull @NotNull java.lang.String host, int port, @NotNull @NotNull java.lang.String database, @NotNull @NotNull java.lang.String username, @Nullable @Nullable java.lang.String password, @Nullable @Nullable java.lang.String extraSettings)
-
createMariaDB
public static SQLSourceConfig createMariaDB(@NotNull @NotNull java.lang.String host, int port, @NotNull @NotNull java.lang.String database, @NotNull @NotNull java.lang.String username, @Nullable @Nullable java.lang.String password, @Nullable @Nullable java.lang.String extraSettings)
-
createH2File
public static SQLSourceConfig createH2File(@NotNull @NotNull java.io.File file)
-
createH2File
public static SQLSourceConfig createH2File(@NotNull @NotNull java.lang.String filePath)
-
createH2Mem
public static SQLSourceConfig createH2Mem(@Nullable @Nullable java.lang.String databaseName)
-
create
public static SQLSourceConfig create(@NotNull @NotNull SQLDriverType sourceType, @NotNull @NotNull java.lang.String url)
-
create
public static SQLSourceConfig create(@NotNull @NotNull java.lang.String driverClass, @NotNull @NotNull java.lang.String jdbcURL)
-
create
public static SQLSourceConfig create(@NotNull @NotNull java.lang.String driverClassName, @NotNull @NotNull java.lang.String jdbcURL, @Nullable @Nullable cc.carm.lib.easysql.api.function.SQLHandler<cc.carm.lib.easysql.api.SQLManager> initializer)
-
create
public static SQLSourceConfig create(@NotNull @NotNull java.lang.String driverClassName, @NotNull @NotNull java.lang.String jdbcURL, @Nullable @Nullable cc.carm.lib.easysql.api.function.SQLHandler<cc.carm.lib.easysql.api.SQLManager> initializer, @Nullable @Nullable SQLPoolSettings settings)
-
getDriverClassName
@NotNull public @NotNull java.lang.String getDriverClassName()
-
setDriverClassName
public SQLSourceConfig setDriverClassName(java.lang.String driverClassName)
-
getJdbcURL
@NotNull public @NotNull java.lang.String getJdbcURL()
-
setJdbcURL
public SQLSourceConfig setJdbcURL(java.lang.String jdbcURL)
-
getUsername
@Nullable public @Nullable java.lang.String getUsername()
-
setUsername
public SQLSourceConfig setUsername(java.lang.String username)
-
getPassword
@Nullable public @Nullable java.lang.String getPassword()
-
setPassword
public SQLSourceConfig setPassword(java.lang.String password)
-
getInitializer
@Nullable public @Nullable cc.carm.lib.easysql.api.function.SQLHandler<cc.carm.lib.easysql.api.SQLManager> getInitializer()
-
setInitializer
public SQLSourceConfig setInitializer(cc.carm.lib.easysql.api.function.SQLHandler<cc.carm.lib.easysql.api.SQLManager> initializer)
-
getSettings
@NotNull public @NotNull SQLPoolSettings getSettings()
-
setSettings
public SQLSourceConfig setSettings(SQLPoolSettings settings)
-
editSettings
public SQLSourceConfig editSettings(java.util.function.Consumer<SQLPoolSettings> consumer)
-
-