/**
* Copyright (C) 2009 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.financial.security.option;
import java.util.Map;
import org.joda.beans.Bean;
import org.joda.beans.BeanBuilder;
import org.joda.beans.BeanDefinition;
import org.joda.beans.JodaBeanUtils;
import org.joda.beans.MetaProperty;
import org.joda.beans.Property;
import org.joda.beans.PropertyDefinition;
import org.joda.beans.impl.direct.DirectBeanBuilder;
import org.joda.beans.impl.direct.DirectMetaProperty;
import org.joda.beans.impl.direct.DirectMetaPropertyMap;
import com.opengamma.financial.security.FinancialSecurity;
import com.opengamma.financial.security.FinancialSecurityVisitor;
import com.opengamma.id.ExternalId;
import com.opengamma.master.security.SecurityDescription;
import com.opengamma.util.money.Currency;
import com.opengamma.util.time.Expiry;
/**
* A security for equity options with a single barrier.
*/
@BeanDefinition
@SecurityDescription(type = EquityBarrierOptionSecurity.SECURITY_TYPE, description = "Equity barrier option")
public class EquityBarrierOptionSecurity extends FinancialSecurity {
/** Serialization version. */
private static final long serialVersionUID = 1L;
/**
* The security type.
*/
public static final String SECURITY_TYPE = "EQUITY_BARRIER_OPTION";
/**
* The option type.
*/
@PropertyDefinition(validate = "notNull")
private OptionType _optionType;
/**
* The strike.
*/
@PropertyDefinition
private double _strike;
/**
* The currency.
*/
@PropertyDefinition(validate = "notNull")
private Currency _currency;
/**
* The underlying identifier.
*/
@PropertyDefinition(validate = "notNull")
private ExternalId _underlyingId;
/**
* The exercise type.
*/
@PropertyDefinition(validate = "notNull")
private ExerciseType _exerciseType;
/**
* The expiry.
*/
@PropertyDefinition(validate = "notNull")
private Expiry _expiry;
/**
* The point value.
*/
@PropertyDefinition
private double _pointValue;
/**
* The exchange.
*/
@PropertyDefinition(validate = "notNull")
private String _exchange;
/**
* The barrier type.
*/
@PropertyDefinition(validate = "notNull")
private BarrierType _barrierType;
/**
* The barrier direction.
*/
@PropertyDefinition(validate = "notNull")
private BarrierDirection _barrierDirection;
/**
* The monitoring type.
*/
@PropertyDefinition(validate = "notNull")
private MonitoringType _monitoringType;
/**
* The sampling frequency.
*/
@PropertyDefinition(validate = "notNull")
private SamplingFrequency _samplingFrequency;
/**
* The barrier level.
*/
@PropertyDefinition(validate = "notNull")
private double _barrierLevel;
EquityBarrierOptionSecurity() { //For builder
super(SECURITY_TYPE);
}
public EquityBarrierOptionSecurity(OptionType optionType, double strike, Currency currency, ExternalId underlyingId,
ExerciseType exerciseType, Expiry expiry, double pointValue, String exchange, BarrierType barrierType,
BarrierDirection barrierDirection, MonitoringType monitoringType, SamplingFrequency samplingFrequency, double barrierLevel) {
super(SECURITY_TYPE);
setOptionType(optionType);
setStrike(strike);
setCurrency(currency);
setUnderlyingId(underlyingId);
setExerciseType(exerciseType);
setExpiry(expiry);
setPointValue(pointValue);
setExchange(exchange);
setBarrierType(barrierType);
setBarrierDirection(barrierDirection);
setMonitoringType(monitoringType);
setSamplingFrequency(samplingFrequency);
setBarrierLevel(barrierLevel);
}
//-------------------------------------------------------------------------
@Override
public final <T> T accept(FinancialSecurityVisitor<T> visitor) {
return visitor.visitEquityBarrierOptionSecurity(this);
}
//------------------------- AUTOGENERATED START -------------------------
///CLOVER:OFF
/**
* The meta-bean for {@code EquityBarrierOptionSecurity}.
* @return the meta-bean, not null
*/
public static EquityBarrierOptionSecurity.Meta meta() {
return EquityBarrierOptionSecurity.Meta.INSTANCE;
}
static {
JodaBeanUtils.registerMetaBean(EquityBarrierOptionSecurity.Meta.INSTANCE);
}
@Override
public EquityBarrierOptionSecurity.Meta metaBean() {
return EquityBarrierOptionSecurity.Meta.INSTANCE;
}
//-----------------------------------------------------------------------
/**
* Gets the option type.
* @return the value of the property, not null
*/
public OptionType getOptionType() {
return _optionType;
}
/**
* Sets the option type.
* @param optionType the new value of the property, not null
*/
public void setOptionType(OptionType optionType) {
JodaBeanUtils.notNull(optionType, "optionType");
this._optionType = optionType;
}
/**
* Gets the the {@code optionType} property.
* @return the property, not null
*/
public final Property<OptionType> optionType() {
return metaBean().optionType().createProperty(this);
}
//-----------------------------------------------------------------------
/**
* Gets the strike.
* @return the value of the property
*/
public double getStrike() {
return _strike;
}
/**
* Sets the strike.
* @param strike the new value of the property
*/
public void setStrike(double strike) {
this._strike = strike;
}
/**
* Gets the the {@code strike} property.
* @return the property, not null
*/
public final Property<Double> strike() {
return metaBean().strike().createProperty(this);
}
//-----------------------------------------------------------------------
/**
* Gets the currency.
* @return the value of the property, not null
*/
public Currency getCurrency() {
return _currency;
}
/**
* Sets the currency.
* @param currency the new value of the property, not null
*/
public void setCurrency(Currency currency) {
JodaBeanUtils.notNull(currency, "currency");
this._currency = currency;
}
/**
* Gets the the {@code currency} property.
* @return the property, not null
*/
public final Property<Currency> currency() {
return metaBean().currency().createProperty(this);
}
//-----------------------------------------------------------------------
/**
* Gets the underlying identifier.
* @return the value of the property, not null
*/
public ExternalId getUnderlyingId() {
return _underlyingId;
}
/**
* Sets the underlying identifier.
* @param underlyingId the new value of the property, not null
*/
public void setUnderlyingId(ExternalId underlyingId) {
JodaBeanUtils.notNull(underlyingId, "underlyingId");
this._underlyingId = underlyingId;
}
/**
* Gets the the {@code underlyingId} property.
* @return the property, not null
*/
public final Property<ExternalId> underlyingId() {
return metaBean().underlyingId().createProperty(this);
}
//-----------------------------------------------------------------------
/**
* Gets the exercise type.
* @return the value of the property, not null
*/
public ExerciseType getExerciseType() {
return _exerciseType;
}
/**
* Sets the exercise type.
* @param exerciseType the new value of the property, not null
*/
public void setExerciseType(ExerciseType exerciseType) {
JodaBeanUtils.notNull(exerciseType, "exerciseType");
this._exerciseType = exerciseType;
}
/**
* Gets the the {@code exerciseType} property.
* @return the property, not null
*/
public final Property<ExerciseType> exerciseType() {
return metaBean().exerciseType().createProperty(this);
}
//-----------------------------------------------------------------------
/**
* Gets the expiry.
* @return the value of the property, not null
*/
public Expiry getExpiry() {
return _expiry;
}
/**
* Sets the expiry.
* @param expiry the new value of the property, not null
*/
public void setExpiry(Expiry expiry) {
JodaBeanUtils.notNull(expiry, "expiry");
this._expiry = expiry;
}
/**
* Gets the the {@code expiry} property.
* @return the property, not null
*/
public final Property<Expiry> expiry() {
return metaBean().expiry().createProperty(this);
}
//-----------------------------------------------------------------------
/**
* Gets the point value.
* @return the value of the property
*/
public double getPointValue() {
return _pointValue;
}
/**
* Sets the point value.
* @param pointValue the new value of the property
*/
public void setPointValue(double pointValue) {
this._pointValue = pointValue;
}
/**
* Gets the the {@code pointValue} property.
* @return the property, not null
*/
public final Property<Double> pointValue() {
return metaBean().pointValue().createProperty(this);
}
//-----------------------------------------------------------------------
/**
* Gets the exchange.
* @return the value of the property, not null
*/
public String getExchange() {
return _exchange;
}
/**
* Sets the exchange.
* @param exchange the new value of the property, not null
*/
public void setExchange(String exchange) {
JodaBeanUtils.notNull(exchange, "exchange");
this._exchange = exchange;
}
/**
* Gets the the {@code exchange} property.
* @return the property, not null
*/
public final Property<String> exchange() {
return metaBean().exchange().createProperty(this);
}
//-----------------------------------------------------------------------
/**
* Gets the barrier type.
* @return the value of the property, not null
*/
public BarrierType getBarrierType() {
return _barrierType;
}
/**
* Sets the barrier type.
* @param barrierType the new value of the property, not null
*/
public void setBarrierType(BarrierType barrierType) {
JodaBeanUtils.notNull(barrierType, "barrierType");
this._barrierType = barrierType;
}
/**
* Gets the the {@code barrierType} property.
* @return the property, not null
*/
public final Property<BarrierType> barrierType() {
return metaBean().barrierType().createProperty(this);
}
//-----------------------------------------------------------------------
/**
* Gets the barrier direction.
* @return the value of the property, not null
*/
public BarrierDirection getBarrierDirection() {
return _barrierDirection;
}
/**
* Sets the barrier direction.
* @param barrierDirection the new value of the property, not null
*/
public void setBarrierDirection(BarrierDirection barrierDirection) {
JodaBeanUtils.notNull(barrierDirection, "barrierDirection");
this._barrierDirection = barrierDirection;
}
/**
* Gets the the {@code barrierDirection} property.
* @return the property, not null
*/
public final Property<BarrierDirection> barrierDirection() {
return metaBean().barrierDirection().createProperty(this);
}
//-----------------------------------------------------------------------
/**
* Gets the monitoring type.
* @return the value of the property, not null
*/
public MonitoringType getMonitoringType() {
return _monitoringType;
}
/**
* Sets the monitoring type.
* @param monitoringType the new value of the property, not null
*/
public void setMonitoringType(MonitoringType monitoringType) {
JodaBeanUtils.notNull(monitoringType, "monitoringType");
this._monitoringType = monitoringType;
}
/**
* Gets the the {@code monitoringType} property.
* @return the property, not null
*/
public final Property<MonitoringType> monitoringType() {
return metaBean().monitoringType().createProperty(this);
}
//-----------------------------------------------------------------------
/**
* Gets the sampling frequency.
* @return the value of the property, not null
*/
public SamplingFrequency getSamplingFrequency() {
return _samplingFrequency;
}
/**
* Sets the sampling frequency.
* @param samplingFrequency the new value of the property, not null
*/
public void setSamplingFrequency(SamplingFrequency samplingFrequency) {
JodaBeanUtils.notNull(samplingFrequency, "samplingFrequency");
this._samplingFrequency = samplingFrequency;
}
/**
* Gets the the {@code samplingFrequency} property.
* @return the property, not null
*/
public final Property<SamplingFrequency> samplingFrequency() {
return metaBean().samplingFrequency().createProperty(this);
}
//-----------------------------------------------------------------------
/**
* Gets the barrier level.
* @return the value of the property, not null
*/
public double getBarrierLevel() {
return _barrierLevel;
}
/**
* Sets the barrier level.
* @param barrierLevel the new value of the property, not null
*/
public void setBarrierLevel(double barrierLevel) {
JodaBeanUtils.notNull(barrierLevel, "barrierLevel");
this._barrierLevel = barrierLevel;
}
/**
* Gets the the {@code barrierLevel} property.
* @return the property, not null
*/
public final Property<Double> barrierLevel() {
return metaBean().barrierLevel().createProperty(this);
}
//-----------------------------------------------------------------------
@Override
public EquityBarrierOptionSecurity clone() {
return JodaBeanUtils.cloneAlways(this);
}
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj != null && obj.getClass() == this.getClass()) {
EquityBarrierOptionSecurity other = (EquityBarrierOptionSecurity) obj;
return JodaBeanUtils.equal(getOptionType(), other.getOptionType()) &&
JodaBeanUtils.equal(getStrike(), other.getStrike()) &&
JodaBeanUtils.equal(getCurrency(), other.getCurrency()) &&
JodaBeanUtils.equal(getUnderlyingId(), other.getUnderlyingId()) &&
JodaBeanUtils.equal(getExerciseType(), other.getExerciseType()) &&
JodaBeanUtils.equal(getExpiry(), other.getExpiry()) &&
JodaBeanUtils.equal(getPointValue(), other.getPointValue()) &&
JodaBeanUtils.equal(getExchange(), other.getExchange()) &&
JodaBeanUtils.equal(getBarrierType(), other.getBarrierType()) &&
JodaBeanUtils.equal(getBarrierDirection(), other.getBarrierDirection()) &&
JodaBeanUtils.equal(getMonitoringType(), other.getMonitoringType()) &&
JodaBeanUtils.equal(getSamplingFrequency(), other.getSamplingFrequency()) &&
JodaBeanUtils.equal(getBarrierLevel(), other.getBarrierLevel()) &&
super.equals(obj);
}
return false;
}
@Override
public int hashCode() {
int hash = 7;
hash = hash * 31 + JodaBeanUtils.hashCode(getOptionType());
hash = hash * 31 + JodaBeanUtils.hashCode(getStrike());
hash = hash * 31 + JodaBeanUtils.hashCode(getCurrency());
hash = hash * 31 + JodaBeanUtils.hashCode(getUnderlyingId());
hash = hash * 31 + JodaBeanUtils.hashCode(getExerciseType());
hash = hash * 31 + JodaBeanUtils.hashCode(getExpiry());
hash = hash * 31 + JodaBeanUtils.hashCode(getPointValue());
hash = hash * 31 + JodaBeanUtils.hashCode(getExchange());
hash = hash * 31 + JodaBeanUtils.hashCode(getBarrierType());
hash = hash * 31 + JodaBeanUtils.hashCode(getBarrierDirection());
hash = hash * 31 + JodaBeanUtils.hashCode(getMonitoringType());
hash = hash * 31 + JodaBeanUtils.hashCode(getSamplingFrequency());
hash = hash * 31 + JodaBeanUtils.hashCode(getBarrierLevel());
return hash ^ super.hashCode();
}
@Override
public String toString() {
StringBuilder buf = new StringBuilder(448);
buf.append("EquityBarrierOptionSecurity{");
int len = buf.length();
toString(buf);
if (buf.length() > len) {
buf.setLength(buf.length() - 2);
}
buf.append('}');
return buf.toString();
}
@Override
protected void toString(StringBuilder buf) {
super.toString(buf);
buf.append("optionType").append('=').append(JodaBeanUtils.toString(getOptionType())).append(',').append(' ');
buf.append("strike").append('=').append(JodaBeanUtils.toString(getStrike())).append(',').append(' ');
buf.append("currency").append('=').append(JodaBeanUtils.toString(getCurrency())).append(',').append(' ');
buf.append("underlyingId").append('=').append(JodaBeanUtils.toString(getUnderlyingId())).append(',').append(' ');
buf.append("exerciseType").append('=').append(JodaBeanUtils.toString(getExerciseType())).append(',').append(' ');
buf.append("expiry").append('=').append(JodaBeanUtils.toString(getExpiry())).append(',').append(' ');
buf.append("pointValue").append('=').append(JodaBeanUtils.toString(getPointValue())).append(',').append(' ');
buf.append("exchange").append('=').append(JodaBeanUtils.toString(getExchange())).append(',').append(' ');
buf.append("barrierType").append('=').append(JodaBeanUtils.toString(getBarrierType())).append(',').append(' ');
buf.append("barrierDirection").append('=').append(JodaBeanUtils.toString(getBarrierDirection())).append(',').append(' ');
buf.append("monitoringType").append('=').append(JodaBeanUtils.toString(getMonitoringType())).append(',').append(' ');
buf.append("samplingFrequency").append('=').append(JodaBeanUtils.toString(getSamplingFrequency())).append(',').append(' ');
buf.append("barrierLevel").append('=').append(JodaBeanUtils.toString(getBarrierLevel())).append(',').append(' ');
}
//-----------------------------------------------------------------------
/**
* The meta-bean for {@code EquityBarrierOptionSecurity}.
*/
public static class Meta extends FinancialSecurity.Meta {
/**
* The singleton instance of the meta-bean.
*/
static final Meta INSTANCE = new Meta();
/**
* The meta-property for the {@code optionType} property.
*/
private final MetaProperty<OptionType> _optionType = DirectMetaProperty.ofReadWrite(
this, "optionType", EquityBarrierOptionSecurity.class, OptionType.class);
/**
* The meta-property for the {@code strike} property.
*/
private final MetaProperty<Double> _strike = DirectMetaProperty.ofReadWrite(
this, "strike", EquityBarrierOptionSecurity.class, Double.TYPE);
/**
* The meta-property for the {@code currency} property.
*/
private final MetaProperty<Currency> _currency = DirectMetaProperty.ofReadWrite(
this, "currency", EquityBarrierOptionSecurity.class, Currency.class);
/**
* The meta-property for the {@code underlyingId} property.
*/
private final MetaProperty<ExternalId> _underlyingId = DirectMetaProperty.ofReadWrite(
this, "underlyingId", EquityBarrierOptionSecurity.class, ExternalId.class);
/**
* The meta-property for the {@code exerciseType} property.
*/
private final MetaProperty<ExerciseType> _exerciseType = DirectMetaProperty.ofReadWrite(
this, "exerciseType", EquityBarrierOptionSecurity.class, ExerciseType.class);
/**
* The meta-property for the {@code expiry} property.
*/
private final MetaProperty<Expiry> _expiry = DirectMetaProperty.ofReadWrite(
this, "expiry", EquityBarrierOptionSecurity.class, Expiry.class);
/**
* The meta-property for the {@code pointValue} property.
*/
private final MetaProperty<Double> _pointValue = DirectMetaProperty.ofReadWrite(
this, "pointValue", EquityBarrierOptionSecurity.class, Double.TYPE);
/**
* The meta-property for the {@code exchange} property.
*/
private final MetaProperty<String> _exchange = DirectMetaProperty.ofReadWrite(
this, "exchange", EquityBarrierOptionSecurity.class, String.class);
/**
* The meta-property for the {@code barrierType} property.
*/
private final MetaProperty<BarrierType> _barrierType = DirectMetaProperty.ofReadWrite(
this, "barrierType", EquityBarrierOptionSecurity.class, BarrierType.class);
/**
* The meta-property for the {@code barrierDirection} property.
*/
private final MetaProperty<BarrierDirection> _barrierDirection = DirectMetaProperty.ofReadWrite(
this, "barrierDirection", EquityBarrierOptionSecurity.class, BarrierDirection.class);
/**
* The meta-property for the {@code monitoringType} property.
*/
private final MetaProperty<MonitoringType> _monitoringType = DirectMetaProperty.ofReadWrite(
this, "monitoringType", EquityBarrierOptionSecurity.class, MonitoringType.class);
/**
* The meta-property for the {@code samplingFrequency} property.
*/
private final MetaProperty<SamplingFrequency> _samplingFrequency = DirectMetaProperty.ofReadWrite(
this, "samplingFrequency", EquityBarrierOptionSecurity.class, SamplingFrequency.class);
/**
* The meta-property for the {@code barrierLevel} property.
*/
private final MetaProperty<Double> _barrierLevel = DirectMetaProperty.ofReadWrite(
this, "barrierLevel", EquityBarrierOptionSecurity.class, Double.TYPE);
/**
* The meta-properties.
*/
private final Map<String, MetaProperty<?>> _metaPropertyMap$ = new DirectMetaPropertyMap(
this, (DirectMetaPropertyMap) super.metaPropertyMap(),
"optionType",
"strike",
"currency",
"underlyingId",
"exerciseType",
"expiry",
"pointValue",
"exchange",
"barrierType",
"barrierDirection",
"monitoringType",
"samplingFrequency",
"barrierLevel");
/**
* Restricted constructor.
*/
protected Meta() {
}
@Override
protected MetaProperty<?> metaPropertyGet(String propertyName) {
switch (propertyName.hashCode()) {
case 1373587791: // optionType
return _optionType;
case -891985998: // strike
return _strike;
case 575402001: // currency
return _currency;
case -771625640: // underlyingId
return _underlyingId;
case -466331342: // exerciseType
return _exerciseType;
case -1289159373: // expiry
return _expiry;
case 1257391553: // pointValue
return _pointValue;
case 1989774883: // exchange
return _exchange;
case 1029043089: // barrierType
return _barrierType;
case 502579592: // barrierDirection
return _barrierDirection;
case -1483652190: // monitoringType
return _monitoringType;
case 1178782005: // samplingFrequency
return _samplingFrequency;
case 1827586573: // barrierLevel
return _barrierLevel;
}
return super.metaPropertyGet(propertyName);
}
@Override
public BeanBuilder<? extends EquityBarrierOptionSecurity> builder() {
return new DirectBeanBuilder<EquityBarrierOptionSecurity>(new EquityBarrierOptionSecurity());
}
@Override
public Class<? extends EquityBarrierOptionSecurity> beanType() {
return EquityBarrierOptionSecurity.class;
}
@Override
public Map<String, MetaProperty<?>> metaPropertyMap() {
return _metaPropertyMap$;
}
//-----------------------------------------------------------------------
/**
* The meta-property for the {@code optionType} property.
* @return the meta-property, not null
*/
public final MetaProperty<OptionType> optionType() {
return _optionType;
}
/**
* The meta-property for the {@code strike} property.
* @return the meta-property, not null
*/
public final MetaProperty<Double> strike() {
return _strike;
}
/**
* The meta-property for the {@code currency} property.
* @return the meta-property, not null
*/
public final MetaProperty<Currency> currency() {
return _currency;
}
/**
* The meta-property for the {@code underlyingId} property.
* @return the meta-property, not null
*/
public final MetaProperty<ExternalId> underlyingId() {
return _underlyingId;
}
/**
* The meta-property for the {@code exerciseType} property.
* @return the meta-property, not null
*/
public final MetaProperty<ExerciseType> exerciseType() {
return _exerciseType;
}
/**
* The meta-property for the {@code expiry} property.
* @return the meta-property, not null
*/
public final MetaProperty<Expiry> expiry() {
return _expiry;
}
/**
* The meta-property for the {@code pointValue} property.
* @return the meta-property, not null
*/
public final MetaProperty<Double> pointValue() {
return _pointValue;
}
/**
* The meta-property for the {@code exchange} property.
* @return the meta-property, not null
*/
public final MetaProperty<String> exchange() {
return _exchange;
}
/**
* The meta-property for the {@code barrierType} property.
* @return the meta-property, not null
*/
public final MetaProperty<BarrierType> barrierType() {
return _barrierType;
}
/**
* The meta-property for the {@code barrierDirection} property.
* @return the meta-property, not null
*/
public final MetaProperty<BarrierDirection> barrierDirection() {
return _barrierDirection;
}
/**
* The meta-property for the {@code monitoringType} property.
* @return the meta-property, not null
*/
public final MetaProperty<MonitoringType> monitoringType() {
return _monitoringType;
}
/**
* The meta-property for the {@code samplingFrequency} property.
* @return the meta-property, not null
*/
public final MetaProperty<SamplingFrequency> samplingFrequency() {
return _samplingFrequency;
}
/**
* The meta-property for the {@code barrierLevel} property.
* @return the meta-property, not null
*/
public final MetaProperty<Double> barrierLevel() {
return _barrierLevel;
}
//-----------------------------------------------------------------------
@Override
protected Object propertyGet(Bean bean, String propertyName, boolean quiet) {
switch (propertyName.hashCode()) {
case 1373587791: // optionType
return ((EquityBarrierOptionSecurity) bean).getOptionType();
case -891985998: // strike
return ((EquityBarrierOptionSecurity) bean).getStrike();
case 575402001: // currency
return ((EquityBarrierOptionSecurity) bean).getCurrency();
case -771625640: // underlyingId
return ((EquityBarrierOptionSecurity) bean).getUnderlyingId();
case -466331342: // exerciseType
return ((EquityBarrierOptionSecurity) bean).getExerciseType();
case -1289159373: // expiry
return ((EquityBarrierOptionSecurity) bean).getExpiry();
case 1257391553: // pointValue
return ((EquityBarrierOptionSecurity) bean).getPointValue();
case 1989774883: // exchange
return ((EquityBarrierOptionSecurity) bean).getExchange();
case 1029043089: // barrierType
return ((EquityBarrierOptionSecurity) bean).getBarrierType();
case 502579592: // barrierDirection
return ((EquityBarrierOptionSecurity) bean).getBarrierDirection();
case -1483652190: // monitoringType
return ((EquityBarrierOptionSecurity) bean).getMonitoringType();
case 1178782005: // samplingFrequency
return ((EquityBarrierOptionSecurity) bean).getSamplingFrequency();
case 1827586573: // barrierLevel
return ((EquityBarrierOptionSecurity) bean).getBarrierLevel();
}
return super.propertyGet(bean, propertyName, quiet);
}
@Override
protected void propertySet(Bean bean, String propertyName, Object newValue, boolean quiet) {
switch (propertyName.hashCode()) {
case 1373587791: // optionType
((EquityBarrierOptionSecurity) bean).setOptionType((OptionType) newValue);
return;
case -891985998: // strike
((EquityBarrierOptionSecurity) bean).setStrike((Double) newValue);
return;
case 575402001: // currency
((EquityBarrierOptionSecurity) bean).setCurrency((Currency) newValue);
return;
case -771625640: // underlyingId
((EquityBarrierOptionSecurity) bean).setUnderlyingId((ExternalId) newValue);
return;
case -466331342: // exerciseType
((EquityBarrierOptionSecurity) bean).setExerciseType((ExerciseType) newValue);
return;
case -1289159373: // expiry
((EquityBarrierOptionSecurity) bean).setExpiry((Expiry) newValue);
return;
case 1257391553: // pointValue
((EquityBarrierOptionSecurity) bean).setPointValue((Double) newValue);
return;
case 1989774883: // exchange
((EquityBarrierOptionSecurity) bean).setExchange((String) newValue);
return;
case 1029043089: // barrierType
((EquityBarrierOptionSecurity) bean).setBarrierType((BarrierType) newValue);
return;
case 502579592: // barrierDirection
((EquityBarrierOptionSecurity) bean).setBarrierDirection((BarrierDirection) newValue);
return;
case -1483652190: // monitoringType
((EquityBarrierOptionSecurity) bean).setMonitoringType((MonitoringType) newValue);
return;
case 1178782005: // samplingFrequency
((EquityBarrierOptionSecurity) bean).setSamplingFrequency((SamplingFrequency) newValue);
return;
case 1827586573: // barrierLevel
((EquityBarrierOptionSecurity) bean).setBarrierLevel((Double) newValue);
return;
}
super.propertySet(bean, propertyName, newValue, quiet);
}
@Override
protected void validate(Bean bean) {
JodaBeanUtils.notNull(((EquityBarrierOptionSecurity) bean)._optionType, "optionType");
JodaBeanUtils.notNull(((EquityBarrierOptionSecurity) bean)._currency, "currency");
JodaBeanUtils.notNull(((EquityBarrierOptionSecurity) bean)._underlyingId, "underlyingId");
JodaBeanUtils.notNull(((EquityBarrierOptionSecurity) bean)._exerciseType, "exerciseType");
JodaBeanUtils.notNull(((EquityBarrierOptionSecurity) bean)._expiry, "expiry");
JodaBeanUtils.notNull(((EquityBarrierOptionSecurity) bean)._exchange, "exchange");
JodaBeanUtils.notNull(((EquityBarrierOptionSecurity) bean)._barrierType, "barrierType");
JodaBeanUtils.notNull(((EquityBarrierOptionSecurity) bean)._barrierDirection, "barrierDirection");
JodaBeanUtils.notNull(((EquityBarrierOptionSecurity) bean)._monitoringType, "monitoringType");
JodaBeanUtils.notNull(((EquityBarrierOptionSecurity) bean)._samplingFrequency, "samplingFrequency");
JodaBeanUtils.notNull(((EquityBarrierOptionSecurity) bean)._barrierLevel, "barrierLevel");
super.validate(bean);
}
}
///CLOVER:ON
//-------------------------- AUTOGENERATED END --------------------------
}