Examples of SaikuQuery


Examples of org.saiku.olap.dto.SaikuQuery

  @Test
  public final void testCreateQuery() throws ServletException {

    // Create new query
    SaikuQuery testQuery = null;
    testQuery = qs.createQuery("TestConnection1", "Sales", "FoodMart",
        "FoodMart", null, "TestQuery1");

    // Check it is not null, has the same name and has an unused axis.
    assertNotNull(testQuery);
    assertEquals("TestQuery1", testQuery.getName());
    assertEquals(testQuery.getSaikuAxes().size(), 3);

    // no selections on the axes
    assertEquals(testQuery.getSaikuAxes().get(0).getDimensionSelections().size(), 0);


  }
View Full Code Here

Examples of org.saiku.olap.dto.SaikuQuery

  @Test
  public final void testMoveDimension() throws ServletException {

    // Create a query.
    SaikuQuery testQuery = null;
    testQuery = qs.createQuery("TestConnection1", "Sales", "FoodMart",
        "FoodMart", null, "TestQuery1");

    // Check the query isn't null.
    assertNotNull(testQuery);

    assertEquals(testQuery.getSaikuAxes().size(), 3);

    // Move a dimension
    Status returnedStatus = qs.moveDimension("TestQuery1", "ROWS", "Store",
        -1);
View Full Code Here

Examples of org.saiku.olap.dto.SaikuQuery

  }

  @Test
  public final void testExecute() throws ServletException {
    // Create a query.
    SaikuQuery testQuery = null;
    testQuery = qs.createQuery("TestConnection1", "Sales", "FoodMart",
        "FoodMart", null, "TestQuery1");

    // Check the query isn't null.
    assertNotNull(testQuery);
View Full Code Here

Examples of org.saiku.olap.dto.SaikuQuery

  }

  @Test
  public final void testExecuteMdx() throws ServletException {
    // Create a query.
    SaikuQuery testQuery = null;
    testQuery = qs.createQuery("TestConnection1", "Sales", "FoodMart",
        "FoodMart", null, "TestQuery1");

    // Check the query isn't null.
    assertNotNull(testQuery);
View Full Code Here

Examples of org.saiku.olap.dto.SaikuQuery

    @Produces({"text/plain" })
    @Path("/cda")
    public String getCda(@QueryParam("query") String query)
    {
        try {
            SaikuQuery sq = queryService.getQuery(query);
            SaikuDatasource ds = datasourceService.getDatasource(sq.getCube().getConnection());
            Properties props = ds.getProperties();
            String cdaFile = getCdaAsString(
                    props.getProperty(ISaikuConnection.DRIVER_KEY),
                    props.getProperty(ISaikuConnection.URL_KEY),
                    sq.getName(),
                    sq.getMdx());
            return cdaFile;
        } catch (Exception e) {
// TODO Auto-generated catch block
            e.printStackTrace();
        }
View Full Code Here

Examples of org.saiku.olap.dto.SaikuQuery

  @Produces({"text/plain" })
  @Path("/cda")
  public String getCda(@QueryParam("query") String query)
  {
    try {
      SaikuQuery sq = queryService.getQuery(query);
      SaikuDatasource ds = datasourceService.getDatasource(sq.getCube().getConnection());
      Properties props = ds.getProperties();

      String cdaFile = getCdaAsString(
          props.getProperty(ISaikuConnection.DRIVER_KEY),
          props.getProperty(ISaikuConnection.URL_KEY),
          sq.getName(),
          sq.getMdx());

      return cdaFile;
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.