java.lang.Object
com.example.wellbeing_project.universal.AppSession

public class AppSession extends Object
Utility class for managing the application session. Stores and retrieves the logged-in user's ID.
  • Field Details

    • loggedInUserId

      public static int loggedInUserId
  • Constructor Details

    • AppSession

      public AppSession()
  • Method Details

    • getLoggedInUserId

      public static int getLoggedInUserId()
      Retrives the logged-in user's ID.
      Returns:
      the logged-in user's ID.
    • setLoggedInUserId

      public static void setLoggedInUserId(int userId)
      Sets the logged-in user's ID.
      Parameters:
      userId - ID of the user who has logged in.