1 package com.quantum.sql;
3 import com.quantum.model.Bookmark;
4 import com.quantum.model.Entity;
5 import com.quantum.util.StringMatrix;
7 public class TableRow {
8 private String[] columnNames;
9 private Bookmark bookmark;
11 private Entity entity;
12 private StringMatrix fullTableData;
14 public TableRow(Entity entity, Bookmark bookmark, String table, StringMatrix tableData) {
17 // tableData will contain the first row of the tableData, for compatibility reasons with older code
18 // TODO: refactor the older code to allow for multiple selections
19 this.columnNames = tableData.getHeader();
20 this.bookmark = bookmark;
21 this.fullTableData = tableData;
24 public int getColumnCount() {
25 return columnNames.length;
28 public String[] getColumnNames() {
32 public String getTable() {
36 public Bookmark getBookmark() {
40 public Entity getEntity() {
44 public void setColumnNames(String[] columnNames) {
45 this.columnNames = columnNames;
48 public String[] getTableData() {
49 return getTableRow(0);
52 public String[] getTableRow(int i) {
53 return fullTableData.getRow(i);
56 public StringMatrix getRowTableData() {