use of de.djuelg.neuronizer.storage.converter.TodoListItemDAOConverter in project Neuronizer by djuelg.
the class TodoListRepositoryImpl method getItemById.
@Override
public Optional<TodoListItem> getItemById(String uuid) {
Realm realm = Realm.getInstance(configuration);
Optional<TodoListItemDAO> itemDAO = Optional.fromNullable(realm.where(TodoListItemDAO.class).equalTo("uuid", uuid).findFirst());
Optional<TodoListItem> item = itemDAO.transform(new TodoListItemDAOConverter());
realm.close();
return item;
}
Aggregations