Skip to content

Commit

Permalink
MONDRIAN: Remove deprecated methods for 3.0.0 release.
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian/": change = 10570]
  • Loading branch information
julianhyde committed Feb 15, 2008
1 parent 3ad9852 commit afe2265
Show file tree
Hide file tree
Showing 18 changed files with 55 additions and 365 deletions.
8 changes: 0 additions & 8 deletions doc/configuration.html
Expand Up @@ -154,14 +154,6 @@ <h3>1.1 Property list<a name="Property_list">&nbsp;</a></h3>
mondrian.olap.ResourceLimitExceededException</a>. See also
<a href="#limit_properties">limit properties</a>.</p></td>
</tr>
<tr>
<td>
<code><a href="api/mondrian/olap/MondrianProperties.html#CachePoolCostLimit">
mondrian.rolap.CachePool.costLimit</a></code></td>
<td>int</td>
<td>10,000</td>
<td>Obsolete.</td>
</tr>
<tr>
<td>
<code><a href="api/mondrian/olap/MondrianProperties.html#MaxEvalDepth">mondrian.rolap.
Expand Down
9 changes: 0 additions & 9 deletions src/main/mondrian/olap/DelegatingSchemaReader.java
Expand Up @@ -85,15 +85,6 @@ public Member getMemberByUniqueName(
uniqueNameParts, failIfNotFound, matchType);
}

public final OlapElement lookupCompound(
OlapElement parent, String[] names,
boolean failIfNotFound, int category)
{
return lookupCompound(
parent, Id.Segment.toList(names), failIfNotFound, category,
MatchType.EXACT);
}

public OlapElement lookupCompound(
OlapElement parent, List<Id.Segment> names,
boolean failIfNotFound, int category)
Expand Down
80 changes: 0 additions & 80 deletions src/main/mondrian/olap/DriverManager.java
Expand Up @@ -55,63 +55,6 @@ public static Connection getConnection(
return getConnection(properties, locator);
}

/**
* Creates a connection to a Mondrian OLAP Engine
* using a connect string,
* a catalog locator,
* and the deprecated <code>fresh</code> parameter.
*
* @deprecated The <code>fresh</code> parameter is no longer used;
* use the {@link #getConnection(String, mondrian.spi.CatalogLocator)}
* method, and if you want a connection with a non-shared schema, specify
* "{@link mondrian.rolap.RolapConnectionProperties#UseSchemaPool UseSchemaPool}=false"
* among your connection properties.
*/
public static Connection getConnection(
String connectString,
CatalogLocator locator,
boolean fresh)
{
Util.discard(fresh); // no longer used
return getConnection(connectString, locator);
}

/**
* Creates a connection to a Mondrian OLAP Engine
* using a list of connection properties
* and the deprecated <code>fresh</code> parameter.
*
* @deprecated Use {@link #getConnection(mondrian.olap.Util.PropertyList, mondrian.spi.CatalogLocator)}
*/
public static Connection getConnection(
Util.PropertyList properties,
boolean fresh)
{
Util.discard(fresh); // no longer used
return getConnection(properties, CatalogLocatorImpl.INSTANCE);
}

/**
* Creates a connection to a Mondrian OLAP Engine
* using a list of connection properties,
* a catalog locator,
* and the deprecated <code>fresh</code> parameter.
*
* @deprecated The <code>fresh</code> parameter is no longer used;
* use the {@link #getConnection(mondrian.olap.Util.PropertyList, mondrian.spi.CatalogLocator)}
* method, and if you want a connection with a non-shared schema, specify
* "{@link mondrian.rolap.RolapConnectionProperties#UseSchemaPool UseSchemaPool}=false"
* among your connection properties.
*/
public static Connection getConnection(
Util.PropertyList properties,
CatalogLocator locator,
boolean fresh)
{
Util.discard(fresh); // no longer used
return getConnection(properties, locator);
}

