org.axiondb
Class Literal

java.lang.Object
  extended by org.axiondb.BaseSelectable
      extended by org.axiondb.Literal
All Implemented Interfaces:
Serializable, Selectable
Direct Known Subclasses:
BindVariable

public class Literal
extends BaseSelectable
implements Selectable

A typedliteral value.

Version:
$Revision: 1.16 $ $Date: 2005/12/20 18:32:40 $
See Also:
Serialized Form

Field Summary
protected  Object _value
           
 
Fields inherited from class org.axiondb.BaseSelectable
_hash
 
Constructor Summary
protected Literal(DataType type)
           
  Literal(Object value)
           
  Literal(Object value, DataType type)
           
 
Method Summary
 boolean equals(Object otherobject)
          Returns true iff otherobject is a Literalwhose name are equal to mine.
 Object evaluate()
           
 Object evaluate(RowDecorator row)
           
 DataType getDataType()
           
 String getLabel()
          Returns my Literal name.
 String getName()
          Returns the name of Literal, if any.
 int hashCode()
          Returns a hash code in keeping with the standard equals/ hashCodecontract.
 void setDataType(DataType type)
           
 String toString()
          Returns a String representation of me, suitable for debugging output.
 
Methods inherited from class org.axiondb.BaseSelectable
getAlias, setAlias, setName, setVariableContext
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.axiondb.Selectable
getAlias, setVariableContext
 

Field Detail

_value

protected Object _value
Constructor Detail

Literal

public Literal(Object value)

Literal

public Literal(Object value,
               DataType type)

Literal

protected Literal(DataType type)
Method Detail

equals

public boolean equals(Object otherobject)
Returns true iff otherobject is a Literalwhose name are equal to mine.

Overrides:
equals in class Object

evaluate

public Object evaluate()
                throws AxionException
Throws:
AxionException

evaluate

public final Object evaluate(RowDecorator row)
                      throws AxionException
Specified by:
evaluate in interface Selectable
Parameters:
row - is ignored and may be null.
Throws:
AxionException
See Also:
evaluate()

getDataType

public DataType getDataType()
Specified by:
getDataType in interface Selectable

hashCode

public int hashCode()
Returns a hash code in keeping with the standard equals/ hashCodecontract.

Overrides:
hashCode in class Object

setDataType

public void setDataType(DataType type)

getLabel

public String getLabel()
Returns my Literal name.

Specified by:
getLabel in interface Selectable
Overrides:
getLabel in class BaseSelectable

getName

public String getName()
Returns the name of Literal, if any.

Specified by:
getName in interface Selectable
Overrides:
getName in class BaseSelectable

toString

public String toString()
Returns a String representation of me, suitable for debugging output.

Overrides:
toString in class Object