I have a set of data which needs to be imported from a excel sheet, lets take the simplest example. Note: the data might eventually support uploading any locale.
e.g. assuming one of the fields denoting a user is gender mapped to an enumeration and stored in the database as 0 for male and 1 for female. 0 and 1 being short values.
If I have to import the values I cannot expect the user to punch in numbers (since they are not intuitive and is cumbersome when the enumerations are bigger), what would be the correct way to map to enumerations.
Should we ask them to provide a string value in these cases (e.g. male or female) and provide the transformation to a enum in our code by wring a method public static Gender Gender.fromString(String value)