1 25 26 package org.objectweb.jorm.mapper.rdb.lib; 27 28 import java.math.BigDecimal ; 29 import java.math.BigInteger ; 30 import java.util.ArrayList ; 31 import java.util.Date ; 32 33 import org.objectweb.medor.api.MedorException; 34 import org.objectweb.medor.expression.api.Operand; 35 import org.objectweb.medor.tuple.api.Tuple; 36 import org.objectweb.medor.tuple.api.TupleCollection; 37 38 41 public class RdbIntermediaryTuple implements Tuple { 42 43 private int[] associationTable; 44 private Tuple delegatePbTuple = null; 45 46 public RdbIntermediaryTuple(int[] associationTable, Tuple delegatePbTuple) { 47 this.associationTable = associationTable; 48 this.delegatePbTuple = delegatePbTuple; 49 } 50 51 public int getSize() { 52 return associationTable.length; 53 } 54 55 public Operand[] toOperandArray() { 56 return null; 57 } 58 59 public boolean getBoolean(int index) throws MedorException { 60 return delegatePbTuple.getBoolean(associationTable[index-1] + 1); 61 } 62 63 public byte getByte(int index) throws MedorException { 64 return delegatePbTuple.getByte(associationTable[index-1] + 1); 65 } 66 67 public byte[] getByteArray(int index) throws MedorException { 68 return delegatePbTuple.getByteArray(associationTable[index-1] + 1); 69 } 70 71 72 public char getChar(int index) throws MedorException { 73 return delegatePbTuple.getChar(associationTable[index-1] + 1); 74 } 75 76 public char[] getCharArray(int index) throws MedorException { 77 return delegatePbTuple.getCharArray(associationTable[index-1] + 1); 78 } 79 80 public Date getDate(int index) throws MedorException { 81 return delegatePbTuple.getDate(associationTable[index-1] + 1); 82 } 83 84 public double getDouble(int index) throws MedorException { 85 return delegatePbTuple.getDouble(associationTable[index-1] + 1); 86 } 87 88 public float getFloat(int index) throws MedorException { 89 return delegatePbTuple.getFloat(associationTable[index-1] + 1); 90 } 91 92 public int getInt(int index) throws MedorException { 93 return delegatePbTuple.getInt(associationTable[index-1] + 1); 94 } 95 96 public Operand getLikeOperand(int index) throws MedorException { 97 return null; 98 } 99 100 public long getLong(int index) throws MedorException { 101 return delegatePbTuple.getLong(associationTable[index-1] + 1); 102 } 103 104 public Object getObject(int index) throws MedorException { 105 return delegatePbTuple.getObject(associationTable[index-1] + 1); 106 } 107 108 public short getShort(int index) throws MedorException { 109 return delegatePbTuple.getShort(associationTable[index-1] + 1); 110 } 111 112 public BigDecimal getBigDecimal(int index) throws MedorException { 113 return delegatePbTuple.getBigDecimal(associationTable[index-1] + 1); 114 } 115 116 public BigInteger getBigInteger(int index) throws MedorException { 117 return delegatePbTuple.getBigInteger(associationTable[index-1] + 1); 118 } 119 120 public String getString(int index) throws MedorException { 121 return delegatePbTuple.getString(associationTable[index-1] + 1); 122 } 123 124 125 public TupleCollection getTupleCollection(int index) throws MedorException { 126 return null; 128 } 129 130 public boolean isDefined(int index) { 131 return delegatePbTuple.isDefined(associationTable[index-1] + 1); 132 } 133 134 } 135 | Popular Tags |