java返回datatable_(转)在JAVA实现DataTable对象(三)——DataTable对象实现

1: import java.util.ArrayList;

2: import java.util.List;

3:

6:

7: public final class DataTable {

8:

9: private DataRowCollection rows; //用于保存DataRow的集合对象

10: private DataColumnCollection columns; //用于保存DataColumn的对象

11: private String tableName; //表名

12: private boolean readOnly = false;

13: private int nextRowIndex = 0;

14: private DataExpression dataExpression;

15: private Object tag;

16:

17: public DataTable() {

18: this.columns = new DataColumnCollection();

19: this.rows = new DataRowCollection();

20: this.rows.setColumns(columns);

21: dataExpression = new DataExpression(this);

22: }

23:

24: public DataTable(String dataTableName) {

25: this();

26: this.tableName = dataTableName;

27: }

28:

29: public int getTotalCount() {

30: return rows.size();

31: }

32:

33: public boolean isReadOnly() {

34: return this.readOnly;

35: }

36:

37: public void setReadOnly(boolean readOnly) {

38: this.readOnly = readOnly;

39: }

40:

41: /**

42: * 功能描述: 返回表名

43: * @param

44: */

45: public String getTableName() {

46: return this.tableName;

47: }

48:

49: /**

50: * 功能描述:

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值