JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.higrid
Class BaseAggregate

java.lang.Object
  |
  +--com.klg.jclass.higrid.BaseAggregate
All Implemented Interfaces:
Aggregate, Serializable
Direct Known Subclasses:
AggregateAverage, AggregateCount, AggregateFirst, AggregateLast, AggregateMax, AggregateMin, AggregateSum

public abstract class BaseAggregate
extends Object
implements Aggregate, Serializable

Implements the base Aggregate type behavior. This class should be extended to create useful types.

See Also:
Serialized Form

Field Summary
protected  BigDecimal bigDecimal
          BigDecimal version of aggregated value
protected  com.klg.jclass.higrid.SummaryColumn column
          The column to aggregate over
protected  double doubleValue
          Double version of aggregated value
protected  long longValue
          Long version of aggregated value
protected  int metaID
          The metaData ID associated with the given column
 
Constructor Summary
BaseAggregate()
          Default Constructor
BaseAggregate(com.klg.jclass.higrid.SummaryColumn column)
          Default Constructor
 
Method Summary
 void addValue(Object value)
          Helper method to add a value.
 boolean cacheResultData()
          Indicates whether the result data is to be cached for display.
abstract  void calculate(com.klg.jclass.higrid.RowNode rowNode)
          Perform the aggregation.
 void divideValue(int value)
          Helper method to divide the aggregate value.
 boolean done()
          Determine if aggregation is done.
 double getDoubleValue(Object value)
          Helper method to get a double value from an Object.
 double getLongValue(Object value)
          Helper method to get a long value from an Object.
 Object getResultData()
          Returns the result data as an Object.
 Object getRowNodeResultData(com.klg.jclass.higrid.RowNode rowNode, String name)
          Helper method to get the result data from the row node given the column identifier.
 void init(com.klg.jclass.higrid.SummaryColumn column)
          Initialize the aggregate.
 boolean isSameMetaID(com.klg.jclass.higrid.RowNode rowNode)
          Helper method to check if the row node metaID is the same as the summary column one.
 boolean nextLevel(com.klg.jclass.higrid.RowNode rowNode)
          Determine if the next row level should be traversed.
 void setValue(Object value)
          Helper method to set a value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

metaID

protected int metaID
The metaData ID associated with the given column


column

protected com.klg.jclass.higrid.SummaryColumn column
The column to aggregate over


longValue

protected long longValue
Long version of aggregated value


doubleValue

protected double doubleValue
Double version of aggregated value


bigDecimal

protected BigDecimal bigDecimal
BigDecimal version of aggregated value

Constructor Detail

BaseAggregate

public BaseAggregate()
Default Constructor


BaseAggregate

public BaseAggregate(com.klg.jclass.higrid.SummaryColumn column)
Default Constructor

Method Detail

setValue

public void setValue(Object value)
Helper method to set a value.

Parameters:
value - A value in Object form.

addValue

public void addValue(Object value)
Helper method to add a value.

Parameters:
value - A value in Object form.

divideValue

public void divideValue(int value)
Helper method to divide the aggregate value.

Parameters:
value - The integer divisor.

getLongValue

public double getLongValue(Object value)
Helper method to get a long value from an Object.

Parameters:
value - A value in Object form.

getDoubleValue

public double getDoubleValue(Object value)
Helper method to get a double value from an Object.

Parameters:
value - A value in Object form.

isSameMetaID

public boolean isSameMetaID(com.klg.jclass.higrid.RowNode rowNode)
Helper method to check if the row node metaID is the same as the summary column one.

Parameters:
rowNode - The row node.

getRowNodeResultData

public Object getRowNodeResultData(com.klg.jclass.higrid.RowNode rowNode,
                                   String name)
Helper method to get the result data from the row node given the column identifier.

Parameters:
rowNode - The row node.
name - The column identifier

init

public void init(com.klg.jclass.higrid.SummaryColumn column)
Initialize the aggregate.

Specified by:
init in interface Aggregate
Parameters:
column - The summary column.

done

public boolean done()
Determine if aggregation is done.

Specified by:
done in interface Aggregate
Returns:
True if done.

nextLevel

public boolean nextLevel(com.klg.jclass.higrid.RowNode rowNode)
Determine if the next row level should be traversed.

Specified by:
nextLevel in interface Aggregate
Parameters:
rowNode - The row node.
Returns:
True if the lower level is to be traversed.

calculate

public abstract void calculate(com.klg.jclass.higrid.RowNode rowNode)
Perform the aggregation.

Specified by:
calculate in interface Aggregate
Parameters:
rowNode - The row node.

cacheResultData

public boolean cacheResultData()
Indicates whether the result data is to be cached for display.

Specified by:
cacheResultData in interface Aggregate
Returns:
True if the result data is to be cached.

getResultData

public Object getResultData()
Returns the result data as an Object.

Specified by:
getResultData in interface Aggregate
Returns:
The result data.

Copyright © 2004 Quest Software Inc..
All rights reserved.