FileDocCategorySizeDatePackage
FetchJoinNode.javaAPI DocGlassfish v2 API4029Tue May 22 16:54:38 BST 2007oracle.toplink.essentials.internal.parsing

FetchJoinNode

public class FetchJoinNode extends Node
INTERNAL

Purpose: Represent a FETCH JOIN declaration as part of the FROM clause: FETCH JOIN o.customer.

Responsibilities:

  • Manage the path node and the outer join flag of the FETCH JOIN clause.

Fields Summary
private Node
path
private boolean
outerJoin
Constructors Summary
Methods Summary
public oracle.toplink.essentials.internal.parsing.NodegetPath()

        return path;
    
public booleanisOuterJoin()

        return outerJoin;
    
public oracle.toplink.essentials.internal.parsing.NodequalifyAttributeAccess(oracle.toplink.essentials.internal.parsing.ParseTreeContext context)
INTERNAL Check the path child node for an unqualified field access and if so, replace it by a qualified field access.

        if (path != null) {
            path = path.qualifyAttributeAccess(context);
        }
        return this;
    
public voidsetOuterJoin(boolean outerJoin)

        this.outerJoin = outerJoin;
    
public voidsetPath(oracle.toplink.essentials.internal.parsing.Node node)

        path = node;
    
public voidvalidate(oracle.toplink.essentials.internal.parsing.ParseTreeContext context)
INTERNAL Validate node and calculate its type.

        if (path != null) {
            path.validate(context);
            setType(path.getType());

            // join of embedded attribute is not supported.
            if (path.isDotNode()) {
                TypeHelper typeHelper = context.getTypeHelper();
                VariableNode left = (VariableNode)path.getLeft();
                AttributeNode right = (AttributeNode)path.getRight();
                if ((left != null) && (right != null)) {
                    if (typeHelper.isEmbeddedAttribute(left.getType(), right.getAttributeName()))
                        throw EJBQLException.unsupportJoinArgument(
                            context.getQueryInfo(), getLine(), getColumn(), 
                            "Fetch Join", getType().toString());
                }
            }
        }