Package com.adaptris.core.services.jdbc
Class JdbcIteratingDataCaptureServiceImpl
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.core.jdbc.JdbcService
-
- com.adaptris.core.services.jdbc.JdbcServiceWithParameters
-
- com.adaptris.core.services.jdbc.JdbcDataCaptureServiceImpl
-
- com.adaptris.core.services.jdbc.JdbcIteratingDataCaptureServiceImpl
-
- All Implemented Interfaces:
AdaptrisComponent
,ComponentLifecycle
,ComponentLifecycleExtension
,ConnectedService
,MessageEventGenerator
,Service
,StateManagedComponent
- Direct Known Subclasses:
JdbcBatchingDataCaptureService
,JdbcDataCaptureService
public abstract class JdbcIteratingDataCaptureServiceImpl extends JdbcDataCaptureServiceImpl
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.adaptris.core.services.jdbc.JdbcDataCaptureServiceImpl
JdbcDataCaptureServiceImpl.DatabaseActor
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.services.jdbc.JdbcDataCaptureServiceImpl
actor
-
Fields inherited from class com.adaptris.core.ServiceImp
log
-
-
Constructor Summary
Constructors Constructor Description JdbcIteratingDataCaptureServiceImpl()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
doService(AdaptrisMessage msg)
Apply the service to the message.protected abstract long
executeUpdate(java.sql.PreparedStatement insert)
protected abstract long
finishUpdate(java.sql.PreparedStatement insert)
java.lang.Boolean
getIterates()
Get the configured iteration flag.java.lang.String
getIterationXpath()
Get the configured iteration xpath.KeyValuePairSet
getNamespaceContext()
DocumentBuilderFactoryBuilder
getXmlDocumentFactoryConfig()
protected void
initJdbcService()
void
setIterates(java.lang.Boolean iterates)
Set the service to iterate on the given xpath.void
setIterationXpath(java.lang.String xpath)
An Xpath that can be iterated on.void
setNamespaceContext(KeyValuePairSet kvps)
Set the namespace context for resolving namespaces.void
setXmlDocumentFactoryConfig(DocumentBuilderFactoryBuilder xml)
-
Methods inherited from class com.adaptris.core.services.jdbc.JdbcDataCaptureServiceImpl
closeJdbcService, configureActor, getRowsUpdatedMetadataKey, getSaveReturnedKeys, getStatement, prepareService, saveKeys, saveReturnedKeys, setRowsUpdatedMetadataKey, setSaveReturnedKeys, setStatement, startService, stopService, updateMetadata
-
Methods inherited from class com.adaptris.core.services.jdbc.JdbcServiceWithParameters
addStatementParameter, getParameterApplicator, getStatementParameters, setParameterApplicator, setStatementParameters
-
Methods inherited from class com.adaptris.core.jdbc.JdbcService
applyTimeout, closeService, createStatement, getConnection, getConnection, getStatementTimeout, initService, prepare, prepareStatement, prepareStatement, setConnection, setStatementTimeout, start, stop
-
Methods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.AdaptrisComponent
getUniqueId
-
Methods inherited from interface com.adaptris.core.ComponentLifecycle
close, init
-
Methods inherited from interface com.adaptris.core.MessageEventGenerator
createName, createQualifier, isTrackingEndpoint
-
Methods inherited from interface com.adaptris.core.Service
continueOnFailure, isBranching, setUniqueId
-
Methods inherited from interface com.adaptris.core.StateManagedComponent
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentState
-
-
-
-
Method Detail
-
initJdbcService
protected void initJdbcService() throws CoreException
- Overrides:
initJdbcService
in classJdbcDataCaptureServiceImpl
- Throws:
CoreException
-
doService
public void doService(AdaptrisMessage msg) throws ServiceException
Description copied from interface:Service
Apply the service to the message.
- Parameters:
msg
- theAdaptrisMessage
to process- Throws:
ServiceException
- wrapping any underlyingException
s
-
executeUpdate
protected abstract long executeUpdate(java.sql.PreparedStatement insert) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
finishUpdate
protected abstract long finishUpdate(java.sql.PreparedStatement insert) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getNamespaceContext
public KeyValuePairSet getNamespaceContext()
- Returns:
- the namespaceContext
-
setNamespaceContext
public void setNamespaceContext(KeyValuePairSet kvps)
Set the namespace context for resolving namespaces.- The key is the namespace prefix
- The value is the namespace uri
- Parameters:
kvps
- the namespace context- See Also:
SimpleNamespaceContext.create(KeyValuePairSet)
-
getXmlDocumentFactoryConfig
public DocumentBuilderFactoryBuilder getXmlDocumentFactoryConfig()
-
setXmlDocumentFactoryConfig
public void setXmlDocumentFactoryConfig(DocumentBuilderFactoryBuilder xml)
-
setIterationXpath
public void setIterationXpath(java.lang.String xpath)
An Xpath that can be iterated on.
An Iteration Xpath defines some repeating element or value in the payload.
- Parameters:
xpath
- the xpath- See Also:
setIterates(Boolean)
-
getIterationXpath
public java.lang.String getIterationXpath()
Get the configured iteration xpath.- Returns:
- the xpath.
-
setIterates
public void setIterates(java.lang.Boolean iterates)
Set the service to iterate on the given xpath.
If set to true, then it is expected that there is a configured iteration xpath available for use. If this is not the case, then results are undefined, and depends on the underlying Xpath implementation
- Parameters:
iterates
- the flag.- See Also:
setIterationXpath(String)
-
getIterates
public java.lang.Boolean getIterates()
Get the configured iteration flag.- Returns:
- the flag.
-
-