com.mysema.query.types.path
Class ListPath<E,Q extends SimpleExpression<? super E>>

java.lang.Object
  extended by com.mysema.query.types.expr.DslExpression<T>
      extended by com.mysema.query.types.expr.CollectionExpressionBase<C,E>
          extended by com.mysema.query.types.path.CollectionPathBase<List<E>,E,Q>
              extended by com.mysema.query.types.path.ListPath<E,Q>
Type Parameters:
E - component type
Q - component query type
All Implemented Interfaces:
CollectionExpression<List<E>,E>, ListExpression<E,Q>, Expression<List<E>>, ParametrizedExpression<List<E>>, Path<List<E>>, Serializable

public class ListPath<E,Q extends SimpleExpression<? super E>>
extends CollectionPathBase<List<E>,E,Q>
implements ListExpression<E,Q>

ListPath represents list paths

Author:
tiwe
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.mysema.query.types.expr.DslExpression
mixin
 
Constructor Summary
ListPath(Class<? super E> elementType, Class<Q> queryType, Path<?> parent, String property)
           
ListPath(Class<? super E> elementType, Class<Q> queryType, PathMetadata<?> metadata)
           
ListPath(Class<? super E> elementType, Class<Q> queryType, String variable)
           
 
Method Summary
<R,C> R
accept(Visitor<R,C> v, C context)
          Accept the visitor with the given context
 Q any()
           
protected  PathMetadata<Integer> forListAccess(Expression<Integer> index)
           
protected  PathMetadata<Integer> forListAccess(int index)
           
 Q get(Expression<Integer> index)
          Indexed access
 Q get(int index)
          Indexed access
 AnnotatedElement getAnnotatedElement()
          Return the annotated element related to the given path For property paths the annotated element contains the annotations of the related field and/or getter method and for all others paths the annotated element is the expression type.
 Class<E> getElementType()
           
 PathMetadata<?> getMetadata()
          Get the metadata for this path
 Class<?> getParameter(int index)
           
 Path<?> getRoot()
          Get the root for this path
 
Methods inherited from class com.mysema.query.types.path.CollectionPathBase
newInstance
 
Methods inherited from class com.mysema.query.types.expr.CollectionExpressionBase
contains, contains, isEmpty, isNotEmpty, size
 
Methods inherited from class com.mysema.query.types.expr.DslExpression
as, as, equals, getType, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.mysema.query.types.Expression
getType
 

Constructor Detail

ListPath

public ListPath(Class<? super E> elementType,
                Class<Q> queryType,
                String variable)

ListPath

public ListPath(Class<? super E> elementType,
                Class<Q> queryType,
                Path<?> parent,
                String property)

ListPath

public ListPath(Class<? super E> elementType,
                Class<Q> queryType,
                PathMetadata<?> metadata)
Method Detail

accept

public final <R,C> R accept(Visitor<R,C> v,
                            C context)
Description copied from interface: Expression
Accept the visitor with the given context

Specified by:
accept in interface Expression<List<E>>
Type Parameters:
R - return type
C - context type
Parameters:
v - visitor
context - context of visit
Returns:

any

public Q any()
Specified by:
any in class CollectionPathBase<List<E>,E,Q extends SimpleExpression<? super E>>

forListAccess

protected PathMetadata<Integer> forListAccess(int index)

forListAccess

protected PathMetadata<Integer> forListAccess(Expression<Integer> index)

get

public Q get(Expression<Integer> index)
Description copied from interface: ListExpression
Indexed access

Specified by:
get in interface ListExpression<E,Q extends SimpleExpression<? super E>>
Returns:
this.get(index)
See Also:
List.get(int)

get

public Q get(int index)
Description copied from interface: ListExpression
Indexed access

Specified by:
get in interface ListExpression<E,Q extends SimpleExpression<? super E>>
Returns:
this.get(index)
See Also:
List.get(int)

getElementType

public Class<E> getElementType()
Specified by:
getElementType in class CollectionExpressionBase<List<E>,E>

getMetadata

public PathMetadata<?> getMetadata()
Description copied from interface: Path
Get the metadata for this path

Specified by:
getMetadata in interface Path<List<E>>
Returns:

getRoot

public Path<?> getRoot()
Description copied from interface: Path
Get the root for this path

Specified by:
getRoot in interface Path<List<E>>
Returns:

getAnnotatedElement

public AnnotatedElement getAnnotatedElement()
Description copied from interface: Path
Return the annotated element related to the given path For property paths the annotated element contains the annotations of the related field and/or getter method and for all others paths the annotated element is the expression type.

Specified by:
getAnnotatedElement in interface Path<List<E>>
Returns:

getParameter

public Class<?> getParameter(int index)
Specified by:
getParameter in interface ParametrizedExpression<List<E>>
Returns:


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