Class ExportAbstract

  • Direct Known Subclasses:
    Export

    abstract class ExportAbstract
    extends java.lang.Object

    • Field Detail

      • controlFileReader

        protected ControlInfo controlFileReader
      • con

        protected java.sql.Connection con
      • entityName

        protected java.lang.String entityName
      • schemaName

        protected java.lang.String schemaName
      • selectStatement

        protected java.lang.String selectStatement
      • lobsInExtFile

        protected boolean lobsInExtFile
    • Constructor Detail

      • ExportAbstract

        ExportAbstract()
    • Method Detail

      • resultSetForEntity

        protected java.sql.ResultSet resultSetForEntity()
                                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getOneRowAtATime

        private java.lang.String[] getOneRowAtATime​(java.sql.ResultSet rs,
                                                    boolean[] isLargeBinary,
                                                    boolean[] isLargeChar)
                                             throws java.lang.Exception
        convert resultset data for the current row to string array. If large objects are being exported to an external file, then write the lob data into the external file and store the lob data location in the string array for that column.
        Parameters:
        rs - resultset that contains the data to export.
        isLargeBinary - boolean array, whose elements will be true, if the column type is blob/or other large binary type, otherwise false.
        isLargeChar - boolean array, whose elements will be true, if the column type is clob/ other large char type, otherwise false.
        Returns:
        A string array of the row data to write to export file.
        Throws:
        java.lang.Exception - if any errors during conversion.
      • stringifyObject

        public static java.lang.String stringifyObject​(java.lang.Object udt)
                                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getControlFileReader

        protected ControlInfo getControlFileReader()
      • getExportWriteData

        protected abstract ExportWriteDataAbstract getExportWriteData()
                                                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • doAllTheWork

        protected void doAllTheWork()
                             throws java.lang.Exception
        Throws:
        java.lang.Exception