01: /*
02: * Copyright 2005-2006 The Kuali Foundation.
03: *
04: *
05: * Licensed under the Educational Community License, Version 1.0 (the "License");
06: * you may not use this file except in compliance with the License.
07: * You may obtain a copy of the License at
08: *
09: * http://www.opensource.org/licenses/ecl1.php
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package edu.iu.uis.eden.lookupable;
18:
19: import java.util.ArrayList;
20: import java.util.List;
21:
22: import edu.iu.uis.eden.plugin.attributes.WorkflowLookupable;
23:
24: /**
25: * A Row is a collection of {@link Field} objects that represents a row of results
26: * from a {@link WorkflowLookupable}.
27: *
28: * @author jhopf
29: */
30: public class Row implements java.io.Serializable {
31: private static final long serialVersionUID = -3716365412750461233L;
32: private List<Field> fields;
33: private String rowsGroupLabel;
34: private int numberOfGroupRows;
35:
36: public Row() {
37: this .fields = new ArrayList<Field>();
38: }
39:
40: public Row(List<Field> fields) {
41: this .fields = fields;
42: }
43:
44: public Row(List<Field> fields, String rowsGroupLabel,
45: int numberOfGroupRows) {
46: this .fields = fields;
47: this .rowsGroupLabel = rowsGroupLabel;
48: this .numberOfGroupRows = numberOfGroupRows;
49: }
50:
51: public List<Field> getFields() {
52: return fields;
53: }
54:
55: public void setFields(List<Field> fields) {
56: this .fields = fields;
57: }
58:
59: public Field getField(int index) {
60: while (fields.size() <= index) {
61: Field field = new Field();
62: fields.add(field);
63: }
64: return (Field) fields.get(index);
65: }
66:
67: public void setField(Field field, int index) {
68: this .fields.set(index, field);
69: }
70:
71: public String getRowsGroupLabel() {
72: return rowsGroupLabel;
73: }
74:
75: public void setRowsGroupLabel(String rowsGroupLabel) {
76: this .rowsGroupLabel = rowsGroupLabel;
77: }
78:
79: public int getNumberOfGroupRows() {
80: return numberOfGroupRows;
81: }
82:
83: public void setNumberOfGroupRows(int numberOfGroupRows) {
84: this.numberOfGroupRows = numberOfGroupRows;
85: }
86: }
|