01: /*
02: * Copyright 2004-2008 H2 Group. Licensed under the H2 License, Version 1.0
03: * (http://h2database.com/html/license.html).
04: * Initial Developer: H2 Group
05: */
06: package org.h2.result;
07:
08: import org.h2.value.Value;
09:
10: /**
11: * Represents a simple row that is not cached separately.
12: */
13: public class SimpleRow implements SearchRow {
14:
15: private int pos;
16: private Value[] data;
17:
18: public SimpleRow(Value[] data) {
19: this .data = data;
20: }
21:
22: public int getColumnCount() {
23: return data.length;
24: }
25:
26: public int getPos() {
27: return pos;
28: }
29:
30: public void setPos(int pos) {
31: this .pos = pos;
32: }
33:
34: public void setValue(int i, Value v) {
35: data[i] = v;
36: }
37:
38: public Value getValue(int i) {
39: return data[i];
40: }
41:
42: }
|