com.mysema.query.types.path
Class PathBuilder<T>

java.lang.Object
  extended by com.mysema.query.types.ExpressionBase<T>
      extended by com.mysema.query.types.expr.SimpleExpression<T>
          extended by com.mysema.query.types.path.BeanPath<T>
              extended by com.mysema.query.types.path.EntityPathBase<T>
                  extended by com.mysema.query.types.path.PathBuilder<T>
Type Parameters:
T - expression type
All Implemented Interfaces:
EntityPath<T>, Expression<T>, Path<T>, Serializable

public final class PathBuilder<T>
extends EntityPathBase<T>

PathBuilder is an extension to EntityPathBase for dynamic path construction

Author:
tiwe
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.mysema.query.types.expr.SimpleExpression
primitive
 
Fields inherited from class com.mysema.query.types.ExpressionBase
type
 
Constructor Summary
PathBuilder(Class<? extends T> type, PathMetadata<?> pathMetadata)
          Creates a new PathBuilder instance
PathBuilder(Class<? extends T> type, String variable)
          Creates a new PathBuilder instance
 
Method Summary
 BooleanPath get(BooleanPath path)
           
<A extends Comparable<?>>
ComparablePath<A>
get(ComparablePath<A> path)
           
<A extends Comparable<?>>
DatePath<A>
get(DatePath<A> path)
           
<A extends Comparable<?>>
DateTimePath<A>
get(DateTimePath<A> path)
           
<A extends Enum<A>>
EnumPath<A>
get(EnumPath<A> path)
           
<A extends Number & Comparable<?>>
NumberPath<A>
get(NumberPath<A> path)
           
<A> SimplePath<A>
get(Path<A> path)
           
 PathBuilder<Object> get(String property)
          Get a PathBuilder instance for the given property
<A> PathBuilder<A>
get(String property, Class<A> type)
          Get a PathBuilder for the given property with the given type
 StringPath get(StringPath path)
           
<A extends Comparable<?>>
TimePath<A>
get(TimePath<A> path)
           
<A> ArrayPath<A>
getArray(String property, Class<A[]> type)
          Get a PArray instance for the given property and the given array type
 BooleanPath getBoolean(String propertyName)
          Get a new Boolean typed path
<A> CollectionPath<A,PathBuilder<A>>
getCollection(String property, Class<A> type)
          Get a new Collection typed path
<A,E extends SimpleExpression<A>>
CollectionPath<A,E>
getCollection(String property, Class<A> type, Class<E> queryType)
          Get a new Collection typed path
<A extends Comparable<?>>
ComparablePath<A>
getComparable(String property, Class<A> type)
          Get a new Comparable typed path
<A extends Comparable<?>>
DatePath<A>
getDate(String property, Class<A> type)
          Get a new Date path
<A extends Comparable<?>>
DateTimePath<A>
getDateTime(String property, Class<A> type)
          Get a new DateTime path
<A extends Enum<A>>
EnumPath<A>
getEnum(String property, Class<A> type)
          Get a new Enum path
<A> ListPath<A,PathBuilder<A>>
getList(String property, Class<A> type)
          Get a new List typed path
<A,E extends SimpleExpression<A>>
ListPath<A,E>
getList(String property, Class<A> type, Class<E> queryType)
          Get a new List typed path
<K,V> MapPath<K,V,PathBuilder<V>>
getMap(String property, Class<K> key, Class<V> value)
          Get a new Map typed path
<K,V,E extends SimpleExpression<V>>
MapPath<K,V,E>
getMap(String property, Class<K> key, Class<V> value, Class<E> queryType)
          Get a new Map typed path
<A extends Number & Comparable<?>>
NumberPath<A>
getNumber(String property, Class<A> type)
          Get a new Number typed path
<A> SetPath<A,PathBuilder<A>>
getSet(String property, Class<A> type)
          Get a new Set typed path
<A,E extends SimpleExpression<A>>
SetPath<A,E>
getSet(String property, Class<A> type, Class<E> queryType)
          Get a new Set typed path
<A> SimplePath<A>
getSimple(String property, Class<A> type)
          Get a new Simple path
 StringPath getString(String property)
          Get a new String typed path
<A extends Comparable<?>>
TimePath<A>
getTime(String property, Class<A> type)
          Get a new Time typed path
 
Methods inherited from class com.mysema.query.types.path.BeanPath
accept, add, as, createArray, createBoolean, createCollection, createComparable, createDate, createDateTime, createEnum, createList, createMap, createNumber, createSet, createSimple, createString, createTime, equals, forProperty, getAnnotatedElement, getMetadata, getRoot, hashCode, instanceOf
 
Methods inherited from class com.mysema.query.types.expr.SimpleExpression
as, as, count, countDistinct, eq, eq, in, in, in, isNotNull, isNull, ne, ne, notIn, notIn, notIn, when, when
 
Methods inherited from class com.mysema.query.types.ExpressionBase
getType, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.mysema.query.types.Path
getAnnotatedElement, getMetadata, getRoot
 
Methods inherited from interface com.mysema.query.types.Expression
accept, getType
 

Constructor Detail

PathBuilder

public PathBuilder(Class<? extends T> type,
                   PathMetadata<?> pathMetadata)
Creates a new PathBuilder instance

Parameters:
type -
pathMetadata -

PathBuilder

public PathBuilder(Class<? extends T> type,
                   String variable)
Creates a new PathBuilder instance

Parameters:
type -
variable -
Method Detail

get

public PathBuilder<Object> get(String property)
Get a PathBuilder instance for the given property

