Package org.saiku.olap.query

Examples of org.saiku.olap.query.IQuery


  @Path("/{queryname}/swapaxes")
  public SaikuQuery swapAxes(@PathParam("queryname") String queryName) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("TRACK\t" + "\t/query/" + queryName + "/swapaxes\tPUT");
    }
    IQuery query = olapQueryService.swapAxes(queryName);
    return ObjectUtil.convert(query);
  }
View Full Code Here


            }
            realPositions.add(cellPosition);
          }
        }
      }
      IQuery query = olapQueryService.zoomIn(queryName, realPositions);
      return ObjectUtil.convert(query);

    } catch (Exception e) {
      LOG.error("Cannot updates selections for query (" + queryName + ")", e);
      throw new WebApplicationException(e);
View Full Code Here

      @PathParam("function") String functionName
  ) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("TRACK\t" + "\t/query/" + queryName + "/axis/" + axisName + "/show_totals/" + functionName + "\tPUT");
    }
    IQuery query = olapQueryService.showGrandTotals(queryName, axisName, functionName);
    return ObjectUtil.convert(query);
  }
View Full Code Here

  public ThinQuery convertQuery(@NotNull String xml) throws Exception {
    if (StringUtils.isNotBlank(xml) && xml.trim().startsWith("<?xml")) {
      QueryDeserializer qd = new QueryDeserializer();
      SaikuCube scube = qd.getFakeCube(xml);
      OlapConnection con = olapDiscoverService.getNativeConnection(scube.getConnection());
      IQuery query = qd.unparse(xml, con);

      if (QueryType.QM.equals(query.getType())) {
        OlapQuery qr = (OlapQuery) query;
        Query sQ = QueryConverter.convertQuery(qr.getQuery());
        SaikuCube converted = ObjectUtil.convert(scube.getConnection(), sQ.getCube());
        return Thin.convert(sQ, converted);
      } else {
        SaikuCube converted = ObjectUtil.convert(scube.getConnection(), olapDiscoverService.getNativeCube(scube));
        return new ThinQuery(query.getName(), converted, query.getMdx());
      }
    }
    return null;

  }
View Full Code Here

    getIQueryMap().remove(queryName);
  }


  public IQuery getIQuery(String queryName) {
    IQuery query = getIQueryMap().get(queryName);
    if (query == null) {
      throw new SaikuServiceException("No query with name (" + queryName + ") found");
    }
    return query;
  }
View Full Code Here

TOP

Related Classes of org.saiku.olap.query.IQuery

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.