public class TotalGroupSumQuotientFunction extends AbstractFunction
dividend
parameter is required and denotes the name of an
ItemBand-field which gets summed up as dividend. The divisor
parameter is required and denotes the name
of an ItemBand-field which gets summed up as divisor.
The parameter group
denotes the name of a group. When this group is started, the counter gets reseted to
null. This parameter is optional.Constructor and Description |
---|
TotalGroupSumQuotientFunction()
Constructs a new function.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Clones the expression.
|
String |
getCrosstabFilterGroup() |
String |
getDividend()
Returns the field used as dividend by the function.
|
String |
getDivisor()
Returns the field used as divisor by the function.
|
String |
getGroup()
Returns the name of the group to be totalled.
|
int |
getRoundingMode()
Returns the defined rounding mode.
|
int |
getScale()
Returns the scale for the divide-operation.
|
Object |
getValue()
Return the current function value.
|
void |
groupStarted(ReportEvent event)
Receives notification that a group has started.
|
void |
itemsAdvanced(ReportEvent event)
Receives notification that a row of data is being processed.
|
void |
reportInitialized(ReportEvent event)
Receives notification that the report has started.
|
void |
setCrosstabFilterGroup(String crosstabFilterGroup) |
void |
setDependencyLevel(int level)
Defines the function's dependency level.
|
void |
setDividend(String dividend)
Sets the field name to be used as dividend for the function.
|
void |
setDivisor(String divisor)
Sets the field name to be used as divisor for the function.
|
void |
setGroup(String group)
Defines the name of the group to be totalled.
|
void |
setRoundingMode(int roundingMode)
Defines the rounding mode.
|
void |
setRuntime(ExpressionRuntime runtime)
Defines the ExpressionRune used in this expression.
|
void |
setScale(int scale)
Defines the scale for the divide-operation.
|
groupFinished, itemsFinished, itemsStarted, reportDone, reportFinished, reportStarted, summaryRowSelection
getDataRow, getDependencyLevel, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setActive, setName, setPreserve
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDataRow, getDependencyLevel, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setName
public TotalGroupSumQuotientFunction()
public void reportInitialized(ReportEvent event)
reportInitialized
in interface ReportListener
reportInitialized
in class AbstractFunction
event
- the event.public void groupStarted(ReportEvent event)
groupStarted
in interface ReportListener
groupStarted
in class AbstractFunction
event
- the event.public void itemsAdvanced(ReportEvent event)
itemsAdvanced
in interface ReportListener
itemsAdvanced
in class AbstractFunction
event
- the event.public String getGroup()
public void setGroup(String group)
group
- the group name.public Object getValue()
The value depends (obviously) on the function implementation. For example, a page counting function will return the current page number.
public String getDividend()
The field name corresponds to a column name in the report's data-row.
public String getDivisor()
The field name corresponds to a column name in the report's data row.
public void setDividend(String dividend)
The field name corresponds to a column name in the report's data-row.
dividend
- the field name (null not permitted).public void setDivisor(String divisor)
The field name corresponds to a column name in the report's data-row.
divisor
- the field name (null not permitted).public int getRoundingMode()
BigDecimal.divide(java.math.BigDecimal, int)
public void setRoundingMode(int roundingMode)
roundingMode
- the rounding mode.BigDecimal.divide(java.math.BigDecimal, int)
public int getScale()
public void setScale(int scale)
scale
- the scale.public void setDependencyLevel(int level)
setDependencyLevel
in interface Expression
setDependencyLevel
in class AbstractExpression
level
- the dependency level.Expression.getDependencyLevel()
public void setRuntime(ExpressionRuntime runtime)
setRuntime
in interface Expression
setRuntime
in class AbstractExpression
runtime
- the runtime information for the expressionpublic String getCrosstabFilterGroup()
public void setCrosstabFilterGroup(String crosstabFilterGroup)
public Object clone() throws CloneNotSupportedException
AbstractExpression
Expressions maintain no state, cloning is done at the beginning of the report processing to disconnect the expression from any other object space.
clone
in interface Expression
clone
in class AbstractExpression
CloneNotSupportedException
- this should never happen.Copyright © 2017 Hitachi Vantara. All rights reserved.