org.axiondb.functions
Class BaseFunction

java.lang.Object
  extended by org.axiondb.BaseSelectable
      extended by org.axiondb.functions.BaseFunction
All Implemented Interfaces:
Serializable, Function, ConcreteFunction, Selectable
Direct Known Subclasses:
ABSFunction, AggregateBigDecimalFunction, ArithmeticFunction, AsciiFunction, AverageFunction, Base64DecodeFunction, Base64EncodeFunction, BaseBooleanBranchFunction, BitAndFunction, BitOrFunction, CastAsFunction, CharFunction, CharToDateFunction, CoalesceFunction, ComparisonFunction, ConcatFunction, ContainsFunction, CountFunction, DateAddFunction, DateDiffFunction, DatePartFunction, DateToCharFunction, ExistsFunction, IfThenFunction, InFunction, InStringFunction, IsNotNullFunction, IsNullFunction, IsValidDateTimeFunction, LengthFunction, LikeToRegexpFunction, Log10Function, LowerFunction, LPadFunction, LTrimFunction, MatchesFunction, ModFunction, NotExistsFunction, NotFunction, NotInFunction, NowFunction, ReplaceFunction, RoundFunction, RowNumFunction, RPadFunction, RTrimFunction, SignFunction, SoundexFunction, SpaceFunction, SubstringFunction, TruncateFunction, UpperFunction

public abstract class BaseFunction
extends BaseSelectable
implements ConcreteFunction

An abstract base ConcreteFunctionimplementation.

Version:
$Revision: 1.9 $ $Date: 2004/07/30 01:46:15 $
See Also:
Serialized Form

Constructor Summary
BaseFunction(String name)
           
 
Method Summary
 void addArgument(Selectable arg)
          Append the given Selectableto my argument list.
 String getAlias()
          Returns the Alias name of this function.
 Selectable getArgument(int i)
          Returns the Selectableat the given index.
 int getArgumentCount()
          Returns the number of arguments in my argument list.
abstract  DataType getDataType()
           
 String getLabel()
          Returns my function alias or name.
 String getName()
          Returns the cannonical name of this function.
abstract  boolean isValid()
           
 void setAlias(String alias)
          Set the Alias name of this function.
 void setArgument(int i, Selectable arg)
           
 void setName(String name)
           
 void setVariableContext(VariableContext context)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.axiondb.Selectable
evaluate
 

Constructor Detail

BaseFunction

public BaseFunction(String name)
Method Detail

getDataType

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

isValid

public abstract boolean isValid()
Specified by:
isValid in interface ConcreteFunction

getLabel

public String getLabel()
Returns my function alias or name.

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

getAlias

public String getAlias()
Description copied from interface: Function
Returns the Alias name of this function.

Specified by:
getAlias in interface Function
Specified by:
getAlias in interface Selectable

setAlias

public void setAlias(String alias)
Description copied from interface: Function
Set the Alias name of this function.

Specified by:
setAlias in interface Function

setName

public void setName(String name)

getName

public String getName()
Description copied from interface: Function
Returns the cannonical name of this function.

Specified by:
getName in interface Function
Specified by:
getName in interface Selectable

addArgument

public void addArgument(Selectable arg)
Description copied from interface: Function
Append the given Selectableto my argument list.

Specified by:
addArgument in interface Function

getArgumentCount

public int getArgumentCount()
Description copied from interface: Function
Returns the number of arguments in my argument list.

Specified by:
getArgumentCount in interface Function

getArgument

public Selectable getArgument(int i)
Description copied from interface: Function
Returns the Selectableat the given index.

Specified by:
getArgument in interface Function

setArgument

public void setArgument(int i,
                        Selectable arg)
Specified by:
setArgument in interface Function

toString

public String toString()
Overrides:
toString in class Object

setVariableContext

public void setVariableContext(VariableContext context)
Specified by:
setVariableContext in interface Selectable
Overrides:
setVariableContext in class BaseSelectable