Sorry for the email flood... I jumped the gun on enums. It will be
inconsistent with the best Cayenne tradition of keeping the mapping
completely separate form the code. So I'd say we'd have to map the
stuff below in the DataMap... so we will have to add yet another
mapping primitive :-/
Andrus
On Jan 16, 2008, at 7:42 PM, Andrus Adamchik wrote:
On Jan 16, 2008, at 7:34 PM, Andrus Adamchik wrote:
public enum SomeArbitraryType {
TYPE1, TYPE2, ...;
@EnumCode
public String getCode() {
// this is dumb, but demonstrates the idea
return name() + "_CODE";
}
}
Or this:
public enum SomeArbitraryType {
@DbCode(value="X")
TYPE1,
@DbCode(value="Y")
TYPE2, ...;
}
Andrus