public RoleTypeEnum fromId(Long id) { if (RoleTypeEnum.AUTHENTICATED.getId().equals(id)) { return RoleTypeEnum.AUTHENTICATED; } if (RoleTypeEnum.ADMIN.getId().equals(id)) { return RoleTypeEnum.ADMIN; } return null; }
public static Role convertFromRoleType(Long id) { Role role = null; if (RoleTypeEnum.AUTHENTICATED.getId().equals(id)) { role = fromRoleType(RoleTypeEnum.AUTHENTICATED); } if (RoleTypeEnum.ADMIN.getId().equals(id)) { role = fromRoleType(RoleTypeEnum.ADMIN); } return role; }