クラス JdbcOutboundGateway

実装されたすべてのインターフェース:
org.reactivestreams.Subscriber<Message<?>>AwareBeanClassLoaderAwareBeanFactoryAwareBeanNameAwareDisposableBeanInitializingBeanApplicationContextAwareOrderedComponentSourceAwareExpressionCapableOrderableMessageProducerHeaderPropagationAwareIntegrationPatternNamedComponentIntegrationManagementTrackableComponentMessageHandlerreactor.core.CoreSubscriber<Message<?>>

public class JdbcOutboundGateway extends AbstractReplyProducingMessageHandler
導入:
2.0
作成者:
Dave Syer, Gunnar Hillert, Artem Bilan, Gary Russell
  • コンストラクターの詳細

    • JdbcOutboundGateway

      public JdbcOutboundGateway(DataSourceSE dataSource, StringSE updateQuery)
      提供された DataSourceSE に基づいてインスタンスを構築し、SQL を更新します。
      パラメーター:
      dataSource - 実行用の DataSourceSE
      updateQuery - 実行するクエリ。
    • JdbcOutboundGateway

      public JdbcOutboundGateway(DataSourceSE dataSource, StringSE updateQuery, StringSE selectQuery)
      提供された DataSourceSE に基づいてインスタンスを構築し、SQL を選択して更新します。
      パラメーター:
      dataSource - 実行用の DataSourceSE
      updateQuery - 実行する更新。
      selectQuery - 実行する選択。
    • JdbcOutboundGateway

      public JdbcOutboundGateway(JdbcOperations jdbcOperations, StringSE updateQuery)
      提供された JdbcOperations に基づいてインスタンスを構築し、SQL を更新します。
      パラメーター:
      jdbcOperations - 実行用の JdbcOperations
      updateQuery - 実行するクエリ。
    • JdbcOutboundGateway

      public JdbcOutboundGateway(JdbcOperations jdbcOperations, StringSE updateQuery, StringSE selectQuery)
      提供された JdbcOperations に基づいてインスタンスを構築し、SQL を選択して更新します。
      パラメーター:
      jdbcOperations - 実行用の JdbcOperations
      updateQuery - 実行する更新。
      selectQuery - 実行する選択。
  • メソッドの詳細

    • setMaxRows

      public void setMaxRows(IntegerSE maxRows)
      クエリする行の最大数。値は、基になる JdbcPollingChannelAdapter に設定されます。また、応答を生成する前にチェックするために使用されます。結果に項目が 1 つしかなく、maxRows が 1 に設定または構成されていない場合は、その項目のみが返されます。それ以外の場合は、リスト全体です。指定されていない場合、この値はデフォルトで 1 になります。このパラメーターは、selectQuery が指定されている場合にのみ適用されます。NULL 値は許可されません。
      パラメーター:
      maxRows - 選択する行数。null であってはなりません。
      導入:
      5.1
      関連事項:
    • setKeysGenerated

      public void setKeysGenerated(boolean keysGenerated)
      更新クエリが自動生成キーを使用した挿入であることを示すフラグ。デバッグレベルでログに記録されます。
      パラメーター:
      keysGenerated - 設定するフラグ値
    • setRequestSqlParameterSourceFactory

      public void setRequestSqlParameterSourceFactory(SqlParameterSourceFactory sqlParameterSourceFactory)
      更新クエリの SqlParameterSourceFactory を設定します。
      パラメーター:
      sqlParameterSourceFactory - 使用する SqlParameterSourceFactory
    • setRequestPreparedStatementSetter

      public void setRequestPreparedStatementSetter(MessagePreparedStatementSetter requestPreparedStatementSetter)
      更新クエリの MessagePreparedStatementSetter を設定します。
      パラメーター:
      requestPreparedStatementSetter - 使用する MessagePreparedStatementSetter
    • setReplySqlParameterSourceFactory

      public void setReplySqlParameterSourceFactory(SqlParameterSourceFactory sqlParameterSourceFactory)
      /** Set a SqlParameterSourceFactory for select query.
      パラメーター:
      sqlParameterSourceFactory - 使用する SqlParameterSourceFactory
    • setRowMapper

      public void setRowMapper(RowMapper<?> rowMapper)
      選択結果 RowMapper を設定します。
      パラメーター:
      rowMapper - 使用する RowMapper
    • getComponentType

      public StringSE getComponentType()
      クラスからコピーされた説明: IntegrationObjectSupport
      サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。
      次で指定:
      インターフェース NamedComponentgetComponentType 
      オーバーライド:
      クラス MessageHandlerSupportgetComponentType 
    • doInit

      protected void doInit()
      オーバーライド:
      クラス AbstractReplyProducingMessageHandlerdoInit 
    • handleRequestMessage

      protected ObjectSE handleRequestMessage(Message<?> requestMessage)
      クラスからコピーされた説明: AbstractReplyProducingMessageHandler
      サブクラスはこのメソッドを実装して、リクエストメッセージを処理する必要があります。戻り値は、メッセージ、MessageBuilder、任意のプレーンオブジェクトです。基本クラスは、これらの開始点のいずれかからの返信メッセージの最終的な作成を処理します。戻り値が null の場合、メッセージフローはここで終了します。
      次で指定:
      クラス AbstractReplyProducingMessageHandlerhandleRequestMessage 
      パラメーター:
      requestMessage - リクエストメッセージ。
      戻り値:
      メッセージを処理した結果、または null