Class UploadToRowCol

  • All Implemented Interfaces:
    IUploadStep

    public class UploadToRowCol
    extends java.lang.Object
    implements IUploadStep
    Base class for inserting a file available as BLOB column- and cell wise to bcd_dataupload_rowcol
    • Constructor Summary

      Constructors 
      Constructor Description
      UploadToRowCol​(UploadControl uc, java.lang.String userId)
      Open the file with the given uploaId, split it into columns and write it to bcd_dataupload_staging We remove any previous data for uploadId from bcd_dataupload_rowcol
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void endFile()
      Data fully parsed
      void endLine()
      Ends a line, adds possible missing trailing cells
      void nextCell​(java.lang.String value)
      Expects consecutive cells, null is allowed for value
      void process()
      Parse the file in blob an load it cell-wise to bcd_dataupload_rowcol
      void startLine()
      Starts a new line
      • Methods inherited from class java.lang.Object

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

      • STEP_ID

        public static java.lang.String STEP_ID
      • uploadId

        protected final java.lang.String uploadId
      • userId

        protected final java.lang.String userId
    • Constructor Detail

      • UploadToRowCol

        public UploadToRowCol​(UploadControl uc,
                              java.lang.String userId)
                       throws java.lang.Exception
        Open the file with the given uploaId, split it into columns and write it to bcd_dataupload_staging We remove any previous data for uploadId from bcd_dataupload_rowcol
        Parameters:
        uc - UploadControl
        Throws:
        java.lang.Exception
    • Method Detail

      • process

        public void process()
                     throws UploadException,
                            java.sql.SQLException
        Parse the file in blob an load it cell-wise to bcd_dataupload_rowcol
        Specified by:
        process in interface IUploadStep
        Throws:
        java.lang.Exception
        UploadException
        java.sql.SQLException
      • nextCell

        public void nextCell​(java.lang.String value)
                      throws java.sql.SQLException
        Expects consecutive cells, null is allowed for value
        Parameters:
        value -
        Throws:
        java.sql.SQLException
      • startLine

        public void startLine()
                       throws java.sql.SQLException
        Starts a new line
        Throws:
        java.sql.SQLException
      • endLine

        public void endLine()
                     throws java.lang.Exception
        Ends a line, adds possible missing trailing cells
        Throws:
        java.lang.Exception
      • endFile

        public void endFile()
                     throws java.lang.Exception
        Data fully parsed
        Throws:
        java.sql.SQLException
        java.lang.Exception