org.dbmaintain.config
Class FactoryWithDatabaseContext

java.lang.Object
  extended by org.dbmaintain.config.FactoryContext
      extended by org.dbmaintain.config.FactoryWithDatabaseContext

public class FactoryWithDatabaseContext
extends FactoryContext

Author:
Tim Ducheyne, Filip Neven

Constructor Summary
FactoryWithDatabaseContext(Properties configuration, MainFactory mainFactory, Databases databases, SQLHandler sqlHandler)
           
 
Method Summary
 void addItemsToPreserve(DbItemType dbItemType, String itemsToPreserveProperty, Set<DbItemIdentifier> itemsToPreserve)
          Adds the items to preserve configured by the given property to the given list.
 Map<String,ScriptParserFactory> getDatabaseDialectScriptParserFactoryMap()
           
 Set<String> getDatabaseDialectsInUse()
           
 Databases getDatabases()
           
 DbItemIdentifier getExecutedScriptsTable()
           
 Set<DbItemIdentifier> getSchemasToPreserve(String propertyPreserveSchemas)
           
protected  Properties getScriptParameters()
           
 SQLHandler getSqlHandler()
           
 
Methods inherited from class org.dbmaintain.config.FactoryContext
createQualifierEvaluator, createQualifiers, createScriptLocation, createScriptRepository, getBaselineRevision, getConfiguration, getMainFactory, getRegisteredQualifiers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FactoryWithDatabaseContext

public FactoryWithDatabaseContext(Properties configuration,
                                  MainFactory mainFactory,
                                  Databases databases,
                                  SQLHandler sqlHandler)
Method Detail

getExecutedScriptsTable

public DbItemIdentifier getExecutedScriptsTable()

getSchemasToPreserve

public Set<DbItemIdentifier> getSchemasToPreserve(String propertyPreserveSchemas)
Parameters:
propertyPreserveSchemas - The preserve property name, not null
Returns:
The configured set of schemas to preserve, not null

addItemsToPreserve

public void addItemsToPreserve(DbItemType dbItemType,
                               String itemsToPreserveProperty,
                               Set<DbItemIdentifier> itemsToPreserve)
Adds the items to preserve configured by the given property to the given list.

Parameters:
dbItemType - The type of item, not null
itemsToPreserveProperty - The property to get the preserved items, not null
itemsToPreserve - The set to add the items to, not null

getDatabaseDialectScriptParserFactoryMap

public Map<String,ScriptParserFactory> getDatabaseDialectScriptParserFactoryMap()

getScriptParameters

protected Properties getScriptParameters()

getDatabaseDialectsInUse

public Set<String> getDatabaseDialectsInUse()

getDatabases

public Databases getDatabases()

getSqlHandler

public SQLHandler getSqlHandler()


Copyright © 2011. All Rights Reserved.