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

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


      return reportElement.getExportMappings().length;
    }
    if (parent instanceof ParentDataFactoryNode)
    {
      final ParentDataFactoryNode pdfn = (ParentDataFactoryNode) parent;
      final CompoundDataFactory compoundDataFactory = pdfn.getDataFactory();
      if (pdfn.isSubReport())
      {
        return compoundDataFactory.size() + 1;
      }
      return compoundDataFactory.size();
    }
    if (parent instanceof InheritedDataFactoryWrapper)
    {
      final InheritedDataFactoryWrapper idf = (InheritedDataFactoryWrapper) parent;
      return idf.getDataFactory().getQueryNames().length;
View Full Code Here


      return -1;
    }
    if (parent instanceof ParentDataFactoryNode)
    {
      final ParentDataFactoryNode pdfn = (ParentDataFactoryNode) parent;
      final CompoundDataFactory compoundDataFactory = pdfn.getDataFactory();
      if (child instanceof ParentDataFactoryNode)
      {
        return compoundDataFactory.size();
      }
      if (child instanceof InheritedDataFactoryWrapper == false)
      {
        return -1;
      }

      final InheritedDataFactoryWrapper wrapper = (InheritedDataFactoryWrapper) child;
      final CompoundDataFactory dataFactoryElement = getDataFactoryElement();
      for (int i = 0; i < dataFactoryElement.size(); i++)
      {
        final DataFactory dataFactory = dataFactoryElement.getReference(i);
        if (dataFactory == wrapper.getDataFactory())
        {
          return i;
        }
      }
View Full Code Here

    while (definition != null)
    {
      final DataFactory dataFactory = definition.getDataFactory();
      if (dataFactory instanceof CompoundDataFactory)
      {
        final CompoundDataFactory cdf = (CompoundDataFactory) dataFactory;
        final DataFactory factoryForQuery = cdf.getDataFactoryForQuery(query);
        if (factoryForQuery != null)
        {
          return factoryForQuery;
        }
      }
View Full Code Here

      if (getModel() != treeModel)
      {
        return;
      }

      final CompoundDataFactory compoundDataFactory = treeModel.getDataFactoryElement();
      final int size = compoundDataFactory.size();
      for (int i = 0; i < size; i++)
      {
        final DataFactory df = compoundDataFactory.getReference(i);
        final TreePath path = treeModel.getPathForNode(df);
        if (path == null)
        {
          return;
        }
View Full Code Here

    AbstractReportDefinition definition = reportContext.getReportDefinition();
    final LinkedHashSet<String> names = new LinkedHashSet<String>();
    while (definition != null)
    {
      final CompoundDataFactory dataFactoryElement = (CompoundDataFactory) definition.getDataFactory();
      final int dataFactoryCount = dataFactoryElement.size();
      for (int i = 0; i < dataFactoryCount; i++)
      {
        final DataFactory dataFactory = dataFactoryElement.getReference(i);
        final String[] queryNames = dataFactory.getQueryNames();
        names.addAll(Arrays.asList(queryNames));
      }
      if (definition instanceof SubReport)
      {
View Full Code Here

    return null;
  }

  private static Object insertDataFactory(final AbstractReportDefinition report, final DataFactory fromClipboard)
  {
    final CompoundDataFactory element = (CompoundDataFactory) report.getDataFactory();
    final DataFactory df = (DataFactory) fromClipboard;
    final DataFactory dataFactory = df.derive();
    element.add(dataFactory);
    report.notifyNodeChildAdded(dataFactory);
    return dataFactory;
  }
View Full Code Here

  private static UndoEntry deleteDataFactory(final ReportDocumentContext context, final Object data)
  {
    final AbstractReportDefinition report = context.getReportDefinition();
    // should be safe. If not, then the report-open functionality is wrong.
    final CompoundDataFactory dataFactory = (CompoundDataFactory) report.getDataFactory();
    final int count = dataFactory.size();
    for (int i = 0; i < count; i++)
    {
      final DataFactory df = dataFactory.getReference(i);
      if (df == data)
      {
        dataFactory.remove(i);
        report.notifyNodeChildRemoved(df);
        return new DataSourceEditUndoEntry(i, df, null);
      }
    }
    return null;
View Full Code Here

    if (data instanceof DataFactory)
    {
      final AbstractReportDefinition report = context.getReportDefinition();
      // should be safe. If not, then the report-open functionality is wrong.
      final CompoundDataFactory dataFactory = (CompoundDataFactory) report.getDataFactory();
      final int count = dataFactory.size();
      for (int i = 0; i < count; i++)
      {
        final DataFactory df = dataFactory.getReference(i);
        if (df == data)
        {
          return df.derive();
        }
      }
View Full Code Here

  public Object getChild(final Object parent, final int index)
  {
    if (parent == getDataFactoryElement())
    {
      final CompoundDataFactory dataFactoryElement = getDataFactoryElement();
      return dataFactoryElement.getReference(index);
    }
    if (parent == reportEnvironmentDataRow)
    {
      final String[] columnNames = reportEnvironmentDataRow.getColumnNames();
      final String name = columnNames[index];
View Full Code Here

    {
      return reportEnvironmentDataRow.getColumnNames().length;
    }
    if (parent == getDataFactoryElement())
    {
      final CompoundDataFactory dataFactoryElement = getDataFactoryElement();
      return dataFactoryElement.size();
    }
    if (parent == reportFunctionNode)
    {
      return getExpressions().size();
    }
View Full Code Here

TOP

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

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.