package zxc.model.support;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;
import zxc.pmt.bean.ZxcAccount;
import zxc.service.support.CrudBaseService;
import zxc.utils.Page;
public class BaseBean {
private Serializable oid;
/** 字段 */
private String sort;
/** ASC/DESC */
private String dir;
private String query;
private Page page;
/** 接收整数型序列参数* */
private List<Integer> ILC;
/** 接收字符型序列参数* */
private List<String> SLC;
/** 接收日期型序列参数* */
private List<Date> DLC;
/** 接收整数值散列序列参数,或作为通用整数型参数容器* */
private Map<String, Integer> IMC;
/** 接收字符值散列序列参数,或作为通用字符型参数容器* */
private Map<String, String> SMC;
/** 接收日期型散列序列参数,或作为通用日期型参数容器* */
private Map<String, Date> DMC;
public List<Integer> getILC() {
return ILC;
}
public void setILC(List<Integer> ilc) {
ILC = ilc;
}
public List<String> getSLC() {
return SLC;
}
public void setSLC(List<String> slc) {
SLC = slc;
}
public List<Date> getDLC() {
return DLC;
}
public void setDLC(List<Date> dlc) {
DLC = dlc;
}
public Map<String, Integer> getIMC() {
return IMC;
}
public void setIMC(Map<String, Integer> imc) {
IMC = imc;
}
public Map<String, String> getSMC() {
return SMC;
}
public void setSMC(Map<String, String> smc) {
SMC = smc;
}
public Map<String, Date> getDMC() {
return DMC;
}
public void setDMC(Map<String, Date> dmc) {
DMC = dmc;
}
public Page getPage() {
return page;
}
public void setPage(Page page) {
this.page = page;
}
public String getSort() {
return sort;
}
public void setSort(String sort) {
this.sort = sort;
}
public String getDir() {
return dir;
}
public void setDir(String dir) {
this.dir = dir;
}
public String getQuery() {
return query;
}
public void setQuery(String query) {
this.query = query;
}
public Serializable getOid() {
return oid;
}
public void setOid(Serializable oid) {
this.oid = oid;
}
private Date startTime;
private Date endTime;
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
private ZxcAccount zxcAccount;
public ZxcAccount getZxcAccount() {
if (zxcAccount == null && this.getSession() != null) {
zxcAccount = (ZxcAccount) this.getSession().get(CrudBaseService.SESSION_USER_INFO_ROOT_KEY);
}
return zxcAccount;
}
public void setZxcAccount(ZxcAccount zxcAccount) {
this.zxcAccount = zxcAccount;
}
@Override
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("\n");
buffer.append("\toid:" + oid);
buffer.append("\tsort:" + sort);
buffer.append("\tdir:" + dir);
buffer.append("\tquery:" + query);
buffer.append("\n");
buffer.append("\tILC:" + ILC);
buffer.append("\tSLC:" + SLC);
buffer.append("\tDLC:" + DLC);
buffer.append("\n");
buffer.append("\tIMC:" + IMC);
buffer.append("\tSMC:" + SMC);
buffer.append("\tDMC:" + DMC);
buffer.append("\n");
buffer.append("\tpage:" + page);
buffer.append("\tstartTime:" + startTime);
buffer.append("\tendTime:" + endTime);
buffer.append("\tlogicCondition:" + logicCondition);
buffer.append("\n");
buffer.append("\tzxcAccount:" + zxcAccount);
buffer.append("\n");
buffer.append("\tsessionSetFlag:" + sessionSetFlag);
buffer.append("\n");
//buffer.append("\tsession:" + session);
//buffer.append("\n");
//如果数据量太大则不便输出
if (mapList == null || mapList.size() < 100) {
buffer.append("\tmapList:" + mapList);
}
buffer.append("\n");
buffer.append("\tmodelList:" + modelList);
return buffer.toString();
}
public static final Integer ENABLE_STATUS_YES = 1;
public static final Integer ENABLE_STATUS_NO = 0;
private Integer sessionSetFlag = 0;
private LogicCondition logicCondition;
private String selectString;
public LogicCondition getLogicCondition() {
return logicCondition;
}
public void setLogicCondition(LogicCondition logicCondition) {
this.logicCondition = logicCondition;
}
public String getSelectString() {
return selectString;
}
public void setSelectString(String selectString) {
this.selectString = selectString;
}
//=========================================业务逻辑条件枚举================================
public enum LogicCondition {
Condition_1ST, Condition_2ND, Condition_3RD
}
private Boolean addDefaultOrderBy = true;
public Boolean getAddDefaultOrderBy() {
return addDefaultOrderBy;
}
public void setAddDefaultOrderBy(Boolean addDefaultOrderBy) {
this.addDefaultOrderBy = addDefaultOrderBy;
}
//=========================================结果输出参数===================================
private Map<String, Object> session;
private List<Map<String, Object>> mapList;
private List<? extends BaseBean> modelList;
private String mapListJson;
public void setSession(Map<String, Object> map) {
this.sessionSetFlag++;//表示当前方法被调用过一次
this.session = map;
}
public List<Map<String, Object>> getMapList() {
return mapList;
}
public void setMapList(List<Map<String, Object>> mapList) {
this.mapList = mapList;
}
public List<? extends BaseBean> getModelList() {
return modelList;
}
public void setModelList(List<? extends BaseBean> modelList) {
this.modelList = modelList;
}
public Map<String, Object> getSession() {
return this.session;
}
public String getMapListJson() {
return mapListJson;
}
public void setMapListJson(String mapListJson) {
this.mapListJson = mapListJson;
}
}