Last active
December 28, 2015 20:28
-
-
Save ericwoodruff/7557068 to your computer and use it in GitHub Desktop.
toContentValues example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static ContentValues toContentValues (User user) { | |
ContentValues values = new ContentValues (); | |
switch (Column._id) { | |
case _id: // auto-incremented primary key, skip this one | |
case sync_state: values.put (Column.sync_state.name (), user.getSyncState ()); | |
case user_id: values.put (Column.user_id.name (), user.getUserId ()); | |
} | |
return values; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment