Class EJBQLPathTranslator
java.lang.Object
org.apache.cayenne.ejbql.EJBQLBaseVisitor
org.apache.cayenne.access.translator.ejbql.EJBQLPathTranslator
- All Implemented Interfaces:
- EJBQLExpressionVisitor
public abstract class EJBQLPathTranslator extends EJBQLBaseVisitor
A translator that walks the relationship/attribute path, appending joins to
 the query.
- Since:
- 3.0
- 
Field SummaryFields Modifier and Type Field Description protected ObjEntitycurrentEntityprotected StringfullPathprotected StringidPathprotected booleaninnerJoinprotected StringjoinMarkerprotected StringlastAliasprotected StringlastPathComponentFields inherited from class org.apache.cayenne.ejbql.EJBQLBaseVisitorcontinueFlag
- 
Constructor SummaryConstructors Constructor Description EJBQLPathTranslator(EJBQLTranslationContext context)
- 
Method SummaryModifier and Type Method Description protected abstract voidappendMultiColumnPath(EJBQLMultiColumnOperand operand)protected DbRelationshipchooseDbRelationship(ObjRelationship relationship)Checks if the object relationship is flattened and then chooses the corresponding db relationship.booleanisUsingAliases()protected voidprocessIntermediatePathComponent()protected voidprocessLastPathComponent()protected voidprocessTerminatingAttribute(ObjAttribute attribute)protected voidprocessTerminatingRelationship(ObjRelationship relationship)protected voidresolveJoin()protected voidresolveLastPathComponent(String pathComponent)voidsetUsingAliases(boolean usingAliases)booleanvisitIdentificationVariable(EJBQLExpression expression)booleanvisitIdentifier(EJBQLExpression expression)booleanvisitPath(EJBQLExpression expression, int finishedChildIndex)Called on visiting "path" expression and also after visiting every expression child.Methods inherited from class org.apache.cayenne.ejbql.EJBQLBaseVisitorvisitAbs, visitAbstractSchemaName, visitAdd, visitAggregate, visitAll, visitAnd, visitAny, visitAscending, visitAverage, visitBetween, visitBooleanLiteral, visitClassName, visitConcat, visitConstructor, visitConstructorParameter, visitConstructorParameters, visitCount, visitCurrentDate, visitCurrentTime, visitCurrentTimestamp, visitDbPath, visitDecimalLiteral, visitDelete, visitDescending, visitDistinct, visitDivide, visitEquals, visitEscapeCharacter, visitExists, visitFrom, visitFromItem, visitGreaterOrEqual, visitGreaterThan, visitGroupBy, visitHaving, visitIn, visitInnerFetchJoin, visitInnerJoin, visitIntegerLiteral, visitIsEmpty, visitIsNull, visitLength, visitLessOrEqual, visitLessThan, visitLike, visitLocate, visitLower, visitMax, visitMemberOf, visitMin, visitMod, visitMultiply, visitNamedInputParameter, visitNamedInputParameterForIn, visitNegative, visitNot, visitNotEquals, visitOr, visitOrderBy, visitOrderByItem, visitOuterFetchJoin, visitOuterJoin, visitPatternValue, visitPositionalInputParameter, visitPositionalInputParameterForIn, visitSelect, visitSelectClause, visitSelectExpression, visitSelectExpressions, visitSize, visitSqrt, visitStringLiteral, visitSubselect, visitSubstring, visitSubtract, visitSum, visitTok, visitTrim, visitTrimBoth, visitTrimCharacter, visitTrimLeading, visitTrimTrailing, visitUpdate, visitUpdateField, visitUpdateItem, visitUpdateValue, visitUpper, visitWhere
- 
Field Details- 
currentEntity
- 
lastPathComponent
- 
innerJoinprotected boolean innerJoin
- 
lastAlias
- 
idPath
- 
joinMarker
- 
fullPath
 
- 
- 
Constructor Details- 
EJBQLPathTranslator
 
- 
- 
Method Details- 
appendMultiColumnPath
- 
visitPathDescription copied from interface:EJBQLExpressionVisitorCalled on visiting "path" expression and also after visiting every expression child.- Specified by:
- visitPathin interface- EJBQLExpressionVisitor
- Overrides:
- visitPathin class- EJBQLBaseVisitor
- Parameters:
- expression- a "path" node being visited.
- finishedChildIndex- "-1" when the expression node is visited for the first time, before its children; otherwise this is an index of a child just visited.
 
- 
visitIdentifier- Specified by:
- visitIdentifierin interface- EJBQLExpressionVisitor
- Overrides:
- visitIdentifierin class- EJBQLBaseVisitor
 
- 
visitIdentificationVariable- Specified by:
- visitIdentificationVariablein interface- EJBQLExpressionVisitor
- Overrides:
- visitIdentificationVariablein class- EJBQLBaseVisitor
 
- 
resolveLastPathComponent- Since:
- 4.0
 
- 
resolveJoinprotected void resolveJoin()
- 
processIntermediatePathComponentprotected void processIntermediatePathComponent()
- 
processLastPathComponentprotected void processLastPathComponent()
- 
processTerminatingAttribute
- 
processTerminatingRelationship
- 
chooseDbRelationshipChecks if the object relationship is flattened and then chooses the corresponding db relationship. The last in idPath if isFlattened and the first in list otherwise.- Parameters:
- relationship- the object relationship
- Returns:
- DbRelationship
 
- 
isUsingAliasespublic boolean isUsingAliases()
- 
setUsingAliasespublic void setUsingAliases(boolean usingAliases)
 
-