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

Examples of org.pentaho.reporting.engine.classic.extensions.datasources.olap4j.AbstractNamedMDXDataFactory


   * @throws org.xml.sax.SAXException if there is a parsing error.
   */
  protected void doneParsing() throws SAXException
  {
    super.doneParsing();
    final AbstractNamedMDXDataFactory srdf = (AbstractNamedMDXDataFactory) getDataFactory();
    for (int i = 0; i < queries.size(); i++)
    {
      final PropertyReadHandler handler = queries.get(i);
      srdf.setQuery(handler.getName(), handler.getResult());
    }
  }
View Full Code Here


   * @throws org.xml.sax.SAXException if there is a parsing error.
   */
  protected void doneParsing() throws SAXException
  {
    super.doneParsing();
    final AbstractNamedMDXDataFactory dataFactory = (AbstractNamedMDXDataFactory) getDataFactory();
    for (int i = 0; i < queries.size(); i++)
    {
      final PropertyReadHandler handler = queries.get(i);
      dataFactory.setQuery(handler.getName(), handler.getResult(), null, null);
    }

    if (globalScriptReadHandler != null)
    {
      dataFactory.setGlobalScript(globalScriptReadHandler.getResult());
      dataFactory.setGlobalScriptLanguage(globalScriptReadHandler.getName());
    }

    if (queryDefinitionsReadHandler != null)
    {
      final ArrayList<QueryDefinitionReadHandler> scriptedQueries = queryDefinitionsReadHandler.getScriptedQueries();
      for (final QueryDefinitionReadHandler scriptedQuery : scriptedQueries)
      {
        dataFactory.setQuery(scriptedQuery.getName(), scriptedQuery.getQuery(),
            scriptedQuery.getScriptLanguage(), scriptedQuery.getScript());
      }
    }

  }
View Full Code Here

    return createAndConfigureDataFactory();
  }

  protected AbstractNamedMDXDataFactory createAndConfigureDataFactory()
  {
    final AbstractNamedMDXDataFactory factory = createDataFactory();
    if (factory == null)
    {
      return null;
    }
    final KeyedComboBoxModel queries = getDialogModel().getQueries();
    for (int i = 0; i < queries.getSize(); i++)
    {
      factory.setQuery((String) queries.getElementAt(i), (String) queries.getKeyAt(i));
    }
    factory.setJdbcUserField(getDialogModel().getJdbcUserField());
    factory.setJdbcPasswordField(getDialogModel().getJdbcPasswordField());
    factory.setRoleField(connectionComponent.getRoleField());
    return factory;
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.extensions.datasources.olap4j.AbstractNamedMDXDataFactory

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.