Class GrailsTransactionAttribute

  • All Implemented Interfaces:
    java.io.Serializable, org.springframework.transaction.interceptor.TransactionAttribute, org.springframework.transaction.TransactionDefinition

    public class GrailsTransactionAttribute
    extends org.springframework.transaction.interceptor.RuleBasedTransactionAttribute
    Extended version of RuleBasedTransactionAttribute that ensures all exception types are rolled back and allows inheritance of setRollbackOnly
    Since:
    3.0
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class org.springframework.transaction.interceptor.RuleBasedTransactionAttribute

        PREFIX_COMMIT_RULE, PREFIX_ROLLBACK_RULE
      • Fields inherited from class org.springframework.transaction.support.DefaultTransactionDefinition

        PREFIX_ISOLATION, PREFIX_PROPAGATION, PREFIX_TIMEOUT, READ_ONLY_MARKER
      • Fields inherited from interface org.springframework.transaction.TransactionDefinition

        ISOLATION_DEFAULT, ISOLATION_READ_COMMITTED, ISOLATION_READ_UNCOMMITTED, ISOLATION_REPEATABLE_READ, ISOLATION_SERIALIZABLE, PROPAGATION_MANDATORY, PROPAGATION_NESTED, PROPAGATION_NEVER, PROPAGATION_NOT_SUPPORTED, PROPAGATION_REQUIRED, PROPAGATION_REQUIRES_NEW, PROPAGATION_SUPPORTS, TIMEOUT_DEFAULT
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isInheritRollbackOnly()  
      boolean rollbackOn​(java.lang.Throwable ex)  
      void setInheritRollbackOnly​(boolean inheritRollbackOnly)  
      • Methods inherited from class org.springframework.transaction.interceptor.RuleBasedTransactionAttribute

        getRollbackRules, setRollbackRules, toString
      • Methods inherited from class org.springframework.transaction.interceptor.DefaultTransactionAttribute

        getAttributeDescription, getDescriptor, getLabels, getQualifier, getTimeoutString, resolveAttributeStrings, setDescriptor, setLabels, setQualifier, setTimeoutString
      • Methods inherited from class org.springframework.transaction.support.DefaultTransactionDefinition

        equals, getDefinitionDescription, getIsolationLevel, getName, getPropagationBehavior, getTimeout, hashCode, isReadOnly, setIsolationLevel, setIsolationLevelName, setName, setPropagationBehavior, setPropagationBehaviorName, setReadOnly, setTimeout
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.springframework.transaction.TransactionDefinition

        getIsolationLevel, getName, getPropagationBehavior, getTimeout, isReadOnly
    • Constructor Detail

      • GrailsTransactionAttribute

        public GrailsTransactionAttribute()
      • GrailsTransactionAttribute

        public GrailsTransactionAttribute​(int propagationBehavior,
                                          java.util.List<org.springframework.transaction.interceptor.RollbackRuleAttribute> rollbackRules)
      • GrailsTransactionAttribute

        public GrailsTransactionAttribute​(org.springframework.transaction.interceptor.TransactionAttribute other)
      • GrailsTransactionAttribute

        public GrailsTransactionAttribute​(org.springframework.transaction.TransactionDefinition other)
      • GrailsTransactionAttribute

        public GrailsTransactionAttribute​(org.springframework.transaction.interceptor.RuleBasedTransactionAttribute other)
    • Method Detail

      • rollbackOn

        public boolean rollbackOn​(java.lang.Throwable ex)
        Specified by:
        rollbackOn in interface org.springframework.transaction.interceptor.TransactionAttribute
        Overrides:
        rollbackOn in class org.springframework.transaction.interceptor.RuleBasedTransactionAttribute
      • isInheritRollbackOnly

        public boolean isInheritRollbackOnly()
      • setInheritRollbackOnly

        public void setInheritRollbackOnly​(boolean inheritRollbackOnly)