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

ModifyNode

public abstract class ModifyNode extends QueryNode
INTERNAL: ModifyNode is the superclass for UpdateNode and DeleteNode

Fields Summary
private String
abstractSchemaIdentifier
private String
abstractSchemaName
Constructors Summary
Methods Summary
public voidapplyToQuery(oracle.toplink.essentials.queryframework.DatabaseQuery theQuery, oracle.toplink.essentials.internal.parsing.GenerationContext context)
INTERNAL Apply this node to the passed query. This node does not change the query.

    
public oracle.toplink.essentials.expressions.ExpressiongenerateExpression(oracle.toplink.essentials.internal.parsing.GenerationContext context)
INTERNAL

        return null;
    
public java.lang.StringgetAbstractSchemaIdentifier()
INTERNAL

        return abstractSchemaIdentifier;
    
public java.lang.StringgetAbstractSchemaName()
INTERNAL

        return abstractSchemaName;
    
public java.lang.StringgetCanonicalAbstractSchemaIdentifier()
INTERNAL: Returns the canonical name of abstract schema identifier. If the identifier is not specified(unqualified attribute scenario), the canonical name of abstract schema is returned.

        String variable = abstractSchemaIdentifier != null ?
                abstractSchemaIdentifier : abstractSchemaName;
        return IdentificationVariableDeclNode.calculateCanonicalName(variable);
    
public java.lang.ClassresolveClass(oracle.toplink.essentials.internal.parsing.GenerationContext context)
resolveClass: Answer the class which corresponds to my variableName. This is the class for an alias, where the variableName is registered to an alias.

        String alias = abstractSchemaName;
        ClassDescriptor descriptor = context.getSession().getDescriptorForAlias(alias);
        if (descriptor == null) {
            throw EJBQLException.unknownAbstractSchemaType2(
                context.getParseTreeContext().getQueryInfo(), 
                getLine(), getColumn(), alias);
        }
        Class theClass = descriptor.getJavaClass();
        if (theClass == null) {
            throw EJBQLException.resolutionClassNotFoundException2(
                context.getParseTreeContext().getQueryInfo(), 
                getLine(), getColumn(), alias);
        }
        return theClass;
    
public voidsetAbstractSchemaIdentifier(java.lang.String identifierName)
INTERNAL

        abstractSchemaIdentifier = identifierName;
    
public voidsetAbstractSchemaName(java.lang.String abstractSchemaName)
INTERNAL

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

        // If defined use the abstractSchemaIdentifier as the base variable,
        // otherwise use the abstractSchemaName 
        String baseVariable = getCanonicalAbstractSchemaIdentifier();
        context.setBaseVariable(baseVariable);
        super.validate(context);