PolicyVO.java 728 B

1234567891011121314151617181920212223242526272829303132
  1. package com.welampiot.vo;
  2. import com.welampiot.dto.PolicyDTO;
  3. import lombok.Data;
  4. import org.jetbrains.annotations.Contract;
  5. import org.jetbrains.annotations.NotNull;
  6. import java.util.List;
  7. @Data
  8. public class PolicyVO {
  9. private List userList;
  10. private Integer limit;
  11. private Integer offset;
  12. private String keyword;
  13. private List<PolicyDTO> list;
  14. private Integer total;
  15. private Integer id;
  16. private Integer version;
  17. @NotNull
  18. @Contract("_ -> param1")
  19. public static PolicyVO getPolicyVO(@NotNull PolicyVO vo) {
  20. if (vo.getId() == null) {
  21. vo.setId(0);
  22. }
  23. if (vo.getVersion() == null) {
  24. vo.setVersion(0);
  25. }
  26. return vo;
  27. }
  28. }