net.sf.jasperreports.crosstabs.base

## Class JRBaseCrosstabBucket

- java.lang.Object
- - net.sf.jasperreports.crosstabs.base.JRBaseCrosstabBucket

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, JRCrosstabBucket, JRCloneable
  Direct Known Subclasses:
    JRDesignCrosstabBucket

      public class JRBaseCrosstabBucket
      extends java.lang.Object
      implements JRCrosstabBucket, java.io.Serializable

  Base read-only implementation of `JRCrosstabBucket`.
  Version:
    $Id: JRBaseCrosstabBucket.java 6313 2013-07-10 14:38:42Z lucianc $
  Author:
    Lucian Chirita (lucianc@users.sourceforge.net)
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected BucketOrder` | `bucketOrder`
    `protected JRExpression` | `comparatorExpression`
    `protected JRExpression` | `expression`
    `protected JRExpression` | `orderByExpression`
    `protected SortOrderEnum` | `orderValue` Deprecated.
    `protected java.lang.Class<?>` | `valueClass`
    `protected java.lang.String` | `valueClassName`
    `protected java.lang.String` | `valueClassRealName`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `JRBaseCrosstabBucket()`
    `` | `JRBaseCrosstabBucket(JRCrosstabBucket bucket, JRBaseObjectFactory factory)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()`
    `JRExpression` | `getComparatorExpression()` Returns the comparator expression.
    `JRExpression` | `getExpression()` Returns the grouping expression.
    `BucketOrder` | `getOrder()` Returns the bucket sorting type.
    `JRExpression` | `getOrderByExpression()` Returns an expression that provides order by values for group buckets.
    `SortOrderEnum` | `getOrderValue()` Deprecated.
    `java.lang.Class<?>` | `getValueClass()` Returns the class of the bucket value.
    `java.lang.String` | `getValueClassName()` Returns the string name of the bucket value class.

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### valueClassName

          protected java.lang.String valueClassName

    - #### valueClassRealName

          protected java.lang.String valueClassRealName

    - #### valueClass

          protected java.lang.Class<?> valueClass

    - #### orderValue

          @Deprecated
          protected SortOrderEnum orderValue

      Deprecated.

    - #### bucketOrder

          protected BucketOrder bucketOrder

    - #### expression

          protected JRExpression expression

    - #### orderByExpression

          protected JRExpression orderByExpression

    - #### comparatorExpression

          protected JRExpression comparatorExpression

  - ### Constructor Detail

    - #### JRBaseCrosstabBucket

          protected JRBaseCrosstabBucket()

    - #### JRBaseCrosstabBucket

          public JRBaseCrosstabBucket(JRCrosstabBucket bucket,
                              JRBaseObjectFactory factory)

  - ### Method Detail

    - #### getValueClassName

          public java.lang.String getValueClassName()

      Description copied from interface: `JRCrosstabBucket`
      Returns the string name of the bucket value class.
      Specified by:
        `getValueClassName` in interface `JRCrosstabBucket`

    - #### getOrderValue

          @Deprecated
          public SortOrderEnum getOrderValue()

      Deprecated.
      Description copied from interface: `JRCrosstabBucket`
      Returns the bucket sorting type.

      The possible values are:

      - `SortOrderEnum.ASCENDING`
      - `SortOrderEnum.DESCENDING`
      Specified by:
        `getOrderValue` in interface `JRCrosstabBucket`
      Returns:
        the bucket sorting type

    - #### getOrder

          public BucketOrder getOrder()

      Description copied from interface: `JRCrosstabBucket`
      Returns the bucket sorting type.

      The possible values are:

      - `BucketOrder.ASCENDING`
      - `BucketOrder.DESCENDING`
      - `BucketOrder.NONE`
      Specified by:
        `getOrder` in interface `JRCrosstabBucket`
      Returns:
        the bucket sorting type
      See Also:
        `JRCrosstabBucket.getComparatorExpression()`

    - #### getExpression

          public JRExpression getExpression()

      Description copied from interface: `JRCrosstabBucket`
      Returns the grouping expression.
      Specified by:
        `getExpression` in interface `JRCrosstabBucket`
      Returns:
        the grouping expression

    - #### getOrderByExpression

          public JRExpression getOrderByExpression()

      Description copied from interface: `JRCrosstabBucket`
      Returns an expression that provides order by values for group buckets. If not set, the bucket values as returned by `JRCrosstabBucket.getExpression()` are used to order the buckets.

      The expression is evaluated in the context of the crosstab group and can reference measure variables, which evaluate to group totals.

      Specified by:
        `getOrderByExpression` in interface `JRCrosstabBucket`
      Returns:
        the order by value expression for the group bucket

    - #### getComparatorExpression

          public JRExpression getComparatorExpression()

      Description copied from interface: `JRCrosstabBucket`
      Returns the comparator expression.

      The result of this expression is used to sort the buckets, in ascending or descending order (given by `getOrderValue()`. If the bucket has an order by expression, the comparator will be used to compare values as produced by that expression. If no comparator expression is specified, the natural order will be used.

      Specified by:
        `getComparatorExpression` in interface `JRCrosstabBucket`
      Returns:
        the comparator expression
      See Also:
        `JRCrosstabBucket.getOrderByExpression()`

    - #### getValueClass

          public java.lang.Class<?> getValueClass()

      Description copied from interface: `JRCrosstabBucket`
      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 interface `JRCrosstabBucket`
      Returns:
        a `Class` instance representing the bucket value class

    - #### clone

          public java.lang.Object clone()

      Specified by:
        `clone` in interface `JRCloneable`
      Overrides:
        `clone` in class `java.lang.Object`

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com