org.apache.openjpa.persistence.criteria
Class Joins.SingularJoin<Z,X>

java.lang.Object
  extended by org.apache.openjpa.persistence.criteria.SelectionImpl<X>
      extended by org.apache.openjpa.persistence.criteria.ExpressionImpl<X>
          extended by org.apache.openjpa.persistence.criteria.PathImpl<Z,X>
              extended by org.apache.openjpa.persistence.criteria.FromImpl<Z,X>
                  extended by org.apache.openjpa.persistence.criteria.Joins.SingularJoin<Z,X>
Type Parameters:
Z - type from which joining
X - type of the attribute being joined
All Implemented Interfaces:
Expression<X>, FetchParent<Z,X>, From<Z,X>, Join<Z,X>, Path<X>, Selection<X>, TupleElement<X>, CriteriaExpression
Enclosing class:
Joins

static class Joins.SingularJoin<Z,X>
extends FromImpl<Z,X>
implements Join<Z,X>

Join a single-valued attribute.


Field Summary
 
Fields inherited from class org.apache.openjpa.persistence.criteria.PathImpl
_member, _parent
 
Constructor Summary
Joins.SingularJoin(FromImpl<?,Z> from, Members.SingularAttributeImpl<? super Z,X> member, JoinType jt)
           
 
Method Summary
 StringBuilder asVariable(AliasContext q)
          Get a string representation of this node as a variable in the context of the given query.
 Attribute<? super Z,?> getAttribute()
          Return the metamodel attribute corresponding to the join.
 JoinType getJoinType()
           
 Members.Member<? extends Z,X> getMember()
           
 FromImpl<?,Z> getParent()
           
 void setImplicitContainsTypes(Value val1, Value val2, int op)
          Set the implicit types of the given values based on the fact that the first is supposed to contain the second.
 Expression toKernelExpression(ExpressionFactory factory, CriteriaQueryImpl<?> c)
          Bridge contract to convert this facade expression to a kernel expression.
 Value toValue(ExpressionFactory factory, CriteriaQueryImpl<?> c)
          Convert this path to a kernel path.
 
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
asValue, get, get, get, get, getCorrelatedJoin, getCorrelatedPath, getCorrelatedRoot, getEmbeddedFieldMetaData, getInnermostMember, getInnermostParentPath, getModel, 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, getModel, 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

Joins.SingularJoin

public Joins.SingularJoin(FromImpl<?,Z> from,
                          Members.SingularAttributeImpl<? super Z,X> member,
                          JoinType jt)
Method Detail

getJoinType

public JoinType getJoinType()
Specified by:
getJoinType in interface Join<Z,X>

getParent

public FromImpl<?,Z> getParent()
Specified by:
getParent in interface Join<Z,X>

getMember

public Members.Member<? extends Z,X> getMember()
Overrides:
getMember in class PathImpl<Z,X>

getAttribute

public Attribute<? super Z,?> getAttribute()
Return the metamodel attribute corresponding to the join.

Specified by:
getAttribute in interface Join<Z,X>
Returns:
metamodel attribute type corresponding to the join

toValue

public Value toValue(ExpressionFactory factory,
                     CriteriaQueryImpl<?> c)
Description copied from class: PathImpl
Convert this path to a kernel path.

Overrides:
toValue in class PathImpl<Z,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)
Description copied from class: ExpressionImpl
Bridge contract to convert this facade expression 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

setImplicitContainsTypes

public void setImplicitContainsTypes(Value val1,
                                     Value val2,
                                     int op)
Set the implicit types of the given values based on the fact that the first is supposed to contain the second.


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<Z,X>


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