Package net.sf.jasperreports.olap
Class JROlapDataSource
java.lang.Object
net.sf.jasperreports.olap.JROlapDataSource
- All Implemented Interfaces:
JRDataSource
,MappingMetadata
- Direct Known Subclasses:
JRMondrianDataSource
,Olap4jDataSource
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
protected class
protected class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JROlapResultAxis[]
protected int[]
protected boolean
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
protected Map
<Object, JROlapDataSource.FieldMatcher> protected int[][]
protected boolean
protected final int
protected boolean
protected boolean[]
protected int[][]
protected final JROlapResult
static final String
Property specifying the OLAP mapping for the dataset field.protected final JROlapHierarchy[][]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getDimensionIndex
(Axis axis, String dimension) protected String
getFieldMapping
(JRField field) getFieldValue
(JRField jrField) Convert the value of the data type of the Fieldint
getLevelDepth
(TuplePosition pos, String levelName) int
getTuplePosition
(int axisIndex, Tuple tuple) protected boolean
matchesDimensionName
(JROlapHierarchy hierarchy, String dimensionName) boolean
next()
Tries to position the cursor on the next element in the data source.protected boolean
protected void
processMemberInfo
(Member member) protected void
setMatchMemberDepth
(Member memberInfo, JROlapMember member)
-
Field Details
-
EXCEPTION_MESSAGE_KEY_OLAP_AXIS_NOT_FOUND_IN_RESULT
- See Also:
-
EXCEPTION_MESSAGE_KEY_OLAP_CANNOT_CONVERT_FIELD_TYPE
- See Also:
-
EXCEPTION_MESSAGE_KEY_OLAP_CANNOT_CONVERT_STRING_VALUE_TYPE
- See Also:
-
EXCEPTION_MESSAGE_KEY_OLAP_DIMENSION_NOT_FOUND
- See Also:
-
EXCEPTION_MESSAGE_KEY_OLAP_FIELD_VALUE_NOT_RETRIEVED
- See Also:
-
EXCEPTION_MESSAGE_KEY_OLAP_INTERNAL_ERROR
- See Also:
-
EXCEPTION_MESSAGE_KEY_OLAP_MISSING_FIELD_MAPPING
- See Also:
-
EXCEPTION_MESSAGE_KEY_OLAP_INVALID_FIELD_MAPPING
- See Also:
-
EXCEPTION_MESSAGE_KEY_OLAP_LEVEL_NOT_FOUND
- See Also:
-
EXCEPTION_MESSAGE_KEY_OLAP_TUPLE_NOT_FOUND
- See Also:
-
PROPERTY_FIELD_MAPPING
Property specifying the OLAP mapping for the dataset field.- See Also:
-
olapResult
-
axes
-
queryHierarchies
-
hierarchiesCount
protected final int hierarchiesCount -
fieldMatchers
-
fieldsMaxDepths
protected int[][] fieldsMaxDepths -
iteratePositions
protected boolean[] iteratePositions -
iterate
protected boolean iterate -
dataField
protected boolean dataField -
fieldValues
-
axisPositions
protected int[] axisPositions -
first
protected boolean first -
maxDepths
protected int[][] maxDepths
-
-
Constructor Details
-
JROlapDataSource
-
-
Method Details
-
getOlapResult
-
next
Description copied from interface:JRDataSource
Tries to position the cursor on the next element in the data source.- Specified by:
next
in interfaceJRDataSource
- Returns:
- true if there is a next record, false otherwise
- Throws:
JRException
- if any error occurs while trying to move to the next element
-
nextPositions
protected boolean nextPositions() -
getFieldValue
Convert the value of the data type of the Field- Specified by:
getFieldValue
in interfaceJRDataSource
- Parameters:
jrField
- the Field whose type has to be converted- Returns:
- value of field in the requested type
- Throws:
JRException
-
getFieldMapping
-
processMemberInfo
-
getDimensionIndex
- Specified by:
getDimensionIndex
in interfaceMappingMetadata
-
matchesDimensionName
-
getLevelDepth
- Specified by:
getLevelDepth
in interfaceMappingMetadata
-
setMatchMemberDepth
-
getTuplePosition
- Specified by:
getTuplePosition
in interfaceMappingMetadata
-