123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- package com.sysmodel.listmodel.xmlmodel.impl;
- import java.util.ArrayList;
- import com.sysmodel.listmodel.xmlmodel.able.ListField;
- import com.sysmodel.listmodel.xmlmodel.able.QueryList;
- import com.sysmodel.xformmodel.able.Validate;
- import com.sysmodel.xformmodel.impl.ValidateImpl;
- public class QueryListImpl implements QueryList, Cloneable{
- /**
- * 列表是否有序号 true有/false没有
- */
- private boolean haveOrder = false;
- /**
- * 列表宽度
- */
- private int pageSize = 0;
- /**
- * 要查询的表 例如:tb_test1,tb_test2
- */
- private String tableList = "";
- /**
- * 查询条件 tb_test1.Name='1'
- */
- private String condition = "";
- /**
- * 排序字段 order by tb_test1.fd_name
- */
- private String orderBy = "";
- /**
- * 列表的实体,(数据表)
- */
- private ArrayList<ListFieldImpl> listFields = new ArrayList<ListFieldImpl>();
- /**
- * 校验信息
- */
- private Validate Validate = new ValidateImpl();
- /**
- * 列表列数
- */
- private int columnCount = 0;
- private String checkboxOrradio = null;
- private boolean isCheckbox = false;
- public String getCondition() {
- return condition;
- }
- public void setCondition(String condition) {
- this.condition = condition;
- }
- public boolean isHaveOrder() {
- return haveOrder;
- }
- public void setHaveOrder(boolean haveOrder) {
- this.haveOrder = haveOrder;
- }
- public int getPageSize() {
- return pageSize;
- }
- public void setPageSize(int pageSize) {
- this.pageSize = pageSize;
- }
- public String getTableList() {
- return tableList;
- }
- public void setTableList(String tableList) {
- this.tableList = tableList;
- }
- public String getOrderBy() {
- return orderBy;
- }
- public void setOrderBy(String orderBy) {
- this.orderBy = orderBy;
- }
- public ArrayList<ListFieldImpl> getlistFields() {
- return listFields;
- }
- public boolean isCheckbox() {
- return isCheckbox;
- }
- public void setCheckbox(boolean isCheckbox) {
- this.isCheckbox = isCheckbox;
- }
- public ArrayList<ListFieldImpl> getlistFieldsByType(String type) {
- ArrayList<ListFieldImpl> list = new ArrayList<ListFieldImpl>();
- for (int i = 0; i < listFields.size(); i++) {
- ListFieldImpl ListFieldImpl = (ListFieldImpl) listFields.get(i);
- if (ListFieldImpl.getShowType().equals(type)) {
- list.add(ListFieldImpl);
- }
- }
- return list;
- }
- public void setlistFields(ArrayList<ListFieldImpl> listEntity) {
- this.listFields = listEntity;
- }
- public void addListField(ListField ListField) {
- this.listFields.add((ListFieldImpl) ListField);
- }
- public int getColumnCount() {
- return columnCount;
- }
- public String getCheckboxOrradio() {
- return checkboxOrradio;
- }
- public void setCheckboxOrradio(String checkboxOrradio) {
- this.checkboxOrradio = checkboxOrradio;
- }
- public Object clone() {
- QueryListImpl o = null;
- ArrayList<ListFieldImpl> tListFields = new ArrayList<ListFieldImpl>();
- try {
- o = (QueryListImpl) super.clone();
- } catch (CloneNotSupportedException e) {
- e.printStackTrace();
- }
- for (int i = 0; i < listFields.size(); i++) {
- ListFieldImpl temp1 = (ListFieldImpl) listFields.get(i);
- ListFieldImpl temp2 = (ListFieldImpl) temp1.clone();
- tListFields.add(temp2);
- }
- o.listFields = tListFields;
- return o;
- }
- public Validate getValidate() {
- return Validate;
- }
- public void setValidate(Validate validate) {
- Validate = validate;
- }
- }
|