4f856aab47186ee89e2de3672873115e2a6e96cd.svn-base 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. package com.sysmodel.listmodel.xmlmodel.impl;
  2. import java.util.ArrayList;
  3. import com.sysmodel.listmodel.xmlmodel.able.ListField;
  4. import com.sysmodel.listmodel.xmlmodel.able.QueryList;
  5. import com.sysmodel.xformmodel.able.Validate;
  6. import com.sysmodel.xformmodel.impl.ValidateImpl;
  7. public class QueryListImpl implements QueryList, Cloneable{
  8. /**
  9. * 列表是否有序号 true有/false没有
  10. */
  11. private boolean haveOrder = false;
  12. /**
  13. * 列表宽度
  14. */
  15. private int pageSize = 0;
  16. /**
  17. * 要查询的表 例如:tb_test1,tb_test2
  18. */
  19. private String tableList = "";
  20. /**
  21. * 查询条件 tb_test1.Name='1'
  22. */
  23. private String condition = "";
  24. /**
  25. * 排序字段 order by tb_test1.fd_name
  26. */
  27. private String orderBy = "";
  28. /**
  29. * 列表的实体,(数据表)
  30. */
  31. private ArrayList<ListFieldImpl> listFields = new ArrayList<ListFieldImpl>();
  32. /**
  33. * 校验信息
  34. */
  35. private Validate Validate = new ValidateImpl();
  36. /**
  37. * 列表列数
  38. */
  39. private int columnCount = 0;
  40. private String checkboxOrradio = null;
  41. private boolean isCheckbox = false;
  42. public String getCondition() {
  43. return condition;
  44. }
  45. public void setCondition(String condition) {
  46. this.condition = condition;
  47. }
  48. public boolean isHaveOrder() {
  49. return haveOrder;
  50. }
  51. public void setHaveOrder(boolean haveOrder) {
  52. this.haveOrder = haveOrder;
  53. }
  54. public int getPageSize() {
  55. return pageSize;
  56. }
  57. public void setPageSize(int pageSize) {
  58. this.pageSize = pageSize;
  59. }
  60. public String getTableList() {
  61. return tableList;
  62. }
  63. public void setTableList(String tableList) {
  64. this.tableList = tableList;
  65. }
  66. public String getOrderBy() {
  67. return orderBy;
  68. }
  69. public void setOrderBy(String orderBy) {
  70. this.orderBy = orderBy;
  71. }
  72. public ArrayList<ListFieldImpl> getlistFields() {
  73. return listFields;
  74. }
  75. public boolean isCheckbox() {
  76. return isCheckbox;
  77. }
  78. public void setCheckbox(boolean isCheckbox) {
  79. this.isCheckbox = isCheckbox;
  80. }
  81. public ArrayList<ListFieldImpl> getlistFieldsByType(String type) {
  82. ArrayList<ListFieldImpl> list = new ArrayList<ListFieldImpl>();
  83. for (int i = 0; i < listFields.size(); i++) {
  84. ListFieldImpl ListFieldImpl = (ListFieldImpl) listFields.get(i);
  85. if (ListFieldImpl.getShowType().equals(type)) {
  86. list.add(ListFieldImpl);
  87. }
  88. }
  89. return list;
  90. }
  91. public void setlistFields(ArrayList<ListFieldImpl> listEntity) {
  92. this.listFields = listEntity;
  93. }
  94. public void addListField(ListField ListField) {
  95. this.listFields.add((ListFieldImpl) ListField);
  96. }
  97. public int getColumnCount() {
  98. return columnCount;
  99. }
  100. public String getCheckboxOrradio() {
  101. return checkboxOrradio;
  102. }
  103. public void setCheckboxOrradio(String checkboxOrradio) {
  104. this.checkboxOrradio = checkboxOrradio;
  105. }
  106. public Object clone() {
  107. QueryListImpl o = null;
  108. ArrayList<ListFieldImpl> tListFields = new ArrayList<ListFieldImpl>();
  109. try {
  110. o = (QueryListImpl) super.clone();
  111. } catch (CloneNotSupportedException e) {
  112. e.printStackTrace();
  113. }
  114. for (int i = 0; i < listFields.size(); i++) {
  115. ListFieldImpl temp1 = (ListFieldImpl) listFields.get(i);
  116. ListFieldImpl temp2 = (ListFieldImpl) temp1.clone();
  117. tListFields.add(temp2);
  118. }
  119. o.listFields = tListFields;
  120. return o;
  121. }
  122. public Validate getValidate() {
  123. return Validate;
  124. }
  125. public void setValidate(Validate validate) {
  126. Validate = validate;
  127. }
  128. }