title: How to get list of cursor object from room dao access?
body: <p>I am trying to chnage my code to make use of room database APIs. For documents table I have defined Entity class <code>Document</code>, when I query <code>getAll()</code> it returns me all the document.</p>
  
  <p>Now I have old implementation of Adapter which makes user of <code>Cursor</code> ( Its a <code>CursorAdapter</code> ). In my <code>DocumentDao</code> class I defined one method to get list of cursor objects. My Dao class as follows : </p>
  
  <pre><code>@Dao
  public interface DocumentDao {
  
      @Query("SELECT * FROM documents")
      List&lt;com.myapp.room.entity.Document&gt; getAll();
  
      @Query("SELECT * FROM documents")
      List&lt;Cursor&gt; getCursorAll();
  }
  </code></pre>
  
  <p>During compile time I am getting following error :</p>
  
  <pre><code>Error:(20, 18) error: Not sure how to convert a Cursor to this method's return type
  </code></pre>
  
  <p>The official guide for <a href="https://developer.android.com/topic/libraries/architecture/room.html" rel="noreferrer">Room</a> which states that :</p>
  
  <blockquote>
    <p>If your app's logic requires direct access to the return rows, you can
    return a Cursor object from your queries, as shown in the following
    code snippet:</p>
  </blockquote>
  
  <pre><code>@Dao
  public interface MyDao {
      @Query("SELECT * FROM user WHERE age &gt; :minAge LIMIT 5")
      public Cursor loadRawUsersOlderThan(int minAge);
  }
  </code></pre>
  
  <p>My question is do I need to write converter for this purpose ? </p>