Class 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
  • Constructor Details

    • JpaUpdatingOutboundEndpointSpec

      protected JpaUpdatingOutboundEndpointSpec(JpaExecutor jpaExecutor)
  • Method Details

    • producesReply

      protected JpaUpdatingOutboundEndpointSpec producesReply(boolean producesReply)
    • persistMode

      public JpaUpdatingOutboundEndpointSpec persistMode(PersistMode persistMode)
      Specify a PersistMode for the gateway. Defaults to PersistMode.MERGE.
      Parameters:
      persistMode - the PersistMode to use.
      Returns:
      the spec
    • flush

      public JpaUpdatingOutboundEndpointSpec flush(boolean flush)
      If set to true the EntityManager.flush() will be called after persistence operation. Has the same effect, if the flushSize(int) is specified to 1. For convenience in cases when the provided entity to persist is not an instance of Iterable.
      Parameters:
      flush - defaults to false.
      Returns:
      the spec
    • flushSize

      public JpaUpdatingOutboundEndpointSpec flushSize(int flushSize)
      If the provided value is greater than 0, then EntityManager.flush() will be called after persistence operations as well as within batch operations. This property has precedence over the flush(boolean), if it is specified to a value greater than 0. If the entity to persist is not an instance of Iterable and this property is greater than 0, then the entity will be flushed as if the flush(boolean) attribute was set to true.
      Parameters:
      flushSize - defaults to 0.
      Returns:
      the spec
    • clearOnFlush

      public JpaUpdatingOutboundEndpointSpec clearOnFlush(boolean clearOnFlush)
      If set to true the EntityManager.clear() will be called, and only if the EntityManager.flush() was called after performing persistence operations.
      Parameters:
      clearOnFlush - defaults to false.
      Returns:
      the spec