Package 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.
- Author:
- Peter Severin (peter_s@sourceforge.net, contact@jasperassistant.com)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionJRField[]getFields(JasperReport report) Returns the fields that are available from the data source.booleanReturns true if the provider supports thegetFieldsoperation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.jasperreports.engine.JRDataSourceProvider
create, dispose
-
Field Details
-
EXCEPTION_MESSAGE_KEY_NULL_BEAN_CLASS
- See Also:
-
-
Constructor Details
-
JRAbstractBeanDataSourceProvider
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.
-
-
Method Details
-
supportsGetFieldsOperation
public boolean supportsGetFieldsOperation()Description copied from interface:JRDataSourceProviderReturns true if the provider supports thegetFieldsoperation. 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:
supportsGetFieldsOperationin interfaceJRDataSourceProvider- Returns:
- true if the getFields() operation is supported.
- See Also:
-
getFields
Description copied from interface:JRDataSourceProviderReturns 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:
getFieldsin interfaceJRDataSourceProvider- 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:
-