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

Examples of org.pentaho.reporting.engine.classic.core.states.FunctionStorageKey


    final CachingDataFactory dataFactory = new CachingDataFactory(report.getDataFactory(), dataCacheEnabled);
    dataFactory.initialize(processingContext.getConfiguration(), processingContext.getResourceManager(),
        processingContext.getContentBase(), processingContext.getResourceBundleFactory());
    dataFactory.open();

    final FunctionStorageKey functionStorageKey = FunctionStorageKey.createKey(null, report);
    this.dataFactoryManager.store(functionStorageKey, dataFactory);
    // eval query, query-limit and query-timeout
    this.flowController = flowController;
    final Integer queryLimitDefault = IntegerCache.getInteger(report.getQueryLimit());
    final Integer queryTimeoutDefault = IntegerCache.getInteger(report.getQueryTimeout());
View Full Code Here


    this.currentSubReportMarker = subReports[subReportIndex];
    this.inlineProcess =
        parentState.isInlineProcess() || currentSubReportMarker.getProcessType() == SubReportProcessType.INLINE;

    final SubReport subreportFromMarker = currentSubReportMarker.getSubreport();
    final FunctionStorageKey functionStorageKey = FunctionStorageKey.createKey
        (parentSubReportState.getProcessKey(), subreportFromMarker);
    final boolean needPreProcessing;
    final SubReport report;
    if (subReportStorage.contains(functionStorageKey))
    {
      report = subReportStorage.restore(functionStorageKey);
      final ElementStyleSheet subreportStyle = subreportFromMarker.getStyle();
      final Map styleExpressions = subreportFromMarker.getStyleExpressions();
      final StyleKey[] definedStyle =
          (StyleKey[]) styleExpressions.keySet().toArray(new StyleKey[styleExpressions.size()]);
      for (int i = 0; i < definedStyle.length; i++)
      {
        final StyleKey styleKey = definedStyle[i];
        report.getStyle().setStyleProperty(styleKey, subreportStyle.getStyleProperty(styleKey));
      }
      needPreProcessing = false;
    }
    else
    {
      report = subreportFromMarker;
      needPreProcessing = true;
    }

    final ResourceBundleFactory resourceBundleFactory;
    if (report.getResourceBundleFactory() != null)
    {
      resourceBundleFactory = MasterReport.computeAndInitResourceBundleFactory
          (report.getResourceBundleFactory(), parentState.getFlowController().getReportContext().getEnvironment());

    }
    else
    {
      resourceBundleFactory = parentState.getResourceBundleFactory();
    }

    final int processingLevel = flowController.getReportContext().getProcessingLevel();
    if (processingLevel == LayoutProcess.LEVEL_PAGINATE &&
        report.isVisible() == false)
    {
      // make it a minimum effort report, but still enter the loop.
      final ReportDefinition parentReport = parentState.getReport();
      final SubReport dummyReport = new SubReport(functionStorageKey.getReportId());
      this.report = new ReportDefinitionImpl(dummyReport, parentReport.getPageDefinition());
      this.flowController = parentState.flowController.derive();
      this.advanceHandler = EndSubReportHandler.HANDLER;
      this.layoutProcess = new SubLayoutProcess
          (parentState.layoutProcess, computeStructureFunctions(report.getStructureFunctions(),
View Full Code Here

    }
    else
    {
      parentStateKey = parentState.getProcessKey();
    }
    final FunctionStorageKey functionStorageKey =
        FunctionStorageKey.createKey(parentStateKey, next.getReport());
    next.getFunctionStorage().store (functionStorageKey, expressions, expressionDataRow.getColumnCount());
    final StructureFunction[] structureFunctions = next.getLayoutProcess().getCollectionFunctions();
    next.getStructureFunctionStorage().store(functionStorageKey, structureFunctions, structureFunctions.length);
View Full Code Here

    }
    else
    {
      parentStateKey = parentState.getProcessKey();
    }
    final FunctionStorageKey functionStorageKey =
        FunctionStorageKey.createKey(parentStateKey, next.getReport());
    next.getFunctionStorage().store (functionStorageKey, expressions, expressionDataRow.getColumnCount());
    final StructureFunction[] structureFunctions = next.getLayoutProcess().getCollectionFunctions();
    next.getStructureFunctionStorage().store(functionStorageKey, structureFunctions, structureFunctions.length);
View Full Code Here

    final DataFactory sortingDataFactory =
        new SortingDataFactory(lookupDataFactory(processedReport), performanceMonitorContext);
    final CachingDataFactory dataFactory = new CachingDataFactory(sortingDataFactory, dataCacheEnabled);
    dataFactory.initialize(new ProcessingDataFactoryContext(processingContext, dataFactory));

    final FunctionStorageKey functionStorageKey = FunctionStorageKey.createKey(null, processedReport);
    this.dataFactoryManager.store(functionStorageKey, dataFactory, true);
    // eval query, query-limit and query-timeout
    this.flowController = flowController;
    final Integer queryLimitDefault = IntegerCache.getInteger(processedReport.getQueryLimit());
    final Integer queryTimeoutDefault = IntegerCache.getInteger(processedReport.getQueryTimeout());
View Full Code Here

    this.currentSubReportMarker = subReports[subReportIndex];
    this.inlineProcess =
        parentState.isInlineProcess() || currentSubReportMarker.getProcessType() == SubReportProcessType.INLINE;

    final SubReport subreportFromMarker = currentSubReportMarker.getSubreport();
    final FunctionStorageKey functionStorageKey = FunctionStorageKey.createKey
        (parentSubReportState.getProcessKey(), subreportFromMarker);
    final boolean needPreProcessing;
    final SubReport initialSubReport;
    if (subReportStorage.contains(functionStorageKey))
    {
      initialSubReport = subReportStorage.restore(functionStorageKey);
      initialSubReport.reconnectParent(subreportFromMarker.getParentSection());
      applyCurrentStyleAndAttributes(subreportFromMarker, initialSubReport);
      needPreProcessing = false;
    }
    else
    {
      initialSubReport = subreportFromMarker.derive(true);
      initialSubReport.reconnectParent(subreportFromMarker.getParentSection());
      needPreProcessing = true;
    }

    final DefaultFlowController parentStateFlowController = parentState.getFlowController();
    final ResourceBundleFactory resourceBundleFactory = parentState.getResourceBundleFactory();

    if (isSubReportInvisible(initialSubReport, parentStateFlowController))
    {
      // make it a minimum effort report, but still enter the loop.
      final ReportDefinition parentReport = parentState.getReport();
      final SubReport dummyReport = new SubReport(functionStorageKey.getReportId());
      this.report = new ReportDefinitionImpl(dummyReport, parentReport.getPageDefinition(), subreportFromMarker.getParentSection());
      this.flowController = parentStateFlowController.derive();
      this.advanceHandler = EndSubReportHandler.HANDLER;
      this.layoutProcess = new SubLayoutProcess
          (parentState.layoutProcess, computeStructureFunctions(initialSubReport.getStructureFunctions(),
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.states.FunctionStorageKey

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.