diff --git a/app/src/main/java/com/example/sprout/refactor/model/BaseModel.java b/app/src/main/java/com/example/sprout/refactor/model/BaseModel.java deleted file mode 100644 index 508ca47..0000000 --- a/app/src/main/java/com/example/sprout/refactor/model/BaseModel.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.example.sprout.refactor.model; - -import io.reactivex.Observable; -import io.reactivex.subjects.BehaviorSubject; -import io.reactivex.subjects.PublishSubject; - -/** - * Entityを管理するクラスの基底クラス - * :Entity - * :CRUDに必要なParams - * Created by matsumoto_k on 2017/12/19. - */ -public abstract class BaseModel { - protected final BehaviorSubject entitySubject = BehaviorSubject.create(); - protected final PublishSubject errorSubject = PublishSubject.create(); - - public abstract void create(Params params); - - public abstract void read(Params params); - - public abstract void update(Params params); - - public abstract void delete(Params params); - - /** - * Entityを保持するSubjectをObservableに変換して返す - * - * @return Observable - */ - public Observable getEntityObservable() { - return entitySubject.hide(); - } - - /** - * Errorを保持するSubjectをObservbaleに変換して返す - * - * @return - */ - public Observable getErrorObservable() { - return errorSubject.hide(); - } -}