de.smartics.properties.impl.config.ds.hsql
Class HSqlDataSourceProxy

Package class diagram package HSqlDataSourceProxy
java.lang.Object
  extended by de.smartics.properties.impl.config.ds.hsql.AbstractHSqlDataSourceProxy
      extended by de.smartics.properties.impl.config.ds.hsql.HSqlDataSourceProxy
All Implemented Interfaces:
DataSourceProxy, Serializable

public final class HSqlDataSourceProxy
     
     
extends AbstractHSqlDataSourceProxy

Data source proxy to create HSQL data sources.

Please note that the password passed to this instance is stored. This is necessary in the case of deserialisation where the wrapped data source instance must be recreated. If this provides a security problem, please consider using the JndiDataSourceProxy.

See Also:
Serialized Form

Method Summary
static HSqlDataSourceProxy create()
          Factory method to create with URL jdbc:hsqldb:mem:configmemdb.
static HSqlDataSourceProxy create(String connectionUrl)
          Factory method to create with the given connection URL using user SA and no password.
static HSqlDataSourceProxy create(String connectionUrl, String userName, String password)
          Factory method to create with the given connection URL using the given credentials.
 DataSource getDataSource()
          Returns the reference to the data source.
 String getDataSourceId()
          Returns the identifier of the data source.
 String toString()
           
 
Methods inherited from class de.smartics.properties.impl.config.ds.hsql.AbstractHSqlDataSourceProxy
getCreateTableSqlTemplate, getInsertOrUpdateSqlTemplate, setInsertOrUpdate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static HSqlDataSourceProxy create()
Factory method to create with URL jdbc:hsqldb:mem:configmemdb.

Returns:
the proxy instance.

create

public static HSqlDataSourceProxy create(String connectionUrl)
Factory method to create with the given connection URL using user SA and no password.

Parameters:
connectionUrl - the JDBC URL to connect to te database. E.g. jdbc:hsqldb:file:target/testdb;shutdown=true.
Returns:
the proxy instance.

create

public static HSqlDataSourceProxy create(String connectionUrl,
                                         String userName,
                                         String password)
Factory method to create with the given connection URL using the given credentials.

Parameters:
connectionUrl - the JDBC URL to connect to te database. E.g. jdbc:hsqldb:file:target/testdb;shutdown=true.
userName - the name of the database user to connect to the database.
password - the password to the user.
Returns:
the proxy instance.

getDataSourceId

public String getDataSourceId()
Description copied from interface: DataSourceProxy
Returns the identifier of the data source.

Returns:
the identifier of the data source.

getDataSource

public DataSource getDataSource()
Returns the reference to the data source.

Returns:
the reference to the data source.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.