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
020/**
021 * Context for a set of writeback operations.
022 *
023 * <p>An analyst performing a what-if analysis would first create a scenario,
024 * or open an existing scenario, then modify a sequence of cell values.
025 *
026 * <p>Some OLAP engines allow scenarios to be saved (to a file, or perhaps to
027 * the database) and restored in a future session.
028 *
029 * <p>Multiple scenarios may be open at the same time, by different users of
030 * the OLAP engine.
031 *
032 * @see OlapConnection#createScenario()
033 * @see OlapConnection#setScenario(Scenario)
034 * @see OlapConnection#getScenario()
035 * @see Cell#setValue(Object, AllocationPolicy, Object[])
036 * @see AllocationPolicy
037 *
038 * @author jhyde
039 * @since 24 April, 2009
040 */
041public interface Scenario {
042    /**
043     * Returns the unique identifier of this Scenario.
044     *
045     * <p>The format of the string returned is implementation defined. Client
046     * applications must not make any assumptions about the structure or
047     * contents of such strings.
048     *
049     * @return Unique identifier of this Scenario.
050     */
051    String getId();
052}
053
054// End Scenario.java