クラス QuerydslBindings
java.lang.ObjectSE
org.springframework.data.querydsl.binding.QuerydslBindings
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
- 関連事項:
ネストされたクラスのサマリー
ネストされたクラス修飾子と型クラス説明class
QuerydslBindings.AliasingPathBinder<P extends com.querydsl.core.types.Path<? extends T>,
T> 専用エイリアスでバインディングを追加登録する特別なQuerydslBindings.PathBinder
。class
QuerydslBindings.PathBinder<P extends com.querydsl.core.types.Path<? extends T>,
T> Path
用のバインダー。final class
型のバインダー。コンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明final <T> QuerydslBindings.TypeBinder<T>
指定された型の新しいQuerydslBindings.TypeBinder
を返します。final <T extends com.querydsl.core.types.Path<S>,
S>
QuerydslBindings.AliasingPathBinder<T,S> bind
(T path) 指定されたPath
のQuerydslBindings.AliasingPathBinder
を返し、それらのバインディングを定義します。final <T extends com.querydsl.core.types.Path<S>,
S>
QuerydslBindings.PathBinder<T,S> bind
(T... paths) 指定されたPath
の新しいQuerydslBindings.PathBinder
を返し、それらのバインディングを定義します。final QuerydslBindings
excludeUnlistedProperties
(boolean excludeUnlistedProperties) 明示的なバインディングが定義されていない、または明示的に許可されているすべてのプロパティを除外するかどうかを返します。final void
excluding
(com.querydsl.core.types.Path<?>... paths) プロパティをバインディングから除外します。<S extends com.querydsl.core.types.Path<? extends T>,
T>
OptionalSE<MultiValueBinding<S,T>> 指定されたPropertyPath
のSingleValueBinding
を返します。final void
including
(com.querydsl.core.types.Path<?>... paths) バインディングのプロパティを含めます。
コンストラクターの詳細
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
指定された型の新しい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
明示的なバインディングが定義されていない、または明示的に許可されているすべてのプロパティを除外するかどうかを返します。これはデフォルトで 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) 指定されたPropertyPath
のSingleValueBinding
を返します。特定のパス用に構成されたパスを優先しますが、特定の型用に登録されたビルダーにフォールバックします。- パラメーター:
path
- null であってはなりません。- 戻り値:
- null でもかまいません。