Package mondrian.olap

Examples of mondrian.olap.Connection


  private String getCrossNavigationUrl(Target target, Cell cell, MondrianModel model) {
    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++) {
View Full Code Here


    /////////////////////////////////////////////////////////////////////////
    //
    // cubes
    //
    public Cube[] getCubes() {
        Connection conn = getConnection();
        return conn.getSchemaReader().withLocus().getCubes();
    }
View Full Code Here

    /**
     * Tests to make sure that our base DynamicSchemaProcessor works, and
     * Mondrian is able to parse and connect to FoodMart with it
     */
    public void testFoodmartDsp() {
        final Connection monConnection =
            TestContext.instance()
                .withSchemaProcessor(BaseDsp.class)
                .getConnection();
        assertEquals(monConnection.getSchema().getName(), "REPLACEME");
    }
View Full Code Here

    /**
     * Tests to ensure we have access to Connect properies in a DSP
     */
    public void testProviderTestDSP() {
        Connection monConnection =
            TestContext.instance()
                .withSchemaProcessor(ProviderTestDSP.class)
                .getConnection();
        assertEquals(monConnection.getSchema().getName(), "mondrian");
    }
View Full Code Here

    /**
     * Tests to ensure we have access to Connect properies in a DSP
     */
    public void testDBInfoDSP() {
        Connection monConnection =
            TestContext.instance()
                .withSchemaProcessor(FoodMartCatalogDsp.class)
                .getConnection();
        assertEquals(
            monConnection.getSchema().getName(),
            "FoodmartFoundInCatalogProperty");
    }
View Full Code Here

    /**
     * Tests to ensure we have access to Connect properties in a DSP
     */
    public void testCheckJdbcPropertyDsp() {
        Connection monConnection =
            TestContext.instance()
                .withSchemaProcessor(CheckJdbcPropertyDsp.class)
                .getConnection();
        assertEquals(
            monConnection.getSchema().getName(),
            CheckJdbcPropertyDsp.RETURNTRUESTRING);
    }
View Full Code Here

        RolapCube cube = (RolapCube) con.getSchema().lookupCube(starName, true);
        return cube.getStar();
    }

    RolapStarForTests getStar(String starName) {
        Connection con = getTestContext().getConnection();
        RolapStar rs =  getStar(con, starName);

        return new RolapStarForTests(
            rs.getSchema(),
            rs.getDataSource(),
View Full Code Here

     * <p>When invoked on the default TestContext instance, returns a connection
     * to the FoodMart database.
     */
    public synchronized Connection getConnection() {
        if (connectionRef != null) {
            Connection connection = connectionRef.get();
            if (connection != null) {
                return connection;
            }
        }
        final Connection connection =
            DriverManager.getConnection(
                getConnectionProperties(),
                null,
                null);
        connectionRef = new SoftReference<Connection>(connection);
View Full Code Here

     * @return Test context which uses the a fresh connection
     *
     * @see #withSchemaPool(boolean)
     */
    public final TestContext withFreshConnection() {
        final Connection connection = withSchemaPool(false).getConnection();
        return withConnection(connection);
    }
View Full Code Here

     * Returns the definition of the schema.
     *
     * @return XML definition of the FoodMart schema
     */
    public String getRawSchema() {
        final Connection connection =
            withSchemaProcessor(SnoopingSchemaProcessor.class)
                .getConnection();
        connection.close();
        String schema = SnoopingSchemaProcessor.THREAD_RESULT.get();
        Util.threadLocalRemove(SnoopingSchemaProcessor.THREAD_RESULT);
        return schema;
    }
View Full Code Here

TOP

Related Classes of mondrian.olap.Connection

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.