Clover Coverage Report - Kuali Student 1.2-M2-SNAPSHOT (Aggregated)
Coverage timestamp: Fri Apr 22 2011 04:03:20 EST
../../../../../../../../img/srcFileCovDistChart10.png 0% of files have more coverage
5   33   3   2.5
2   17   0.6   2
2     1.5  
1    
 
  KSCollectionDataSource       Line # 18 5 0% 3 0 100% 1.0
 
  (1)
 
1    package org.kuali.student.common.ui.server.screenreport.jasper;
2   
3    import java.util.Collection;
4   
5    import net.sf.jasperreports.engine.JRException;
6    import net.sf.jasperreports.engine.JRField;
7    import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
8   
9    /**
10    *
11    * This class overwrites the common JRBeanCollectionDataSource in order
12    * to return a JRDataSource to be used on the subreport when the field is
13    * called "subset".
14    *
15    * @author Kuali Rice Team (kuali-rice@googlegroups.com)
16    *
17    */
 
18    public class KSCollectionDataSource extends JRBeanCollectionDataSource {
19   
 
20  48 toggle public KSCollectionDataSource(Collection beanCollection) {
21  48 super(beanCollection);
22    }
23   
 
24  328 toggle protected Object getFieldValue(Object bean, JRField field) throws JRException {
25  328 Object object = getBeanProperty(bean, getPropertyName(field));
26   
27  328 if ("subset".equals(field.getName())) {
28  44 return new KSCollectionDataSource((Collection) object);
29    }
30  284 return object;
31    }
32   
33    }