package it.businesslogic.ireport.examples;

import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.engine.data.*;
import it.businesslogic.ireport.examples.beans.*;
import java.util.*;

public class PersonBeansDataSource extends JRAbstractBeanDataSourceProvider {
  
  	public PersonBeansDataSource() {
  		super(PersonBean.class);
  	}
  
  	public JRDataSource create(JasperReport report) throws JRException {
  		
  		ArrayList list = new ArrayList();
  		list.add(new PersonBean("Aldo"));
  		list.add(new PersonBean("Giovanni"));
  		list.add(new PersonBean("Giacomo"));
  		return new JRBeanCollectionDataSource(list);
  	
  	}
 	
  	public void dispose(JRDataSource dataSource) throws JRException {
 		// nothing to do
  	}
  }