Class JROlapDataSource

java.lang.Object
net.sf.jasperreports.olap.JROlapDataSource
All Implemented Interfaces:
JRDataSource, MappingMetadata
Direct Known Subclasses:
JRMondrianDataSource, Olap4jDataSource

public class JROlapDataSource extends Object implements JRDataSource, MappingMetadata
Author:
Lucian Chirita (lucianc@users.sourceforge.net)
  • Field Details

    • PROPERTY_FIELD_MAPPING

      public static final String PROPERTY_FIELD_MAPPING
      Property specifying the OLAP mapping for the dataset field.
      See Also:
    • olapResult

      protected final JROlapResult olapResult
    • axes

      protected JROlapResultAxis[] axes
    • queryHierarchies

      protected final JROlapHierarchy[][] queryHierarchies
    • hierarchiesCount

      protected final int hierarchiesCount
    • fieldMatchers

      protected Map<Object,JROlapDataSource.FieldMatcher> fieldMatchers
    • fieldsMaxDepths

      protected int[][] fieldsMaxDepths
    • iteratePositions

      protected boolean[] iteratePositions
    • iterate

      protected boolean iterate
    • dataField

      protected boolean dataField
    • fieldValues

      protected Map<Object,Object> fieldValues
    • axisPositions

      protected int[] axisPositions
    • first

      protected boolean first
    • maxDepths

      protected int[][] maxDepths
  • Constructor Details

  • Method Details

    • getOlapResult

      public JROlapResult getOlapResult()
    • next

      public boolean next() throws JRException
      Description copied from interface: JRDataSource
      Tries to position the cursor on the next element in the data source.
      Specified by:
      next in interface JRDataSource
      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

      public Object getFieldValue(JRField jrField) throws JRException
      Convert the value of the data type of the Field
      Specified by:
      getFieldValue in interface JRDataSource
      Parameters:
      jrField - the Field whose type has to be converted
      Returns:
      value of field in the requested type
      Throws:
      JRException
    • getFieldMapping

      protected String getFieldMapping(JRField field)
    • processMemberInfo

      protected void processMemberInfo(Member member)
    • getDimensionIndex

      public int getDimensionIndex(Axis axis, String dimension)
      Specified by:
      getDimensionIndex in interface MappingMetadata
    • matchesDimensionName

      protected boolean matchesDimensionName(JROlapHierarchy hierarchy, String dimensionName)
    • getLevelDepth

      public int getLevelDepth(TuplePosition pos, String levelName)
      Specified by:
      getLevelDepth in interface MappingMetadata
    • setMatchMemberDepth

      protected void setMatchMemberDepth(Member memberInfo, JROlapMember member)
    • getTuplePosition

      public int getTuplePosition(int axisIndex, Tuple tuple)
      Specified by:
      getTuplePosition in interface MappingMetadata