Business components : Business components : Branch application components : Counter : Reference
  
Reference
Following are the CounterException and APIs:
CounterException
CounterException
 
Exception
Thrown when
CounterException
set the value of a element over the Max Limit.
set the value of a element under the Min Limit.
set the MaxLimit of a element under the current value.
set the MinLimit of a element over the current value.
set a negative value to element of a counter, includes value, MaxLimit and MinLimit.
set a non-integer value to totIncrs.
set a non-integer value to totIncrs max limit.
set a non-integer value to totIncrs min limit.
currentTotal: Retrieves the total element’s value.
Return
 
Type
Description
float
total element’s value
setTotal: Sets value of the total element.
Parameters
 
Name
Description
Type
totalValue
New total element value
float
Return
 
Type
Description
void
 
increase: Sets the increase value.
Detailed Description:
1 Checks if the value to be set is correct (between minLimit and maxLimit, non-negative).
2 The increase value is correct if it is between its limits, and the new total (total+ value) and TotIncrs (TotIncrs+1) are correct as well.
Parameters
 
NameDescription
 
Type
incrValueNew increment element value
 
float
Return
 
Type
Description
void
 
setIncreaseTimes: Sets the value to totIncrs.
Detailed Description:
1 Tests if the value is correct.
2 If the value is correct, it sets it.
Parameters
 
NameDescription
 
Type
totalCountNew totIncrs value
 
float
Return
 
Type
Description
void
 
increaeTimes: Returns the totIncrs value.
Return
 
Type
Description
float
The value of totIncrs.
See also
Counter