net.sf.jasperreports.crosstabs.fill.calculation
public class BucketDefinition extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
BucketDefinition.Bucket
Bucket value class.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.Comparator |
bucketValueComparator |
static byte |
ORDER_ASCENDING
Deprecated.
Replaced by
SortOrderEnum.ASCENDING . |
static byte |
ORDER_DESCENDING
Deprecated.
Replaced by
SortOrderEnum.DESCENDING . |
protected JRExpression |
orderByExpression |
protected java.util.Comparator |
orderValueComparator |
static byte |
TOTAL_POSITION_END
Deprecated.
Replaced by
CrosstabTotalPositionEnum.END . |
static byte |
TOTAL_POSITION_NONE
Deprecated.
Replaced by
CrosstabTotalPositionEnum.NONE . |
static byte |
TOTAL_POSITION_START
Deprecated.
Replaced by
CrosstabTotalPositionEnum.START . |
protected BucketDefinition.Bucket |
VALUE_NULL
The null bucket.
|
protected BucketDefinition.Bucket |
VALUE_TOTAL
The total value for this bucket.
|
protected static byte |
VALUE_TYPE_NULL
Value type used for null bucket values.
|
protected static byte |
VALUE_TYPE_TOTAL
Value type used for total buckets.
|
protected static byte |
VALUE_TYPE_VALUE
Value type used for non-null values.
|
Constructor and Description |
---|
BucketDefinition(java.lang.Class valueClass,
JRExpression orderByExpression,
java.util.Comparator comparator,
SortOrderEnum order,
CrosstabTotalPositionEnum totalPosition)
Creates a bucket.
|
Modifier and Type | Method and Description |
---|---|
int |
compareOrderValues(java.lang.Object v1,
java.lang.Object v2) |
boolean |
computeTotal()
Whether this bucket needs total calculation.
|
BucketDefinition.Bucket |
create(java.lang.Object value)
Creates a
BucketValue object for a given value. |
protected static java.util.Comparator |
createOrderComparator(java.util.Comparator comparator,
SortOrderEnum order) |
JRExpression |
getOrderByExpression() |
CrosstabTotalPositionEnum |
getTotalPosition()
Returns the total bucket position.
|
boolean |
hasOrderValues() |
void |
setComputeTotal()
Instructs that the bucket will need total bucket calculation.
|
public static final byte ORDER_ASCENDING
SortOrderEnum.ASCENDING
.public static final byte ORDER_DESCENDING
SortOrderEnum.DESCENDING
.public static final byte TOTAL_POSITION_NONE
CrosstabTotalPositionEnum.NONE
.public static final byte TOTAL_POSITION_START
CrosstabTotalPositionEnum.START
.public static final byte TOTAL_POSITION_END
CrosstabTotalPositionEnum.END
.protected static final byte VALUE_TYPE_VALUE
protected static final byte VALUE_TYPE_NULL
protected static final byte VALUE_TYPE_TOTAL
protected final BucketDefinition.Bucket VALUE_TOTAL
protected final BucketDefinition.Bucket VALUE_NULL
protected final java.util.Comparator bucketValueComparator
protected final JRExpression orderByExpression
protected final java.util.Comparator orderValueComparator
public BucketDefinition(java.lang.Class valueClass, JRExpression orderByExpression, java.util.Comparator comparator, SortOrderEnum order, CrosstabTotalPositionEnum totalPosition) throws JRException
valueClass
- the class of the bucket valuesorderByExpression
- expression that provides order by valuescomparator
- the comparator to use for bucket sortingorder
- the order type, ORDER_ASCENDING
or ORDER_DESCENDING
descendingtotalPosition
- the position of the total bucketJRException
protected static java.util.Comparator createOrderComparator(java.util.Comparator comparator, SortOrderEnum order)
public boolean computeTotal()
public void setComputeTotal()
computeTotal()
public CrosstabTotalPositionEnum getTotalPosition()
public JRExpression getOrderByExpression()
public boolean hasOrderValues()
public int compareOrderValues(java.lang.Object v1, java.lang.Object v2)
public BucketDefinition.Bucket create(java.lang.Object value)
BucketValue
object for a given value.value
- the valueBucketValue
object© 2001-2010 Jaspersoft Corporation www.jaspersoft.com