jet.api
Class CTSpecialFldInfo

java.lang.Object
  extended by jet.api.CTAggFieldInfo
      extended by jet.api.CTSpecialFldInfo

public class CTSpecialFldInfo
extends CTAggFieldInfo

The class CTSpecialFldInfo defines the information of the Comparison Function field. The Comparison Function field is calculated based the aggregate fields in the crosstab. A comparison function refers to calculations of percentage, permillage, or difference between:


Field Summary
static int DIFFERENCE
          The comparison function type value.
static int PERCENTAGE
          The comparison function type value.
static int PERMILLAGE
          The comparison function type value.
 
Fields inherited from class jet.api.CTAggFieldInfo
AVERAGE, COUNT, DISTINCTCOUNT, MAXIMUM, MINIMUM, POPULATIONSTDDEV, POPULATIONVARIANCE, SQRSUM, STDDEV, SUM, VARIANCE
 
Constructor Summary
CTSpecialFldInfo(java.lang.String mapping, int func, java.lang.String label, int breakBy, int refer, boolean isRowDirection, CTAggFieldInfo ctAgg)
          Constructor.
CTSpecialFldInfo(java.lang.String mapping, int func, java.lang.String label, int breakBy, int refer, boolean isRowDirection, int referIndex)
          Constructor.
 
Method Summary
 int getAggFunction()
          Gets function type for the comparison function.
 int getBreakPosition()
          Gets the first parameter of the comparison function.
 boolean getIsRowDirection()
          Gets whether the function is calculated in row direction or not.
 java.lang.String getMappingName()
          Gets mapping name of the aggregate field for the comparison function.
 int getReferPosition()
          Gets the second parameter of the comparison function.
 void setAggFunction(int func)
          Sets function type for the comparison function.
 void setBreakPosition(int breakBy)
          Sets the first parameter of the comparison function.
 void setIsRowDirection(boolean isRowDirection)
          Sets the function is calculated in row direction or column direction.
 void setMappingName(java.lang.String mapping)
          Sets mapping name of the aggregate field for the special function.
 void setReferPosition(int referTo)
          Sets the second parameter of the comparison function.
 java.lang.String toString()
           
 
Methods inherited from class jet.api.CTAggFieldInfo
createCTSpecialFldInfo, getAggregationType, getBlName, getCTFName, getType, setAggregationType, setBlName, setCTFName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PERCENTAGE

public static final int PERCENTAGE
The comparison function type value.

See Also:
Constant Field Values

PERMILLAGE

public static final int PERMILLAGE
The comparison function type value.

See Also:
Constant Field Values

DIFFERENCE

public static final int DIFFERENCE
The comparison function type value.

See Also:
Constant Field Values
Constructor Detail

CTSpecialFldInfo

public CTSpecialFldInfo(java.lang.String mapping,
                        int func,
                        java.lang.String label,
                        int breakBy,
                        int refer,
                        boolean isRowDirection,
                        int referIndex)
Constructor. Creates a crosstab comparison field information.

Parameters:
mapping - The mapping name of the database field or formula.
func - The int value of the comparison function type.
label - The text title of the comparison function field.
breakBy - Specifies the first parameter (aggregate or sub-total) of the comparison function, similar like numerator. The number -1 means the aggregate is the first parameter; the number of the real order of the columns/rows means the inner group sub-total.
refer - Specifies the second parameter (sub-total or grand-total) of the comparison function, similar like denominator. The number -1 means the grand-total is the second parameter; the number, less than breakBy, of the real order of the columns/rows means the outer group sub-total.
isRowDirection - If it is true, the comparison function field will be placed into the column's total cell of the crosstab;otherwise, the comparison function field will be placed into the row total cell of the crosstab.
referIndex - The comparison function is defined based on the exist aggregate field in the crosstab, referIndex specifies the index of referred aggregate field in the list. The index starts from 0.

CTSpecialFldInfo

public CTSpecialFldInfo(java.lang.String mapping,
                        int func,
                        java.lang.String label,
                        int breakBy,
                        int refer,
                        boolean isRowDirection,
                        CTAggFieldInfo ctAgg)
Constructor. Creates a crosstab comparison field information.

Parameters:
mapping - The mapping name of the database field or formula.
func - The int value of the comparison function type.
label - The text title of the comparison function field.
breakBy - Specifies the first parameter (aggregate or sub-total) of the comparison function, similar like numerator. The number -1 means the aggregate is the first parameter; the number of the real order of the columns/rows means the inner group sub-total.
refer - Specifies the second parameter (sub-total or grand-total) of the comparison function, similar like denominator. The number -1 means the grand-total is the second parameter; the number, less than breakBy, of the real order of the columns/rows means the outer group sub-total.
isRowDirection - If it is true, the comparison function field will be placed into the column's total cell of the crosstab;otherwise, the comparison function field will be placed into the row total cell of the crosstab.
ctAgg - The comparison function is defined based on the exist aggregate field in the crosstab, ctAgg is the definition of referred aggregate field.
Method Detail

setMappingName

public void setMappingName(java.lang.String mapping)
Sets mapping name of the aggregate field for the special function.

Parameters:
mapping - The mapping name of the aggregate field.

getMappingName

public java.lang.String getMappingName()
Gets mapping name of the aggregate field for the comparison function.

Returns:
the mapping name of the field.

setAggFunction

public void setAggFunction(int func)
Sets function type for the comparison function.

Parameters:
func - The int value of the comparison function type. its value must be one of PERCENTAGE,PERMILLAGE or DIFFERENCE.

getAggFunction

public int getAggFunction()
Gets function type for the comparison function.

Returns:
the int value of the function type.

setBreakPosition

public void setBreakPosition(int breakBy)
Sets the first parameter of the comparison function.

Parameters:
breakBy - Specifies the first parameter (aggregate or sub-total) of the comparison function, similar like numerator. The number -1 means the aggregate is the first parameter; the number of the real order of the columns/rows means the inner group sub-total.
See Also:
setReferPosition(int)

getBreakPosition

public int getBreakPosition()
Gets the first parameter of the comparison function.

Returns:
the number presents the first parameter of the comparison function.
See Also:
setBreakPosition(int)

setReferPosition

public void setReferPosition(int referTo)
Sets the second parameter of the comparison function.

Parameters:
refer - Specifies the second parameter (sub-total or grand-total) of the comparison function, similar like denominator. The number -1 means the grand-total is the second parameter; the number, less than breakBy, of the real order of the columns/rows means the outer group sub-total.
See Also:
setBreakPosition(int)

getReferPosition

public int getReferPosition()
Gets the second parameter of the comparison function.

Returns:
the number presents the second parameter of the comparison function.

setIsRowDirection

public void setIsRowDirection(boolean isRowDirection)
Sets the function is calculated in row direction or column direction.

Parameters:
isRowDirection - If it is true, the comparison function field will be placed into the column's total cell of the crosstab;otherwise, the comparison function field will be placed into the row total cell of the crosstab.

getIsRowDirection

public boolean getIsRowDirection()
Gets whether the function is calculated in row direction or not.

Returns:
true if the function is calculated in row direction and placed in column's total cell; false otherwise.

toString

public java.lang.String toString()
Overrides:
toString in class CTAggFieldInfo