Package adams.db

Class MultipleInsert

    • Field Detail

      • count

        protected int count
        inserts.
      • m_insert_at

        protected int m_insert_at
        force insert to db at count.
      • m_insert

        protected BulkInsertTable m_insert
        Table this is associated with.
      • m_cols

        protected List<String> m_cols
        columns for insert.
    • Constructor Detail

      • MultipleInsert

        public MultipleInsert​(int max)
        Constructor. Set max inserts before db insert
        Parameters:
        max - when to do actual insert
    • Method Detail

      • setTable

        public void setTable​(BulkInsertTable bti)
        Set the table associated with this insert manager
        Parameters:
        bti - table
      • setColumnVector

        public void setColumnVector​(List<String> sv)
        Set the columns used for insert
        Parameters:
        sv - column vector
      • insert

        public String insert​(Hashtable<String,​String> vals)
        Insert. Get values from hashtable
        Parameters:
        vals - Hashtable of ColumnName(string)->InsertValue(string)
        Returns:
        Insert string, if time to insert. Else null;
      • insertComplete

        public boolean insertComplete()
        Finalise insert. Insert any remaining rows to db
        Returns:
        success?
      • getInsertString

        public String getInsertString()
        Return an sql string for insert of current data
        Returns:
        insert string