org.eclipse.birt.data.engine.api.querydefn
Class BaseExpression

java.lang.Object
  extended byorg.eclipse.birt.data.engine.api.querydefn.BaseExpression
All Implemented Interfaces:
IBaseExpression
Direct Known Subclasses:
ConditionalExpression, ScriptExpression

public abstract class BaseExpression
extends java.lang.Object
implements IBaseExpression

Default implementation of the IBaseExpression interface.


Field Summary
protected  int dataType
           
protected  java.lang.Object handle
           
 
Constructor Summary
BaseExpression()
          Constructs an instance with unknown data type
BaseExpression(int dataType)
          Constructs an instance with specified data type
 
Method Summary
 int getDataType()
          Gets the data type of the expression.
 java.lang.Object getHandle()
          Returns the handle associated with the expression.
 java.lang.String getID()
          Every expression has its own unique id.
 void setDataType(int dataType)
          Sets the data type of the expression
 void setHandle(java.lang.Object handle)
          Associates the expression with the provided handle.
 void setID(java.lang.String exprID)
          ID can be automatically generated by expression concrete class or be set externally.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataType

protected int dataType

handle

protected java.lang.Object handle
Constructor Detail

BaseExpression

public BaseExpression()
Constructs an instance with unknown data type


BaseExpression

public BaseExpression(int dataType)
Constructs an instance with specified data type

Method Detail

getID

public java.lang.String getID()
Description copied from interface: IBaseExpression
Every expression has its own unique id. A typical use case is in presentation time. An expression id will be used as the key to retrieve expression value rather than to evaluate expression handle

Specified by:
getID in interface IBaseExpression
Returns:
unique expression id

setID

public void setID(java.lang.String exprID)
Description copied from interface: IBaseExpression
ID can be automatically generated by expression concrete class or be set externally. In expression preparation process, the latter approach is used since a unique ID needs to be guranteed.

Specified by:
setID in interface IBaseExpression
Parameters:
exprID -

getDataType

public int getDataType()
Description copied from interface: IBaseExpression
Gets the data type of the expression. Acceptable return values are those enumeration constants defined in the org.eclipse.birt.core.data.DataType class. If the result data type of the expression is not known, return UNKNOWN_TYPE.

Specified by:
getDataType in interface IBaseExpression
See Also:
IBaseExpression.getDataType()

setDataType

public void setDataType(int dataType)
Sets the data type of the expression


getHandle

public java.lang.Object getHandle()
Description copied from interface: IBaseExpression
Returns the handle associated with the expression.

Specified by:
getHandle in interface IBaseExpression
Returns:
the expression execution handle.
See Also:
IBaseExpression.getHandle()

setHandle

public void setHandle(java.lang.Object handle)
Description copied from interface: IBaseExpression
Associates the expression with the provided handle.

Specified by:
setHandle in interface IBaseExpression
See Also:
IBaseExpression.setHandle(java.lang.Object)


Copyright © 2005 Actuate Corp. All rights reserved.