Record Class ImportedPositionEvent
java.lang.Object
java.lang.Record
com.bluebell.greenhouse.sol.models.dto.importers.position.ImportedPositionEvent
- Record Components:
sourceSystem- upstream source namespaceexternalPositionKey- stable position identity when supplied by the sourceexternalOrderId- stable order identity when supplied by the sourcesymbol- symbol tickerpositionFamily- optional explicitPositionFamilypositionOrderType-PositionOrderTypeorderDate- event timestamp in UTCquantity- quantityprice- pricerealizedValue- optional imported realized value/profit for the closing portionstopLoss- optional stop losstakeProfit- optional take profitcomment- optional commentstrategyUid- optional assigned strategy uidstrategyReferenceCode- optional assigned strategy reference codesourceReference- optional import referencesourceSequence- 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 Summary
ConstructorsConstructorDescriptionImportedPositionEvent(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 aImportedPositionEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncomment()Returns the value of thecommentrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexternalOrderIdrecord component.Returns the value of theexternalPositionKeyrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theorderDaterecord component.Returns the value of thepositionFamilyrecord component.Returns the value of thepositionOrderTyperecord component.doubleprice()Returns the value of thepricerecord component.doublequantity()Returns the value of thequantityrecord component.Returns the value of therealizedValuerecord component.Returns the value of thesourceReferencerecord component.intReturns the value of thesourceSequencerecord component.Returns the value of thesourceSystemrecord component.stopLoss()Returns the value of thestopLossrecord component.Returns the value of thestrategyReferenceCoderecord component.Returns the value of thestrategyUidrecord component.symbol()Returns the value of thesymbolrecord component.Returns the value of thetakeProfitrecord component.final StringtoString()Returns a string representation of this record class.
-
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 aImportedPositionEventrecord class.- Parameters:
sourceSystem- the value for thesourceSystemrecord componentexternalPositionKey- the value for theexternalPositionKeyrecord componentexternalOrderId- the value for theexternalOrderIdrecord componentsymbol- the value for thesymbolrecord componentpositionFamily- the value for thepositionFamilyrecord componentpositionOrderType- the value for thepositionOrderTyperecord componentorderDate- the value for theorderDaterecord componentquantity- the value for thequantityrecord componentprice- the value for thepricerecord componentrealizedValue- the value for therealizedValuerecord componentstopLoss- the value for thestopLossrecord componenttakeProfit- the value for thetakeProfitrecord componentcomment- the value for thecommentrecord componentstrategyUid- the value for thestrategyUidrecord componentstrategyReferenceCode- the value for thestrategyReferenceCoderecord componentsourceReference- the value for thesourceReferencerecord componentsourceSequence- the value for thesourceSequencerecord 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. -
sourceSystem
Returns the value of thesourceSystemrecord component.- Returns:
- the value of the
sourceSystemrecord component
-
externalPositionKey
Returns the value of theexternalPositionKeyrecord component.- Returns:
- the value of the
externalPositionKeyrecord component
-
externalOrderId
Returns the value of theexternalOrderIdrecord component.- Returns:
- the value of the
externalOrderIdrecord component
-
symbol
-
positionFamily
Returns the value of thepositionFamilyrecord component.- Returns:
- the value of the
positionFamilyrecord component
-
positionOrderType
Returns the value of thepositionOrderTyperecord component.- Returns:
- the value of the
positionOrderTyperecord component
-
orderDate
-
quantity
-
price
-
realizedValue
Returns the value of therealizedValuerecord component.- Returns:
- the value of the
realizedValuerecord component
-
stopLoss
-
takeProfit
Returns the value of thetakeProfitrecord component.- Returns:
- the value of the
takeProfitrecord component
-
comment
-
strategyUid
Returns the value of thestrategyUidrecord component.- Returns:
- the value of the
strategyUidrecord component
-
strategyReferenceCode
Returns the value of thestrategyReferenceCoderecord component.- Returns:
- the value of the
strategyReferenceCoderecord component
-
sourceReference
Returns the value of thesourceReferencerecord component.- Returns:
- the value of the
sourceReferencerecord component
-
sourceSequence
public int sourceSequence()Returns the value of thesourceSequencerecord component.- Returns:
- the value of the
sourceSequencerecord component
-