Java Doc for BucketingService.java in  » Report » jasperreports-2.0.1 » net » sf » jasperreports » crosstabs » fill » calculation » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Report » jasperreports 2.0.1 » net.sf.jasperreports.crosstabs.fill.calculation 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.sf.jasperreports.crosstabs.fill.calculation.BucketingService

BucketingService
public class BucketingService (Code)
Crosstab bucketing engine.
author:
   Lucian Chirita (lucianc@users.sourceforge.net)
version:
   $Id: BucketingService.java 1730 2007-05-29 16:10:55Z lucianc $

Inner Class :protected static class MapEntry implements Map.Entry,Comparable
Inner Class :abstract protected class BucketMap
Inner Class :protected class BucketTreeMap extends BucketMap
Inner Class :protected class BucketListMap extends BucketMap
Inner Class :protected static class CollectedList extends LinkedList

Field Summary
final protected static  intDIMENSIONS
    
final protected static  byteDIMENSION_COLUMN
    
final protected static  byteDIMENSION_ROW
    
final public static  StringPROPERTY_BUCKET_MEASURE_LIMIT
    
final protected  BucketDefinition[]allBuckets
    
final protected  BucketMapbucketValueMap
    
final protected  BucketDefinition[][]buckets
    
protected  CrosstabCell[][]cells
    
final protected  intcolBucketCount
    
protected  HeaderCell[][]colHeaders
    
protected  longdataCount
    
final protected  int[]measureIndexes
    
final protected  MeasureDefinition[]measures
    
final protected  intorigMeasureCount
    
protected  booleanprocessed
    
final protected  boolean[][]retrieveTotal
    
final protected  introwBucketCount
    
protected  HeaderCell[][]rowHeaders
    
final protected  booleansorted
    

Constructor Summary
public  BucketingService(List rowBuckets, List columnBuckets, List measures, boolean sorted, boolean[][] retrieveTotal)
     Creates a crosstab bucketing engine.

Method Summary
public  voidaddData(Object[] bucketValues, Object[] measureValues)
     Feeds data to the engine.
protected  voidaddMeasure(MeasureDefinition measure, int index, List measuresList, List measureIndexList)
    
protected  voidbucketMeasuresCreated()
    
protected  voidcheckBucketMeasureCount(int bucketMeasureCount)
    
protected  voidcheckTotals()
    
public  voidclear()
     Clears all the accumulated and computed data.
protected  voidcollectCols(BucketListMap collectedCols, BucketMap bucketMap)
    
protected  voidcomputeColumnTotal(BucketMap bucketMap)
    
protected  voidcomputeRowTotals(BucketMap bucketMap)
    
protected  voidcomputeTotals(BucketMap bucketMap)
    
protected  BucketMapcreateBucketMap(int level)
    
protected  BucketListMapcreateCollectBucketMap(int level)
    
protected  voidcreateCrosstab()
    
protected  HeaderCell[][]createHeaders(byte dimension, CollectedList[] headersLists)
    
protected  CollectedListcreateHeadersList(byte dimension, BucketMap bucketMap, int level, boolean total)
    
protected  voidfillCell(int[] pos, List vals, List bucketMaps, Map.Entry bucketEntry)
    
protected  voidfillCells(CollectedList[] collectedHeaders, BucketMap bucketMap, int level, int[] pos, List vals, List bucketMaps)
    
protected  voidfillHeaders(byte dimension, HeaderCell[][] headers, int level, int col, CollectedList list, List vals)
    
protected  Bucket[]getBucketValues(Object[] bucketValues)
    
public  HeaderCell[][]getColumnHeaders()
     Returns the crosstab column headers.
public  CrosstabCell[][]getCrosstabCells()
     Returns the crosstab data cells.
public  MeasureValue[]getGrandTotals()
     Returns the grand total measure values.
public  MeasureValue[]getMeasureValues(Bucket[] bucketValues)
     Returns the measure values for a set of bucket values.
public  HeaderCell[][]getRowHeaders()
     Returns the crosstab row headers.
protected  MeasureValue[]getUserMeasureValues(MeasureValue[] values)
    
public  booleanhasData()
     Checks whether there is any data accumulated by the engine.
protected  MeasureValue[]initMeasureValues()
    
protected  MeasureValue[]initUserMeasureValues()
    
public  voidprocessData()
     Processes the data which was fed to the engine.
protected  MeasureValue[][][]retrieveTotals(List vals, List bucketMaps)
    
protected  voidsumVals(MeasureValue[] totals, MeasureValue[] vals)
    

Field Detail
DIMENSIONS
final protected static int DIMENSIONS(Code)



DIMENSION_COLUMN
final protected static byte DIMENSION_COLUMN(Code)



DIMENSION_ROW
final protected static byte DIMENSION_ROW(Code)



PROPERTY_BUCKET_MEASURE_LIMIT
final public static String PROPERTY_BUCKET_MEASURE_LIMIT(Code)



allBuckets
final protected BucketDefinition[] allBuckets(Code)



bucketValueMap
final protected BucketMap bucketValueMap(Code)



