Package org.frankframework.jdbc
Class ResultSet2FileSender
java.lang.Object
org.frankframework.jdbc.JdbcFacade
org.frankframework.jdbc.AbstractJdbcSender<QueryExecutionContext>
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,ConfigurableLifecycle,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle
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
FieldsFields inherited from class org.frankframework.jdbc.AbstractJdbcQuerySender
UNP_END, UNP_STARTFields inherited from class org.frankframework.jdbc.AbstractJdbcSender
connection, paramListFields inherited from class org.frankframework.jdbc.JdbcFacade
logFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigure this component.protected SenderResultexecuteStatementSet(QueryExecutionContext queryExecutionContext, Message message, PipeLineSession session) voidsetAppend(boolean b) If settrueand the file already exists, the resultset rows are written to the end of the file.voidsetFilenameSessionKey(String filenameSessionKey) Key of session variable that contains the name of the file to use.voidsetMaxRecordsSessionKey(String maxRecordsSessionKey) If set (and >=0), this session key contains the maximum number of records which are processed.voidsetStatusFieldType(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, getQuery, openBlock, sendMessage, setBatchSize, setQueryMethods inherited from class org.frankframework.jdbc.AbstractJdbcQuerySender
adjustQueryAndParameterListForNamedParameters, buildDb2XMLWriter, closeConnectionForSendMessage, convertQuery, executeOtherQuery, executeOtherQuery, executePackageQuery, executeSelectQuery, executeUpdateBlobQuery, executeUpdateClobQuery, fillParamArray, getBatchSize, getCallWithRowIdReturned, getConnectionForSendMessage, getQueryExecutionContext, getResult, getResult, getReturnedColumns, getStatement, getUpdateStatementResult, prepareQuery, prepareQueryWithColumnsReturned, prepareQueryWithResultSet, setAvoidLocking, setBlobBase64Direction, setBlobCharset, setBlobColumn, setBlobsCompressed, setBlobSessionKey, setBlobSmartGet, setClobColumn, setClobSessionKey, setCloseOutputstreamOnExit, setColumnsReturned, setIncludeFieldDefinition, setLockRows, setLockWait, setMaxRows, setNullValue, setOutputFormat, setPackageContent, setPrettyPrint, setQueryType, setResultQuery, setRowIdSessionKey, setScalar, setScalarExtended, setSqlDialect, setStartRow, setStreamCharset, setSynchronous, setTrimSpaces, setUseNamedParams, startMethods inherited from class org.frankframework.jdbc.AbstractJdbcSender
addParameter, getConnection, getParameterList, sendMessage, setTimeout, stop, toStringMethods inherited from class org.frankframework.jdbc.JdbcFacade
getConnectionWithTimeout, getDatasource, getDatasourceName, getDbmsSupport, getLogPrefix, getPassword, getPhysicalDestinationName, isConnectionsArePooled, isRunning, isTransacted, setAuthAlias, setConnectionsArePooled, setDatasourceName, setDbmsSupportFactory, setName, setPassword, setTransacted, setUsernameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContextMethods inherited from interface org.frankframework.lifecycle.ConfigurableLifecycle
getPhase, isAutoStartup, isConfiguredMethods inherited from interface org.frankframework.core.FrankElement
addConfigWarningMethods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoaderMethods inherited from interface org.frankframework.core.ISender
isSynchronous, sendMessageOrThrowMethods inherited from interface org.frankframework.core.ISenderWithParameters
consumesSessionVariableMethods inherited from interface org.springframework.context.SmartLifecycle
stop
-
Field Details
-
eolArray
protected byte[] eolArray
-
-
Constructor Details
-
ResultSet2FileSender
public ResultSet2FileSender()
-
-
Method Details
-
configure
Description copied from interface:IConfigurableConfigure this component.configure()is called once at startup of the framework in the configure method of the owner of thisIConfigurable. Purpose of this method is to check whether the static configuration of the object is correct. As much as possible class-instantiating should take place in theconfigure(), to improve performance.In the case of a container, this will propagate the configure signal to all components that apply.
- Specified by:
configurein interfaceIConfigurable- Overrides:
configurein 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:
executeStatementSetin 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 settrueand 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. Ifquerycontains a group field (3), then also following records with the same group field value as the last record are processed
-