title: Is there any way can let greenDAO support android data-binding now?
body: <p>When you use <a href="https://github.com/greenrobot/greenDAO" rel="nofollow">greenDAO</a> library, you need to use <strong>greendao-generator</strong> to generate relevant POJO and XXXDAO, DAOSession, DAOMaster class. Just like this POJO class here: <a href="https://github.com/greenrobot/greenDAO/blob/master/DaoExample%2Fsrc%2Fmain%2Fjava%2Fde%2Fgreenrobot%2Fdaoexample%2FNote.java" rel="nofollow">Note.java</a></p>
  
  <pre><code>// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit. 
  /**
   * Entity mapped to table "NOTE".
   */
  public class Note {
  
      private Long id;
      /** Not-null value. */
      private String text;
      private String comment;
      private java.util.Date date;
  
      public Note() {
      }
  
      public Note(Long id) {
          this.id = id;
      }
  
      public Note(Long id, String text, String comment, java.util.Date date) {
          this.id = id;
          this.text = text;
          this.comment = comment;
          this.date = date;
      }
  
      // Getter and setter...
  
  }
  </code></pre>
  
  <p>And each time you change your model, this code need to be regenerated.</p>
  
  <p><a href="https://developer.android.com/intl/zh-cn/tools/data-binding/guide.html" rel="nofollow">Android data-binding</a> can be used by giving your data objects the ability to notify when data changes.But before that, you need to modify your POJO class.There are different data change notification mechanisms: <a href="https://developer.android.com/intl/zh-cn/tools/data-binding/guide.html#data_objects" rel="nofollow">Data Objects</a></p>
  
  <p>1.implementing the <code>Observable</code> interface, assigning a <code>Bindable</code> annotation and call <code>notifyPropertyChanged()</code> method in setter.</p>
  
  <pre><code>private static class User extends BaseObservable {
     private String firstName;
     private String lastName;
     @Bindable
     public String getFirstName() {
         return this.firstName;
     }
     @Bindable
     public String getLastName() {
         return this.lastName;
     }
     public void setFirstName(String firstName) {
         this.firstName = firstName;
         notifyPropertyChanged(BR.firstName);
     }
     public void setLastName(String lastName) {
         this.lastName = lastName;
         notifyPropertyChanged(BR.lastName);
     }
  }
  </code></pre>
  
  <p>2.Use ObservableFields or Observable Collections:</p>
  
  <pre><code>private static class User {
     public final ObservableField&lt;String&gt; firstName =
         new ObservableField&lt;&gt;();
     public final ObservableField&lt;String&gt; lastName =
         new ObservableField&lt;&gt;();
     public final ObservableInt age = new ObservableInt();
  }
  </code></pre>
  
  <p>So, if we want to use <strong>greenDAO</strong> and <strong>Android data-binding</strong> together, we need to modify the automatically generated file manually? I believe this is a very large amount of work if your project is large. Or Is there any elegant way can let greenDAO support android data-binding now?</p>
  
  <p>Looking forward to your reply! Thanks!</p>