Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.websphere.query.base
Class Function

    java.lang.Object
      com.ibm.websphere.query.base.Function

All Implemented Interfaces:
  IFunction, IFunctionElement, ILeftOperand, IOrderByElement, IRightOperand, IStringBuilder, java.io.Serializable

    public class Function

extends java.lang.Object
implements IFunction

The Function class represents a function in the query framework. It can be used in a predicate, an order by, and wherever appropriate.

This class contains a name and a vector of elements to describe a typical function. For example, a simple function "upper(name)" is described with an instance of Function class whose name = "upper" and function element = Attribute("name")

See Also:
  Serialized Form

Constructor Summary
`Function()` Default contructor.
`Function(java.lang.String newName)` Creates a new Function instance with the given name.
`Function(java.lang.String newName, IFunctionElement newFunctionElement)` Creates a new Function instance with the given name, and function element.
`Function(java.lang.String newName, IFunctionElement[] newFunctionElements)` Creates a new Function instance with the given name, and an array of function elements.

Method Summary
`void` | `addFunctionElement(IFunctionElement functionElement)` Adds a function element the function element vector.
`java.lang.String` | `buildString(ISelectQueryCallback builder)` Builds a query string for the function.
`void` | `buildString(ISelectQueryCallback builder, java.lang.StringBuffer sb)`
`boolean` | `equals(java.lang.Object o)` Tests for equality with the given object.
`int` | `getDataType()` Returns the data type of the value.
`IFunctionElement[]` | `getFunctionElements()` Returns the function elements as an array.
`java.lang.String` | `getName()` Returns the function name.
`int` | `hashCode()` Computes a hash code for the function.
`void` | `setFunctionElement(IFunctionElement newFunctionElement)` Sets the function element of the condition.
`void` | `setFunctionElements(IFunctionElement[] newFunctionElements)` Sets the function elements of the condition.
`void` | `setName(java.lang.String newName)` Sets the function name.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Function

    public Function()

  Default contructor.

### Function

    public Function(java.lang.String newName)

  Creates a new Function instance with the given name.

### Function

    public Function(java.lang.String newName,
                    IFunctionElement[] newFunctionElements)

  Creates a new Function instance with the given name, and an array of function elements.

### Function

    public Function(java.lang.String newName,
                    IFunctionElement newFunctionElement)

  Creates a new Function instance with the given name, and function element.

Method Detail

### addFunctionElement

    public void addFunctionElement(IFunctionElement functionElement)

  Adds a function element the function element vector.

### buildString

    public java.lang.String buildString(ISelectQueryCallback builder)
                                 throws QueryException

  Builds a query string for the function.

  Specified by:
    `buildString` in interface `IStringBuilder`
  Throws:
    `QueryException`

### buildString

    public void buildString(ISelectQueryCallback builder,
                            java.lang.StringBuffer sb)
                     throws QueryException

  Specified by:
    `buildString` in interface `IStringBuilder`
  Throws:
    `QueryException`

### equals

    public boolean equals(java.lang.Object o)

  Tests for equality with the given object.

  Overrides:
    `equals` in class `java.lang.Object`

### getFunctionElements

    public IFunctionElement[] getFunctionElements()

  Returns the function elements as an array.

  Specified by:
    `getFunctionElements` in interface `IFunction`

### getName

    public java.lang.String getName()

  Returns the function name.

  Specified by:
    `getName` in interface `IFunction`

### hashCode

    public int hashCode()

  Computes a hash code for the function.

  Overrides:
    `hashCode` in class `java.lang.Object`

### setFunctionElement

    public void setFunctionElement(IFunctionElement newFunctionElement)

  Sets the function element of the condition.

### setFunctionElements

    public void setFunctionElements(IFunctionElement[] newFunctionElements)

  Sets the function elements of the condition.

### setName

    public void setName(java.lang.String newName)

  Sets the function name.

### getDataType

    public int getDataType()

  Description copied from interface: `ILeftOperand`
  Returns the data type of the value.

  Specified by:
    `getDataType` in interface `IFunctionElement`
  Specified by:
    `getDataType` in interface `ILeftOperand`
  See Also:
    `ILeftOperand.getDataType()`

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD