1 46 package org.bsf.remoteIterator.common; 47 48 import java.io.Serializable ; 49 import java.util.ArrayList ; 50 import java.util.List ; 51 52 57 public class RemoteIteratorResultTable implements Serializable { 58 public static final int RESULT_TABLE_DEFAULT_INITIAL_SIZE = 100; 59 60 private boolean _isLast; 62 private boolean _isFirst; 63 private boolean _isBeforeFirst; 64 private boolean _isAlreadyLast; 65 66 private List _rows; 68 69 private List _rowIndexes; 71 72 76 86 public RemoteIteratorResultTable() { 87 _rows = new ArrayList ( RESULT_TABLE_DEFAULT_INITIAL_SIZE ); 88 _rowIndexes = new ArrayList ( RESULT_TABLE_DEFAULT_INITIAL_SIZE ); 89 } 90 91 101 public RemoteIteratorResultTable( int p_initialSize ) { 102 _rows = new ArrayList ( p_initialSize ); 103 _rowIndexes = new ArrayList ( p_initialSize ); 104 } 105 106 110 118 public int getSize() { 119 return _rows.size(); 120 } 121 122 public boolean isFirst() { 123 return _isFirst; 124 } 125 126 public void setFirst( boolean p_first ) { 127 _isFirst = p_first; 128 } 129 130 public boolean isLast() { 131 return _isLast; 132 } 133 134 public void setLast( boolean p_last ) { 135 _isLast = p_last; 136 } 137 138 public boolean isAlreadyLast() { 139 return _isAlreadyLast; 140 } 141 142 public void setAlreadyLast( boolean p_alreadyLast ) { 143 _isAlreadyLast = p_alreadyLast; 144 } 145 146 public boolean isBeforeFirst() { 147 return _isBeforeFirst; 148 } 149 150 public void setBeforeFirst( boolean p_beforeFirst ) { 151 _isBeforeFirst = p_beforeFirst; 152 } 153 154 public List getRows() { 155 return _rows; 156 } 157 158 public List getRowIndexes() { 159 return _rowIndexes; 160 } 161 162 167 public void addRow( List p_rows, Integer p_rowsPosition ) { 168 _rows.add( p_rows ); 169 _rowIndexes.add( p_rowsPosition ); 170 } 171 172 } 173 | Popular Tags |