jdbreport.source
Class ReflectDataSet

java.lang.Object
  extended by jdbreport.source.AbstractDataSet
      extended by jdbreport.source.ReflectDataSet
All Implemented Interfaces:
Cloneable, ReportDataSet
Direct Known Subclasses:
ArrayDataSet, IteratorDataSet, ObjectDataSet

public abstract class ReflectDataSet
extends AbstractDataSet

Version:
2.0 02.12.2011
Author:
Andrey Kholmanskih

Field Summary
protected  Object current
           
 
Fields inherited from class jdbreport.source.AbstractDataSet
logger
 
Constructor Summary
ReflectDataSet(String id)
           
 
Method Summary
protected  Map<String,Object> getColumnMap()
           
 Collection<String> getColumnNames()
          Returns names' collection of columns or properties
 Object getCurrentObject()
          Returns a current object, can be null
protected  Class<? extends Object> getObjectClass()
           
 Object getValue(String name)
          Returns value from the current record (object) by the name
 boolean hasNext()
           
protected  void reflect(Object o)
           
 
Methods inherited from class jdbreport.source.AbstractDataSet
clone, getId, getMasterId, getParams, next
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jdbreport.source.ReportDataSet
reopen
 

Field Detail

current

protected Object current
Constructor Detail

ReflectDataSet

public ReflectDataSet(String id)
Method Detail

reflect

protected void reflect(Object o)

getColumnMap

protected Map<String,Object> getColumnMap()

getObjectClass

protected Class<? extends Object> getObjectClass()

getColumnNames

public Collection<String> getColumnNames()
                                  throws ReportException
Description copied from interface: ReportDataSet
Returns names' collection of columns or properties

Returns:
names of columns or properties
Throws:
ReportException

getCurrentObject

public Object getCurrentObject()
Description copied from interface: ReportDataSet
Returns a current object, can be null

Returns:
- current object

getValue

public Object getValue(String name)
                throws ReportException
Description copied from interface: ReportDataSet
Returns value from the current record (object) by the name

Parameters:
name - - the column's name or the property's name
Returns:
value by the name
Throws:
ReportException

hasNext

public boolean hasNext()