Skip to content

Instantly share code, notes, and snippets.

@sourabhv
Last active May 25, 2017 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sourabhv/665a4d93aeec3d763569e79e7464f169 to your computer and use it in GitHub Desktop.
Save sourabhv/665a4d93aeec3d763569e79e7464f169 to your computer and use it in GitHub Desktop.
Repository Design Pattern in Android using RxJava, Retrofit, SQLBrite and SQLDelight
public interface BaseRepository<T> {
Observable<T> add(T item);
Observable<List<T>> add(List<T> items);
Observable<T> query(long id);
Observable<List<T>> query();
Observable<T> update(T item);
Observable<Integer> remove(T item);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment