--- /dev/null
+/*\r
+\r
+ Derby - Class org.apache.derby.impl.store.access.conglomerate.RowPosition\r
+\r
+ Licensed to the Apache Software Foundation (ASF) under one or more\r
+ contributor license agreements. See the NOTICE file distributed with\r
+ this work for additional information regarding copyright ownership.\r
+ The ASF licenses this file to you under the Apache License, Version 2.0\r
+ (the "License"); you may not use this file except in compliance with\r
+ the License. You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+\r
+ */\r
+\r
+package org.apache.derby.impl.store.access.conglomerate;\r
+\r
+import org.apache.derby.iapi.services.sanity.SanityManager;\r
+\r
+import org.apache.derby.iapi.store.raw.ContainerHandle;\r
+import org.apache.derby.iapi.store.raw.Page;\r
+import org.apache.derby.iapi.store.raw.RecordHandle;\r
+\r
+/**\r
+\r
+Just an easy way to pass information back and forth about current position of\r
+a row in a table.\r
+\r
+**/\r
+\r
+public class RowPosition\r
+{\r
+ /**************************************************************************\r
+ * Fields of the class\r
+ **************************************************************************\r
+ */\r
+ public Page current_page; \r
+ public RecordHandle current_rh;\r
+ public int current_slot;\r
+ public boolean current_rh_qualified;\r
+ public long current_pageno;\r
+\r
+ /**************************************************************************\r
+ * Constructors for This class:\r
+ **************************************************************************\r
+ */\r
+ public RowPosition()\r
+ {\r
+ }\r
+\r
+ /**************************************************************************\r
+ * Private/Protected methods of This class:\r
+ **************************************************************************\r
+ */\r
+\r
+ /**************************************************************************\r
+ * Public Methods of This class:\r
+ **************************************************************************\r
+ */\r
+\r
+ public void init()\r
+ {\r
+ current_page = null;\r
+ current_rh = null;\r
+ current_slot = Page.INVALID_SLOT_NUMBER;\r
+ current_rh_qualified = false;\r
+ current_pageno = ContainerHandle.INVALID_PAGE_NUMBER;\r
+ }\r
+\r
+ public final void positionAtNextSlot()\r
+ {\r
+ current_slot++;\r
+ current_rh = null;\r
+ }\r
+\r
+ public final void positionAtPrevSlot()\r
+ {\r
+ current_slot--;\r
+ current_rh = null;\r
+ }\r
+\r
+ public void unlatch()\r
+ {\r
+ if (current_page != null)\r
+ {\r
+ current_page.unlatch();\r
+ current_page = null;\r
+ }\r
+ current_slot = Page.INVALID_SLOT_NUMBER;\r
+ }\r
+\r
+ public String toString()\r
+ {\r
+ String ret_string = null;\r
+\r
+ if (SanityManager.DEBUG)\r
+ {\r
+ ret_string = \r
+ ";current_slot=" + current_slot +\r
+ ";current_rh=" + current_rh +\r
+ ";current_pageno=" + current_pageno +\r
+ ";current_page=" + \r
+ (current_page == null ? \r
+ "null" : String.valueOf(current_page.getPageNumber()));\r
+\r
+ // ";current_page=" + current_page;\r
+ }\r
+\r
+ return(ret_string);\r
+ }\r
+\r
+ /**************************************************************************\r
+ * Public Methods of XXXX class:\r
+ **************************************************************************\r
+ */\r
+}\r