@Override public PathNode dupNode() { PathNode result = new PathNode(token, entityVariableName); dupChildren(result); return result; }
@Override public PathEntityReference addFieldPath(String fieldPath) { PathNode pathNode = new PathNode(JPA2Lexer.T_SELECTED_FIELD, entityVariableName); pathNode.addDefaultChildren(fieldPath); return new PathEntityReference(pathNode, entityName); }
public void addEntityInGroupBy(String entityAlias) { Tree groupBy = queryTree.getAstGroupByNode(); if (groupBy != null) { groupBy.addChild(new PathNode(JPA2Lexer.T_SELECTED_ENTITY, entityAlias)); groupBy.freshenParentAndChildIndexes(); } }
JpqlEntityModel entity = model.getEntityByName(entityName); String currentVariableName = pathNode.getEntityVariableName(); PathNode currentPathNode = new PathNode(pathNode.getToken(), currentVariableName); for (int i = 0; i < pathNode.getChildCount(); i++) { String fieldName = pathNode.getChild(i).toString(); pathNodes.add(currentPathNode); currentVariableName = currentPathNode.asPathString('_'); currentPathNode = new PathNode(pathNode.getToken(), currentVariableName); } else { currentPathNode.addDefaultChild(fieldName);
root_1 = (Object)adaptor.becomeRoot(new PathNode(T_SELECTED_FIELD, (identification_variable72!=null?input.toString(identification_variable72.start,identification_variable72.stop):null)), root_1);
root_1 = (Object)adaptor.becomeRoot(new PathNode(T_SELECTED_FIELD, (identification_variable41!=null?input.toString(identification_variable41.start,identification_variable41.stop):null)), root_1); root_1 = (Object)adaptor.becomeRoot(new PathNode(T_SELECTED_FIELD, (identification_variable47!=null?input.toString(identification_variable47.start,identification_variable47.stop):null)), root_1);
root_1 = (Object)adaptor.becomeRoot(new PathNode(T_SELECTED_ENTITY, (identification_variable101!=null?input.toString(identification_variable101.start,identification_variable101.stop):null)), root_1); adaptor.addChild(root_0, root_1);