Class AbstractDataWriter

java.lang.Object
de.businesscode.bcdui.wrs.load.AbstractDataWriter
All Implemented Interfaces:
IDataWriter
Direct Known Subclasses:
CsvDataWriter, SylkDataWriter, VFSDataWriter, WrsDataWriter

public abstract class AbstractDataWriter extends Object implements IDataWriter
An abstract writer-implementation - contains helper getters for all writer parameters
  • Field Details

    • rowCounter

      protected int rowCounter
  • Constructor Details

    • AbstractDataWriter

      public AbstractDataWriter()
      AbstractDataWriter
  • Method Details

    • write

      protected abstract void write() throws Exception
      replace the write method from interface
      Throws:
      Exception
    • write

      public final void write(IRequestOptions options, ISqlGenerator generator, ResultSet resultSet, long duration) throws Exception
      Description copied from interface: IDataWriter
      Write the result-set and (possible) input option
      Specified by:
      write in interface IDataWriter
      Parameters:
      options - - the options used for ths request
      generator - - the generator used for the request
      resultSet - - data to write out. Can be null if generator was empty
      duration - - the database execution duration in MS
      Throws:
      Exception
      See Also:
    • getOptions

      protected final IRequestOptions getOptions()
      Returns:
      the options
    • getGenerator

      protected final ISqlGenerator getGenerator()
      Returns:
      the generator
    • getResultSet

      protected final ResultSet getResultSet()
      Returns:
      the resultSet
    • getDuration

      protected final long getDuration()
      Returns:
      the execution duration
    • getRowCount

      public int getRowCount()
      Number of rows written
      Specified by:
      getRowCount in interface IDataWriter
      Returns:
      The number of rows written with last write
    • getColumnsCount

      public final int getColumnsCount()
      Specified by:
      getColumnsCount in interface IDataWriter
      Returns:
      The number of columns written with last write.
      See Also:
    • getResultSetMetaData

      protected final ResultSetMetaData getResultSetMetaData()
      Returns:
      the resultSetMetaData
    • isEscapeXMLType

      protected boolean isEscapeXMLType(int colNo)
      isXMLType
      Parameters:
      colNo -
      Returns:
      true if colNo should be XML escaped
    • setEscapeXMLType

      protected void setEscapeXMLType(int colNo, boolean isXMLType)
      setXMLType
      Parameters:
      colNo -
      isXMLType -
    • getRequestDocRoot

      protected final Element getRequestDocRoot()
      getRequestDocRoot
      Returns:
      the request-doc root