1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.seasar.tuigwaa.database;
17
18 import java.util.Map;
19
20 public class DataRowImpl implements DataRow {
21
22 private final int rowIndex_;
23
24 private int columnIndex_ = -1;
25
26 private DataTable dataTable_;
27
28 public DataRowImpl(DataTable dataTable, int index) {
29 this.dataTable_ = dataTable;
30 this.rowIndex_ = index;
31 }
32
33 public Object next() {
34 Object data = dataTable_.getData(rowIndex_, ++columnIndex_);
35 return data;
36 }
37
38 public boolean hasNext() {
39 return dataTable_.hasNextColumn(columnIndex_);
40 }
41
42 public void remove() {
43
44 }
45
46 public Object getCell() {
47 return dataTable_.getData(rowIndex_, columnIndex_);
48 }
49
50 public Object getCell(int columnIndex) {
51 return dataTable_.getData(rowIndex_, columnIndex);
52 }
53
54 public Object getCell(String field){
55 return dataTable_.getData(rowIndex_, field);
56 }
57
58 public Map getDataMap() {
59 return dataTable_.getDataMap(rowIndex_);
60 }
61
62 public Object getDataObject(){
63 return dataTable_.getRowObject(rowIndex_);
64 }
65
66 public String getHeader(){
67 return dataTable_.getHeader(columnIndex_);
68 }
69
70 }