Package net.sf.jasperreports.engine.data
Class JRAbstractBeanDataSource
- java.lang.Object
-
- net.sf.jasperreports.engine.data.JRAbstractBeanDataSource
-
- All Implemented Interfaces:
JRDataSource,JRRewindableDataSource
- Direct Known Subclasses:
BookmarksFlatDataSource,JRBeanArrayDataSource,JRBeanCollectionDataSource,JRJpaDataSource
public abstract class JRAbstractBeanDataSource extends java.lang.Object implements JRRewindableDataSource
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classJRAbstractBeanDataSource.DefaultPropertyNameProvider
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCURRENT_BEAN_MAPPINGField mapping that produces the current bean.static java.lang.StringEXCEPTION_MESSAGE_KEY_BEAN_FIELD_VALUE_NOT_RETRIEVEDstatic java.lang.StringPROPERTY_JAVABEAN_FIELD_PROPERTYProperty specifying the JavaBean property name for the dataset field.protected net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.PropertyNameProviderpropertyNameProvider
-
Constructor Summary
Constructors Constructor Description JRAbstractBeanDataSource(boolean isUseFieldDescription)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static java.lang.ObjectgetBeanProperty(java.lang.Object bean, java.lang.String propertyName)protected java.lang.ObjectgetFieldValue(java.lang.Object bean, JRField field)protected java.lang.StringgetPropertyName(JRField field)protected static booleanisCurrentBeanMapping(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.JRDataSource
getFieldValue, next
-
Methods inherited from interface net.sf.jasperreports.engine.JRRewindableDataSource
moveFirst
-
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_BEAN_FIELD_VALUE_NOT_RETRIEVED
public static final java.lang.String EXCEPTION_MESSAGE_KEY_BEAN_FIELD_VALUE_NOT_RETRIEVED
- See Also:
- Constant Field Values
-
PROPERTY_JAVABEAN_FIELD_PROPERTY
public static final java.lang.String PROPERTY_JAVABEAN_FIELD_PROPERTY
Property specifying the JavaBean property name for the dataset field.- See Also:
- Constant Field Values
-
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
-
-
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)
-
-