Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Docs Menu
Docs Home
/ /
Atlas Device SDK
/ / /

RealmModel とのインターフェース

クラスを RealmObjects としてマークするためのインターフェース。RealmObjectを拡張する代わりに使用できます。

RealmObject を拡張するクラスで使用できるすべてのヘルパー メソッドは、代わりに静的メソッドとして使用できます。

Person p = realm.createObject(Person.class);
// With the RealmModel interface
RealmObject.isValid(p);
// With the RealmObject base class
p.isValid();

注:このインターフェースを実装するオブジェクトもRealmClassで注釈が付けられている必要があるため、注釈プロセッサは基礎のプロキシ クラスを生成できます。

Tip

  • RealmObject

戻る

RealmMigration

項目一覧