Add handy methods to AccountRepository

This commit is contained in:
Paul Schaub 2020-01-05 15:50:35 +01:00
parent ed31f5c8c8
commit fc48b35f05
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -15,8 +15,16 @@ public interface AccountRepository {
Single<Account> insertAccount(Account account);
default Observable<Optional<Account>> observeAccount(Account account) {
return observeAccount(account.getId());
}
Observable<Optional<Account>> observeAccount(UUID accountId);
default Maybe<Account> getAccount(Account account) {
return getAccount(account.getId());
}
Maybe<Account> getAccount(UUID accountId);
Observable<Optional<Account>> observeAccountByAddress(String address);