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:
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
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 this component.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, getConnection, getParameterList, getTimeout, sendMessage, 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, isRunning, 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.HasApplicationContext
getApplicationContext, 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: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 interfaceIConfigurable
- Specified by:
configure
in interfaceISender
- Overrides:
configure
in classFixedQuerySender
- 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 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
-