@CompileStatic class DirtyCheckingTransformer extends java.lang.Object implements 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 ConstantExpression |
CONSTANT_NULL |
|
static AnnotationNode |
DIRTY_CHECKED_PROPERTY_ANNOTATION_NODE |
|
static ClassNode |
DIRTY_CHECKED_PROPERTY_CLASS_NODE |
|
static ClassNode |
DIRTY_CHECK_CLASS_NODE |
|
static java.lang.String |
METHOD_NAME_MARK_DIRTY |
|
protected CompilationUnit |
compilationUnit |
| Constructor and description |
|---|
DirtyCheckingTransformer() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected MethodCallExpression |
createMarkDirtyMethodCall(MethodNode markDirtyMethodNode, java.lang.String propertyName, 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<AnnotationNode> annotationNodes) |
|
void |
performInjection(SourceUnit source, GeneratorContext context, ClassNode classNode) |
|
void |
performInjection(SourceUnit source, ClassNode classNode) |
|
void |
performInjectionOnAnnotatedClass(SourceUnit source, ClassNode classNode, java.lang.Class traitToInject) |
|
void |
performInjectionOnAnnotatedEntity(ClassNode classNode) |
|
void |
setCompilationUnit(CompilationUnit compilationUnit) |
|
boolean |
shouldInject(java.net.URL url) |
|
protected void |
weaveIntoExistingSetter(java.lang.String propertyName, DirtyCheckingTransformer.GetterAndSetter getterAndSetter, MethodNode markDirtyMethodNode) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |