Defines a Polling Channel Adapter for the
'org.springframework.integration.jpa.inbound.JpaPollingChannelAdapter'
that poll data from the database via JPA specification.
specifies the parameter source that would be used to
provide additional parameters.
Configures a Consumer Endpoint for the
'org.springframework.integration.jpa.outbound.JpaOutboundGatewayFactoryBean' (one-way)
updating a database using the Java Persistence API (JPA).
Reference to a ParameterSourceFactory.
Mutually exclusive with the 'parameter' sub-element(s).
Channel from which messages will be output.
When a message is sent to this channel it will
cause the query
to be executed.
Specifies the order for invocation when this endpoint is connected as a
subscriber to a SubscribableChannel.
Configures a Consumer Endpoint for the
'org.springframework.integration.jpa.outbound.JpaOutboundGatewayFactoryBean'
to update a database using JPA and produce the updating results.
Configures a Consumer Endpoint for the
'org.springframework.integration.jpa.outbound.JpaOutboundGatewayFactoryBean'
to read database via JPA.
The attribute that is used to set the first result marker while executing the
results. A negative value will retrieve from first record in the result set.
It is a way for the application to use the gateway to paginate the results in
combination with the max-results attribute. This attribute is mutually
exclusive to first-result-expression attribute
The attribute that is used to set the first result expression that would
be evaluated to get the first record while executing the JPA query for result
A negative value will retrieve from first record in the result set.
It is a way for the application to use the gateway to paginate the results in
combination with the max-results attribute. This attribute is mutually
exclusive to first-result attribute
A SpEL expression to determine the 'primaryKey' value for
'EntityManager.find(Class entityClass, Object primaryKey)' using
the request Message as the root object of evaluation context.
The 'entityClass' argument is determined from the 'entity-class' attribute,
if present, otherwise the 'payload' class is used. All other attributes
(except 'delete-after-poll' and 'flush-after-delete') are disallowed
when specifying an 'id-expression'.
The receiving Message Channel of this endpoint.
Message Channel to which replies should be
sent, after receiving the database response.
The parameter source factory that would be used for evaluating the
parameters of the response JPA QL that would be evaluated JPA outbound gateway.
Mutually exclusive with the 'parameter' sub-element(s).
Specifies the order for invocation when this endpoint is connected as a
subscriber to a SubscribableChannel.
Specifies whether this outbound gateway must return a non-null value. This value is
'true' by default, and a ReplyRequiredException will be thrown when
the underlying service returns a null value.
Specifies whether EntityManager.flush() should be called after performing persistence operations.
If 'flush-size' is configured to a value greater than '0' this attribute will be ignored.
Defaults to 'false'.
Specifies the number of entities after which to call EntityManager.flush()
when performing persistence operations.
This attribute is applicable for payload instances of "java.lang.Iterable".
Defaults to '0' - 'flush' won't be called.
This attribute has precedence over the 'flush' attribute,
if it is configured to a value greater than '0'.
If the entity to persist is not an instance of "java.lang.Iterable"
and 'flush-size' is greater than '0',
then the entity will be flushed as if the 'flush' attribute was set to 'true'.
Specifies whether EntityManager.clear() should be called after EntityManager.flush().
Applies only if 'flush-size > 0' or 'flush = true'.
Defaults to 'false'.
Specifies the maximum number of entities that shall be returned
by a JPA Operation. Using this attribute sets
the 'maxResults' property of the JPA Query object. This attribute is mutually
exclusive with 'max-results-expression' attribute.
Specifies the expression for the maximum number of entities that shall be returned
by a JPA Operation. Using this attribute sets
the 'maxResults' property of the JPA Query object. This attribute is mutually
exclusive with the 'max-results' attribute.
Once entities have been retrieved from the database, shall
they be removed from the database?
If instead of deleting the retrieved entities, you would
rather like to updated them, e.g. setting a flag in a
column marking the record as retrieved, please consider
using a subsequent Outbound Gateway (coupled with a payload enricher).
If you want to automatically remove retrieved entities from
the database you can also specify using the 'delete-in-batch'
attribute, whether the list of retrieved objects shall be
deleted on a 'per-object-basis (false) or whether the objects
shall be removed using a batch operation (true). The
attribute defaults to 'false'.
Specifies whether EntityManager.flush() should be called after performing 'deletes' for retrieved entities.
Applies only if 'delete-after-poll = true'.
Defaults to 'false'.
Identifies the underlying Spring bean definition, which is an
instance of either 'EventDrivenConsumer' or 'PollingConsumer',
depending on whether the component's input channel is a
'SubscribableChannel' or 'PollableChannel'.