@groovy.transform.CompileStatic class DirtyCheckingTransformer extends java.lang.Object implements groovy.transform.CompilationUnitAware
Transforms a domain class making it possible for the domain class to take responsibility of tracking changes to itself, thus removing the responsibility from the ORM system which would have to maintain parallel state and compare the state of the domain class to the stored state. With this transformation the storage of the state is not necessary as the state is kept in the domain class itself
Modifiers | Name | Description |
---|---|---|
class |
DirtyCheckingTransformer.GetterAndSetter |
Modifiers | Name | Description |
---|---|---|
static org.codehaus.groovy.ast.expr.ConstantExpression |
CONSTANT_NULL |
|
static org.codehaus.groovy.ast.AnnotationNode |
DIRTY_CHECKED_PROPERTY_ANNOTATION_NODE |
|
static org.codehaus.groovy.ast.ClassNode |
DIRTY_CHECKED_PROPERTY_CLASS_NODE |
|
static org.codehaus.groovy.ast.ClassNode |
DIRTY_CHECK_CLASS_NODE |
|
static java.lang.String |
METHOD_NAME_MARK_DIRTY |
|
protected org.codehaus.groovy.control.CompilationUnit |
compilationUnit |
Constructor and description |
---|
DirtyCheckingTransformer
() |
Type Params | Return Type | Name and description |
---|---|---|
|
protected org.codehaus.groovy.ast.expr.MethodCallExpression |
createMarkDirtyMethodCall(org.codehaus.groovy.ast.MethodNode markDirtyMethodNode, java.lang.String propertyName, org.codehaus.groovy.ast.Variable value) |
|
java.lang.String[] |
getArtefactTypes() |
|
protected DirtyCheckingTransformer.GetterAndSetter |
getGetterAndSetterForPropertyName(java.util.LinkedHashMap<java.lang.String, GetterAndSetter> gettersAndSetters, java.lang.String propertyName) |
|
protected boolean |
isAnnotatedWithJavaValidationApi(java.util.List<org.codehaus.groovy.ast.AnnotationNode> annotationNodes) |
|
void |
performInjection(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.classgen.GeneratorContext context, org.codehaus.groovy.ast.ClassNode classNode) |
|
void |
performInjection(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode) |
|
void |
performInjectionOnAnnotatedClass(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode, java.lang.Class traitToInject) |
|
void |
performInjectionOnAnnotatedEntity(org.codehaus.groovy.ast.ClassNode classNode) |
|
void |
setCompilationUnit(org.codehaus.groovy.control.CompilationUnit compilationUnit) |
|
boolean |
shouldInject(java.net.URL url) |
|
protected void |
weaveIntoExistingSetter(java.lang.String propertyName, DirtyCheckingTransformer.GetterAndSetter getterAndSetter, org.codehaus.groovy.ast.MethodNode markDirtyMethodNode) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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() |