Class TxnRequest


  • public class TxnRequest
    extends Object
    Holds list of operations in transaction
    Author:
    Ruslan Sennov
    • Constructor Detail

      • TxnRequest

        public TxnRequest()
        Default constructor
      • TxnRequest

        public TxnRequest​(JsonObject json)
        Constructor from JSON
        Parameters:
        json - the JSON
    • Method Detail

      • toJson

        public JsonObject toJson()
        Convert to JSON
        Returns:
        the JSON
      • getOperations

        public List<TxnOperation> getOperations()
        Returns list of transaction operations
        Returns:
        list of transaction operations
      • getOperationsSize

        public int getOperationsSize()
        Returns the number of operations in this request
        Returns:
        the number of operations in this request
      • getOperations

        public TxnOperation getOperations​(int index)
        Returns the operation at the specified position in this list
        Parameters:
        index - index of the operation to return
        Returns:
        the operation at the specified position in this list
      • addOperation

        public TxnRequest addOperation​(TxnOperation operation)
        Adds operation to this request
        Parameters:
        operation - operation to add
        Returns:
        reference to this, for fluency