Class ContainerTransaction

  • All Implemented Interfaces:
    Serializable

    public final class ContainerTransaction
    extends Descriptor
    This descriptor represents a specification of a transactional behavior.
    Author:
    Danny Coward
    See Also:
    Serialized Form
    • Constructor Detail

      • ContainerTransaction

        public ContainerTransaction​(ContainerTransaction other)
        Copy constructor.
      • ContainerTransaction

        public ContainerTransaction​(String transactionAttribute,
                                    String description)
        Create a new transaction descriptor with the given attribute. Throws an IllegalArgumentException if the attribute is not an allowed type. The allowed types are enumeration ny this class.
        Parameters:
        transactionAttribute - .
        description - .
    • Method Detail

      • getTransactionAttribute

        public String getTransactionAttribute()
        The transaction attribute that I specify.
        Returns:
        the transaction attribute.
      • equals

        public boolean equals​(Object other)
        Equality iff the other object is another container transaction with the same transaction attribute.
        Overrides:
        equals in class Object
        Returns:
        true if the objects are equal, false otherwise.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • print

        public void print​(StringBuilder toStringBuilder)
        Returns a formatted String representing my state.
        Overrides:
        print in class Descriptor