net.sf.jasperreports.engine.data
Class JRAbstractBeanDataSource

java.lang.Object
  extended by net.sf.jasperreports.engine.data.JRAbstractBeanDataSource
All Implemented Interfaces:
JRDataSource, JRRewindableDataSource
Direct Known Subclasses:
JRBeanArrayDataSource, JRBeanCollectionDataSource, JRJpaDataSource

public abstract class JRAbstractBeanDataSource
extends java.lang.Object
implements JRRewindableDataSource

Version:
$Id: JRAbstractBeanDataSource.java 5180 2012-03-29 13:23:12Z teodord $
Author:
Teodor Danciu (teodord@users.sourceforge.net)

Field Summary
static java.lang.String CURRENT_BEAN_MAPPING
          Field mapping that produces the current bean.
protected static net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.PropertyNameProvider FIELD_DESCRIPTION_PROPERTY_NAME_PROVIDER
           
protected static net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.PropertyNameProvider FIELD_NAME_PROPERTY_NAME_PROVIDER
           
protected  net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.PropertyNameProvider propertyNameProvider
           
 
Constructor Summary
JRAbstractBeanDataSource(boolean isUseFieldDescription)
           
 
Method Summary
protected static java.lang.Object getBeanProperty(java.lang.Object bean, java.lang.String propertyName)
           
protected  java.lang.Object getFieldValue(java.lang.Object bean, JRField field)
           
protected  java.lang.String getPropertyName(JRField field)
           
protected static boolean isCurrentBeanMapping(java.lang.String propertyName)
           
 
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.JRRewindableDataSource
moveFirst
 
Methods inherited from interface net.sf.jasperreports.engine.JRDataSource
getFieldValue, next
 

Field Detail

CURRENT_BEAN_MAPPING

public static final java.lang.String CURRENT_BEAN_MAPPING
Field mapping that produces the current bean.

If the field name/description matches this constant (the case is important), the data source will return the current bean as the field value.

See Also:
Constant Field Values

propertyNameProvider

protected net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.PropertyNameProvider propertyNameProvider

FIELD_NAME_PROPERTY_NAME_PROVIDER

protected static final net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.PropertyNameProvider FIELD_NAME_PROPERTY_NAME_PROVIDER

FIELD_DESCRIPTION_PROPERTY_NAME_PROVIDER

protected static final net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.PropertyNameProvider FIELD_DESCRIPTION_PROPERTY_NAME_PROVIDER
Constructor Detail

JRAbstractBeanDataSource

public JRAbstractBeanDataSource(boolean isUseFieldDescription)
Method Detail

getFieldValue

protected java.lang.Object getFieldValue(java.lang.Object bean,
                                         JRField field)
                                  throws JRException
Throws:
JRException

getBeanProperty

protected static java.lang.Object getBeanProperty(java.lang.Object bean,
                                                  java.lang.String propertyName)
                                           throws JRException
Throws:
JRException

isCurrentBeanMapping

protected static boolean isCurrentBeanMapping(java.lang.String propertyName)

getPropertyName

protected java.lang.String getPropertyName(JRField field)


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com