com.mysema.query.types.path
Class ArrayPath<E>

java.lang.Object
  extended by com.mysema.query.types.ExpressionBase<T>
      extended by com.mysema.query.types.expr.SimpleExpression<E[]>
          extended by com.mysema.query.types.path.ArrayPath<E>
Type Parameters:
E - component type
All Implemented Interfaces:
ArrayExpression<E>, Expression<E[]>, Path<E[]>, Serializable
Direct Known Subclasses:
Point

public class ArrayPath<E>
extends SimpleExpression<E[]>
implements Path<E[]>, ArrayExpression<E>

ArrayPath represents an array typed path

Author:
tiwe
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.mysema.query.types.expr.SimpleExpression
primitive
 
Constructor Summary
ArrayPath(Class<? super E[]> type, Path<?> parent, String property)
           
ArrayPath(Class<? super E[]> type, PathMetadata<?> metadata)
           
ArrayPath(Class<? super E[]> type, String variable)
           
 
Method Summary
<R,C> R
accept(Visitor<R,C> v, C context)
          Accept the visitor with the given context
 boolean equals(Object o)
           
 SimplePath<E> get(Expression<Integer> index)
          Create a expression for indexed access
 SimplePath<E> get(int index)
          Create a expression for 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
 Path<?> getRoot()
          Get the root for this path
 int hashCode()
           
 NumberExpression<Integer> size()
          Create an expression for the array size
 
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.Expression
getType
 

Constructor Detail

ArrayPath

public ArrayPath(Class<? super E[]> type,
                 String variable)

ArrayPath

public ArrayPath(Class<? super E[]> type,
                 Path<?> parent,
                 String property)

ArrayPath

public ArrayPath(Class<? super E[]> type,
                 PathMetadata<?> metadata)
Method Detail

accept

public <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<E[]>
Type Parameters:
R - return type
C - context type
Parameters:
v - visitor
context - context of visit
Returns:

equals

public boolean equals(Object o)
Specified by:
equals in class SimpleExpression<E[]>

get

public SimplePath<E> get(Expression<Integer> index)
Create a expression for indexed access

Specified by:
get in interface ArrayExpression<E>
Parameters:
index -
Returns:

get

public SimplePath<E> get(@Nonnegative
                         int index)
Create a expression for indexed access

Specified by:
get in interface ArrayExpression<E>
Parameters:
index -
Returns:

getElementType

public Class<E> getElementType()

getMetadata

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

Specified by:
getMetadata in interface Path<E[]>
Returns:

getRoot

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

Specified by:
getRoot in interface Path<E[]>
Returns:

hashCode

public int hashCode()
Overrides:
hashCode in class SimpleExpression<E[]>

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<E[]>
Returns:

size

public NumberExpression<Integer> size()
Create an expression for the array size

Specified by:
size in interface ArrayExpression<E>
Returns:


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