Package org.frankframework.jdbc
Class Result2LobWriterBase
java.lang.Object
org.frankframework.batch.AbstractResultHandler
org.frankframework.batch.ResultWriter
org.frankframework.jdbc.Result2LobWriterBase
- All Implemented Interfaces:
IResultHandler
,FrankElement
,HasApplicationContext
,HasName
,IConfigurable
,IScopeProvider
,IWithParameters
,NameAware
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
Result2BlobWriter
,Result2ClobWriter
public abstract class Result2LobWriterBase
extends ResultWriter
implements org.springframework.context.ApplicationContextAware
Baseclass for batch
resultHandler
that writes the transformed record to a LOB.- Since:
- 4.7
- Author:
- Gerrit van Brakel
- Parameters
- any parameters defined on the resultHandler will be applied to the SQL statement
-
Field Summary
FieldsFields inherited from class org.frankframework.batch.AbstractResultHandler
log, paramList
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
Configure this component.protected Writer
createWriter
(PipeLineSession session, String streamId) finalizeResult
(PipeLineSession session, String streamId, boolean error) Called when all records in the original file are handled.protected abstract Object
getLobHandle
(IDbmsSupport dbmsSupport, ResultSet rs) protected abstract Writer
getWriter
(IDbmsSupport dbmsSupport, Object lobHandle, ResultSet rs) void
open()
void
setDatasourceName
(String datasourceName) void
setJmsRealm
(String jmsRealmName) void
The SQL query textprotected abstract void
updateLob
(IDbmsSupport dbmsSupport, Object lobHandle, ResultSet rs) Methods inherited from class org.frankframework.batch.ResultWriter
closeBlock, closeDocument, closeRecordType, getWriter, handleResult, openBlock, openDocument, openRecordType, replacePattern, setBlockNamePattern, setOnCloseBlock, setOnCloseDocument, setOnOpenBlock, setOnOpenDocument, writeNewLine
Methods inherited from class org.frankframework.batch.AbstractResultHandler
addParameter, getParameterList, hasPrefix, isDefault, setBlockByRecordType, setDefault, setName, setPipe, setPrefix, setSuffix
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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.batch.IResultHandler
isBlockByRecordType
-
Field Details
-
openConnections
-
openResultSets
-
openLobHandles
-
querySender
-
-
Constructor Details
-
Result2LobWriterBase
public Result2LobWriterBase()
-
-
Method Details
-
configure
Description copied from interface:IConfigurable
Configure 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:
configure
in interfaceIConfigurable
- Overrides:
configure
in classAbstractResultHandler
- Throws:
ConfigurationException
- in case it was not able to configure the component.
-
open
- Specified by:
open
in interfaceIResultHandler
- Overrides:
open
in classAbstractResultHandler
- Throws:
SenderException
-
close
- Specified by:
close
in interfaceIResultHandler
- Overrides:
close
in classAbstractResultHandler
- Throws:
SenderException
-
getLobHandle
protected abstract Object getLobHandle(IDbmsSupport dbmsSupport, ResultSet rs) throws SenderException - Throws:
SenderException
-
getWriter
protected abstract Writer getWriter(IDbmsSupport dbmsSupport, Object lobHandle, ResultSet rs) throws SenderException - Throws:
SenderException
-
updateLob
protected abstract void updateLob(IDbmsSupport dbmsSupport, Object lobHandle, ResultSet rs) throws SenderException - Throws:
SenderException
-
createWriter
- Specified by:
createWriter
in classResultWriter
- Throws:
Exception
-
finalizeResult
public String finalizeResult(PipeLineSession session, String streamId, boolean error) throws Exception Description copied from interface:IResultHandler
Called when all records in the original file are handled.- Specified by:
finalizeResult
in interfaceIResultHandler
- Overrides:
finalizeResult
in classResultWriter
- Parameters:
session
- current PipeLineSessionstreamId
- identification of the original file/stream/message containing the untransformed records- Returns:
- the name or names of the output files
- Throws:
Exception
-
setQuery
The SQL query text -
setDatasourceName
-
getPhysicalDestinationName
-
setJmsRealm
-