psdi.mbo

Class MaxSequence

  • java.lang.Object
    • psdi.mbo.MaxSequence


  • public class MaxSequence
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor and Description
      MaxSequence() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static long generateKey(java.sql.Connection con, java.lang.String tbName, java.lang.String name)
      Generates a unique key used by long description and workflow ID columns.
      static long getNextDb2Sequence(java.sql.Connection con, java.lang.String seqName)
      Returns the unique key for DB2 by executing a sql statement
      static long getNextSqlServerSequence(java.sql.Connection con, java.lang.String seqName)
      Returns the unique key for Sql Server by executing a sql statement
      static void reset()
      Reset msp = null so it will be rebuilt.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MaxSequence

        public MaxSequence()
    • Method Detail

      • generateKey

        public static long generateKey(java.sql.Connection con,
                                       java.lang.String tbName,
                                       java.lang.String name)
                                throws MXException
        Generates a unique key used by long description and workflow ID columns. If the database is Oracle, it returns the MAXSEQ sequence's next value. If not Oracle then the system system time on the SQLServer database server in milliseconds at the time of the first call is used as a seed for a counter. Each subsequent call adds one to the seed value.
        Parameters:
        con - - Database Connection
        tbName - - table name
        name - - Column name
        Returns:
        - unique key
        Throws:
        MXException
      • getNextSqlServerSequence

        public static long getNextSqlServerSequence(java.sql.Connection con,
                                                    java.lang.String seqName)
                                             throws MXException
        Returns the unique key for Sql Server by executing a sql statement
        Parameters:
        con - - Database Connection
        tbName - - table name
        name - - column name
        Returns:
        - unique key
        Throws:
        MXException
      • getNextDb2Sequence

        public static long getNextDb2Sequence(java.sql.Connection con,
                                              java.lang.String seqName)
                                       throws MXException
        Returns the unique key for DB2 by executing a sql statement
        Parameters:
        con - - Database Connection
        tbName - - table name
        name - - column name
        Returns:
        - unique key
        Throws:
        MXException
      • reset

        public static void reset()
                          throws MXException
        Reset msp = null so it will be rebuilt.
        Throws:
        MXException