|
From: Les A. H. <le...@ha...> - 2004-04-27 19:46:49
|
Hiya folks, I found the PropertyValue class and the PropertyValues interfaces to be quite useful and wanted to use them internally. I needed to subclass the PropertyValue class to provide some custom functionality. These custom subclasses need to be passed over the wire to client applets outside the server vm. Well, I just found out that isn't possible with the way PropertyValue is coded. The PropertyValue class does not implement Serializable and doesn't have a default, no-arg constructor. After some digging around, I found that if the parent class does not implement Serializable, it has to have at least a default, no-arg constructor if any children classes want to be Serializable. The PropertyValue class does not have either. Would there be any harm in making that class JavaBeans compatible and implement Serializable? For now, we're creating duplicate copies of both PropertyValue and PropertyValues in our package structure to get around this problem. I know those classes are primarily meant to be SPI classes, but I didn't think the addition of those things would hurt anyone (and would be nice to boot ;) ) Your thoughts? Thanks again, Les P.S. My requirement is that I have to save generic PropertyValues in the database using Hibernate. A default no-arg constructor and mutator methods for property name and value would make Hibernate happy. |