MobileBean inner implementation

18 views
Skip to first unread message

brill.ken...@gmail.com

unread,
Apr 3, 2014, 1:34:21 AM4/3/14
to openmobs...@googlegroups.com
Hi,

I'm considering in using OpenMobster as it seems to be exactly what I was looking for (a way to 2-way sync DB of mobile and cloud), however I'm curious if the "offline" access actually is implemented in a SQLITE database if I need to make "more advanced" queries (like joins just for showing them to the user) as I pretend to always to make CRUD operations through the provided API.

Also, while checking the Android API I noticed there's a way to make queries using searchByMatchAll (for example) which returns a MobileBeanCursor, but I can't seem to find an implementing class, do I have to implement it my self?


Thanks!

deuteriof...@gmail.com

unread,
Apr 3, 2014, 8:49:11 AM4/3/14
to openmobs...@googlegroups.com
Hi.

About the cursor, you don't have to worry about the implementing class, just iterate through it to get the beans. For example:


MobileBeanCursor cursor;
//... get the cursor 

cursor.moveToFirst();
do {
MobileBean bean = cursor.getCurrentBean();
//... do whatever you want with the bean
cursor.moveToNext();
} while(!cursor.isAfterLast());
Reply all
Reply to author
Forward
0 new messages