Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


oracle.dss.selection.calcStep
Class CalcStep

java.lang.Object
  |
  +--oracle.dss.selection.step.Step
        |
        +--oracle.dss.selection.calcStep.CalcStep
All Implemented Interfaces:
java.lang.Cloneable, ObjectFactory, Persistable, java.io.Serializable, StringXMLizable, VectorClone
Direct Known Subclasses:
RankStep, RelationshipCalcStep, RelationshipIndexStep, RelationshipShareStep, SimpleMathCalcStep, TimeCalcStep

public class CalcStep
extends Step
implements java.lang.Cloneable, java.io.Serializable, Persistable, ObjectFactory

The CalcStep base class stores all information related to a particular calc step.

See Also:
Serialized Form

Field Summary
static boolean _DEBUG
           
static int CALCTYPE_ADDITION
          Arithmetic type Ids.
static int CALCTYPE_ARITHMETIC_END
          End arithemtic calculation types.
static int CALCTYPE_ARITHMETIC_START
          Start arithemtic calculation types.
static int CALCTYPE_CUMULATIVETOTAL
           
static int CALCTYPE_DIFFERENCE
          Relationship type Ids.
static int CALCTYPE_DIVISION
           
static int CALCTYPE_END
          End of the calculation types.
static int CALCTYPE_INDEX
           
static int CALCTYPE_LAG
          TimeSeries type Ids.
static int CALCTYPE_LAGDIFFERENCE
           
static int CALCTYPE_LAGPERCENT
           
static int CALCTYPE_LEAD
           
static int CALCTYPE_MOVINGAVERAGE
           
static int CALCTYPE_MOVINGMAXIMUM
           
static int CALCTYPE_MOVINGMINIMUM
           
static int CALCTYPE_MOVINGTOTAL
           
static int CALCTYPE_MULTIPLICATION
           
static int CALCTYPE_PERCENTDIFFERENCE
           
static int CALCTYPE_PERCENTMARKUP
           
static int CALCTYPE_PERCENTVARIANCE
           
static int CALCTYPE_RANK
           
static int CALCTYPE_RATIO
           
static int CALCTYPE_SHARE
           
static int CALCTYPE_START
          Start of the calculation types.
static int CALCTYPE_SUBTRACTION
           
static int CALCTYPE_VARIANCE
           
static int CALCTYPE_YEARTODATE
           
static int OPERAND_BASE_MEASURE
          Constants defining the operands of the CalcSteps.
static int OPERAND_DIMENSION
          Constants defining the operands of the CalcSteps.
static int OPERAND_DIMMEMBER
          Constants defining the operands of the CalcSteps.
static int OPERAND_HIERARCHY
          Constants defining the operands of the CalcSteps.
static int OPERAND_LEFT
          Constants defining the operands of the CalcSteps.
static int OPERAND_LEVEL
          Constants defining the operands of the CalcSteps.
static int OPERAND_MEASURE
          Constants defining the operands of the CalcSteps.
static int OPERAND_MEMBER
          Constants defining the operands of the CalcSteps.
static int OPERAND_MEMBER_DIMMEMBER
          Constants defining the operands of the CalcSteps.
static int OPERAND_MEMBER_LEVEL
          Constants defining the operands of the CalcSteps.
static int OPERAND_MEMBERTYPE
          Constants defining the operands of the CalcSteps.
static int OPERAND_RANKORDER
          Constants defining the operands of the CalcSteps.
static int OPERAND_RIGHT
          Constants defining the operands of the CalcSteps.
static int OPERAND_TARGET_MEASURE
          Constants defining the operands of the CalcSteps.
static int OPERAND_TIME_DIMMEMBER
          Constants defining the operands of the CalcSteps.
static char STRING_DELIMITER
          String delimiter.

 

Fields inherited from class oracle.dss.selection.step.Step
ADD, BASE_STATE_INDEX, CURRENT_STATE_INDEX, KEEP, LONG, MEDIUM, REMOVE, SELECT, SHORT

 

Constructor Summary
CalcStep()
          Default constructor for calculation step.

 

