@CompileStatic trait GormRepoEntity
Main trait for a domain. gets applied to them during startup grails artifact part
Type Params | Return Type | Name and description |
---|---|---|
|
void |
bind(Map args = [:], Map data) |
|
static D |
create(Map args = [:], Map data) Creates, binds and persists and instance |
|
static RepositoryApi<D> |
findRepo() finds the repo bean in the appctx if cachedRepo is null. returns the cachedRepo if its already set |
|
Class |
getEntityClass() |
|
static RepositoryApi<D> |
getRepo() Calls the findRepo(). can be overriden to return the concrete domain Repository |
|
D |
persist(Map args = [:]) |
|
void |
remove(Map args = [:]) |
|
static void |
removeById(Map args = [:], Serializable id) |
|
static void |
setRepo(RepositoryApi<D> repo) |
|
static D |
update(Map args = [:], Map data) |
Creates, binds and persists and instance
finds the repo bean in the appctx if cachedRepo is null. returns the cachedRepo if its already set
Calls the findRepo(). can be overriden to return the concrete domain Repository