From 6a62a7deb043a20c444261276298bcd7bb240cce Mon Sep 17 00:00:00 2001 From: Julian Hyde Date: Wed, 26 Mar 2008 00:11:06 +0000 Subject: [PATCH] Add OlapDataSource interface. git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@81 c6a108a4-781c-0410-a6c6-c2d559e19af0 --- doc/olap4j_fs.html | 8 ++++-- src/org/olap4j/OlapDataSource.java | 39 ++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 src/org/olap4j/OlapDataSource.java diff --git a/doc/olap4j_fs.html b/doc/olap4j_fs.html index 1d8b255..84f6f93 100644 --- a/doc/olap4j_fs.html +++ b/doc/olap4j_fs.html @@ -82,7 +82,7 @@

olap4j Specification

Version: 0.9.5 (beta)
Revision: $Id$ (log)
-Last modified: March 5th, 2008.

+Last modified: March 25th, 2008.


Contents

@@ -109,6 +109,7 @@

Contents

  • The Driver class
  • The DriverManager class
  • The DataSource interface
  • +
  • The OlapDataSource interface
  • The OlapException class
  • @@ -469,7 +470,10 @@

    2.1.2. The DriverManager class

    Same functionality as JDBC.

    2.1.3. The DataSource interface

    Same functionality as JDBC.

    -

    2.1.4 The OlapException class

    +

    2.1.4. The OlapDataSource interface

    +

    Extension to DataSource that returns OlapConnection +objects rather than mere java.sql.Connection objects.

    +

    2.1.5. The OlapException class

    OlapException (extends diff --git a/src/org/olap4j/OlapDataSource.java b/src/org/olap4j/OlapDataSource.java new file mode 100644 index 0000000..03380a4 --- /dev/null +++ b/src/org/olap4j/OlapDataSource.java @@ -0,0 +1,39 @@ +/* +// 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 org.olap4j; + +import javax.sql.DataSource; +import java.sql.SQLException; + +/** + *

    A factory for connections to the physical OLAP data source that this + * OlapDataSource object represents. + * + *

    OlapDataSource is a refinement of + * {@link javax.sql.DataSource} whose getConnection methods + * return {@link org.olap4j.OlapConnection} objects rather than mere + * {@link java.sql.Connection}s. + * + * @author jhyde + * @version $Id: $ + * @since Mar 25, 2008 + */ +public interface OlapDataSource extends DataSource { + + // override with more specific return type + OlapConnection getConnection() throws SQLException; + + // override with more specific return type + OlapConnection getConnection( + String username, + String password) + throws SQLException; +} + +// End OlapDataSource.java