de.smartics.properties.impl.config.ds
Class DataSourceConfigurationBuilder

Package class diagram package DataSourceConfigurationBuilder
java.lang.Object
  extended by de.smartics.properties.impl.config.ds.DataSourceConfigurationBuilder

public final class DataSourceConfigurationBuilder
     
     
extends Object

Helper to create instances of DataSourceConfiguration.


Constructor Summary
DataSourceConfigurationBuilder()
           
 
Method Summary
 DataSourceConfiguration build()
          Creates an DataSourceConfiguration instance.
 String getConfigSourceId()
          Returns the source of the data source configuration.
 String getJndiName()
          Returns the name of the data source to lookup in a JNDI context.
 boolean isCreateTable()
          Returns the flag to create the configuration if set to true.
 boolean isDropTable()
          Returns the flag to drop the configuration table if set to true.
 void setConfigSourceId(String configSourceId)
          Sets the source of the data source configuration.
 void setCreateTable(boolean createTable)
          Sets the flag to create the configuration if set to true.
 void setDropTable(boolean dropTable)
          Sets the flag to drop the configuration table if set to true.
 void setJndiName(String jndiName)
          Sets the name of the data source to lookup in a JNDI context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSourceConfigurationBuilder

public DataSourceConfigurationBuilder()
Method Detail

getConfigSourceId

public String getConfigSourceId()
Returns the source of the data source configuration.

Returns:
the source of the data source configuration.

setConfigSourceId

public void setConfigSourceId(String configSourceId)
Sets the source of the data source configuration.

Parameters:
configSourceId - the source of the data source configuration.

setJndiName

public void setJndiName(String jndiName)
Sets the name of the data source to lookup in a JNDI context.

Parameters:
jndiName - the name of the data source to lookup in a JNDI context.

setDropTable

public void setDropTable(boolean dropTable)
Sets the flag to drop the configuration table if set to true.

Parameters:
dropTable - the flag to drop the configuration table if set to true.

setCreateTable

public void setCreateTable(boolean createTable)
Sets the flag to create the configuration if set to true.

Parameters:
createTable - the flag to create the configuration if set to true.

getJndiName

public String getJndiName()
Returns the name of the data source to lookup in a JNDI context.

Returns:
the name of the data source to lookup in a JNDI context.

isDropTable

public boolean isDropTable()
Returns the flag to drop the configuration table if set to true.

Returns:
the flag to drop the configuration table if set to true.

isCreateTable

public boolean isCreateTable()
Returns the flag to create the configuration if set to true.

Returns:
the flag to create the configuration if set to true.

build

public DataSourceConfiguration build()
                              throws de.smartics.util.lang.BlankArgumentException
Creates an DataSourceConfiguration instance.

Returns:
an DataSourceConfiguration instance.
Throws:
de.smartics.util.lang.BlankArgumentException - if the jndiName, createTable or dropTable are blank.


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