liquibase.snapshot.jvm
Class JdbcSnapshotGenerator

java.lang.Object
  extended by liquibase.snapshot.jvm.JdbcSnapshotGenerator
All Implemented Interfaces:
SnapshotGenerator
Direct Known Subclasses:
CatalogSnapshotGenerator, ColumnSnapshotGenerator, DataSnapshotGenerator, ForeignKeySnapshotGenerator, IndexSnapshotGenerator, PrimaryKeySnapshotGenerator, SchemaSnapshotGenerator, SequenceSnapshotGenerator, TableSnapshotGenerator, UniqueConstraintSnapshotGenerator, ViewSnapshotGenerator

public abstract class JdbcSnapshotGenerator
extends Object
implements SnapshotGenerator


Field Summary
 
Fields inherited from interface liquibase.snapshot.SnapshotGenerator
PRIORITY_ADDITIONAL, PRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NONE
 
Constructor Summary
protected JdbcSnapshotGenerator(Class<? extends DatabaseObject> defaultFor)
           
protected JdbcSnapshotGenerator(Class<? extends DatabaseObject> defaultFor, Class<? extends DatabaseObject>[] addsTo)
           
 
Method Summary
 void addStatusListener(DiffStatusListener listener)
           
 Class<? extends DatabaseObject>[] addsTo()
           
protected abstract  void addTo(DatabaseObject foundObject, DatabaseSnapshot snapshot)
           
protected  String cleanNameFromDatabase(String objectName, Database database)
           
 int getPriority(Class<? extends DatabaseObject> objectType, Database database)
           
 Class<? extends SnapshotGenerator>[] replaces()
          Returns classes (and superclasses) that this SnapshotGenerator replaces.
protected  boolean shouldAddTo(Class<? extends DatabaseObject> databaseObjectType, DatabaseSnapshot snapshot)
           
 DatabaseObject snapshot(DatabaseObject example, DatabaseSnapshot snapshot, SnapshotGeneratorChain chain)
           
protected abstract  DatabaseObject snapshotObject(DatabaseObject example, DatabaseSnapshot snapshot)
           
protected  void updateListeners(String message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcSnapshotGenerator

protected JdbcSnapshotGenerator(Class<? extends DatabaseObject> defaultFor)

JdbcSnapshotGenerator

protected JdbcSnapshotGenerator(Class<? extends DatabaseObject> defaultFor,
                                Class<? extends DatabaseObject>[] addsTo)
Method Detail

getPriority

public int getPriority(Class<? extends DatabaseObject> objectType,
                       Database database)
Specified by:
getPriority in interface SnapshotGenerator

addsTo

public Class<? extends DatabaseObject>[] addsTo()
Specified by:
addsTo in interface SnapshotGenerator

snapshot

public DatabaseObject snapshot(DatabaseObject example,
                               DatabaseSnapshot snapshot,
                               SnapshotGeneratorChain chain)
                        throws DatabaseException,
                               InvalidExampleException
Specified by:
snapshot in interface SnapshotGenerator
Throws:
DatabaseException
InvalidExampleException

shouldAddTo

protected boolean shouldAddTo(Class<? extends DatabaseObject> databaseObjectType,
                              DatabaseSnapshot snapshot)

replaces

public Class<? extends SnapshotGenerator>[] replaces()
Description copied from interface: SnapshotGenerator
Returns classes (and superclasses) that this SnapshotGenerator replaces. Return null or empty array to not affect the SnapshotGeneratorChain.

Specified by:
replaces in interface SnapshotGenerator

snapshotObject

protected abstract DatabaseObject snapshotObject(DatabaseObject example,
                                                 DatabaseSnapshot snapshot)
                                          throws DatabaseException,
                                                 InvalidExampleException
Throws:
DatabaseException
InvalidExampleException

addTo

protected abstract void addTo(DatabaseObject foundObject,
                              DatabaseSnapshot snapshot)
                       throws DatabaseException,
                              InvalidExampleException
Throws:
DatabaseException
InvalidExampleException

addStatusListener

public void addStatusListener(DiffStatusListener listener)

updateListeners

protected void updateListeners(String message)

cleanNameFromDatabase

protected String cleanNameFromDatabase(String objectName,
                                       Database database)


Copyright © 2015 Liquibase.org. All rights reserved.