S
- the target JpaBaseOutboundEndpointSpec
implementation type.public abstract class JpaBaseOutboundEndpointSpec<S extends JpaBaseOutboundEndpointSpec<S>> extends MessageHandlerSpec<S,JpaOutboundGateway> implements ComponentsRegistration
MessageHandlerSpec
for JPA Outbound endpoints.Modifier and Type | Field and Description |
---|---|
protected JpaExecutor |
jpaExecutor |
logger, PARSER, target
Modifier | Constructor and Description |
---|---|
protected |
JpaBaseOutboundEndpointSpec(JpaExecutor jpaExecutor) |
Modifier and Type | Method and Description |
---|---|
S |
entityClass(java.lang.Class<?> entityClass)
Specify the class type which is being used for retrieving entities from the database.
|
java.util.Map<java.lang.Object,java.lang.String> |
getComponentsToRegister() |
S |
jpaQuery(java.lang.String jpaQuery)
Specify a JPA query to perform persistent operation.
|
S |
namedQuery(java.lang.String namedQuery)
Specify a name a named JPQL based query or a native SQL query.
|
S |
nativeQuery(java.lang.String nativeQuery)
Specify a native SQL query to perform persistent operation.
|
S |
parameter(JpaParameter jpaParameter) |
S |
parameter(java.lang.Object value)
Add a value for indexed query parameter.
|
S |
parameter(java.lang.String name,
java.lang.Object value)
Add a value for named parameter in the query.
|
S |
parameterExpression(java.lang.String expression)
Add a SpEL expression for indexed parameter in the query.
|
S |
parameterExpression(java.lang.String name,
java.lang.String expression)
Add a SpEL expression for named parameter in the query.
|
S |
parameterSourceFactory(ParameterSourceFactory parameterSourceFactory)
Specify a
ParameterSourceFactory to populate query parameters at runtime against request message. |
S |
usePayloadAsParameterSource(java.lang.Boolean usePayloadAsParameterSource)
Indicates that whether only the payload of the passed in
Message will be
used as a source of parameters. |
_this, afterPropertiesSet, destroy, doGet, get, getId, getObject, getObjectType, id, isSingleton
protected final JpaExecutor jpaExecutor
protected JpaBaseOutboundEndpointSpec(JpaExecutor jpaExecutor)
public S entityClass(java.lang.Class<?> entityClass)
entityClass
- the entity Class
to usepublic S jpaQuery(java.lang.String jpaQuery)
jpaQuery
- the JPA query to use.public S nativeQuery(java.lang.String nativeQuery)
nativeQuery
- the native SQL query to use.public S namedQuery(java.lang.String namedQuery)
namedQuery
- the name of the pre-configured query.public S parameterSourceFactory(ParameterSourceFactory parameterSourceFactory)
ParameterSourceFactory
to populate query parameters at runtime against request message.parameterSourceFactory
- the ParameterSourceFactory
to use.public S parameter(java.lang.Object value)
value
- the value for query parameter by indexpublic S parameter(java.lang.String name, java.lang.Object value)
name
- the name of the query parametervalue
- the value for query parameter by namepublic S parameterExpression(java.lang.String expression)
expression
- the SpEL expression for query parameter by indexpublic S parameterExpression(java.lang.String name, java.lang.String expression)
name
- the name of the query parameterexpression
- the SpEL expression for query parameter by namepublic S parameter(JpaParameter jpaParameter)
public S usePayloadAsParameterSource(java.lang.Boolean usePayloadAsParameterSource)
Message
will be
used as a source of parameters. The is 'true' by default because as a default a
BeanPropertyParameterSourceFactory
implementation is used for the sqlParameterSourceFactory property.usePayloadAsParameterSource
- the boolean
flag to indicate if use
payload
as a source of parameter values or not.public java.util.Map<java.lang.Object,java.lang.String> getComponentsToRegister()
getComponentsToRegister
in interface ComponentsRegistration