Tutorial by Examples

This example shows a helper class that contains methods useful, when executing the queries for data. Every method here uses Java Generic's in order to be very flexible. public <T> List<T> selectElements(AbstractDao<T, ?> dao) { if (dao == null) { return null; } ...
When creating a model for a table that has a composite primary key, additional work is required on the Object for the model Entity to respect those constraints. The following example SQL table and Entity demonstrates the structure to store a review left by a customer for an item in an online store....
After adding the GreenDao library dependency and Gradle plugin, we need to first create an entity object. Entity An entity is a Plain Old Java Object (POJO) that models some data in the database. GreenDao will use this class to create a table in the SQLite database and automatically generate helpe...

Page 1 of 1