Show card

Android-LazyDatabase

A fast way to store POJO in sqlite on an Android device without troubling yourself with database creation.

Deprecated

Google introduced Room which does the same thing, but better. I thereby deprecate Android-LazyDatabase, it's not useful anymore. It's still a good tutorial about how to upload artifacts to JCenter though.

What is it?

If you are working on a proof of concept app for Android (you should probably not use it for production in it's current state), and you need to store some good old POJO, this library is there for you. As the title says, it's a database for lazy people.

Warning

Seriously, don't use it for production, only for proof of concept or stuff like that. I mean, really, I might break everything with the next release. It's far from being future proof yet.

Object count

Chaining stuff

By default, it won't be saved. If you want it to be saved, you have to add the annotation @Chain to the field, like that:

publicclassGoodOldPojo {
@ChainprivateOtherPojo otherPojo;
}

And voila, the otherPojo will be saved as well. By default, deleting the first one will also delete the second one. If you don't want the first item deletion to cascade on the second one, modify your class this way: