Package org.pentaho.reporting.engine.classic.extensions.datasources.cda

Examples of org.pentaho.reporting.engine.classic.extensions.datasources.cda.CdaQueryEntry


    final String[] queryNames = dataFactory.getQueryNames();
    for (int i = 0; i < queryNames.length; i++)
      {
      final String queryName = queryNames[i];
        final CdaQueryEntry query = dataFactory.getQueryEntry(queryName);
        final AttributeList queryAttr = new AttributeList();
        queryAttr.setAttribute(CdaModule.NAMESPACE, "query", query.getId());
        queryAttr.setAttribute(CdaModule.NAMESPACE, "name", query.getName());
        xmlWriter.writeTag(CdaModule.NAMESPACE, "query", queryAttr, XmlWriterSupport.OPEN);

        final ParameterMapping[] parameterMappings = query.getParameters();
        for (int j = 0; j < parameterMappings.length; j++)
        {
          final ParameterMapping parameterMapping = parameterMappings[j];
          final AttributeList paramAttr = new AttributeList();
          paramAttr.setAttribute(CdaModule.NAMESPACE, "datarow-name", parameterMapping.getName());
View Full Code Here


    final String[] queryNames = dataFactory.getQueryNames();
    for (int i = 0; i < queryNames.length; i++)
    {
      final String queryName = queryNames[i];
      final CdaQueryEntry query = dataFactory.getQueryEntry(queryName);
      final AttributeList queryAttr = new AttributeList();
      queryAttr.setAttribute(CdaModule.NAMESPACE, "query", query.getId());
      queryAttr.setAttribute(CdaModule.NAMESPACE, "name", query.getName());
      xmlWriter.writeTag(CdaModule.NAMESPACE, "query", queryAttr, XmlWriterSupport.OPEN);

      final ParameterMapping[] parameterMappings = query.getParameters();
      for (int j = 0; j < parameterMappings.length; j++)
      {
        final ParameterMapping parameterMapping = parameterMappings[j];
        final AttributeList paramAttr = new AttributeList();
        paramAttr.setAttribute(CdaModule.NAMESPACE, "datarow-name", parameterMapping.getName());
View Full Code Here

    srdf.setSugarMode(configReadHandler.isSugarMode());

    for (int i = 0; i < queries.size(); i++)
    {
      final QueryReadHandler handler = (QueryReadHandler) queries.get(i);
      final CdaQueryEntry cdaqueryentry = new CdaQueryEntry(handler.getQueryName(),handler.getQueryId());
      cdaqueryentry.setParameters(handler.getParameters());
      srdf.setQueryEntry(handler.getQueryName(), cdaqueryentry);
    }
    dataFactory = srdf;
  }
View Full Code Here

      queriesTableModel.clear();
      final String[] queryNames = input.getQueryNames();
      for (int i = 0; i < queryNames.length; i++)
      {
        final String name = queryNames[i];
        final CdaQueryEntry queryEntry = input.getQueryEntry(name);
        queriesTableModel.add(new QueriesTableModel.QueryData(queryEntry, new String[0]));
      }
    }
    else
    {
View Full Code Here

          else
          {
            queryName = name;
          }
         
          final CdaQueryEntry entry = new CdaQueryEntry(queryName, query);
          entry.setParameters(parameterMappings);
          queriesTableModel.add(new QueriesTableModel.QueryData(entry, declaredParameters));
          extraParameter.clear();
        }
      }
      catch (ReportProcessingException e1)
View Full Code Here

      {
        return; /* TODO all error message */
      }

      final QueriesTableModel.QueryData queryData = queriesTableModel.get(selectedRow);
      final CdaQueryEntry queryEntry = queryData.getQueryEntry();

      try
      {
        final ParameterEditorDialog dialog = new ParameterEditorDialog(CdaDataSourceEditor.this);
        final String[] reportFields = designTimeContext.getDataSchemaModel().getColumnNames();
        final ParameterEditorDialog.EditResult editResult =
            dialog.performEdit(queryEntry.getParameters(), reportFields, queryData.getDeclaredParameter());
        if (editResult == null)
        {
          return;
        }

        queryEntry.setParameters(editResult.getParameterMappings());
      }
      catch (Exception e1)
      {
        designTimeContext.error(e1);
      }
View Full Code Here

  }

  public Object getValueAt(final int rowIndex, final int columnIndex)
  {
    final QueryData queryData = queries.get(rowIndex);
    final CdaQueryEntry query = queryData.getQueryEntry();
    if (columnIndex == 0)
    {
      return query.getName();
    }
    if (columnIndex == 1)
    {
      return query.getId();
    }
    throw new IndexOutOfBoundsException();
  }
View Full Code Here

  }

  public void setValueAt(final Object aValue, final int rowIndex, final int columnIndex)
  {
    final QueryData queryData = queries.get(rowIndex);
    final CdaQueryEntry query = queryData.getQueryEntry();
    if (columnIndex == 0)
    {
      query.setName((String) aValue);
      fireTableCellUpdated(rowIndex, columnIndex);
    }
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.extensions.datasources.cda.CdaQueryEntry

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.