|
Query |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.iquery.metadata.expr.olap.TimeExpressionMeasure
public class TimeExpressionMeasure
Models an expression to create a relative time-based calculated measure. It defines the measure as one of the following:
Field Summary | |
---|---|
static java.lang.String |
CUMULATIVE
This is a function that will calculate the cumulative value in measure over a period. |
static java.lang.String |
DIFFERENCE_PREVIOUS_PERIOD
This is a function that will calculate the difference in measure between current period and previous period. |
static java.lang.String |
DIFFERENCE_PREVIOUS_YEAR
This is a function that will calculate the difference in measure between current year and previous year. |
static java.lang.String |
EVENT_START_PERIOD_CHANGED
Event that indicates a change in period being used for the time calculations |
static java.lang.String |
EVENT_TIME_FUNCTION_CHANGED
Event that indicates a change in type of function used - DIFFERENCE_PARELLELPERIOD, PERCENTCHANGE_PARELLELPERIOD, DIFFERENCE_PERIODTODATE, PERCENTCHANGE_PERIODTODATE, OR CUMULATIVE |
static java.lang.String |
EVENT_TIME_MEASURE_CHANGED
Event that indicates a change in the data item measure being used for the time calculations |
static java.lang.String |
PERCENTCHANGE_PREVIOUS_PERIOD
This is a function that will calculate the percentage of difference in a measure between current period and previous period. |
static java.lang.String |
PERCENTCHANGE_PREVIOUS_YEAR
This is a function that will calculate the percentage of difference in a measure between current year and previous year. |
Fields inherited from interface com.sas.iquery.metadata.business.ModelItem |
---|
EVENT_OBJECT_PROPERTY_CHANGED |
Fields inherited from interface com.sas.iquery.metadata.business.Base |
---|
EVENT_OBJECT_DEFINITION_CHANGED |
Constructor Summary | |
---|---|
TimeExpressionMeasure()
Create object used to build the MDX expression for creating a time-based calculated measure. |
|
TimeExpressionMeasure(DataItem measure,
java.lang.String function)
Create object used to build the MDX expression for creating a time-based calculated measure. |
Method Summary | |
---|---|
int |
getExpressionType()
Always returns ExpressionTypes.EXP_TYPE_NUMERIC |
java.lang.String |
getFunction()
Returns the operation selected by user. |
DataItem |
getMeasure()
Returns the name of the measure being used in the calculated member formula. |
java.lang.String |
getPeriod()
Returns starting period - For example: [TIME]. |
void |
setFunction(java.lang.String function)
Sets the type of operation the user wishes to perform. |
void |
setMeasure(DataItem measure)
Sets the name of the measure being used in the calculated member formula. |
void |
setPeriod(java.lang.String startingPeriod)
Sets starting period - For example: [TIME]. |
Methods inherited from interface com.sas.iquery.metadata.business.BusinessModelResourceReferencer |
---|
getResources |
Methods inherited from interface com.sas.iquery.metadata.PropertyChangeListenee |
---|
addListener, getListeners, removeListener |
Methods inherited from interface com.sas.iquery.metadata.business.UsabilityInterface |
---|
getReasonsUnusable, isUsableInQuery |
Field Detail |
---|
public static final java.lang.String EVENT_TIME_MEASURE_CHANGED
public static final java.lang.String EVENT_TIME_FUNCTION_CHANGED
public static final java.lang.String EVENT_START_PERIOD_CHANGED
public static final java.lang.String DIFFERENCE_PREVIOUS_PERIOD
public static final java.lang.String DIFFERENCE_PREVIOUS_YEAR
public static final java.lang.String PERCENTCHANGE_PREVIOUS_PERIOD
public static final java.lang.String PERCENTCHANGE_PREVIOUS_YEAR
public static final java.lang.String CUMULATIVE
Constructor Detail |
---|
public TimeExpressionMeasure()
This object will contain the name of the calculated member defined by the user, the numeric expression used in the functions, the desired operation, and whether to replace the currently displayed measure with the new one or add the new measure to the existing set of displayed measures. When totaling is applied to a query that contains this measure, the totaling the TimeExpressionMeasure is governed by the following rules:
public TimeExpressionMeasure(DataItem measure, java.lang.String function)
measure
- - sets the name of the measure being used in the calculated member formula.function
- - sets the type of operation the user wishes to perform using valid functions:
DIFFERENCE_PREVIOUS_PERIOD, DIFFERENCE_PERIOD, DIFFERENCE_PREVIOUS_YEAR, DIFFERENCE_YEAR,PERCENTCHANGE_PREVIOUS_YEAR
PERCENTCHANGE_YEAR, PERCENTCHANGE_PERIOD,PERCENTCHANGE_PREVIOUS_PERIOD OR CUMULATIVEMethod Detail |
---|
public void setMeasure(DataItem measure) throws java.lang.IllegalArgumentException
measure
- the DataItem measure
java.lang.IllegalArgumentException
public DataItem getMeasure()
public void setFunction(java.lang.String function) throws java.lang.IllegalArgumentException
function
- type of function
java.lang.IllegalArgumentException
public java.lang.String getFunction()
java.lang.IllegalArgumentException
public void setPeriod(java.lang.String startingPeriod)
startingPeriod
- starting periodpublic java.lang.String getPeriod()
public int getExpressionType()
getExpressionType
in interface ExpressionInterface
|
Query |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |