Class JpaBaseOutboundEndpointSpec<S extends JpaBaseOutboundEndpointSpec<S>>
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,H>
org.springframework.integration.dsl.MessageHandlerSpec<S,JpaOutboundGateway>
org.springframework.integration.jpa.dsl.JpaBaseOutboundEndpointSpec<S>
- Type Parameters:
S
- the targetJpaBaseOutboundEndpointSpec
implementation type.
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,DisposableBean
,FactoryBean<JpaOutboundGateway>
,InitializingBean
,Lifecycle
,Phased
,SmartLifecycle
,ComponentsRegistration
- Direct Known Subclasses:
JpaRetrievingOutboundGatewaySpec
,JpaUpdatingOutboundEndpointSpec
public abstract class JpaBaseOutboundEndpointSpec<S extends JpaBaseOutboundEndpointSpec<S>> extends MessageHandlerSpec<S,JpaOutboundGateway> implements ComponentsRegistration
The base
MessageHandlerSpec
for JPA Outbound endpoints.- Since:
- 5.0
- Author:
- Artem Bilan
-
Field Summary
Fields Modifier and Type Field Description protected JpaExecutor
jpaExecutor
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target
-
Constructor Summary
Constructors Modifier Constructor Description protected
JpaBaseOutboundEndpointSpec(JpaExecutor jpaExecutor)
-
Method Summary
Modifier and Type Method 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(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
parameter(JpaParameter jpaParameter)
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 aParameterSourceFactory
to populate query parameters at runtime against request message.S
usePayloadAsParameterSource(Boolean usePayloadAsParameterSource)
Indicates that whether only the payload of the passed inMessage
will be used as a source of parameters.Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Field Details
-
Constructor Details
-
Method Details
-
entityClass
Specify the class type which is being used for retrieving entities from the database.- Parameters:
entityClass
- the entityClass
to use- Returns:
- the spec
-
jpaQuery
Specify a JPA query to perform persistent operation.- Parameters:
jpaQuery
- the JPA query to use.- Returns:
- the spec
-
nativeQuery
Specify a native SQL query to perform persistent operation.- Parameters:
nativeQuery
- the native SQL query to use.- Returns:
- the spec
-
namedQuery
Specify a name a named JPQL based query or a native SQL query.- Parameters:
namedQuery
- the name of the pre-configured query.- Returns:
- the spec
-
parameterSourceFactory
Specify aParameterSourceFactory
to populate query parameters at runtime against request message.- Parameters:
parameterSourceFactory
- theParameterSourceFactory
to use.- Returns:
- the spec
-
parameter
Add a value for indexed query parameter.- Parameters:
value
- the value for query parameter by index- Returns:
- the spec
-
parameter
Add a value for named parameter in the query.- Parameters:
name
- the name of the query parametervalue
- the value for query parameter by name- Returns:
- the spec
-
parameterExpression
Add a SpEL expression for indexed parameter in the query.- Parameters:
expression
- the SpEL expression for query parameter by index- Returns:
- the spec
-
parameterExpression
Add a SpEL expression for named parameter in the query.- Parameters:
name
- the name of the query parameterexpression
- the SpEL expression for query parameter by name- Returns:
- the spec
-
parameter
-
usePayloadAsParameterSource
Indicates that whether only the payload of the passed inMessage
will be used as a source of parameters. The is 'true' by default because as a default aBeanPropertyParameterSourceFactory
implementation is used for the sqlParameterSourceFactory property.- Parameters:
usePayloadAsParameterSource
- theboolean
flag to indicate if usepayload
as a source of parameter values or not.- Returns:
- the spec
-
getComponentsToRegister
- Specified by:
getComponentsToRegister
in interfaceComponentsRegistration
-