I've got a legacy database model that frequently uses columns with comma seperated String enumerations, like "cat,dog,bird".
I can't change the db model, but from my object model I'd like to access the list of values stored in one of these columns like a Collection, e.g. I want to use get(), append(), insert(), remove() and iterator().
toString() should yield the original value.
My first thought was to implement a Custom Value Type that internally uses java.util.StringTokenizer. Is this doable? Maybe someone's already implemented it and could post the code?
Where can I get examples for custom value types?
Regards,
Andreas
|