org.eclipse.birt.report.model.api.elements.structures
Class ComputedColumn

java.lang.Object
  extended byorg.eclipse.birt.report.model.core.Structure
      extended byorg.eclipse.birt.report.model.api.elements.structures.ComputedColumn
All Implemented Interfaces:
java.lang.Cloneable, org.eclipse.birt.report.model.core.IPropertySet, IStructure

public class ComputedColumn
extends org.eclipse.birt.report.model.core.Structure

Represents one computed column. A computed column is a ¡°virtual¡± column produced as an expression of other columns within the data set.

This is a managed object, meaning that all changes should be made though the command layer so that they can be undone and redone. Each computed column has the following properties:

Column Name
a computed column has a required column name.
Expression
expression of the computation for the column.


Field Summary
static java.lang.String COLUMN_NAME_MEMBER
          Deprecated. using NAME_MEMBER instead.
static java.lang.String COMPUTED_COLUMN_STRUCT
          Name of this structure.
static java.lang.String DATA_TYPE_MEMBER
          Name of the data-type member.
static java.lang.String EXPRESSION_MEMBER
          Name of the expression member.
static java.lang.String NAME_MEMBER
          Name of the column name member.
 
Constructor Summary
ComputedColumn()
           
 
Method Summary
 java.lang.String getColumnName()
          Deprecated. using getName() instead.
 java.lang.String getDataType()
          Returns the data type of this column.
 java.lang.String getExpression()
          Returns the expression to compute.
protected  java.lang.Object getIntrinsicProperty(java.lang.String memberName)
           
 java.lang.String getName()
          Returns the column name.
 java.lang.String getStructName()
          Returns the name of the structure definition.
 StructureHandle handle(SimpleValueHandle valueHandle, int index)
           
 void setColumnName(java.lang.String columnName)
          Deprecated. using setName(String) instead.
 void setDataType(java.lang.String dataType)
          Sets the data type of this column.
 void setExpression(java.lang.String expression)
          Sets the expression.
protected  void setIntrinsicProperty(java.lang.String propName, java.lang.Object value)
           
 void setName(java.lang.String name)
          Sets the column name
 java.util.List validate(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)
          Validates this structure.
 
Methods inherited from class org.eclipse.birt.report.model.core.Structure
copy, getDefn, getHandle, getHandle, getLocalProperty, getLocalProperty, getObjectDefn, getProperty, getProperty, getReferencableProperty, isReferencable, setProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPUTED_COLUMN_STRUCT

public static final java.lang.String COMPUTED_COLUMN_STRUCT
Name of this structure. Matches the definition in the meta-data dictionary.

See Also:
Constant Field Values

NAME_MEMBER

public static final java.lang.String NAME_MEMBER
Name of the column name member.

See Also:
Constant Field Values

COLUMN_NAME_MEMBER

public static final java.lang.String COLUMN_NAME_MEMBER
Deprecated. using NAME_MEMBER instead.

Name of the column name member.

See Also:
Constant Field Values

EXPRESSION_MEMBER

public static final java.lang.String EXPRESSION_MEMBER
Name of the expression member.

See Also:
Constant Field Values

DATA_TYPE_MEMBER

public static final java.lang.String DATA_TYPE_MEMBER
Name of the data-type member.

See Also:
Constant Field Values
Constructor Detail

ComputedColumn

public ComputedColumn()
Method Detail

getStructName

public java.lang.String getStructName()
Description copied from interface: IStructure
Returns the name of the structure definition. The name is the one used to define the structure in the meta-data dictionary.

Returns:
the internal name of the structure a defined in the meta-data dictionary.

getIntrinsicProperty

protected java.lang.Object getIntrinsicProperty(java.lang.String memberName)

setIntrinsicProperty

protected void setIntrinsicProperty(java.lang.String propName,
                                    java.lang.Object value)

getColumnName

public java.lang.String getColumnName()
Deprecated. using getName() instead.

Returns the column name.

Returns:
the column name

getName

public java.lang.String getName()
Returns the column name.

Returns:
the column name

setColumnName

public void setColumnName(java.lang.String columnName)
Deprecated. using setName(String) instead.

Sets the column name.

Parameters:
columnName - the column name to set

setName

public void setName(java.lang.String name)
Sets the column name

Parameters:
name - the column name to set.

getExpression

public java.lang.String getExpression()
Returns the expression to compute.

Returns:
the expression to compute

setExpression

public void setExpression(java.lang.String expression)
Sets the expression.

Parameters:
expression - the expression to set

handle

public StructureHandle handle(SimpleValueHandle valueHandle,
                              int index)

validate

public java.util.List validate(org.eclipse.birt.report.model.core.Module module,
                               org.eclipse.birt.report.model.core.DesignElement element)
Validates this structure. The following are the rules:

See Also:
Structure.validate(Module, org.eclipse.birt.report.model.core.DesignElement)

getDataType

public java.lang.String getDataType()
Returns the data type of this column. The possible values are defined in DesignChoiceConstants, and they are:

Returns:
the data type of this column.

setDataType

public void setDataType(java.lang.String dataType)
Sets the data type of this column. The allowed values are defined in DesignChoiceConstants, and they are:

Parameters:
dataType - the data type to set


Copyright © 2005 Actuate Corp. All rights reserved.