001 /* 002 // $Id: Scenario.java 482 2012-01-05 23:27:27Z jhyde $ 003 // 004 // Licensed to Julian Hyde under one or more contributor license 005 // agreements. See the NOTICE file distributed with this work for 006 // additional information regarding copyright ownership. 007 // 008 // Julian Hyde licenses this file to you under the Apache License, 009 // Version 2.0 (the "License"); you may not use this file except in 010 // compliance with the License. You may obtain a copy of the License at: 011 // 012 // http://www.apache.org/licenses/LICENSE-2.0 013 // 014 // Unless required by applicable law or agreed to in writing, software 015 // distributed under the License is distributed on an "AS IS" BASIS, 016 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 017 // See the License for the specific language governing permissions and 018 // limitations under the License. 019 */ 020 package org.olap4j; 021 022 /** 023 * Context for a set of writeback operations. 024 * 025 * <p>An analyst performing a what-if analysis would first create a scenario, 026 * or open an existing scenario, then modify a sequence of cell values. 027 * 028 * <p>Some OLAP engines allow scenarios to be saved (to a file, or perhaps to 029 * the database) and restored in a future session. 030 * 031 * <p>Multiple scenarios may be open at the same time, by different users of 032 * the OLAP engine. 033 * 034 * @see OlapConnection#createScenario() 035 * @see OlapConnection#setScenario(Scenario) 036 * @see OlapConnection#getScenario() 037 * @see Cell#setValue(Object, AllocationPolicy, Object[]) 038 * @see AllocationPolicy 039 * 040 * @author jhyde 041 * @since 24 April, 2009 042 * @version $Id: Scenario.java 482 2012-01-05 23:27:27Z jhyde $ 043 */ 044 public interface Scenario { 045 /** 046 * Returns the unique identifier of this Scenario. 047 * 048 * <p>The format of the string returned is implementation defined. Client 049 * applications must not make any assumptions about the structure or 050 * contents of such strings. 051 * 052 * @return Unique identifier of this Scenario. 053 */ 054 String getId(); 055 } 056 057 // End Scenario.java