1 21 package oracle.toplink.essentials.internal.parsing; 23 24 import oracle.toplink.essentials.exceptions.EJBQLException; 25 33 public class FetchJoinNode extends Node { 34 35 private Node path; 36 private boolean outerJoin; 37 38 39 public Node getPath() { 40 return path; 41 } 42 43 44 public void setPath(Node node) { 45 path = node; 46 } 47 48 49 public boolean isOuterJoin() { 50 return outerJoin; 51 } 52 53 54 public void setOuterJoin(boolean outerJoin) { 55 this.outerJoin = outerJoin; 56 } 57 58 62 public void validate(ParseTreeContext context) { 63 if (path != null) { 64 path.validate(context); 65 setType(path.getType()); 66 67 if (path.isDotNode()) { 69 TypeHelper typeHelper = context.getTypeHelper(); 70 VariableNode left = (VariableNode)path.getLeft(); 71 AttributeNode right = (AttributeNode)path.getRight(); 72 if ((left != null) && (right != null)) { 73 if (typeHelper.isEmbeddedAttribute(left.getType(), right.getAttributeName())) 74 throw EJBQLException.unsupportJoinArgument("Fetch Join", getType().toString()); 75 } 76 } 77 } 78 } 79 } 80 | Popular Tags |