public List<T> getAll() {
final SQLiteDatabase db = getReadableDatabase();
final Cursor cursor = db.query(TABLE_NAME, FIELDS, null, null, null ,null, null);
if (cursor == null || cursor.isAfterLast()) {
return null;
}
List list = new ArrayList<>();
for (cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) {
list.add();//TODO: change cursor to domain object.
}
return list;
}