Class EJBQLPathTranslator
java.lang.Object
org.apache.cayenne.ejbql.EJBQLBaseVisitor
org.apache.cayenne.access.translator.ejbql.EJBQLPathTranslator
- All Implemented Interfaces:
EJBQLExpressionVisitor
A translator that walks the relationship/attribute path, appending joins to
the query.
- Since:
- 3.0
-
Field Summary
Modifier and TypeFieldDescriptionprotected ObjEntity
protected String
protected String
protected boolean
protected String
protected String
protected String
Fields inherited from class org.apache.cayenne.ejbql.EJBQLBaseVisitor
continueFlag
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
protected DbRelationship
chooseDbRelationship
(ObjRelationship relationship) Checks if the object relationship is flattened and then chooses the corresponding db relationship.boolean
protected void
protected void
protected void
processTerminatingAttribute
(ObjAttribute attribute) protected void
processTerminatingRelationship
(ObjRelationship relationship) protected void
protected void
resolveLastPathComponent
(String pathComponent) void
setUsingAliases
(boolean usingAliases) boolean
visitIdentificationVariable
(EJBQLExpression expression) boolean
visitIdentifier
(EJBQLExpression expression) boolean
visitPath
(EJBQLExpression expression, int finishedChildIndex) Called on visiting "path" expression and also after visiting every expression child.Methods inherited from class org.apache.cayenne.ejbql.EJBQLBaseVisitor
visitAbs, 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
-
innerJoin
protected boolean innerJoin -
lastAlias
-
idPath
-
joinMarker
-
fullPath
-
-
Constructor Details
-
EJBQLPathTranslator
-
-
Method Details
-
appendMultiColumnPath
-
visitPath
Description copied from interface:EJBQLExpressionVisitor
Called on visiting "path" expression and also after visiting every expression child.- Specified by:
visitPath
in interfaceEJBQLExpressionVisitor
- Overrides:
visitPath
in classEJBQLBaseVisitor
- 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:
visitIdentifier
in interfaceEJBQLExpressionVisitor
- Overrides:
visitIdentifier
in classEJBQLBaseVisitor
-
visitIdentificationVariable
- Specified by:
visitIdentificationVariable
in interfaceEJBQLExpressionVisitor
- Overrides:
visitIdentificationVariable
in classEJBQLBaseVisitor
-
resolveLastPathComponent
- Since:
- 4.0
-
resolveJoin
protected void resolveJoin() -
processIntermediatePathComponent
protected void processIntermediatePathComponent() -
processLastPathComponent
protected void processLastPathComponent() -
processTerminatingAttribute
-
processTerminatingRelationship
-
chooseDbRelationship
Checks 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
-
isUsingAliases
public boolean isUsingAliases() -
setUsingAliases
public void setUsingAliases(boolean usingAliases)
-