public class SysDataElement extends org.jdom.Element implements UpgConstants
org.jdom.Element
.
SysDataElement is instanciated by the following:
compareSystemData
.
The constructor will populate the SysDataElement object appropriately.
ConfigXMLFactory
, via
Upgrade
.
The SysDataElement method getSql
returns sql statements
for populating the data tables appropriately, after having run ConfigDB.
This class can be extended if special processing is required for any of these tables
(such as an override to the getSql
method).
If this is extended, the class name should be SysDataElement + tbname
so that ConfigXMLFactory can find the class -- for example, SysDataElementMYTABLE
.
If so named, the ConfigXMLFactory will find the appropriate class dynamically.
Otherwise, you must modify ConfigXMLFactory
.
This class contains some very minimal special processing for tables SIGOPTION, MAXAPPS,
MXCOLLAB, and MXCOLLABREF. If more extensive special processing is anticipated for any
table, it would be preferable to extend this class class specifically for that table.
The names of the tables processed by this class are
stored in SYSDATATABLES
.
Multisite functionality is handled by the presence or absence of siteid/orgid in the primary unique index.
The default processing in SysDataElement presumes that the columns in the primary unique
index have not changed from the old to the new database. If the index has changed, this class
will have to be extended, with the new instance residing in the subdirectory with the old
database name. For example, if the key to the MaxVars table has changed, you will need a
class psdi.configure.V520.SysDataElementMAXVARS
. The extension can then
perform the processing needed to support the key structure conversion between specific releases.
This class supports the following special codes during the Upgrade.
If any additional codes are supported in the future,
they should be documented here and in the UpgCodes file in PVCS.
Also see comments in BuildUpgMetadata
.
Table Name | Attribute Name | Description |
---|---|---|
SIGOPTION | optionvalue | When upgrading the SIGOPTION table,
if rows are being inserted, then NO rows are automatically inserted into ApplicationAuth.
If a different optionvalue is desired for these inserted rows, the value
can be specified in the UpgCodes XML file that is input to BuildUpgMetadata.
The value would be specified under SIGOPTION KEY, with attribute named "optionvalue".
For example:
|
psdi.configure.BuildUpgMetadata
,
psdi.configure.Upgrade
,
UpgConstants.SYSDATATABLES
,
Serialized FormModifier and Type | Field and Description |
---|---|
java.util.List |
codeElements
Used when creating XML, points to set of elements named
KEY from UpgCodes.xml for this table.
|
java.sql.Connection |
con
Database connection
|
java.lang.String[] |
doNotUpdateCols
Columns that should not be changed when a row is being updated.
|
java.util.TreeMap |
keyCols
The key columns in this table's unique index.
|
java.util.TreeMap |
newCol
The column metadata for this table, from the new database.
|
java.util.TreeMap |
newData
Data from this table from the "new" database.
|
java.util.TreeMap |
newDataOldKeys
Data from this table from the "new" database using old primary keys.
|
java.util.TreeMap |
oldCol
The column metadata for this table, from the old database.
|
java.util.TreeMap |
oldData
Data from this table from the "old" database.
|
boolean |
orgidKey
Equals True if orgid is in the primary unique key.
|
java.util.TreeMap |
orgs
Organizations on the database, from
getOrgs . |
boolean |
siteidKey
Equals True if siteid is in the primary unique key.
|
java.util.TreeMap |
sites
Sites on the database, from
getSites . |
java.lang.String |
sNo
The value indicating No for YORN attributes.
|
java.lang.String |
status
Value of the row's status attribute.
|
java.lang.String |
sYes
The value indicating Yes for YORN attributes.
|
java.lang.String |
tbname
The name of the table
|
Util |
util
Reference to the
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 |
---|
SysDataElement() |
SysDataElement(java.lang.String name) |
SysDataElement(java.lang.String name,
org.jdom.Namespace namespace) |
SysDataElement(java.lang.String name,
java.lang.String uri) |
SysDataElement(java.lang.String name,
java.lang.String prefix,
java.lang.String uri) |
SysDataElement(java.lang.String tbname,
java.util.TreeMap newCol,
java.util.TreeMap oldCol,
java.util.TreeMap newData,
java.util.TreeMap oldData,
java.util.TreeMap newDataOldKeys,
java.util.TreeMap keyCols,
java.io.File codefile)
This constructor is used when creating a new Element for the purpose
of writing out XML.
|
Modifier and Type | Method and Description |
---|---|
void |
addCodes(org.jdom.Element row,
java.lang.String key)
Get the element from UpgCodes.xml, add any special codes from the row header to this XML output.
|
org.jdom.Element |
addCodesExtension(org.jdom.Element row,
org.jdom.Element codeEl)
This class is called from
addCodes when generating XML. |
void |
addOneRow(java.lang.String key,
java.util.HashMap newVals)
When generating XML, and the column exists only in the new database, this method is used
to add its attributes.
|
void |
buildFromHashMaps()
When generating XML, given the TreeMaps
newData and oldData ,
build the elements needed to be output from BuildUpgMetadata. |
boolean |
canUpdateColumn(java.lang.String name)
Called from
compareRows
and updateRow to determine whether a particular
column should be identified in the XML output and can be updated during the Upgrade. |
java.util.ArrayList |
compareRows(org.jdom.Element row,
java.util.TreeMap colsColno)
When reading XML, this method determines what updates or inserts are needed.
|
void |
compareRows(java.lang.String key,
java.util.HashMap newVals,
java.util.HashMap oldVals)
When generating XML, and the key exists both the new and old database, this method is used
to compare and add its attributes to this SysDataElement, when the values are different.
|
java.util.ArrayList |
deleteRow(org.jdom.Element row)
When reading XML, and the row needs to be deleted from the customer's database,
return the sql statement for deleting the row.
|
java.util.ArrayList |
deleteRowExtension(org.jdom.Element row,
java.util.ArrayList list)
This class is called from
deleteRow when reading XML. |
boolean |
domainInUse(java.lang.String domainID)
Determine if a domain is referenced by any objects.
|
void |
executeQuery(java.lang.String sql) |
org.jdom.Element |
getAttribute(org.jdom.Element row,
java.lang.String attrName)
Get a particular attribute element for this ColumnElement.
|
java.util.ArrayList |
getChunkUpdates(org.jdom.Element row,
java.lang.String colName,
java.lang.String colValue,
int chunkSize)
Called from
insertRow when data exceeds a specified length. |
java.util.ArrayList |
getDeleteSql(java.lang.String tbname,
java.sql.Connection con,
Util util,
java.util.TreeMap oldCol,
java.util.TreeMap keyCols)
When reading XML, return a series of sql statements to update the customer's database.
|
java.util.List |
getKeys()
Get the keys for this SysDataElement.
|
long |
getMaxReserved(org.jdom.Element row)
Get the current highest value for the column referenced by this sequence.
|
int |
getNextVal(java.lang.String tableName,
java.lang.String columnName)
Get the next sequential value for a column.
|
java.lang.String |
getSequenceName(java.lang.String tableName,
java.lang.String columnName)
Get the name of the sequence that corresponds to this table and column.
|
java.util.ArrayList |
getSql(java.lang.String tbname,
java.sql.Connection con,
Util util,
java.util.TreeMap oldCol,
java.util.TreeMap keyCols)
When reading XML, return a series of sql statements to update the customer's database.
|
java.lang.String |
getStatus()
Get the value of the column's attribute value "status" (see
status ). |
java.lang.String |
getTableName()
Get the table name.
|
org.jdom.Element |
getUpgCodesElement(java.lang.String key)
Assuming the UpgCodes.xml file has been defined via
setUpgCodes ,
find the element that has the specified key value. |
java.lang.String |
getWhereClause(org.jdom.Element row,
boolean useSiteOrg,
java.lang.String siteid,
java.lang.String orgid)
When reading XML, generate the Where clause to use in a Sql statement (for delete or update).
|
boolean |
haveDup(org.jdom.Element checkEl)
When generating XML, before adding an element, check to see if we already have a duplicate.
|
void |
initSequence(java.lang.String tableName)
Initialize static variable uniqueValue.
|
java.util.ArrayList |
insertRow(org.jdom.Element row,
java.lang.String siteid,
java.lang.String orgid)
When reading XML, and the row needs to be added to the customer's database,
this method returns the Sql statement for inserting the row.
|
java.util.ArrayList |
insertRowExtension(org.jdom.Element row,
java.lang.String siteid,
java.lang.String orgid,
java.util.ArrayList list)
This class is called from
insertRow when reading XML. |
boolean |
isUniqueColumnID(java.lang.String columnName)
Detertmine if this column is the unique column id for the table.
|
void |
loadDoNotUpdateCols()
Called from the constructor and
getSql , this loads
doNotUpdateCols with
the appropriate value from UpgConstants . |
void |
removeOneRow(java.lang.String key,
java.util.HashMap oldVals)
When generating XML, and the column exists only in the old database, this method is used
to indicate its removal.
|
void |
scanKeyCols()
Determine whether the unique index to this table contains siteid and/or orgid.
|
void |
setKeyAttributes(org.jdom.Element row,
java.util.HashMap rowValues)
When generating XML, create attributes where name = column name and value = column value,
for each column in the primary unique index.
|
void |
setStatus(java.lang.String status)
Set value for the attribute "status" and assign that value to the
status variable. |
void |
setTableName(java.lang.String tableName)
Set value for the attribute "tbname" and assign that value to the
tbname variable. |
void |
setUpgCodes(java.io.File codefile)
When creating XML, this should be called to point to the file UpgCodes.xml,
where special codes can be retrieved.
|
java.util.ArrayList |
updateRow(org.jdom.Element row,
java.util.HashMap currentData,
java.lang.String siteid,
java.lang.String orgid)
When reading XML, and the row needs to be updated on the customer's database,
this method returns the Sql statement for updating the row.
|
java.util.ArrayList |
updateRowExtension(org.jdom.Element row,
java.util.HashMap currentData,
java.lang.String siteid,
java.lang.String orgid,
java.util.ArrayList list)
This class is called from
updateRow when reading XML. |
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 java.lang.String sYes
public java.lang.String sNo
public java.util.TreeMap newCol
BuildUpgMetadata
).
The format is from Util.getAttributeMeta(java.lang.String, boolean, boolean, boolean, boolean, boolean, java.lang.String)
.public java.util.TreeMap oldCol
BuildUpgMetadata
).
The format is from Util.getAttributeMeta(java.lang.String, boolean, boolean, boolean, boolean, boolean, java.lang.String)
.public java.util.TreeMap oldData
getData
.public java.util.TreeMap newData
getData
.public java.util.TreeMap newDataOldKeys
getData
.public java.util.TreeMap keyCols
getKeyColumns
.public java.lang.String tbname
public java.sql.Connection con
public java.lang.String status
public java.util.TreeMap sites
getSites
.
Used when upgrading tables that contain siteid.public java.util.TreeMap orgs
getOrgs
.
Used when upgrading tables that contain orgid.public boolean siteidKey
public boolean orgidKey
public java.lang.String[] doNotUpdateCols
UpgConstants
.
This is used in compareRows
and updateRow
.
It is not used when adding or deleting a row.public java.util.List codeElements
setUpgCodes
.public SysDataElement()
public SysDataElement(java.lang.String name, org.jdom.Namespace namespace)
public SysDataElement(java.lang.String name)
public SysDataElement(java.lang.String name, java.lang.String uri)
public SysDataElement(java.lang.String name, java.lang.String prefix, java.lang.String uri)
public SysDataElement(java.lang.String tbname, java.util.TreeMap newCol, java.util.TreeMap oldCol, java.util.TreeMap newData, java.util.TreeMap oldData, java.util.TreeMap newDataOldKeys, java.util.TreeMap keyCols, java.io.File codefile) throws java.lang.Exception
buildFromHashMaps
.tbname
- The name of the table.
See tbname
.newCol
- The column metadata on this table, from the new database.
See newCol
.oldCol
- The column metadata on this table, from the old database.
See oldCol
.newData
- The data from the new database.
See newData
.oldData
- The data from the old database.
See oldData
.keyCols
- Key columns for this table.
See keyCols
.codefile
- The file UpgCodes.xml that may contain special codes for rows in this table.
There is no error if this is null.java.lang.Exception
scanKeyCols()
,
loadDoNotUpdateCols()
,
setUpgCodes(java.io.File)
,
buildFromHashMaps()
public void loadDoNotUpdateCols() throws java.lang.Exception
getSql
, this loads
doNotUpdateCols
with
the appropriate value from UpgConstants
.java.lang.Exception
public java.lang.String getTableName()
public void setTableName(java.lang.String tableName)
tbname
variable.public void scanKeyCols()
public void buildFromHashMaps() throws java.lang.Exception
newData
and oldData
,
build the elements needed to be output from BuildUpgMetadata.java.lang.Exception
addOneRow(java.lang.String, java.util.HashMap)
,
removeOneRow(java.lang.String, java.util.HashMap)
,
compareRows(String, HashMap, HashMap)
public void addOneRow(java.lang.String key, java.util.HashMap newVals) throws java.lang.Exception
key
- The key to this row. Format is described in
getData
.newVals
- An entry from the newData
TreeMap, which specifies the
data for this row.java.lang.Exception
setKeyAttributes(org.jdom.Element, java.util.HashMap)
,
haveDup(org.jdom.Element)
,
addCodes(org.jdom.Element, java.lang.String)
public void removeOneRow(java.lang.String key, java.util.HashMap oldVals) throws java.lang.Exception
key
- The key of the row being removed. Columns are delimited by "|".
Format is described in getData
.oldVals
- An entry from the oldData
TreeMap, which specifies the
data for this row.java.lang.Exception
setKeyAttributes(org.jdom.Element, java.util.HashMap)
,
haveDup(org.jdom.Element)
public void compareRows(java.lang.String key, java.util.HashMap newVals, java.util.HashMap oldVals) throws java.lang.Exception
key
- The key of the row being compared. Columns are delimited by "|".
Format is described in getData
.newVals
- An entry from the newData
TreeMap, which specifies the
data for this row in the new database.oldVals
- An entry from the oldData
TreeMap, which specifies the
data for this row in the old database.java.lang.Exception
canUpdateColumn(java.lang.String)
,
setKeyAttributes(org.jdom.Element, java.util.HashMap)
,
haveDup(org.jdom.Element)
,
addCodes(org.jdom.Element, java.lang.String)
public void setKeyAttributes(org.jdom.Element row, java.util.HashMap rowValues) throws java.lang.Exception
keyCols
.row
- The Element representing a particular row in a table.rowValues
- The HashMap of the data values for this row.java.lang.Exception
public boolean haveDup(org.jdom.Element checkEl) throws java.lang.Exception
checkEl
- The element that we've constructed but not yet added.java.lang.Exception
public java.util.List getKeys() throws java.lang.Exception
getData
.
ATTRIBUTE
for each column on the table,
each containing the column name ("name"), value from new database ("new")
and/or value from old database ("old").
UpgCodes.xml
by the
BuildUpgMetadata
program.
java.lang.Exception
public org.jdom.Element getAttribute(org.jdom.Element row, java.lang.String attrName) throws java.lang.Exception
attrName
- The attribute name (case sensitive), for example COLUMNTITLE, DEFAULTVALUE, etc.java.lang.Exception
public java.util.ArrayList getSql(java.lang.String tbname, java.sql.Connection con, Util util, java.util.TreeMap oldCol, java.util.TreeMap keyCols) throws java.lang.Exception
If different update logic is needed for a particular table, this class can be extended and this method overridden.
tbname
- The table name.
See tbname
.con
- The connection to the database being upgraded.
See con
.util
- Reference to the Util class.
See util
.oldCol
- TreeMap of the data structure for the columns on this table (key = column name).
(This is retrieved AFTER ConfigDB may have updated the format.)
See oldCol
.keyCols
- The key columns for this table.
See keyCols
.java.lang.Exception
loadDoNotUpdateCols()
,
scanKeyCols()
,
compareRows(Element, TreeMap)
public java.util.ArrayList getDeleteSql(java.lang.String tbname, java.sql.Connection con, Util util, java.util.TreeMap oldCol, java.util.TreeMap keyCols) throws java.lang.Exception
If different update logic is needed for a particular table, this class can be extended and this method overridden.
tbname
- The table name.
See tbname
.con
- The connection to the database being upgraded.
See con
.util
- Reference to the Util class.
See util
.oldCol
- TreeMap of the data structure for the columns on this table (key = column name).
(This is retrieved AFTER ConfigDB may have updated the format.)
See oldCol
.keyCols
- The key columns for this table.
See keyCols
.java.lang.Exception
loadDoNotUpdateCols()
,
scanKeyCols()
,
deleteRow(org.jdom.Element)
public java.lang.String getWhereClause(org.jdom.Element row, boolean useSiteOrg, java.lang.String siteid, java.lang.String orgid) throws java.lang.Exception
keyCols
to identify the names of the key columns.row
- The Element representing a row in the database.useSiteOrg
- If the primary key includes siteid and/or orgid, and this param is True,
then the value or siteid/orgid will be included in the Where clause.
If this param is False, or the primary key does not contain siteid/orgid, then
the Where clause will not have any constraint for siteid/orgid.siteid
- If this is null, and the Where clause includes siteid, the method uses
the siteid from the row Element, otherwise it uses the value of this param.
If this equals the empty string (""), the Where clause will specify "siteid is null".orgid
- If this is null, and the Where clause includes orgid, the method uses
the orgid from the row Element, otherwise it uses the value of this param.
If this equals the empty string (""), the Where clause will specify "orgid is null".java.lang.Exception
public java.lang.String getStatus()
status
).
This will equal OLDONLY, NEWONLY,
or OLDANDNEW
to indicate
whether the column exists in the old database, the new database, or both.public void setStatus(java.lang.String status)
status
variable.public java.util.ArrayList compareRows(org.jdom.Element row, java.util.TreeMap colsColno) throws java.lang.Exception
getSql
.
Where siteid or orgid exists in the table's key, this method will loop through
the customer's sites/orgs and provide appropriate values, potentially generating
more than one sql statement per XML row.row
- The element from the input XML representing a row in this table.colsColno
- The metadata for the columns on this table, key = colno.java.lang.Exception
getWhereClause(org.jdom.Element, boolean, java.lang.String, java.lang.String)
,
Util.getData(java.lang.String, java.util.TreeMap, java.lang.String)
,
updateRow(org.jdom.Element, java.util.HashMap, java.lang.String, java.lang.String)
,
insertRow(org.jdom.Element, java.lang.String, java.lang.String)
public java.util.ArrayList deleteRow(org.jdom.Element row) throws java.lang.Exception
getSql
.
If this is SIGOPTION, also delete from APPLICATIONAUTH. If this is MXCOLLABREF, also delete from MXCOLLAB.
row
- The element from the input XML representing a row in this table.
This is an ArrayList so that extensions of this class can provide more than
one Sql statement if needed, e.g. for parent/child tables.java.lang.Exception
deleteRowExtension(org.jdom.Element, java.util.ArrayList)
public java.util.ArrayList deleteRowExtension(org.jdom.Element row, java.util.ArrayList list) throws java.lang.Exception
deleteRow
when reading XML.
It is a placeholder so that extensions of SysDataElement have a ready-made method in which
to code additional delete logic.
In SysDataElement, it does nothing.row
- The XML element representing the deletion.list
- The array of Sql statements which may already contain entries from
deleteRow
, and which may be modified here.java.lang.Exception
public java.util.ArrayList updateRow(org.jdom.Element row, java.util.HashMap currentData, java.lang.String siteid, java.lang.String orgid) throws java.lang.Exception
compareRows
.
If this is MXCOLLAB or APPLICATIONAUTH, does not do any updates. We do not want to change whatever value the customer may have specified for their default.
row
- The element from the input XML representing a row in this table.currentData
- The data currently on the customer's database (one row).siteid
- The siteid to use in the Where clause (if any).orgid
- The orgid to use in the Where clause (if any).java.lang.Exception
updateRowExtension(org.jdom.Element, java.util.HashMap, java.lang.String, java.lang.String, java.util.ArrayList)
,
canUpdateColumn(java.lang.String)
public boolean canUpdateColumn(java.lang.String name) throws java.lang.Exception
compareRows
and updateRow
to determine whether a particular
column should be identified in the XML output and can be updated during the Upgrade.
Uses doNotUpdateCols
array.name
- The column name to be evaluated.doNotUpdateCols
array.java.lang.Exception
public java.util.ArrayList updateRowExtension(org.jdom.Element row, java.util.HashMap currentData, java.lang.String siteid, java.lang.String orgid, java.util.ArrayList list) throws java.lang.Exception
updateRow
when reading XML.
It is a placeholder so that extensions of SysDataElement have a ready-made method in which
to code additional update logic.
In SysDataElement, it does nothing.row
- The XML element representing the update.currentData
- Current data for the row.siteid
- Site ID.orgid
- Org ID.list
- The array of Sql statements which may already contain entries from
updateRow
, and which may be modified here.java.lang.Exception
public java.util.ArrayList insertRow(org.jdom.Element row, java.lang.String siteid, java.lang.String orgid) throws java.lang.Exception
compareRows
.
If this is SIGOPTION, and an optionvalue is specified in UpgCodes.xml via
an "optionvalue" attribute
for this row, then insert into applicationauth. For example:
<
KEY key="PO|RUNREPORTS" optionvalue="1"
>
If not specified in UpgCodes, this method will use an optionvalue of 0.
row
- The element from the input XML representing a row in this table.siteid
- The siteid to use in the Insert statement (if any).orgid
- The orgid to use in the Insert statement (if any).java.lang.Exception
insertRowExtension(org.jdom.Element, java.lang.String, java.lang.String, java.util.ArrayList)
public java.util.ArrayList insertRowExtension(org.jdom.Element row, java.lang.String siteid, java.lang.String orgid, java.util.ArrayList list) throws java.lang.Exception
insertRow
when reading XML.
It is a placeholder so that extensions of SysDataElement have a ready-made method in which
to code additional insert logic.
In SysDataElement, it does nothing.row
- The XML element representing the insert.siteid
- Site ID.orgid
- Org ID.list
- The array of Sql statements which may already contain entries from
insertRow
, and which may be modified here.java.lang.Exception
public java.util.ArrayList getChunkUpdates(org.jdom.Element row, java.lang.String colName, java.lang.String colValue, int chunkSize) throws java.lang.Exception
insertRow
when data exceeds a specified length.
Sql statements will need to be broken up into an "insert" statement (from
the calling method) and a series of "update" statements that append to the db value.
This is a simplified version of getChunkUpdates
.row
- colName
- colValue
- The entire string to be stored in this table/column.chunkSize
- Size of each chunk. (Maximum size of total statement is 2500 for SQLPlus.)java.lang.Exception
public void setUpgCodes(java.io.File codefile) throws java.lang.Exception
codefile
- The file UpgCodes.xmljava.lang.Exception
public void addCodes(org.jdom.Element row, java.lang.String key) throws java.lang.Exception
row
- The XML element that will be eventually be output, which need special codes added here.key
- The "key" attribute value, representing the primary key to this table. This value
will be matched to UpgCodes.xml to find the appropriate code element.java.lang.Exception
getUpgCodesElement(java.lang.String)
,
addCodesExtension(org.jdom.Element, org.jdom.Element)
public org.jdom.Element addCodesExtension(org.jdom.Element row, org.jdom.Element codeEl) throws java.lang.Exception
addCodes
when generating XML.
It is a placeholder so that extensions of SysDataElement have a ready-made method in which
to code additional code-related (UpgCodes.xml) logic.
In SysDataElement, it does nothing.row
- The XML element that will be eventually be output, which need special codes added here.codeEl
- The XML element in the file UpgCodes.xml that may contain additional codes to be added.java.lang.Exception
public org.jdom.Element getUpgCodesElement(java.lang.String key) throws java.lang.Exception
setUpgCodes
,
find the element that has the specified key value. This element has the same basic format
as the element in MetaDoc.xml. Called from addCodes
.key
- The value of the "key" attribute.java.lang.Exception
public java.lang.String getSequenceName(java.lang.String tableName, java.lang.String columnName) throws java.lang.Exception
insertRow
to populate the unique column id.tableName
- Name of table for which we are seeking a sequence.columnName
- Name of the column that is populated by the sequence.null
.java.lang.Exception
isUniqueColumnID(java.lang.String)
public boolean isUniqueColumnID(java.lang.String columnName) throws java.lang.Exception
columnName
- the name of the columntrue
if the column is a unique column id.java.lang.Exception
getSequenceName(java.lang.String, java.lang.String)
public void initSequence(java.lang.String tableName) throws java.lang.Exception
tableName
- Name of the table that owns the sequence.java.lang.Exception
public long getMaxReserved(org.jdom.Element row) throws java.lang.Exception
row
- The element from the input XML representing a row in MaxSequencejava.lang.Exception
public boolean domainInUse(java.lang.String domainID) throws java.lang.Exception
domainID
- ID of the domain to seek.true
if the domain is referenced.java.lang.Exception
public int getNextVal(java.lang.String tableName, java.lang.String columnName) throws java.lang.Exception
tableName
- Name of the tablecolumnName
- Name of the columnjava.lang.Exception
public void executeQuery(java.lang.String sql) throws java.lang.Exception
java.lang.Exception