コード例 #1
0
 public Object newVariableDecl(int line, int column, Object path, String variable) {
   DotNode dotNode = (DotNode) path;
   AttributeNode rightNode = (AttributeNode) dotNode.getRight();
   JoinDeclNode node = new JoinDeclNode();
   node.setPath(dotNode);
   node.setVariableName(variable);
   setPosition(node, line, column);
   context.registerJoinVariable(node.getCanonicalVariableName(), dotNode, line, column);
   currentIdentificationVariable = variable;
   return node;
 }
コード例 #2
0
 public Object newFetchJoin(int line, int column, boolean outerJoin, Object path) {
   DotNode dotNode = (DotNode) path;
   AttributeNode rightNode = (AttributeNode) dotNode.getRight();
   rightNode.setOuterJoin(outerJoin);
   // register the dot expression to be added as joined attribute
   FetchJoinNode node = new FetchJoinNode();
   node.setPath(dotNode);
   node.setOuterJoin(outerJoin);
   setPosition(node, line, column);
   context.registerFetchJoin(dotNode.getLeft().getAsString(), dotNode);
   return node;
 }
コード例 #3
0
 public Object newCollectionMemberVariableDecl(
     int line, int column, Object path, String variable) {
   DotNode dotNode = (DotNode) path;
   AttributeNode rightNode = (AttributeNode) dotNode.getRight();
   // The IN-clause expression must be a collection valued path expression
   rightNode.setRequiresCollectionAttribute(true);
   CollectionMemberDeclNode node = new CollectionMemberDeclNode();
   node.setPath(dotNode);
   node.setVariableName(variable);
   setPosition(node, line, column);
   context.registerJoinVariable(node.getCanonicalVariableName(), dotNode, line, column);
   currentIdentificationVariable = variable;
   return node;
 }