| commit | 48aeeebd6b3716fa1383ddbb94a3e0c8317e12f1 | [log] [tgz] |
|---|---|---|
| author | Jeff Scott Brown <brownj@objectcomputing.com> | Tue Dec 26 10:04:11 2017 -0600 |
| committer | Jeff Scott Brown <brownj@objectcomputing.com> | Tue Dec 26 10:04:11 2017 -0600 |
| tree | f8859d96652a7f77523507accfe4a0d35ac658e3 | |
| parent | ae8f787827d9eb46f6c2beb7d0676b15efdccfda [diff] |
Kicking off a build with openjdk7
[Grails][Grails] is a framework used to build web applications with the [Groovy][Groovy] programming language. This project provides the plumbings for the GORM API both for Hibernate and for new implementations of GORM ontop of NoSQL datastores. [Grails]: http://grails.org/ [Groovy]: http://groovy.codehaus.org/
See the following links for documentation on the various implementations:
For API documentation see:
For other implementations see the following page.
Below is an example of using GORM for Hibernate in a Groovy script:
@Grab("org.grails:grails-datastore-gorm-hibernate4:3.0.0.RELEASE") @Grab("org.grails:grails-spring:2.3.6") @Grab("com.h2database:h2:1.3.164") import grails.orm.bootstrap.* import grails.persistence.* import org.springframework.jdbc.datasource.DriverManagerDataSource import org.h2.Driver init = new HibernateDatastoreSpringInitializer(Person) def dataSource = new DriverManagerDataSource(Driver.name, "jdbc:h2:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE", 'sa', '') init.configureForDataSource(dataSource) println "Total people = " + Person.count() @Entity class Person { String name static constraints = { name blank:false } }
For further information on the project see the comprehensive [developer guide][Developer Guide]. [Developer Guide]: http://projects.spring.io/grails-data-mapping/manual/index.html
Grails and Groovy are licensed under the terms of the [Apache License, Version 2.0][Apache License, Version 2.0]. [Apache License, Version 2.0]: http://www.apache.org/licenses/LICENSE-2.0.html