Class BaseDataLevelBucket
- java.lang.Object
-
- net.sf.jasperreports.engine.analytics.dataset.BaseDataLevelBucket
-
- All Implemented Interfaces:
Serializable
,Cloneable
,DataLevelBucket
,JRCloneable
- Direct Known Subclasses:
DesignDataLevelBucket
public class BaseDataLevelBucket extends Object implements DataLevelBucket, Serializable
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected List<DataLevelBucketProperty>
bucketProperties
protected JRExpression
comparatorExpression
static String
EXCEPTION_MESSAGE_KEY_BUCKET_LOAD_ERROR
protected JRExpression
expression
protected JRExpression
labelExpression
protected BucketOrder
order
protected Class<?>
valueClass
protected String
valueClassName
protected String
valueClassRealName
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseDataLevelBucket()
BaseDataLevelBucket(DataLevelBucket bucket, JRBaseObjectFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
List<DataLevelBucketProperty>
getBucketProperties()
JRExpression
getComparatorExpression()
Returns the comparator expression.JRExpression
getExpression()
Returns the grouping expression.JRExpression
getLabelExpression()
Optional expression that provides labels for buckets.BucketOrder
getOrder()
Returns the bucket sorting type.Class<?>
getValueClass()
Returns the class of the bucket value.String
getValueClassName()
Returns the string name of the bucket value class.
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_BUCKET_LOAD_ERROR
public static final String EXCEPTION_MESSAGE_KEY_BUCKET_LOAD_ERROR
- See Also:
- Constant Field Values
-
valueClassName
protected String valueClassName
-
valueClassRealName
protected String valueClassRealName
-
valueClass
protected Class<?> valueClass
-
order
protected BucketOrder order
-
expression
protected JRExpression expression
-
labelExpression
protected JRExpression labelExpression
-
comparatorExpression
protected JRExpression comparatorExpression
-
bucketProperties
protected List<DataLevelBucketProperty> bucketProperties
-
-
Constructor Detail
-
BaseDataLevelBucket
protected BaseDataLevelBucket()
-
BaseDataLevelBucket
public BaseDataLevelBucket(DataLevelBucket bucket, JRBaseObjectFactory factory)
-
-
Method Detail
-
getValueClassName
public String getValueClassName()
Description copied from interface:DataLevelBucket
Returns the string name of the bucket value class.- Specified by:
getValueClassName
in interfaceDataLevelBucket
-
getOrder
public BucketOrder getOrder()
Description copied from interface:DataLevelBucket
Returns the bucket sorting type.The possible values are:
- Specified by:
getOrder
in interfaceDataLevelBucket
- Returns:
- the bucket sorting type
- See Also:
DataLevelBucket.getComparatorExpression()
-
getExpression
public JRExpression getExpression()
Description copied from interface:DataLevelBucket
Returns the grouping expression.- Specified by:
getExpression
in interfaceDataLevelBucket
- Returns:
- the grouping expression
-
getLabelExpression
public JRExpression getLabelExpression()
Description copied from interface:DataLevelBucket
Optional expression that provides labels for buckets.- Specified by:
getLabelExpression
in interfaceDataLevelBucket
- Returns:
- the bucket label expression
-
getComparatorExpression
public JRExpression getComparatorExpression()
Description copied from interface:DataLevelBucket
Returns the comparator expression.The result of this expression is used to sort the buckets, in ascending or descending order (given by
getOrder()
. If the order type isBucketOrder.NONE
, no sorting will be performed and the comparator expression will be ignored.If no comparator expression is specified, the natural order will be used.
If the bucket has an order by expression, the comparator will be used to compare values as produced by that expression.
- Specified by:
getComparatorExpression
in interfaceDataLevelBucket
- Returns:
- the comparator expression
-
getValueClass
public Class<?> getValueClass()
Description copied from interface:DataLevelBucket
Returns the class of the bucket value. Any class is allowed as long as it is in the classpath at compile and run time.- Specified by:
getValueClass
in interfaceDataLevelBucket
- Returns:
- a Class instance representing the bucket value class
-
getBucketProperties
public List<DataLevelBucketProperty> getBucketProperties()
- Specified by:
getBucketProperties
in interfaceDataLevelBucket
-
clone
public Object clone()
- Specified by:
clone
in interfaceJRCloneable
- Overrides:
clone
in classObject
-
-