org.objectweb.jac.aspects.gui.reports
Class JacDataSource

java.lang.Object
  |
  +--org.objectweb.jac.aspects.gui.reports.JacDataSource
All Implemented Interfaces:
dori.jasper.engine.JRDataSource

public class JacDataSource
extends Object
implements dori.jasper.engine.JRDataSource

A data source for JasperReports.


Constructor Summary
JacDataSource(ClassItem cl)
          Create a data source of all instances of a class.
JacDataSource(Collection collection, ClassItem componentType)
          Creates a data source for a collection.
JacDataSource(Object substance, CollectionItem collection)
          Creates a data source for a collection of an object
JacDataSource(Object substance, String collectionName)
          Creates a data source for a collection of an object
 
Method Summary
 Object getFieldValue(dori.jasper.engine.JRField field)
          Uses the documentation of the field as the full name of the field, since the field's name can not contain dots.
 boolean next()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JacDataSource

public JacDataSource(ClassItem cl)
Create a data source of all instances of a class.


JacDataSource

public JacDataSource(Collection collection,
                     ClassItem componentType)
Creates a data source for a collection.

Parameters:
collection - a collection to fetch data from
componentType - the type of the elements in the collection. It can be null.

JacDataSource

public JacDataSource(Object substance,
                     CollectionItem collection)
Creates a data source for a collection of an object

Parameters:
collection - a collection to fetch data from
substance -

JacDataSource

public JacDataSource(Object substance,
                     String collectionName)
Creates a data source for a collection of an object

Parameters:
substance - object holding the collection
collectionName - name of the collection to fetch data from
Method Detail

next

public boolean next()
             throws dori.jasper.engine.JRException
Specified by:
next in interface dori.jasper.engine.JRDataSource
dori.jasper.engine.JRException

getFieldValue

public Object getFieldValue(dori.jasper.engine.JRField field)
                     throws dori.jasper.engine.JRException
Uses the documentation of the field as the full name of the field, since the field's name can not contain dots.

Specified by:
getFieldValue in interface dori.jasper.engine.JRDataSource
dori.jasper.engine.JRException