Package mondrian.olap

Examples of mondrian.olap.Result


   * @return the result of the query as table model.
   * @throws ReportDataFactoryException if an error occured while performing the query.
   */
  public TableModel queryData(final String queryName, final DataRow parameters) throws ReportDataFactoryException
  {
    final Result cellSet = performQuery(queryName, parameters);
    return new BandedMDXTableModel(cellSet, extractQueryLimit(parameters));
  }
View Full Code Here


   * @return the result of the query as table model.
   * @throws org.pentaho.reporting.engine.classic.core.ReportDataFactoryException if an error occured while performing the query.
   */
  public TableModel queryData(final String queryName, final DataRow parameters) throws ReportDataFactoryException
  {
    final Result cellSet = performQuery(queryName, parameters);
    return new DenormalizedMDXTableModel(cellSet);
  }
View Full Code Here

   * @return the result of the query as table model.
   * @throws ReportDataFactoryException if an error occured while performing the query.
   */
  public TableModel queryData(final String queryName, final DataRow parameters) throws ReportDataFactoryException
  {
    final Result cellSet = performQuery(queryName, parameters);
    return new DenormalizedMDXTableModel(cellSet);
  }
View Full Code Here

        {
          def.setValue(processedParamValue);
        }
      }

      final Result resultSet = connection.execute(query);
      if (resultSet == null)
      {
        throw new ReportDataFactoryException("query returned no resultset");
      }
      return resultSet;
View Full Code Here

      // It is non fatal if that fails. Invalid input has this effect.
    }

    final Query memberQuery = connection.parseQuery("SELECT " + hierarchy.getQualifiedName() // NON-NLS
        + ".AllMembers ON 0, {} ON 1 FROM " + cube.getQualifiedName()); // NON-NLS
    final Result result = connection.execute(memberQuery);
    try
    {
      final List<Position> positionList = result.getAxes()[0].getPositions();
      for (int i = 0; i < positionList.size(); i++)
      {
        final Position position = positionList.get(i);
        for (int j = 0; j < position.size(); j++)
        {
          final Member member = position.get(j);
          if (parameter.equals(MondrianUtil.getUniqueMemberName(member)))
          {
            if (memberByUniqueId == null)
            {
              memberByUniqueId = member;
            }
            else
            {
              logger.warn("Encountered a member with a duplicate unique key: " + member.getQualifiedName()); // NON-NLS
            }
          }
          if (searchForNames == false)
          {
            continue;
          }
          if (parameter.equals(member.getName()))
          {
            if (memberById == null)
            {
              memberById = member;
            }
            else
            {
              logger.warn("Encountered a member with a duplicate name: " + member.getQualifiedName()); // NON-NLS
            }
          }
        }
      }
    }
    finally
    {
      result.close();
    }
    if (memberByUniqueId != null)
    {
      return memberByUniqueId;
    }
View Full Code Here

  {
    Member memberById = null;
    Member memberByUniqueId = null;
    final Query queryDirect = connection.parseQuery("SELECT STRTOMEMBER(" + quote(parameter) + ") ON 0, {} ON 1 FROM " // NON-NLS
        + cube.getQualifiedName());
    final Result resultDirect = connection.execute(queryDirect);
    try
    {
      final List<Position> positionList = resultDirect.getAxes()[0].getPositions();
      for (int i = 0; i < positionList.size(); i++)
      {
        final Position position = positionList.get(i);
        for (int j = 0; j < position.size(); j++)
        {
          final Member member = position.get(j);

          // If the parameter starts with '[', we'll assume we have the full
          // member specification specification. Otherwise, keep the funky lookup
          // route. We do check whether we get a second member (heck, should not
          // happen, but I've seen pigs fly already).

          if (parameter.startsWith("["))
          {
            if (memberByUniqueId == null)
            {
              memberByUniqueId = member;
            }
            else
            {
              logger.warn("Encountered a member with a duplicate key: " + member.getQualifiedName()); // NON-NLS
            }
          }
          if (searchForNames == false)
          {
            continue;
          }
          if (parameter.equals(member.getName()))
          {
            if (memberById == null)
            {
              memberById = member;
            }
            else
            {
              logger.warn("Encountered a member with a duplicate name: " + member.getQualifiedName()); // NON-NLS
            }
          }
        }
      }
    }
    finally
    {
      resultDirect.close();
    }
    if (memberByUniqueId != null)
    {
      final Hierarchy memberHierarchy = memberByUniqueId.getHierarchy();
      if (hierarchy != memberHierarchy)
View Full Code Here

   * @return the result of the query as table model.
   * @throws org.pentaho.reporting.engine.classic.core.ReportDataFactoryException if an error occured while performing the query.
   */
  public TableModel queryData(final String queryName, final DataRow parameters) throws ReportDataFactoryException
  {
    final Result cellSet = performQuery(queryName, parameters);
    return new BandedMDXTableModel(cellSet, extractQueryLimit(parameters));
  }
View Full Code Here

   * @return the result of the query as table model.
   * @throws org.pentaho.reporting.engine.classic.core.ReportDataFactoryException if an error occured while performing the query.
   */
  public TableModel queryData(final String queryName, final DataRow parameters) throws ReportDataFactoryException
  {
    final Result cellSet = performQuery(queryName, parameters);
    return new LegacyBandedMDXTableModel(cellSet, extractQueryLimit(parameters));
  }
View Full Code Here

   * @return the result of the query as table model.
   * @throws ReportDataFactoryException if an error occured while performing the query.
   */
  public TableModel queryData(final String queryName, final DataRow parameters) throws ReportDataFactoryException
  {
    final Result cellSet = performQuery(queryName, parameters);
    return new LegacyBandedMDXTableModel(cellSet, extractQueryLimit(parameters));
  }
View Full Code Here

   * @return the result of the query as table model.
   * @throws org.pentaho.reporting.engine.classic.core.ReportDataFactoryException if an error occured while performing the query.
   */
  public TableModel queryData(final String queryName, final DataRow parameters) throws ReportDataFactoryException
  {
    final Result cellSet = performQuery(queryName, parameters);
    return new LegacyBandedMDXTableModel(cellSet, extractQueryLimit(parameters));
  }
View Full Code Here

TOP

Related Classes of mondrian.olap.Result

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.