| 1 package com.quadcap.sql; 2 3 40 41 import java.sql.SQLException ; 42 43 import com.quadcap.sql.types.Value; 44 45 import com.quadcap.util.Debug; 46 47 52 public class MapRow extends Row { 53 int offset = 1; 54 int[] map; 55 Row r; 56 57 public MapRow() {} 58 59 62 public MapRow(int[] map) { 63 this.map = map; 64 } 65 66 public MapRow(int[] map, int origin) { 67 this.map = map; 68 this.offset = 1 - origin; 69 } 70 71 public int size() { return map.length - (1 - offset); } 72 73 public void setRow(Row r) { this.r = r; } 74 75 public Value item(int i) throws SQLException { 76 return r.item(map[i-offset]); 77 } 78 79 public void set(int i, Value val) throws SQLException { 80 r.set(map[i-offset], val); 81 } 82 83 } 84 | Popular Tags |