Saving Data on Android


data  package contains two packages:  db



Download 19,28 Mb.
Pdf ko'rish
bet145/292
Sana24.01.2022
Hajmi19,28 Mb.
#407089
1   ...   141   142   143   144   145   146   147   148   ...   292
Bog'liq
Bailey J., Dominguez A., Djermanovic D. - Saving Data on Android (1st Edition) - 2019

data
 package contains two packages: 
db
 and 
model
. The 
db
 package contains 
the 
QuestionDatabase
 class, which defines your Room database. The 
model
 
package contains your entities: 
Question
 and 
Answer
.
• The 
view
 package contains all your activities: 
MainActivity

QuestionActivity
 
and the 
ResultActivity
.
Now 
Build
 and 
Run
 the app to verify that everything is working properly:
Cool! Now you are ready to start creating some Database Access Objects in order to 
manipulate the data.
Saving Data on Android
Chapter 8: The DAO Pattern
raywenderlich.com
132


Using DAOs to query your data
Database Access Objects are commonly known as 
DAOs
. DAOs are objects that 
provide access to your app's data, and they are what make Room so powerful since 
they abstract most of the complexity of communicating to the actual database. Using 
DAOs instead of query builders or direct queries makes it very easy to interact with 
your database. You avoid all the hardship of debugging query builders, if something 
breaks, and we all know how tricky SQL can be! They also provide a better 

Download 19,28 Mb.

Do'stlaringiz bilan baham:
1   ...   141   142   143   144   145   146   147   148   ...   292




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish