Record Class AccountLedgerPositionEventDTO

java.lang.Object
java.lang.Record
com.bluebell.greenhouse.platform.models.api.dto.account.AccountLedgerPositionEventDTO
Record Components:
positionNumber - position number
positionName - position name
orderId - stable order identifier
occurredAt - order timestamp
quantity - order quantity
opening - whether the order increases open quantity
closing - whether the order decreases open quantity
realizedGainLoss - realized result attributed to the order

public record AccountLedgerPositionEventDTO(long positionNumber, String positionName, Long orderId, LocalDateTime occurredAt, double quantity, boolean opening, boolean closing, Double realizedGainLoss) extends Record
Position-order event used when replaying pending account-ledger activity.
Version:
3.0.1
Author:
Stephen Prizio
  • Constructor Details

    • AccountLedgerPositionEventDTO

      public AccountLedgerPositionEventDTO(long positionNumber, String positionName, Long orderId, LocalDateTime occurredAt, double quantity, boolean opening, boolean closing, Double realizedGainLoss)
      Creates an instance of a AccountLedgerPositionEventDTO record class.
      Parameters:
      positionNumber - the value for the positionNumber record component
      positionName - the value for the positionName record component
      orderId - the value for the orderId record component
      occurredAt - the value for the occurredAt record component
      quantity - the value for the quantity record component
      opening - the value for the opening record component
      closing - the value for the closing record component
      realizedGainLoss - the value for the realizedGainLoss record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • positionNumber

      public long positionNumber()
      Returns the value of the positionNumber record component.
      Returns:
      the value of the positionNumber record component
    • positionName

      public String positionName()
      Returns the value of the positionName record component.
      Returns:
      the value of the positionName record component
    • orderId

      public Long orderId()
      Returns the value of the orderId record component.
      Returns:
      the value of the orderId record component
    • occurredAt

      public LocalDateTime occurredAt()
      Returns the value of the occurredAt record component.
      Returns:
      the value of the occurredAt record component
    • quantity

      public double quantity()
      Returns the value of the quantity record component.
      Returns:
      the value of the quantity record component
    • opening

      public boolean opening()
      Returns the value of the opening record component.
      Returns:
      the value of the opening record component
    • closing

      public boolean closing()
      Returns the value of the closing record component.
      Returns:
      the value of the closing record component
    • realizedGainLoss

      public Double realizedGainLoss()
      Returns the value of the realizedGainLoss record component.
      Returns:
      the value of the realizedGainLoss record component