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 java.lang.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 Modifier and Type Field Description static java.lang.StringEXCEPTION_MESSAGE_KEY_NULL_BEAN_CLASS
-
Constructor Summary
Constructors Constructor Description JRAbstractBeanDataSourceProvider(java.lang.Class<?> beanClass)Creates the provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JRField[]getFields(JasperReport report)Returns the fields that are available from the data source.booleansupportsGetFieldsOperation()Returns true if the provider supports thegetFieldsoperation.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.jasperreports.engine.JRDataSourceProvider
create, dispose
-
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_NULL_BEAN_CLASS
public static final java.lang.String EXCEPTION_MESSAGE_KEY_NULL_BEAN_CLASS
- See Also:
- Constant Field Values
-
-
Method Detail
-
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:
JRDataSourceProvider.supportsGetFieldsOperation()
-
getFields
public JRField[] getFields(JasperReport report) throws JRException
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:
JRDataSourceProvider.getFields(net.sf.jasperreports.engine.JasperReport)
-
-