Skip to content

Commit b80d5cc

Browse files
committed
use api not impl
Signed-off-by: Stefan Bischof <[email protected]>
1 parent 2f0ec92 commit b80d5cc

File tree

6 files changed

+59
-31
lines changed

6 files changed

+59
-31
lines changed

mondrian/src/main/java/mondrian/olap/ConnectionBase.java

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,26 @@
11
/*
2-
// This software is subject to the terms of the Eclipse Public License v1.0
3-
// Agreement, available at the following URL:
4-
// http://www.eclipse.org/legal/epl-v10.html.
5-
// You must accept the terms of that agreement to use this software.
6-
//
7-
// Copyright (C) 2001-2005 Julian Hyde
8-
// Copyright (C) 2005-2017 Hitachi Vantara and others
9-
// All Rights Reserved.
10-
*/
2+
* This software is subject to the terms of the Eclipse Public License v1.0
3+
* Agreement, available at the following URL:
4+
* http://www.eclipse.org/legal/epl-v10.html.
5+
* You must accept the terms of that agreement to use this software.
6+
*
7+
* Copyright (c) 2002-2017 Hitachi Vantara.. All rights reserved.
8+
*
9+
* ---- All changes after Fork in 2023 ------------------------
10+
*
11+
* Project: Eclipse daanse
12+
*
13+
* Copyright (c) 2023 Contributors to the Eclipse Foundation.
14+
*
15+
* This program and the accompanying materials are made
16+
* available under the terms of the Eclipse Public License 2.0
17+
* which is available at https://www.eclipse.org/legal/epl-2.0/
18+
*
19+
* SPDX-License-Identifier: EPL-2.0
20+
*
21+
* Contributors after Fork in 2023:
22+
* SmartCity Jena - initial
23+
*/
1124

1225
package mondrian.olap;
1326

