private RolapCube lookupCube(String cubeName) { Connection connection = TestContext.instance().getConnection(); for (Cube cube : connection.getSchema().getCubes()) { if (cube.getName().equals(cubeName)) { return (RolapCube) cube; } } return null; }
protected RolapStar.Measure getMeasure(String cube, String measureName) { final Connection connection = getFoodMartConnection(); final boolean fail = true; Cube salesCube = connection.getSchema().lookupCube(cube, fail); Member measure = salesCube .getSchemaReader(null) .getMemberByUniqueName(Util.parseIdentifier(measureName), fail); return RolapStar.getStarMeasure(measure); }
RolapNativeRegistry getRegistry(Connection connection) { RolapCube cube = (RolapCube) connection.getSchema().lookupCube("Sales", true); RolapSchemaReader schemaReader = (RolapSchemaReader) cube.getSchemaReader(); return schemaReader.getSchema().getNativeRegistry(); }
protected RolapCube getCube(final String cube) { final Connection connection = getFoodMartConnection(); final boolean fail = true; return (RolapCube) connection.getSchema().lookupCube(cube, fail); }