Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.transaction.transform
[Groovy] Class TransactionalTransform

    java.lang.Object
      org.codehaus.groovy.grails.transaction.transform.TransactionalTransform

All Implemented Interfaces:
  org.codehaus.groovy.transform.ASTTransformation

    @groovy.transform.CompileStatic
    @org.codehaus.groovy.transform.GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION)
    class TransactionalTransform
    extends java.lang.Object

This AST transform reads the Transactional annotation and transforms method calls by wrapping the body of the method in an execution of GrailsTransactionTemplate.

Authors:
  Graeme Rocher

Since:
  2.3

Field Summary
`static org.codehaus.groovy.ast.ClassNode` | `MY_TYPE`

Method Summary
`protected java.lang.Object` | `applyTransactionalAttributeSettings(org.codehaus.groovy.ast.AnnotationNode annotationNode, org.codehaus.groovy.ast.expr.VariableExpression transactionAttributeVar, org.codehaus.groovy.ast.stmt.BlockStatement methodBody)`
`org.codehaus.groovy.ast.ClassNode` | `getAnnotationClassNode(java.lang.String annotationName)`
`protected org.codehaus.groovy.ast.expr.MethodCallExpression` | `moveOriginalCodeToNewMethod(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode, org.codehaus.groovy.ast.MethodNode methodNode)`
`void` | `visit(org.codehaus.groovy.ast.ASTNode[] astNodes, org.codehaus.groovy.control.SourceUnit source)`
`protected void` | `weaveTransactionManagerAware(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode declaringClassNode)`
`void` | `weaveTransactionalBehavior(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode, org.codehaus.groovy.ast.AnnotationNode annotationNode)`
`protected void` | `weaveTransactionalMethod(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode, org.codehaus.groovy.ast.AnnotationNode annotationNode, org.codehaus.groovy.ast.MethodNode methodNode)`

Methods inherited from 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()

Field Detail

### MY_TYPE

    public static final org.codehaus.groovy.ast.ClassNode MY_TYPE

Method Detail

### applyTransactionalAttributeSettings

    protected java.lang.Object applyTransactionalAttributeSettings(org.codehaus.groovy.ast.AnnotationNode annotationNode, org.codehaus.groovy.ast.expr.VariableExpression transactionAttributeVar, org.codehaus.groovy.ast.stmt.BlockStatement methodBody)

### getAnnotationClassNode

    org.codehaus.groovy.ast.ClassNode getAnnotationClassNode(java.lang.String annotationName)

### moveOriginalCodeToNewMethod

    protected org.codehaus.groovy.ast.expr.MethodCallExpression moveOriginalCodeToNewMethod(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode, org.codehaus.groovy.ast.MethodNode methodNode)

### visit

    @java.lang.Override
    void visit(org.codehaus.groovy.ast.ASTNode[] astNodes, org.codehaus.groovy.control.SourceUnit source)

### weaveTransactionManagerAware

    protected void weaveTransactionManagerAware(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode declaringClassNode)

### weaveTransactionalBehavior

    void weaveTransactionalBehavior(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode, org.codehaus.groovy.ast.AnnotationNode annotationNode)

### weaveTransactionalMethod

    protected void weaveTransactionalMethod(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode, org.codehaus.groovy.ast.AnnotationNode annotationNode, org.codehaus.groovy.ast.MethodNode methodNode)

Groovy Documentation