| Total Complexity | 6 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | package io.github.ro4.spelvalidation; |
||
| 3 | @SpELAssert(expression = "#p.maxAge > #p.minAge", message = "max age must greater than min age") |
||
| 4 | @SuppressWarnings("unused") |
||
| 5 | public class TestDto { |
||
| 6 | @SpELAssert(expression = "@simpleService.isNameUnique(#p)", message = "name already exists") |
||
| 7 | protected String name; |
||
| 8 | |||
| 9 | @SpELAssert("#p == 100") |
||
| 10 | protected Integer maxAge; |
||
| 11 | |||
| 12 | @SpELAssert(expression = {"#_ > 100", "and #_ < 110"}, alias = "_", message = "ff") |
||
| 13 | @SpELAssert("true") |
||
| 14 | protected Integer minAge; |
||
| 15 | |||
| 16 | public String getName() { |
||
| 17 | return name; |
||
| 18 | } |
||
| 19 | |||
| 20 | public void setName(String name) { |
||
| 21 | this.name = name; |
||
| 22 | } |
||
| 23 | |||
| 24 | public Integer getMinAge() { |
||
| 25 | return minAge; |
||
| 26 | } |
||
| 27 | |||
| 28 | public void setMinAge(Integer minAge) { |
||
| 29 | this.minAge = minAge; |
||
| 30 | } |
||
| 31 | |||
| 32 | public Integer getMaxAge() { |
||
| 33 | return maxAge; |
||
| 34 | } |
||
| 35 | |||
| 36 | public void setMaxAge(Integer maxAge) { |
||
| 37 | this.maxAge = maxAge; |
||
| 38 | } |
||
| 40 |