/**
* Creates a connection to a Mondrian OLAP Engine.
*
Expand All @@ -131,29 +74,6 @@ public static Connection getConnection(
return getConnection(properties, locator, null);
}

/**
* Creates a connection to a Mondrian OLAP Engine
* using a list of connection properties,
* a catalog locator,
* a JDBC data source,
* and the deprecated <code>fresh</code> parameter.
*
* @deprecated The <code>fresh</code> parameter is no longer used;
* use the {@link #getConnection(mondrian.olap.Util.PropertyList, mondrian.spi.CatalogLocator, javax.sql.DataSource)}
* method, and if you want a connection with a non-shared schema, specify
* "{@link mondrian.rolap.RolapConnectionProperties#UseSchemaPool UseSchemaPool}=false"
* among your connection properties.
*/
public static Connection getConnection(
Util.PropertyList properties,
CatalogLocator locator,
DataSource dataSource,
boolean fresh)
{
Util.discard(fresh); // no longer used
return getConnection(properties, locator, dataSource);
}

/**
* Creates a connection to a Mondrian OLAP Engine
* using a list of connection properties,
Expand Down
25 changes: 3 additions & 22 deletions src/main/mondrian/olap/Formula.java
Expand Up @@ -36,25 +36,16 @@ public class Formula extends QueryPart {
private Exp exp;
// properties/solve order of member
private final MemberProperty[] memberProperties;

/**
* <code>true</code> is this is a member, <code>false</code> if it is a
* set.
* <code>true</code> is this is a member,
* <code>false</code> if it is a set.
*/
private final boolean isMember;

private Member mdxMember;
private NamedSet mdxSet;

/**
* Constructs formula specifying a set.
*
* @deprecated Use {@link #Formula(Id, Exp)}.
* This method will be removed in mondrian-2.5.
*/
public Formula(String[] names, Exp exp) {
this(new Id(Id.Segment.toList(names)), exp);
}

/**
* Constructs formula specifying a set.
*/
Expand All @@ -63,16 +54,6 @@ public Formula(Id id, Exp exp) {
createElement(null);
}

/**
* Constructs a formula specifying a member.
*
* @deprecated Use {@link #Formula(Id, Exp, MemberProperty[])}.
* This method will be removed in mondrian-2.5.
*/
public Formula(String[] names, Exp exp, MemberProperty[] memberProperties) {
this(new Id(Id.Segment.toList(names)), exp, memberProperties);
}

/**
* Constructs a formula specifying a member.
*/
Expand Down
14 changes: 0 additions & 14 deletions src/main/mondrian/olap/MondrianProperties.java
Expand Up @@ -378,20 +378,6 @@ public Property getPropertyDefinition(String path) {
public transient final IntegerProperty ResultLimit = new IntegerProperty(
this, "mondrian.result.limit", 0);

/**
* @deprecated obsolete
*/
public transient final IntegerProperty CachePoolCostLimit =
new IntegerProperty(
this, "mondrian.rolap.CachePool.costLimit", 10000);

/**
* @deprecated obsolete
*/
public transient final BooleanProperty FlushAfterQuery =
new BooleanProperty(
this, "mondrian.rolap.RolapResult.flushAfterEachQuery");

// mondrian.test properties

/**
Expand Down
26 changes: 0 additions & 26 deletions src/main/mondrian/olap/MondrianServer.java
Expand Up @@ -10,8 +10,6 @@
package mondrian.olap;

import java.util.List;
import java.util.Collections;
import java.util.Arrays;

/**
* Interface by which to control an instance of Mondrian.
Expand All @@ -38,30 +36,6 @@ public static MondrianServer forConnection(Connection connection) {
return instance;
}

/**
* Flushes the cache which maps schema URLs to metadata.
*
* <p>This cache is referenced only when creating a new connection, so
* existing connections will continue to use the same schema definition.
*
* @deprecated Use {@link CacheControl#flushSchemaCache()}.
*/
public abstract void flushSchemaCache();

/**
* Flushes the cache which contains cached aggregate values.
*
* <p>Typically, you would do this when records in the fact table have been
* modified.
*
* <p>Note that flushing the data cache may have serious performance
* implications for all connections to this Mondrian server. Aggregate data
* for all cubes in all schemas will be flushed.
*
* @deprecated Use {@link CacheControl#flush(CacheControl.CellRegion)}.
*/
public abstract void flushDataCache();

/**
* Returns the version of this MondrianServer.
*/
Expand Down
12 changes: 0 additions & 12 deletions src/main/mondrian/olap/MondrianServerImpl.java
Expand Up @@ -9,8 +9,6 @@
*/
package mondrian.olap;

import mondrian.rolap.agg.AggregationManager;

import java.net.URL;
import java.io.*;
import java.util.regex.Pattern;
Expand Down Expand Up @@ -89,16 +87,6 @@ class MondrianServerImpl extends MondrianServer {
"When", "Where", "With", "WTD", "Xor",
};

public void flushSchemaCache() {
final CacheControl cacheControl =
AggregationManager.instance().getCacheControl(null);
cacheControl.flushSchemaCache();
}

public void flushDataCache() {
// not implemented
}

public MondrianVersion getVersion() {
return getVersionStatic();
}
Expand Down
35 changes: 0 additions & 35 deletions src/main/mondrian/olap/Query.java
Expand Up @@ -255,20 +255,6 @@ public void addFormula(Id id, Exp exp) {
addFormula(id, exp, new MemberProperty[0]);
}

/**
* Adds a new formula specifying a member
* to an existing query.
*
* @deprecated Use {@link #addFormula(Id, Exp, MemberProperty[])}.
* This method will be removed in mondrian-2.5.
*/
public void addFormula(
String[] names,
Exp exp,
MemberProperty[] memberProperties) {
addFormula(new Id(Id.Segment.toList(names)), exp, memberProperties);
}

/**
* Adds a new formula specifying a member
* to an existing query.
Expand Down Expand Up @@ -318,20 +304,6 @@ public Connection getConnection() {
return connection;
}

/**
* Returns the MDX query string. If the query was created by parsing an
* MDX string, the string returned by this method may not be identical, but
* it will have the same meaning. If the query's parse tree has been
* manipulated (for instance, the rows and columns axes have been
* interchanged) the returned string represents the current parse tree.
*
* @deprecated Use {@link Util#unparse(Query)}.
* This method will be removed in mondrian-2.5.
*/
public String getQueryString() {
return toMdx();
}

/**
* Issues a cancel request on this Query object. Once the thread
* running the query detects the cancel request, the query execution will
Expand Down Expand Up @@ -654,13 +626,6 @@ public void unparse(PrintWriter pw) {
}
}

public String toMdx() {
StringWriter sw = new StringWriter();
PrintWriter pw = new QueryPrintWriter(sw);
unparse(pw);
return sw.toString();
}

/** Returns the MDX query string. */
public String toString() {
resolve();
Expand Down
25 changes: 9 additions & 16 deletions src/main/mondrian/olap/QueryPart.java
Expand Up @@ -13,28 +13,26 @@

package mondrian.olap;
import java.io.PrintWriter;
import java.io.StringWriter;

/**
* Component of an MDX query (derived classes include Query, Axis, Exp, Level).
*
* @version $Id$
* @author jhyde
*/
public abstract class QueryPart implements Walkable {
/**
* Creates a QueryPart.
*/
QueryPart() {
}

/**
* Converts this query or expression into an MDX string.
* Writes a string representation of this parse tree
* node to the given writer.
*
* @deprecated Use {@link Util#unparse(Exp)}; deprecated since 2.1.2.
* @param pw writer
*/
public String toMdx()
{
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
unparse(pw);
return sw.toString();
}

public void unparse(PrintWriter pw) {
pw.print(toString());
}
Expand All @@ -44,11 +42,6 @@ public Object[] getChildren() {
// By default, a QueryPart is atomic (has no children).
return null;
}

protected Object[] getAllowedChildren(CubeAccess cubeAccess) {
// By default, a QueryPart is atomic (has no children).
return null;
}
}

// End QueryPart.java

0 comments on commit afe2265

Please sign in to comment.