Your question is worded in a way that is somewhat difficult to follow. If I understand you correctly, you have a select box in your HTML form that displays a list of values of a particular property, e.g. "service type" that may be [gold, silver, platinum]. In such cases, I would use enums. Don't forget that you can add various properties for a single enum constant, like "value", "description", etc. So your ServiceType enum may look like
Code:
public enum ServiceType {
SILVER(1, "Silver", "Silver description here"),
GOLD(2, "Gold", "gold description here"),
PLATINUM(3, "Platinum", "plat description here");
private final int value;
private final String name;
private final String description;
ServiceType(int val, String nameStr, String desc) {
this.value = val;
this.name = nameStr;
this.description = desc;
}
public int getValue() {
return value;
}
public String getName() {
return name;
}
public String getDescription() {
return description;
}
}
You can add more useful things, like abbreviated codes, if those things may be useful to the applications in different contexts. You can also consider creating reversible enums - if your codes are stored as ints in the database and need to be translated into enums on the application side. (You'd have to read up on that yourself, though.) Then you can choose, which property/presentation of the same enum to display in the select box, which to save in the database, which to use elsewhere, etc.
Not sure if that was exactly your question, but hope this helps.