public class JpaRetrievingOutboundGatewaySpec extends JpaBaseOutboundEndpointSpec<JpaRetrievingOutboundGatewaySpec>
JpaBaseOutboundEndpointSpec extension for the
JpaOutboundGateway with
OutboundGatewayType.RETRIEVING mode.jpaExecutorPARSER, targetloggerDEFAULT_PHASEOBJECT_TYPE_ATTRIBUTE| Modifier | Constructor and Description |
|---|---|
protected |
JpaRetrievingOutboundGatewaySpec(JpaExecutor jpaExecutor) |
| Modifier and Type | Method and Description |
|---|---|
JpaRetrievingOutboundGatewaySpec |
deleteAfterPoll(boolean deleteAfterPoll)
If set to
true, the retrieved objects are deleted from the database upon
being polled. |
JpaRetrievingOutboundGatewaySpec |
deleteInBatch(boolean deleteInBatch)
If not set, this property defaults to
false, which means that
deletion occurs on a per object basis if a collection of entities is being
deleted. |
JpaRetrievingOutboundGatewaySpec |
expectSingleResult(boolean expectSingleResult)
This parameter indicates that only one result object shall be returned as
a result from the executed JPA operation.
|
JpaRetrievingOutboundGatewaySpec |
firstResult(int firstResult)
Specify a first result in the query executed.
|
JpaRetrievingOutboundGatewaySpec |
firstResultExpression(Expression firstResultExpression)
Specify a SpEL expression that will be evaluated to get the first result in the query executed.
|
JpaRetrievingOutboundGatewaySpec |
firstResultExpression(String firstResultExpression)
Specify a SpEL expression that will be evaluated to get the first result in the query executed.
|
JpaRetrievingOutboundGatewaySpec |
flushAfterDelete(boolean flush)
If set to
true the EntityManager.flush() will be called
after persistence operation. |
JpaRetrievingOutboundGatewaySpec |
idExpression(Expression idExpression)
Specify a SpEL expression that will be evaluated to get the
primaryKey for
EntityManager.find(Class, Object) |
JpaRetrievingOutboundGatewaySpec |
idExpression(String idExpression)
Specify a SpEL expression that will be evaluated to get the
primaryKey for
EntityManager.find(Class, Object) |
JpaRetrievingOutboundGatewaySpec |
maxResults(int maxResults)
Set the maximum number of results expression.
|
JpaRetrievingOutboundGatewaySpec |
maxResultsExpression(Expression maxResultsExpression)
Specify a SpEL expression for maximum number of results expression.
|
JpaRetrievingOutboundGatewaySpec |
maxResultsExpression(String maxResultsExpression)
Specify a SpEL expression for maximum number of results expression.
|
entityClass, getComponentsToRegister, jpaQuery, namedQuery, nativeQuery, parameter, parameter, parameter, parameterExpression, parameterExpression, parameterSourceFactory, usePayloadAsParameterSource_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stopafterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingletonprotected JpaRetrievingOutboundGatewaySpec(JpaExecutor jpaExecutor)
public JpaRetrievingOutboundGatewaySpec expectSingleResult(boolean expectSingleResult)
true and
the result list from the JPA operations contains only 1 element, then that
1 element is extracted and returned as payload.expectSingleResult - true if a single object is expected.public JpaRetrievingOutboundGatewaySpec firstResult(int firstResult)
firstResult - the first result to use.public JpaRetrievingOutboundGatewaySpec firstResultExpression(String firstResultExpression)
firstResultExpression - The first result expression.public JpaRetrievingOutboundGatewaySpec firstResultExpression(Expression firstResultExpression)
firstResultExpression - The first result expression.public JpaRetrievingOutboundGatewaySpec idExpression(String idExpression)
primaryKey for
EntityManager.find(Class, Object)idExpression - the SpEL expression for entity primaryKey.public JpaRetrievingOutboundGatewaySpec idExpression(Expression idExpression)
primaryKey for
EntityManager.find(Class, Object)idExpression - the SpEL expression for entity primaryKey.public JpaRetrievingOutboundGatewaySpec maxResults(int maxResults)
maxResults - the maximum number of results to retrievepublic JpaRetrievingOutboundGatewaySpec maxResultsExpression(String maxResultsExpression)
maxResultsExpression - The maximum results expression.public JpaRetrievingOutboundGatewaySpec maxResultsExpression(Expression maxResultsExpression)
maxResultsExpression - The maximum results expression.public JpaRetrievingOutboundGatewaySpec deleteAfterPoll(boolean deleteAfterPoll)
true, the retrieved objects are deleted from the database upon
being polled. May not work in all situations, e.g. for Native SQL Queries.deleteAfterPoll - defaults to false.public JpaRetrievingOutboundGatewaySpec deleteInBatch(boolean deleteInBatch)
false, which means that
deletion occurs on a per object basis if a collection of entities is being
deleted.
If set to 'true' the elements of the payload are deleted as a batch operation. Be aware that this exhibits issues in regards to cascaded deletes.
The specification 'JSR 317: Java Persistence API, Version 2.0' does not support cascaded deletes in batch operations. The specification states in chapter 4.10:
"A delete operation only applies to entities of the specified class and its subclasses. It does not cascade to related entities."
deleteInBatch - Defaults to 'false' if not set.public JpaRetrievingOutboundGatewaySpec flushAfterDelete(boolean flush)
true the EntityManager.flush() will be called
after persistence operation.
Has the same effect, if the flushSize is specified to 1.
For convenience in cases when the provided entity to persist is not an instance of Iterable.flush - defaults to 'false'.