psdi.configure

Class SysDataElementMAXVARTYPE

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, org.jdom2.NamespaceAware, org.jdom2.Parent, UpgConstants


    public class SysDataElementMAXVARTYPE
    extends SysDataElement
    implements UpgConstants
    Element to represent the MAXVARTYPE table in the XML file that is output by BuildUpgMetadata and input to Upgrade. This is an extension of psdi.configure.SysDataElement.

    SysDataElementMAXVARTYPE is instanciated by the following:

    • When reading XML (Upgrade), instanciated from ConfigXMLFactory, via Upgrade. The SysDataElementMAXVARTYPE method getSql returns sql statements for populating the MAXVARS table appropriately, after having run ConfigDB.

    Multisite functionality is handled by the presence or absence of siteid/orgid in the primary unique index.

    The default processing in SysDataElementMAXVARTYPE 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 table changed after 5.2, you will need a class psdi.configure.V520.SysDataElementMAXVARTYPE. The extension can then perform the processing needed to support the key structure conversion between specific releases.

    See Also:
    SysDataElement, psdi.upgrade.BuildUpgMetadata, psdi.upgrade.Upgrade, Serialized Form
    • Constructor Detail

      • SysDataElementMAXVARTYPE

        public SysDataElementMAXVARTYPE()
      • SysDataElementMAXVARTYPE

        public SysDataElementMAXVARTYPE(java.lang.String name)
      • SysDataElementMAXVARTYPE

        public SysDataElementMAXVARTYPE(java.lang.String name,
                                        org.jdom2.Namespace namespace)
      • SysDataElementMAXVARTYPE

        public SysDataElementMAXVARTYPE(java.lang.String name,
                                        java.lang.String uri)
      • SysDataElementMAXVARTYPE

        public SysDataElementMAXVARTYPE(java.lang.String name,
                                        java.lang.String prefix,
                                        java.lang.String uri)
      • SysDataElementMAXVARTYPE

        public SysDataElementMAXVARTYPE(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
        This constructor is used when creating a new Element for the purpose of writing out XML. It calls buildFromHashMaps.
        Parameters:
        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 the table. For SysDataElementSYNONYMDOMAIN this is null.
        Throws:
        java.lang.Exception
        See Also:
        SysDataElement.scanKeyCols(), SysDataElement.buildFromHashMaps()
    • Method Detail

      • insertRowExtension

        public java.util.ArrayList insertRowExtension(org.jdom2.Element row,
                                                      java.lang.String siteid,
                                                      java.lang.String orgid,
                                                      java.util.ArrayList list)
                                               throws java.lang.Exception
        This class is called from insertRow when reading XML.
        Overrides:
        insertRowExtension in class SysDataElement
        Parameters:
        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.
        Returns:
        The (potentially modified) list.
        Throws:
        java.lang.Exception
      • deleteRowExtension

        public java.util.ArrayList deleteRowExtension(org.jdom2.Element row,
                                                      java.util.ArrayList list)
        This class is called from deleteRow when reading XML.
        Overrides:
        deleteRowExtension in class SysDataElement
        Parameters:
        row - The XML element representing the deletion.
        list - The array of Sql statements which may already contain entries from deleteRow.
        Returns:
        The list of Sql statements.
        Throws:
        java.lang.Exception
      • updateRowExtension

        public java.util.ArrayList updateRowExtension(org.jdom2.Element row,
                                                      java.util.HashMap currentData,
                                                      java.lang.String siteid,
                                                      java.lang.String orgid,
                                                      java.util.ArrayList list)
                                               throws java.lang.Exception
        This class is called from updateRow when reading XML.
        Overrides:
        updateRowExtension in class SysDataElement
        Parameters:
        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.
        Returns:
        The (potentially modified) list.
        Throws:
        java.lang.Exception