/** */ private void validateTarget(Node node, ParseTreeContext context) { if (node.isDotNode()) { TypeHelper typeHelper = context.getTypeHelper(); Node path = node.getLeft(); Object type = path.getType(); AttributeNode attributeNode = (AttributeNode)node.getRight(); String attribute = attributeNode.getAttributeName(); if (typeHelper.isSingleValuedRelationship(type, attribute) || typeHelper.isSimpleStateAttribute(type, attribute)) { validateNavigation(path, context); } else { throw JPQLException.invalidSetClauseTarget( context.getQueryInfo(), attributeNode.getLine(), attributeNode.getColumn(), path.getAsString(), attribute); } } }
/** */ private void validateTarget(Node node, ParseTreeContext context) { if (node.isDotNode()) { TypeHelper typeHelper = context.getTypeHelper(); Node path = node.getLeft(); Object type = path.getType(); AttributeNode attributeNode = (AttributeNode)node.getRight(); String attribute = attributeNode.getAttributeName(); if (typeHelper.isSingleValuedRelationship(type, attribute) || typeHelper.isSimpleStateAttribute(type, attribute)) { validateNavigation(path, context); } else { throw JPQLException.invalidSetClauseTarget( context.getQueryInfo(), attributeNode.getLine(), attributeNode.getColumn(), path.getAsString(), attribute); } } }
/** */ private void validateTarget(Node node, ParseTreeContext context) { if (node.isDotNode()) { TypeHelper typeHelper = context.getTypeHelper(); Node path = node.getLeft(); Object type = path.getType(); AttributeNode attributeNode = (AttributeNode)node.getRight(); String attribute = attributeNode.getAttributeName(); if (typeHelper.isSingleValuedRelationship(type, attribute) || typeHelper.isSimpleStateAttribute(type, attribute)) { validateNavigation(path, context); } else { throw JPQLException.invalidSetClauseTarget( context.getQueryInfo(), attributeNode.getLine(), attributeNode.getColumn(), path.getAsString(), attribute); } } }