Record Class AccountLedgerPositionEventDTO
java.lang.Object
java.lang.Record
com.bluebell.greenhouse.platform.models.api.dto.account.AccountLedgerPositionEventDTO
- Record Components:
positionNumber- position numberpositionName- position nameorderId- stable order identifieroccurredAt- order timestampquantity- order quantityopening- whether the order increases open quantityclosing- whether the order decreases open quantityrealizedGainLoss- 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 Summary
ConstructorsConstructorDescriptionAccountLedgerPositionEventDTO(long positionNumber, String positionName, Long orderId, LocalDateTime occurredAt, double quantity, boolean opening, boolean closing, Double realizedGainLoss) Creates an instance of aAccountLedgerPositionEventDTOrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanclosing()Returns the value of theclosingrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theoccurredAtrecord component.booleanopening()Returns the value of theopeningrecord component.orderId()Returns the value of theorderIdrecord component.Returns the value of thepositionNamerecord component.longReturns the value of thepositionNumberrecord component.doublequantity()Returns the value of thequantityrecord component.Returns the value of therealizedGainLossrecord component.final StringtoString()Returns a string representation of this record class.
-
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 aAccountLedgerPositionEventDTOrecord class.- Parameters:
positionNumber- the value for thepositionNumberrecord componentpositionName- the value for thepositionNamerecord componentorderId- the value for theorderIdrecord componentoccurredAt- the value for theoccurredAtrecord componentquantity- the value for thequantityrecord componentopening- the value for theopeningrecord componentclosing- the value for theclosingrecord componentrealizedGainLoss- the value for therealizedGainLossrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
positionNumber
public long positionNumber()Returns the value of thepositionNumberrecord component.- Returns:
- the value of the
positionNumberrecord component
-
positionName
Returns the value of thepositionNamerecord component.- Returns:
- the value of the
positionNamerecord component
-
orderId
-
occurredAt
Returns the value of theoccurredAtrecord component.- Returns:
- the value of the
occurredAtrecord component
-
quantity
-
opening
-
closing
-
realizedGainLoss
Returns the value of therealizedGainLossrecord component.- Returns:
- the value of the
realizedGainLossrecord component
-