diff --git a/app/src/main/java/jackall/devrealm/db/BaseRealmHelper.kt b/app/src/main/java/jackall/devrealm/db/BaseRealmHelper.kt new file mode 100644 index 0000000..324330b --- /dev/null +++ b/app/src/main/java/jackall/devrealm/db/BaseRealmHelper.kt @@ -0,0 +1,15 @@ +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 { + val realm by lazy { Realm.getDefaultInstance() } + abstract fun insert(realmObject: T) + abstract fun findAll(): RealmResults + fun close() = realm.close() +} \ No newline at end of file