org.apache.openjpa.persistence.query
Class JoinPath

java.lang.Object
  extended by org.apache.openjpa.persistence.query.AbstractVisitable
      extended by org.apache.openjpa.persistence.query.ExpressionImpl
          extended by org.apache.openjpa.persistence.query.AbstractPath
              extended by org.apache.openjpa.persistence.query.AbstractDomainObject
                  extended by org.apache.openjpa.persistence.query.JoinPath
All Implemented Interfaces:
Serializable, DomainObject, Expression, OrderByItem, PathExpression, PredicateOperand, QueryDefinition, SelectItem, Subquery, Visitable

public class JoinPath
extends AbstractDomainObject
implements DomainObject

Path resulting by joining from a parent path via an attribute.

Author:
Pinaki Poddar
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.openjpa.persistence.query.AbstractPath
_operator, _owner, _parent, _part2
 
Fields inherited from class org.apache.openjpa.persistence.query.AbstractVisitable
CLOSE_BRACE, COMMA, EMPTY, OPEN_BRACE, SPACE
 
Constructor Summary
JoinPath(AbstractDomainObject parent, PathOperator join, String attr)
           
 
Method Summary
 String asExpression(AliasContext ctx)
          Get a JPQL fragment as used in WHERE clause.
 String asJoinable(AliasContext ctx)
          Gets the string representation in FROM clause.
 String asProjection(AliasContext ctx)
          Gets the string representation in SELECT projection.
 String getAliasHint(AliasContext ctx)
          Gets the hint to be used while creating alias.
 String getLastSegment()
          Gets the last segment of this path.
 AbstractDomainObject getParent()
          Gets the parent from which this receiver has been derived.
 String toString()
           
 
Methods inherited from class org.apache.openjpa.persistence.query.AbstractDomainObject
addRoot, addSubqueryRoot, all, any, coalesce, coalesce, coalesce, coalesce, currentDate, currentTime, currentTimestamp, entry, exists, generalCase, get, groupBy, groupBy, having, index, join, joinFetch, key, leftJoin, leftJoinFetch, literal, literal, literal, literal, literal, literal, literal, literal, newInstance, nullif, nullif, nullif, nullif, nullif, nullif, nullif, nullLiteral, orderBy, orderBy, param, predicate, select, select, selectDistinct, selectDistinct, simpleCase, simpleCase, simpleCase, simpleCase, simpleCase, simpleCase, simpleCase, some, value, where
 
Methods inherited from class org.apache.openjpa.persistence.query.AbstractPath
avg, count, getOperator, getOwner, isEmpty, max, min, size, split, sum, type
 
Methods inherited from class org.apache.openjpa.persistence.query.ExpressionImpl
abs, asc, between, between, between, between, between, between, between, between, between, between, between, between, between, concat, concat, desc, dividedBy, dividedBy, equal, equal, equal, equal, equal, equal, equal, equal, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, in, in, in, in, in, in, isNull, length, lessEqual, lessEqual, lessEqual, lessEqual, lessEqual, lessThan, lessThan, lessThan, lessThan, lessThan, like, like, like, like, like, like, locate, locate, locate, locate, locate, locate, lower, member, minus, minus, minus, mod, mod, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, plus, plus, sqrt, substring, substring, substring, substring, substring, substring, times, times, trim, trim, trim, trim, trim, trim, upper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.openjpa.persistence.query.DomainObject
entry, index, join, joinFetch, key, leftJoin, leftJoinFetch, value
 
Methods inherited from interface org.apache.openjpa.persistence.query.PathExpression
avg, count, get, isEmpty, max, min, size, sum, type
 
Methods inherited from interface org.apache.openjpa.persistence.query.Expression
abs, concat, concat, dividedBy, dividedBy, in, in, in, in, in, in, isNull, length, locate, locate, locate, locate, locate, locate, lower, member, minus, minus, minus, mod, mod, plus, plus, sqrt, substring, substring, substring, substring, substring, substring, times, times, trim, trim, trim, trim, trim, trim, upper
 
Methods inherited from interface org.apache.openjpa.persistence.query.SelectItem
asc, desc
 
Methods inherited from interface org.apache.openjpa.persistence.query.QueryDefinition
addRoot, addSubqueryRoot, all, any, coalesce, coalesce, coalesce, coalesce, currentDate, currentTime, currentTimestamp, exists, generalCase, groupBy, groupBy, having, literal, literal, literal, literal, literal, literal, literal, literal, newInstance, nullif, nullif, nullif, nullif, nullif, nullif, nullif, nullLiteral, orderBy, orderBy, param, predicate, select, select, selectDistinct, selectDistinct, simpleCase, simpleCase, simpleCase, simpleCase, simpleCase, simpleCase, simpleCase, some, where
 
Methods inherited from interface org.apache.openjpa.persistence.query.PredicateOperand
between, between, between, between, between, between, between, between, between, between, between, between, between, equal, equal, equal, equal, equal, equal, equal, equal, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, lessEqual, lessEqual, lessEqual, lessEqual, lessEqual, lessThan, lessThan, lessThan, lessThan, lessThan, like, like, like, like, like, like, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual
 

Constructor Detail

JoinPath

public JoinPath(AbstractDomainObject parent,
                PathOperator join,
                String attr)
Method Detail

getAliasHint

public String getAliasHint(AliasContext ctx)
Description copied from interface: Visitable
Gets the hint to be used while creating alias.

Specified by:
getAliasHint in interface Visitable
Overrides:
getAliasHint in class ExpressionImpl

getLastSegment

public String getLastSegment()
Description copied from class: AbstractPath
Gets the last segment of this path. Concrete implementation should return a covariant type.

Overrides:
getLastSegment in class AbstractPath

getParent

public AbstractDomainObject getParent()
Description copied from class: AbstractPath
Gets the parent from which this receiver has been derived. Can be null for a root path.

Overrides:
getParent in class AbstractPath

asJoinable

public String asJoinable(AliasContext ctx)
Description copied from interface: Visitable
Gets the string representation in FROM clause.

Specified by:
asJoinable in interface Visitable
Overrides:
asJoinable in class AbstractVisitable

asExpression

public String asExpression(AliasContext ctx)
Description copied from interface: Visitable
Get a JPQL fragment as used in WHERE clause.

Specified by:
asExpression in interface Visitable
Overrides:
asExpression in class AbstractVisitable

asProjection

public String asProjection(AliasContext ctx)
Description copied from interface: Visitable
Gets the string representation in SELECT projection.

Specified by:
asProjection in interface Visitable
Overrides:
asProjection in class AbstractVisitable

toString

public String toString()
Overrides:
toString in class Object


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