Class Contract<Id,​Data>

  • Type Parameters:
    Id - The generated contract ID class alongside the generated Contract class.
    Data - The containing template's associated record type.
    All Implemented Interfaces:
    Contract
    Direct Known Subclasses:
    ContractWithKey

    public abstract class Contract<Id,​Data>
    extends java.lang.Object
    implements Contract
    A superclass for all codegen-generated Contracts.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.util.Optional<java.lang.String> agreementText
      If defined, the contract's agreement text.
      Data data
      The contract payload, as declared after template X with.
      Id id
      The contract ID retrieved from the event.
      java.util.Set<java.lang.String> observers
      The party IDs of this contract's observers.
      java.util.Set<java.lang.String> signatories
      The party IDs of this contract's signatories.
    • Field Detail

      • id

        public final Id id
        The contract ID retrieved from the event.
      • data

        public final Data data
        The contract payload, as declared after template X with.
      • agreementText

        public final java.util.Optional<java.lang.String> agreementText
        If defined, the contract's agreement text.
      • signatories

        public final java.util.Set<java.lang.String> signatories
        The party IDs of this contract's signatories.
      • observers

        public final java.util.Set<java.lang.String> observers
        The party IDs of this contract's observers.
    • Method Detail

      • getContractTypeId

        public final Identifier getContractTypeId()
        The template or interface ID for this contract or interface view.
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object