pardom/ActiveAndroid — pull request #87 by pelzrutsche (2013-06-30 17:35:05+00:00)
Title: Use constant for ID column name (alias for BaseColumns._ID)

In order to use the rows from a `Cursor` in a `ListView` each row must be identified by a column named **_ID** (see [Content Provider Basics][1]). To simplify things it would be nice if the primary key for each `Model` would be named **_ID** by default. I added an interface called `Columns` to `Model` which contains a constant `ID` which is an alias for `android.provider.BaseColumns._ID`. I extend this interface in my subclasses of `Model` to keep track of the names of their additional columns. This reduces the usage of [magic strings](http://en.wikipedia.org/wiki/Magic_string), too.

[1]: http://developer.android.com/intl/de/guide/topics/providers/content-provider-basics.html#DisplayResults