public abstract class AbstractDBDataModel extends AbstractDataModel
限定符和类型 | 字段和说明 |
---|---|
protected ColumnInformation[] |
columnInformations |
protected java.sql.Connection |
connection |
protected Connection |
database |
protected Dialect |
dialect |
protected java.util.Set |
registedDBTableData |
protected java.sql.ResultSet |
resultSet |
protected int |
shortcutRowCount |
protected java.lang.String |
sql |
protected java.sql.Statement |
statement |
NOT_CONTAINS
COLUMN_NAME_NOT_FOUND, EMPTY_DATAMODEL
限定符 | 构造器和说明 |
---|---|
protected |
AbstractDBDataModel() |
protected |
AbstractDBDataModel(Connection database,
java.lang.String sql) |
限定符和类型 | 方法和说明 |
---|---|
void |
finalize()
资源释放
|
int |
getColumnCount()
获取数据集模型中数据的列数
|
java.lang.String |
getColumnName(int columnIndex)
获取数据集模型中指定列的列名
注意:列名必须是唯一的
|
protected void |
initConnectionAndResultAndCheckInColumns()
初始化ConnectionAndResult
alex:initRowValueStatus();初始化数据状态
原来这条语句是在这个方法最上面调用的,为什么放到这最下面呢?
|
protected abstract void |
initRowValueStatus() |
boolean |
isCheckRowOver()
获取是否遍历完数据状态
|
protected void |
iterateResultSet(IterateResultSetListener listener) |
java.lang.Object[] |
iterateResultSet4Group(int[] column_index_array,
int function_group_end,
Grouper[] grouper_array)
分组中预处理数据, 返回的不是ResultSet, 而是已分好组的数据模型.
|
void |
register(SharedDBDataModel resultSet)
注册共享数据
|
void |
release()
释放资源文件
|
protected void |
releaseConnection() |
protected void |
setCheckRowOverState(boolean isCheckRowOver)
设置是否遍历完数据状态
|
void |
setTimeoutSeconds(int seconds) |
protected int |
shortcutGetRowCount() |
void |
tryDestroy()
毁掉这个TableDataAdapter,包括释放连接 + 清空数据
|
void |
unRegister(SharedDBDataModel resultSet)
移除共享数据集
|
getColumnIndex, getDataIterator, getIteratorDataByColumn, getMetric, hasRow
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRowCount, getValueAt
protected java.util.Set registedDBTableData
protected Connection database
protected java.lang.String sql
protected transient java.sql.Connection connection
protected transient java.sql.Statement statement
protected transient java.sql.ResultSet resultSet
protected transient ColumnInformation[] columnInformations
protected transient Dialect dialect
protected transient int shortcutRowCount
protected AbstractDBDataModel()
protected AbstractDBDataModel(Connection database, java.lang.String sql)
public void setTimeoutSeconds(int seconds)
public final void register(SharedDBDataModel resultSet)
resultSet
- 共享数据public final void unRegister(SharedDBDataModel resultSet)
resultSet
- 共享数据public int getColumnCount() throws TableDataException
DataModel
TableDataException
public java.lang.String getColumnName(int columnIndex) throws TableDataException
DataModel
columnIndex
- 列索引,第一列为0,第二列为1,依次类推TableDataException
protected void iterateResultSet(IterateResultSetListener listener) throws java.lang.Exception
java.lang.Exception
public java.lang.Object[] iterateResultSet4Group(int[] column_index_array, int function_group_end, Grouper[] grouper_array) throws java.lang.Exception
column_index_array
- 列序列function_group_end
- 分组结束grouper_array
- 分组队列java.lang.Exception
protected abstract void initRowValueStatus()
protected void initConnectionAndResultAndCheckInColumns() throws TableDataException
protected int shortcutGetRowCount()
public final void tryDestroy() throws java.sql.SQLException
java.sql.SQLException
public void release() throws java.sql.SQLException
release
在接口中 DataModel
release
在类中 AbstractDataModel
java.sql.SQLException
protected void releaseConnection() throws java.sql.SQLException
java.sql.SQLException
public void finalize() throws java.lang.Throwable
finalize
在类中 java.lang.Object
java.lang.Throwable
public boolean isCheckRowOver()
protected void setCheckRowOverState(boolean isCheckRowOver)
isCheckRowOver
- true表示遍历完
false表示未遍历完