2 * Copyright (C) 2010 Prasanta Paul, http://prasanta-paul.blogspot.com
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
17 package com.pras.table;
\r
19 import java.util.ArrayList;
\r
20 import java.util.HashMap;
\r
23 * Table associated with WorkSheet. It holds data and internally used in WorkSheet.
\r
25 * @author Prasanta Paul
\r
27 public class Table {
\r
35 private String name;
\r
39 private String description;
\r
55 private ArrayList<String> cols;
\r
58 * <name,alan>, <age,20>, <country, india>, <exp, 1>
\r
60 ArrayList<Record> records = new ArrayList<Record>();
\r
62 public String getId() {
\r
65 public void setId(String id) {
\r
68 public String getName() {
\r
71 public void setName(String name) {
\r
74 public String getUrl() {
\r
77 public String getDescription() {
\r
80 public void setDescription(String description) {
\r
81 this.description = description;
\r
83 public void setUrl(String url) {
\r
86 public int getRowNum() {
\r
89 public void setRowNum(int rowNum) {
\r
90 this.rowNum = rowNum;
\r
92 public int getColNum() {
\r
95 public void setColNum(int colNum) {
\r
96 this.colNum = colNum;
\r
98 public ArrayList<String> getCols() {
\r
101 public void setCols(ArrayList<String> cols) {
\r
104 setColNum(cols.size());
\r
108 public ArrayList<Record> getRecords() {
\r
111 public void addRecord(Record data){
\r
114 public void clearData(){
\r
117 public void setRecords(ArrayList<Record> records) {
\r
118 this.records = records;
\r