diff --git a/app/src/main/kotlin/jackall/moncalc/db/FruitRealmHelper.kt b/app/src/main/kotlin/jackall/moncalc/db/FruitRealmHelper.kt new file mode 100644 index 0000000..1211706 --- /dev/null +++ b/app/src/main/kotlin/jackall/moncalc/db/FruitRealmHelper.kt @@ -0,0 +1,24 @@ +package jackall.moncalc.db + +import jackall.moncalc.vo.Temple + +/** + * Created by matsumoto_k on 2017/11/02. + */ +class FruitRealmHelper : RealmHelper() { + override fun insert(realmObject: Temple) { + getRealm().use { realm -> + realm.executeTransaction { + realm.copyToRealmOrUpdate(realmObject) + } + } + } + + override fun insert(realmObject: List) { + getRealm().use { realm -> + realm.executeTransaction { + realm.copyToRealmOrUpdate(realmObject) + } + } + } +} \ No newline at end of file