|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.node.port.database.DatabaseConnectionSettings
public class DatabaseConnectionSettings
Field Summary | |
---|---|
static String |
CFG_STATEMENT
Config for SQL statement. |
static StringHistory |
DATABASE_URLS
Keeps the history of all database URLs. |
static StringHistory |
DRIVER_ORDER
Keeps the history of all loaded driver and its order. |
static Integer |
FETCH_SIZE
DriverManager fetch size to chunk specified number of rows. |
Constructor Summary | |
---|---|
DatabaseConnectionSettings()
Create a default settings connection object. |
|
DatabaseConnectionSettings(DatabaseConnectionSettings conn)
Creates a new DBConnection based on the given connection
object. |
Method Summary | |
---|---|
Connection |
createConnection()
Create a database connection based on this settings. |
ModelContentRO |
createConnectionModel()
Create connection model with all settings used to create a database connection. |
void |
execute(String statement)
Execute statement on current database connection. |
String |
getDBName()
|
String |
getDriver()
|
boolean |
loadValidatedConnection(ConfigRO settings)
Load validated settings. |
void |
saveConnection(ConfigWO settings)
Save settings. |
void |
validateConnection(ConfigRO settings)
Validate settings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CFG_STATEMENT
public static final StringHistory DRIVER_ORDER
public static final StringHistory DATABASE_URLS
public static final Integer FETCH_SIZE
Constructor Detail |
---|
public DatabaseConnectionSettings()
public DatabaseConnectionSettings(DatabaseConnectionSettings conn)
DBConnection
based on the given connection
object.
conn
- connection used to copy settings fromMethod Detail |
---|
public Connection createConnection() throws InvalidSettingsException, SQLException, BadPaddingException, IllegalBlockSizeException, InvalidKeyException, IOException
SQLException
- SQLException
InvalidSettingsException
- InvalidSettingsException
IllegalBlockSizeException
- IllegalBlockSizeException
BadPaddingException
- BadPaddingException
InvalidKeyException
- InvalidKeyException
IOException
- IOException
public void saveConnection(ConfigWO settings)
settings
- connection settingspublic void validateConnection(ConfigRO settings) throws InvalidSettingsException
settings
- to validate
InvalidSettingsException
- if the settings are not validpublic boolean loadValidatedConnection(ConfigRO settings) throws InvalidSettingsException
settings
- to load
InvalidSettingsException
- if settings are invalidpublic void execute(String statement) throws InvalidKeyException, BadPaddingException, IllegalBlockSizeException, InvalidSettingsException, SQLException, IOException
statement
- to be executed
SQLException
- SQLException
InvalidSettingsException
- InvalidSettingsException
IllegalBlockSizeException
- IllegalBlockSizeException
BadPaddingException
- BadPaddingException
InvalidKeyException
- InvalidKeyException
IOException
- IOException
public ModelContentRO createConnectionModel()
public final String getDriver()
public final String getDBName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |