diff --git a/app/src/main/java/jackall/devrealm/db/PersonRealmHelper.kt b/app/src/main/java/jackall/devrealm/db/PersonRealmHelper.kt new file mode 100644 index 0000000..9027f6d --- /dev/null +++ b/app/src/main/java/jackall/devrealm/db/PersonRealmHelper.kt @@ -0,0 +1,18 @@ +package jackall.devrealm.db + +import io.realm.RealmResults +import jackall.devrealm.vo.Person + +/** + * Created by matsumoto_k on 2017/11/08. + */ +class PersonRealmHelper : BaseRealmHelper() { + val query by lazy { realm.where(Person::class.java) } + override fun insert(realmObject: Person) { + realm.copyToRealm(realmObject) + } + + override fun findAll(): RealmResults { + return query.findAll() + } +} \ No newline at end of file