Class ResultSet2FileSender

All Implemented Interfaces:
FrankElement, HasApplicationContext, HasName, HasPhysicalDestination, IBlockEnabledSender<QueryExecutionContext>, IConfigurable, IScopeProvider, ISender, ISenderWithParameters, IWithParameters, IXAEnabled, NameAware, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle

public class ResultSet2FileSender extends FixedQuerySender
QuerySender that writes each row in a ResultSet to a file.
Author:
Peter Leeuwenburgh
  • Field Details

    • eolArray

      protected byte[] eolArray
  • Constructor Details

    • ResultSet2FileSender

      public ResultSet2FileSender()
  • Method Details

    • configure

      public void configure() throws ConfigurationException
      Description copied from interface: IConfigurable
      Configure this component.

      In the case of a container, this will propagate the configure signal to all components that apply.

      Specified by:
      configure in interface IConfigurable
      Specified by:
      configure in interface ISender
      Overrides:
      configure in class FixedQuerySender
      Throws:
      ConfigurationException - in case it was not able to configure the component.
    • executeStatementSet

      protected SenderResult executeStatementSet(@Nonnull QueryExecutionContext queryExecutionContext, @Nonnull Message message, @Nonnull PipeLineSession session) throws SenderException
      Overrides:
      executeStatementSet in class AbstractJdbcQuerySender<QueryExecutionContext>
      Throws:
      SenderException
    • setStatusFieldType

      public void setStatusFieldType(String statusFieldType)
      type of the optional status field which is set after the row is written to the file: timestamp
    • setFilenameSessionKey

      public void setFilenameSessionKey(String filenameSessionKey)
      Key of session variable that contains the name of the file to use.
    • setAppend

      public void setAppend(boolean b)
      If set true and the file already exists, the resultset rows are written to the end of the file.
      Default value
      false
    • setMaxRecordsSessionKey

      public void setMaxRecordsSessionKey(String maxRecordsSessionKey)
      If set (and >=0), this session key contains the maximum number of records which are processed. If query contains a group field (3), then also following records with the same group field value as the last record are processed
    • getFilenameSessionKey

      public String getFilenameSessionKey()
    • getStatusFieldType

      public String getStatusFieldType()
    • isAppend

      public boolean isAppend()
    • getMaxRecordsSessionKey

      public String getMaxRecordsSessionKey()