diff --git a/store2realm/build.gradle b/store2realm/build.gradle index ec2439b..ecfa84d 100644 --- a/store2realm/build.gradle +++ b/store2realm/build.gradle @@ -32,7 +32,7 @@ dependencies { }) compile "io.reactivex:rxandroid:1.2.1" - compile 'com.github.playmoweb:store2store:2.0.1' + compile 'com.github.playmoweb:store2store:2.0.4' testCompile 'junit:junit:4.12' } diff --git a/store2realm/src/androidTest/java/com/playmoweb/store2realm/mock/MemoryDao.java b/store2realm/src/androidTest/java/com/playmoweb/store2realm/mock/MemoryDao.java index 4d3d1ad..22900d8 100644 --- a/store2realm/src/androidTest/java/com/playmoweb/store2realm/mock/MemoryDao.java +++ b/store2realm/src/androidTest/java/com/playmoweb/store2realm/mock/MemoryDao.java @@ -32,11 +32,10 @@ public Observable getOne(Filter filter, SortingMode sortingMode) { } @Override - public Observable getById(String id) { - int integerId = Integer.valueOf(id); + public Observable getById(int id) { TestModel t = null; for(TestModel tm : models) { - if(tm.getId() == integerId) { + if(tm.getId() == id) { t = tm; break; } diff --git a/store2realm/src/androidTest/java/com/playmoweb/store2realm/mock/MemoryService.java b/store2realm/src/androidTest/java/com/playmoweb/store2realm/mock/MemoryService.java index 9d8677f..d804db8 100644 --- a/store2realm/src/androidTest/java/com/playmoweb/store2realm/mock/MemoryService.java +++ b/store2realm/src/androidTest/java/com/playmoweb/store2realm/mock/MemoryService.java @@ -1,8 +1,8 @@ package com.playmoweb.store2realm.mock; -import com.playmoweb.store2realm.service.api.AbstractService; -import com.playmoweb.store2realm.utils.Filter; -import com.playmoweb.store2realm.utils.SortingMode; +import com.playmoweb.store2store.service.AbstractService; +import com.playmoweb.store2store.utils.Filter; +import com.playmoweb.store2store.utils.SortingMode; import java.util.List; @@ -38,7 +38,7 @@ protected Observable getOne(Filter filter, SortingMode sortingMode) { } @Override - protected Observable getById(String id) { + protected Observable getById(int id) { return myCustomAPI.getById(id); } diff --git a/store2realm/src/main/java/com/playmoweb/store2realm/dao/RealmDao.java b/store2realm/src/main/java/com/playmoweb/store2realm/dao/RealmDao.java index 93876f9..97e0819 100644 --- a/store2realm/src/main/java/com/playmoweb/store2realm/dao/RealmDao.java +++ b/store2realm/src/main/java/com/playmoweb/store2realm/dao/RealmDao.java @@ -65,15 +65,6 @@ public final Observable getOne(Filter filter, SortingMode sortingMode) { * @return */ @Override - public Observable getById(String id) { - return getOne(new Filter("id", id), null); - } - - /** - * Get one by id - * @param id - * @return - */ public Observable getById(int id) { return getOne(new Filter("id", id), null); } diff --git a/store2realm/src/main/java/com/playmoweb/store2realm/service/BaseRealmService.java b/store2realm/src/main/java/com/playmoweb/store2realm/service/BaseRealmService.java index cc43bcb..55f96c0 100644 --- a/store2realm/src/main/java/com/playmoweb/store2realm/service/BaseRealmService.java +++ b/store2realm/src/main/java/com/playmoweb/store2realm/service/BaseRealmService.java @@ -44,7 +44,7 @@ protected Observable getOne(Filter filter, SortingMode sortingMode) { } @Override - protected Observable getById(String id) { + protected Observable getById(int id) { return null; }