2 * Copyright (C) 2010, 2011 Openismus GmbH
4 * This file is part of GWT-Glom.
6 * GWT-Glom is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
11 * GWT-Glom is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with GWT-Glom. If not, see <http://www.gnu.org/licenses/>.
20 package org.glom.web.shared;
22 import java.io.Serializable;
24 @SuppressWarnings("serial")
25 public class GlomDocument implements Serializable {
27 // could consider a LinkedHashMap if we need to support adding or removing tables
28 // order must be consistent between these two arrays
29 private String[] tableNames;
30 private String[] tableTitles;
31 private int defaultTableIndex;
33 public GlomDocument() {
34 new GlomDocument("", new String[] {}, new String[] {}, 0);
37 public GlomDocument(String title, String[] tableNames, String[] tableTitles, int defaultTableIndex) {
39 this.tableNames = tableNames;
40 this.tableTitles = tableTitles;
41 this.defaultTableIndex = defaultTableIndex;
45 public String getTitle() { return title; }
46 public void setTitle(String name) { this.title = name; }
47 public int getDefaultTableIndex() { return defaultTableIndex; }
48 public void setDefaultTableIndex(int defaultTable) { this.defaultTableIndex = defaultTable; }
49 public String[] getTableNames() { return tableNames; }
50 public void setTableNames(String[] tableNames) { this.tableNames = tableNames; }
51 public void setTableTitles(String[] tableTitles) { this.tableTitles = tableTitles; }
52 public String[] getTableTitles() { return tableTitles; }