Package com.patelheet.capitalengine.api
Record Class TxRecord
java.lang.Object
java.lang.Record
com.patelheet.capitalengine.api.TxRecord
- Record Components:
txId- ledger sequence numbertime- commit timetype- dotted type, for examplemarket.tradememo- plain-language description players seesourcePlugin- the plugin that caused itactor- the player who caused it, if knownreference- idempotency key, if anyreversesTxId- the transaction this one reverses, if anypostings- the legs; they sum to zero
public record TxRecord(long txId, Instant time, String type, String memo, String sourcePlugin, @Nullable UUID actor, @Nullable String reference, @Nullable Long reversesTxId, List<Posting> postings)
extends Record
A committed transaction, as returned by history lookups and carried by events.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable UUIDactor()Returns the value of theactorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.memo()Returns the value of thememorecord component.postings()Returns the value of thepostingsrecord component.@Nullable StringReturns the value of thereferencerecord component.@Nullable LongReturns the value of thereversesTxIdrecord component.Returns the value of thesourcePluginrecord component.time()Returns the value of thetimerecord component.final StringtoString()Returns a string representation of this record class.longtxId()Returns the value of thetxIdrecord component.type()Returns the value of thetyperecord component.
-
Constructor Details
-
TxRecord
public TxRecord(long txId, Instant time, String type, String memo, String sourcePlugin, @Nullable @Nullable UUID actor, @Nullable @Nullable String reference, @Nullable @Nullable Long reversesTxId, List<Posting> postings) Creates an instance of aTxRecordrecord class.- Parameters:
txId- the value for thetxIdrecord componenttime- the value for thetimerecord componenttype- the value for thetyperecord componentmemo- the value for thememorecord componentsourcePlugin- the value for thesourcePluginrecord componentactor- the value for theactorrecord componentreference- the value for thereferencerecord componentreversesTxId- the value for thereversesTxIdrecord componentpostings- the value for thepostingsrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
txId
public long txId()Returns the value of thetxIdrecord component.- Returns:
- the value of the
txIdrecord component
-
time
Returns the value of thetimerecord component.- Returns:
- the value of the
timerecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
memo
Returns the value of thememorecord component.- Returns:
- the value of the
memorecord component
-
sourcePlugin
Returns the value of thesourcePluginrecord component.- Returns:
- the value of the
sourcePluginrecord component
-
actor
Returns the value of theactorrecord component.- Returns:
- the value of the
actorrecord component
-
reference
Returns the value of thereferencerecord component.- Returns:
- the value of the
referencerecord component
-
reversesTxId
Returns the value of thereversesTxIdrecord component.- Returns:
- the value of the
reversesTxIdrecord component
-
postings
Returns the value of thepostingsrecord component.- Returns:
- the value of the
postingsrecord component
-