public abstract class UpgDefaultsTemplate extends java.lang.Object implements UpgConstants
ConfigDB
and
Util
.
This is needed only when the column is non-nullable and the standard default values (No for YORN columns, 0 for numeric columns) are not sufficient. It is invoked when changing a column to not allow nulls, and when adding a column (whether or not it allows nulls).
The subdirectory containing these extensions is determined as follows.
Find the name of the maxvar MAXUPG from the database that you are converting from.
Use the first part of the varvalue up to but not including any space or hyphen character.
For example, if the varvalue equals V411-06 3/23/2001
, then the name
of the subdirectory would be psdi.configure.V411
.
Modifier and Type | Field and Description |
---|---|
java.sql.Connection |
con
Database connection
|
java.lang.String[] |
supportedColumns
Names of columns on this table for which default logic is provided.
|
java.lang.String |
tbname
Table name
|
Util |
util
Reference to
Util class. |
DB2, doNotUpdateACTION, doNotUpdateALNDOMAIN, doNotUpdateAPPLICATIONAUTH, doNotUpdateAUTOKEY, doNotUpdateCONDITION, doNotUpdateCONTRACTPROPERTY, doNotUpdateCONTRACTTYPE, doNotUpdateCROSSOVERDOMAIN, doNotUpdateDOCTYPES, doNotUpdateLANGUAGE, doNotUpdateMAXAPPS, doNotUpdateMAXCONDDETAIL, doNotUpdateMAXCONTROLVALUE, doNotUpdateMAXDOMAIN, doNotUpdateMAXLOGAPPENDER, doNotUpdateMAXLOGGER, doNotUpdateMAXMENU, doNotUpdateMAXMESSAGES, doNotUpdateMAXMODULES, doNotUpdateMAXPROP, doNotUpdateMAXPROPVALUE, doNotUpdateMAXROLE, doNotUpdateMAXSEQUENCE, doNotUpdateMAXSERSECURITY, doNotUpdateMAXSERVICE, doNotUpdateMAXTABLEDOMAIN, doNotUpdateMAXVARS, doNotUpdateMAXVARTYPE, doNotUpdateMXCOLLAB, doNotUpdateMXCOLLABREF, doNotUpdateNUMERICDOMAIN, doNotUpdateNUMRANGEDOMAIN, doNotUpdatePORTLET, doNotUpdatePRICALC, doNotUpdateSECURITYRESTRICT, doNotUpdateSIGOPTION, doNotUpdateSYNONYMDOMAIN, doNotUpdateTAXTYPE, doNotUpdateWORKPRIORITY, doNotUpdateWORKTYPE, doNotUpdateWPEDITSETTING, messageCache, NEWONLY, OLDANDNEW, OLDONLY, ORACLE, SQLINET, SQLMICROSOFT, SQLSERVER, SYSDATATABLES, SYSTEMTABLES, UNKNOWN
Constructor and Description |
---|
UpgDefaultsTemplate(java.lang.String tbname,
java.sql.Connection con,
Util util) |
Modifier and Type | Method and Description |
---|---|
boolean |
columnHasDefault(java.lang.String name)
Identifies whether this class provides default logic for the specified column.
|
java.util.ArrayList |
getDefaultSql(java.lang.String name)
Return one or more sql statements for updating the specified column.
|
java.lang.String |
getRenameSql(java.lang.String tbname,
java.lang.String oldColumn,
java.lang.String newColumn)
Copy the values of one column to another column.
|
java.lang.String |
getRenameSql(java.lang.String tbname,
java.lang.String oldColumn,
java.lang.String newColumn,
boolean onlyIfNull)
Copy the values of one column to another column.
|
public java.lang.String tbname
public java.sql.Connection con
public java.lang.String[] supportedColumns
public UpgDefaultsTemplate(java.lang.String tbname, java.sql.Connection con, Util util)
tbname
- Table namecon
- Connectionutil
- Utilpublic java.util.ArrayList getDefaultSql(java.lang.String name) throws java.lang.Exception
name
- Column namejava.lang.Exception
public java.lang.String getRenameSql(java.lang.String tbname, java.lang.String oldColumn, java.lang.String newColumn, boolean onlyIfNull) throws java.lang.Exception
tbname
- Name of the tableoldColumn
- Old name of the columnnewColumn
- New name of the columnonlyIfNull
- Flag to indicate column should only be populated if it is empty.java.lang.Exception
public java.lang.String getRenameSql(java.lang.String tbname, java.lang.String oldColumn, java.lang.String newColumn) throws java.lang.Exception
tbname
- Name of the tableoldColumn
- Old name of the columnnewColumn
- New name of the columnjava.lang.Exception
public boolean columnHasDefault(java.lang.String name)
name
- Column name