001/*
002// Licensed to Julian Hyde under one or more contributor license
003// agreements. See the NOTICE file distributed with this work for
004// additional information regarding copyright ownership.
005//
006// Julian Hyde licenses this file to you under the Apache License,
007// Version 2.0 (the "License"); you may not use this file except in
008// compliance with the License. You may obtain a copy of the License at:
009//
010// http://www.apache.org/licenses/LICENSE-2.0
011//
012// Unless required by applicable law or agreed to in writing, software
013// distributed under the License is distributed on an "AS IS" BASIS,
014// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015// See the License for the specific language governing permissions and
016// limitations under the License.
017*/
018package org.olap4j;
019
020import java.sql.SQLException;
021import javax.sql.DataSource;
022
023/**
024 * <p>A factory for connections to the physical OLAP data source that this
025 * <code>OlapDataSource</code> object represents.
026 *
027 * <p><code>OlapDataSource</code> is a refinement of
028 * {@link javax.sql.DataSource} whose <code>getConnection</code> methods
029 * return {@link org.olap4j.OlapConnection} objects rather than mere
030 * {@link java.sql.Connection}s.
031 *
032 * @author jhyde
033 * @since Mar 25, 2008
034 */
035public interface OlapDataSource extends DataSource {
036
037    // override with more specific return type
038    OlapConnection getConnection() throws SQLException;
039
040    // override with more specific return type
041    OlapConnection getConnection(
042        String username,
043        String password)
044        throws SQLException;
045}
046
047// End OlapDataSource.java