org.dbmaintain.database
Class DatabaseInfoFactory

java.lang.Object
  extended by org.dbmaintain.database.DatabaseInfoFactory

public class DatabaseInfoFactory
extends Object

Author:
Tim Ducheyne, Filip Neven

Field Summary
protected  Properties configuration
           
 
Constructor Summary
DatabaseInfoFactory(Properties configuration)
           
 
Method Summary
protected  DatabaseInfo createDatabaseInfo(String databaseName, boolean disabled, boolean defaultDatabase)
           
 List<DatabaseInfo> createDatabaseInfos()
           
protected  List<String> getListProperty(String databaseName, String propertyNameEnd)
           
protected  String getProperty(String databaseName, String propertyNameEnd)
           
protected  DatabaseInfo getUnnamedDatabaseInfo()
           
protected  boolean isDatabaseIncluded(String databaseName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configuration

protected Properties configuration
Constructor Detail

DatabaseInfoFactory

public DatabaseInfoFactory(Properties configuration)
Method Detail

createDatabaseInfos

public List<DatabaseInfo> createDatabaseInfos()

getUnnamedDatabaseInfo

protected DatabaseInfo getUnnamedDatabaseInfo()

createDatabaseInfo

protected DatabaseInfo createDatabaseInfo(String databaseName,
                                          boolean disabled,
                                          boolean defaultDatabase)
Parameters:
databaseName - The name that identifies the database, not null
disabled - True if this database is disabled
defaultDatabase - True if this database is the default database, there should only be 1 default database
Returns:
a DataSource that connects with the database as configured for the given database name

isDatabaseIncluded

protected boolean isDatabaseIncluded(String databaseName)
Parameters:
databaseName - the logical name that identifies the database
Returns:
whether the database with the given name is included in the set of database to be updated by db maintain

getProperty

protected String getProperty(String databaseName,
                             String propertyNameEnd)

getListProperty

protected List<String> getListProperty(String databaseName,
                                       String propertyNameEnd)


Copyright © 2011. All Rights Reserved.