Class BeanPath<T>

Type Parameters:
T - expression type
All Implemented Interfaces:
Expression<T>, Path<T>, Serializable
Direct Known Subclasses:
EntityPathBase

public class BeanPath<T> extends SimpleExpression<T> implements Path<T>
BeanPath represents bean paths
Author:
tiwe
See Also:
  • Constructor Details

  • Method Details

    • 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<T>
      Type Parameters:
      R - return type
      C - context type
      Parameters:
      v - visitor
      context - context of visit
      Returns:
      result of visit
    • as

      public <U extends BeanPath<? extends T>> U as(Class<U> clazz)
      Cast the path to a subtype querytype
      Type Parameters:
      U -
      Parameters:
      clazz - subtype class
      Returns:
      subtype instance with the same identity
    • add

      protected <P extends Path<?>> P add(P path)
      Template method for tracking child path creation
      Type Parameters:
      P -
      Parameters:
      path - path to be tracked
      Returns:
      path
    • createArray

      protected <A, E> ArrayPath<A,E> createArray(String property, Class<? super A> type)
      Create a new array path
      Type Parameters:
      A -
      Parameters:
      property - property name
      type - property type
      Returns:
      property path
    • createBoolean

      protected BooleanPath createBoolean(String property)
      Create a new Boolean path
      Parameters:
      property - property name
      Returns:
      property path
    • createCollection

      protected <A, Q extends SimpleExpression<? super A>> CollectionPath<A,Q> createCollection(String property, Class<? super A> type, Class<? super Q> queryType, PathInits inits)
      Create a new Collection typed path
      Type Parameters:
      A -
      Parameters:
      property - property name
      type - property type
      Returns:
      property path
    • createComparable

      protected <A extends Comparable> ComparablePath<A> createComparable(String property, Class<? super A> type)
      Create a new Comparable typed path
      Type Parameters:
      A -
      Parameters:
      property - property name
      type - property type
      Returns:
      property path
    • createEnum

      protected <A extends Enum<A>> EnumPath<A> createEnum(String property, Class<A> type)
      Create a new Enum path
      Type Parameters:
      A -
      Parameters:
      property - property name
      type - property type
      Returns:
      property path
    • createDate

      protected <A extends Comparable> DatePath<A> createDate(String property, Class<? super A> type)
      Create a new Date path
      Type Parameters:
      A -
      Parameters:
      property - property name
      type - property type
      Returns:
      property path
    • createDateTime

      protected <A extends Comparable> DateTimePath<A> createDateTime(String property, Class<? super A> type)
      Create a new DateTime path
      Type Parameters:
      A -
      Parameters:
      property - property name
      type - property type
      Returns:
      property path
    • createList

      protected <A, E extends SimpleExpression<? super A>> ListPath<A,E> createList(String property, Class<? super A> type, Class<? super E> queryType, PathInits inits)
      Create a new List typed path
      Type Parameters:
      A -
      E -
      Parameters:
      property - property name
      type - property type
      queryType - expression type
      Returns:
      property path
    • createMap

      protected <K, V, E extends SimpleExpression<? super V>> MapPath<K,V,E> createMap(String property, Class<? super K> key, Class<? super V> value, Class<? super E> queryType)
      Create a new Map typed path
      Type Parameters:
      K -
      V -
      E -
      Parameters:
      property - property name
      key - key type
      value - value type
      queryType - expression type
      Returns:
      property path
    • createNumber

      protected <A extends Number & Comparable<?>> NumberPath<A> createNumber(String property, Class<? super A> type)
      Create a new Number path
      Type Parameters:
      A -
      Parameters:
      property - property name
      type - property type
      Returns:
      property path
    • createSet

      protected <A, E extends SimpleExpression<? super A>> SetPath<A,E> createSet(String property, Class<? super A> type, Class<? super E> queryType, PathInits inits)
      Create a new Set typed path
      Type Parameters:
      A -
      Parameters:
      property - property name
      type - property type
      Returns:
      property path
    • createSimple

      protected <A> SimplePath<A> createSimple(String property, Class<? super A> type)
      Create a new Simple path
      Type Parameters:
      A -
      Parameters:
      property - property name
      type - property type
      Returns:
      property path
    • createString

      protected StringPath createString(String property)
      Create a new String path
      Parameters:
      property - property name
      Returns:
      property path
    • createTime

      protected <A extends Comparable> TimePath<A> createTime(String property, Class<? super A> type)
      Create a new Time path
      Type Parameters:
      A -
      Parameters:
      property - property name
      type - property type
      Returns:
      property path
    • forProperty

      protected PathMetadata forProperty(String property)
    • getMetadata

      public PathMetadata getMetadata()
      Description copied from interface: Path
      Get the metadata for this path
      Specified by:
      getMetadata in interface Path<T>
      Returns:
      path metadata
    • getRoot

      public Path<?> getRoot()
      Description copied from interface: Path
      Get the root for this path
      Specified by:
      getRoot in interface Path<T>
      Returns:
      root of path
    • instanceOf

      public <B extends T> BooleanExpression instanceOf(Class<B> type)
      Create an this instanceOf type expression
      Type Parameters:
      B -
      Parameters:
      type - rhs of the expression
      Returns:
      instanceof expression
    • instanceOfAny

      public BooleanExpression instanceOfAny(Class... types)
    • 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<T>
      Returns:
      annotated element