Class JpaUpdatingOutboundEndpointSpec
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
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:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,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
PARSER, target
Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
logger
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, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
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
-