Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MONDRIAN: Implement a lot of Visual Basic for Applications (VBA) func…
…tions; Add a mechanism to define an MDX function based on a Java method, invoking the method by reflection. More support for a DateTime data type. [git-p4: depot-paths = "//open/mondrian/": change = 10394]
- Loading branch information
1 parent
ef68124
commit 091933e
Showing
26 changed files
with
8,371 additions
and
301 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
// $Id$ | ||
// This software is subject to the terms of the Common Public License | ||
// Agreement, available at the following URL: | ||
// http://www.opensource.org/licenses/cpl.html. | ||
// Copyright (C) 2006-2007 Julian Hyde | ||
// All Rights Reserved. | ||
// You must accept the terms of that agreement to use this software. | ||
*/ | ||
package mondrian.calc; | ||
|
||
import mondrian.olap.Evaluator; | ||
|
||
import java.util.Date; | ||
|
||
/** | ||
* Compiled expression whose result is a {@link Date}, representing an MDX | ||
* DateTime value. | ||
* | ||
* <p>When implementing this interface, it is convenient to extend | ||
* {@link mondrian.calc.impl.AbstractDateTimeCalc}, but it is not required. | ||
* | ||
* @author jhyde | ||
* @version $Id$ | ||
* @since Sep 26, 2005 | ||
*/ | ||
public interface DateTimeCalc extends Calc { | ||
/** | ||
* Evaluates this expression to yield a {@link Date} value. | ||
* | ||
* @param evaluator Evaluation context | ||
* @return evaluation result | ||
*/ | ||
Date evaluateDateTime(Evaluator evaluator); | ||
} | ||
|
||
// End DateTimeCalc.java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
// $Id$ | ||
// This software is subject to the terms of the Common Public License | ||
// Agreement, available at the following URL: | ||
// http://www.opensource.org/licenses/cpl.html. | ||
// Copyright (C) 2008-2008 Julian Hyde | ||
// All Rights Reserved. | ||
// You must accept the terms of that agreement to use this software. | ||
*/ | ||
package mondrian.calc.impl; | ||
|
||
import mondrian.olap.Evaluator; | ||
import mondrian.olap.Exp; | ||
import mondrian.calc.*; | ||
|
||
/** | ||
* Abstract implementation of the {@link mondrian.calc.DateTimeCalc} interface. | ||
* | ||
* <p>The derived class must | ||
* implement the {@link #evaluateDateTime(mondrian.olap.Evaluator)} method, | ||
* and the {@link #evaluate(mondrian.olap.Evaluator)} method will call it. | ||
* | ||
* @author jhyde | ||
* @version $Id$ | ||
* @since Sep 26, 2005 | ||
*/ | ||
public abstract class AbstractDateTimeCalc | ||
extends AbstractCalc | ||
implements DateTimeCalc | ||
{ | ||
private final Calc[] calcs; | ||
|
||
protected AbstractDateTimeCalc(Exp exp, Calc[] calcs) { | ||
super(exp); | ||
this.calcs = calcs; | ||
} | ||
|
||
public Object evaluate(Evaluator evaluator) { | ||
return evaluateDateTime(evaluator); | ||
} | ||
|
||
public Calc[] getCalcs() { | ||
return calcs; | ||
} | ||
} | ||
|
||
// End AbstractDateTimeCalc.java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.