We are just trying to generate a field that reflects a type_code on an
entity object where the type_code could hold multiple values decoded via
a bitwise or.  For example, a person may have a type_code field and the
individual person may be one or many types.  One approach would  be to
define final ints and perform a bitwise or on the values:
    final int MISC_TYPE = 1;
    final int HELPER_TYPE = 2;
    final int IN_CHARGE_TYPE = 4;
    . . .

We also tried an enumeration, but we couldn't find a way to reflect the
database set concept in this framework.  The attributeGroup concept
appeared to be a little closer at first glance, but didn't handle the
individual field as a set either.

Our attempts resulted in a types.PersonType class with an instance of
PersonType as VALUE_1 and the int occupying VALUE_1_TYPE = 1; etc for
the other enum values.

I'm sure this has been done plenty of times - can someone please share??

Cheers,
Tim Ruppert && Ben Cox

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to