public SetUserInfoResult genLoad() {
    EntityUser user = EntityUser.load(userId);
    UserType userType = userInfo.getType();
    if (userType != null) {
      long time = BaseEnvironment.getEnvironment().getTime().getTimeMillis();
      EntityAction newAction = new EntityAction(ActionType.CHANGE_USER_TYPE, time, userId);
      newAction.setUserType(userType);
      newAction.saveToDb(userId.getDbId());
      HashoutUserToAction hashoutUserToAction = new HashoutUserToAction();
      hashoutUserToAction.addKey(userId.getKey(), newAction.getId().getKey());
      if (user.getType().equals(UserType.DELEGATE) && userType.equals(UserType.VOTER)) {
        endVotes(new HashoutDelegateToUser(), user.getId(), time);
      }
      if (user.getType().equals(UserType.VOTER) && userType.equals(UserType.DELEGATE)) {
        endVotes(new HashoutUserToDelegate(), user.getId(), time);
      }
      user.setType(userType);
    }
    user.copyNotNullProperties(userInfo);
    user.save();
    user = EntityUser.load(userId);
    return new SetUserInfoResult(user);
  }