Class SYSTRIGGERSRowFactory


  • public class SYSTRIGGERSRowFactory
    extends CatalogRowFactory
    Factory for creating a SYSTRIGGERS row.
    Version:
    0.1
    • Field Detail

      • SYSTRIGGERS_TRIGGERNAME

        public static final int SYSTRIGGERS_TRIGGERNAME
        See Also:
        Constant Field Values
      • SYSTRIGGERS_CREATIONTIMESTAMP

        public static final int SYSTRIGGERS_CREATIONTIMESTAMP
        See Also:
        Constant Field Values
      • SYSTRIGGERS_ACTIONSTMTID

        public static final int SYSTRIGGERS_ACTIONSTMTID
        See Also:
        Constant Field Values
      • SYSTRIGGERS_REFERENCEDCOLUMNS

        public static final int SYSTRIGGERS_REFERENCEDCOLUMNS
        See Also:
        Constant Field Values
      • SYSTRIGGERS_TRIGGERDEFINITION

        public static final int SYSTRIGGERS_TRIGGERDEFINITION
        See Also:
        Constant Field Values
      • SYSTRIGGERS_REFERENCINGOLD

        public static final int SYSTRIGGERS_REFERENCINGOLD
        See Also:
        Constant Field Values
      • SYSTRIGGERS_REFERENCINGNEW

        public static final int SYSTRIGGERS_REFERENCINGNEW
        See Also:
        Constant Field Values
      • SYSTRIGGERS_OLDREFERENCINGNAME

        public static final int SYSTRIGGERS_OLDREFERENCINGNAME
        See Also:
        Constant Field Values
      • SYSTRIGGERS_NEWREFERENCINGNAME

        public static final int SYSTRIGGERS_NEWREFERENCINGNAME
        See Also:
        Constant Field Values
      • SYSTRIGGERS_WHENCLAUSETEXT

        public static final int SYSTRIGGERS_WHENCLAUSETEXT
        See Also:
        Constant Field Values
      • SYSTRIGGERS_COLUMN_COUNT

        public static final int SYSTRIGGERS_COLUMN_COUNT
        See Also:
        Constant Field Values
      • indexColumnPositions

        private static final int[][] indexColumnPositions
      • uniqueness

        private static final boolean[] uniqueness
      • uuids

        private static final java.lang.String[] uuids
      • UTC

        private static final java.util.TimeZone UTC
        TimeZone object representing Coordinated Universal Time.
    • Method Detail

      • makeEmptyRowForCurrentVersion

        public ExecRow makeEmptyRowForCurrentVersion()
                                              throws StandardException
        Description copied from class: CatalogRowFactory

        Create an empty row for this conglomerate, in the format that would be used in a database that was created with, or hard upgraded to, the currently running version. That is, even if the database is only soft-upgraded, this method should return a row in the new format.

        This method is for use in code that creates the catalogs, or that upgrades the format of the catalogs to the newest version. Other code should call CatalogRowFactory.makeEmptyRow(), which returns a row in the format used in the old database version if the database is soft-upgraded.

        Overrides:
        makeEmptyRowForCurrentVersion in class CatalogRowFactory
        Returns:
        an empty row
        Throws:
        StandardException - if an error happens when creating the row
      • makeRow

        private ExecRow makeRow​(TupleDescriptor td,
                                int columnCount)
                         throws StandardException
        Helper method that contains common logic for makeRow() and makeEmptyRowForCurrentVersion(). Creates a row for the SYSTRIGGERS conglomerate.
        Parameters:
        td - the TriggerDescriptor to create a row from (can be null if the returned row should be empty)
        columnCount - the number of columns in the returned row (used for trimming off columns in soft upgrade mode to match the format in the old dictionary version)
        Returns:
        a row for the SYSTRIGGERS conglomerate
        Throws:
        StandardException - if an error happens when creating the row
      • getCalendarForCreationTimestamp

        private java.util.Calendar getCalendarForCreationTimestamp()
                                                            throws StandardException
        Get a calendar instance with the correct time zone for storing and retrieving creation timestamps. Creation timestamps are stored in UTC to avoid ambiguities around the change from daylight saving time to standard time, or other time zone changes. If the data dictionary version is less than 10.11, however, the timestamps are stored in the local time zone.
        Returns:
        a calendar instance that can be used for storing and retrieving trigger creation timestamps
        Throws:
        StandardException - if an error occurs
      • buildColumnList

        public SystemColumn[] buildColumnList()
                                       throws StandardException
        Builds a list of columns suitable for creating this Catalog. The last column, the serialized statement, is not added to the column list. This is done deliberately to make it a 'hidden' column -- one that is not visible to customers, but is visible to the system.
        Specified by:
        buildColumnList in class CatalogRowFactory
        Returns:
        array of SystemColumn suitable for making this catalog.
        Throws:
        StandardException