Class DdlVersionBean
java.lang.Object
edu.internet2.middleware.grouper.ddl.DdlVersionBean
bean to pass to versions to update stuff
-
Constructor Summary
ConstructorDescriptionDdlVersionBean
(String objectName, Platform platform, Connection connection, String schema, SqlBuilder sqlBuilder, Database oldDatabase, Database database, StringBuilder additionalScripts, boolean isDestinationVersion, int buildingToVersion, StringBuilder fullScript, int theBuildingFromVersion) construct -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendAdditionalScriptUnique
(String script) append an additionalScript, but only if it is not already in the body of the script (or additionalScript)boolean
didWeDoThis
(String label, boolean addAsDoing) see if we already did thisadditional scripts to add after ddlutils scriptsint
version building fromint
the eventual version we are build tojdbc connectiondatabase we are operating onfull script so far (to make sure we dont have duplicate scripts, shouldnt add directly to it from here thoughddl object name (e.g.current state of the database (after modifications :) ).ddlutils platformschemaddlutils schemabuilderboolean
boolean
isMysql()
boolean
isOracle()
boolean
boolean
if small indexesvoid
if starting over, reset thisvoid
setAdditionalScripts
(StringBuilder additionalScripts) additional scripts to add after ddlutils scriptsvoid
setBuildingFromVersion
(int buildingFromVersion1) version building fromvoid
setBuildingToVersion
(int buildingToVersion) the eventual version we are build tovoid
setConnection
(Connection connection) jdbc connectionvoid
setDatabase
(Database database) database we are operating onvoid
setDestinationVersion
(boolean isDestinationVersion) void
setFullScript
(StringBuilder fullScript) full script so far (to make sure we dont have duplicate scripts, shouldnt add directly to it from here thoughvoid
setGrouperDdlCompareResult
(GrouperDdlCompareResult grouperDdlCompareResult) void
setObjectName
(String objectName) ddl object name (e.g.void
setOldDatabase
(Database oldDatabase) current state of the database (after modifications :) ).void
setPlatform
(Platform platform) ddlutils platformvoid
schemavoid
setSqlBuilder
(SqlBuilder sqlBuilder) ddlutils schemabuilder
-
Constructor Details
-
DdlVersionBean
public DdlVersionBean(String objectName, Platform platform, Connection connection, String schema, SqlBuilder sqlBuilder, Database oldDatabase, Database database, StringBuilder additionalScripts, boolean isDestinationVersion, int buildingToVersion, StringBuilder fullScript, int theBuildingFromVersion) construct- Parameters:
objectName
-platform
-connection
-schema
-sqlBuilder
-oldDatabase
-database
-additionalScripts
-isDestinationVersion
-buildingToVersion
-fullScript
-
-
-
Method Details
-
getGrouperDdlCompareResult
- Returns:
-
setGrouperDdlCompareResult
- Parameters:
grouperDdlCompareResult
-
-
resetAlreadyDone
public void resetAlreadyDone()if starting over, reset this -
didWeDoThis
see if we already did this- Parameters:
label
-addAsDoing
- true if we should add that we are doing this now- Returns:
- true if already done
-
isPostgres
public boolean isPostgres()- Returns:
- true if postgres
-
isMysql
public boolean isMysql()- Returns:
- true if mysql
-
isSmallIndexes
public boolean isSmallIndexes()if small indexes- Returns:
- true if small indexes
-
isOracle
public boolean isOracle()- Returns:
- true if postgres
-
appendAdditionalScriptUnique
append an additionalScript, but only if it is not already in the body of the script (or additionalScript)- Parameters:
script
- should contain script (or scripts), and should end in a semicolon (each line should), and should end in newline
-
getOldDatabase
current state of the database (after modifications :) ). Note, this is null if this is working on old db- Returns:
- the oldDatabase
-
setOldDatabase
current state of the database (after modifications :) ). Note, this is null if this is working on old db- Parameters:
oldDatabase
- the oldDatabase to set
-
getDatabase
database we are operating on- Returns:
- the database
-
setDatabase
database we are operating on- Parameters:
database
- the database to set
-
getAdditionalScripts
additional scripts to add after ddlutils scripts- Returns:
- the additionalScripts
-
setAdditionalScripts
additional scripts to add after ddlutils scripts- Parameters:
additionalScripts
- the additionalScripts to set
-
isDestinationVersion
public boolean isDestinationVersion()- Returns:
- the isDestinationVersion
-
setDestinationVersion
public void setDestinationVersion(boolean isDestinationVersion) - Parameters:
isDestinationVersion
- the isDestinationVersion to set
-
getBuildingToVersion
public int getBuildingToVersion()the eventual version we are build to- Returns:
- the buildingToVersion
-
setBuildingToVersion
public void setBuildingToVersion(int buildingToVersion) the eventual version we are build to- Parameters:
buildingToVersion
- the buildingToVersion to set
-
getFullScript
full script so far (to make sure we dont have duplicate scripts, shouldnt add directly to it from here though- Returns:
- the fullScript
-
setFullScript
full script so far (to make sure we dont have duplicate scripts, shouldnt add directly to it from here though- Parameters:
fullScript
- the fullScript to set
-
getPlatform
ddlutils platform- Returns:
- the platform
-
setPlatform
ddlutils platform- Parameters:
platform
- the platform to set
-
getConnection
jdbc connection- Returns:
- the connection
-
setConnection
jdbc connection- Parameters:
connection
- the connection to set
-
getSchema
schema- Returns:
- the schema
-
setSchema
schema- Parameters:
schema
- the schema to set
-
getSqlBuilder
ddlutils schemabuilder- Returns:
- the sqlBuilder
-
getBuildingFromVersion
public int getBuildingFromVersion()version building from -
setBuildingFromVersion
public void setBuildingFromVersion(int buildingFromVersion1) version building from -
setSqlBuilder
ddlutils schemabuilder- Parameters:
sqlBuilder
- the sqlBuilder to set
-
getObjectName
ddl object name (e.g. Grouper or Subject)- Returns:
- the objectName
-
setObjectName
ddl object name (e.g. Grouper or Subject)- Parameters:
objectName
- the objectName to set
-