domainClass
Purpose
ThedomainClass
plug-in sets up Grails domain classes as prototyped beans in the Spring ApplicationContext
Examples
An example domain class:class Book {
String title
Date releaseDate
Author author
}
Description
Refer to the section on GORM in the Grails user guide which details how to create Grails domain classes.Configured Spring Beans given a domain class ofBook
:
BookValidator
- A org.codehaus.groovy.grails.validation.GrailsDomainClassValidator that validates a domain class' defined constraints.BookPersistentClass
- The java.lang.Class for the domain classBook
BookDomainClass
- The org.codehaus.groovy.grails.commons.GrailsDomainClass instance which understands the conventions defined within a domain class and is used by GORM to perform ORM mapping.Book
- A prototyped bean that will create a new instance ofBook
every time requested. This bean is used to perform auto-wiring of domain classes when constructed with thenew
operator.