T
- expression typepublic class PathBuilder<T> extends EntityPathBase<T>
PathBuilder
is an extension to EntityPathBase
for dynamic path construction
Usage example:
PathBuilder<User> user = new PathBuilder<User>(User.class, "user");
Predicate filter = user.getString("firstName").eq("Bob");
List<User> users = query.from(user).where(filter).select(user).fetch();
hashCode, mixin
Constructor and Description |
---|
PathBuilder(Class<? extends T> type,
PathMetadata pathMetadata)
Creates a new PathBuilder instance
|
PathBuilder(Class<? extends T> type,
PathMetadata pathMetadata,
PathBuilderValidator validator)
Creates a new PathBuilder instance
|
PathBuilder(Class<? extends T> type,
String variable)
Creates a new PathBuilder instance
|
PathBuilder(Class<? extends T> type,
String variable,
PathBuilderValidator validator)
Creates a new PathBuilder instance
|
Modifier and Type | Method and Description |
---|---|
BooleanPath |
get(BooleanPath path)
Create a new Boolean typed path
|
<A extends Comparable<?>> |
get(ComparablePath<A> path)
Create a new Comparable typed path
|
<A extends Comparable<?>> |
get(DatePath<A> path)
Create a new Date path
|
<A extends Comparable<?>> |
get(DateTimePath<A> path)
Create a new DateTime path
|
<A extends Enum<A>> |
get(EnumPath<A> path)
Create a new Enum path
|
<A extends Number & Comparable<?>> |
get(NumberPath<A> path)
Create a new Number typed path
|
<A> SimplePath<A> |
get(Path<A> path)
Create a new Simple path
|
PathBuilder<Object> |
get(String property)
Create a PathBuilder instance for the given property
|
<A> PathBuilder<A> |
get(String property,
Class<A> type)
Create a PathBuilder for the given property with the given type
|
StringPath |
get(StringPath path)
Create a new String typed path
|
<A extends Comparable<?>> |
get(TimePath<A> path)
Create a new Time typed path
|
<A,E> ArrayPath<A,E> |
getArray(String property,
Class<A> type)
Create a ArrayPath instance for the given property and the given array type
|
BooleanPath |
getBoolean(String propertyName)
Create a new Boolean typed path
|
<A> CollectionPath<A,PathBuilder<A>> |
getCollection(String property,
Class<A> type)
Create a new Collection typed path
|
<A,E extends SimpleExpression<A>> |
getCollection(String property,
Class<A> type,
Class<? super E> queryType)
Create a new Collection typed path
|
<A extends Comparable<?>> |
getComparable(String property,
Class<A> type)
Create a new Comparable typed path
|
<A extends Comparable<?>> |
getDate(String property,
Class<A> type)
Create a new Date path
|
<A extends Comparable<?>> |
getDateTime(String property,
Class<A> type)
Create a new DateTime path
|
<A extends Enum<A>> |
getEnum(String property,
Class<A> type)
Create a new Enum path
|
<A> ListPath<A,PathBuilder<A>> |
getList(String property,
Class<A> type)
Create a new List typed path
|
<A,E extends SimpleExpression<A>> |
getList(String property,
Class<A> type,
Class<? super E> queryType)
Create a new List typed path
|
<K,V> MapPath<K,V,PathBuilder<V>> |
getMap(String property,
Class<K> key,
Class<V> value)
Create a new Map typed path
|
<K,V,E extends SimpleExpression<V>> |
getMap(String property,
Class<K> key,
Class<V> value,
Class<? super E> queryType)
Create a new Map typed path
|
Object |
getMetadata(Path<?> property)
Returns additional metadata for the given property path or null if none is available
|
<A extends Number & Comparable<?>> |
getNumber(String property,
Class<A> type)
Create a new Number typed path
|
<A> SetPath<A,PathBuilder<A>> |
getSet(String property,
Class<A> type)
Create a new Set typed path
|
<A,E extends SimpleExpression<A>> |
getSet(String property,
Class<A> type,
Class<? super E> queryType)
Create a new Set typed path
|
<A> SimplePath<A> |
getSimple(String property,
Class<A> type)
Create a new Simple path
|
StringPath |
getString(String property)
Create a new String typed path
|
<A extends Comparable<?>> |
getTime(String property,
Class<A> type)
Create a new Time typed path
|
protected <A> Class<? extends A> |
validate(String property,
Class<A> propertyType) |
accept, add, as, createArray, createBoolean, createCollection, createComparable, createDate, createDateTime, createEnum, createList, createMap, createNumber, createSet, createSimple, createString, createTime, forProperty, getAnnotatedElement, getMetadata, getRoot, instanceOf, instanceOfAny
as, as, count, countDistinct, eq, eq, eqAll, eqAll, eqAny, eqAny, in, in, in, in, in, isNotNull, isNull, ne, ne, neAll, neAny, notIn, notIn, notIn, notIn, notIn, nullif, nullif, when, when
equals, getType, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAnnotatedElement, getMetadata, getRoot
accept, getType
public PathBuilder(Class<? extends T> type, PathMetadata pathMetadata, PathBuilderValidator validator)
type
- type of the expressionpathMetadata
- path metadatavalidator
- validator for property creationpublic PathBuilder(Class<? extends T> type, PathMetadata pathMetadata)
type
- type of the expressionpathMetadata
- path metadatapublic PathBuilder(Class<? extends T> type, String variable, PathBuilderValidator validator)
type
- type of the expressionvariable
- variable namevalidator
- validator for property creationpublic Object getMetadata(Path<?> property)
EntityPath
getMetadata
in interface EntityPath<T>
getMetadata
in class EntityPathBase<T>
property
- property pathpublic PathBuilder<Object> get(String property)
property
- property namepublic <A> PathBuilder<A> get(String property, Class<A> type)
A
- property
- property nametype
- property typepublic <A,E> ArrayPath<A,E> getArray(String property, Class<A> type)
A
- E
- property
- property nametype
- property typepublic BooleanPath get(BooleanPath path)
path
- existing pathpublic BooleanPath getBoolean(String propertyName)
propertyName
- property namepublic <A> CollectionPath<A,PathBuilder<A>> getCollection(String property, Class<A> type)
A
- property
- property nametype
- property typepublic <A,E extends SimpleExpression<A>> CollectionPath<A,E> getCollection(String property, Class<A> type, Class<? super E> queryType)
A
- E
- property
- property nametype
- property typequeryType
- expression typepublic <A extends Comparable<?>> ComparablePath<A> get(ComparablePath<A> path)
A
- path
- existing pathpublic <A extends Comparable<?>> ComparablePath<A> getComparable(String property, Class<A> type)
A
- property
- property nametype
- property typepublic <A extends Comparable<?>> DatePath<A> get(DatePath<A> path)
A
- path
- existing pathpublic <A extends Comparable<?>> DatePath<A> getDate(String property, Class<A> type)
A
- property
- property nametype
- property typepublic <A extends Comparable<?>> DateTimePath<A> get(DateTimePath<A> path)
A
- path
- existing pathpublic <A extends Comparable<?>> DateTimePath<A> getDateTime(String property, Class<A> type)
A
- property
- property nametype
- property typepublic <A extends Enum<A>> EnumPath<A> getEnum(String property, Class<A> type)
A
- property
- property nametype
- property typepublic <A extends Enum<A>> EnumPath<A> get(EnumPath<A> path)
A
- path
- existing pathpublic <A> ListPath<A,PathBuilder<A>> getList(String property, Class<A> type)
A
- property
- property nametype
- property typepublic <A,E extends SimpleExpression<A>> ListPath<A,E> getList(String property, Class<A> type, Class<? super E> queryType)
A
- E
- property
- property nametype
- property typequeryType
- expression typepublic <K,V> MapPath<K,V,PathBuilder<V>> getMap(String property, Class<K> key, Class<V> value)
K
- V
- property
- property namekey
- key typevalue
- value typepublic <K,V,E extends SimpleExpression<V>> MapPath<K,V,E> getMap(String property, Class<K> key, Class<V> value, Class<? super E> queryType)
K
- V
- E
- property
- property namekey
- key typevalue
- value typequeryType
- vaue expression typepublic <A extends Number & Comparable<?>> NumberPath<A> get(NumberPath<A> path)
A
- path
- existing pathpublic <A extends Number & Comparable<?>> NumberPath<A> getNumber(String property, Class<A> type)
A
- property
- property nametype
- property typepublic <A> SetPath<A,PathBuilder<A>> getSet(String property, Class<A> type)
A
- property
- property nametype
- property typepublic <A,E extends SimpleExpression<A>> SetPath<A,E> getSet(String property, Class<A> type, Class<? super E> queryType)
A
- E
- property
- property nametype
- property typequeryType
- expression typepublic <A> SimplePath<A> get(Path<A> path)
A
- path
- existing pathpublic <A> SimplePath<A> getSimple(String property, Class<A> type)
A
- property
- property nametype
- property typepublic StringPath get(StringPath path)
path
- existing pathpublic StringPath getString(String property)
property
- property namepublic <A extends Comparable<?>> TimePath<A> get(TimePath<A> path)
A
- path
- existing pathpublic <A extends Comparable<?>> TimePath<A> getTime(String property, Class<A> type)
A
- property
- property nametype
- property typeCopyright © 2007–2016 Querydsl. All rights reserved.