FileDocCategorySizeDatePackage
ConcatNode.javaAPI DocGlassfish v2 API3267Tue May 22 16:54:36 BST 2007oracle.toplink.essentials.internal.parsing

ConcatNode

public class ConcatNode extends StringFunctionNode
INTERNAL

Purpose: Represent a CONCAT in EJBQL

Responsibilities:

  • Generate the correct expression for a CONCAT in EJBQL
author
Jon Driscoll and Joel Lucuik
since
TopLink 4.0

Fields Summary
Constructors Summary
public ConcatNode()
ConcatNode constructor comment.

        super();
    
Methods Summary
public oracle.toplink.essentials.expressions.ExpressiongenerateExpression(oracle.toplink.essentials.internal.parsing.GenerationContext context)
INTERNAL Generate the TopLink expression for this node

        Expression whereClause = getLeft().generateExpression(context);
        whereClause = whereClause.concat(getRight().generateExpression(context));
        return whereClause;
    
public voidvalidate(oracle.toplink.essentials.internal.parsing.ParseTreeContext context)
INTERNAL Validate node and calculate its type.

        super.validate(context);
        TypeHelper typeHelper = context.getTypeHelper();
        if ((left != null) && (right != null)) {
            left.validateParameter(context, typeHelper.getStringType());
            right.validateParameter(context, typeHelper.getStringType());
        }
        setType(typeHelper.getStringType());