@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 |
|
private static java.lang.Class<?>[] |
EMPTY_JAVA_CLASS_ARRAY |
|
static java.lang.String |
METHOD_NAME_MARK_DIRTY |
|
private static java.lang.Class<?>[] |
OBJECT_CLASS_ARG |
|
private static org.codehaus.groovy.ast.ClassNode |
VALIDATION_CONSTRAINT_NODE |
|
private static java.lang.String |
VOID |
|
protected org.codehaus.groovy.control.CompilationUnit |
compilationUnit |
Constructor and description |
---|
DirtyCheckingTransformer
() |
Type Params | Return Type | Name and description |
---|---|---|
|
static void |
|
|
private void |
addDirtyCheckingSetter(org.codehaus.groovy.ast.ClassNode classNode, java.lang.String propertyName, java.lang.String fieldName, org.codehaus.groovy.ast.ClassNode returnType, org.codehaus.groovy.ast.MethodNode markDirtyMethodNode, org.codehaus.groovy.transform.sc.StaticCompilationVisitor staticCompilationVisitor) |
|
private static org.codehaus.groovy.ast.ClassNode |
alignReturnType(org.codehaus.groovy.ast.ClassNode receiver, org.codehaus.groovy.ast.ClassNode originalReturnType) |
|
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) |
|
private boolean |
isDefinedInTransientsNode(java.lang.String propertyName, org.codehaus.groovy.ast.PropertyNode transientPropertyNode) Check if the property is defined in static transients block. |
|
private boolean |
isGetter(java.lang.String methodName, org.codehaus.groovy.ast.MethodNode declaredMethod) |
|
private boolean |
isSetter(java.lang.String methodName, org.codehaus.groovy.ast.MethodNode declaredMethod) |
|
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) |
|
private org.codehaus.groovy.ast.ClassNode |
resolvePropertyReturnType(org.codehaus.groovy.ast.PropertyNode pn, 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() |
Check if the property is defined in static transients block.
propertyName
- The given name of propertytransientPropertyNode
- The property node representing static transients