1 package com.daffodilwoods.daffodildb.server.sql99.dql.iterator.table; 2 3 import com.daffodilwoods.daffodildb.client.*; 4 import com.daffodilwoods.daffodildb.server.datasystem.utility._Record; 5 import com.daffodilwoods.daffodildb.server.sql99.common.*; 6 import com.daffodilwoods.daffodildb.server.sql99.dql.execution.*; 7 import com.daffodilwoods.daffodildb.server.sql99.dql.iterator.*; 8 import com.daffodilwoods.daffodildb.server.sql99.utils.*; 9 import com.daffodilwoods.daffodildb.utils.field.*; 10 import com.daffodilwoods.database.resource.*; 11 import com.daffodilwoods.database.sqlinitiator.*; 12 import com.daffodilwoods.database.utility.P; 13 14 34 public class ReverseIterator extends AbstractVariableValues implements _Iterator { 35 36 40 _Iterator iterator; 41 42 private _Reference[] underlyingRef; 43 44 public ReverseIterator(_Iterator iterator) { 45 this.iterator = iterator; 46 } 47 48 55 public boolean first() throws com.daffodilwoods.database.resource.DException { 56 return iterator.last(); 57 } 58 59 66 public boolean last() throws com.daffodilwoods.database.resource.DException { 67 return iterator.first(); 68 } 69 70 77 public boolean next() throws com.daffodilwoods.database.resource.DException { 78 return iterator.previous(); 79 } 80 81 88 public boolean previous() throws com.daffodilwoods.database.resource.DException { 89 return iterator.next(); 90 } 91 92 97 98 public _OrderCount getOrderCounts() throws com.daffodilwoods.database.resource.DException { 99 return iterator.getOrderCounts(); 100 } 101 102 public TableDetails[] getTableDetails() throws com.daffodilwoods.database.resource.DException { 103 return iterator.getTableDetails(); 104 } 105 106 public _Iterator getBaseIterator(ColumnDetails column) throws com.daffodilwoods.database.resource.DException { 107 return iterator.getBaseIterator(column); 108 } 109 110 public void setKeyCount(Object [][] parm1) throws com.daffodilwoods.database.resource.DException { 111 iterator.setKeyCount(parm1); 112 } 113 114 public void setConditionVariableValue(_Reference[] parm1, Object [] parm2, int parm3) throws com.daffodilwoods.database.resource.DException { 115 if(underlyingRef!=null){ 116 parm1 = GeneralPurposeStaticClass.getJointReferences(parm1,underlyingRef); 117 parm2 = GeneralPurposeStaticClass.getJointValues(this, parm2,underlyingRef.length); 118 } 119 iterator.setConditionVariableValue(parm1, parm2 , parm3); 120 } 121 122 public Object getColumnValues() throws com.daffodilwoods.database.resource.DException { 123 return iterator.getColumnValues() ; 124 } 125 126 public _KeyColumnInformation[] getKeyColumnInformations() throws com.daffodilwoods.database.resource.DException { 127 return iterator.getKeyColumnInformations(); 128 } 129 130 public Object [] getUniqueColumnReference() throws com.daffodilwoods.database.resource.DException { 131 return iterator.getUniqueColumnReference(); 132 } 133 134 public boolean seek(Object parm1) throws com.daffodilwoods.database.resource.DException { 135 return iterator.seek(parm1); 136 } 137 138 public _Order getDefaultOrder() throws com.daffodilwoods.database.resource.DException { 139 return iterator.getDefaultOrder(); 140 } 141 142 public _ExecutionPlan getExecutionPlan() throws com.daffodilwoods.database.resource.DException { 143 return iterator.getExecutionPlan(); 144 } 145 146 public ExecutionPlanForBrowser getExecutionPlanForBrowser() throws com.daffodilwoods.database.resource.DException { 147 return iterator.getExecutionPlanForBrowser(); 148 } 149 150 public boolean seekFromTop(_IndexPredicate[] parm1) throws com.daffodilwoods.database.resource.DException { 151 return iterator.seekFromTop(parm1); 152 } 153 154 public boolean seekFromTopRelative(Object parm1) throws com.daffodilwoods.database.resource.DException { 155 return iterator.seekFromTopRelative(parm1); 156 } 157 158 public boolean seekFromBottom(_IndexPredicate[] parm1) throws com.daffodilwoods.database.resource.DException { 159 return iterator.seekFromBottom(parm1); 160 } 161 162 public boolean seekFromBottomRelative(Object parm1) throws com.daffodilwoods.database.resource.DException { 163 return iterator.seekFromBottomRelative(parm1); 164 } 165 166 public Object getKey() throws com.daffodilwoods.database.resource.DException { 167 return iterator.getKey(); 168 } 169 170 public void move(Object parm1) throws com.daffodilwoods.database.resource.DException { 171 iterator.move(parm1); 172 } 173 174 public byte[] getByteKey() throws DException { 175 return iterator.getByteKey(); 176 } 177 178 public void moveByteKey(byte[] key) throws DException { 179 iterator.moveByteKey(key); 180 } 181 182 183 public Object getColumnValues(int[] parm1) throws com.daffodilwoods.database.resource.DException { 184 return iterator.getColumnValues(parm1); 185 } 186 187 public _Record getRecord() throws com.daffodilwoods.database.resource.DException { 188 return iterator.getRecord(); 189 } 190 191 public Object getColumnValues(_Reference[] parm1) throws com.daffodilwoods.database.resource.DException { 192 return iterator.getColumnValues(parm1); 193 } 194 195 public Object getColumnValues(_Reference parm1) throws com.daffodilwoods.database.resource.DException { 196 return iterator.getColumnValues(parm1); 197 } 198 199 public _Iterator getBaseIteratorHasRecord(ColumnDetails parm1) throws com.daffodilwoods.database.resource.DException { 200 return iterator.getBaseIteratorHasRecord(parm1); 201 } 202 203 public Object [][] getFunctionalColumnMapping() throws DException { 204 return iterator.getFunctionalColumnMapping(); 205 } 206 207 public FieldBase field(_Reference reference) throws com.daffodilwoods.database.resource.DException { 208 return iterator.field(reference); 209 } 210 211 public FieldBase[] fields(_Reference[] references) throws com.daffodilwoods.database.resource.DException { 212 return iterator.fields(references); 213 } 214 215 public FieldBase[] fields(int[] columns) throws com.daffodilwoods.database.resource.DException { 216 throw new java.lang.UnsupportedOperationException ("Method fields() not yet implemented."); 217 } 218 219 public void releaseResource() throws DException { 220 iterator.releaseResource(); 221 } 222 223 public String toString(){ 224 return "ReverseIterator["+iterator+"]"; 225 } 226 227 public void setSpecificUnderlyingReferences(_Reference[] specificUnderlyingReferences) throws DException{ 228 underlyingRef=specificUnderlyingReferences; 229 } 230 231 } 232 | Popular Tags |