View Javadoc
1 /* 2 * Angkor Web Framework 3 * 4 * Distributable under LGPL license. 5 * See terms of license at gnu.org. 6 */ 7 8 package com.tirsen.angkor.table; 9 10 /*** 11 * <!-- $Id: AbstractTableDataAccess.java,v 1.3 2002/10/09 21:37:37 tirsen Exp $ --> 12 * <!-- $Author: tirsen $ --> 13 * 14 * @author Jon Tirs´n (tirsen@users.sourceforge.net) 15 * @version $Revision: 1.3 $ 16 */ 17 public abstract class AbstractTableDataAccess implements TableDataAccess 18 { 19 protected int rangeStart; 20 protected int rangeEnd; 21 private int count = -1; 22 23 /*** 24 * Should be called from the implementation of {@link #load} when the actual number of rows are initially known. 25 */ 26 protected void setRowCount(int count) 27 { 28 this.count = count; 29 } 30 31 public int getRowCount() 32 { 33 if (count == -1) throw new IllegalStateException("Tried to access row-count before initial load."); 34 return count; 35 } 36 37 public void setRange(int from, int to) 38 { 39 rangeStart = from; 40 rangeEnd = to; 41 } 42 }

This page was automatically generated by Maven