クラス AbstractMongoDbMessageSource<T>

型パラメーター:
T - ペイロード型。
実装されたすべてのインターフェース:
AwareBeanFactoryAwareBeanNameAwareDisposableBeanInitializingBeanApplicationContextAwareMessageSource<T>IntegrationPatternNamedComponentIntegrationInboundManagementIntegrationManagement
既知の直属サブクラス
MongoDbMessageSourceReactiveMongoDbMessageSource

public abstract class AbstractMongoDbMessageSource<T> extends AbstractMessageSource<T> implements ApplicationContextAware
一般的な MongoDB ソースオプションとサポートメソッドの AbstractMessageSource 拡張。
導入:
5.5
作成者:
Artem Bilan
  • フィールドの詳細

    • queryExpression

      protected final Expression queryExpression
  • コンストラクターの詳細

    • AbstractMongoDbMessageSource

      protected AbstractMongoDbMessageSource(Expression queryExpression)
  • メソッドの詳細

    • setEntityClass

      public void setEntityClass(ClassSE<?> entityClass)
      MongoDb テンプレートの検索操作に渡される entityClass の型を設定します。デフォルトは DBObject です。
      パラメーター:
      entityClass - エンティティクラス。
    • setExpectSingleResult

      public void setExpectSingleResult(boolean expectSingleResult)
      呼び出す find * メソッドを管理します。デフォルトは "false" です。これは、AbstractMessageSource.receive() メソッドが find() メソッドを使用することを意味します。'true' に設定すると、AbstractMessageSource.receive() は findOne(Query, Class) を使用し、返される Message のペイロードは、リストではなく entityClass で識別される型の返されるターゲットオブジェクトになります。
      パラメーター:
      expectSingleResult - 単一の結果が期待される場合は true。
    • setCollectionNameExpression

      public void setCollectionNameExpression(Expression collectionNameExpression)
      Query で使用されるコレクション名に解決される SpEL Expression を設定します。結果のコレクション名は、MongoHeaders.COLLECTION_NAME ヘッダーに含まれます。
      パラメーター:
      collectionNameExpression - コレクション名の式。
    • setMongoConverter

      public void setMongoConverter(MongoConverter mongoConverter)
      MongoDb から読み取られたデータの逆直列化を支援するために使用されるカスタム MongoConverter を提供します。
      パラメーター:
      mongoConverter - mongo コンバーター。
    • setUpdateExpression

      public void setUpdateExpression(Expression updateExpression)
      コレクションからポーリングされたレコードに対して、オプションの update を指定します。
      パラメーター:
      updateExpression - UpdateDefinition の SpEL 式。
      導入:
      5.5
    • setApplicationContext

      public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
      次で指定:
      インターフェース ApplicationContextAwaresetApplicationContext 
      例外:
      BeansException
    • getCollectionNameExpression

      public Expression getCollectionNameExpression()
    • getMongoConverter

      public MongoConverter getMongoConverter()
    • getEntityClass

      public ClassSE<?> getEntityClass()
    • isExpectSingleResult

      public boolean isExpectSingleResult()
    • getUpdateExpression

      public Expression getUpdateExpression()
    • getApplicationContext

      public ApplicationContext getApplicationContext()
    • setInitialized

      protected void setInitialized(boolean initialized)
    • isInitialized

      protected boolean isInitialized()
    • onInit

      protected void onInit()
      オーバーライド:
      クラス AbstractExpressionEvaluatoronInit 
    • evaluateQueryExpression

      protected Query evaluateQueryExpression()
    • evaluateCollectionNameExpression

      protected StringSE evaluateCollectionNameExpression()
    • getByIdInQuery

      protected Query getByIdInQuery(CollectionSE<?> entities)
    • idForEntity

      protected org.springframework.data.util.Pair<StringSE,ObjectSE> idForEntity(ObjectSE entity)
    • evaluateUpdateExpression

      @Nullable protected Update evaluateUpdateExpression()