Method Summary
 java.lang.Object clone()
          Clones a copy of this Calculation step object.
 void copyProps(CalcStep calcStepTarget)
          Copy common fields from one calc step to another.
 void dump()
          Sends to the console a list of registered object types and their classnames.
 boolean equals(java.lang.Object obj)
          Tests this Step for true equality
 java.lang.String getDescription()
          Retrieves the description association with calc step.
 java.lang.String getDescription(int nType)
          Retrieves the description of this Step object that is generated by the StepView object.
 java.lang.String getEvaluatorClassName()
          Retrieves the evaluator class name name associated with the calc step.
 java.lang.String getFolder()
          Retrieves the error association with calc step.
 java.lang.String getID()
          Retrieves the ID associated with the calc.
 CalcStep getInstance(java.lang.String strXML, PersistableAttributes persistableAttributes)
          Retrieves an instance of the CalcStep from the stored XML stream.
 java.util.Vector getMeasureDependencyIDs(java.lang.String measDim)
          Get measure unique ID dependencies in this step
 java.lang.String getNumberFormatString()
          Retrieves the number format mask that specifies how a number should be formatted.
 PersistableAttributes getPersistableAttributes(PersistableAttributes attrs)
          Retrieves a list of searchable attributes
 AggregateInfo[] getPersistableComponents()
          Retrieves a list of Persistable components that this Persistable component aggregates.
 int getType()
          Retrieves the type of this calc (e.g.
 java.lang.String getViewClassName()
          Retrieves the view class name name associated with the calc step.
 java.lang.Object getXML( context)
          Returns the XML representation of the object.
 java.lang.String getXMLAsString()
          Retrieves the XML stream of the persistable component
 void initialize(java.util.Hashtable env)
          Initializes the component with the persistence environment.
static boolean isType(int nType)
          Determines with the specified type really represents a type
 void setDescription(java.lang.String strDescription)
          Specifies the description association with calc step.
 void setFolder(java.lang.String strFolder)
          Specifies the name of the folder where this calc step should be stored.
 void setID(java.lang.String strID)
          Specifies the ID associated with the calc step.
 void setNumberFormatString(java.lang.String strNumberFormatString)
          Specifies how a number should be formatted based on the specified format mask.
 void setPersistableAttributes(PersistableAttributes attrs)
          Sets a list of searchable attributes.
 void setPersistableComponents(AggregateInfo[] persistables)
          Sets a list of Persistable components that this Persistable component aggregates.
 void setType(int nType)
          Specifies the type of this calc (e.g.
 void setXML( context, java.lang.Object node)
          Sets the XML representation of the object.
 boolean setXMLAsString(java.lang.String strXML)
          Sets the XML stream of the persistable component.
 java.lang.String toString()
          Generates the string representation of this CalcStep object.
 boolean updateCalcValue(CalcValue calcValue, java.lang.String strID)
          Updates the CalcValue based on specifed ID.

 

Methods inherited from class oracle.dss.selection.step.Step
addPropertyChangeListener, copyFrom, getAction, getDimension, getDispQDR, getEvaluatorClass, getHierarchy, getQDR, getQDRDescription, isEnabled, isValid, removePropertyChangeListener, setAction, setDescription, setDimension, setDispQDR, setEnabled, setHierarchy, setQDR, setQDRDescription, setValid

 

Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Methods inherited from interface oracle.dss.bicontext.ObjectFactory
getObjectInstanceClassName, setObjectInstanceClassName

 

Field Detail

CALCTYPE_ARITHMETIC_START

public static final int CALCTYPE_ARITHMETIC_START
Start arithemtic calculation types.

CALCTYPE_ARITHMETIC_END

public static final int CALCTYPE_ARITHMETIC_END
End arithemtic calculation types.

CALCTYPE_ADDITION

public static final int CALCTYPE_ADDITION
Arithmetic type Ids.

CALCTYPE_DIVISION

public static final int CALCTYPE_DIVISION

CALCTYPE_MULTIPLICATION

public static final int CALCTYPE_MULTIPLICATION

CALCTYPE_SUBTRACTION

public static final int CALCTYPE_SUBTRACTION

CALCTYPE_DIFFERENCE

public static final int CALCTYPE_DIFFERENCE
Relationship type Ids.

CALCTYPE_INDEX

public static final int CALCTYPE_INDEX

CALCTYPE_PERCENTDIFFERENCE

public static final int CALCTYPE_PERCENTDIFFERENCE

CALCTYPE_PERCENTMARKUP

public static final int CALCTYPE_PERCENTMARKUP

CALCTYPE_PERCENTVARIANCE

public static final int CALCTYPE_PERCENTVARIANCE

CALCTYPE_RANK

public static final int CALCTYPE_RANK

CALCTYPE_RATIO

public static final int CALCTYPE_RATIO

CALCTYPE_SHARE

public static final int CALCTYPE_SHARE

CALCTYPE_VARIANCE

public static final int CALCTYPE_VARIANCE

CALCTYPE_LAG

public static final int CALCTYPE_LAG
TimeSeries type Ids.

CALCTYPE_LAGPERCENT

public static final int CALCTYPE_LAGPERCENT

CALCTYPE_LAGDIFFERENCE

public static final int CALCTYPE_LAGDIFFERENCE

CALCTYPE_LEAD

public static final int CALCTYPE_LEAD

CALCTYPE_YEARTODATE

public static final int CALCTYPE_YEARTODATE

CALCTYPE_MOVINGAVERAGE

public static final int CALCTYPE_MOVINGAVERAGE

CALCTYPE_MOVINGMINIMUM

public static final int CALCTYPE_MOVINGMINIMUM

CALCTYPE_MOVINGMAXIMUM

public static final int CALCTYPE_MOVINGMAXIMUM

CALCTYPE_MOVINGTOTAL

public static final int CALCTYPE_MOVINGTOTAL

CALCTYPE_CUMULATIVETOTAL

public static final int CALCTYPE_CUMULATIVETOTAL

CALCTYPE_START

public static final int CALCTYPE_START
Start of the calculation types.

CALCTYPE_END

public static final int CALCTYPE_END
End of the calculation types.

_DEBUG

public static final boolean _DEBUG

STRING_DELIMITER

public static final char STRING_DELIMITER
String delimiter.

OPERAND_LEFT

public static final int OPERAND_LEFT
Constants defining the operands of the CalcSteps. Left operand.

OPERAND_RIGHT

public static final int OPERAND_RIGHT
Constants defining the operands of the CalcSteps. Right operand.

OPERAND_MEASURE

public static final int OPERAND_MEASURE
Constants defining the operands of the CalcSteps. Measure operand.

OPERAND_DIMENSION

public static final int OPERAND_DIMENSION
Constants defining the operands of the CalcSteps. Dimension operand.

OPERAND_LEVEL

public static final int OPERAND_LEVEL
Constants defining the operands of the CalcSteps. Level operand.

OPERAND_DIMMEMBER

public static final int OPERAND_DIMMEMBER
Constants defining the operands of the CalcSteps. Dimension member operand.

OPERAND_TIME_DIMMEMBER

public static final int OPERAND_TIME_DIMMEMBER
Constants defining the operands of the CalcSteps. Time dimension member operand.

OPERAND_HIERARCHY

public static final int OPERAND_HIERARCHY
Constants defining the operands of the CalcSteps. Hierarchy operand.

OPERAND_MEMBER

public static final int OPERAND_MEMBER
Constants defining the operands of the CalcSteps. "Relative to Member" operand. "Within" operand in Cumulative Total and Rank.

OPERAND_MEMBERTYPE

public static final int OPERAND_MEMBERTYPE
Constants defining the operands of the CalcSteps. "Relative to Member" type operand. "Within" type operand in Cumulative Total and Rank.

OPERAND_MEMBER_LEVEL

public static final int OPERAND_MEMBER_LEVEL
Constants defining the operands of the CalcSteps. "Relative to Member" level operand. "Within" level operand in Cumulative Total and Rank.

OPERAND_MEMBER_DIMMEMBER

public static final int OPERAND_MEMBER_DIMMEMBER
Constants defining the operands of the CalcSteps. "Relative to Member"dimension member operand.

OPERAND_BASE_MEASURE

public static final int OPERAND_BASE_MEASURE
Constants defining the operands of the CalcSteps. Base measure on the calendar to go template

OPERAND_TARGET_MEASURE

public static final int OPERAND_TARGET_MEASURE
Constants defining the operands of the CalcSteps. Target measure on the calendar to go operand

OPERAND_RANKORDER

public static final int OPERAND_RANKORDER
Constants defining the operands of the CalcSteps. Rank order for the Rank operand
Constructor Detail

CalcStep

public CalcStep()
Default constructor for calculation step.
Method Detail

equals

public boolean equals(java.lang.Object obj)
Tests this Step for true equality
Overrides:
equals in class Step
Parameters:
obj - Step to compare it to
Returns:
true if completely internally equal

getMeasureDependencyIDs

public java.util.Vector getMeasureDependencyIDs(java.lang.String measDim)
Get measure unique ID dependencies in this step
Overrides:
getMeasureDependencyIDs in class Step
Parameters:
measDim - the measure dimension ID for those steps that need to know if they have measure members
Returns:
Vector of measures this step depends on, as unique ID Strings null if none

getDescription

public java.lang.String getDescription()
Retrieves the description association with calc step. Description of what the calculation does (e.g. "Calculates my total sales").
Returns:
String which represents the description.

setDescription

public void setDescription(java.lang.String strDescription)
Specifies the description association with calc step. Description of what the calculation does (e.g. "Calculates my total sales").
Parameters:
strDescription - a String value that represents the calculation description.

getFolder

public java.lang.String getFolder()
Retrieves the error association with calc step.
Returns:
String which represents the folder associated with the calc step.

setFolder

public void setFolder(java.lang.String strFolder)
Specifies the name of the folder where this calc step should be stored.
Parameters:
strFolder - a String value that represents the folder associated with the calc step.

getID

public java.lang.String getID()
Retrieves the ID associated with the calc. This has traditionally been referred to as an SVN in Express.
Returns:
String which represents the ID associated with the calc step.

setID

public void setID(java.lang.String strID)
Specifies the ID associated with the calc step. This has traditionally been referred to as an SVN in Express.
Parameters:
strID - a String value that represents the ID associated with the calc step.

getType

public int getType()
Retrieves the type of this calc (e.g. Index, addition etc)
Returns:
int which represents the type associated with the calc step.

setType

public void setType(int nType)
Specifies the type of this calc (e.g. Index, addition etc)
Parameters:
nType - a int value that represents the type associated with the calc step.

setNumberFormatString

public void setNumberFormatString(java.lang.String strNumberFormatString)
Specifies how a number should be formatted based on the specified format mask.
Parameters:
strNumberFormatString - A String value which contains the number format mask.

getNumberFormatString

public java.lang.String getNumberFormatString()
Retrieves the number format mask that specifies how a number should be formatted.
Returns:
String which is the number format mask being used.

getViewClassName

public java.lang.String getViewClassName()
Retrieves the view class name name associated with the calc step. Note: If the view class name is null, the Template page in the wizard will be omitted, and the user will be taken directly to the Custom Formula Editor page
Overrides:
getViewClassName in class Step
Returns:
String which represents the view class name.

getEvaluatorClassName

public java.lang.String getEvaluatorClassName()
Retrieves the evaluator class name name associated with the calc step.
Returns:
String which represents the evaluator class name.

updateCalcValue

public boolean updateCalcValue(CalcValue calcValue,
                               java.lang.String strID)
Updates the CalcValue based on specifed ID.
Parameters:
calcValue - a CalcValue that represents the object that needs to be updated.
strID - a String that represents the ID used to update the specified CalcValue.

clone

public java.lang.Object clone()
Clones a copy of this Calculation step object.
Overrides:
clone in class Step
Returns:
Object which represents a clone of this calculation step.

copyProps

public void copyProps(CalcStep calcStepTarget)
Copy common fields from one calc step to another.
Parameters:
calcStep - A CalcStep value that represents the calculation step to copy.

getDescription

public java.lang.String getDescription(int nType)
Retrieves the description of this Step object that is generated by the StepView object.
Overrides:
getDescription in class Step
Parameters:
type - A constant that represents the type of description to retrieve. The valid constants are:
  • LONG
  • MEDIUM
  • SHORT
Returns:
The description of this Step object.
See Also:
Step.LONG, Step.MEDIUM, Step.SHORT

getInstance

public CalcStep getInstance(java.lang.String strXML,
PersistableAttributes persistableAttributes)
                     throws java.lang.Exception
Retrieves an instance of the CalcStep from the stored XML stream. This factory method gets the CalcStep type from the XML stream, creates the correct calculation step object and sets the XML and persistable attributes into the object.
Parameters:
strXML - The XML stream associated with the CalcStep.
persistableAttributes - The persistable attributes for the CalcStep.
Returns:
CalcStep representing the CalcStep for the XML instance.

isType

public static boolean isType(int nType)
Determines with the specified type really represents a type
Parameters:
nType - a int value that represents the type that we wish to interrogate.
Returns:
boolean which is true if the parameter represents a type and false otherwise.

initialize

public void initialize(java.util.Hashtable env)
Description copied from interface: Persistable
Initializes the component with the persistence environment. The persistence service calls this method when it loads the component, so that the component can use environment properties to initialize itself. Environment properties are defined in the Context interface in JNDI.
Specified by:
initialize in interface Persistable
Following copied from interface: oracle.dss.util.persistence.Persistable
Parameters:
env - Environment properties.

getPersistableAttributes

public PersistableAttributes getPersistableAttributes(PersistableAttributes attrs)
Retrieves a list of searchable attributes
Specified by:
getPersistableAttributes in interface Persistable
Parameters:
current - set of attributes
Returns:
A list of searchable attributes

getPersistableComponents

public AggregateInfo[] getPersistableComponents()
Retrieves a list of Persistable components that this Persistable component aggregates.
Specified by:
getPersistableComponents in interface Persistable
Returns:
An array of AggregateInfo, which contains information to restore relationship between this object and its aggregates.

getXML

public java.lang.Object getXML( context)
Returns the XML representation of the object. Note that XML representation can be of any type. The XML returned could contain only partial updates of the states. However, it is up to the implementor to decide whether this should be supported. (i.e. Not mandatory)
Overrides:
getXML in class Step
Parameters:
context - The control settings that is send by the container (caller)
Returns:
The XML representation of the object
See Also:
ObjectScope

getXMLAsString

public java.lang.String getXMLAsString()
Retrieves the XML stream of the persistable component
Specified by:
getXMLAsString in interface StringXMLizable
Returns:
The XML stream of the persistable component

setPersistableAttributes

public void setPersistableAttributes(PersistableAttributes attrs)
Sets a list of searchable attributes.
Specified by:
setPersistableAttributes in interface Persistable
Parameters:
current - set of attributes
Returns:
A list of searchable attributes

setPersistableComponents

public void setPersistableComponents(AggregateInfo[] persistables)
Sets a list of Persistable components that this Persistable component aggregates. This Persistable component should then restore the relationships with the Persistable components contains in the list
Specified by:
setPersistableComponents in interface Persistable
Parameters:
persistables - An array of AggregateInfo

setXML

public void setXML( context,
                   java.lang.Object node)
Sets the XML representation of the object. Note that XML representation can be of any type.
Overrides:
setXML in class Step
Parameters:
context - The control settings that is send by the container (caller)
node - The XML representation of the object

setXMLAsString

public boolean setXMLAsString(java.lang.String strXML)
                       throws BIPersistenceException
Sets the XML stream of the persistable component.
Specified by:
setXMLAsString in interface StringXMLizable
Parameters:
strXML - The XML stream of the persistable component

toString

public java.lang.String toString()
Generates the string representation of this CalcStep object.
Overrides:
toString in class Step
Returns:
The string representation of this CalcStep object.

dump

public void dump()
Description copied from interface: ObjectFactory
Sends to the console a list of registered object types and their classnames.
Specified by:
dump in interface ObjectFactory

Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


Copyright © 2003, Oracle. All Rights Reserved.