修改部分 jsr305 注解的使用。
parent
19fc97362c
commit
8460b9da29
|
@ -24,12 +24,10 @@ public final class EntityStatus extends Enumeration<EntityStatus> {
|
|||
private static final ValueSet<EntityStatus> VALUE_SET = new ValueSet<>(
|
||||
AVAILABLE, DISABLED);
|
||||
|
||||
@Nonnull
|
||||
public static EntityStatus of(int id) {
|
||||
return VALUE_SET.get(id);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public static Collection<EntityStatus> constants() {
|
||||
return VALUE_SET.getValues();
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@ package xyz.zhouxy.plusone.system.application.query;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import xyz.zhouxy.plusone.commons.util.PageDTO;
|
||||
|
@ -23,6 +25,7 @@ public interface AccountQueries {
|
|||
return PageDTO.of(content, total);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
List<AccountOverview> queryAccountOverview(AccountQueryParams queryParams);
|
||||
|
||||
long count(AccountQueryParams queryParams);
|
||||
|
|
|
@ -31,7 +31,6 @@ public final class AccountStatus extends Enumeration<AccountStatus> implements I
|
|||
return VALUE_SET.get(id);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public static Collection<AccountStatus> constants() {
|
||||
return VALUE_SET.getValues();
|
||||
}
|
||||
|
|
|
@ -26,12 +26,10 @@ public final class Sex extends Enumeration<Sex> implements IValueObject {
|
|||
|
||||
private static final ValueSet<Sex> VALUE_SET = new ValueSet<>(UNSET, MALE, FEMALE);
|
||||
|
||||
@Nonnull
|
||||
public static Sex of(int value) {
|
||||
return VALUE_SET.get(value);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public static Collection<Sex> constants() {
|
||||
return VALUE_SET.getValues();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue