Record Class CreateUpdatePositionDTO
java.lang.Object
java.lang.Record
com.bluebell.greenhouse.platform.models.api.dto.position.CreateUpdatePositionDTO
- Record Components:
positionFamily- position familypositionType- position typeoptionType- option typestrikePrice- option strike priceexpirationDate- option expiration datecontractMultiplier- units represented by one option contractoptionContractCode- optional broker or exchange option contract identifiersymbol- position symbolpositionOpened- position open datepositionName- position namesourceSystem- optional imported source namespaceexternalPositionKey- optional stable external position identitysourceReference- optional raw upstream referencepositionComment- position commentstrategyUid- optional assigned strategy uidstrategyReferenceCode- optional assigned strategy reference codestopLoss- stop losstakeProfit- take profit
public record CreateUpdatePositionDTO(@NotBlank @Size(max=255) String positionFamily, @Size(max=255) String positionType, @Size(max=255) String optionType, @Positive @DecimalMax("999999999") Double strikePrice, @Size(max=255) String expirationDate, @Positive @DecimalMax("999999999") Double contractMultiplier, @Size(max=255) String optionContractCode, @NotBlank @Size(min=1,max=25) String symbol, @NotBlank @Size(max=255) String positionOpened, @NotBlank @Size(max=75) String positionName, @Size(max=255) String sourceSystem, @Size(max=255) String externalPositionKey, @Size(max=255) String sourceReference, String positionComment, @Size(max=255) String strategyUid, @Size(max=255) String strategyReferenceCode, @PositiveOrZero @DecimalMax("999999999") double stopLoss, @PositiveOrZero @DecimalMax("999999999") double takeProfit)
extends Record
Request object for creating and updating
Positions.- Version:
- 3.0.1
- Author:
- Stephen Prizio
-
Constructor Summary
ConstructorsConstructorDescriptionCreateUpdatePositionDTO(@NotBlank @Size(max=255) String positionFamily, @Size(max=255) String positionType, @Size(max=255) String optionType, @Positive @DecimalMax("999999999") Double strikePrice, @Size(max=255) String expirationDate, @Positive @DecimalMax("999999999") Double contractMultiplier, @Size(max=255) String optionContractCode, @NotBlank @Size(min=1,max=25) String symbol, @NotBlank @Size(max=255) String positionOpened, @NotBlank @Size(max=75) String positionName, @Size(max=255) String sourceSystem, @Size(max=255) String externalPositionKey, @Size(max=255) String sourceReference, String positionComment, @Size(max=255) String strategyUid, @Size(max=255) String strategyReferenceCode, @PositiveOrZero @DecimalMax("999999999") double stopLoss, @PositiveOrZero @DecimalMax("999999999") double takeProfit) Creates an instance of aCreateUpdatePositionDTOrecord class. -
Method Summary
Modifier and TypeMethodDescription@Positive @DecimalMax("999999999") DoubleReturns the value of thecontractMultiplierrecord component.final booleanIndicates whether some other object is "equal to" this one.@Size(max=255) StringReturns the value of theexpirationDaterecord component.@Size(max=255) StringReturns the value of theexternalPositionKeyrecord component.final inthashCode()Returns a hash code value for this object.@Size(max=255) StringReturns the value of theoptionContractCoderecord component.@Size(max=255) StringReturns the value of theoptionTyperecord component.Returns the value of thepositionCommentrecord component.@NotBlank @Size(max=255) StringReturns the value of thepositionFamilyrecord component.@NotBlank @Size(max=75) StringReturns the value of thepositionNamerecord component.@NotBlank @Size(max=255) StringReturns the value of thepositionOpenedrecord component.@Size(max=255) StringReturns the value of thepositionTyperecord component.@Size(max=255) StringReturns the value of thesourceReferencerecord component.@Size(max=255) StringReturns the value of thesourceSystemrecord component.@PositiveOrZero @DecimalMax("999999999") doublestopLoss()Returns the value of thestopLossrecord component.@Size(max=255) StringReturns the value of thestrategyReferenceCoderecord component.@Size(max=255) StringReturns the value of thestrategyUidrecord component.@Positive @DecimalMax("999999999") DoubleReturns the value of thestrikePricerecord component.@NotBlank @Size(min=1,max=25) Stringsymbol()Returns the value of thesymbolrecord component.@PositiveOrZero @DecimalMax("999999999") doubleReturns the value of thetakeProfitrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CreateUpdatePositionDTO
public CreateUpdatePositionDTO(@NotBlank @Size(max=255) @NotBlank @Size(max=255) String positionFamily, @Size(max=255) @Size(max=255) String positionType, @Size(max=255) @Size(max=255) String optionType, @Positive @DecimalMax("999999999") @Positive @DecimalMax("999999999") Double strikePrice, @Size(max=255) @Size(max=255) String expirationDate, @Positive @DecimalMax("999999999") @Positive @DecimalMax("999999999") Double contractMultiplier, @Size(max=255) @Size(max=255) String optionContractCode, @NotBlank @Size(min=1,max=25) @NotBlank @Size(min=1,max=25) String symbol, @NotBlank @Size(max=255) @NotBlank @Size(max=255) String positionOpened, @NotBlank @Size(max=75) @NotBlank @Size(max=75) String positionName, @Size(max=255) @Size(max=255) String sourceSystem, @Size(max=255) @Size(max=255) String externalPositionKey, @Size(max=255) @Size(max=255) String sourceReference, String positionComment, @Size(max=255) @Size(max=255) String strategyUid, @Size(max=255) @Size(max=255) String strategyReferenceCode, @PositiveOrZero @DecimalMax("999999999") @PositiveOrZero @DecimalMax("999999999") double stopLoss, @PositiveOrZero @DecimalMax("999999999") @PositiveOrZero @DecimalMax("999999999") double takeProfit) Creates an instance of aCreateUpdatePositionDTOrecord class.- Parameters:
positionFamily- the value for thepositionFamilyrecord componentpositionType- the value for thepositionTyperecord componentoptionType- the value for theoptionTyperecord componentstrikePrice- the value for thestrikePricerecord componentexpirationDate- the value for theexpirationDaterecord componentcontractMultiplier- the value for thecontractMultiplierrecord componentoptionContractCode- the value for theoptionContractCoderecord componentsymbol- the value for thesymbolrecord componentpositionOpened- the value for thepositionOpenedrecord componentpositionName- the value for thepositionNamerecord componentsourceSystem- the value for thesourceSystemrecord componentexternalPositionKey- the value for theexternalPositionKeyrecord componentsourceReference- the value for thesourceReferencerecord componentpositionComment- the value for thepositionCommentrecord componentstrategyUid- the value for thestrategyUidrecord componentstrategyReferenceCode- the value for thestrategyReferenceCoderecord componentstopLoss- the value for thestopLossrecord componenttakeProfit- the value for thetakeProfitrecord 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. -
positionFamily
Returns the value of thepositionFamilyrecord component.- Returns:
- the value of the
positionFamilyrecord component
-
positionType
Returns the value of thepositionTyperecord component.- Returns:
- the value of the
positionTyperecord component
-
optionType
Returns the value of theoptionTyperecord component.- Returns:
- the value of the
optionTyperecord component
-
strikePrice
Returns the value of thestrikePricerecord component.- Returns:
- the value of the
strikePricerecord component
-
expirationDate
Returns the value of theexpirationDaterecord component.- Returns:
- the value of the
expirationDaterecord component
-
contractMultiplier
@Positive @DecimalMax("999999999") public @Positive @DecimalMax("999999999") Double contractMultiplier()Returns the value of thecontractMultiplierrecord component.- Returns:
- the value of the
contractMultiplierrecord component
-
optionContractCode
Returns the value of theoptionContractCoderecord component.- Returns:
- the value of the
optionContractCoderecord component
-
symbol
-
positionOpened
Returns the value of thepositionOpenedrecord component.- Returns:
- the value of the
positionOpenedrecord component
-
positionName
Returns the value of thepositionNamerecord component.- Returns:
- the value of the
positionNamerecord component
-
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
-
sourceReference
Returns the value of thesourceReferencerecord component.- Returns:
- the value of the
sourceReferencerecord component
-
positionComment
Returns the value of thepositionCommentrecord component.- Returns:
- the value of the
positionCommentrecord component
-
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
-
stopLoss
-
takeProfit
@PositiveOrZero @DecimalMax("999999999") public @PositiveOrZero @DecimalMax("999999999") double takeProfit()Returns the value of thetakeProfitrecord component.- Returns:
- the value of the
takeProfitrecord component
-