public class UrlJDBCPropertyIO extends AbstractJDBCPropertyIO
AbstractJDBCPropertyIO
which gets its connection from an URL definition.AbstractJDBCPropertyIO
,
Serialized FormDEFAULT_MAX_VALUE_FIELD_LENGTH
Constructor and Description |
---|
UrlJDBCPropertyIO(String driver,
String url,
String username,
String password,
String tableName,
String nameField,
String valueField,
boolean readonly,
boolean cached)
Returns an
UrlJDBCPropertyIO which is initialized with URL connection definition and table definition. |
Modifier and Type | Method and Description |
---|---|
Connection |
getConnection()
Gets the connection to the database.
|
String |
getDriver()
The JDBC driver class name.
|
String |
getName()
A short descriptive name of the Property IO.
|
String |
getPassword()
The db password
|
String |
getSource()
A detailed description of the source of the property data.
|
String |
getUrl()
The db Url.
|
String |
getUsername()
The db username.
|
backup, backupWithUpdate, close, getMaxValueFieldLength, getNameField, getProperties, getTableName, getValue, getValueField, reload, setMaxValueFieldLength, setValue, validate
getCacheTime, getLastLoaded, getLastSaved, getLogger, getTypedProperties, getTypedValue, isCached, isReadonly, logPerformanceGetProperties, logPerformanceSetValue, setCacheTime, storeTypedValue, updateLastLoaded, updateLastSaved, validateWritable
public UrlJDBCPropertyIO(String driver, String url, String username, String password, String tableName, String nameField, String valueField, boolean readonly, boolean cached)
UrlJDBCPropertyIO
which is initialized with URL connection definition and table definition.driver
- the name of the driver that will be initialized once before the first connection attempt. The full class name of the driver.url
- the db url.username
- the db username.password
- the db password.tableName
- the name of of the table which holds the properties.nameField
- the name of column in the table which hold the property name.valueField
- the name of column in the table which hold the property value.readonly
- is the UrlJDBCPropertyIO
be read only.cached
- shall the values be cached in the PropertyIO
'spublic String getDriver()
public String getUrl()
public String getUsername()
public String getPassword()
public String getName()
PropertyIO
public String getSource()
PropertyIO
public Connection getConnection() throws SQLException
AbstractJDBCPropertyIO
getConnection
in class AbstractJDBCPropertyIO
SQLException
- if not possible to get a connection.Connection