com.ibm.tivoli.maximo.dbmanage.transform

Class SQLServerTransform

  • java.lang.Object
    • com.ibm.tivoli.maximo.dbmanage.transform.SQLServerTransform
    • Constructor Summary

      Constructors 
      Constructor and Description
      SQLServerTransform(java.sql.Connection con) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getSequenceNextValue(java.lang.String seqName)
      Get the next sequence value and update the maxsequence table.
      java.lang.String nextval(java.lang.String seqName) 
      boolean sequenceExists(java.lang.String seqName) 
      java.lang.String transform(java.lang.String sql)
      If given an insert with a *Seq.nextval value, this will figure out the value and replace it with the next sequence value.
      • Methods inherited from class java.lang.Object

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

      • SQLServerTransform

        public SQLServerTransform(java.sql.Connection con)
                           throws java.sql.SQLException
        Throws:
        java.sql.SQLException
    • Method Detail

      • transform

        public java.lang.String transform(java.lang.String sql)
                                   throws java.sql.SQLException
        If given an insert with a *Seq.nextval value, this will figure out the value and replace it with the next sequence value. The MaxSequence table will also be updated. Also, any sysdate will be replaced by getdate().
        Specified by:
        transform in interface SQLSpecificTransform
        Throws:
        MXException
        java.sql.SQLException
        See Also:
        psdi.dbmanage.connection.DatabaseConnection#doSql(java.lang.String)
      • getSequenceNextValue

        public java.lang.String getSequenceNextValue(java.lang.String seqName)
                                              throws java.sql.SQLException
        Get the next sequence value and update the maxsequence table.
        Parameters:
        seqName - the name of the sequence.
        Returns:
        The next value to use from the sequence.
        Throws:
        java.lang.Exception - If the sequence isn't found in MaxSequence, or a SQLException.
        java.sql.SQLException
      • nextval

        public java.lang.String nextval(java.lang.String seqName)
                                 throws java.sql.SQLException
        Specified by:
        nextval in interface SQLSpecificTransform
        Returns:
        Throws:
        java.sql.SQLException
      • sequenceExists

        public boolean sequenceExists(java.lang.String seqName)
                               throws java.sql.SQLException
        Throws:
        java.sql.SQLException