Class JpaUpdatingOutboundEndpointSpec
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<S,H>
org.springframework.integration.dsl.MessageHandlerSpec<S,JpaOutboundGateway>
org.springframework.integration.jpa.dsl.JpaBaseOutboundEndpointSpec<JpaUpdatingOutboundEndpointSpec>
org.springframework.integration.jpa.dsl.JpaUpdatingOutboundEndpointSpec
- All Implemented Interfaces:
DisposableBean
,FactoryBean<JpaOutboundGateway>
,InitializingBean
,Lifecycle
,Phased
,SmartLifecycle
,ComponentsRegistration
public class JpaUpdatingOutboundEndpointSpec
extends JpaBaseOutboundEndpointSpec<JpaUpdatingOutboundEndpointSpec>
A
JpaBaseOutboundEndpointSpec
extension for the updating
JpaOutboundGateway
mode.
The outbound-channel-adapter
is achievable through an internal producesReply
option.- Since:
- 5.0
- Author:
- Artem Bilan
-
Field Summary
Fields inherited from class org.springframework.integration.jpa.dsl.JpaBaseOutboundEndpointSpec
jpaExecutor
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
logger, PARSER, target
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclearOnFlush
(boolean clearOnFlush) If set totrue
theEntityManager.clear()
will be called, and only if theEntityManager.flush()
was called after performing persistence operations.flush
(boolean flush) If set totrue
theEntityManager.flush()
will be called after persistence operation.flushSize
(int flushSize) If the provided value is greater than0
, thenEntityManager.flush()
will be called after persistence operations as well as within batch operations.persistMode
(PersistMode persistMode) Specify aPersistMode
for the gateway.protected JpaUpdatingOutboundEndpointSpec
producesReply
(boolean producesReply) Methods inherited from class org.springframework.integration.jpa.dsl.JpaBaseOutboundEndpointSpec
entityClass, getComponentsToRegister, jpaQuery, namedQuery, nativeQuery, parameter, parameter, parameter, parameterExpression, parameterExpression, parameterSourceFactory, usePayloadAsParameterSource
Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, afterPropertiesSet, destroy, doGet, getId, getObject, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.beans.factory.FactoryBean
isSingleton
-
Constructor Details
-
JpaUpdatingOutboundEndpointSpec
-
-
Method Details
-
producesReply
-
persistMode
Specify aPersistMode
for the gateway. Defaults toPersistMode.MERGE
.- Parameters:
persistMode
- thePersistMode
to use.- Returns:
- the spec
-
flush
If set totrue
theEntityManager.flush()
will be called after persistence operation. Has the same effect, if theflushSize(int)
is specified to1
. For convenience in cases when the provided entity to persist is not an instance ofIterable
.- Parameters:
flush
- defaults tofalse
.- Returns:
- the spec
-
flushSize
If the provided value is greater than0
, thenEntityManager.flush()
will be called after persistence operations as well as within batch operations. This property has precedence over theflush(boolean)
, if it is specified to a value greater than0
. If the entity to persist is not an instance ofIterable
and this property is greater than0
, then the entity will be flushed as if theflush(boolean)
attribute was set totrue
.- Parameters:
flushSize
- defaults to0
.- Returns:
- the spec
-
clearOnFlush
If set totrue
theEntityManager.clear()
will be called, and only if theEntityManager.flush()
was called after performing persistence operations.- Parameters:
clearOnFlush
- defaults tofalse
.- Returns:
- the spec
-