Skip to content

Commit

Permalink
Removes the signature override from OlapDatabaseMetaData. It should n…
Browse files Browse the repository at this point in the history
…ot have been committed.

Also fixes the mixup between datasources/catalogs in the test suite.

git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@384 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
lucboudreau committed Dec 22, 2010
1 parent 3c125ae commit 1643a1a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 74 deletions.
59 changes: 0 additions & 59 deletions src/org/olap4j/OlapDatabaseMetaData.java
Expand Up @@ -198,38 +198,6 @@ ResultSet getActions(
*/
ResultSet getDatabases() throws OlapException;

/**
* Retrieves a list of olap4j catalogs that are available on the server.
*
* <p>Specification as for XML/A DBSCHEMA_CATALOGS schema rowset.
*
* <p>
* The list of returned catalogs is dependent on the underlying connection
* Database parameter. To discover catalogs in another database, use
* {@link OlapDatabaseMetaData#getDatabases()} and
* {@link OlapConnection#setDatabase(String)}
*
* <ol>
* <li><b>CATALOG_NAME</b> String => The catalog name, such as
* FoodMart.</li>
*
* <li><b>DESCRIPTION</b> String => A description of the
* catalog, as entered by the publisher. (may be
* <code>null</code>)</li></ol>
*
* <li><b>ROLES</b> String => A comma separated list of role names
* that users can impersonate. (may be
* <code>null</code>)</li></ol>
*
* <li><b>DATE_MODIFIED</b> String => The date of the latest modifications
* to the catalog. (may be <code>null</code>)</li></ol>
*
* @return a <code>ResultSet</code> object in which each row is an
* OLAP catalog description
* @throws OlapException if a database access error occurs
*/
ResultSet getCatalogs() throws OlapException;

/**
* Returns a list of {@link org.olap4j.metadata.Catalog} objects which
* belong to this connection's OLAP server.
Expand All @@ -248,33 +216,6 @@ ResultSet getActions(
*/
NamedList<Catalog> getOlapCatalogs() throws OlapException;

/**
* Retrieves a list of olap4j schemas that are available on the server.
*
* <p>Specification as for XML/A DBSCHEMA_SCHEMATA schema rowset.
*
* <p>
* The list of returned catalogs is dependent on the underlying connection
* Database parameter. To discover schemas in another database, use
* {@link OlapDatabaseMetaData#getDatabases()} and
* {@link OlapConnection#setDatabase(String)}
*
* <ol>
* <li><b>CATALOG_NAME</b> String => The name of the parent catalog to which
* the schema belongs to.</li>
*
* <li><b>SCHEMA_NAME</b> String => The name of the schema.</li>
*
* <li><b>SCHEMA_OWNER</b> String => The name of the user who is the owner
* of the schema (may be <code>null</code>)</li>
* </ol>
*
* @return a <code>ResultSet</code> object in which each row is an OLAP
* schema description
* @throws OlapException if a database access error occurs
*/
ResultSet getSchemas() throws OlapException;

/**
* Retrieves a list of information on supported literals, including data
* types and values.
Expand Down
11 changes: 5 additions & 6 deletions testsrc/org/olap4j/ConnectionTest.java
Expand Up @@ -383,15 +383,14 @@ public void testXmlaCatalogParameter() throws Exception {
Statement statement2 = connection.createStatement();
OlapStatement olapStatement2 =
TestContext.Wrapper.NONE.unwrap(
statement,
statement2,
OlapStatement.class);
CellSet cellSet2 =
olapStatement.executeOlapQuery(
"SELECT FROM [Sales]");
olapStatement2.executeOlapQuery(
"SELECT FROM [Sales]");
fail();
} catch (OlapException e) {
if (e.getMessage().equals(
"No catalog named FoodMartError exist on the server."))
if (e.getMessage().contains(
"unknown schema 'FoodMartError'"))
{
return;
}
Expand Down
15 changes: 6 additions & 9 deletions testsrc/org/olap4j/MetadataTest.java
Expand Up @@ -9,6 +9,8 @@
package org.olap4j;

import junit.framework.TestCase;
import mondrian.olap.Util;

import org.olap4j.impl.Olap4jUtil;
import org.olap4j.metadata.*;
import org.olap4j.test.TestContext;
Expand Down Expand Up @@ -246,7 +248,7 @@ public void testDatabaseMetaDataGetActions() throws SQLException {

public void testDatabaseMetaDataGetDatasources() throws SQLException {
String s = checkResultSet(
olapDatabaseMetaData.getDatasources(),
olapDatabaseMetaData.getDatabases(),
DATASOURCES_COLUMN_NAMES);
switch (tester.getFlavor()) {
case MONDRIAN:
Expand All @@ -271,13 +273,6 @@ public void testDatabaseMetaDataGetDatasources() throws SQLException {
+ " DATA_SOURCE_INFO=FoodMart,"
+ " PROVIDER_NAME=Mondrian,"
+ " PROVIDER_TYPE=MDP,"
+ " AUTHENTICATION_MODE=Unauthenticated\n"
+ "DATA_SOURCE_NAME=FoodMart2,"
+ " DATA_SOURCE_DESCRIPTION=Mondrian FoodMart data source,"
+ " URL=http://localhost:8080/mondrian/xmla,"
+ " DATA_SOURCE_INFO=FoodMart2,"
+ " PROVIDER_NAME=Mondrian,"
+ " PROVIDER_TYPE=MDP,"
+ " AUTHENTICATION_MODE=Unauthenticated\n",
s);
break;
Expand Down Expand Up @@ -453,7 +448,7 @@ public void testDatabaseMetaDataGetCubes() throws SQLException {

public void testGetCatalogs() throws SQLException {
int k = 0;
for (Catalog catalog : olapConnection.getCatalogs()) {
for (Catalog catalog : olapConnection.getMetaData().getOlapCatalogs()) {
++k;
assertEquals(catalog.getMetaData(), olapDatabaseMetaData);
for (Schema schema : catalog.getSchemas()) {
Expand All @@ -464,9 +459,11 @@ public void testGetCatalogs() throws SQLException {
assertEquals(cube.getSchema(), schema);
}
for (Dimension dimension : schema.getSharedDimensions()) {
Util.discard(dimension);
++k;
}
for (Locale locale : schema.getSupportedLocales()) {
Util.discard(locale);
++k;
}
}
Expand Down

0 comments on commit 1643a1a

Please sign in to comment.