diff --git a/app/src/main/kotlin/jackall/moncalc/db/FruitRealmHelper.kt b/app/src/main/kotlin/jackall/moncalc/db/FruitRealmHelper.kt index 36f8d05..3cf449f 100644 --- a/app/src/main/kotlin/jackall/moncalc/db/FruitRealmHelper.kt +++ b/app/src/main/kotlin/jackall/moncalc/db/FruitRealmHelper.kt @@ -1,25 +1,25 @@ package jackall.moncalc.db -import io.realm.Realm +import io.realm.RealmResults import jackall.moncalc.vo.Fruit /** * Created by matsumoto_k on 2017/11/02. */ class FruitRealmHelper : RealmHelper() { - override fun insert(mRealm: Realm, realmObject: Fruit) { - mRealm.executeTransaction { - mRealm.copyToRealmOrUpdate(realmObject) + override fun insert(realmObject: Fruit) { + realm.executeTransaction { + realm.copyToRealmOrUpdate(realmObject) } } - override fun insert(mRealm: Realm, realmObject: List) { - mRealm.executeTransaction { - mRealm.copyToRealmOrUpdate(realmObject) + override fun insert(realmObject: List) { + realm.executeTransaction { + realm.copyToRealmOrUpdate(realmObject) } } - override fun findAll(mRealm: Realm): List { - return mRealm.where(Fruit::class.java).findAll() + override fun findAll(): RealmResults { + return realm.where(Fruit::class.java).findAll() } } \ No newline at end of file