com.ibm.tivoli.maximo.dbmanage.statement

Class MaxAttrInsert

  • java.lang.Object
    • com.ibm.tivoli.maximo.dbmanage.statement.MaxAttrInsert


  • public class MaxAttrInsert
    extends java.lang.Object
    Special handling class for inserts into the MaxAttribute table, in order to have the same MaxAttributeID on both tables. The insert into MaxAttributeCFG will have the form of:
    insert into maxattributecfg (..., changed, maxattributeid)
    select ...., 'N', maxattributeid from maxattribute where objectname = '' and attributename = '' ;
      • Constructor Summary

        Constructors 
        Constructor and Description
        MaxAttrInsert(java.sql.Connection dc)
        Constructor
      • Method Summary

        All Methods Instance Methods Concrete Methods 
        Modifier and Type Method and Description
        void addColumnStringValue(java.lang.String column, java.lang.String value)
        Add a column and a string value to insert into that column.
        void addColumnValue(java.lang.String column, java.lang.Object value)
        Add a column and a value to insert into that column.
        void addWhere(java.lang.String generateWhereSql)
        Add a where clause when inserting into MaxAttribute based on other columns in MaxAttribute.
        void execute()
        Perform the inserts into MaxAttribute & MaxAttributeCFG
        void startInsertSelect()
        Setup to insert ...
        • Methods inherited from class java.lang.Object

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

        • MaxAttrInsert

          public MaxAttrInsert(java.sql.Connection dc)
                        throws java.sql.SQLException
          Constructor
          Throws:
          java.sql.SQLException
      • Method Detail

        • execute

          public void execute()
                       throws java.sql.SQLException
          Perform the inserts into MaxAttribute & MaxAttributeCFG
          Throws:
          java.sql.SQLException
        • addColumnStringValue

          public void addColumnStringValue(java.lang.String column,
                                           java.lang.String value)
          Add a column and a string value to insert into that column. The value will be formatted with single quotes.
        • addColumnValue

          public void addColumnValue(java.lang.String column,
                                     java.lang.Object value)
          Add a column and a value to insert into that column.
        • addWhere

          public void addWhere(java.lang.String generateWhereSql)
          Add a where clause when inserting into MaxAttribute based on other columns in MaxAttribute.
        • startInsertSelect

          public void startInsertSelect()
                                 throws java.sql.SQLException
          Setup to insert ... select, using the data from MaxAttribute, with each column in the table set to itself. i.e.
          insert into xtable (x, y, z) select x, y, z from xtable
          Throws:
          java.sql.SQLException