クラス QuerydslBindings

java.lang.ObjectSE
org.springframework.data.querydsl.binding.QuerydslBindings

public class QuerydslBindings extends ObjectSE
QuerydslBindings では、パス固有のバインディングを定義できます。
 
 new QuerydslBindings() {
   {
     bind(QUser.user.address.city).first((path, value) -> path.like(value.toString()));
     bind(String.class).first((path, value) -> path.like(value.toString()));
   }
 }
 
 
バインディングは、単一(QuerydslBindings.PathBinder.first(SingleValueBinding) を参照)または複数(複数のバインディングが提供されている場合は最初)または複数(QuerydslBindings.PathBinder.all(MultiValueBinding) を参照)の値バインディングを処理できます。正確に 1 つのパスがデプロイされている場合、QuerydslBindings.AliasingPathBinder が返されます。これは、名前が示すように、パスのエイリアシングを許可します。つまり、別の名前でパスを公開します。

QuerydslBindings は通常、QuerydslBinderCustomizer を使用して操作され、直接実装されるか、Spring Data リポジトリのデフォルトメソッドを使用します。

導入:
1.11
作成者:
Christoph Strobl, Oliver Gierke, Mark Paluch, Johannes Englmeier
関連事項:
  • コンストラクターの詳細

    • QuerydslBindings

      public QuerydslBindings()
      新しい QuerydslBindings インスタンスを作成します。
  • メソッドの詳細

    • bind

      public final <T extends com.querydsl.core.types.Path<S>, S> QuerydslBindings.AliasingPathBinder<T,S> bind(T path)
      指定された Path の QuerydslBindings.AliasingPathBinder を返し、それらのバインディングを定義します。
      パラメーター:
      path - null であってはなりません。
      戻り値:
    • bind

      @SafeVarargsSE public final <T extends com.querydsl.core.types.Path<S>, S> QuerydslBindings.PathBinder<T,S> bind(T... paths)
      指定された Path の新しい QuerydslBindings.PathBinder を返し、それらのバインディングを定義します。
      パラメーター:
      paths - null または空であってはなりません。
      戻り値:
    • bind

      public final <T> QuerydslBindings.TypeBinder<T> bind(ClassSE<T> type)
      指定された型の新しい QuerydslBindings.TypeBinder を返します。
      パラメーター:
      type - null であってはなりません。
      戻り値:
    • excluding

      public final void excluding(com.querydsl.core.types.Path<?>... paths)
      プロパティをバインディングから除外します。ネストされた型のすべてのプロパティの除外は、より高いレベルでの除外によって行うことができます。例: address は、address.city と address.street の両方を除外します。
      パラメーター:
      paths - null または空であってはなりません。
    • including

      public final void including(com.querydsl.core.types.Path<?>... paths)
      バインディングのプロパティを含めます。拘束力のある候補と見なされるプロパティを含めます。
      パラメーター:
      paths - null または空であってはなりません。
    • excludeUnlistedProperties

      public final QuerydslBindings excludeUnlistedProperties(boolean excludeUnlistedProperties)
      明示的なバインディングが定義されていない、または明示的に許可されているすべてのプロパティを除外するかどうかを返します。これはデフォルトで false に設定されます。これは、明示的に定義されたバインディングのないプロパティには、型固有のデフォルトバインディングが適用されることを意味します。
      パラメーター:
      excludeUnlistedProperties -
      戻り値:
      関連事項:
    • getBindingForPath

      public <S extends com.querydsl.core.types.Path<? extends T>, T> OptionalSE<MultiValueBinding<S,T>> getBindingForPath(org.springframework.data.querydsl.binding.PathInformation path)
      指定された PropertyPathSingleValueBinding を返します。特定のパス用に構成されたパスを優先しますが、特定の型用に登録されたビルダーにフォールバックします。
      パラメーター:
      path - null であってはなりません。
      戻り値:
      null でもかまいません。