|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.spi.config.ds.JndiDataSourceProxy
public final class JndiDataSourceProxy
A vendor-neutral implementation using JNDI to access a data source.
Constructor Summary | |
---|---|
JndiDataSourceProxy(String mappedName) Default constructor. |
Method Summary | |
---|---|
String |
getCreateTableSqlTemplate() Provides an SQL template to create the configuration table. |
DataSource |
getDataSource() Provides access to the data source. |
String |
getDataSourceId() Returns the identifier of the data source. |
String |
getInsertOrUpdateSqlTemplate() Provides an SQL template to insert or update a value in the configuration table. |
void |
setInsertOrUpdate(PreparedStatement statement, String config, String name, String value) Sets the parameters to the given statement to insert or update a property in the configuration table. |
String |
toString() Returns the string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JndiDataSourceProxy(String mappedName) throws NamingException
mappedName
- the JNDI name to access the data source.
NamingException
- if the data source cannot be fetched by the given name.
Method Detail |
---|
public String getDataSourceId()
DataSourceProxy
getDataSourceId
in interface
DataSourceProxy
public DataSource getDataSource()
DataSourceProxy
getDataSource
in interface
DataSourceProxy
public String getCreateTableSqlTemplate()
DataSourceProxy
getCreateTableSqlTemplate
in interface
DataSourceProxy
public String getInsertOrUpdateSqlTemplate()
DataSourceProxy
getInsertOrUpdateSqlTemplate
in interface
DataSourceProxy
public void setInsertOrUpdate(PreparedStatement statement, String config, String name, String value) throws SQLException
DataSourceProxy
The statement ist provided by DataSourceProxy.getInsertOrUpdateSqlTemplate()
.
setInsertOrUpdate
in interface
DataSourceProxy
statement
- the statement to set the values.
config
- the configuration key.
name
- the property key.
value
- the property value.
SQLException
- on any problem configuring the given
statement
.
public String toString()
toString
in class
Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |