Package mondrian.olap

Examples of mondrian.olap.Query$ParameterFinder


        try {

          // According to Julian, the better way to resolve the names is to build a query
          final String queryStr =
            "select " + rawString + " on columns, {} on rows from " + cube.getName(); //$NON-NLS-1$ //$NON-NLS-2$
          final Query query = connection.parseQuery( queryStr );

          final Hierarchy[] hierarchies = query.getMdxHierarchiesOnAxis( AxisOrdinal.StandardAxisOrdinal.COLUMNS );
          boolean isWhereValid = true;

          for ( int i = 0; i < hierarchies.length && isWhereValid; i++ ) {
            final Hierarchy hierarchy = hierarchies[ i ];
            if ( connection.getRole().canAccess( hierarchy ) ) {
View Full Code Here


    Connection mondrianConnection = smdt.getConnection();
    // retrieves CacheControl object
    CacheControl cacheControl = mondrianConnection.getCacheControl(null);
    // retrieves the MDX query
    MdxQuery mdxQuery = (MdxQuery) olapModel.getExtension("mdxQuery");
    Query mondrianQuery = mondrianConnection.parseQuery(mdxQuery.getMdxQuery());
    // finds the cube in the MDX query
      Cube cube = mondrianQuery.getCube();
      // flush cache on all measures for that cube
      CacheControl.CellRegion measuresRegion = cacheControl.createMeasuresRegion(cube);
      cacheControl.flush(measuresRegion);
     
//    Cube[] cubes = mondrianConnection.getSchema().getCubes();
View Full Code Here

    Connection monConnection = smdt.getConnection();
    // get the connection role, cube and schema reader
    RoleImpl connRole = (RoleImpl) monConnection.getRole();
    //connRole.makeMutableClone();
      logger.debug("DataSecurityManager::setMondrianRole:connection role retrived: " + connRole);
      Query monQuery = monConnection.parseQuery(query);
      Cube cube = monQuery.getCube();
      logger.debug("DataSecurityManager::setMondrianRole: cube retrived: " + cube);
      SchemaReader schemaReader = cube.getSchemaReader(null);
      logger.debug("DataSecurityManager::setMondrianRole: schema reader retrived: " + schemaReader);
   
     
View Full Code Here

   * (non-Javadoc)
   *
   * @see org.pentaho.connection.IPentahoConnection#executeQuery(java.lang.String)
   */
  public IPentahoResultSet executeQuery( final String query ) {
    Query mdxQuery = nativeConnection.parseQuery( query );
    Result result = nativeConnection.execute( mdxQuery );
    resultSet = new MDXResultSet( result, nativeConnection, useExtendedColumnNames );
    return resultSet;
  }
View Full Code Here

    logger.debug("IN");
    StringBuffer buffer = new StringBuffer("parent.execCrossNavigation(window.name, '"
        + StringEscapeUtils.escapeJavaScript(target.documentLabel) + "', '");
    String query = model.getCurrentMdx();
    Connection monConnection = model.getConnection();
      Query monQuery = monConnection.parseQuery(query);
      Cube cube = monQuery.getCube();
     
      List<TargetParameter> parameters = target.parameters;
      if (!parameters.isEmpty()) {
        for (int i = 0; i < parameters.size(); i++) {
          TargetParameter aParameter = parameters.get(i);
View Full Code Here

    public void testSlicerAxisDoesNotGetNonEmptyApplied() {
        propSaver.set(
            MondrianProperties.instance().EnableNonEmptyOnAllAxis, true);
        String mdxQuery = "select from [Sales]\n"
            + "where [Time].[1997]\n";
        Query query = getConnection().parseQuery(mdxQuery);
        TestContext.assertEqualsVerbose(mdxQuery, query.toString());
     }
View Full Code Here

TOP

Related Classes of mondrian.olap.Query$ParameterFinder

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.