Class WrsDataWriter

java.lang.Object
de.businesscode.bcdui.wrs.load.AbstractDataWriter
de.businesscode.bcdui.wrs.load.WrsDataWriter
All Implemented Interfaces:
IDataWriter

public class WrsDataWriter extends AbstractDataWriter implements IDataWriter
The default implementation of the IDataWriter - write wrs-xml-format using xml-stream
Write an empty document if the resultSet is null.
Supports also the short refDataFormat.
  • Field Details

  • Constructor Details

    • WrsDataWriter

      public WrsDataWriter()
      WrsDataWriter. Create the writer without parameters - caller should overwrite the method getStream().
    • WrsDataWriter

      public WrsDataWriter(XMLStreamWriter writer)
      WrsDataWriter
      Parameters:
      writer -
  • Method Details

    • getWriter

      protected final XMLStreamWriter getWriter()
      Returns:
      the writer
    • getLazyStream

      protected Writer getLazyStream() throws Exception
      Returns:
      the output writer.
      The clients can overwrite this method like: return response.getWriter().
      This method called only once by lazy creation of the xml-writer (if it was not sets from constructor parameters.
      Throws:
      Exception
    • close

      public void close() throws Exception
      Description copied from interface: IDataWriter
      close the destination resource
      Specified by:
      close in interface IDataWriter
      Throws:
      Exception
      See Also:
    • write

      protected void write() throws Exception
      Description copied from class: AbstractDataWriter
      replace the write method from interface
      Specified by:
      write in class AbstractDataWriter
      Throws:
      Exception
      See Also:
    • writeEmptyDocument

      protected void writeEmptyDocument() throws Exception
      Write empty document if no data was requested
      Throws:
      XMLStreamException
      Exception
    • writeWrs

      protected void writeWrs() throws Exception
      writeWrs
      Throws:
      Exception
    • writeWrsRequest

      protected void writeWrsRequest() throws Exception
      Throws:
      Exception
    • writeWrsHeaderColumns

      protected void writeWrsHeaderColumns() throws Exception
      writeWrsHeaderColumns
      Throws:
      Exception
    • writeWrsHeaderDebug

      protected void writeWrsHeaderDebug() throws Exception
      writeWrsHeaderDebug
      Throws:
      Exception
    • writeWrsData

      protected void writeWrsData() throws Exception
      writeWrsData
      Throws:
      Exception
    • writeWrsDataRow

      protected void writeWrsDataRow(int rowNum) throws Exception
      writeWrsDataRow
      Parameters:
      rowNum -
      Throws:
      Exception
    • writeWrsDataRowAttributes

      protected void writeWrsDataRowAttributes(int rowNum) throws Exception
      writeWrsDataRowAttributes
      Parameters:
      rowNum -
      Throws:
      Exception
    • writeWrsDataRowColumn

      protected void writeWrsDataRowColumn(WrsBindingItem item) throws Exception
      writeWrsDataRowColumn
      Parameters:
      item - - binding item
      Throws:
      Exception
    • writeWrsDataRowColumnValue

      protected void writeWrsDataRowColumnValue(int jdbcColumnType, int colNum) throws Exception
      writeWrsDataRowColumnValue
      Parameters:
      jdbcColumnType -
      colNum - - starts with 1 (JDBC compliant)
      Throws:
      Exception
    • writeWrsDataRowColumnAttributes

      protected void writeWrsDataRowColumnAttributes(WrsBindingItem item) throws Exception
      Writes the attributes corresponding to wrs:A sub-nodes of a wrs:C Attributes are not written if their value was null
      Parameters:
      item -
      Throws:
      Exception
    • writeWrsErrorDuringQuery

      protected void writeWrsErrorDuringQuery() throws XMLStreamException
      Throws:
      XMLStreamException
    • writeWrsMaxRowsExceeded

      protected void writeWrsMaxRowsExceeded(int maxRows) throws XMLStreamException
      writeWrsMaxRowsExceeded
      Parameters:
      maxRows -
      Throws:
      XMLStreamException