Class DB_Sequence


  • public class DB_Sequence
    extends java.lang.Object
    Dblook implementation for SEQUENCEs.
    • Constructor Summary

      Constructors 
      Constructor Description
      DB_Sequence()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.lang.String createSequenceString​(java.lang.String fullName, java.lang.String dataTypeName, long startValue, long minimumValue, long maximumValue, long increment, java.lang.String cycleOption)
      Generate DDL for a specific sequence.
      static void doSequences​(java.sql.Connection conn)
      Generate the DDL for all sequences and output it via Logs.java.
      private static java.lang.String stripNotNull​(java.lang.String datatypeName)
      Strip the trailing NOT NULL off of the string representation of a datatype
      • Methods inherited from class java.lang.Object

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

      • DB_Sequence

        public DB_Sequence()
    • Method Detail

      • doSequences

        public static void doSequences​(java.sql.Connection conn)
                                throws java.sql.SQLException

        Generate the DDL for all sequences and output it via Logs.java.

        Parameters:
        conn - Connection to the source database.
        Throws:
        java.sql.SQLException
      • stripNotNull

        private static java.lang.String stripNotNull​(java.lang.String datatypeName)
        Strip the trailing NOT NULL off of the string representation of a datatype
      • createSequenceString

        private static java.lang.String createSequenceString​(java.lang.String fullName,
                                                             java.lang.String dataTypeName,
                                                             long startValue,
                                                             long minimumValue,
                                                             long maximumValue,
                                                             long increment,
                                                             java.lang.String cycleOption)
                                                      throws java.sql.SQLException

        Generate DDL for a specific sequence.

        Parameters:
        fullName - Fully qualified name of the sequence
        dataTypeName - Name of the datatype of the sequence
        startValue - First value to use in the range of the sequence
        minimumValue - Smallest value in the range
        maximumValue - Largest value in the range
        increment - Step size of the sequence
        cycleOption - CYCLE or NO CYCLE
        Returns:
        DDL for the current stored sequence
        Throws:
        java.sql.SQLException