Package org.pentaho.reporting.engine.classic.core

Examples of org.pentaho.reporting.engine.classic.core.DataRow


    if (innerRow == null)
    {
      throw new NullPointerException();
    }

    final DataRow globalView = innerRow.getGlobalView();
    final String[] names = globalView.getColumnNames();
    final int cols = names.length;
    this.dataAttributes = new HashMap();
    this.outerNames = new String[cols];
    this.innerNames = outerNames;
    final Object[] values = new Object[cols];
    final DataSchema dataSchema = innerRow.getDataSchema();
    for (int i = 0; i < cols; i++)
    {
      final String name = names[i];
      if (name == null)
      {
        throw new IllegalStateException("Every column must have a name.");
      }
      outerNames[i] = name;
      values[i] = globalView.get(name);

      dataAttributes.put(name, dataSchema.getAttributes(name));
    }
    setData(outerNames, values);
  }
View Full Code Here


    if (parameterMappings == null)
    {
      throw new NullPointerException();
    }

    final DataRow globalView = innerRow.getGlobalView();
    final int cols = parameterMappings.length;
    this.dataAttributes = new HashMap();
    this.outerNames = new String[cols];
    this.innerNames = outerNames;
    final Object[] values = new Object[cols];
    final DataSchema dataSchema = innerRow.getDataSchema();
    for (int i = 0; i < cols; i++)
    {
      final ParameterMapping mapping = parameterMappings[i];
      final String name = mapping.getAlias();
      if (name == null)
      {
        throw new IllegalStateException("Every column must have a name.");
      }
      outerNames[i] = name;
      values[i] = globalView.get(name);

      dataAttributes.put(mapping.getName(), dataSchema.getAttributes(name));
    }
    setData(outerNames, values);
  }
View Full Code Here

    return event.getOriginatingState().getDataRow();
  }

  private Object computeDataValue(final ReportEvent event)
  {
    final DataRow dataRow = extractDataRow(event);
    if (StringUtils.isEmpty(dataField) == false)
    {
      return dataRow.get(dataField);
    }
    try
    {
      this.dataFormula.setRuntime(new WrapperExpressionRuntime(dataRow, getRuntime()));
      return dataFormula.getValue();
View Full Code Here

    {
//      final Transport transport = session.getTransport();
//      transport.connect();
      for (int i = 0; i < burstingData.getRowCount(); i++)
      {
        final DataRow parameterDataRow = createReportParameterDataRow(burstingData, i);
        final MimeMessage message = createReport(definition, session, parameterDataRow);

        parameterContext.setParameterValues(parameterDataRow);

        final MailHeader[] headers = definition.getHeaders();
View Full Code Here

    if (groupIndex < getGroupCount() ||
        getGroupCount() == 0)
    {
      rowAdded = false;

      final DataRow dataRow = extractDataRow(event);
      final Object groupValue;
      if (groupIndex < getGroupCount())
      {
        final String fieldName = getGroup(groupIndex);
        if (fieldName != null)
        {
          groupValue = dataRow.get(fieldName);
        }
        else
        {
          groupValue = extractFieldFromGroup(relationalGroup, dataRow);
        }
View Full Code Here

        if (groupIndex < getGroupCount())
        {
          final String fieldName = getGroup(groupIndex);
          if (fieldName != null)
          {
            final DataRow dataRow = extractDataRow(event);
            groupValue = dataRow.get(fieldName);
          }
          else
          {
            groupValue = null;
          }
View Full Code Here

        if (isValidGroupValues() == false)
        {
          return;
        }

        final DataRow dataRow = extractDataRow(event);
        final Object titleValue = computeTitleValue(dataRow);
        final StringBuffer indexText = new StringBuffer();
        final Integer[] indexValues = new Integer[groupCount.size()];
        for (int i = 0; i < groupCount.size(); i++)
        {
View Full Code Here

    if (context == null)
    {
      throw new NullPointerException();
    }

    final DataRow parameterData = context.getParameterData();
    final ReportEnvironmentDataRow envDataRow = new ReportEnvironmentDataRow(context.getReportEnvironment());
    final DataFactory dataFactory = context.getDataFactory();
    final TableModel tableModel = dataFactory.queryData(getQueryName(),
        new CompoundDataRow(envDataRow, parameterData));
View Full Code Here

    final ProcessingContext reportContext = flowController.getReportContext();
    final DefaultDataAttributeContext dac = new DefaultDataAttributeContext
        (reportContext.getOutputProcessorMetaData(), reportContext.getResourceBundleFactory().getLocale());

    final DataRow dataRow = flowController.getMasterRow().getGlobalView();
    final DataSchema dataSchema = flowController.getMasterRow().getDataSchema();

    // final Locale locale = reportContext.getResourceBundleFactory().getLocale();
    final AutoGeneratorFieldDescription[] fieldDescriptions = computeFields(dataRow, dataSchema, dac);
View Full Code Here

    return new DefaultCategoryDataset();
  }

  protected void buildDataset()
  {
    final DataRow dataRow = getDataRow();
    final Object categoryObject = dataRow.get(getCategoryColumn());
    if (categoryObject instanceof Comparable == false)
    {
      return;
    }

    final Comparable categoryComparable = (Comparable) categoryObject;

    // I love to be paranoid!
    final DefaultCategoryDataset categoryDataset = (DefaultCategoryDataset) getDataSet();

    final int maxIndex = this.valueColumns.size();
    for (int i = 0; i < maxIndex; i++)
    {
      final Comparable seriesName = querySeriesValue(i);
      if (seriesName == null)
      {
        continue;
      }
      final Object valueObject = dataRow.get(getValueColumn(i));

      final Number value = (valueObject instanceof Number) ? (Number) valueObject : null;

      final Number existingValue =
          CollectorFunctionUtil.queryExistingValueFromDataSet(categoryDataset, seriesName, categoryComparable);
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.DataRow

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.