title: What is the purpose of an Android projection map in a content provider?
body: <p>I am looking at the Android notepad application sample code in <code>&lt;path_to_SDK&gt;/samples/android-16/NotePad/src/com/example/android/notepad</code>.</p>
  
  <p>I was wondering if anyone could explain to me why the following code is needed in <code>NotepadProvider.java</code>?</p>
  
  <pre><code>// Creates a new projection map instance. The map returns a column name
  // given a string. The two are usually equal.
  sNotesProjectionMap = new HashMap&lt;String, String&gt;();
  
  // Maps the string "_ID" to the column name "_ID"
  sNotesProjectionMap.put(NotePad.Notes._ID, NotePad.Notes._ID);
  
  // Maps "title" to "title"
  sNotesProjectionMap.put(NotePad.Notes.COLUMN_NAME_TITLE,NotePad.Notes.COLUMN_NAME_TITLE);
  
  // Maps "note" to "note"
  sNotesProjectionMap.put(NotePad.Notes.COLUMN_NAME_NOTE, NotePad.Notes.COLUMN_NAME_NOTE);
  
  // Maps "created" to "created"
  sNotesProjectionMap.put(NotePad.Notes.COLUMN_NAME_CREATE_DATE, NotePad.Notes.COLUMN_NAME_CREATE_DATE);
  
  // Maps "modified" to "modified"
  sNotesProjectionMap.put(
          NotePad.Notes.COLUMN_NAME_MODIFICATION_DATE,
          NotePad.Notes.COLUMN_NAME_MODIFICATION_DATE)
  </code></pre>
  
  <p>I notice the projection map is used later in the <code>query()</code> method:</p>
  
  <pre><code>...
  SQLiteQueryBuilder qb = new SQLiteQueryBuilder();
  qb.setTables(NotePad.Notes.TABLE_NAME);
  
  /**
   * Choose the projection and adjust the "where" clause based on URI pattern-matching.
   */
  switch (sUriMatcher.match(uri)) {
      // If the incoming URI is for notes, chooses the Notes projection
      case NOTES:
      qb.setProjectionMap(sNotesProjectionMap);
      break;
  ...
  </code></pre>
  
  <p>Why is this projection map needed?</p>