Was there a reason you did not want to simply load the column value into the object and then simply perform the bitwise manipulations there?
******************************************** Steve Ebersole IT Integration Engineer Vignette Corporation 512.741.4195 Visit http://www.vignette.com ******************************************** -----Original Message----- From: Timothy Ruppert [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 6:48 AM To: [EMAIL PROTECTED] Subject: [castor-dev] Mysql set type - Resend - if I need to rephrase please let me know 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 ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
