Skip to content

Commit

Permalink
Add parameters to OlapDatabaseMetaData.getXxx methods
Browse files Browse the repository at this point in the history
git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@29 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
julianhyde committed Sep 21, 2007
1 parent a3d5480 commit 9c858b6
Show file tree
Hide file tree
Showing 16 changed files with 1,003 additions and 362 deletions.
347 changes: 93 additions & 254 deletions doc/olap4j_fs.html

Large diffs are not rendered by default.

12 changes: 2 additions & 10 deletions doc/tasks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,8 @@ Specification
* D.1 add discussion of compliance levels
* D.1 describe how members of axis can be accessed via iterator or list, with code examples
* 2.1.5 internationalization: move section elsewhere; what is the behavior of locale? does it belong to connection? fix and test Query.getLocale(). document that all methods which return localized strings take a locale parameter; that parameter may be null, in which case the connection's locale is used
* 2.3.2 how to find out what cube a prepared statement relates to
* 2.7.2 diagram of object model
* 2.7.2.x define Schema, Cube, Dimension, Hierarchy, Level, Member, Measure, Property, NamedSet.
* 2.7.3 The OlapDatabaseMetaData interface:
** clean up data types (should be JDBC types)
** clean up column names (should be UPPER_CASE)
** define enum types
* 2.7.3.2 is VALUE a SQL reserved word? if so, rename the property
* 2.8 query model - barry and/or james complete?
* 2.8 query model - barry and/or james complete?
* 2.9 layout - remove from spec?
* add mdx parser and mdx parse tree model to specification
* discuss access-control (each provider can have their own rules. can set access-control on the connection. metadata methods should be consistent with that.)
Expand All @@ -40,8 +33,7 @@ Javadoc
* change ant task so it doesn't generate mondrian.olap4j.* or olap4j.test.* or org.olap4j.mdx.parser.impl or package-protected classes (E.g. org.olap4j.mdx.MdxValidator) in public api; remove class OlapTest, class Todo
* package mdx.parser.impl - comment that this package is not part of the spec, and implementation may change at any time
* ensure that every public method has a javadoc description, including @param, @return and @throws declarations
* document OlapDatabaseMetadata.getXxx methods
* Review olap4j.type package. Document all public methods. Make non-essential methods (E.g. MemberType.forType) package-private. If in doubt, leave it out
* Review olap4j.type package. Document all public methods. Make non-essential methods (E.g. MemberType.forType) package-private. If in doubt, leave it out

Code
----
Expand Down
73 changes: 61 additions & 12 deletions src/mondrian/olap4j/MondrianOlap4jDatabaseMetaData.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
import org.olap4j.OlapDatabaseMetaData;
import org.olap4j.OlapException;
import org.olap4j.OlapConnection;
import org.olap4j.metadata.Catalog;
import org.olap4j.metadata.NamedList;
import org.olap4j.metadata.*;

import java.sql.ResultSet;
import java.sql.SQLException;
Expand Down Expand Up @@ -796,7 +795,12 @@ public boolean isWrapperFor(Class<?> iface) throws SQLException {

// implement OlapDatabaseMetaData

public ResultSet getActions() throws OlapException {
public ResultSet getActions(
String catalog,
String schemaPattern,
String cubeNamePattern,
String actionNamePattern) throws OlapException
{
return olap4jConnection.factory.newEmptyResultSet(olap4jConnection);
}

Expand All @@ -810,11 +814,20 @@ public ResultSet getLiterals() throws OlapException {
}

public ResultSet getDatabaseProperties(
String dataSourceName) throws OlapException {
String dataSourceName, String propertyNamePattern) throws OlapException {
return olap4jConnection.factory.newEmptyResultSet(olap4jConnection);
}

public ResultSet getProperties() throws OlapException {
public ResultSet getProperties(
String catalog,
String schemaPattern,
String cubeNamePattern,
String dimensionNamePattern,
String hierarchyNamePattern,
String levelNamePattern,
String memberUniqueName,
String propertyNamePattern) throws OlapException
{
return olap4jConnection.factory.newEmptyResultSet(olap4jConnection);
}

Expand All @@ -832,35 +845,71 @@ public String getMdxKeywords() throws OlapException {
public ResultSet getCubes(
String catalog,
String schemaPattern,
String cubeNamePattern) throws OlapException {
String cubeNamePattern)
throws OlapException
{
return olap4jConnection.factory.newEmptyResultSet(olap4jConnection);
}

public ResultSet getDimensions() throws OlapException {
public ResultSet getDimensions(
String catalog,
String schemaPattern,
String cubeNamePattern,
String dimensionNamePattern)
throws OlapException
{
return olap4jConnection.factory.newEmptyResultSet(olap4jConnection);
}

public ResultSet getFunctions() throws OlapException {
return olap4jConnection.factory.newEmptyResultSet(olap4jConnection);
}

public ResultSet getHierarchies() throws OlapException {
public ResultSet getHierarchies(
String catalog,
String schemaPattern,
String cubeNamePattern,
String dimensionNamePattern,
String hierarchyNamePattern)
throws OlapException
{
return olap4jConnection.factory.newEmptyResultSet(olap4jConnection);
}

public ResultSet getMeasures() throws OlapException {
public ResultSet getMeasures(String catalog, String schemaPattern, String cubeNamePattern, String measureNamePattern, String measureUniqueName) throws OlapException {
return olap4jConnection.factory.newEmptyResultSet(olap4jConnection);
}

public ResultSet getMembers() throws OlapException {
public ResultSet getMembers(
String catalog,
String schemaPattern,
String cubeNamePattern,
String dimensionNamePattern,
String hierarchyNamePattern,
String levelNamePattern,
String memberUniqueName,
Member.TreeOp treeOp) throws OlapException
{
return olap4jConnection.factory.newEmptyResultSet(olap4jConnection);
}

public ResultSet getLevels() throws OlapException {
public ResultSet getLevels(
String catalog,
String schemaPattern,
String cubeNamePattern,
String dimensionNamePattern,
String hierarchyNamePattern,
String levelNamePattern) throws OlapException
{
return olap4jConnection.factory.newEmptyResultSet(olap4jConnection);
}

public ResultSet getSets() throws OlapException {
public ResultSet getSets(
String catalog,
String schemaPattern,
String cubeNamePattern,
String setNamePattern) throws OlapException
{
return olap4jConnection.factory.newEmptyResultSet(olap4jConnection);
}
}
Expand Down
Loading

0 comments on commit 9c858b6

Please sign in to comment.