Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 22 23 package org.xquark.mapper.storage; 24 25 import java.sql.SQLException ; 26 27 import org.xquark.mapper.dbms.TableInfo; 28 29 33 public abstract class QueryExtraDataExplorer extends ExtraDataExplorer 34 { 35 private static final String RCSRevision = "$Revision: 1.1 $"; 36 private static final String RCSName = "$Name: $"; 37 38 protected int currentSubPathIndex = -2; 39 protected int subPathIndex = -1; 40 protected boolean currentResultExhausted = true; 41 42 public QueryExtraDataExplorer(TableInfo tableInfo) 43 { 44 super(tableInfo); 45 } 46 47 void freezeCurrentSubPath() 48 { 49 currentSubPathIndex++; 50 updateResultSegmentationFlag(); 51 } 52 53 public void reset() throws SQLException  54 { 55 super.reset(); 56 currentSubPathIndex = -2; 57 subPathIndex = -1; 58 currentResultExhausted = true; 59 } 60 61 public short getPath() 62 { 63 if (resultActive()) 64 return super.getPath(); 65 else 66 return -2; 67 } 68 69 public long getUOID() 70 { 71 if (resultActive()) 72 return super.getUOID(); 73 else 74 return -1; 75 } 76 77 protected void updateResultSegmentationFlag() 78 { 79 currentResultExhausted = (currentSubPathIndex != subPathIndex); 80 } 81 82 boolean resultActive() 83 { 84 return notExhausted && !currentResultExhausted; 85 } 86 } 87
| Popular Tags
|