com.xebialabs.deployit.mapper.artifact
Class SqlScriptToDatabaseMapper

java.lang.Object
  extended by com.xebialabs.deployit.mapper.Mapper<S,M,T>
      extended by com.xebialabs.deployit.mapper.StepGeneratingMapper<SqlScript,SqlMapping,Database>
          extended by com.xebialabs.deployit.mapper.artifact.SqlScriptToDatabaseMapper

public class SqlScriptToDatabaseMapper
extends StepGeneratingMapper<SqlScript,SqlMapping,Database>


Field Summary
 
Fields inherited from class com.xebialabs.deployit.mapper.Mapper
addedMappings, change, deletedMappings, modifiedMappings, newMappings, oldMappings
 
Constructor Summary
SqlScriptToDatabaseMapper(Change<Deployment> change)
           
 
Method Summary
 void generateAdditionStepsForAddedMapping(SqlScript newSource, Database newTarget, java.util.List<Step> steps)
           
protected  void generateAdditionStepsForAddedMapping(SqlScript newSource, SqlMapping newMapping, Database newTarget, java.util.List<Step> steps)
          Must be implemented by a subclass to generate steps that add an artifact/a resource to the middleware when a mapping is added.
protected  void generateDeletionStepsForDeletedMapping(SqlScript oldMappingSource, SqlMapping oldVersionOfModifiedMapping, Database oldMappingTarget, java.util.List<Step> steps)
          Must be implemented by a subclass to generate steps that delete an artifact/a resource from the middleware when a mapping is deleted.
 
Methods inherited from class com.xebialabs.deployit.mapper.StepGeneratingMapper
generateAdditionSteps, generateAdditionStepsForModifiedMapping, generateDeletionSteps, generateDeletionStepsForModifiedMapping
 
Methods inherited from class com.xebialabs.deployit.mapper.Mapper
getAddedMappings, getAffectedTargets, getAllTargets, getDeletedMappings, getModifiedMappings, getNewMappings, getNewTargets, getOldMappings, getOldTargets, init, setDefaults
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlScriptToDatabaseMapper

public SqlScriptToDatabaseMapper(Change<Deployment> change)
Method Detail

generateAdditionStepsForAddedMapping

public void generateAdditionStepsForAddedMapping(SqlScript newSource,
                                                 Database newTarget,
                                                 java.util.List<Step> steps)

generateAdditionStepsForAddedMapping

protected void generateAdditionStepsForAddedMapping(SqlScript newSource,
                                                    SqlMapping newMapping,
                                                    Database newTarget,
                                                    java.util.List<Step> steps)
Description copied from class: StepGeneratingMapper
Must be implemented by a subclass to generate steps that add an artifact/a resource to the middleware when a mapping is added.

Specified by:
generateAdditionStepsForAddedMapping in class StepGeneratingMapper<SqlScript,SqlMapping,Database>
Parameters:
newSource - the source of the new mapping. The value is identical to newMapping.getSource() but it is provided separately so that the implementor of this method does not have to cast it.
newMapping - the new mapping
newTarget - the target of the new mapping. The value is identical to newMapping.getTarget() but it is provided separately so that the implementor of this method does not have to cast it.
steps - the list of steps to which the generated steps are to be added

generateDeletionStepsForDeletedMapping

protected void generateDeletionStepsForDeletedMapping(SqlScript oldMappingSource,
                                                      SqlMapping oldVersionOfModifiedMapping,
                                                      Database oldMappingTarget,
                                                      java.util.List<Step> steps)
Description copied from class: StepGeneratingMapper
Must be implemented by a subclass to generate steps that delete an artifact/a resource from the middleware when a mapping is deleted.

Specified by:
generateDeletionStepsForDeletedMapping in class StepGeneratingMapper<SqlScript,SqlMapping,Database>
Parameters:
oldMappingSource - the source of the old mapping. The value is identical to oldMapping.getSource() but it is provided separately so that the implementor of this method does not have to cast it.
oldVersionOfModifiedMapping - the old mapping
oldMappingTarget - the target of the old mapping. The value is identical to oldMapping.getTarget() but it is provided separately so that the implementor of this method does not have to cast it.
steps - the list of steps to which the generated steps are to be added


Copyright © 2010. All Rights Reserved.