Class ScaleScrollerDatabase


  • public abstract class ScaleScrollerDatabase
    extends RoomDatabase
    The ScaleScroller Database provides abstract methods that return the DAOs for each entity. It also provides methods to set the context and to return an instance of itself. It contains two public nested classes: Callback and Converters.
    • Constructor Detail

      • ScaleScrollerDatabase

        public ScaleScrollerDatabase()
    • Method Detail

      • setContext

        public static void setContext​(Application context)
        Sets the application context.
        Parameters:
        context - The application context.
      • getInstance

        public static ScaleScrollerDatabase getInstance()
        Returns an instance of the singleton database.
        Returns:
        An instance of ScaleScrollerDatabase
      • getPlayerDao

        public abstract PlayerDao getPlayerDao()
        Returns the PlayerDao.
        Returns:
        The PlayerDao.
      • getLearnLevelAttemptDao

        public abstract LearnLevelAttemptDao getLearnLevelAttemptDao()
        Returns the LearnLevelAttemptDao.
        Returns:
        The LearnLevelAttemptDao.
      • getChallengeAttemptDao

        public abstract ChallengeAttemptDao getChallengeAttemptDao()
        Returns the ChallengeAttemptDao.
        Returns:
        The ChallengeAttemptDao.
      • getScaleDao

        public abstract ScaleDao getScaleDao()
        Returns the ScaleDao.
        Returns:
        The ScaleDao.
      • getScaleChallengeAttemptDao

        public abstract ScaleChallengeAttemptDao getScaleChallengeAttemptDao()
        Returns the ScaleChallengeAttemptDao.
        Returns:
        The ScaleChallengeAttemptDao.