Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.openjpa.persistence.criteria
Class RootImpl<X>

    java.lang.Object
      org.apache.openjpa.persistence.criteria.SelectionImpl<X>
          org.apache.openjpa.persistence.criteria.ExpressionImpl<X>
              org.apache.openjpa.persistence.criteria.PathImpl<Z,X>
                  org.apache.openjpa.persistence.criteria.FromImpl<X,X>
                      org.apache.openjpa.persistence.criteria.RootImpl<X>

Type Parameters:
  `X` - the type of the entity

All Implemented Interfaces:
  Expression<X>, FetchParent<X,X>, From<X,X>, Path<X>, Root<X>, Selection<X>, TupleElement<X>, CriteriaExpression

     class RootImpl<X>

extends FromImpl<X,X>
implements Root<X>

A root path without a parent.

Since:
  2.0.0
Author:
  Pinaki Poddar, Fay Wang

Field Summary

Fields inherited from class org.apache.openjpa.persistence.criteria.PathImpl
`_member, _parent`

Constructor Summary
`RootImpl(Types.Entity<X> type)`

Method Summary
`void` | `addToContext(ExpressionFactory factory, MetamodelImpl model, CriteriaQueryImpl<?> q)`
`StringBuilder` | `asValue(AliasContext q)` Get a string representation of this node as a value in the context of the given query.
`StringBuilder` | `asVariable(AliasContext q)` Get a string representation of this node as a variable in the context of the given query.
`EntityType<X>` | `getModel()` Returns the bindable object that corresponds to the path expression.
`Expression` | `toKernelExpression(ExpressionFactory factory, CriteriaQueryImpl<?> c)` Convert this path to a kernel expression.
`Value` | `toValue(ExpressionFactory factory, CriteriaQueryImpl<?> c)` Convert this path to a kernel path value.

Methods inherited from class org.apache.openjpa.persistence.criteria.FromImpl
`acceptVisit, assertJoinable, fetch, fetch, fetch, fetch, fetch, fetch, getCorrelationParent, getFetches, getJoins, getType, join, join, join, join, join, join, join, join, join, join, join, join, joinCollection, joinCollection, joinList, joinList, joinMap, joinMap, joinSet, joinSet`

Methods inherited from class org.apache.openjpa.persistence.criteria.PathImpl
`get, get, get, get, getCorrelatedJoin, getCorrelatedPath, getCorrelatedRoot, getEmbeddedFieldMetaData, getInnermostMember, getInnermostParentPath, getMember, getParentPath, inSubquery, isCorrelated, setCorrelatedPath, traversePath, type`

Methods inherited from class org.apache.openjpa.persistence.criteria.ExpressionImpl
`as, in, in, in, in, isNotNull, isNull`

Methods inherited from class org.apache.openjpa.persistence.criteria.SelectionImpl
`alias, asProjection, assertValidName, getAlias, getCompoundSelectionItems, getJavaType, isAliased, isAutoAliased, isCompoundSelection, setAutoAlias`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface javax.persistence.criteria.From
`getCorrelationParent, getJoins, isCorrelated, join, join, join, join, join, join, join, join, join, join, join, join, joinCollection, joinCollection, joinList, joinList, joinMap, joinMap, joinSet, joinSet`

Methods inherited from interface javax.persistence.criteria.Path
`get, get, get, get, getParentPath, type`

Methods inherited from interface javax.persistence.criteria.Expression
`as, in, in, in, in, isNotNull, isNull`

Methods inherited from interface javax.persistence.criteria.Selection
`alias, getCompoundSelectionItems, isCompoundSelection`

Methods inherited from interface javax.persistence.TupleElement
`getAlias, getJavaType`

Methods inherited from interface javax.persistence.criteria.FetchParent
`fetch, fetch, fetch, fetch, fetch, fetch, getFetches`

Constructor Detail

### RootImpl

    public RootImpl(Types.Entity<X> type)

Method Detail

### getModel

    public EntityType<X> getModel()

  Description copied from class: `PathImpl`
  Returns the bindable object that corresponds to the path expression.

  Specified by:
    `getModel` in interface `Path<X>`
  Specified by:
    `getModel` in interface `Root<X>`
  Overrides:
    `getModel` in class `PathImpl<X,X>`

### addToContext

    public void addToContext(ExpressionFactory factory,
                             MetamodelImpl model,
                             CriteriaQueryImpl<?> q)

### toValue

    public Value toValue(ExpressionFactory factory,
                         CriteriaQueryImpl<?> c)

  Convert this path to a kernel path value.

  Overrides:
    `toValue` in class `PathImpl<X,X>`
  Parameters:
    `factory` - creates the kernel expression
    `c` - the query definition context of this expression
  Returns:
    an equivalent kernel value

### toKernelExpression

    public Expression toKernelExpression(ExpressionFactory factory,
                                         CriteriaQueryImpl<?> c)

  Convert this path to a kernel expression.

  Overrides:
    `toKernelExpression` in class `ExpressionImpl<X>`
  Parameters:
    `factory` - creates the kernel expression
    `c` - the query definition context of this expression
  Returns:
    an equivalent kernel expression

### asValue

    public StringBuilder asValue(AliasContext q)

  Description copied from interface: `CriteriaExpression`
  Get a string representation of this node as a value in the context of the given query.

  Specified by:
    `asValue` in interface `CriteriaExpression`
  Overrides:
    `asValue` in class `PathImpl<X,X>`

### asVariable

    public StringBuilder asVariable(AliasContext q)

  Description copied from interface: `CriteriaExpression`
  Get a string representation of this node as a variable in the context of the given query.

  Specified by:
    `asVariable` in interface `CriteriaExpression`
  Overrides:
    `asVariable` in class `PathImpl<X,X>`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.