public class IndexElement extends org.jdom.Element implements UpgConstants
org.jdom.Element
.
IndexElement is instanciated by the following:
compareIndexMeta
and writeOldIndexes
.
The constructor will populate the IndexElement object appropriately.
ConfigXMLFactory
, via
Upgrade
.
The IndexElement methods getAddSql
and
getDropSql
return sql statements
for modifying the index metadata prior to running ConfigDB.
psdi.upgrade.BuildUpgMetadata
,
psdi.upgrade.Upgrade
,
Serialized FormDB2, 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 |
---|
IndexElement(java.lang.String name) |
IndexElement(java.lang.String name,
org.jdom.Namespace namespace) |
IndexElement(java.lang.String name,
java.lang.String uri) |
IndexElement(java.lang.String tbname,
java.lang.String ixname,
java.util.HashMap newIndex,
java.util.HashMap oldIndex)
This constructor is used when creating a new IndexElement for the purpose
of writing out XML.
|
IndexElement(java.lang.String name,
java.lang.String prefix,
java.lang.String uri) |
Modifier and Type | Method and Description |
---|---|
java.util.ArrayList |
getAddSql(java.lang.String tbname,
java.lang.String ixname,
java.sql.Connection con,
Util util,
java.util.HashMap oldIndex)
When reading XML, called from
Upgrade . |
java.lang.String[] |
getColNames()
Get an array of column names that are in this index.
|
java.util.ArrayList |
getDropSql(java.lang.String tbname,
java.lang.String ixname,
java.sql.Connection con,
Util util,
java.util.HashMap oldIndex)
When reading XML, called from
Upgrade . |
java.util.List |
getIndexAttributes()
Get the attributes for this IndexElement.
|
java.lang.String |
getIndexName()
Get the index name.
|
java.util.List |
getKeys()
Get the keys for this index.
|
java.lang.String |
getNewChanged()
Get the new value for maxsysindexes.changed (
newChanged ). |
java.lang.String |
getSequenceName(java.lang.String table,
java.lang.String column)
Get the name of the sequence used to populate a column.
|
java.lang.String |
getStatus()
Get the value of the index's attribute value "status" (see
status ). |
void |
setNewChanged(java.lang.String in)
Set the new value for maxsysindexes.changed (
newChanged ). |
java.util.HashMap |
toHashmap(java.util.HashMap oldMap)
This method can be used when reading XML to output a HashMap in the format
of
getIndexMeta . |
addContent, addContent, addContent, addContent, addContent, addNamespaceDeclaration, clone, cloneContent, getAdditionalNamespaces, getAttribute, getAttribute, getAttributes, getAttributeValue, getAttributeValue, getAttributeValue, getAttributeValue, getChild, getChild, getChildren, getChildren, getChildren, getChildText, getChildText, getChildTextNormalize, getChildTextNormalize, getChildTextTrim, getChildTextTrim, getContent, getContent, getContent, getContentSize, getDescendants, getDescendants, getName, getNamespace, getNamespace, getNamespacePrefix, getNamespaceURI, getQualifiedName, getText, getTextNormalize, getTextTrim, getValue, indexOf, isAncestor, isRootElement, removeAttribute, removeAttribute, removeAttribute, removeChild, removeChild, removeChildren, removeChildren, removeContent, removeContent, removeContent, removeContent, removeNamespaceDeclaration, setAttribute, setAttribute, setAttribute, setAttributes, setAttributes, setContent, setContent, setContent, setContent, setName, setNamespace, setText, toString
public IndexElement(java.lang.String name, org.jdom.Namespace namespace)
public IndexElement(java.lang.String name)
public IndexElement(java.lang.String name, java.lang.String uri)
public IndexElement(java.lang.String name, java.lang.String prefix, java.lang.String uri)
public IndexElement(java.lang.String tbname, java.lang.String ixname, java.util.HashMap newIndex, java.util.HashMap oldIndex) throws java.lang.Exception
buildFromHashMaps
.tbname
- The table nameixname
- The index namenewIndex
- The index from the new database.oldIndex
- The index from the old database.java.lang.Exception
buildFromHashMaps()
public java.lang.String getIndexName()
public java.util.List getIndexAttributes() throws java.lang.Exception
java.lang.Exception
public java.util.List getKeys() throws java.lang.Exception
java.lang.Exception
public java.lang.String[] getColNames() throws java.lang.Exception
java.lang.Exception
public java.util.ArrayList getAddSql(java.lang.String tbname, java.lang.String ixname, java.sql.Connection con, Util util, java.util.HashMap oldIndex) throws java.lang.Exception
Upgrade
.
This method outputs the Sql to update the customer's metadata
in preparation for running ConfigDB
.tbname
- The table name.ixname
- The index name.con
- The connection to the database being upgraded.util
- Reference to the Util class.oldIndex
- No longer used.java.lang.Exception
getNewIxname(java.lang.String)
,
addIndexCfg(java.lang.String, java.util.TreeMap)
,
getFormatValue(java.lang.String, java.lang.String)
public java.util.ArrayList getDropSql(java.lang.String tbname, java.lang.String ixname, java.sql.Connection con, Util util, java.util.HashMap oldIndex) throws java.lang.Exception
Upgrade
.
This method outputs the Sql to update the customer's metadata
in preparation for running ConfigDB
.tbname
- The table name.ixname
- The index name.con
- The connection to the database being upgraded.util
- Reference to the Util class.oldIndex
- The current attributes for the index, before being upgraded.java.lang.Exception
getNewIxname(java.lang.String)
,
addIndexCfg(java.lang.String, java.util.TreeMap)
,
getFormatValue(java.lang.String, java.lang.String)
public java.lang.String getStatus()
status
).
This will equal OLDONLY, NEWONLY,
or OLDANDNEW
to indicate
whether the index exists in the old database, the new database, or both.public java.lang.String getNewChanged()
newChanged
).public void setNewChanged(java.lang.String in)
newChanged
).
Possible values on the index are:
in
- The new value for changed.public java.lang.String getSequenceName(java.lang.String table, java.lang.String column) throws java.lang.Exception
table
- Name of the tablecolumn
- Name of the columnjava.lang.Exception
public java.util.HashMap toHashmap(java.util.HashMap oldMap) throws java.lang.Exception
getIndexMeta
.oldMap
- The HashMap representing the original values of the index metadata
from the customer's database, before applying the XML changes.
If this is a new index to be added, then this parameter will be null or empty.java.lang.Exception