liquibase.ext.hibernate.diff
Class ChangedUniqueConstraintChangeGenerator

java.lang.Object
  extended by liquibase.ext.hibernate.diff.ChangedUniqueConstraintChangeGenerator
All Implemented Interfaces:
liquibase.diff.output.changelog.ChangedObjectChangeGenerator, liquibase.diff.output.changelog.ChangeGenerator

public class ChangedUniqueConstraintChangeGenerator
extends Object
implements liquibase.diff.output.changelog.ChangedObjectChangeGenerator

Hibernate doesn't know about all the variations that occur with unique constraint but just whether they exists or not. To prevent changing customized constraints, we suppress all changes with hibernate.


Field Summary
 
Fields inherited from interface liquibase.diff.output.changelog.ChangeGenerator
PRIORITY_ADDITIONAL, PRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NONE
 
Constructor Summary
ChangedUniqueConstraintChangeGenerator()
           
 
Method Summary
 liquibase.change.Change[] fixChanged(liquibase.structure.DatabaseObject changedObject, liquibase.diff.ObjectDifferences differences, liquibase.diff.output.DiffOutputControl control, liquibase.database.Database referenceDatabase, liquibase.database.Database comparisonDatabase, liquibase.diff.output.changelog.ChangeGeneratorChain chain)
           
 int getPriority(Class<? extends liquibase.structure.DatabaseObject> objectType, liquibase.database.Database database)
           
 Class<? extends liquibase.structure.DatabaseObject>[] runAfterTypes()
           
 Class<? extends liquibase.structure.DatabaseObject>[] runBeforeTypes()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangedUniqueConstraintChangeGenerator

public ChangedUniqueConstraintChangeGenerator()
Method Detail

getPriority

public int getPriority(Class<? extends liquibase.structure.DatabaseObject> objectType,
                       liquibase.database.Database database)
Specified by:
getPriority in interface liquibase.diff.output.changelog.ChangeGenerator

runBeforeTypes

public Class<? extends liquibase.structure.DatabaseObject>[] runBeforeTypes()
Specified by:
runBeforeTypes in interface liquibase.diff.output.changelog.ChangeGenerator

runAfterTypes

public Class<? extends liquibase.structure.DatabaseObject>[] runAfterTypes()
Specified by:
runAfterTypes in interface liquibase.diff.output.changelog.ChangeGenerator

fixChanged

public liquibase.change.Change[] fixChanged(liquibase.structure.DatabaseObject changedObject,
                                            liquibase.diff.ObjectDifferences differences,
                                            liquibase.diff.output.DiffOutputControl control,
                                            liquibase.database.Database referenceDatabase,
                                            liquibase.database.Database comparisonDatabase,
                                            liquibase.diff.output.changelog.ChangeGeneratorChain chain)
Specified by:
fixChanged in interface liquibase.diff.output.changelog.ChangedObjectChangeGenerator


Copyright © 2015 Liquibase.org. All rights reserved.