Parameters:
property - property name
Returns:

get

public <A> PathBuilder<A> get(String property,
                              Class<A> type)
Get a PathBuilder for the given property with the given type

Type Parameters:
A -
Parameters:
property - property name
type -
Returns:

getArray

public <A> ArrayPath<A> getArray(String property,
                                 Class<A[]> type)
Get a PArray instance for the given property and the given array type

Type Parameters:
A -
Parameters:
property - property name
type -
Returns:

get

public BooleanPath get(BooleanPath path)
Parameters:
path -
Returns:

getBoolean

public BooleanPath getBoolean(String propertyName)
Get a new Boolean typed path

Parameters:
propertyName - property name
Returns:

getCollection

public <A> CollectionPath<A,PathBuilder<A>> getCollection(String property,
                                                          Class<A> type)
Get a new Collection typed path

Type Parameters:
A -
Parameters:
property - property name
type -
Returns:

getCollection

public <A,E extends SimpleExpression<A>> CollectionPath<A,E> getCollection(String property,
                                                                           Class<A> type,
                                                                           Class<E> queryType)
Get a new Collection typed path

Type Parameters:
A -
E -
Parameters:
property - property name
type -
queryType -
Returns:

get

public <A extends Comparable<?>> ComparablePath<A> get(ComparablePath<A> path)
Type Parameters:
A -
Parameters:
path -
Returns:

getComparable

public <A extends Comparable<?>> ComparablePath<A> getComparable(String property,
                                                                 Class<A> type)
Get a new Comparable typed path

Type Parameters:
A -
Parameters:
property - property name
type -
Returns:

get

public <A extends Comparable<?>> DatePath<A> get(DatePath<A> path)
Type Parameters:
A -
Parameters:
path -
Returns:

getDate

public <A extends Comparable<?>> DatePath<A> getDate(String property,
                                                     Class<A> type)
Get a new Date path

Type Parameters:
A -
Parameters:
property - property name
type -
Returns:

get

public <A extends Comparable<?>> DateTimePath<A> get(DateTimePath<A> path)
Type Parameters:
A -
Parameters:
path -
Returns:

getDateTime

public <A extends Comparable<?>> DateTimePath<A> getDateTime(String property,
                                                             Class<A> type)
Get a new DateTime path

Type Parameters:
A -
Parameters:
property - property name
type -
Returns:

getEnum

public <A extends Enum<A>> EnumPath<A> getEnum(String property,
                                               Class<A> type)
Get a new Enum path

Type Parameters:
A -
Parameters:
property - property name
type -
Returns:

get

public <A extends Enum<A>> EnumPath<A> get(EnumPath<A> path)
Type Parameters:
A -
Parameters:
path -
Returns:

getList

public <A> ListPath<A,PathBuilder<A>> getList(String property,
                                              Class<A> type)
Get a new List typed path

Type Parameters:
A -
Parameters:
property - property name
type -
Returns:

getList

public <A,E extends SimpleExpression<A>> ListPath<A,E> getList(String property,
                                                               Class<A> type,
                                                               Class<E> queryType)
Get a new List typed path

Type Parameters:
A -
E -
Parameters:
property - property name
type -
queryType -
Returns:

getMap

public <K,V> MapPath<K,V,PathBuilder<V>> getMap(String property,
                                                Class<K> key,
                                                Class<V> value)
Get a new Map typed path

Type Parameters:
K -
V -
Parameters:
property - property name
key -
value -
Returns:

getMap

public <K,V,E extends SimpleExpression<V>> MapPath<K,V,E> getMap(String property,
                                                                 Class<K> key,
                                                                 Class<V> value,
                                                                 Class<E> queryType)
Get a new Map typed path

Type Parameters:
K -
V -
E -
Parameters:
property - property name
key -
value -
queryType -
Returns:

get

public <A extends Number & Comparable<?>> NumberPath<A> get(NumberPath<A> path)
Type Parameters:
A -
Parameters:
path -
Returns:

getNumber

public <A extends Number & Comparable<?>> NumberPath<A> getNumber(String property,
                                                                 Class<A> type)
Get a new Number typed path

Type Parameters:
A -
Parameters:
property - property name
type -
Returns:

getSet

public <A> SetPath<A,PathBuilder<A>> getSet(String property,
                                            Class<A> type)
Get a new Set typed path

Type Parameters:
A -
Parameters:
property - property name
type -
Returns:

getSet

public <A,E extends SimpleExpression<A>> SetPath<A,E> getSet(String property,
                                                             Class<A> type,
                                                             Class<E> queryType)
Get a new Set typed path

Type Parameters:
A -
E -
Parameters:
property - property name
type -
queryType -
Returns:

get

public <A> SimplePath<A> get(Path<A> path)
Type Parameters:
A -
Parameters:
path -
Returns:

getSimple

public <A> SimplePath<A> getSimple(String property,
                                   Class<A> type)
Get a new Simple path

Type Parameters:
A -
Parameters:
property - property name
type -
Returns:

get

public StringPath get(StringPath path)
Parameters:
path -
Returns:

getString

public StringPath getString(String property)
Get a new String typed path

Parameters:
property - property name
Returns:

get

public <A extends Comparable<?>> TimePath<A> get(TimePath<A> path)
Type Parameters:
A -
Parameters:
path -

getTime

public <A extends Comparable<?>> TimePath<A> getTime(String property,
                                                     Class<A> type)
Get a new Time typed path

Type Parameters:
A -
Parameters:
property - property name
type -
Returns:


Copyright © 2007-2011 Mysema Ltd. All Rights Reserved.