Transforming non-persistent POJO into persistent GRAILS domain class


New member

I googled on this a bit, but found nothing useful / definite:

Lets say I have the following JAVA POJO:
public class LegacyClass {
            private final LegacyEnum myEnum;
            private final Date date; 
            private Map<String, Double> myMap = new LinkedHashMap<String, Double>();

//Getters, setters
How do I go about making this into a domain object (so that I can take advantage of the GORM features)? Especially the legacy enum and Map is bothering me. Off course, I could just make a corresponding (copy) Domain Class in grails and manually copy-populate all the properties, but I’m sure that is not the proper way to do it.

I would be happy if someone could point me in the right direction, also some comments on how to handle the persistence of the one-to-many property myMap would be appreciated.