@groovy.transform.CompileStatic @org.codehaus.groovy.transform.GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION) class GormEntityTransformation extends java.lang.Object
An AST transformation that adds the following features:
- An id and version (if not already present)
- A toString() method (if not already present)
- Associations and association methods (addTo*, removeFrom*) etc.
- Association id getter methods ('userId' for 'user' association)
- Adds the GormEntity and GormValidateable traits
- Named query methods
Modifiers | Name | Description |
---|---|---|
static org.codehaus.groovy.ast.Parameter[] |
ADD_TO_PARAMETERS |
|
static org.codehaus.groovy.ast.ClassNode |
SERIALIZABLE_CLASS_NODE |
|
protected org.codehaus.groovy.control.CompilationUnit |
compilationUnit |
Type Params | Return Type | Name and description |
---|---|---|
|
org.codehaus.groovy.ast.expr.ListExpression |
getOrCreateListProperty(org.codehaus.groovy.ast.ClassNode classNode, java.lang.String name) |
|
protected void |
injectIdProperty(org.codehaus.groovy.ast.ClassNode classNode) |
|
protected void |
injectVersionProperty(org.codehaus.groovy.ast.ClassNode classNode) |
|
protected java.lang.Class |
pickGormEntityTrait(org.codehaus.groovy.ast.ClassNode classNode, org.codehaus.groovy.control.SourceUnit source) |
|
void |
setCompilationUnit(org.codehaus.groovy.control.CompilationUnit compilationUnit) |
|
void |
visit(org.codehaus.groovy.ast.ASTNode[] astNodes, org.codehaus.groovy.control.SourceUnit sourceUnit) |
|
void |
visit(org.codehaus.groovy.ast.ClassNode classNode, org.codehaus.groovy.control.SourceUnit sourceUnit) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |