Skip to content

Instantly share code, notes, and snippets.

@fmendes6
Created March 25, 2016 15:20
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 fmendes6/ffe7a63a0db61300bfaf to your computer and use it in GitHub Desktop.
Save fmendes6/ffe7a63a0db61300bfaf to your computer and use it in GitHub Desktop.
Mono2Clean - Domain Service example
public class PostService implements IPostService{
IPostRepository mRepository;
public PostService(IPostRepository mRepository) {
this.mRepository = mRepository;
}
@Override
public Observable<Post> getPostById(int postId) {
return mRepository.getPostById(postId);
}
@Override
public Observable<List<Comment>> getPostComments(int postId) {
return mRepository.getPostComments(postId);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment