edu.internet2.middleware.grouper.ddl
Enum GrouperDdl

java.lang.Object
  extended by java.lang.Enum<GrouperDdl>
      extended by edu.internet2.middleware.grouper.ddl.GrouperDdl
All Implemented Interfaces:
DdlVersionable, Serializable, Comparable<GrouperDdl>

public enum GrouperDdl
extends Enum<GrouperDdl>
implements DdlVersionable

ddl versions and stuff for grouper. All ddl classes must have a currentVersion method that returns the current version.


Enum Constant Summary
V1
          first version of grouper, make sure the ddl table is there
V10
          delete field name/type if in the right situation
V11
          delete backup cols if configured to and if exist
V12
          delete create source and modify source cols if they exist
V13
          change stem name index if applicable
V14
           if needs upgrade: backup attribute table, create group cols if not exist, move data to groups, delete old attribute data, if configured to drop backup attribute table, and it exists, then drop it
V15
          add indexes on group attribute name cols
V16
           if needs upgrade: backup memberships table, create new tables, views, columns if not exist, move data around, delete old data, if configured to drop backup membership cols, and they exists, then drop them
V17
           drop original columns in membership table not needed for 1.5.
V18
           add last membership change
V19
           add user auditing and context ids
V2
          all tables and indexes from grouper v1.3
V20
           add alternate name
V21
           add change log
V22
           add privilege management
V23
           add column to grouper_attribute_assign_value, remove composite memberships where the member is a group, add owner_id column to grouper_group_set
V24
           Delete flat tables, add PIT tables, update unique index in grouper_group_set, add external subject tables, add index for in table grouper_attribute_def
V25
           Add point in time indexes, add additional subject data to member table, add last immediate membership change column to grouper_groups.
V26
           Grouper 2.1: add alternate name for stems, add source_id columns to point in time tables
V27
           Grouper 2.2: migrate from attributeDefType domain to service, add stem set table, add attribute read/update privs, take care of legacy attributes
V28
           Grouper 2.2 - continued: finish legacy attributes
V29
           Grouper 2.2.1
V3
          add grouper loader
V30
           Grouper 2.3.0
V4
          add in the hibernate_version_number cols
V5
          convert uuid/id to just id
V6
          delete uuid if in right situation
V7
          delete backup cols if configured to and is exist
V8
          drop grouper_sessions table if exists
V9
          update the fields id as a foreign key, keep backups of old data
 
Field Summary
static String BAK_GROUPER_ATTRIBUTES
           
static String COLUMN_CONTEXT_ID
          context id column name
static String ID_SIZE
          size of id cols
 
Method Summary
 void addAllForeignKeysViewsEtc(DdlVersionBean ddlVersionBean)
          add all foreign keys
static int currentVersion()
          keep the current version here, increment as things change
 void dropAllViews(DdlVersionBean ddlVersionBean)
          drop all views
 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()
           
abstract  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
static GrouperDdl valueOf(String name)
          Returns the enum constant of this type with the specified name.
