net.sf.jasperreports.engine.data
Class JRAbstractBeanDataSourceProvider
java.lang.Object
net.sf.jasperreports.engine.data.JRAbstractBeanDataSourceProvider
- All Implemented Interfaces:
- JRDataSourceProvider
public abstract class JRAbstractBeanDataSourceProvider
- extends Object
- implements JRDataSourceProvider
The base implementation for JRBeanXXXDataSource providers. It provides a common
implementation for bean properties introspection.
- Version:
- $Id: JRAbstractBeanDataSourceProvider.java 5180 2012-03-29 13:23:12Z teodord $
- Author:
- Peter Severin (peter_s@sourceforge.net, contact@jasperassistant.com)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JRAbstractBeanDataSourceProvider
public JRAbstractBeanDataSourceProvider(Class<?> beanClass)
- Creates the provider. Superclasses must pass a valid class that will be
used to introspect the available bean fields.
- Parameters:
beanClass - the bean class to be introspected.
supportsGetFieldsOperation
public boolean supportsGetFieldsOperation()
- Description copied from interface:
JRDataSourceProvider
- Returns true if the provider supports the
getFields
operation. By returning true in this method the data source provider indicates
that it is able to introspect the data source and discover the available fields.
- Specified by:
supportsGetFieldsOperation in interface JRDataSourceProvider
- Returns:
- true if the getFields() operation is supported.
- See Also:
JRDataSourceProvider.supportsGetFieldsOperation()
getFields
public JRField[] getFields(JasperReport report)
throws JRException
- Description copied from interface:
JRDataSourceProvider
- Returns the fields that are available from the data source.
The provider can use the passed in report to extract some additional
configuration information such as report properties.
- Specified by:
getFields in interface JRDataSourceProvider
- Parameters:
report - the report that will be filled using the data source created by this provider.
The passed in report can be null. That means that no compiled report is available yet.
- Returns:
- a non null fields array. If there are no fields then an empty array must be returned.
- Throws:
JRException - if an error occurs.- See Also:
JRDataSourceProvider.getFields(net.sf.jasperreports.engine.JasperReport)
Copyright © 2012. All Rights Reserved.