title: Android - Using Dao Pattern with contentProvider
body: <p>Is correct to use ContentProvider with dao Pattern. ? or it will bring any performance issue ? </p>
  
  <p>I will try to explain. I've a contentProvider. an activity, a dao and a bean ..</p>
  
  <p>this is the code : </p>
  
  <pre><code>class Bean(){
  
   String name;
  
  }
  
  class Dao{
  
   Activity activity;
  
   public Dao(Activity activity){
  
   this.activity = activity;
  
  public List&lt;Bean&gt; getAllBean() {
  
      Cursor c = activity.managedQuery(Bean.CONTENT_URI, PROJECTION,
                  null, null, Bean.DEFAULT_SORT_ORDER);
      return BeanMapper.GetAllFromCursor(c);
      }
  }
  
  }
  
  Class Activity{
  .....
  
  
   onCreate(....){
  
    Dao dao = new Dao(this);
    List&lt;Bean&gt; aList = dao.getAllBean();
  
  }
  ....}
  </code></pre>
  
  <p>what do you think ? </p>
  
  <p>regards </p>