Package org.frankframework.jdbc
Class DirectQuerySender
java.lang.Object
org.frankframework.jndi.JndiBase
org.frankframework.jdbc.JdbcFacade
org.frankframework.jdbc.AbstractJdbcSender<H>
org.frankframework.jdbc.AbstractJdbcQuerySender<Connection>
org.frankframework.jdbc.DirectQuerySender
- All Implemented Interfaces:
AdapterAware
,HasPhysicalDestination
,IBlockEnabledSender<Connection>
,IConfigurable
,IConfigurationAware
,INamedObject
,IScopeProvider
,ISender
,ISenderWithParameters
,IWithParameters
,IXAEnabled
,HasStatistics
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
JdbcIteratingPipeBase.MixedQuerySender
,XmlQuerySender
QuerySender that interprets the input message as a query, possibly with attributes.
Messages are expected to contain sql-text.
- 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
(Connection connection, PipeLineSession session) close the resource that is opened byIBlockEnabledSender.openBlock(PipeLineSession)
.protected void
closeConnectionForSendMessage
(Connection connection, PipeLineSession session) void
configure()
is called once at startup of the framework in the configure method of the owner of this sender.void
configure
(boolean ignoreSQLInjectionWarning) void
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.protected QueryExecutionContext
prepareStatementSet
(Connection connection, Message message) sendMessage
(Connection connection, Message message, PipeLineSession session) Methods inherited from class org.frankframework.jdbc.AbstractJdbcQuerySender
adjustQueryAndParameterListForNamedParameters, buildDb2XMLWriter, closeStatementSet, convertQuery, executeOtherQuery, executeOtherQuery, executePackageQuery, executeSelectQuery, executeStatementSet, executeUpdateBlobQuery, executeUpdateClobQuery, fillParamArray, getBatchSize, 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
-
DirectQuerySender
public DirectQuerySender()
-
-
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<Connection>
- Throws:
ConfigurationException
-
configure
- Throws:
ConfigurationException
-
configure
- 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<Connection>
- Throws:
SenderException
-
openBlock
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.- Throws:
SenderException
-
closeConnectionForSendMessage
- Overrides:
closeConnectionForSendMessage
in classAbstractJdbcQuerySender<Connection>
-
sendMessage
public SenderResult sendMessage(Connection connection, Message message, PipeLineSession session) throws SenderException, TimeoutException - Throws:
SenderException
TimeoutException
-
prepareStatementSet
protected QueryExecutionContext prepareStatementSet(Connection connection, Message message) throws SenderException - Throws:
SenderException
-