|
|||||||||||||||||||
| Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover. | |||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| AbstractTableDataAccess.java | 0% | 0% | 0% | 0% |
|
||||||||||||||
| 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 | 0 |
protected void setRowCount(int count) |
| 27 |
{
|
|
| 28 | 0 |
this.count = count; |
| 29 |
} |
|
| 30 |
|
|
| 31 | 0 |
public int getRowCount() |
| 32 |
{
|
|
| 33 | 0 |
if (count == -1) throw new IllegalStateException("Tried to access row-count before initial load.");
|
| 34 | 0 |
return count; |
| 35 |
} |
|
| 36 |
|
|
| 37 | 0 |
public void setRange(int from, int to) |
| 38 |
{
|
|
| 39 | 0 |
rangeStart = from; |
| 40 | 0 |
rangeEnd = to; |
| 41 |
} |
|
| 42 |
} |
|
| 43 |
|
|
||||||||||