Storing an integer and ORing is fine. To incorporate this into hibernate you should create a dedicated type (e.g. org.hibernate.usertype.UserType) and a corresponding object.
Once you have create your type and the object (say FetauresType and Features) you can do something like
Code:
MyEntity {
@Type(type = "whatever.FeaturesType")
Features features;
}
and from you description I would suppose that the Features object would be simply
Code:
Features {
private final static SUPPORTS_XML = 0x80;
...
private final int featuresCode;
public boolean supportsXml() {
return featuresCode & SUPPORTS_XML == SUPPORTS_XML;
}
}
HTH, PL