Class JRDataSourceAdapter

  • All Implemented Interfaces:
    net.sf.jasperreports.engine.JRDataSource

    public class JRDataSourceAdapter
    extends Object
    implements net.sf.jasperreports.engine.JRDataSource
    JRDataSourceResultSet represents a ResultSet as a JRDataSource for processing with JasperReports
    See Also:
    ResultSet
    • Constructor Detail

      • JRDataSourceAdapter

        public JRDataSourceAdapter​(ResultSet rs)
        public constructor
        Parameters:
        com - .basiscomponents.db.ResultSet rs - the resultset to be represented for Jasper
    • Method Detail

      • getFieldValue

        public Object getFieldValue​(net.sf.jasperreports.engine.JRField field)
                             throws net.sf.jasperreports.engine.JRException
        implementation of the getFieldValue method of the interface
        Specified by:
        getFieldValue in interface net.sf.jasperreports.engine.JRDataSource
        Parameters:
        JRField - field - the field on the report
        Returns:
        Object o - the plain object from the DataRow with the field name
        Throws:
        net.sf.jasperreports.engine.JRException
      • next

        public boolean next()
                     throws net.sf.jasperreports.engine.JRException
        implementation of the next() method
        Specified by:
        next in interface net.sf.jasperreports.engine.JRDataSource
        Returns:
        true if there is a next record , false if not
        Throws:
        net.sf.jasperreports.engine.JRException