Would JSON perhaps be a good solution for this?

Kris Micinski

On Mon, Dec 27, 2010 at 12:09 PM, Bret Foreman <bret.fore...@gmail.com> wrote:
> I would use an enum for the Weekdays like this enum Weekdays
> { SUNDAY , MONDAY, TUESDAY, ...}
>
> And then store the ordinal in the DB like this: int
> ordinal_to_store_in_DB = weekday.SUNDAY.ordinal()
>
> And retrieve the values from the DB like this: Weekdays day =
> Weekdays.values()[ordinal_value_from_Db];
>
> This makes it easy to read your code and still provides maximum
> performance.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to