001    /*
002    // $Id: //open/mondrian/src/main/mondrian/calc/ParameterSlot.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) 2006-2006 Julian Hyde
007    // All Rights Reserved.
008    // You must accept the terms of that agreement to use this software.
009    */
010    package mondrian.calc;
011    
012    import mondrian.olap.Parameter;
013    
014    /**
015     * Implementation of a parameter.
016     *
017     * @author jhyde
018     * @version $Id: //open/mondrian/src/main/mondrian/calc/ParameterSlot.java#1 $
019     * @since Jul 25, 2006
020     */
021    public interface ParameterSlot {
022        /**
023         * Returns the unique index of the slot.
024         */
025        int getIndex();
026    
027        /**
028         * Returns a compiled expression to compute the default value of the
029         * parameter.
030         */
031        Calc getDefaultValueCalc();
032    
033        /**
034         * Returns the parameter.
035         */
036        Parameter getParameter();
037    
038        /**
039         * Sets the value of this parameter.
040         *
041         * <p>NOTE: This method will be removed when we store parameter values
042         * in the {@link mondrian.olap.Result} rather than in the
043         * {@link mondrian.olap.Query}.
044         */
045        void setParameterValue(Object value);
046    
047        /**
048         * Returns the value of this parameter.
049         *
050         * <p>NOTE: This method will be removed when we store parameter values
051         * in the {@link mondrian.olap.Result} rather than in the
052         * {@link mondrian.olap.Query}.
053         */
054        Object getParameterValue();
055    
056        void setCachedDefaultValue(Object value);
057    
058        Object getCachedDefaultValue();
059    }
060    
061    // End ParameterSlot.java