1 21 22 package org.apache.derby.impl.store.access.conglomerate; 23 24 import org.apache.derby.iapi.services.sanity.SanityManager; 25 26 import org.apache.derby.iapi.store.raw.ContainerHandle; 27 import org.apache.derby.iapi.store.raw.Page; 28 import org.apache.derby.iapi.store.raw.RecordHandle; 29 30 36 37 public class RowPosition 38 { 39 43 public Page current_page; 44 public RecordHandle current_rh; 45 public int current_slot; 46 public boolean current_rh_qualified; 47 public long current_pageno; 48 49 53 public RowPosition() 54 { 55 } 56 57 61 62 66 67 public void init() 68 { 69 current_page = null; 70 current_rh = null; 71 current_slot = Page.INVALID_SLOT_NUMBER; 72 current_rh_qualified = false; 73 current_pageno = ContainerHandle.INVALID_PAGE_NUMBER; 74 } 75 76 public final void positionAtNextSlot() 77 { 78 current_slot++; 79 current_rh = null; 80 } 81 82 public final void positionAtPrevSlot() 83 { 84 current_slot--; 85 current_rh = null; 86 } 87 88 public void unlatch() 89 { 90 if (current_page != null) 91 { 92 current_page.unlatch(); 93 current_page = null; 94 } 95 current_slot = Page.INVALID_SLOT_NUMBER; 96 } 97 98 public String toString() 99 { 100 String ret_string = null; 101 102 if (SanityManager.DEBUG) 103 { 104 ret_string = 105 ";current_slot=" + current_slot + 106 ";current_rh=" + current_rh + 107 ";current_pageno=" + current_pageno + 108 ";current_page=" + 109 (current_page == null ? 110 "null" : String.valueOf(current_page.getPageNumber())); 111 112 } 114 115 return(ret_string); 116 } 117 118 122 } 123 | Popular Tags |