/**
* Copyright (C) 2014 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.solutions.component;
import java.io.File;
import java.net.URL;
import java.util.LinkedHashMap;
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.component.ComponentRepository;
import com.opengamma.component.factory.AbstractComponentFactory;
import com.opengamma.integration.regression.DatabaseRestore;
import com.opengamma.integration.regression.FudgeXMLFormat;
import com.opengamma.integration.regression.RegressionIO;
import com.opengamma.integration.regression.ZipFileRegressionIO;
import com.opengamma.master.config.ConfigMaster;
import com.opengamma.master.convention.ConventionMaster;
import com.opengamma.master.exchange.ExchangeMaster;
import com.opengamma.master.historicaltimeseries.HistoricalTimeSeriesMaster;
import com.opengamma.master.holiday.HolidayMaster;
import com.opengamma.master.legalentity.LegalEntityMaster;
import com.opengamma.master.marketdatasnapshot.MarketDataSnapshotMaster;
import com.opengamma.master.portfolio.PortfolioMaster;
import com.opengamma.master.position.PositionMaster;
import com.opengamma.master.security.SecurityMaster;
/**
* Populate masters with sample data by parsing and persisting xml
*/
@BeanDefinition
public class FullDatabaseRestoreComponentFactory extends AbstractComponentFactory {
@PropertyDefinition(validate = "notNull")
private SecurityMaster _securityMaster;
@PropertyDefinition(validate = "notNull")
private PositionMaster _positionMaster;
@PropertyDefinition(validate = "notNull")
private PortfolioMaster _portfolioMaster;
@PropertyDefinition(validate = "notNull")
private ConfigMaster _configMaster;
@PropertyDefinition(validate = "notNull")
private HistoricalTimeSeriesMaster _historicalTimeSeriesMaster;
@PropertyDefinition(validate = "notNull")
private HolidayMaster _holidayMaster;
@PropertyDefinition(validate = "notNull")
private MarketDataSnapshotMaster _marketDataSnapshotMaster;
@PropertyDefinition(validate = "notNull")
private ExchangeMaster _exchangeMaster;
@PropertyDefinition(validate = "notNull")
private LegalEntityMaster _legalEntityMaster;
@PropertyDefinition(validate = "notNull")
private ConventionMaster _conventionMaster;
@PropertyDefinition(validate = "notNull")
private String _path;
@Override
public void init(ComponentRepository repo, LinkedHashMap<String, String> configuration) throws Exception {
URL systemResource = ClassLoader.getSystemResource(getPath());
File zip = new File(systemResource.getPath());
RegressionIO io = ZipFileRegressionIO.createReader(zip, new FudgeXMLFormat());
DatabaseRestore databaseRestore = new DatabaseRestore(io,
getSecurityMaster(),
getPositionMaster(),
getPortfolioMaster(),
getConfigMaster(),
getHistoricalTimeSeriesMaster(),
getHolidayMaster(),
getExchangeMaster(),
getMarketDataSnapshotMaster(),
getLegalEntityMaster(),
getConventionMaster());
databaseRestore.restoreDatabase();
}
//------------------------- AUTOGENERATED START -------------------------
///CLOVER:OFF
/**
* The meta-bean for {@code FullDatabaseRestoreComponentFactory}.
* @return the meta-bean, not null
*/
public static FullDatabaseRestoreComponentFactory.Meta meta() {
return FullDatabaseRestoreComponentFactory.Meta.INSTANCE;
}
static {
JodaBeanUtils.registerMetaBean(FullDatabaseRestoreComponentFactory.Meta.INSTANCE);
}
@Override
public FullDatabaseRestoreComponentFactory.Meta metaBean() {
return FullDatabaseRestoreComponentFactory.Meta.INSTANCE;
}
//-----------------------------------------------------------------------
/**
* Gets the securityMaster.
* @return the value of the property, not null
*/
public SecurityMaster getSecurityMaster() {
return _securityMaster;
}
/**
* Sets the securityMaster.
* @param securityMaster the new value of the property, not null
*/
public void setSecurityMaster(SecurityMaster securityMaster) {
JodaBeanUtils.notNull(securityMaster, "securityMaster");
this._securityMaster = securityMaster;
}
/**
* Gets the the {@code securityMaster} property.
* @return the property, not null
*/
public final Property<SecurityMaster> securityMaster() {
return metaBean().securityMaster().createProperty(this);
}
//-----------------------------------------------------------------------
/**
* Gets the positionMaster.
* @return the value of the property, not null
*/
public PositionMaster getPositionMaster() {
return _positionMaster;
}
/**
* Sets the positionMaster.
* @param positionMaster the new value of the property, not null
*/
public void setPositionMaster(PositionMaster positionMaster) {
JodaBeanUtils.notNull(positionMaster, "positionMaster");
this._positionMaster = positionMaster;
}
/**
* Gets the the {@code positionMaster} property.
* @return the property, not null
*/
public final Property<PositionMaster> positionMaster() {
return metaBean().positionMaster().createProperty(this);
}
//-----------------------------------------------------------------------
/**
* Gets the portfolioMaster.
* @return the value of the property, not null
*/
public PortfolioMaster getPortfolioMaster() {
return _portfolioMaster;
}
/**
* Sets the portfolioMaster.
* @param portfolioMaster the new value of the property, not null
*/
public void setPortfolioMaster(PortfolioMaster portfolioMaster) {
JodaBeanUtils.notNull(portfolioMaster, "portfolioMaster");
this._portfolioMaster = portfolioMaster;
}
/**
* Gets the the {@code portfolioMaster} property.
* @return the property, not null
*/
public final Property<PortfolioMaster> portfolioMaster() {
return metaBean().portfolioMaster().createProperty(this);
}
//-----------------------------------------------------------------------
/**
* Gets the configMaster.
* @return the value of the property, not null
*/
public ConfigMaster getConfigMaster() {
return _configMaster;
}
/**
* Sets the configMaster.
* @param configMaster the new value of the property, not null
*/
public void setConfigMaster(ConfigMaster configMaster) {
JodaBeanUtils.notNull(configMaster, "configMaster");
this._configMaster = configMaster;
}
/**
* Gets the the {@code configMaster} property.
* @return the property, not null
*/
public final Property<ConfigMaster> configMaster() {
return metaBean().configMaster().createProperty(this);
}
//-----------------------------------------------------------------------
/**
* Gets the historicalTimeSeriesMaster.
* @return the value of the property, not null
*/
public HistoricalTimeSeriesMaster getHistoricalTimeSeriesMaster() {
return _historicalTimeSeriesMaster;
}
/**
* Sets the historicalTimeSeriesMaster.
* @param historicalTimeSeriesMaster the new value of the property, not null
*/
public void setHistoricalTimeSeriesMaster(HistoricalTimeSeriesMaster historicalTimeSeriesMaster) {
JodaBeanUtils.notNull(historicalTimeSeriesMaster, "historicalTimeSeriesMaster");
this._historicalTimeSeriesMaster = historicalTimeSeriesMaster;
}
/**
* Gets the the {@code historicalTimeSeriesMaster} property.
* @return the property, not null
*/
public final Property<HistoricalTimeSeriesMaster> historicalTimeSeriesMaster() {
return metaBean().historicalTimeSeriesMaster().createProperty(this);
}
//-----------------------------------------------------------------------
/**
* Gets the holidayMaster.
* @return the value of the property, not null
*/
public HolidayMaster getHolidayMaster() {
return _holidayMaster;
}
/**
* Sets the holidayMaster.
* @param holidayMaster the new value of the property, not null
*/
public void setHolidayMaster(HolidayMaster holidayMaster) {
JodaBeanUtils.notNull(holidayMaster, "holidayMaster");
this._holidayMaster = holidayMaster;
}
/**
* Gets the the {@code holidayMaster} property.
* @return the property, not null
*/
public final Property<HolidayMaster> holidayMaster() {
return metaBean().holidayMaster().createProperty(this);
}
//-----------------------------------------------------------------------
/**
* Gets the marketDataSnapshotMaster.
* @return the value of the property, not null
*/
public MarketDataSnapshotMaster getMarketDataSnapshotMaster() {
return _marketDataSnapshotMaster;
}
/**
* Sets the marketDataSnapshotMaster.
* @param marketDataSnapshotMaster the new value of the property, not null
*/
public void setMarketDataSnapshotMaster(MarketDataSnapshotMaster marketDataSnapshotMaster) {
JodaBeanUtils.notNull(marketDataSnapshotMaster, "marketDataSnapshotMaster");
this._marketDataSnapshotMaster = marketDataSnapshotMaster;
}
/**
* Gets the the {@code marketDataSnapshotMaster} property.
* @return the property, not null
*/
public final Property<MarketDataSnapshotMaster> marketDataSnapshotMaster() {
return metaBean().marketDataSnapshotMaster().createProperty(this);
}
//-----------------------------------------------------------------------
/**
* Gets the exchangeMaster.
* @return the value of the property, not null
*/
public ExchangeMaster getExchangeMaster() {
return _exchangeMaster;
}
/**
* Sets the exchangeMaster.
* @param exchangeMaster the new value of the property, not null
*/
public void setExchangeMaster(ExchangeMaster exchangeMaster) {
JodaBeanUtils.notNull(exchangeMaster, "exchangeMaster");
this._exchangeMaster = exchangeMaster;
}
/**
* Gets the the {@code exchangeMaster} property.
* @return the property, not null
*/
public final Property<ExchangeMaster> exchangeMaster() {
return metaBean().exchangeMaster().createProperty(this);
}
//-----------------------------------------------------------------------
/**
* Gets the legalEntityMaster.
* @return the value of the property, not null
*/
public LegalEntityMaster getLegalEntityMaster() {
return _legalEntityMaster;
}
/**
* Sets the legalEntityMaster.
* @param legalEntityMaster the new value of the property, not null
*/
public void setLegalEntityMaster(LegalEntityMaster legalEntityMaster) {
JodaBeanUtils.notNull(legalEntityMaster, "legalEntityMaster");
this._legalEntityMaster = legalEntityMaster;
}
/**
* Gets the the {@code legalEntityMaster} property.
* @return the property, not null
*/
public final Property<LegalEntityMaster> legalEntityMaster() {
return metaBean().legalEntityMaster().createProperty(this);
}
//-----------------------------------------------------------------------
/**
* Gets the conventionMaster.
* @return the value of the property, not null
*/
public ConventionMaster getConventionMaster() {
return _conventionMaster;
}
/**
* Sets the conventionMaster.
* @param conventionMaster the new value of the property, not null
*/
public void setConventionMaster(ConventionMaster conventionMaster) {
JodaBeanUtils.notNull(conventionMaster, "conventionMaster");
this._conventionMaster = conventionMaster;
}
/**
* Gets the the {@code conventionMaster} property.
* @return the property, not null
*/
public final Property<ConventionMaster> conventionMaster() {
return metaBean().conventionMaster().createProperty(this);
}
//-----------------------------------------------------------------------
/**
* Gets the path.
* @return the value of the property, not null
*/
public String getPath() {
return _path;
}
/**
* Sets the path.
* @param path the new value of the property, not null
*/
public void setPath(String path) {
JodaBeanUtils.notNull(path, "path");
this._path = path;
}
/**
* Gets the the {@code path} property.
* @return the property, not null
*/
public final Property<String> path() {
return metaBean().path().createProperty(this);
}
//-----------------------------------------------------------------------
@Override
public FullDatabaseRestoreComponentFactory clone() {
return JodaBeanUtils.cloneAlways(this);
}
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj != null && obj.getClass() == this.getClass()) {
FullDatabaseRestoreComponentFactory other = (FullDatabaseRestoreComponentFactory) obj;
return JodaBeanUtils.equal(getSecurityMaster(), other.getSecurityMaster()) &&
JodaBeanUtils.equal(getPositionMaster(), other.getPositionMaster()) &&
JodaBeanUtils.equal(getPortfolioMaster(), other.getPortfolioMaster()) &&
JodaBeanUtils.equal(getConfigMaster(), other.getConfigMaster()) &&
JodaBeanUtils.equal(getHistoricalTimeSeriesMaster(), other.getHistoricalTimeSeriesMaster()) &&
JodaBeanUtils.equal(getHolidayMaster(), other.getHolidayMaster()) &&
JodaBeanUtils.equal(getMarketDataSnapshotMaster(), other.getMarketDataSnapshotMaster()) &&
JodaBeanUtils.equal(getExchangeMaster(), other.getExchangeMaster()) &&
JodaBeanUtils.equal(getLegalEntityMaster(), other.getLegalEntityMaster()) &&
JodaBeanUtils.equal(getConventionMaster(), other.getConventionMaster()) &&
JodaBeanUtils.equal(getPath(), other.getPath()) &&
super.equals(obj);
}
return false;
}
@Override
public int hashCode() {
int hash = 7;
hash = hash * 31 + JodaBeanUtils.hashCode(getSecurityMaster());
hash = hash * 31 + JodaBeanUtils.hashCode(getPositionMaster());
hash = hash * 31 + JodaBeanUtils.hashCode(getPortfolioMaster());
hash = hash * 31 + JodaBeanUtils.hashCode(getConfigMaster());
hash = hash * 31 + JodaBeanUtils.hashCode(getHistoricalTimeSeriesMaster());
hash = hash * 31 + JodaBeanUtils.hashCode(getHolidayMaster());
hash = hash * 31 + JodaBeanUtils.hashCode(getMarketDataSnapshotMaster());
hash = hash * 31 + JodaBeanUtils.hashCode(getExchangeMaster());
hash = hash * 31 + JodaBeanUtils.hashCode(getLegalEntityMaster());
hash = hash * 31 + JodaBeanUtils.hashCode(getConventionMaster());
hash = hash * 31 + JodaBeanUtils.hashCode(getPath());
return hash ^ super.hashCode();
}
@Override
public String toString() {
StringBuilder buf = new StringBuilder(384);
buf.append("FullDatabaseRestoreComponentFactory{");
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("securityMaster").append('=').append(JodaBeanUtils.toString(getSecurityMaster())).append(',').append(' ');
buf.append("positionMaster").append('=').append(JodaBeanUtils.toString(getPositionMaster())).append(',').append(' ');
buf.append("portfolioMaster").append('=').append(JodaBeanUtils.toString(getPortfolioMaster())).append(',').append(' ');
buf.append("configMaster").append('=').append(JodaBeanUtils.toString(getConfigMaster())).append(',').append(' ');
buf.append("historicalTimeSeriesMaster").append('=').append(JodaBeanUtils.toString(getHistoricalTimeSeriesMaster())).append(',').append(' ');
buf.append("holidayMaster").append('=').append(JodaBeanUtils.toString(getHolidayMaster())).append(',').append(' ');
buf.append("marketDataSnapshotMaster").append('=').append(JodaBeanUtils.toString(getMarketDataSnapshotMaster())).append(',').append(' ');
buf.append("exchangeMaster").append('=').append(JodaBeanUtils.toString(getExchangeMaster())).append(',').append(' ');
buf.append("legalEntityMaster").append('=').append(JodaBeanUtils.toString(getLegalEntityMaster())).append(',').append(' ');
buf.append("conventionMaster").append('=').append(JodaBeanUtils.toString(getConventionMaster())).append(',').append(' ');
buf.append("path").append('=').append(JodaBeanUtils.toString(getPath())).append(',').append(' ');
}
//-----------------------------------------------------------------------
/**
* The meta-bean for {@code FullDatabaseRestoreComponentFactory}.
*/
public static class Meta extends AbstractComponentFactory.Meta {
/**
* The singleton instance of the meta-bean.
*/
static final Meta INSTANCE = new Meta();
/**
* The meta-property for the {@code securityMaster} property.
*/
private final MetaProperty<SecurityMaster> _securityMaster = DirectMetaProperty.ofReadWrite(
this, "securityMaster", FullDatabaseRestoreComponentFactory.class, SecurityMaster.class);
/**
* The meta-property for the {@code positionMaster} property.
*/
private final MetaProperty<PositionMaster> _positionMaster = DirectMetaProperty.ofReadWrite(
this, "positionMaster", FullDatabaseRestoreComponentFactory.class, PositionMaster.class);
/**
* The meta-property for the {@code portfolioMaster} property.
*/
private final MetaProperty<PortfolioMaster> _portfolioMaster = DirectMetaProperty.ofReadWrite(
this, "portfolioMaster", FullDatabaseRestoreComponentFactory.class, PortfolioMaster.class);
/**
* The meta-property for the {@code configMaster} property.
*/
private final MetaProperty<ConfigMaster> _configMaster = DirectMetaProperty.ofReadWrite(
this, "configMaster", FullDatabaseRestoreComponentFactory.class, ConfigMaster.class);
/**
* The meta-property for the {@code historicalTimeSeriesMaster} property.
*/
private final MetaProperty<HistoricalTimeSeriesMaster> _historicalTimeSeriesMaster = DirectMetaProperty.ofReadWrite(
this, "historicalTimeSeriesMaster", FullDatabaseRestoreComponentFactory.class, HistoricalTimeSeriesMaster.class);
/**
* The meta-property for the {@code holidayMaster} property.
*/
private final MetaProperty<HolidayMaster> _holidayMaster = DirectMetaProperty.ofReadWrite(
this, "holidayMaster", FullDatabaseRestoreComponentFactory.class, HolidayMaster.class);
/**
* The meta-property for the {@code marketDataSnapshotMaster} property.
*/
private final MetaProperty<MarketDataSnapshotMaster> _marketDataSnapshotMaster = DirectMetaProperty.ofReadWrite(
this, "marketDataSnapshotMaster", FullDatabaseRestoreComponentFactory.class, MarketDataSnapshotMaster.class);
/**
* The meta-property for the {@code exchangeMaster} property.
*/
private final MetaProperty<ExchangeMaster> _exchangeMaster = DirectMetaProperty.ofReadWrite(
this, "exchangeMaster", FullDatabaseRestoreComponentFactory.class, ExchangeMaster.class);
/**
* The meta-property for the {@code legalEntityMaster} property.
*/
private final MetaProperty<LegalEntityMaster> _legalEntityMaster = DirectMetaProperty.ofReadWrite(
this, "legalEntityMaster", FullDatabaseRestoreComponentFactory.class, LegalEntityMaster.class);
/**
* The meta-property for the {@code conventionMaster} property.
*/
private final MetaProperty<ConventionMaster> _conventionMaster = DirectMetaProperty.ofReadWrite(
this, "conventionMaster", FullDatabaseRestoreComponentFactory.class, ConventionMaster.class);
/**
* The meta-property for the {@code path} property.
*/
private final MetaProperty<String> _path = DirectMetaProperty.ofReadWrite(
this, "path", FullDatabaseRestoreComponentFactory.class, String.class);
/**
* The meta-properties.
*/
private final Map<String, MetaProperty<?>> _metaPropertyMap$ = new DirectMetaPropertyMap(
this, (DirectMetaPropertyMap) super.metaPropertyMap(),
"securityMaster",
"positionMaster",
"portfolioMaster",
"configMaster",
"historicalTimeSeriesMaster",
"holidayMaster",
"marketDataSnapshotMaster",
"exchangeMaster",
"legalEntityMaster",
"conventionMaster",
"path");
/**
* Restricted constructor.
*/
protected Meta() {
}
@Override
protected MetaProperty<?> metaPropertyGet(String propertyName) {
switch (propertyName.hashCode()) {
case -887218750: // securityMaster
return _securityMaster;
case -1840419605: // positionMaster
return _positionMaster;
case -772274742: // portfolioMaster
return _portfolioMaster;
case 10395716: // configMaster
return _configMaster;
case 173967376: // historicalTimeSeriesMaster
return _historicalTimeSeriesMaster;
case 246258906: // holidayMaster
return _holidayMaster;
case 2090650860: // marketDataSnapshotMaster
return _marketDataSnapshotMaster;
case -652001691: // exchangeMaster
return _exchangeMaster;
case -1944474242: // legalEntityMaster
return _legalEntityMaster;
case 41113907: // conventionMaster
return _conventionMaster;
case 3433509: // path
return _path;
}
return super.metaPropertyGet(propertyName);
}
@Override
public BeanBuilder<? extends FullDatabaseRestoreComponentFactory> builder() {
return new DirectBeanBuilder<FullDatabaseRestoreComponentFactory>(new FullDatabaseRestoreComponentFactory());
}
@Override
public Class<? extends FullDatabaseRestoreComponentFactory> beanType() {
return FullDatabaseRestoreComponentFactory.class;
}
@Override
public Map<String, MetaProperty<?>> metaPropertyMap() {
return _metaPropertyMap$;
}
//-----------------------------------------------------------------------
/**
* The meta-property for the {@code securityMaster} property.
* @return the meta-property, not null
*/
public final MetaProperty<SecurityMaster> securityMaster() {
return _securityMaster;
}
/**
* The meta-property for the {@code positionMaster} property.
* @return the meta-property, not null
*/
public final MetaProperty<PositionMaster> positionMaster() {
return _positionMaster;
}
/**
* The meta-property for the {@code portfolioMaster} property.
* @return the meta-property, not null
*/
public final MetaProperty<PortfolioMaster> portfolioMaster() {
return _portfolioMaster;
}
/**
* The meta-property for the {@code configMaster} property.
* @return the meta-property, not null
*/
public final MetaProperty<ConfigMaster> configMaster() {
return _configMaster;
}
/**
* The meta-property for the {@code historicalTimeSeriesMaster} property.
* @return the meta-property, not null
*/
public final MetaProperty<HistoricalTimeSeriesMaster> historicalTimeSeriesMaster() {
return _historicalTimeSeriesMaster;
}
/**
* The meta-property for the {@code holidayMaster} property.
* @return the meta-property, not null
*/
public final MetaProperty<HolidayMaster> holidayMaster() {
return _holidayMaster;
}
/**
* The meta-property for the {@code marketDataSnapshotMaster} property.
* @return the meta-property, not null
*/
public final MetaProperty<MarketDataSnapshotMaster> marketDataSnapshotMaster() {
return _marketDataSnapshotMaster;
}
/**
* The meta-property for the {@code exchangeMaster} property.
* @return the meta-property, not null
*/
public final MetaProperty<ExchangeMaster> exchangeMaster() {
return _exchangeMaster;
}
/**
* The meta-property for the {@code legalEntityMaster} property.
* @return the meta-property, not null
*/
public final MetaProperty<LegalEntityMaster> legalEntityMaster() {
return _legalEntityMaster;
}
/**
* The meta-property for the {@code conventionMaster} property.
* @return the meta-property, not null
*/
public final MetaProperty<ConventionMaster> conventionMaster() {
return _conventionMaster;
}
/**
* The meta-property for the {@code path} property.
* @return the meta-property, not null
*/
public final MetaProperty<String> path() {
return _path;
}
//-----------------------------------------------------------------------
@Override
protected Object propertyGet(Bean bean, String propertyName, boolean quiet) {
switch (propertyName.hashCode()) {
case -887218750: // securityMaster
return ((FullDatabaseRestoreComponentFactory) bean).getSecurityMaster();
case -1840419605: // positionMaster
return ((FullDatabaseRestoreComponentFactory) bean).getPositionMaster();
case -772274742: // portfolioMaster
return ((FullDatabaseRestoreComponentFactory) bean).getPortfolioMaster();
case 10395716: // configMaster
return ((FullDatabaseRestoreComponentFactory) bean).getConfigMaster();
case 173967376: // historicalTimeSeriesMaster
return ((FullDatabaseRestoreComponentFactory) bean).getHistoricalTimeSeriesMaster();
case 246258906: // holidayMaster
return ((FullDatabaseRestoreComponentFactory) bean).getHolidayMaster();
case 2090650860: // marketDataSnapshotMaster
return ((FullDatabaseRestoreComponentFactory) bean).getMarketDataSnapshotMaster();
case -652001691: // exchangeMaster
return ((FullDatabaseRestoreComponentFactory) bean).getExchangeMaster();
case -1944474242: // legalEntityMaster
return ((FullDatabaseRestoreComponentFactory) bean).getLegalEntityMaster();
case 41113907: // conventionMaster
return ((FullDatabaseRestoreComponentFactory) bean).getConventionMaster();
case 3433509: // path
return ((FullDatabaseRestoreComponentFactory) bean).getPath();
}
return super.propertyGet(bean, propertyName, quiet);
}
@Override
protected void propertySet(Bean bean, String propertyName, Object newValue, boolean quiet) {
switch (propertyName.hashCode()) {
case -887218750: // securityMaster
((FullDatabaseRestoreComponentFactory) bean).setSecurityMaster((SecurityMaster) newValue);
return;
case -1840419605: // positionMaster
((FullDatabaseRestoreComponentFactory) bean).setPositionMaster((PositionMaster) newValue);
return;
case -772274742: // portfolioMaster
((FullDatabaseRestoreComponentFactory) bean).setPortfolioMaster((PortfolioMaster) newValue);
return;
case 10395716: // configMaster
((FullDatabaseRestoreComponentFactory) bean).setConfigMaster((ConfigMaster) newValue);
return;
case 173967376: // historicalTimeSeriesMaster
((FullDatabaseRestoreComponentFactory) bean).setHistoricalTimeSeriesMaster((HistoricalTimeSeriesMaster) newValue);
return;
case 246258906: // holidayMaster
((FullDatabaseRestoreComponentFactory) bean).setHolidayMaster((HolidayMaster) newValue);
return;
case 2090650860: // marketDataSnapshotMaster
((FullDatabaseRestoreComponentFactory) bean).setMarketDataSnapshotMaster((MarketDataSnapshotMaster) newValue);
return;
case -652001691: // exchangeMaster
((FullDatabaseRestoreComponentFactory) bean).setExchangeMaster((ExchangeMaster) newValue);
return;
case -1944474242: // legalEntityMaster
((FullDatabaseRestoreComponentFactory) bean).setLegalEntityMaster((LegalEntityMaster) newValue);
return;
case 41113907: // conventionMaster
((FullDatabaseRestoreComponentFactory) bean).setConventionMaster((ConventionMaster) newValue);
return;
case 3433509: // path
((FullDatabaseRestoreComponentFactory) bean).setPath((String) newValue);
return;
}
super.propertySet(bean, propertyName, newValue, quiet);
}
@Override
protected void validate(Bean bean) {
JodaBeanUtils.notNull(((FullDatabaseRestoreComponentFactory) bean)._securityMaster, "securityMaster");
JodaBeanUtils.notNull(((FullDatabaseRestoreComponentFactory) bean)._positionMaster, "positionMaster");
JodaBeanUtils.notNull(((FullDatabaseRestoreComponentFactory) bean)._portfolioMaster, "portfolioMaster");
JodaBeanUtils.notNull(((FullDatabaseRestoreComponentFactory) bean)._configMaster, "configMaster");
JodaBeanUtils.notNull(((FullDatabaseRestoreComponentFactory) bean)._historicalTimeSeriesMaster, "historicalTimeSeriesMaster");
JodaBeanUtils.notNull(((FullDatabaseRestoreComponentFactory) bean)._holidayMaster, "holidayMaster");
JodaBeanUtils.notNull(((FullDatabaseRestoreComponentFactory) bean)._marketDataSnapshotMaster, "marketDataSnapshotMaster");
JodaBeanUtils.notNull(((FullDatabaseRestoreComponentFactory) bean)._exchangeMaster, "exchangeMaster");
JodaBeanUtils.notNull(((FullDatabaseRestoreComponentFactory) bean)._legalEntityMaster, "legalEntityMaster");
JodaBeanUtils.notNull(((FullDatabaseRestoreComponentFactory) bean)._conventionMaster, "conventionMaster");
JodaBeanUtils.notNull(((FullDatabaseRestoreComponentFactory) bean)._path, "path");
super.validate(bean);
}
}
///CLOVER:ON
//-------------------------- AUTOGENERATED END --------------------------
}