FileDocCategorySizeDatePackage
LiteralExpression.javaAPI DocGlassfish v2 API5514Tue May 22 16:54:32 BST 2007oracle.toplink.essentials.internal.expressions

LiteralExpression

public class LiteralExpression extends Expression
Used for wrapping literal values.

Fields Summary
protected String
value
protected Expression
localBase
Constructors Summary
public LiteralExpression()

        super();
    
public LiteralExpression(String newValue, Expression baseExpression)

        super();
        value = newValue;
        localBase = baseExpression;
    
Methods Summary
public java.lang.StringdescriptionOfNodeType()
INTERNAL: Used for debug printing.

        return "Literal";
    
public oracle.toplink.essentials.expressions.ExpressionBuildergetBuilder()
Return the expression builder which is the ultimate base of this expression, or null if there isn't one (shouldn't happen if we start from a root)

        return getLocalBase().getBuilder();
    
protected oracle.toplink.essentials.expressions.ExpressiongetLocalBase()

        return localBase;
    
public java.lang.StringgetValue()

        return value;
    
public booleanisLiteralExpression()

        return true;
    
protected voidpostCopyIn(java.util.Dictionary alreadyDone)
INTERNAL: Used for cloning.

        super.postCopyIn(alreadyDone);
        localBase = localBase.copiedVersionFrom(alreadyDone);
    
public voidprintSQL(oracle.toplink.essentials.internal.expressions.ExpressionSQLPrinter printer)
INTERNAL: Print SQL onto the stream, using the ExpressionPrinter for context

        printer.printString(value);
    
public voidprintSQLWithoutConversion(oracle.toplink.essentials.internal.expressions.ExpressionSQLPrinter printer)
INTERNAL: Print SQL, this is called from functions, so must not be converted through the mapping.

        printSQL(printer);
    
public oracle.toplink.essentials.expressions.ExpressionrebuildOn(oracle.toplink.essentials.expressions.Expression newBase)
INTERNAL: This expression is built on a different base than the one we want. Rebuild it and return the root of the new tree

        Expression result = (LiteralExpression)clone();
        result.setLocalBase(getLocalBase().rebuildOn(newBase));
        return result;
    
public voidsetLocalBase(oracle.toplink.essentials.expressions.Expression e)

        localBase = e;
    
public oracle.toplink.essentials.expressions.ExpressiontwistedForBaseAndContext(oracle.toplink.essentials.expressions.Expression newBase, oracle.toplink.essentials.expressions.Expression context)
INTERNAL: Rebuild myself against the base, with the values of parameters supplied by the context expression. This is used for transforming a standalone expression (e.g. the join criteria of a mapping) into part of some larger expression. You normally would not call this directly, instead calling twist See the comment there for more details"

        return (Expression)this.clone();
    
public java.lang.ObjectvalueFromObject(java.lang.Object object, oracle.toplink.essentials.internal.sessions.AbstractSession session, oracle.toplink.essentials.internal.sessions.AbstractRecord translationRow, oracle.toplink.essentials.queryframework.InMemoryQueryIndirectionPolicy valueHolderPolicy, boolean isObjectUnregistered)
INTERNAL: Return the value for in memory comparison. This is only valid for valueable expressions.

        return getLocalBase().getFieldValue(getValue());
    
public voidwriteDescriptionOn(java.io.BufferedWriter writer)
INTERNAL: Used to print a debug form of the expression tree.

        writer.write(getValue().toString());