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
,JRJpaDataSource
public abstract class JRAbstractBeanDataSource extends Object implements JRRewindableDataSource
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JRAbstractBeanDataSource.DefaultPropertyNameProvider
static interface
JRAbstractBeanDataSource.PropertyNameProvider
-
Field Summary
Fields Modifier and Type Field Description static String
CURRENT_BEAN_MAPPING
Field mapping that produces the current bean.static String
EXCEPTION_MESSAGE_KEY_BEAN_FIELD_VALUE_NOT_RETRIEVED
static String
PROPERTY_JAVABEAN_FIELD_PROPERTY
Property specifying the JavaBean property name for the dataset field.protected JRAbstractBeanDataSource.PropertyNameProvider
propertyNameProvider
-
Constructor Summary
Constructors Constructor Description JRAbstractBeanDataSource(boolean isUseFieldDescription)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Object
getBeanProperty(Object bean, String propertyName)
protected Object
getFieldValue(Object bean, JRField field)
protected String
getPropertyName(JRField field)
protected static boolean
isCurrentBeanMapping(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 String EXCEPTION_MESSAGE_KEY_BEAN_FIELD_VALUE_NOT_RETRIEVED
- See Also:
- Constant Field Values
-
PROPERTY_JAVABEAN_FIELD_PROPERTY
public static final 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 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 JRAbstractBeanDataSource.PropertyNameProvider propertyNameProvider
-
-
Method Detail
-
getFieldValue
protected Object getFieldValue(Object bean, JRField field) throws JRException
- Throws:
JRException
-
getBeanProperty
public static Object getBeanProperty(Object bean, String propertyName) throws JRException
- Throws:
JRException
-
isCurrentBeanMapping
protected static boolean isCurrentBeanMapping(String propertyName)
-
-