How to access Grails domain classes in Java service layer?
Posted
by batmannavneet
on Stack Overflow
See other posts from Stack Overflow
or by batmannavneet
Published on 2010-04-26T21:38:42Z
Indexed on
2010/04/26
21:53 UTC
Read the original article
Hit count: 268
grails-domain-class
|grails
How can I use grails domain classes (which is in groovy) in service layer which is in Java/Spring.
When using the grails MVC, everything is fine as I can use controller to access domain objects and call CRUD and other dynamic methods on them. But, what I am wondering is is there a clean way to do it from Java - say the service layer. For example, I may want to develop a reporting framework where I need to use domain objects to access the DB.
I Hope the question is clear. This should be a standard problem that everybody must have faced in a reasonably sized project. I am just wondering how it is solved..maybe I am missing something here.
thanks.
© Stack Overflow or respective owner