Class CardCombatDatabase


  • public abstract class CardCombatDatabase
    extends RoomDatabase
    The CardCombat 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 a public nested class: Converters.
    • Constructor Detail

      • CardCombatDatabase

        public CardCombatDatabase()
    • Method Detail

      • setContext

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

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

        public abstract AttackCardDao getAttackCardDao()
        Returns the AttackCardDao.
        Returns:
        The AttackCardDao.
      • getDeckDao

        public abstract DeckDao getDeckDao()
        Returns the DeckDao.
        Returns:
        The DeckDao.
      • getGameDao

        public abstract GameDao getGameDao()
        Returns the GameDao.
        Returns:
        The GameDao.
      • getUnitCardDao

        public abstract UnitCardDao getUnitCardDao()
        Returns the UnitCardDao.
        Returns:
        The UnitCardDao.
      • getUserDao

        public abstract UserDao getUserDao()
        Returns the UserDao.
        Returns:
        The UserDao.