org.teiid.language
Class Literal

java.lang.Object
  extended by org.teiid.language.BaseLanguageObject
      extended by org.teiid.language.Literal
All Implemented Interfaces:
Expression, LanguageObject

public class Literal
extends BaseLanguageObject
implements Expression

Represents a literal value that is used in an expression. The value can be obtained and should match the type specified by getType()


Constructor Summary
Literal(java.lang.Object value, java.lang.Class<?> type)
           
 
Method Summary
 void acceptVisitor(LanguageObjectVisitor visitor)
           
 java.lang.Class<?> getType()
          Determine the type returned by this expression.
 java.lang.Object getValue()
           
 boolean isBindEligible()
          Set by the optimizer if the literal was created by the evaluation of another expression.
 boolean isBindValue()
           
 boolean isMultiValued()
           
 void setBindEligible(boolean isBindEligible)
           
 void setBindValue(boolean bindValue)
           
 void setMultiValued(boolean multiValued)
           
 void setType(java.lang.Class<?> type)
           
 void setValue(java.lang.Object value)
           
 
Methods inherited from class org.teiid.language.BaseLanguageObject
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Literal

public Literal(java.lang.Object value,
               java.lang.Class<?> type)
Method Detail

getValue

public java.lang.Object getValue()

acceptVisitor

public void acceptVisitor(LanguageObjectVisitor visitor)
Specified by:
acceptVisitor in interface LanguageObject

getType

public java.lang.Class<?> getType()
Description copied from interface: Expression
Determine the type returned by this expression.

Specified by:
getType in interface Expression
Returns:
The type, as defined by a Java class

setValue

public void setValue(java.lang.Object value)

isBindValue

public boolean isBindValue()

setBindValue

public void setBindValue(boolean bindValue)

isMultiValued

public boolean isMultiValued()

setMultiValued

public void setMultiValued(boolean multiValued)

setType

public void setType(java.lang.Class<?> type)

isBindEligible

public boolean isBindEligible()
Set by the optimizer if the literal was created by the evaluation of another expression. Setting to true will not always result in the value being handled as a bind value. That can be forced isBindValue()

Returns:

setBindEligible

public void setBindEligible(boolean isBindEligible)


Copyright © 2011. All Rights Reserved.