Enum TxnState

  • All Implemented Interfaces:
    Serializable, Comparable<TxnState>

    public enum TxnState
    extends Enum<TxnState>
    Transaction state when ChangeSets are sent to the ChangeSetListener.

    For large transactions multiple ChangeSets can be sent in a batch fashion and in this case all but the last changeSet with have IN_PROGRESS state and the last changeSet will have the COMMITTED or ROLLBACK state.

    • Enum Constant Detail

      • IN_PROGRESS

        public static final TxnState IN_PROGRESS
        The Transaction is still in progress.

        Used when the transaction is large/long and Ebean wants to send out the changeSets in batches and a changeSet is send before the transaction has completed.

      • ROLLBACK

        public static final TxnState ROLLBACK
        The Transaction was rolled back.
    • Method Detail

      • values

        public static TxnState[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TxnState c : TxnState.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TxnState valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getCode

        public String getCode()
        Return the short code for the transaction state.

        C - Committed, R - Rollback and I for In progress.