James Apfel wrote:
BTW. storing & retrieving of Enums through ordinals will fail if one
changes the order of the fields (or prepends new fields).
this is the reason why you just affect those kind of numbers explicitly
if you want to be protected against such problems, like in :
public enum Numbers {
ONE(1),
TWO(2);
private int ordinal;
private Numbers( int ordinal ) {
this.ordinal = ordinal;
}
public int getOrdinal() {
return ordnial;
}
}
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org