public class QuerydslBindings extends Object
QuerydslBindings
allows definition of path specific SingleValueBinding
.
new QuerydslBindings() {
{
bind(QUser.user.address.city).using((path, value) -> path.like(value.toString()));
bind(String.class).using((path, value) -> path.like(value.toString()));
}
}
Modifier and Type | Class and Description |
---|---|
class |
QuerydslBindings.PathBinder<P extends com.mysema.query.types.Path<? extends T>,T>
A binder for
Path s. |
class |
QuerydslBindings.TypeBinder<T>
A binder for types.
|
Constructor and Description |
---|
QuerydslBindings()
Creates a new
QuerydslBindings instance. |
Modifier and Type | Method and Description |
---|---|
<T> QuerydslBindings.TypeBinder<T> |
bind(Class<T> type)
Returns a new
QuerydslBindings.TypeBinder for the given type. |
<T extends com.mysema.query.types.Path<S>,S> |
bind(T... paths)
Returns a new
QuerydslBindings.PathBinder for the given Path s to define bindings for them. |
QuerydslBindings |
excludeUnlistedProperties(boolean excludeUnlistedProperties)
Returns whether to exclude all properties for which no explicit binding has been defined or it has been explicitly
white-listed.
|
void |
excluding(com.mysema.query.types.Path<?>... paths)
Exclude properties from binding.
|
<S extends com.mysema.query.types.Path<T>,T> |
getBindingForPath(PropertyPath path)
Returns the
SingleValueBinding for the given PropertyPath . |
void |
including(com.mysema.query.types.Path<?>... paths)
Include properties for binding.
|
public QuerydslBindings()
QuerydslBindings
instance.public final <T extends com.mysema.query.types.Path<S>,S> QuerydslBindings.PathBinder<T,S> bind(T... paths)
QuerydslBindings.PathBinder
for the given Path
s to define bindings for them.paths
- must not be null or empty.public final <T> QuerydslBindings.TypeBinder<T> bind(Class<T> type)
QuerydslBindings.TypeBinder
for the given type.type
- must not be null.public final void excluding(com.mysema.query.types.Path<?>... paths)
address
would exclude both address.city
and address.street
.paths
- must not be null or empty.public final void including(com.mysema.query.types.Path<?>... paths)
properties
- must not be null or empty.public final QuerydslBindings excludeUnlistedProperties(boolean excludeUnlistedProperties)
excludeUnlistedProperties
- #including(String...)
,
including(Path...)
public <S extends com.mysema.query.types.Path<T>,T> MultiValueBinding<S,T> getBindingForPath(PropertyPath path)
SingleValueBinding
for the given PropertyPath
. Prefers a path configured for the
specific path but falls back to the builder registered for a given type.path
- must not be null.Copyright © 2011-2015–2015 Pivotal Software, Inc.. All rights reserved.