buckets
final protected BucketDefinition[][] buckets(Code)



cells
protected CrosstabCell[][] cells(Code)



colBucketCount
final protected int colBucketCount(Code)



colHeaders
protected HeaderCell[][] colHeaders(Code)



dataCount
protected long dataCount(Code)



measureIndexes
final protected int[] measureIndexes(Code)



measures
final protected MeasureDefinition[] measures(Code)



origMeasureCount
final protected int origMeasureCount(Code)



processed
protected boolean processed(Code)



retrieveTotal
final protected boolean[][] retrieveTotal(Code)



rowBucketCount
final protected int rowBucketCount(Code)



rowHeaders
protected HeaderCell[][] rowHeaders(Code)



sorted
final protected boolean sorted(Code)




Constructor Detail
BucketingService
public BucketingService(List rowBuckets, List columnBuckets, List measures, boolean sorted, boolean[][] retrieveTotal)(Code)
Creates a crosstab bucketing engine.
Parameters:
  rowBuckets - the row bucket definitions
Parameters:
  columnBuckets - the column bucket definitions
Parameters:
  measures - the measure definitions
Parameters:
  sorted - whether the data is presorted
Parameters:
  retrieveTotal - totals to retrieve along with the cell values




Method Detail
addData
public void addData(Object[] bucketValues, Object[] measureValues) throws JRException(Code)
Feeds data to the engine.
Parameters:
  bucketValues - the bucket values
Parameters:
  measureValues - the measure values
throws:
  JRException -



addMeasure
protected void addMeasure(MeasureDefinition measure, int index, List measuresList, List measureIndexList)(Code)



bucketMeasuresCreated
protected void bucketMeasuresCreated()(Code)



checkBucketMeasureCount
protected void checkBucketMeasureCount(int bucketMeasureCount)(Code)



checkTotals
protected void checkTotals()(Code)



clear
public void clear()(Code)
Clears all the accumulated and computed data.



collectCols
protected void collectCols(BucketListMap collectedCols, BucketMap bucketMap) throws JRException(Code)



computeColumnTotal
protected void computeColumnTotal(BucketMap bucketMap) throws JRException(Code)



computeRowTotals
protected void computeRowTotals(BucketMap bucketMap) throws JRException(Code)



computeTotals
protected void computeTotals(BucketMap bucketMap) throws JRException(Code)



createBucketMap
protected BucketMap createBucketMap(int level)(Code)



createCollectBucketMap
protected BucketListMap createCollectBucketMap(int level)(Code)



createCrosstab
protected void createCrosstab() throws JRException(Code)



createHeaders
protected HeaderCell[][] createHeaders(byte dimension, CollectedList[] headersLists)(Code)



createHeadersList
protected CollectedList createHeadersList(byte dimension, BucketMap bucketMap, int level, boolean total)(Code)



fillCell
protected void fillCell(int[] pos, List vals, List bucketMaps, Map.Entry bucketEntry)(Code)



fillCells
protected void fillCells(CollectedList[] collectedHeaders, BucketMap bucketMap, int level, int[] pos, List vals, List bucketMaps)(Code)



fillHeaders
protected void fillHeaders(byte dimension, HeaderCell[][] headers, int level, int col, CollectedList list, List vals)(Code)



getBucketValues
protected Bucket[] getBucketValues(Object[] bucketValues)(Code)



getColumnHeaders
public HeaderCell[][] getColumnHeaders()(Code)
Returns the crosstab column headers.

BucketingService.processData() processData() has to be called before this. the crosstab column headers




getCrosstabCells
public CrosstabCell[][] getCrosstabCells()(Code)
Returns the crosstab data cells.

BucketingService.processData() processData() has to be called before this. the crosstab data cells




getGrandTotals
public MeasureValue[] getGrandTotals()(Code)
Returns the grand total measure values. the grand total measure values



getMeasureValues
public MeasureValue[] getMeasureValues(Bucket[] bucketValues)(Code)
Returns the measure values for a set of bucket values.
Parameters:
  bucketValues - the bucket values the measure values corresponding to the bucket values



getRowHeaders
public HeaderCell[][] getRowHeaders()(Code)
Returns the crosstab row headers.

BucketingService.processData() processData() has to be called before this. the crosstab row headers




getUserMeasureValues
protected MeasureValue[] getUserMeasureValues(MeasureValue[] values)(Code)



hasData
public boolean hasData()(Code)
Checks whether there is any data accumulated by the engine. true iff the engine has any accumulated data



initMeasureValues
protected MeasureValue[] initMeasureValues()(Code)



initUserMeasureValues
protected MeasureValue[] initUserMeasureValues()(Code)



processData
public void processData() throws JRException(Code)
Processes the data which was fed to the engine.

This method should be called after the data has been exhausted. The processing consists of total calculations and crosstab table creation.
throws:
  JRException -




retrieveTotals
protected MeasureValue[][][] retrieveTotals(List vals, List bucketMaps)(Code)



sumVals
protected void sumVals(MeasureValue[] totals, MeasureValue[] vals) throws JRException(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.