public abstract class AbstractQueryDataModel extends AbstractDataModel
限定符和类型 | 字段和说明 |
---|---|
static CalculatorKey |
DATA_PAGE_SIZE_KEY |
NOT_CONTAINS
COLUMN_NAME_NOT_FOUND, EMPTY_DATAMODEL
构造器和说明 |
---|
AbstractQueryDataModel(int pageSize) |
限定符和类型 | 方法和说明 |
---|---|
protected abstract java.lang.String |
createPageQuery(int rowIndex)
生成该页的查询语句,并更新起始行索引
|
protected abstract void |
doQuery(java.lang.String queryStatement)
查询当页结果集
|
int |
getPageSize() |
int |
getResultSetRowCount() |
int |
getStartRow() |
protected abstract int |
getTotalRowCount()
从数据源获取该查询的记录条数
|
boolean |
hasRow(int rowIndex)
检查数据集是否存在指定索引的行
|
boolean |
hasRow4QueryCondition(int rowIndex)
根据是否已查询该页数据、行索引是否超出该页范围来判断,是否需要生成查询语句
|
java.lang.String |
hasRow4QueryConditionAction(int rowIndex)
根据当前偏移量生成当页查询语句
|
boolean |
needPaging() |
int |
offsetRowIndex2Get(int rowIndex) |
void |
setPageSize(int pageSize) |
void |
setResultSetRowCount(int resultSetRowCount) |
void |
setStartRow(int startRow) |
getColumnIndex, getDataIterator, getIteratorDataByColumn, getMetric, release
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getColumnCount, getColumnName, getRowCount, getValueAt
public static final CalculatorKey DATA_PAGE_SIZE_KEY
public int getStartRow()
public void setStartRow(int startRow)
public int getPageSize()
public void setPageSize(int pageSize)
public int getResultSetRowCount()
public void setResultSetRowCount(int resultSetRowCount)
public boolean needPaging()
public boolean hasRow(int rowIndex)
AbstractDataModel
hasRow
在接口中 DataModel
hasRow
在类中 AbstractDataModel
rowIndex
- 行的索引,第一行为0,第二行为1,依此类推protected abstract int getTotalRowCount()
protected abstract void doQuery(java.lang.String queryStatement)
protected abstract java.lang.String createPageQuery(int rowIndex)
rowIndex
- 当前行索引public int offsetRowIndex2Get(int rowIndex)
public java.lang.String hasRow4QueryConditionAction(int rowIndex)
rowIndex
- 行索引public boolean hasRow4QueryCondition(int rowIndex)
rowIndex
- 行偏移量