package kr.wisestone.owl.web.condition; import com.google.common.collect.Lists; import kr.wisestone.owl.util.ConvertUtil; import kr.wisestone.owl.util.MapUtil; import java.util.List; import java.util.Map; /** * Created by wyu on 2021-11-05. */ public class DepartmentCondition { private Long id; private String departmentName; private String departmentDescription; private Long departmentCount; private Long projectId; private List excludeIds = Lists.newArrayList(); private List departmentIds = Lists.newArrayList(); private Integer Page; private Integer PageSize; public static DepartmentCondition make(Map departmentConditions) { DepartmentCondition condition = ConvertUtil.convertMapToClass(departmentConditions, DepartmentCondition.class); if (MapUtil.getStrings(departmentConditions, "excludeIds") != null) { condition.setExcludeIds(MapUtil.getLongs(departmentConditions, "excludeIds")); } return condition; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getDepartmentName() { return departmentName; } public void setDepartmentName(String departmentName) { this.departmentName = departmentName; } public String getDepartmentDescription() { return departmentDescription; } public void setDepartmentDescription(String departmentDescription) { this.departmentDescription = departmentDescription; } public Long getDepartmentCount() { return departmentCount; } public void setDepartmentCount(Long departmentCount) { this.departmentCount = departmentCount; } public Long getProjectId() { return projectId; } public void setProjectId(Long projectId) { this.projectId = projectId; } public Integer getPage() { return Page; } public void setPage(Integer page) { Page = page; } public Integer getPageSize() { return PageSize; } public void setPageSize(Integer pageSize) { PageSize = pageSize; } public List getDepartmentIds() { return departmentIds; } public void setDepartmentIds(List departmentIds) { this.departmentIds = departmentIds; } public List getExcludeIds() { return excludeIds; } public void setExcludeIds(List excludeIds) { this.excludeIds = excludeIds; } }