@@ -25,13 +38,12 @@
2538
import org.eclipse.daanse.olap.api.function.FunctionService;
2639
import org.eclipse.daanse.olap.api.query.ExpressionProvider;
2740
import org.eclipse.daanse.olap.api.query.QueryProvider;
41+
import org.eclipse.daanse.olap.api.query.component.Query;
2842
import org.eclipse.daanse.olap.api.query.component.QueryComponent;
2943
import org.eclipse.daanse.olap.query.base.ExpressionProviderImpl;
3044
import org.eclipse.daanse.olap.query.base.QueryProviderImpl;
31-
import org.eclipse.daanse.olap.query.component.QueryImpl;
3245
import org.eclipse.daanse.sql.guard.api.SqlGuard;
3346
import org.eclipse.daanse.sql.guard.api.SqlGuardFactory;
34-
import org.eclipse.daanse.sql.guard.api.elements.DatabaseCatalog;
3547
import org.eclipse.daanse.sql.guard.api.exception.GuardException;
3648
import org.eclipse.daanse.sql.guard.api.exception.UnparsableStatementGuardException;
3749
import org.slf4j.Logger;
@@ -63,8 +75,8 @@ protected ConnectionBase() {
6375

6476

6577
@Override
66-
public QueryImpl parseQuery(String query) {
67-
return (QueryImpl) parseStatement(query);
78+
public Query parseQuery(String query) {
79+
return (Query) parseStatement(query);
6880
}
6981

7082
/**

mondrian/src/main/java/mondrian/olap/IdBatchResolver.java

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
11
/*
2-
// This software is subject to the terms of the Eclipse Public License v1.0
3-
// Agreement, available at the following URL:
4-
// http://www.eclipse.org/legal/epl-v10.html.
5-
// You must accept the terms of that agreement to use this software.
6-
//
7-
// Copyright (C) 2006-2017 Hitachi Vantara and others
8-
// All Rights Reserved.
2+
* This software is subject to the terms of the Eclipse Public License v1.0
3+
* Agreement, available at the following URL:
4+
* http://www.eclipse.org/legal/epl-v10.html.
5+
* You must accept the terms of that agreement to use this software.
6+
*
7+
* Copyright (c) 2002-2017 Hitachi Vantara.. All rights reserved.
8+
*
9+
* ---- All changes after Fork in 2023 ------------------------
10+
*
11+
* Project: Eclipse daanse
12+
*
13+
* Copyright (c) 2023 Contributors to the Eclipse Foundation.
14+
*
15+
* This program and the accompanying materials are made
16+
* available under the terms of the Eclipse Public License 2.0
17+
* which is available at https://www.eclipse.org/legal/epl-2.0/
18+
*
19+
* SPDX-License-Identifier: EPL-2.0
20+
*
21+
* Contributors after Fork in 2023:
22+
* SmartCity Jena - initial
923
*/
24+
1025
package mondrian.olap;
1126

1227
import java.util.ArrayList;
@@ -34,14 +49,14 @@
3449
import org.eclipse.daanse.olap.api.query.component.DimensionExpression;
3550
import org.eclipse.daanse.olap.api.query.component.Expression;
3651
import org.eclipse.daanse.olap.api.query.component.Formula;
52+
import org.eclipse.daanse.olap.api.query.component.HierarchyExpression;
3753
import org.eclipse.daanse.olap.api.query.component.Id;
3854
import org.eclipse.daanse.olap.api.query.component.MemberExpression;
55+
import org.eclipse.daanse.olap.api.query.component.Query;
3956
import org.eclipse.daanse.olap.api.query.component.QueryAxis;
4057
import org.eclipse.daanse.olap.api.query.component.QueryComponent;
4158
import org.eclipse.daanse.olap.api.query.component.visit.QueryComponentVisitor;
42-
import org.eclipse.daanse.olap.query.component.HierarchyExpressionImpl;
4359
import org.eclipse.daanse.olap.query.component.IdImpl;
44-
import org.eclipse.daanse.olap.query.component.QueryImpl;
4560
import org.slf4j.Logger;
4661
import org.slf4j.LoggerFactory;
4762

@@ -67,7 +82,7 @@
6782
public final class IdBatchResolver {
6883
static final Logger LOGGER = LoggerFactory.getLogger(IdBatchResolver.class);
6984

70-
private final QueryImpl query;
85+
private final Query query;
7186
private final Formula[] formulas;
7287
private final QueryAxis[] axes;
7388
private final Cube cube;
@@ -87,7 +102,7 @@ public final class IdBatchResolver {
87102
// first on segment length (shortest to longest), then alphabetically.
88103
private SortedSet<Id> identifiers = new TreeSet<>(new IdComparator());
89104

90-
public IdBatchResolver(QueryImpl query) {
105+
public IdBatchResolver(Query query) {
91106
this.query = query;
92107
formulas = query.getFormulas();
93108
axes = query.getAxes();
@@ -323,7 +338,7 @@ private Member getMemberFromExp(Expression exp) {
323338
if (hier.hasAll()) {
324339
return hier.getAllMember();
325340
}
326-
} else if (exp instanceof HierarchyExpressionImpl hierarchyExpr) {
341+
} else if (exp instanceof HierarchyExpression hierarchyExpr) {
327342
Hierarchy hier = hierarchyExpr
328343
.getHierarchy();
329344
if (hier.hasAll()) {

mondrian/src/main/java/mondrian/rolap/RolapCube.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,8 +591,8 @@ protected Query resolveCalcMembers(
591591
"RolapCube.resolveCalcMembers",
592592
new LocusImpl.Action<Query>() {
593593
@Override
594-
public QueryImpl execute() {
595-
final QueryImpl queryExp =
594+
public Query execute() {
595+
final Query queryExp =
596596
conn.parseQuery(queryString);
597597
queryExp.resolve();
598598
return queryExp;

mondrian/src/main/java/org/eclipse/daanse/olap/impl/ScenarioImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
import org.eclipse.daanse.olap.api.element.Hierarchy;
1212
import org.eclipse.daanse.olap.api.element.Member;
1313
import org.eclipse.daanse.olap.api.query.component.Formula;
14+
import org.eclipse.daanse.olap.api.query.component.Query;
1415
import org.eclipse.daanse.olap.api.result.AllocationPolicy;
1516
import org.eclipse.daanse.olap.api.result.Result;
1617
import org.eclipse.daanse.olap.api.result.Scenario;
1718
import org.eclipse.daanse.olap.api.result.WritebackCell;
1819
import org.eclipse.daanse.olap.api.type.ScalarType;
1920
import org.eclipse.daanse.olap.calc.base.nested.AbstractProfilingNestedUnknownCalc;
20-
import org.eclipse.daanse.olap.query.component.QueryImpl;
2121
import org.eclipse.daanse.olap.query.component.ResolvedFunCallImpl;
2222

2323
import mondrian.olap.Util;
@@ -321,7 +321,7 @@ private static double computeAtomicCellCount(
321321
final String mdx = buf.toString();
322322
final RolapConnection connection =
323323
cube.getCatalog().getInternalConnection();
324-
final QueryImpl query = connection.parseQuery(mdx);
324+
final Query query = connection.parseQuery(mdx);
325325
final Result result = connection.execute(query);
326326
final Object o = result.getCell(new int[0]).getValue();
327327
return o instanceof Number

mondrian/src/test/java/mondrian/olap/IdBatchResolverTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
class IdBatchResolverTest {
6868

6969
@Mock
70-
QueryImpl query;
70+
Query query;
7171

7272
@Captor
7373
ArgumentCaptor<List<NameSegment>> childNames;

mondrian/src/test/java/mondrian/rolap/aggmatcher/AggGenTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import javax.sql.DataSource;
2424

2525
import org.eclipse.daanse.olap.api.Context;
26+
import org.eclipse.daanse.olap.api.query.component.Query;
2627
import org.eclipse.daanse.olap.query.component.QueryImpl;
2728
import org.eclipse.daanse.olap.rolap.api.RolapContext;
2829
import org.eclipse.daanse.rolap.mapping.api.model.CatalogMapping;
@@ -72,7 +73,7 @@ void testCallingLoadColumnsInAddCollapsedColumnOrAddzSpecialCollapsedColumn(Cont
7273
((TestContextImpl)context).setGenerateAggregateSql(true);
7374

7475
final RolapConnection rolapConn = (RolapConnection) context.getConnectionWithDefaultRole();
75-
QueryImpl query =
76+
Query query =
7677
rolapConn.parseQuery(
7778
"select {[Measures].[Count]} on columns from [HR]");
7879
rolapConn.execute(query);

0 commit comments

Comments
 (0)