Class R2dbcMessageHandlerSpec

All Implemented Interfaces:
Aware, BeanClassLoaderAware, BeanFactoryAware, DisposableBean, FactoryBean<ReactiveMessageHandlerAdapter>, InitializingBean, Lifecycle, Phased, SmartLifecycle, ComponentsRegistration

public class R2dbcMessageHandlerSpec extends ReactiveMessageHandlerSpec<R2dbcMessageHandlerSpec,R2dbcMessageHandler>
Since:
5.4
Author:
Artem Bilan
  • Constructor Details

    • R2dbcMessageHandlerSpec

      protected R2dbcMessageHandlerSpec(org.springframework.data.r2dbc.core.R2dbcEntityOperations r2dbcEntityOperations)
  • Method Details

    • queryType

      Set a R2dbcMessageHandler.Type for query to execute.
      Parameters:
      type - the R2dbcMessageHandler.Type to use.
      Returns:
      the spec
    • queryTypeFunction

      public <P> R2dbcMessageHandlerSpec queryTypeFunction(Function<Message<P>,R2dbcMessageHandler.Type> queryTypeFunction)
      Set a Function to evaluate a R2dbcMessageHandler.Type for query to execute against a request message.
      Type Parameters:
      P - the payload type.
      Parameters:
      queryTypeFunction - the function to use.
      Returns:
      the spec
    • queryTypeExpression

      public R2dbcMessageHandlerSpec queryTypeExpression(String queryTypeExpression)
      Set a SpEL expression to evaluate a R2dbcMessageHandler.Type for query to execute.
      Parameters:
      queryTypeExpression - the expression to use.
      Returns:
      the spec
    • queryTypeExpression

      public R2dbcMessageHandlerSpec queryTypeExpression(Expression queryTypeExpression)
      Set a SpEL expression to evaluate a R2dbcMessageHandler.Type for query to execute.
      Parameters:
      queryTypeExpression - the expression to use.
      Returns:
      the spec
    • tableName

      public R2dbcMessageHandlerSpec tableName(String tableName)
      Specify a table in the target database to execute the query.
      Parameters:
      tableName - the name of the table to use.
      Returns:
      the spec
    • tableNameFunction

      public <P> R2dbcMessageHandlerSpec tableNameFunction(Function<Message<P>,String> tableNameFunction)
      Set a Function to evaluate a table name at runtime against request message.
      Type Parameters:
      P - the payload type.
      Parameters:
      tableNameFunction - the function to use.
      Returns:
      the spec
    • tableNameExpression

      public R2dbcMessageHandlerSpec tableNameExpression(String tableNameExpression)
      Set a SpEL expression to evaluate a table name at runtime against request message.
      Parameters:
      tableNameExpression - the expression to use.
      Returns:
      the spec
    • tableNameExpression

      public R2dbcMessageHandlerSpec tableNameExpression(Expression tableNameExpression)
      Set a SpEL expression to evaluate a table name at runtime against request message.
      Parameters:
      tableNameExpression - the expression to use.
      Returns:
      the spec
    • values

      public <P> R2dbcMessageHandlerSpec values(Function<Message<P>,Map<String,?>> valuesFunction)
      Set a Function to evaluate a Map for name-value pairs to bind as parameters into a query.
      Type Parameters:
      P - the payload type.
      Parameters:
      valuesFunction - the function to use.
      Returns:
      the spec
    • values

      public R2dbcMessageHandlerSpec values(String valuesExpression)
      Set a SpEL expression to evaluate a Map for name-value pairs to bind as parameters into a query.
      Parameters:
      valuesExpression - the expression to use.
      Returns:
      the spec
    • values

      public R2dbcMessageHandlerSpec values(Expression valuesExpression)
      Set a SpEL expression to evaluate a Map for name-value pairs to bind as parameters into a query.
      Parameters:
      valuesExpression - the expression to use.
      Returns:
      the spec
    • criteria

      public <P> R2dbcMessageHandlerSpec criteria(Function<Message<P>,org.springframework.data.relational.core.query.Criteria> criteriaFunction)
      Set a Function to evaluate a Criteria for query to execute.
      Type Parameters:
      P - the payload type.
      Parameters:
      criteriaFunction - the function to use.
      Returns:
      the spec
    • criteria

      public R2dbcMessageHandlerSpec criteria(String criteriaExpression)
      Set a SpEL expression to evaluate a Criteria for query to execute.
      Parameters:
      criteriaExpression - the expression to use.
      Returns:
      the spec
    • criteria

      public R2dbcMessageHandlerSpec criteria(Expression criteriaExpression)
      Set a SpEL expression to evaluate a Criteria for query to execute.
      Parameters:
      criteriaExpression - the expression to use.
      Returns:
      the spec