public static User getUser(String login) {
   Map<String, Object> params = new HashMap<>();
   params.put("login", login);
   List<User> users = BaseDao.find(User.class, "findUserByLogin", params);
   if (users.size() == 1) {
     return users.get(0);
   } else {
     return null;
   }
 }
 public static void removeUser(Long id) {
   BaseDao.removeById(id, User.class);
 }
 public static void updateUser(User user) {
   BaseDao.update(user);
 }
 public static Collection<User> getUsers() {
   return BaseDao.getAll(User.class);
 }
 public static User getUserById(Long id) {
   return BaseDao.getById(id, User.class);
 }
 public static void createUser(User u) {
   BaseDao.create(u);
 }