GrailsTransactionTemplate (Grails 2.3.8)
Date: 2014-04-24

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

## org.codehaus.groovy.grails.orm.support
[Groovy] Class GrailsTransactionTemplate

    java.lang.Object
      org.codehaus.groovy.grails.orm.support.GrailsTransactionTemplate

    @groovy.transform.CompileStatic
    class GrailsTransactionTemplate
    extends java.lang.Object

Template class that simplifies programmatic transaction demarcation and transaction exception handling.

Authors:
  Kazuki YAMAMOTO

Nested Class Summary
`static class` | `GrailsTransactionTemplate.ThrowableHolder` Internal holder class for a Throwable, used as a return value from a TransactionCallback (to be subsequently unwrapped again).
`static class` | `GrailsTransactionTemplate.ThrowableHolderException` Internal holder class for a Throwable, used as a RuntimeException to be thrown from a TransactionCallback (and subsequently unwrapped again).

Constructor Summary
`GrailsTransactionTemplate(org.springframework.transaction.PlatformTransactionManager transactionManager)`
`GrailsTransactionTemplate(org.springframework.transaction.PlatformTransactionManager transactionManager, org.springframework.transaction.TransactionDefinition transactionDefinition)`
`GrailsTransactionTemplate(org.springframework.transaction.PlatformTransactionManager transactionManager, org.springframework.transaction.interceptor.TransactionAttribute transactionAttribute)`

Method Summary
`java.lang.Object` | `execute(groovy.lang.Closure action)`

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()

Constructor Detail

### GrailsTransactionTemplate

    GrailsTransactionTemplate(org.springframework.transaction.PlatformTransactionManager transactionManager)

### GrailsTransactionTemplate

    GrailsTransactionTemplate(org.springframework.transaction.PlatformTransactionManager transactionManager, org.springframework.transaction.TransactionDefinition transactionDefinition)

### GrailsTransactionTemplate

    GrailsTransactionTemplate(org.springframework.transaction.PlatformTransactionManager transactionManager, org.springframework.transaction.interceptor.TransactionAttribute transactionAttribute)

Method Detail

### execute

    java.lang.Object execute(groovy.lang.Closure action)

Groovy Documentation