edu.internet2.middleware.grouper.ddl
Interface DdlVersionable

All Known Implementing Classes:
GrouperDdl, GrouperOrgDdl, GrouperTestDdl, SubjectDdl

public interface DdlVersionable

enums which are ddl version need to implement this interface


Method Summary
 void addAllForeignKeysViewsEtc(DdlVersionBean ddlVersionBean)
          add all foreign keys, views, table / col comments, etc
 void dropAllViews(DdlVersionBean ddlVersionBean)
          drop all views at the beginning of the script...
 String getDefaultTablePattern()
           get the table pattern for this dbname (would be nice if there were no overlap, so ext's should not start with grouper, e.g.
 String getObjectName()
          get the object name of this enum, e.g.
 String[] getSampleTablenames()
          an example table name so we can hone in on the exact metadata
 int getVersion()
          get the version of this enum
 boolean recreateViewsAndForeignKeys()
           
 void updateVersionFromPrevious(org.apache.ddlutils.model.Database database, DdlVersionBean ddlVersionBean)
          check to see if the changes are already made, and then add the changes to the database object that should be used to update from the previous version
 

Method Detail

addAllForeignKeysViewsEtc

void addAllForeignKeysViewsEtc(DdlVersionBean ddlVersionBean)
add all foreign keys, views, table / col comments, etc

Parameters:
ddlVersionBean -

dropAllViews

void dropAllViews(DdlVersionBean ddlVersionBean)
drop all views at the beginning of the script...

Parameters:
ddlVersionBean -

getVersion

int getVersion()
get the version of this enum

Returns:
the version

getObjectName

String getObjectName()
get the object name of this enum, e.g. if GrouperEnum, the object name is Grouper

Returns:
the object name

getDefaultTablePattern

String getDefaultTablePattern()
 get the table pattern for this dbname (would be nice if there were no overlap,
 so ext's should not start with grouper, e.g. grouploader_
 note that underscore is a wildcard which is unfortunate

Returns:
the table patter, e.g. "GROUPER%"

getSampleTablenames

String[] getSampleTablenames()
an example table name so we can hone in on the exact metadata

Returns:
the table name

updateVersionFromPrevious

void updateVersionFromPrevious(org.apache.ddlutils.model.Database database,
                               DdlVersionBean ddlVersionBean)
check to see if the changes are already made, and then add the changes to the database object that should be used to update from the previous version

Parameters:
database - ddlutils database object
ddlVersionBean - has references to stuff you need

recreateViewsAndForeignKeys

boolean recreateViewsAndForeignKeys()
Returns:
true if the update requires views/keys to be recreated