code: @Override
      public OptionalEntity<USER_ENTITY> findLoginUser(Object userId) {
          assertUserIdRequired(userId);
          try {
              @SuppressWarnings("unchecked")
              final ID castId = (ID) userId;
              return doFindLoginUser(castId);
          } catch (ClassCastException e) { // also find method, because of generic cast
              throw new IllegalStateException("Cannot cast the user ID: " + userId.getClass() + ", " + userId, e);
          }
      }
docs: Find the login user in the database.
  @param userId for the login user. (NotNull)
  @return The optional entity of the found user. (NotNull, EmptyAllowed: when the login user is not found)