Record Class ImportedPositionEvent

java.lang.Object
java.lang.Record
com.bluebell.greenhouse.sol.models.dto.importers.position.ImportedPositionEvent
Record Components:
sourceSystem - upstream source namespace
externalPositionKey - stable position identity when supplied by the source
externalOrderId - stable order identity when supplied by the source
symbol - symbol ticker
positionFamily - optional explicit PositionFamily
positionOrderType - PositionOrderType
orderDate - event timestamp in UTC
quantity - quantity
price - price
realizedValue - optional imported realized value/profit for the closing portion
stopLoss - optional stop loss
takeProfit - optional take profit
comment - optional comment
strategyUid - optional assigned strategy uid
strategyReferenceCode - optional assigned strategy reference code
sourceReference - optional import reference
sourceSequence - deterministic import sequence

public record ImportedPositionEvent(String sourceSystem, String externalPositionKey, String externalOrderId, String symbol, PositionFamily positionFamily, PositionOrderType positionOrderType, LocalDateTime orderDate, double quantity, double price, Double realizedValue, Double stopLoss, Double takeProfit, String comment, String strategyUid, String strategyReferenceCode, String sourceReference, int sourceSequence) extends Record
Represents a normalized import event for reconstructing Positions.
Version:
2.0.6
Author:
Stephen Prizio
  • Constructor Details

    • ImportedPositionEvent

      public ImportedPositionEvent(String sourceSystem, String externalPositionKey, String externalOrderId, String symbol, PositionFamily positionFamily, PositionOrderType positionOrderType, LocalDateTime orderDate, double quantity, double price, Double realizedValue, Double stopLoss, Double takeProfit, String comment, String strategyUid, String strategyReferenceCode, String sourceReference, int sourceSequence)
      Creates an instance of a ImportedPositionEvent record class.
      Parameters:
      sourceSystem - the value for the sourceSystem record component
      externalPositionKey - the value for the externalPositionKey record component
      externalOrderId - the value for the externalOrderId record component
      symbol - the value for the symbol record component
      positionFamily - the value for the positionFamily record component
      positionOrderType - the value for the positionOrderType record component
      orderDate - the value for the orderDate record component
      quantity - the value for the quantity record component
      price - the value for the price record component
      realizedValue - the value for the realizedValue record component
      stopLoss - the value for the stopLoss record component
      takeProfit - the value for the takeProfit record component
      comment - the value for the comment record component
      strategyUid - the value for the strategyUid record component
      strategyReferenceCode - the value for the strategyReferenceCode record component
      sourceReference - the value for the sourceReference record component
      sourceSequence - the value for the sourceSequence 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.
    • sourceSystem

      public String sourceSystem()
      Returns the value of the sourceSystem record component.
      Returns:
      the value of the sourceSystem record component
    • externalPositionKey

      public String externalPositionKey()
      Returns the value of the externalPositionKey record component.
      Returns:
      the value of the externalPositionKey record component
    • externalOrderId

      public String externalOrderId()
      Returns the value of the externalOrderId record component.
      Returns:
      the value of the externalOrderId record component
    • symbol

      public String symbol()
      Returns the value of the symbol record component.
      Returns:
      the value of the symbol record component
    • positionFamily

      public PositionFamily positionFamily()
      Returns the value of the positionFamily record component.
      Returns:
      the value of the positionFamily record component
    • positionOrderType

      public PositionOrderType positionOrderType()
      Returns the value of the positionOrderType record component.
      Returns:
      the value of the positionOrderType record component
    • orderDate

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

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

      public double price()
      Returns the value of the price record component.
      Returns:
      the value of the price record component
    • realizedValue

      public Double realizedValue()
      Returns the value of the realizedValue record component.
      Returns:
      the value of the realizedValue record component
    • stopLoss

      public Double stopLoss()
      Returns the value of the stopLoss record component.
      Returns:
      the value of the stopLoss record component
    • takeProfit

      public Double takeProfit()
      Returns the value of the takeProfit record component.
      Returns:
      the value of the takeProfit record component
    • comment

      public String comment()
      Returns the value of the comment record component.
      Returns:
      the value of the comment record component
    • strategyUid

      public String strategyUid()
      Returns the value of the strategyUid record component.
      Returns:
      the value of the strategyUid record component
    • strategyReferenceCode

      public String strategyReferenceCode()
      Returns the value of the strategyReferenceCode record component.
      Returns:
      the value of the strategyReferenceCode record component
    • sourceReference

      public String sourceReference()
      Returns the value of the sourceReference record component.
      Returns:
      the value of the sourceReference record component
    • sourceSequence

      public int sourceSequence()
      Returns the value of the sourceSequence record component.
      Returns:
      the value of the sourceSequence record component