Enum Class SubjectDdl
- All Implemented Interfaces:
DdlVersionable,Serializable,Comparable<SubjectDdl>,Constable
ddl versions and stuff for grouper. All ddl classes must have a currentVersion method that
returns the current version
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllForeignKeysViewsEtc(DdlVersionBean ddlVersionBean) add all foreign keysstatic intkeep the current version here, increment as things changevoiddropAllViews(DdlVersionBean ddlVersionBean) drop all viewsget the table pattern for this dbname (would be nice if there were no overlap, so ext's should not start with grouper, e.g.get the object name of this enum, e.g.String[]an example table name so we can hone in on the exact metadataintget the version of this enumbooleanbooleanif this version requires an empty changelogabstract voidupdateVersionFromPrevious(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 versionstatic SubjectDdlReturns the enum constant of this class with the specified name.static SubjectDdl[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface edu.internet2.middleware.grouper.ddl.DdlVersionable
getGrouperVersion
-
Enum Constant Details
-
V1
first version of grouper, make sure the ddl table is there
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
requiresEmptyChangelog
public boolean requiresEmptyChangelog()Description copied from interface:DdlVersionableif this version requires an empty changelog- Specified by:
requiresEmptyChangelogin interfaceDdlVersionable- Returns:
- true if so
-
getVersion
public int getVersion()Description copied from interface:DdlVersionableget the version of this enum- Specified by:
getVersionin interfaceDdlVersionable- Returns:
- the version
- See Also:
-
currentVersion
public static int currentVersion()keep the current version here, increment as things change- Returns:
- the current version
-
getObjectName
Description copied from interface:DdlVersionableget the object name of this enum, e.g. if GrouperEnum, the object name is Grouper- Specified by:
getObjectNamein interfaceDdlVersionable- Returns:
- the object name
- See Also:
-
getDefaultTablePattern
Description copied from interface:DdlVersionableget 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
- Specified by:
getDefaultTablePatternin interfaceDdlVersionable- Returns:
- the table patter, e.g. "GROUPER%"
- See Also:
-
updateVersionFromPrevious
Description copied from interface:DdlVersionablecheck 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- Specified by:
updateVersionFromPreviousin interfaceDdlVersionable- Parameters:
database- ddlutils database objectddlVersionBean- has references to stuff you need- See Also:
-
dropAllViews
drop all views- Specified by:
dropAllViewsin interfaceDdlVersionable- Parameters:
ddlVersionBean-
-
addAllForeignKeysViewsEtc
add all foreign keys- Specified by:
addAllForeignKeysViewsEtcin interfaceDdlVersionable- Parameters:
ddlVersionBean-
-
getSampleTablenames
an example table name so we can hone in on the exact metadata- Specified by:
getSampleTablenamesin interfaceDdlVersionable- Returns:
- the table name
-
recreateViewsAndForeignKeys
public boolean recreateViewsAndForeignKeys()- Specified by:
recreateViewsAndForeignKeysin interfaceDdlVersionable- Returns:
- true if the update requires views/keys to be recreated
- See Also:
-