package jackall.devrealm.db import io.realm.Realm import io.realm.RealmModel import io.realm.RealmResults /** * Created by matsumoto_k on 2017/11/08. */ abstract class BaseRealmHelper<T : RealmModel> { val realm by lazy { Realm.getDefaultInstance() } abstract fun insert(realmObject: T) abstract fun delete(realmObject: T) abstract fun findAll(): RealmResults<T> fun close() = realm.close() }