1 package com.daffodilwoods.daffodildb.server.sql99.dql.iterator.order; 2 3 import com.daffodilwoods.daffodildb.client.*; 4 import com.daffodilwoods.daffodildb.server.datasystem.btree.*; 5 import com.daffodilwoods.daffodildb.server.datasystem.indexsystem.*; 6 import com.daffodilwoods.daffodildb.server.datasystem.interfaces.*; 7 import com.daffodilwoods.daffodildb.server.datasystem.utility._Record; 8 import com.daffodilwoods.daffodildb.server.serversystem.*; 9 import com.daffodilwoods.daffodildb.server.sql99.common.*; 10 import com.daffodilwoods.daffodildb.server.sql99.dql.execution.*; 11 import com.daffodilwoods.daffodildb.server.sql99.dql.iterator.*; 12 import com.daffodilwoods.daffodildb.server.sql99.dql.queryexpression. 13 orderbyclause.*; 14 import com.daffodilwoods.daffodildb.server.sql99.dql.resultsetmetadata.*; 15 import com.daffodilwoods.daffodildb.server.sql99.utils.*; 16 import com.daffodilwoods.daffodildb.utils.comparator.*; 17 import com.daffodilwoods.daffodildb.utils.field.*; 18 import com.daffodilwoods.database.general.*; 19 import com.daffodilwoods.database.resource.*; 20 import com.daffodilwoods.database.sqlinitiator.*; 21 import com.daffodilwoods.database.utility.*; 22 import com.daffodilwoods.daffodildb.server.datasystem.btree.BTreeNavigator; 23 import com.daffodilwoods.daffodildb.utils.field.FieldBase; 24 import com.daffodilwoods.daffodildb.utils.comparator.SuperComparator; 25 import com.daffodilwoods.daffodildb.server.sql99.dql.iterator.table. 26 SelectedColumnIterator; 27 import com.daffodilwoods.database.general.SystemFields; 28 import com.daffodilwoods.daffodildb.server.sql99.dql.iterator.table. 29 DistinctIterator; 30 import com.daffodilwoods.daffodildb.utils.byteconverter.CbCUsffWbmvfIboemfs; 31 import com.daffodilwoods.daffodildb.server.datasystem.indexsystem. 32 TempIndexDatabase; 33 import com.daffodilwoods.database.general.QualifiedIdentifier; 34 import com.daffodilwoods.daffodildb.utils.FieldUtility; 35 import com.daffodilwoods.daffodildb.server.datasystem.persistentsystem. 36 DatabaseConstants; 37 import com.daffodilwoods.daffodildb.utils.byteconverter.CCzufDpowfsufs; 38 import com.daffodilwoods.daffodildb.utils.BufferRange; 39 import java.util.ArrayList ; 40 import com.daffodilwoods.daffodildb.server.datadictionarysystem.SystemTables; 41 import com.daffodilwoods.daffodildb.server.sessionsystem.SessionIterator; 42 43 public class TemporaryIndexIterator 44 extends BaseSingleIterator 45 implements _TableOperations, _UserTableOperations, _IndexIteratorInfo { 46 47 _Index btree = null; 48 Object refershKey, deleteKey; 49 _ExpressionOrderValues order; 50 public int status; 51 52 Exception dumpStack; 53 private _KeyColumnInformation[] keyColumnInformation; 54 private _AllColumnRowReader rowReader; 55 56 BTreeNavigator navigator; 57 _AbstractBTreeValue abstractBTreeValue = null; 58 CbCUsffWbmvfIboemfs btreeValueHandler; 59 TempIndexDatabase tempIndexDatabase; 60 private boolean singleColumnIndex; 62 63 public TemporaryIndexIterator(_Iterator iterator0, 64 _ExpressionOrderValues order0, 65 CbCUsffWbmvfIboemfs btreeValueHandler0, 66 TempIndexDatabase tempIndexDatabase0) throws 67 DException { 68 super(iterator0); 69 order = order0; 70 status = -1; 71 btreeValueHandler = btreeValueHandler0; 72 tempIndexDatabase = tempIndexDatabase0; 73 singleColumnIndex=order.getColumns().length==1; } 75 76 public void setRowReader(_AllColumnRowReader rowReader0) throws DException { 77 rowReader = rowReader0; 78 } 79 80 public void setConditionVariableValue(_Reference[] references, 81 Object [] values, int priority) throws 82 DException { 83 84 if(underlyingRef!=null){ 85 references = GeneralPurposeStaticClass.getJointReferences(references,underlyingRef); 86 values = GeneralPurposeStaticClass.getJointValues(this, values,underlyingRef.length); 87 } 88 89 if (abstractBTreeValue != null) { 90 QualifiedIdentifier tableName = ( (TableKeyValue) abstractBTreeValue).getTableName(); 91 if (tableName != null) { 92 tempIndexDatabase.dropTable(tableName); 93 } 94 } 95 if (btree != null) { 96 ArrayList list = new ArrayList (5); 97 list.add(SystemTables.CLUSTERINFO); 98 _DatabaseUser user = tempIndexDatabase.getDatabaseUser(list); 99 btree.releaseResource(user,true); 100 user.writeToFile(); 101 } 102 103 btree = null; 104 order.setIterator(iterator); 105 order.setConditionVariableValue(references, values, priority); 106 iterator.setConditionVariableValue(references, values, priority); 107 108 } 109 110 public Object getColumnValues(_Reference references) throws DException { 111 return ( (Object []) getColumnValues(new _Reference[] {references}))[0]; 112 } 113 114 public Object getColumnValues(_Reference[] references) throws DException { 115 if (status != 0) 116 throw new DException("DSE2019", new Object [] {new Integer (status)}); 117 Object o = iterator.getColumnValues(references); 118 return o; 119 } 120 121 public void setKeyCount(Object [][] tableAndKeyCount) throws DException { 122 } 123 124 public boolean seekFromTop(_IndexPredicate[] condition) throws DException { 125 throw new UnsupportedOperationException ("METHOD NOT IMPLEMENTED"); 126 } 127 128 public boolean seekFromBottom(_IndexPredicate[] condition) throws DException { 129 throw new UnsupportedOperationException ("METHOD NOT IMPLEMENTED"); 130 } 131 132 public boolean first() throws DException { 133 if (btree == null) { 134 makeBTree(); 135 } 136 boolean isFirst =navigator.first() ? setKeyAndStatus(0, true, "first") : 137 setKeyAndStatus( -1, false, "first"); 138 if(isFirst){ 139 try { 140 allignUnderLineIterator(); 141 } catch (DException ex) { 142 if(ex.getDseCode().equalsIgnoreCase("DSE5518")) 143 return next(); 144 throw ex; 145 } 146 } 147 return isFirst; 148 } 149 150 public boolean last() throws DException { 151 if (btree == null) { 152 makeBTree(); 153 } 154 boolean isLast = navigator.last() ? setKeyAndStatus(0, true, "last") : 155 setKeyAndStatus(1, false, "last"); 156 if(isLast){ 157 try { 158 allignUnderLineIterator(); 159 } catch (DException ex) { 160 if(ex.getDseCode().equalsIgnoreCase("DSE5518")) 161 return previous(); 162 throw ex; 163 } 164 } 165 return isLast; 166 } 167 168 public boolean next() throws DException { 169 if (status != 0) { 170 return status == 1 ? false : first(); 171 } 172 boolean isNext = navigator.next() ? setKeyAndStatus(0, true, "next") : 173 setKeyAndStatus(1, false, "next"); 174 if(isNext){ 175 try { 176 allignUnderLineIterator(); 177 } catch (DException ex) { 178 if(ex.getDseCode().equalsIgnoreCase("DSE5518")) 179 return next(); 180 throw ex; 181 } 182 } 183 return isNext; 184 } 185 186 public boolean previous() throws DException { 187 if (status != 0) { 188 return status == -1 ? false : last(); 189 } 190 boolean isPrivious = navigator.previous() ? setKeyAndStatus(0, true, "previous") : 191 setKeyAndStatus( -1, false, "previous"); 192 if(isPrivious){ 193 try { 194 allignUnderLineIterator(); 195 } catch (DException ex) { 196 if(ex.getDseCode().equalsIgnoreCase("DSE5518")) 197 return previous(); 198 throw ex; 199 } 200 } 201 return isPrivious; 202 } 203 204 public Object getKey() throws DException { 205 if (status != 0) { 206 dumpStack = new Exception (" ::::::::: MOVE CALLED ::::::::" + status); 207 throw new DException("DSE2019", new Object [] {new Integer (status)}); 208 } 209 return ( (_IndexKey) navigator.getCurrentKey()).getKey(); 210 } 211 212 public void move(Object key) throws DException { 213 try { 214 if (key instanceof _IndexKey) { 215 _IndexKey bt = (_IndexKey) key; 216 navigator.move(bt); 217 Object obj = navigator.getValue(); iterator.move(obj); 219 status = 0; 220 } 221 else { 222 if (!seek(key)) { 223 btree.showBTree(); 224 throw new DException("DSE5518", null); 225 } 226 } 227 } 228 catch (ClassCastException cce) { 229 throw cce; 230 } 231 } 232 233 public Object getColumnValues(int[] columns) throws DException { 234 if (status != 0) { 235 throw new DException("DSE2019", new Object [] {new Integer (status)}); 236 } 237 return order.getOrderValues(null); } 239 240 public _Record getRecord() throws DException { 241 Object obj = navigator.getValue(); if (obj == null) 243 return null; 244 iterator.move(obj); 245 return iterator.getRecord(); 246 } 247 248 public boolean seek(Object indexKey) throws DException { 249 Object key = null; 250 if (btree == null) 251 makeBTree(); 252 try { 253 key = btree.seek(indexKey); 254 } 255 catch (ClassCastException ex) { 256 throw ex; 257 } 258 if (key != null){ 259 navigator.move(key); 260 try { 261 allignUnderLineIterator(); 262 } catch (DException ex) { 263 if(ex.getDseCode().equalsIgnoreCase("DSE5518")) 264 return false; 265 throw ex; 266 } 267 268 } 269 return key != null ? setKeyAndStatus(0, true, "SEEK") : false; 270 } 271 272 public _KeyColumnInformation[] getKeyColumnInformations() throws DException { 273 if (keyColumnInformation == null) { 274 boolean[] orders = order.getOrderOfColumns(); 275 ColumnDetails[] columnDetails = order.getKeyColumnDetails(); 276 int len = columnDetails.length; 277 keyColumnInformation = new _KeyColumnInformation[len]; 278 for (int i = 0; i < len; i++) { 279 keyColumnInformation[i] = new TableKeyColumnInformation(columnDetails[i], 280 orders[i]); 281 TableDetails table = columnDetails[i].getTable(); 282 keyColumnInformation[i].setTableDetails(table); 283 } 284 } 285 return keyColumnInformation; 286 } 287 288 public Object [] getUniqueColumnReference() throws DException { 289 return null; } 291 292 public SuperComparator getComparator() { 293 return btree.getComparator(); 294 } 295 296 public TableDetails[] getTableDetails() throws DException { 297 return iterator.getTableDetails(); 298 } 299 300 public _Iterator getBaseIterator(ColumnDetails column) throws DException { 301 return this; 302 } 303 304 public _Iterator getBaseIteratorHasRecord(ColumnDetails columnDetails) throws 305 DException { 306 return this; 307 } 308 309 public Object getColumnValues() throws DException { 310 if (status != 0) { 311 throw new DException("DSE2019", new Object [] {new Integer (status)}); 312 } 313 Object values = iterator.getColumnValues(); 314 return values; 315 } 316 317 public void setIterator(_Iterator iterator) throws DException { 318 319 throw new java.lang.UnsupportedOperationException ( 320 "Method setIterator() not yet implemented."); 321 } 322 323 public boolean seekFromBottomRelative(Object indexKey) throws DException { 324 if (btree == null) 325 makeBTree(); 326 _IndexKey key = (_IndexKey) btree.seekFromBottomRelative(navigator. 327 getCurrentKey(), indexKey); 328 if (key != null) { 329 move(key); 330 331 return true; 332 } 333 return false; 334 } 335 336 public boolean seekFromTopRelative(Object indexKey) throws DException { 337 if (btree == null) 338 makeBTree(); 339 _IndexKey key = (_IndexKey) btree.seekFromTopRelative(navigator. 340 getCurrentKey(), indexKey); 341 if (key != null) { 342 move(key); 343 return true; 344 } 345 return false; 346 } 347 348 public String toString() { 349 return "TemporaryIndexIterator[" + iterator + "][" + order + "]"; 350 } 351 352 public _Order getDefaultOrder() throws com.daffodilwoods.database.resource. 353 DException { 354 return iterator.getDefaultOrder(); 355 } 356 357 public void insert(Object parm1) throws com.daffodilwoods.database.resource. 358 DException { 359 ( (_TableOperations) iterator).insert(parm1); 360 } 361 362 public void update(Object parm1) throws com.daffodilwoods.database.resource. 363 DException { 364 ( (_TableOperations) iterator).update(parm1); 365 } 366 367 public void update(int[] parm1, Object [] parm2) throws com.daffodilwoods. 368 database.resource.DException { 369 ( (_TableOperations) iterator).update(parm1, parm2); 370 } 371 372 public void delete() throws com.daffodilwoods.database.resource.DException { 373 ( (_TableOperations) iterator).delete(); 374 } 375 376 public void insert(_DatabaseUser parm1, Object parm2) throws com. 377 daffodilwoods.database.resource.DException { 378 ( (_UserTableOperations) iterator).insert(parm1, parm2); 379 } 380 381 public void ensureRecordInMemory() throws com.daffodilwoods.database.resource. 382 DException { 383 ( (_IndexIteratorInfo) iterator).ensureRecordInMemory(); 384 } 385 386 public void moveOnActualKey(Object parm1) throws com.daffodilwoods.database. 387 resource.DException { 388 ( (_IndexIteratorInfo) iterator).moveOnActualKey(parm1); 389 } 390 391 public Object getActualKey() throws com.daffodilwoods.database.resource. 392 DException { 393 return ( (_IndexIteratorInfo) iterator).getActualKey(); 394 } 395 396 public void update(_DatabaseUser parm1, Object parm2) throws com. 397 daffodilwoods.database.resource.DException { 398 ( (_UserTableOperations) iterator).update(parm1, parm2); 399 } 400 401 public void update(_DatabaseUser parm1, int[] parm2, Object [] parm3) throws 402 com.daffodilwoods.database.resource.DException { 403 ( (_UserTableOperations) iterator).update(parm1, parm2, parm3); 404 } 405 406 public void delete(_DatabaseUser parm1) throws com.daffodilwoods.database. 407 resource.DException { 408 ( (_UserTableOperations) iterator).delete(parm1); 409 } 410 411 public int getBtreeIndex() throws DException { 412 return ( (_IndexIteratorInfo) iterator).getBtreeIndex(); 413 } 414 415 public void setKeyColumnInformation(_KeyColumnInformation[] 416 keyColumnInformation) { 417 this.keyColumnInformation = keyColumnInformation; } 419 420 public boolean locateKey(Object key1, boolean top) throws DException { 421 _IndexKey key = null; 422 try { 423 key = (_IndexKey) btree.locateKey(key1, top); 424 } 425 catch (ClassCastException ex) { 426 throw ex; 427 } 428 return key != null ? setKeyAndStatus(0, true, "LOCATE KEY") : false; 429 } 430 431 public _ExecutionPlan getExecutionPlan() throws DException { 432 _ExecutionPlan cplan = iterator.getExecutionPlan(); 433 _ExecutionPlan cplans[] = cplan == null ? null : new _ExecutionPlan[] { 434 cplan}; 435 _IndexInformation iinf = new IndexInformations(order.getColumns(),tempIndexDatabase.getVersionHandler()); 436 ExecutionPlan plan = new ExecutionPlan("TemporaryIndexIterator", cplans, null, null, 437 getIndexName(iinf)); 438 return plan; 439 } 440 441 private void makeBTree() throws DException { 442 btree = tempIndexDatabase.makeBTree(this); 443 navigator = btree.getNavigator(); 444 } 445 446 public SuperComparator getObjectComparator() { 447 throw new UnsupportedOperationException ("Method not implemented"); 448 } 449 450 private String getIndexName(_IndexInformation indexInformation) throws 451 DException { 452 String indexName = ""; 453 String [] columns = indexInformation.getColumns(); 454 boolean[] order = indexInformation.getOrderOfColumns(); 455 for (int i = 0, length = columns.length; i < length; i++) { 456 indexName += columns[i] + " " + (order[i] ? " ASC ," : " DESC ,"); 457 } 458 return indexName; 459 } 460 461 public void updateRow(_Iterator baseIterator, int[] columns, Object [] values) throws 462 com.daffodilwoods.database.resource.DException { 463 464 484 btree = null; 485 makeBTree(); 486 487 } 488 489 public void insertRow(Object row) throws com.daffodilwoods.database.resource. 490 DException { 491 497 btree = null; 498 makeBTree(); 499 } 500 501 public void deleteRow(_Iterator iterator) throws com.daffodilwoods.database. 502 resource.DException { 503 504 519 btree = null; 520 makeBTree(); 521 } 522 523 public _Iterator getIterator(Object key) throws com.daffodilwoods.database. 524 resource.DException { 525 if (btree == null) { 526 makeBTree(); 527 } 528 return new SingleRowIterator(iterator, key); 529 } 530 531 public _Iterator getPartialIterator(Object key) throws com.daffodilwoods. 532 database.resource.DException { 533 if (btree == null) { 534 makeBTree(); 535 } 536 return new SingleRowIterator(iterator, key); 537 } 538 539 public static boolean test = false; 540 public void replaceRow(_Iterator iterator, Object row) throws com. 541 daffodilwoods.database.resource.DException { 542 btree = null; 543 makeBTree(); 544 } 545 546 public boolean seekKeyAddress(Object parm1) throws com.daffodilwoods.database. 547 resource.DException { 548 549 throw new java.lang.UnsupportedOperationException ( 550 "Method seekKeyAddress() not yet implemented."); 551 } 552 553 public Object getPhysicalAddress() throws com.daffodilwoods.database.resource. 554 DException { 555 556 throw new java.lang.UnsupportedOperationException ( 557 "Method getPhysicalAddress() not yet implemented."); 558 } 559 560 public boolean isRefreshType() { 561 return true; 562 } 563 564 public void refreshDataSource() throws DException { 565 Object key = null; 566 if (status == 0) { 567 key = getKey(); 568 } 569 btree = null; 570 makeBTree(); 571 if (key != null) { 572 btree.seekFromTopRelative(null, key); 573 574 575 } 576 } 577 578 public Object getUpdatedEffect(_Reference[] references, Object [] values) throws 579 DException { 580 581 throw new UnsupportedOperationException ("getUpdatedEffect() Not Supported"); 582 } 583 584 public ExecutionPlanForBrowser getExecutionPlanForBrowser() throws DException { 585 ExecutionPlanForBrowser cplan = iterator.getExecutionPlanForBrowser(); 586 ExecutionPlanForBrowser cplans[] = cplan == null ? null : 587 new ExecutionPlanForBrowser[] { 588 cplan}; 589 _IndexInformation iinf = new IndexInformations(order.getColumns(),tempIndexDatabase.getVersionHandler()); 590 ExecutionPlanForBrowser plan = new ExecutionPlanForBrowser("Sorting", 591 "TemporaryIndexIterator", cplans, null, null, getIndexName(iinf)); 592 return plan; 593 } 594 595 public Object [][] getFunctionalColumnMapping() throws DException { 596 return iterator.getFunctionalColumnMapping(); 597 } 598 599 public _IndexInformation[] getUniqueInformation() throws DException { 600 throw new UnsupportedOperationException ("getUniqueInformation"); 601 } 602 603 public _TableCharacteristics getTableCharacteristics() throws DException { 604 throw new UnsupportedOperationException ("getTableCharacteristics"); 605 606 } 607 608 public Object getColumnValues(int int0) throws DException { 609 throw new UnsupportedOperationException ("getColumnValues"); 610 } 611 612 public _OrderCount getOrderCounts() throws com.daffodilwoods.database. 613 resource.DException { 614 _Order tempOrder = order.getOrder(); ColumnDetails[] cd = tempOrder.getKeyColumnDetails(); 616 boolean[] b = tempOrder.getOrderOfColumns(); 617 ColumnDetails[] result = new ColumnDetails[] { 618 cd[0]}; 619 boolean[] orderType = new boolean[] { 620 b[0]}; 621 int i = 1; 622 for (int length = cd.length; i < length; i++) { 623 if (cd[i].getAppropriateColumn().equalsIgnoreCase(SystemFields.systemFields[ 624 SystemFields.rowId])) { 625 break; 626 } 627 else { 628 ColumnDetails[] temp = new ColumnDetails[i + 1]; 629 boolean[] tem = new boolean[i + 1]; 630 System.arraycopy(result, 0, temp, 0, i); 631 System.arraycopy(orderType, 0, tem, 0, i); 632 temp[i] = cd[i]; 633 tem[i] = b[i]; 634 result = temp; 635 orderType = tem; 636 } 637 } 638 return new OrderCount(i, new SelectOrder(result, orderType)); 639 } 640 641 protected boolean setKeyAndStatus(int num, boolean flag, String str) throws 642 DException { 643 status = num; 644 return flag; 645 } 646 647 public FieldBase field(_Reference reference) throws com.daffodilwoods. 648 database.resource.DException { 649 return ( (FieldBase[]) fields(new _Reference[] {reference}))[0]; 650 } 651 652 public FieldBase[] fields(_Reference[] references) throws com.daffodilwoods. 653 database.resource.DException { 654 if (status != 0) 655 throw new DException("DSE2019", new Object [] {new Integer (status)}); 656 FieldBase[] o1 = iterator.fields(references); 657 return o1; 658 } 659 660 public FieldBase[] fields(int[] columns) throws com.daffodilwoods.database. 661 resource.DException { 662 throw new java.lang.UnsupportedOperationException ( 663 "Method fields() not yet implemented."); 664 } 665 666 public FieldBase field(int column) throws DException { 667 668 throw new java.lang.UnsupportedOperationException ( 669 "Method field() not yet implemented."); 670 } 671 672 public void releaseResource() throws DException { 673 iterator.releaseResource(); 674 order.releaseResource(); 675 } 676 677 public _ExpressionOrderValues getOrder() throws DException { 678 return order; 679 } 680 681 public _Iterator getUnderlyingIterator() throws DException { 682 return iterator; 683 } 684 685 public void setAbstractBtreeValue(_AbstractBTreeValue abstractBTreeValue0) { 686 abstractBTreeValue = abstractBTreeValue0; 687 } 688 689 public CbCUsffWbmvfIboemfs getBtreeValueHandler() { 690 return btreeValueHandler; 691 } 692 693 public _AbstractBTreeValue getAbstractBtreeValue() { 694 return abstractBTreeValue; 695 } 696 697 public TempIndexDatabase getTempIndexDatabase() { 698 return tempIndexDatabase; 699 } 700 701 public _Index getBtree() { 702 return btree; 703 } 704 705 public byte[] getByteKey() throws DException { 706 BufferRange[] columnValues = (BufferRange[]) getKey(); 707 int numberOfColumns = columnValues.length; 708 int totalLengthOfKey = numberOfColumns * SessionIterator.LENGTH + 709 SessionIterator.LENGTH; 710 for (int i = 0; i < numberOfColumns; i++) { 711 totalLengthOfKey += columnValues[i].getLength(); 712 } 713 byte[] byteKey = new byte[totalLengthOfKey]; 714 int pointer = 0; 715 System.arraycopy(CCzufDpowfsufs.getBytes( (short) numberOfColumns), 0, 716 byteKey, pointer, SessionIterator.LENGTH); 717 pointer += SessionIterator.LENGTH; 718 for (int i = 0; i < numberOfColumns; i++) { 719 short length = 0; 720 byte[] columnValue = new byte[] {}; 721 if (!columnValues[i].getNull()) { 722 columnValue = columnValues[i].getBytes(); 723 length = (short) columnValue.length; 724 } 725 System.arraycopy(CCzufDpowfsufs.getBytes(length), 0, byteKey, pointer, 726 SessionIterator.LENGTH); 727 pointer += SessionIterator.LENGTH; 728 System.arraycopy(columnValue, 0, byteKey, pointer, length); 729 pointer += length; 730 } 731 return byteKey; 732 } 733 734 public void moveByteKey(byte[] key) throws DException { 735 int pointer = 0; 736 int numberOfColumns = CCzufDpowfsufs.getShortValue(key, pointer); 737 pointer += SessionIterator.LENGTH; 738 BufferRange[] columnValues = new BufferRange[numberOfColumns]; 739 for (int i = 0; i < numberOfColumns; i++) { 740 int columnLength = CCzufDpowfsufs.getShortValue(key, pointer); 741 pointer += SessionIterator.LENGTH; 742 byte[] b = new byte[columnLength]; 743 System.arraycopy(key, pointer, b, 0, columnLength); 744 BufferRange buffer = null; 745 if (columnLength == 0) 746 columnValues[i] = FieldUtility.NULLBUFFERRANGE; 747 else 748 columnValues[i] = new BufferRange(b, 0, columnLength); 749 pointer += columnLength; 750 } 751 move(columnValues); 752 } 753 754 795 796 protected void finalize() { 797 if (btree instanceof DummyBTree) 798 return; 799 800 if (btree != null) { 801 QualifiedIdentifier tableName = null; 802 if (abstractBTreeValue != null) 803 tableName = ( (TableKeyValue) abstractBTreeValue).getTableName(); 804 tempIndexDatabase.putTempBTree(btree,tableName); 805 806 } 807 808 } 809 private void allignUnderLineIterator()throws DException{ 810 Object obj = navigator.getValue(); 811 Object o1 = abstractBTreeValue.getColumnValues(obj); 812 iterator.moveByteKey( (byte[]) o1); 813 } 814 public void deleteBlobClobRecord(_DatabaseUser user) throws com.daffodilwoods.database.resource.DException { 815 ( (_TableOperations) iterator).deleteBlobClobRecord(user) ; 816 } 817 818 819 } 820 | Popular Tags |