Class DatabaseWriter


  • public class DatabaseWriter
    extends java.lang.Object
    The Class is a writer of WebRowSet document into database, supports auto detection of key columns by updating, it means if key columns are defined and in modifyRow the values from them are not modified - the key columns were ignored by setting values in SQL statement
    • Constructor Summary

      Constructors 
      Constructor Description
      DatabaseWriter​(BindingSet bindingSetPr, java.sql.Connection defaultConnectionPr, BindingItem[] columnsPr, java.lang.Integer[] columnTypesPr, java.util.Collection<java.lang.String> keyColumnNames, int maxBatchSizePr)
      Constructor
    • Constructor Detail

      • DatabaseWriter

        public DatabaseWriter​(BindingSet bindingSetPr,
                              java.sql.Connection defaultConnectionPr,
                              BindingItem[] columnsPr,
                              java.lang.Integer[] columnTypesPr,
                              java.util.Collection<java.lang.String> keyColumnNames,
                              int maxBatchSizePr)
                       throws java.sql.SQLException
        Constructor
        Parameters:
        bindingSetPr -
        defaultConnectionPr -
        columnsPr -
        columnTypesPr -
        keyColumnNames -
        maxBatchSizePr -
        Throws:
        java.sql.SQLException
        java.lang.IllegalArgumentException - if keyColumnNames does not contain all keys from bindingSetPr
    • Method Detail

      • updateColumnsAndTypes

        public void updateColumnsAndTypes​(BindingItem[] columnsPr,
                                          java.lang.Integer[] columnTypesPr)
      • finished

        public void finished()
                      throws java.sql.SQLException
        Throws:
        java.sql.SQLException