All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.base4j.util.bean.ChangeResult Maven / Gradle / Ivy

The newest version!
package com.base4j.util.bean;

import com.base4j.util.ValidatorUtil;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.util.List;

/**
 * 集合变化
* * @author huangjun * @version [版本号, 2017年9月29日] * @Description: * @ClassName:ChangeResult */ public class ChangeResult implements Serializable { private static final long serialVersionUID = 5642340941718657510L; private List addList; private List delList; private List updateList; private String pk; private List passFileds; private Boolean isChange; private String changeLog; /** * getter * * @return 返回 changeLog */ public String getChangeLog() { changeLog = ""; if (ValidatorUtil.isNotEmpty(addList)) { changeLog += "新增[" + addList.size() + "]条;"; } if (ValidatorUtil.isNotEmpty(delList)) { changeLog += "删除[" + delList.size() + "]条;"; } if (ValidatorUtil.isNotEmpty(updateList)) { changeLog += "修改[" + updateList.size() + "]条;"; } return changeLog; } /** * getter * * @return 返回 addList */ public List getAddList() { return addList; } /** * setter * * @param addList 进行赋值 */ public void setAddList(List addList) { this.addList = addList; } /** * getter * * @return 返回 delList */ public List getDelList() { return delList; } /** * setter * * @param delList 进行赋值 */ public void setDelList(List delList) { this.delList = delList; } /** * getter * * @return 返回 updateList */ public List getUpdateList() { return updateList; } /** * setter * * @param updateList 进行赋值 */ public void setUpdateList(List updateList) { this.updateList = updateList; } /** * getter * * @return 返回 pk */ public String getPk() { return pk; } /** * setter * * @param pk 进行赋值 */ public void setPk(String pk) { this.pk = pk; } /** * getter * * @return 返回 passFileds */ public List getPassFileds() { return passFileds; } /** * setter * * @param passFileds 进行赋值 */ public void setPassFileds(List passFileds) { this.passFileds = passFileds; } /** * getter * * @return 返回 isChange */ public Boolean getIsChange() { return isChange; } /** * setter * * @param isChange 进行赋值 */ public void setIsChange(Boolean isChange) { this.isChange = isChange; } @Override public String toString() { return ToStringBuilder.reflectionToString(this,ToStringStyle.SHORT_PREFIX_STYLE); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy