1 21 package oracle.toplink.essentials.internal.parsing; 23 24 import oracle.toplink.essentials.exceptions.EJBQLException; 25 33 public class JoinDeclNode extends IdentificationVariableDeclNode { 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 super.validate(context); 64 if (path != null) { 65 path.validate(context); 66 setType(path.getType()); 67 68 if (path.isDotNode()) { 70 TypeHelper typeHelper = context.getTypeHelper(); 71 VariableNode left = (VariableNode)path.getLeft(); 72 AttributeNode right = (AttributeNode)path.getRight(); 73 if ((left != null) && (right != null)) { 74 if (typeHelper.isEmbeddedAttribute(left.getType(), right.getAttributeName())) 75 throw EJBQLException.unsupportJoinArgument("Join", getType().toString()); 76 } 77 } 78 } 79 } 80 } 81 | Popular Tags |