code: public static <T extends Model> List<T> processCursor(Class<T> cls, Cursor cursor) {
  		final List<T> entities = new ArrayList<T>();
  		try {
  			Constructor<T> entityConstructor = cls.getConstructor();
  			if (cursor.moveToFirst()) {
  				do {
  					T entity = getEntity(cls, cursor.getLong(cursor.getColumnIndex(BaseColumns._ID)));
  					if (entity == null) {
  						entity = entityConstructor.newInstance();
  					}
  
  					entity.load(cursor);
  					entities.add(entity);
  				}
  				while (cursor.moveToNext());
  			}
  		} catch (Exception e) {
  			Log.e(TAG, "Failed to process cursor.", e);
  		}
  
  		return entities;
  	}
docs: Iterate over a cursor and load entities.
  
  @param cls    The model class.
  @param cursor The result cursor.
  @return The list of entities.