/greendaoSample

Sample application to present greendao library

Primary LanguageJava

GreenDao Sample App

Sample application to present greendao library - GreenDao

In this repository is presneted how to model database, create releation, prepare and run queries and present how to use GreenDao with Repository Pattern in Sample App

Database model

Database used in application was presented on diagram DatabaseModel

Database consists 4 entities

In entity Task is used Enum type TaskType which can be used in entity by using type converter TaskTypeConverter

Sample database operations in Repository Pattern

Basic CRUD operations are presented in [Base Repository Class] (https://github.com/mkonicki/greendaoSample/blob/master/app/src/main/java/konicki/mateusz/greendaosample/db/repository/BaseRepository.java) All operations are tested in Base Repository test

Operations on ToDo entity are presented in ToDoRepository and tested in ToDoTest