jdbreport.source
Class MapDataSet

java.lang.Object
  extended by jdbreport.source.AbstractDataSet
      extended by jdbreport.source.MapDataSet
All Implemented Interfaces:
Cloneable, ReportDataSet

public class MapDataSet
extends AbstractDataSet

Version:
1.0 07.02.2011
Author:
Andrey Kholmanskih

Field Summary
 
Fields inherited from class jdbreport.source.AbstractDataSet
logger
 
Constructor Summary
MapDataSet(String id, Map<String,Object> map)
           
 
Method Summary
 Collection<String> getColumnNames()
          Returns names' collection of columns or properties
 Object getCurrentObject()
          Returns a current object, can be null
 Object getValue(String name)
          Returns value from the current record (object) by the name
 boolean hasNext()
           
 boolean reopen()
          Reopens the DataSet when the MasterDataSet changes parameters
 
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
 

Constructor Detail

MapDataSet

public MapDataSet(String id,
                  Map<String,Object> map)
Method Detail

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

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

reopen

public boolean reopen()
               throws ReportException
Description copied from interface: ReportDataSet
Reopens the DataSet when the MasterDataSet changes parameters

Returns:
true if not eof
Throws:
ReportException

hasNext

public boolean hasNext()