クラス BindableMongoExpression

java.lang.ObjectSE
org.springframework.data.mongodb.BindableMongoExpression
実装されているすべてのインターフェース:
MongoExpression

public class BindableMongoExpression extends ObjectSE implements MongoExpression
ParameterBindingDocumentCodec を使用して生の (json) 式を解析する MongoExpression。式は必要に応じて {... } 内にラップされます。?0 などのプレースホルダーの実際の解析とパラメーターバインディングは、toDocument() を介してターゲット Document での最初の呼び出し時に遅延されます。
 $toUpper : $name                -> { '$toUpper' : '$name' }

 { '$toUpper' : '$name' }        -> { '$toUpper' : '$name' }

 { '$toUpper' : '?0' }, "$name"  -> { '$toUpper' : '$name' }
 
一部の型では、特別な Codec が必要になる場合があります。その場合は、必要な codec を含む CodecRegistry を withCodecRegistry(CodecRegistry) 経由で提供してください。
導入:
3.2
作成者:
Christoph Strobl, Giacomo Baso
  • コンストラクターの詳細

    • BindableMongoExpression

      public BindableMongoExpression(StringSE expression, @Nullable ObjectSE[] args)
      BindableMongoExpression の新しいインスタンスを作成します。
      パラメーター:
      expression - null であってはなりません。
      args - null でもかまいません。
    • BindableMongoExpression

      public BindableMongoExpression(StringSE expression, @Nullable CodecRegistryProvider codecRegistryProvider, @Nullable ObjectSE[] args)
      BindableMongoExpression の新しいインスタンスを作成します。
      パラメーター:
      expression - null であってはなりません。
      codecRegistryProvider - null でもかまいません。
      args - null でもかまいません。
  • メソッドの詳細

    • withCodecRegistry

      public BindableMongoExpression withCodecRegistry(org.bson.codecs.configuration.CodecRegistry codecRegistry)
      式を変換するために使用される CodecRegistry を提供します。
      パラメーター:
      codecRegistry - null であってはなりません。
      戻り値:
      BindableMongoExpression の新しいインスタンス。
    • bind

      public BindableMongoExpression bind(ObjectSE... args)
      インデックスを介してプレースホルダーにバインドする引数を指定します。
      パラメーター:
      args - null であってはなりません。
      戻り値:
      BindableMongoExpression の新しいインスタンス。
    • toDocument

      public org.bson.Document toDocument()
      インターフェースからコピーされた説明: MongoExpression
      ネイティブ Document 表現を取得します。
      次で指定:
      インターフェース MongoExpressiontoDocument 
      戻り値:
      決して null にはなりません。
    • toString

      public StringSE toString()
      オーバーライド:
      クラス ObjectSEtoString