Package org.frankframework.jdbc
Class FixedQuerySender
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
- 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
- Direct Known Subclasses:
ResultSet2FileSender
,StoredProcedureQuerySender
QuerySender that assumes a fixed query, possibly with attributes.
- Since:
- 4.1
- Author:
- Gerrit van Brakel
- Parameters
- All parameters present are applied to the query to be executed.
-
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
closeBlock
(QueryExecutionContext blockHandle, PipeLineSession session) close the resource that is opened byIBlockEnabledSender.openBlock(PipeLineSession)
.protected void
closeStatementSet
(QueryExecutionContext statementSet) void
configure()
is called once at startup of the framework in the configure method of the owner of this sender.int
getQuery()
protected String
Obtain a query to be executed.openBlock
(PipeLineSession session) open a resource that can be used multiple times whenIBlockEnabledSender.sendMessage(Object, Message, PipeLineSession)
is called.sendMessage
(QueryExecutionContext blockHandle, Message message, PipeLineSession session) void
setBatchSize
(int batchSize) When set larger than 0 and used as a child of an IteratingPipe, then the database calls are made in batches of this size.void
The SQL query text to be executed each time sendMessage() is calledMethods inherited from class org.frankframework.jdbc.AbstractJdbcQuerySender
adjustQueryAndParameterListForNamedParameters, buildDb2XMLWriter, closeConnectionForSendMessage, convertQuery, executeOtherQuery, executeOtherQuery, executePackageQuery, executeSelectQuery, executeStatementSet, 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
-
Constructor Details
-
FixedQuerySender
public FixedQuerySender()
-
-
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 classAbstractJdbcQuerySender<QueryExecutionContext>
- Throws:
ConfigurationException
-
getQuery
Description copied from class:AbstractJdbcQuerySender
Obtain a query to be executed. Method-stub to be overridden in descender-classes.- Specified by:
getQuery
in classAbstractJdbcQuerySender<QueryExecutionContext>
-
openBlock
public QueryExecutionContext openBlock(PipeLineSession session) throws SenderException, TimeoutException Description copied from interface:IBlockEnabledSender
open a resource that can be used multiple times whenIBlockEnabledSender.sendMessage(Object, Message, PipeLineSession)
is called.- Throws:
SenderException
TimeoutException
-
closeBlock
Description copied from interface:IBlockEnabledSender
close the resource that is opened byIBlockEnabledSender.openBlock(PipeLineSession)
. It is important that this method is always called after processing with the blockHandle ends. It should effectively be called in a finally clause of a try around the openBlock. -
closeStatementSet
- Overrides:
closeStatementSet
in classAbstractJdbcQuerySender<QueryExecutionContext>
-
sendMessage
public SenderResult sendMessage(QueryExecutionContext blockHandle, Message message, PipeLineSession session) throws SenderException, TimeoutException - Throws:
SenderException
TimeoutException
-
setQuery
The SQL query text to be executed each time sendMessage() is called -
setBatchSize
public void setBatchSize(int batchSize) When set larger than 0 and used as a child of an IteratingPipe, then the database calls are made in batches of this size. Only for queryType=other.- Default value
- 0
-
getQuery
-
getBatchSize
public int getBatchSize()- Overrides:
getBatchSize
in classAbstractJdbcQuerySender<QueryExecutionContext>
-