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 |
PARSER, target
logger
DEFAULT_PHASE
OBJECT_TYPE_ATTRIBUTE
Modifier | Constructor and Description |
---|---|
protected |
JpaBaseOutboundEndpointSpec(JpaExecutor jpaExecutor) |
Modifier and Type | Method and Description |
---|---|
S |
entityClass(Class<?> entityClass)
Specify the class type which is being used for retrieving entities from the database.
|
Map<Object,String> |
getComponentsToRegister() |
S |
jpaQuery(String jpaQuery)
Specify a JPA query to perform persistent operation.
|
S |
namedQuery(String namedQuery)
Specify a name a named JPQL based query or a native SQL query.
|
S |
nativeQuery(String nativeQuery)
Specify a native SQL query to perform persistent operation.
|
S |
parameter(JpaParameter jpaParameter) |
S |
parameter(Object value)
Add a value for indexed query parameter.
|
S |
parameter(String name,
Object value)
Add a value for named parameter in the query.
|
S |
parameterExpression(String expression)
Add a SpEL expression for indexed parameter in the query.
|
S |
parameterExpression(String name,
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(Boolean usePayloadAsParameterSource)
Indicates that whether only the payload of the passed in
Message will be
used as a source of parameters. |
_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
protected final JpaExecutor jpaExecutor
protected JpaBaseOutboundEndpointSpec(JpaExecutor jpaExecutor)
public S entityClass(Class<?> entityClass)
entityClass
- the entity Class
to usepublic S jpaQuery(String jpaQuery)
jpaQuery
- the JPA query to use.public S nativeQuery(String nativeQuery)
nativeQuery
- the native SQL query to use.public S namedQuery(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(Object value)
value
- the value for query parameter by indexpublic S parameter(String name, Object value)
name
- the name of the query parametervalue
- the value for query parameter by namepublic S parameterExpression(String expression)
expression
- the SpEL expression for query parameter by indexpublic S parameterExpression(String name, String expression)
name
- the name of the query parameterexpression
- the SpEL expression for query parameter by namepublic S parameter(JpaParameter jpaParameter)
public S usePayloadAsParameterSource(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 Map<Object,String> getComponentsToRegister()
getComponentsToRegister
in interface ComponentsRegistration