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

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


   */
  private boolean isGlobalImportOrExport(final ParameterMapping[] inputParameters)
  {
    for (int i = 0; i < inputParameters.length; i++)
    {
      final ParameterMapping inputParameter = inputParameters[i];
      if ("*".equals(inputParameter.getName()) &&
          "*".equals(inputParameter.getAlias()))
      {
        return true;
      }
    }
    return false;
View Full Code Here


    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

      else
      {
        final ParameterMapping[] importMapping = parametersReadHandler.getImportParameterMappings();
        for (int i = 0; i < importMapping.length; i++)
        {
          final ParameterMapping mapping = importMapping[i];
          report.addInputParameter(mapping.getName(), mapping.getAlias());
        }
      }

      if (parametersReadHandler.isGlobalExport())
      {
        report.addExportParameter("*", "*");
      }
      else
      {
        final ParameterMapping[] exportMapping = parametersReadHandler.getImportParameterMappings();
        for (int i = 0; i < exportMapping.length; i++)
        {
          final ParameterMapping mapping = exportMapping[i];
          report.addExportParameter(mapping.getName(), mapping.getAlias());
        }
      }
    }

    if (reportFooterHandler != null)
View Full Code Here

      else
      {
        final ParameterMapping[] importMapping = parametersReadHandler.getImportParameterMappings();
        for (int i = 0; i < importMapping.length; i++)
        {
          final ParameterMapping mapping = importMapping[i];
          subReport.addInputParameter(mapping.getName(), mapping.getAlias());
        }
      }

      if (parametersReadHandler.isGlobalExport())
      {
        subReport.addExportParameter("*", "*");
      }
      else
      {
        final ParameterMapping[] exportMapping = parametersReadHandler.getImportParameterMappings();
        for (int i = 0; i < exportMapping.length; i++)
        {
          final ParameterMapping mapping = exportMapping[i];
          subReport.addExportParameter(mapping.getName(), mapping.getAlias());
        }
      }

    }
  }
View Full Code Here

  private ParameterMapping[] filterGlobalImport(final ParameterMapping[] parameterMapping)
  {
    final ArrayList filteredList = new ArrayList(parameterMapping.length);
    for (int i = 0; i < parameterMapping.length; i++)
    {
      final ParameterMapping mapping = parameterMapping[i];
      if ("*".equals(mapping.getName()) &&
          "*".equals(mapping.getAlias()))
      {
        continue;
      }
      filteredList.add(mapping);
    }
View Full Code Here

      xmlWriter.writeTag(BundleNamespaces.LAYOUT, tagName, "href",
          '/' + subReportState.getFileName() + "content.xml", XmlWriterSupport.OPEN);

      for (int i = 0; i < inputMappings.length; i++)
      {
        final ParameterMapping mapping = inputMappings[i];
        final AttributeList attrs = new AttributeList();
        attrs.setAttribute(BundleNamespaces.LAYOUT, "master-fieldname", mapping.getName());
        attrs.setAttribute(BundleNamespaces.LAYOUT, "detail-fieldname", mapping.getAlias());
        xmlWriter.writeTag(BundleNamespaces.LAYOUT, "input-parameter", attrs, XmlWriterSupport.CLOSE);
      }

      for (int i = 0; i < outputMappings.length; i++)
      {
        final ParameterMapping mapping = outputMappings[i];
        final AttributeList attrs = new AttributeList();
        attrs.setAttribute(BundleNamespaces.LAYOUT, "master-fieldname", mapping.getName());
        attrs.setAttribute(BundleNamespaces.LAYOUT, "detail-fieldname", mapping.getAlias());
        xmlWriter.writeTag(BundleNamespaces.LAYOUT, "output-parameter", attrs, XmlWriterSupport.CLOSE);
      }
      xmlWriter.writeCloseTag();
    }
  }
View Full Code Here

      report.setQueryLimit(dataDefinition.getQueryLimit());
      report.setQueryTimeout(dataDefinition.getQueryTimeout());
      final ParameterMapping[] inputMapping = dataDefinition.getImportParameters();
      for (int i = 0; i < inputMapping.length; i++)
      {
        final ParameterMapping mapping = inputMapping[i];
        report.addInputParameter(mapping.getName(), mapping.getAlias());
      }
      final ParameterMapping[] exportMapping = dataDefinition.getExportParameters();
      for (int i = 0; i < exportMapping.length; i++)
      {
        final ParameterMapping mapping = exportMapping[i];
        report.addExportParameter(mapping.getName(), mapping.getAlias());
      }

      final Expression[] expressions = dataDefinition.getExpressions();
      if (expressions != null)
      {
View Full Code Here

    final ParameterMapping[] parameterMappings = subReport.getExportMappings();

    for (int i = 0; i < parameterMappings.length; i++)
    {
      final ParameterMapping parameterMapping = parameterMappings[i];
      logger.debug("parameterMapping.getAlias() = " + parameterMapping.getAlias());
      logger.debug("parameterMapping.getName() = " + parameterMapping.getName());
    }

    return report;
  }
View Full Code Here

      report.setQueryLimit(dataDefinition.getQueryLimit());
      report.setQueryTimeout(dataDefinition.getQueryTimeout());
      final ParameterMapping[] inputMapping = dataDefinition.getImportParameters();
      for (int i = 0; i < inputMapping.length; i++)
      {
        final ParameterMapping mapping = inputMapping[i];
        report.addInputParameter(mapping.getName(), mapping.getAlias());
      }
      final ParameterMapping[] exportMapping = dataDefinition.getExportParameters();
      for (int i = 0; i < exportMapping.length; i++)
      {
        final ParameterMapping mapping = exportMapping[i];
        report.addExportParameter(mapping.getName(), mapping.getAlias());
      }

      final Expression[] expressions = dataDefinition.getExpressions();
      if (expressions != null)
      {
View Full Code Here

    importParameterMappings = new ParameterMapping[importParameters.size()];
    for (int i = 0; i < importParameters.size(); i++)
    {
      final SubReportParameterReadHandler readHandler = (SubReportParameterReadHandler) importParameters.get(i);
      ParameterMapping parameter = new ParameterMapping(readHandler.getKey(), readHandler.getValue());
      importParameterMappings[i] = parameter;
    }

    exportParameterMappings = new ParameterMapping[exportParameters.size()];
    for (int i = 0; i < exportParameters.size(); i++)
    {
      final SubReportParameterReadHandler readHandler = (SubReportParameterReadHandler) exportParameters.get(i);
      ParameterMapping parameter = new ParameterMapping(readHandler.getKey(), readHandler.getValue());
      exportParameterMappings[i] = parameter;
    }
  }
View Full Code Here

TOP

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

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.