Package com.opengamma.strata.product
Class SecurityTrade.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<SecurityTrade>
-
- com.opengamma.strata.product.SecurityTrade.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<SecurityTrade>
- Enclosing class:
- SecurityTrade
public static final class SecurityTrade.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<SecurityTrade>
The bean-builder forSecurityTrade
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SecurityTrade
build()
Object
get(String propertyName)
SecurityTrade.Builder
info(TradeInfo info)
Sets the additional trade information, defaulted to an empty instance.SecurityTrade.Builder
price(double price)
Sets the price agreed when the trade occurred.SecurityTrade.Builder
quantity(double quantity)
Sets the quantity that was traded.SecurityTrade.Builder
securityId(SecurityId securityId)
Sets the identifier of the security that was traded.SecurityTrade.Builder
set(String propertyName, Object newValue)
SecurityTrade.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
String
toString()
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<SecurityTrade>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<SecurityTrade>
-
set
public SecurityTrade.Builder set(String propertyName, Object newValue)
-
set
public SecurityTrade.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<SecurityTrade>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<SecurityTrade>
-
build
public SecurityTrade build()
-
info
public SecurityTrade.Builder info(TradeInfo info)
Sets the additional trade information, defaulted to an empty instance.This allows additional information to be attached to the trade.
- Parameters:
info
- the new value, not null- Returns:
- this, for chaining, not null
-
securityId
public SecurityTrade.Builder securityId(SecurityId securityId)
Sets the identifier of the security that was traded.This identifier uniquely identifies the security within the system.
- Parameters:
securityId
- the new value, not null- Returns:
- this, for chaining, not null
-
quantity
public SecurityTrade.Builder quantity(double quantity)
Sets the quantity that was traded.This will be positive if buying and negative if selling.
- Parameters:
quantity
- the new value- Returns:
- this, for chaining, not null
-
price
public SecurityTrade.Builder price(double price)
Sets the price agreed when the trade occurred.This is the price agreed when the trade occurred.
- Parameters:
price
- the new value- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<SecurityTrade>
-
-