001    /*
002    // $Id: //open/mondrian/src/main/mondrian/olap4j/Factory.java#1 $
003    // This software is subject to the terms of the Common Public License
004    // Agreement, available at the following URL:
005    // http://www.opensource.org/licenses/cpl.html.
006    // Copyright (C) 2007-2007 Julian Hyde
007    // All Rights Reserved.
008    // You must accept the terms of that agreement to use this software.
009    */
010    package mondrian.olap4j;
011    
012    import mondrian.olap.Query;
013    
014    import java.util.Properties;
015    import java.util.List;
016    import java.sql.*;
017    
018    /**
019     * Instantiates classes to implement the olap4j API against the
020     * Mondrian OLAP engine.
021     *
022     * <p>There are implementations for JDBC 3.0 (which occurs in JDK 1.5)
023     * and JDBC 4.0 (which occurs in JDK 1.6).
024     *
025     * @author jhyde
026     * @version $Id: //open/mondrian/src/main/mondrian/olap4j/Factory.java#1 $
027     * @since Jun 14, 2007
028     */
029    interface Factory {
030        Connection newConnection(String url, Properties info) throws SQLException;
031    
032        EmptyResultSet newEmptyResultSet(
033            MondrianOlap4jConnection olap4jConnection);
034    
035        ResultSet newFixedResultSet(
036            MondrianOlap4jConnection olap4jConnection,
037            List<String> headerList,
038            List<List<Object>> rowList);
039    
040        MondrianOlap4jCellSet newCellSet(
041            MondrianOlap4jStatement olap4jStatement,
042            Query query);
043    
044        MondrianOlap4jPreparedStatement newPreparedStatement(
045            String mdx, MondrianOlap4jConnection olap4jConnection);
046    
047        MondrianOlap4jDatabaseMetaData newDatabaseMetaData(
048            MondrianOlap4jConnection olap4jConnection);
049    }
050    
051    // End Factory.java