org.jcon.text
Class HierarchicalReportEngine
java.lang.Object
org.jcon.text.AbstractReportEngine
org.jcon.text.BeanReportEngine
org.jcon.text.HierarchicalReportEngine
- All Implemented Interfaces:
- java.io.Serializable, TextReportEngine
public class HierarchicalReportEngine
- extends BeanReportEngine
A BeanReportEngine that allows you to run subreports on specified properties.
This is essential to reporting complex objects. For example, if one of the
properties of an object is a list, you use a HierarchicalReportEngine with an
IteratingReportEngine subreport for that property.
- Author:
- Paul Reavis
- See Also:
- Serialized Form
|
Method Summary |
java.util.Map |
getSubReports()
A dictionary mapping property names to the TextReportEngines you want
applied to them. |
void |
printField(java.lang.Object source,
java.lang.String fieldName,
java.io.PrintWriter writer)
Overrides fields with associated subreports; runs the report on them
directly. |
void |
setSubReports(java.util.Map newSubs)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HierarchicalReportEngine
public HierarchicalReportEngine()
HierarchicalReportEngine
public HierarchicalReportEngine(java.lang.String format,
java.util.ArrayList fieldNames)
printField
public void printField(java.lang.Object source,
java.lang.String fieldName,
java.io.PrintWriter writer)
- Overrides fields with associated subreports; runs the report on them
directly. Any without subreports are included as for BeanReportEngine.
- Overrides:
printField in class BeanReportEngine
getSubReports
public java.util.Map getSubReports()
- A dictionary mapping property names to the TextReportEngines you want
applied to them. These subreports are run first, then the results
inserted into the report where you indicated via a backtick or hashmarked
field in the "format" property.
setSubReports
public void setSubReports(java.util.Map newSubs)