grails.gorm.async.AsyncEntity.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grace-datastore-gorm-async Show documentation
Show all versions of grace-datastore-gorm-async Show documentation
Grace Data : Grace Datastore Gorm Async
The newest version!
package grails.gorm.async
import groovy.transform.CompileStatic
import org.grails.datastore.gorm.GormEnhancer
import org.grails.datastore.gorm.GormEntity
import org.grails.datastore.gorm.async.GormAsyncStaticApi
/**
* Adds Grails Async features to an entity that implements this trait, including the ability to run GORM tasks in a separate thread
*
* @author Graeme Rocher
* @since 6.1
*/
@CompileStatic
trait AsyncEntity extends GormEntity {
/**
* @return The async version of the GORM static API
*/
static GormAsyncStaticApi getAsync() {
return new GormAsyncStaticApi(GormEnhancer.findStaticApi(this))
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy