Package org.frankframework.jdbc
Class FixedQuerySender
java.lang.Object
org.frankframework.jdbc.JdbcFacade
org.frankframework.jdbc.AbstractJdbcSender<QueryExecutionContext>
org.frankframework.jdbc.AbstractJdbcQuerySender<QueryExecutionContext>
org.frankframework.jdbc.FixedQuerySender
- 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
- Direct Known Subclasses:
ResultSet2FileSender,StoredProcedureQuerySender
QuerySender that assumes a fixed query, possibly with attributes.
Example of a
XML result:
<result>
<fielddefinition>
<field name="FIELDNAME"
type="columnType"
columnDisplaySize=""
precision=""
scale=""
isCurrency=""
columnTypeName=""
columnClassName=""/>
<field ...../>
</fielddefinition>
<rowset>
<row number="1">
<field name="FIELDNAME">value</field>
<field name="FIELDNAME" null="true"></field>
<field name="FIELDNAME">value</field>
<field name="FIELDNAME">value</field>
</row>
</rowset>
</result>
See DB2XMLWriter for more information about the ResultSet!- 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_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 TypeMethodDescriptionvoidcloseBlock(QueryExecutionContext blockHandle, PipeLineSession session) close the resource that is opened byIBlockEnabledSender.openBlock(PipeLineSession).protected voidcloseStatementSet(QueryExecutionContext statementSet) voidConfigure this component.protected StringObtain 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) voidsetBatchSize(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.voidThe 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, 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
-
Constructor Details
-
FixedQuerySender
public FixedQuerySender()
-
-
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 classAbstractJdbcQuerySender<QueryExecutionContext>- Throws:
ConfigurationException- in case it was not able to configure the component.
-
getQuery
Description copied from class:AbstractJdbcQuerySenderObtain a query to be executed. Method-stub to be overridden in descender-classes.- Specified by:
getQueryin classAbstractJdbcQuerySender<QueryExecutionContext>
-
openBlock
public QueryExecutionContext openBlock(PipeLineSession session) throws SenderException, TimeoutException Description copied from interface:IBlockEnabledSenderopen a resource that can be used multiple times whenIBlockEnabledSender.sendMessage(Object, Message, PipeLineSession)is called.- Throws:
SenderExceptionTimeoutException
-
closeBlock
Description copied from interface:IBlockEnabledSenderclose 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:
closeStatementSetin classAbstractJdbcQuerySender<QueryExecutionContext>
-
sendMessage
public SenderResult sendMessage(QueryExecutionContext blockHandle, Message message, PipeLineSession session) throws SenderException, TimeoutException - Throws:
SenderExceptionTimeoutException
-
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
-