static GrouperDdl[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

V13

public static final GrouperDdl V13
change stem name index if applicable


V12

public static final GrouperDdl V12
delete create source and modify source cols if they exist


V14

public static final GrouperDdl V14
 if needs upgrade:
 backup attribute table, create group cols if not exist, move data to groups,
 delete old attribute data, 
 
 if configured to drop backup attribute table, and it exists, then drop it
 


V15

public static final GrouperDdl V15
add indexes on group attribute name cols


V16

public static final GrouperDdl V16
 if needs upgrade:
 backup memberships table, create new tables, views, columns if not exist, move data around,
 delete old data, 
 
 if configured to drop backup membership cols, and they exists, then drop them
 


V17

public static final GrouperDdl V17
 drop original columns in membership table not needed for 1.5.  also add unique index and field indexes.
 


V18

public static final GrouperDdl V18
 add last membership change
 


V19

public static final GrouperDdl V19
 add user auditing and context ids
 


V20

public static final GrouperDdl V20
 add alternate name
 


V21

public static final GrouperDdl V21
 add change log
 


V22

public static final GrouperDdl V22
 add privilege management
 


V23

public static final GrouperDdl V23
 add column to grouper_attribute_assign_value, remove composite memberships where the member is a group,
 add owner_id column to grouper_group_set
 


V24

public static final GrouperDdl V24
 Delete flat tables, add PIT tables, update unique index in grouper_group_set, add external subject tables,
 add index for in table grouper_attribute_def
 


V25

public static final GrouperDdl V25
 Add point in time indexes, add additional subject data to member table, add last immediate membership change column to grouper_groups.
 


V26

public static final GrouperDdl V26
 Grouper 2.1: add alternate name for stems, add source_id columns to point in time tables
 


V11

public static final GrouperDdl V11
delete backup cols if configured to and if exist


V10

public static final GrouperDdl V10
delete field name/type if in the right situation


V9

public static final GrouperDdl V9
update the fields id as a foreign key, keep backups of old data


V8

public static final GrouperDdl V8
drop grouper_sessions table if exists


V7

public static final GrouperDdl V7
delete backup cols if configured to and is exist


V6

public static final GrouperDdl V6
delete uuid if in right situation


V5

public static final GrouperDdl V5
convert uuid/id to just id


V4

public static final GrouperDdl V4
add in the hibernate_version_number cols


V3

public static final GrouperDdl V3
add grouper loader


V2

public static final GrouperDdl V2
all tables and indexes from grouper v1.3


V1

public static final GrouperDdl V1
first version of grouper, make sure the ddl table is there


V27

public static final GrouperDdl V27
 Grouper 2.2: migrate from attributeDefType domain to service, add stem set table, add attribute read/update privs, take care of legacy attributes
 


V28

public static final GrouperDdl V28
 Grouper 2.2 - continued: finish legacy attributes
 


V29

public static final GrouperDdl V29
 Grouper 2.2.1
 


V30

public static final GrouperDdl V30
 Grouper 2.3.0
 

Field Detail

COLUMN_CONTEXT_ID

public static final String COLUMN_CONTEXT_ID
context id column name

See Also:
Constant Field Values

BAK_GROUPER_ATTRIBUTES

public static final String BAK_GROUPER_ATTRIBUTES
See Also:
Constant Field Values

ID_SIZE

public static final String ID_SIZE
size of id cols

See Also:
Constant Field Values
Method Detail

values

public static GrouperDdl[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (GrouperDdl c : GrouperDdl.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static GrouperDdl valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
NullPointerException - if the argument is null

getVersion

public int getVersion()
Description copied from interface: DdlVersionable
get the version of this enum

Specified by:
getVersion in interface DdlVersionable
Returns:
the version
See Also:
DdlVersionable.getVersion()

currentVersion

public static int currentVersion()
keep the current version here, increment as things change

Returns:
the current version

getObjectName

public String getObjectName()
Description copied from interface: DdlVersionable
get the object name of this enum, e.g. if GrouperEnum, the object name is Grouper

Specified by:
getObjectName in interface DdlVersionable
Returns:
the object name
See Also:
DdlVersionable.getObjectName()

getDefaultTablePattern

public String getDefaultTablePattern()
Description copied from interface: DdlVersionable
 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

Specified by:
getDefaultTablePattern in interface DdlVersionable
Returns:
the table patter, e.g. "GROUPER%"
See Also:
DdlVersionable.getDefaultTablePattern()

updateVersionFromPrevious

public abstract void updateVersionFromPrevious(org.apache.ddlutils.model.Database database,
                                               DdlVersionBean ddlVersionBean)
Description copied from interface: DdlVersionable
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

Specified by:
updateVersionFromPrevious in interface DdlVersionable
Parameters:
database - ddlutils database object
ddlVersionBean - has references to stuff you need
See Also:
DdlVersionable.updateVersionFromPrevious(org.apache.ddlutils.model.Database, DdlVersionBean)

dropAllViews

public void dropAllViews(DdlVersionBean ddlVersionBean)
drop all views

Specified by:
dropAllViews in interface DdlVersionable
Parameters:
ddlVersionBean -

addAllForeignKeysViewsEtc

public void addAllForeignKeysViewsEtc(DdlVersionBean ddlVersionBean)
add all foreign keys

Specified by:
addAllForeignKeysViewsEtc in interface DdlVersionable
Parameters:
ddlVersionBean -

getSampleTablenames

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

Specified by:
getSampleTablenames in interface DdlVersionable
Returns:
the table name

recreateViewsAndForeignKeys

public boolean recreateViewsAndForeignKeys()
Specified by:
recreateViewsAndForeignKeys in interface DdlVersionable
Returns:
true if the update requires views/keys to be recreated
See Also:
DdlVersionable.recreateViewsAndForeignKeys()