|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ujac.util.table.ReportFunction
public class ReportFunction
Name: ReportFunction
Description: A class describing and managing report funtions.
| Field Summary |
|---|
| Fields inherited from interface org.ujac.util.table.TableConstants |
|---|
DEFAULT_DATE_FORMAT, DEFAULT_DOUBLE_FORMAT, DEFAULT_INTEGER_FORMAT, DEFAULT_TIME_FORMAT, DEFAULT_TIMESTAMP_FORMAT, ROW_TYPE_FOOTER, ROW_TYPE_GROUP, ROW_TYPE_GROUP_TITLE, ROW_TYPE_HEADER, ROW_TYPE_NORMAL |
| Fields inherited from interface org.ujac.util.UjacTypes |
|---|
TYPE_BOOLEAN, TYPE_DATE, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_LONG, TYPE_NAME_BOOLEAN, TYPE_NAME_DATE, TYPE_NAME_DOUBLE, TYPE_NAME_FLOAT, TYPE_NAME_INT, TYPE_NAME_LONG, TYPE_NAME_OBJECT, TYPE_NAME_SHORT, TYPE_NAME_STRING, TYPE_NAME_TABLE, TYPE_NAME_TIME, TYPE_NAME_TIMESTAMP, TYPE_OBJECT, TYPE_SHORT, TYPE_STRING, TYPE_TABLE, TYPE_TIME, TYPE_TIMESTAMP |
| Constructor Summary | |
|---|---|
ReportFunction(String columnName,
FunctionExecutor executor,
boolean calculateTotalResult)
Constructs a ReportFunction instance with specific attributes. |
|
ReportFunction(String columnName,
FunctionExecutor executor,
boolean calculateTotalResult,
List groups)
Constructs a ReportFunction instance with specific attributes. |
|
ReportFunction(String columnName,
FunctionExecutor executor,
boolean calculateTotalResult,
String[] groups)
Constructs a ReportFunction instance with specific attributes. |
|
| Method Summary | |
|---|---|
void |
addGroup(String groupName)
Adds a column to group by. |
void |
apply(Object operand)
Applies the function for the given operand on the given current value. |
protected Object |
clone()
|
int |
getAlign()
Getter method for the the property align. |
int |
getColumnIdx()
Getter method for the the property columnIdx. |
String |
getColumnName()
Gets the column name. |
protected FunctionExecutor |
getExecutor()
Getter method for the the property executor. |
Format |
getFormat()
Getter method for the the property format. |
double |
getTotalResult()
Getter method for the the property totalResult. |
protected void |
init(ReportTable report,
ReportGroup[] allGroups)
Initializes the report function. |
boolean |
isCalculateTotalResult()
Checks whether or not to calculate the total result. |
void |
setAlign(int align)
Setter method for the the property align. |
protected void |
setColumnIdx(int columnIdx)
Setter method for the the property columnIdx. |
void |
setFormat(Format format)
Setter method for the the property format. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReportFunction(String columnName,
FunctionExecutor executor,
boolean calculateTotalResult)
executor - The function executor.columnName - The column name.calculateTotalResult - Tells whether or not to calculate the total result.
public ReportFunction(String columnName,
FunctionExecutor executor,
boolean calculateTotalResult,
String[] groups)
executor - The function executor.columnName - The column name.calculateTotalResult - Tells whether or not to calculate the total result.groups - The report groups to apply the function on.
public ReportFunction(String columnName,
FunctionExecutor executor,
boolean calculateTotalResult,
List groups)
executor - The function executor.columnName - The column name.calculateTotalResult - Tells whether or not to calculate the total result.groups - The report groups to apply the function on.| Method Detail |
|---|
public String getColumnName()
public boolean isCalculateTotalResult()
public int getColumnIdx()
protected void setColumnIdx(int columnIdx)
columnIdx - The value to set for the property columnIdx.protected FunctionExecutor getExecutor()
public double getTotalResult()
public void addGroup(String groupName)
groupName - The name of the column to group by.public int getAlign()
public void setAlign(int align)
align - The value to set for the property align.public Format getFormat()
public void setFormat(Format format)
format - The value to set for the property format.
protected void init(ReportTable report,
ReportGroup[] allGroups)
report - The report to set.allGroups - An array providing all available report groups.
public void apply(Object operand)
throws TypeMismatchException
operand - The operand to apply.
TypeMismatchException - In case the given operand type was invalid.protected Object clone()
clone in class ObjectObject.clone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||