001    /*
002    // $Id: //open/mondrian/src/main/mondrian/rolap/agg/QuerySpec.java#6 $
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) 2001-2002 Kana Software, Inc.
007    // Copyright (C) 2001-2007 Julian Hyde and others
008    // All Rights Reserved.
009    // You must accept the terms of that agreement to use this software.
010    //
011    // jhyde, 30 August, 2001
012    */
013    
014    package mondrian.rolap.agg;
015    
016    import mondrian.rolap.RolapStar;
017    import mondrian.rolap.StarColumnPredicate;
018    
019    /**
020     * Contains the information necessary to generate a SQL statement to
021     * retrieve a set of cells.
022     *
023     * @author jhyde
024     * @author Richard M. Emberson
025     * @version $Id: //open/mondrian/src/main/mondrian/rolap/agg/QuerySpec.java#6 $
026     */
027    public interface QuerySpec {
028        RolapStar getStar();
029        int getMeasureCount();
030        RolapStar.Measure getMeasure(int i);
031        String getMeasureAlias(int i);
032        RolapStar.Column[] getColumns();
033        String getColumnAlias(int i);
034    
035        /**
036         * Returns the predicate on the <code>i</code>th column.
037         *
038         * <p>If the column is unconstrained, returns
039         * {@link LiteralStarPredicate}(true).
040         *
041         * @param i Column ordinal
042         * @return Constraint on column
043         */
044        StarColumnPredicate getColumnPredicate(int i);
045    
046        String generateSqlQuery();
047    }
048    
049    // End QuerySpec.java