I did a school project that reads DDL and builds an internal model of the database. From there it inserts random data of the correct type with a variety of strategies for handling foreign keys. One could certainly take the parser and model and write something to generate data accessors for CRUD. Let me know if you'd like to see it all.
At work I use a framework that takes the model from XML (exported from Rose) and uses XSL to generate the Java. Pretty slick if you can tolerate XSL.
But, as mentioned above, this is a big job and it's already been done. I'd see if one of the available packages can do it before I wrote my own.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi