de.smartics.properties.impl.config.ds.mysql
Class MySqlDataSourceProxy

Package class diagram package MySqlDataSourceProxy
java.lang.Object
  extended by de.smartics.properties.impl.config.ds.mysql.AbstractMySqlDataSourceProxy
      extended by de.smartics.properties.impl.config.ds.mysql.MySqlDataSourceProxy
All Implemented Interfaces:
de.smartics.properties.spi.config.ds.DataSourceProxy, Serializable

public final class MySqlDataSourceProxy
     
     
extends AbstractMySqlDataSourceProxy

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 MySqlDataSourceProxy create()
          Factory method to create with URL jdbc:mysql://localhost:3306/properties.
static MySqlDataSourceProxy create(String connectionUrl)
          Factory method to create with the given connection URL using user properties and password properties.
static MySqlDataSourceProxy create(String connectionUrl, String userName, String password)
          Factory method to create with the given connection URL using the given credentials.
 DataSource getDataSource()
           
 String getDataSourceId()
           
 String toString()
           
 
Methods inherited from class de.smartics.properties.impl.config.ds.mysql.AbstractMySqlDataSourceProxy
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 MySqlDataSourceProxy create()
Factory method to create with URL jdbc:mysql://localhost:3306/properties.

Returns:
the proxy instance.

create

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

Parameters:
connectionUrl - the JDBC URL to connect to te database. E.g. jdbc:mysql://localhost:3306/properties.
Returns:
the proxy instance.

create

public static MySqlDataSourceProxy 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:mysql://localhost:3306/properties.
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()

getDataSource

public DataSource getDataSource()

toString

public String toString()
Overrides:
toString in class Object


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