• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2024 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.photopicker.core.database
18 
19 import androidx.room.Database
20 import androidx.room.RoomDatabase
21 import com.android.photopicker.core.banners.BannerState
22 import com.android.photopicker.core.banners.BannerStateDao
23 
24 /**
25  * A [Room] database for persisting data.
26  *
27  * Add new @Entity classes to the [entities] mapping, and increment the schema version. Any new @Dao
28  * interfaces need to be added to this abstract class so that the Room library will generate a
29  * matching implementation.
30  *
31  * A schema will be generated in packages/providers/MediaProvider/photopicker/schemas when
32  * Photopicker is compiled, and be sure to commit any schema changes to source control for managing
33  * migrations between versions.
34  */
35 @Database(entities = [BannerState::class], version = 1)
36 abstract class PhotopickerDatabase : RoomDatabase() {
bannerStateDaonull37     abstract fun bannerStateDao(): BannerStateDao
38 }
39