@PrimaryKey public String id; public String title; public String contents; public Date createdAt; public Date modifiedAt; public User user; public RealmList<Comment> comments; }
query.contains("title", "realm"); RealmResults<Article> results = query.findAll(); // results does not contain any actual Article instances here. Article article = results.first(); // article does not contain any field values here. String title = article.title; // it looks just a field access. // but it fetches the actual value from the database.
public getters and setters 3. getters and setters must not have a logic 4. no custom methods 5. must be a subclass of RealmObject class 6. and so on... [email protected]
many other methods here public void transform(TransformInvocation transformInvocation) throws TransformException, InterruptedException, IOException { } }