Package org.frankframework.jdbc
Class ResultSet2FileSender
java.lang.Object
org.frankframework.jndi.JndiBase
org.frankframework.jdbc.JdbcFacade
org.frankframework.jdbc.AbstractJdbcSender<H>
org.frankframework.jdbc.AbstractJdbcQuerySender<QueryExecutionContext>
org.frankframework.jdbc.FixedQuerySender
org.frankframework.jdbc.ResultSet2FileSender
- All Implemented Interfaces:
AdapterAware
,HasPhysicalDestination
,IBlockEnabledSender<QueryExecutionContext>
,IConfigurable
,IConfigurationAware
,INamedObject
,IScopeProvider
,ISender
,ISenderWithParameters
,IWithParameters
,IXAEnabled
,HasStatistics
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
QuerySender that writes each row in a ResultSet to a file.
- Author:
- Peter Leeuwenburgh
-
Nested Class Summary
Nested classes/interfaces inherited from class org.frankframework.jdbc.AbstractJdbcQuerySender
AbstractJdbcQuerySender.QueryType
-
Field Summary
Fields inherited from class org.frankframework.jdbc.AbstractJdbcQuerySender
UNP_END, UNP_START
Fields inherited from class org.frankframework.jdbc.AbstractJdbcSender
connection, paramList
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure()
is called once at startup of the framework in the configure method of the owner of this sender.protected SenderResult
executeStatementSet
(QueryExecutionContext queryExecutionContext, Message message, PipeLineSession session) boolean
isAppend()
void
setAppend
(boolean b) If settrue
and the file already exists, the resultset rows are written to the end of the file.void
setFilenameSessionKey
(String filenameSessionKey) Key of session variable that contains the name of the file to use.void
setMaxRecordsSessionKey
(String maxRecordsSessionKey) If set (and >=0), this session key contains the maximum number of records which are processed.void
setStatusFieldType
(String statusFieldType) type of the optional status field which is set after the row is written to the file: timestampMethods inherited from class org.frankframework.jdbc.FixedQuerySender
closeBlock, closeStatementSet, getBatchSize, getQuery, getQuery, openBlock, sendMessage, setBatchSize, setQuery
Methods inherited from class org.frankframework.jdbc.AbstractJdbcQuerySender
adjustQueryAndParameterListForNamedParameters, buildDb2XMLWriter, closeConnectionForSendMessage, convertQuery, executeOtherQuery, executeOtherQuery, executePackageQuery, executeSelectQuery, executeUpdateBlobQuery, executeUpdateClobQuery, fillParamArray, getBlobBase64Direction, getBlobCharset, getBlobColumn, getBlobSessionKey, getCallWithRowIdReturned, getClobColumn, getClobSessionKey, getColumnsReturned, getColumnsReturnedList, getConnectionForSendMessage, getLockWait, getMaxRows, getNullValue, getOutputFormat, getPackageContent, getQueryExecutionContext, getQueryType, getResult, getResult, getResult, getResultQuery, getReturnedColumns, getRowIdSessionKey, getSqlDialect, getStartRow, getStatement, getStreamCharset, getUpdateStatementResult, getUseNamedParams, isAvoidLocking, isBlobsCompressed, isBlobSmartGet, isCloseInputstreamOnExit, isCloseOutputstreamOnExit, isIncludeFieldDefinition, isLockRows, isPrettyPrint, isScalar, isScalarExtended, isStreamResultToServlet, isSynchronous, isTrimSpaces, prepareQuery, prepareQueryWithColumnsReturned, prepareQueryWithResultSet, setAvoidLocking, setBlobBase64Direction, setBlobCharset, setBlobColumn, setBlobsCompressed, setBlobSessionKey, setBlobSmartGet, setClobColumn, setClobSessionKey, setCloseInputstreamOnExit, setCloseOutputstreamOnExit, setColumnsReturned, setIncludeFieldDefinition, setLockRows, setLockWait, setMaxRows, setNullValue, setOutputFormat, setPackageContent, setPrettyPrint, setQueryType, setResultQuery, setRowIdSessionKey, setScalar, setScalarExtended, setSqlDialect, setStartRow, setStreamCharset, setStreamResultToServlet, setSynchronous, setTrimSpaces, setUseNamedParams, start
Methods inherited from class org.frankframework.jdbc.AbstractJdbcSender
addParameter, getAdapter, getConnection, getParameterList, getTimeout, sendMessage, setAdapter, setConfigurationMetrics, setTimeout, stop, toString
Methods inherited from class org.frankframework.jdbc.JdbcFacade
getAuthAlias, getConnectionWithTimeout, getDatasource, getDataSourceFactory, getDatasourceInfo, getDatasourceName, getDbmsSupport, getDomain, getLogPrefix, getPassword, getPhysicalDestinationName, getUsername, isConnectionsArePooled, isTransacted, setAuthAlias, setConnectionsArePooled, setDataSourceFactory, setDatasourceName, setDbmsSupportFactory, setJmsRealm, setPassword, setTransacted, setUsername
Methods inherited from class org.frankframework.jndi.JndiBase
getApplicationContext, getAuthentication, getConfigurationClassLoader, getContext, getCredentials, getInitialContextFactoryName, getJmsRealmName, getJndiAuthAlias, getJndiContextPrefix, getJndiEnv, getJndiProperties, getName, getPrincipal, getProviderURL, getSecurityProtocol, getUrlPkgPrefixes, setApplicationContext, setAuthentication, setCredentials, setInitialContextFactoryName, setJndiAuthAlias, setJndiContextPrefix, setJndiProperties, setName, setPrincipal, setProviderURL, setSecurityProtocol, setUrlPkgPrefixes
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContext
Methods inherited from interface org.frankframework.core.IConfigurationAware
getApplicationContext, getName
Methods inherited from interface org.frankframework.core.INamedObject
getName, setName
Methods inherited from interface org.frankframework.core.IScopeProvider
getConfigurationClassLoader
Methods inherited from interface org.frankframework.core.ISender
sendMessageOrThrow
Methods inherited from interface org.frankframework.core.ISenderWithParameters
consumesSessionVariable
-
Field Details
-
eolArray
protected byte[] eolArray
-
-
Constructor Details
-
ResultSet2FileSender
public ResultSet2FileSender()
-
-
Method Details
-
configure
Description copied from interface:ISender
configure()
is called once at startup of the framework in the configure method of the owner of this sender. Purpose of this method is to check whether the static configuration of the sender is correct. As much as possible class-instantiating should take place in theconfigure()
oropen()
method, to improve performance.- Specified by:
configure
in interfaceIConfigurable
- Specified by:
configure
in interfaceISender
- Overrides:
configure
in classFixedQuerySender
- Throws:
ConfigurationException
-
executeStatementSet
protected SenderResult executeStatementSet(@Nonnull QueryExecutionContext queryExecutionContext, @Nonnull Message message, @Nonnull PipeLineSession session) throws SenderException - Overrides:
executeStatementSet
in classAbstractJdbcQuerySender<QueryExecutionContext>
- Throws:
SenderException
-
setStatusFieldType
type of the optional status field which is set after the row is written to the file: timestamp -
setFilenameSessionKey
Key of session variable that contains the name of the file to use. -
setAppend
public void setAppend(boolean b) If settrue
and the file already exists, the resultset rows are written to the end of the file.- Default value
- false
-
setMaxRecordsSessionKey
If set (and >=0), this session key contains the maximum number of records which are processed. Ifquery
contains a group field (3), then also following records with the same group field value as the last record are processed -
getFilenameSessionKey
-
getStatusFieldType
-
isAppend
public boolean isAppend() -
getMaxRecordsSessionKey
-