Package liquibase.diff.output.changelog
Class DiffToChangeLog
- java.lang.Object
-
- liquibase.diff.output.changelog.DiffToChangeLog
-
public class DiffToChangeLog extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
DATABASE_CHANGE_LOG_CLOSING_XML_TAG
static String
DIFF_OUTPUT_CONTROL_SCOPE_KEY
static String
DIFF_SNAPSHOT_DATABASE
static String
EXTERNAL_FILE_DIR_SCOPE_KEY
static String
ORDER_ATTRIBUTE
-
Constructor Summary
Constructors Constructor Description DiffToChangeLog(DiffResult diffResult, DiffOutputControl diffOutputControl)
DiffToChangeLog(DiffOutputControl diffOutputControl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addDependencies(DependencyUtil.DependencyGraph<String> graph, List<String> schemas, Database database)
Adds dependencies to the graph as schema.object_name.List<ChangeSet>
generateChangeSets()
protected String
generateId(Change[] changes)
protected String
getChangeSetAuthor()
String
getChangeSetPath()
protected List<Class<? extends DatabaseObject>>
getOrderedOutputTypes(Class<? extends ChangeGenerator> generatorType)
void
print(PrintStream out)
void
print(PrintStream out, ChangeLogSerializer changeLogSerializer)
Prints changeLog that would bring the target database to be the same as the reference databasevoid
print(String changeLogFile)
void
print(String changeLogFile, Boolean overwriteOutputFile)
void
print(String changeLogFile, ChangeLogSerializer changeLogSerializer)
void
print(String changeLogFile, ChangeLogSerializer changeLogSerializer, Boolean overwriteOutputFile)
void
printNew(ChangeLogSerializer changeLogSerializer, Resource file)
Prints changeLog that would bring the target database to be the same as the reference databasevoid
setChangeSetAuthor(String changeSetAuthor)
void
setChangeSetContext(String changeSetContext)
void
setChangeSetPath(String changeSetPath)
void
setDiffResult(DiffResult diffResult)
void
setIdRoot(String idRoot)
protected boolean
supportsSortingObjects(Database database)
Used bysortMissingObjects(Collection, Database)
to determine whether to go into the sorting logic.protected boolean
useSeparateChangeSets(Change[] changes)
-
-
-
Field Detail
-
ORDER_ATTRIBUTE
public static final String ORDER_ATTRIBUTE
- See Also:
- Constant Field Values
-
DATABASE_CHANGE_LOG_CLOSING_XML_TAG
public static final String DATABASE_CHANGE_LOG_CLOSING_XML_TAG
- See Also:
- Constant Field Values
-
EXTERNAL_FILE_DIR_SCOPE_KEY
public static final String EXTERNAL_FILE_DIR_SCOPE_KEY
- See Also:
- Constant Field Values
-
DIFF_OUTPUT_CONTROL_SCOPE_KEY
public static final String DIFF_OUTPUT_CONTROL_SCOPE_KEY
- See Also:
- Constant Field Values
-
DIFF_SNAPSHOT_DATABASE
public static final String DIFF_SNAPSHOT_DATABASE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DiffToChangeLog
public DiffToChangeLog(DiffResult diffResult, DiffOutputControl diffOutputControl)
-
DiffToChangeLog
public DiffToChangeLog(DiffOutputControl diffOutputControl)
-
-
Method Detail
-
setDiffResult
public void setDiffResult(DiffResult diffResult)
-
setChangeSetContext
public void setChangeSetContext(String changeSetContext)
-
print
public void print(String changeLogFile) throws ParserConfigurationException, IOException, DatabaseException
-
print
public void print(String changeLogFile, Boolean overwriteOutputFile) throws ParserConfigurationException, IOException, DatabaseException
-
print
public void print(PrintStream out) throws ParserConfigurationException, IOException, DatabaseException
-
print
public void print(String changeLogFile, ChangeLogSerializer changeLogSerializer) throws ParserConfigurationException, IOException, DatabaseException
-
print
public void print(String changeLogFile, ChangeLogSerializer changeLogSerializer, Boolean overwriteOutputFile) throws ParserConfigurationException, IOException, DatabaseException
-
printNew
public void printNew(ChangeLogSerializer changeLogSerializer, Resource file) throws ParserConfigurationException, IOException, DatabaseException
Prints changeLog that would bring the target database to be the same as the reference database
-
print
public void print(PrintStream out, ChangeLogSerializer changeLogSerializer) throws ParserConfigurationException, IOException, DatabaseException
Prints changeLog that would bring the target database to be the same as the reference database
-
supportsSortingObjects
protected boolean supportsSortingObjects(Database database)
Used bysortMissingObjects(Collection, Database)
to determine whether to go into the sorting logic.
-
addDependencies
protected void addDependencies(DependencyUtil.DependencyGraph<String> graph, List<String> schemas, Database database) throws DatabaseException
Adds dependencies to the graph as schema.object_name.- Throws:
DatabaseException
-
getOrderedOutputTypes
protected List<Class<? extends DatabaseObject>> getOrderedOutputTypes(Class<? extends ChangeGenerator> generatorType)
-
useSeparateChangeSets
protected boolean useSeparateChangeSets(Change[] changes)
-
getChangeSetAuthor
protected String getChangeSetAuthor()
-
setChangeSetAuthor
public void setChangeSetAuthor(String changeSetAuthor)
-
getChangeSetPath
public String getChangeSetPath()
-
setChangeSetPath
public void setChangeSetPath(String changeSetPath)
-
setIdRoot
public void setIdRoot(String idRoot)
-
-