1 21 22 package org.apache.derby.impl.store.access.sort; 23 24 import org.apache.derby.iapi.reference.SQLState; 25 26 import org.apache.derby.iapi.store.access.BackingStoreHashtable; 27 import org.apache.derby.iapi.services.io.FormatableBitSet; 28 import org.apache.derby.iapi.services.i18n.MessageService; 29 30 import org.apache.derby.iapi.services.io.Storable; 31 32 import org.apache.derby.iapi.types.Orderable; 33 import org.apache.derby.iapi.types.RowLocation; 34 35 import org.apache.derby.iapi.error.StandardException; 36 37 import org.apache.derby.iapi.store.access.conglomerate.Conglomerate; 38 import org.apache.derby.iapi.store.access.conglomerate.ScanManager; 39 40 import org.apache.derby.iapi.store.access.Qualifier; 41 import org.apache.derby.iapi.store.access.ScanController; 42 import org.apache.derby.iapi.store.access.ScanInfo; 43 44 import org.apache.derby.iapi.store.raw.Page; 45 46 import org.apache.derby.iapi.types.DataValueDescriptor; 47 48 import java.util.Properties ; 49 50 56 57 public abstract class Scan implements ScanManager, ScanInfo 58 { 59 62 63 82 public void didNotQualify() 83 throws StandardException 84 { 85 } 86 87 93 public int fetchNextGroup( 94 DataValueDescriptor[][] row_array, 95 RowLocation[] rowloc_array) 96 throws StandardException 97 { 98 throw StandardException.newException( 99 SQLState.SORT_IMPROPER_SCAN_METHOD); 100 } 101 102 public int fetchNextGroup( 103 DataValueDescriptor[][] row_array, 104 RowLocation[] old_rowloc_array, 105 RowLocation[] new_rowloc_array) 106 throws StandardException 107 { 108 throw StandardException.newException( 109 SQLState.SORT_IMPROPER_SCAN_METHOD); 110 } 111 112 113 120 public void fetchSet( 121 long max_rowcnt, 122 int[] key_column_numbers, 123 BackingStoreHashtable hash_table) 124 throws StandardException 125 { 126 throw StandardException.newException( 127 SQLState.SORT_IMPROPER_SCAN_METHOD); 128 } 129 130 135 public boolean doesCurrentPositionQualify() 136 throws StandardException 137 { 138 return true; 139 } 140 141 145 public void fetchLocation(RowLocation templateLocation) 146 throws StandardException 147 { 148 throw StandardException.newException( 149 SQLState.SORT_IMPROPER_SCAN_METHOD); 150 } 151 152 166 public ScanInfo getScanInfo() 167 throws StandardException 168 { 169 return(this); 170 } 171 172 188 public long getEstimatedRowCount() 189 throws StandardException 190 { 191 throw StandardException.newException( 192 SQLState.SORT_IMPROPER_SCAN_METHOD); 193 } 194 195 213 public void setEstimatedRowCount(long count) 214 throws StandardException 215 { 216 throw StandardException.newException( 217 SQLState.SORT_IMPROPER_SCAN_METHOD); 218 } 219 220 225 public boolean isCurrentPositionDeleted() 226 throws StandardException 227 { 228 throw StandardException.newException( 229 SQLState.SORT_IMPROPER_SCAN_METHOD); 230 } 231 232 238 public boolean isKeyed() 239 { 240 return(false); 241 } 242 243 248 public boolean isTableLocked() 249 { 250 return(true); 251 } 252 253 257 public boolean delete() 258 throws StandardException 259 { 260 throw StandardException.newException( 261 SQLState.SORT_IMPROPER_SCAN_METHOD); 262 } 263 264 268 public void reopenScan( 269 DataValueDescriptor[] startKeyValue, 270 int startSearchOperator, 271 Qualifier qualifier[][], 272 DataValueDescriptor[] stopKeyValue, 273 int stopSearchOperator) 274 throws StandardException 275 { 276 throw StandardException.newException( 277 SQLState.SORT_IMPROPER_SCAN_METHOD); 278 } 279 280 289 public void reopenScanByRowLocation( 290 RowLocation startRowLocation, 291 Qualifier qualifier[][]) 292 throws StandardException 293 { 294 throw StandardException.newException( 295 SQLState.SORT_IMPROPER_SCAN_METHOD); 296 } 297 298 302 public boolean replace( 303 DataValueDescriptor[] val, 304 FormatableBitSet validColumns) 305 throws StandardException 306 { 307 throw StandardException.newException( 308 SQLState.SORT_IMPROPER_SCAN_METHOD); 309 } 310 311 316 public RowLocation newRowLocationTemplate() 317 throws StandardException 318 { 319 throw StandardException.newException( 320 SQLState.SORT_IMPROPER_SCAN_METHOD); 321 } 322 323 326 public boolean positionAtRowLocation(RowLocation rl) 327 throws StandardException 328 { 329 throw StandardException.newException( 330 SQLState.SORT_IMPROPER_SCAN_METHOD); 331 } 332 333 336 337 350 public void savePosition(Conglomerate conglom, Page page) 351 throws StandardException 352 { 353 357 return; 358 } 359 360 363 364 378 public Properties getAllScanInfo(Properties prop) 379 throws StandardException 380 { 381 if (prop == null) 382 prop = new Properties (); 383 384 prop.put( 385 MessageService.getTextMessage(SQLState.STORE_RTS_SCAN_TYPE), 386 MessageService.getTextMessage(SQLState.STORE_RTS_SORT)); 387 388 return(prop); 389 } 390 } 391 | Popular Tags |