org.finos.legend.pure.generated.Root_meta_external_store_service_tests_domain_S_Trade_Impl Maven / Gradle / Ivy
The newest version!
package org.finos.legend.pure.generated;
import org.eclipse.collections.api.RichIterable;
import org.eclipse.collections.api.factory.Lists;
import org.eclipse.collections.api.factory.Maps;
import org.eclipse.collections.api.list.ListIterable;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.api.map.MutableMap;
import org.finos.legend.pure.m3.execution.ExecutionSupport;
import org.finos.legend.pure.m4.ModelRepository;
import org.finos.legend.pure.m4.coreinstance.CoreInstance;
import org.finos.legend.pure.m4.coreinstance.SourceInformation;
import org.finos.legend.pure.m4.coreinstance.factory.CoreInstanceFactory;
import org.finos.legend.pure.runtime.java.compiled.execution.*;
import org.finos.legend.pure.runtime.java.compiled.execution.sourceInformation.E_;
import org.finos.legend.pure.runtime.java.compiled.generation.processors.support.*;
import org.finos.legend.pure.runtime.java.compiled.generation.processors.support.coreinstance.ReflectiveCoreInstance;
import org.finos.legend.pure.runtime.java.compiled.generation.processors.support.coreinstance.ValCoreInstance;
import org.finos.legend.pure.runtime.java.compiled.generation.processors.support.coreinstance.GetterOverrideExecutor;
import org.finos.legend.pure.runtime.java.compiled.generation.processors.support.function.*;
import org.finos.legend.pure.runtime.java.compiled.generation.processors.support.function.defended.*;
public class Root_meta_external_store_service_tests_domain_S_Trade_Impl extends Root_meta_pure_metamodel_type_Any_Impl implements Root_meta_external_store_service_tests_domain_S_Trade
{
public static final String tempTypeName = "S_Trade";
private static final String tempFullTypeId = "Root::meta::external::store::service::tests::domain::S_Trade";
private static final KeyIndex KEY_INDEX = keyIndexBuilder(6)
.withKeys(tempFullTypeId, "s_tradeDetails", "s_tradeId", "s_traderDetails")
.withKeyFromAssociation(tempFullTypeId, "s_product")
.withKeys("Root::meta::pure::metamodel::type::Any", "classifierGenericType", "elementOverride")
.build();
private CoreInstance classifier;
public Root_meta_external_store_service_tests_domain_S_Trade_Impl(String id)
{
super(id);
}
public Root_meta_external_store_service_tests_domain_S_Trade_Impl(String name, SourceInformation sourceInformation, CoreInstance classifier)
{
this(name == null ? "Anonymous_NoCounter": name);
this.setSourceInformation(sourceInformation);
this.classifier = classifier;
}
@Override
public CoreInstance getClassifier()
{
return this.classifier;
}
@Override
public RichIterable getKeys()
{
return KEY_INDEX.getKeys();
}
@Override
public ListIterable getRealKeyByName(String name)
{
return KEY_INDEX.getRealKeyByName(name);
}
@Override
public CoreInstance getValueForMetaPropertyToOne(String keyName)
{
switch (keyName)
{
case "classifierGenericType":
{
return ValCoreInstance.toCoreInstance(_classifierGenericType());
}
case "elementOverride":
{
return ValCoreInstance.toCoreInstance(_elementOverride());
}
case "s_product":
{
return ValCoreInstance.toCoreInstance(_s_product());
}
case "s_tradeDetails":
{
return ValCoreInstance.toCoreInstance(_s_tradeDetails());
}
case "s_tradeId":
{
return ValCoreInstance.toCoreInstance(_s_tradeId());
}
case "s_traderDetails":
{
return ValCoreInstance.toCoreInstance(_s_traderDetails());
}
default:
{
return super.getValueForMetaPropertyToOne(keyName);
}
}
}
public Root_meta_external_store_service_tests_domain_S_Trade _elementOverride(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.ElementOverride val)
{
this._elementOverride = val;
return this;
}
public Root_meta_external_store_service_tests_domain_S_Trade _elementOverride(RichIterable val)
{
return _elementOverride(val.getFirst());
}
public Root_meta_external_store_service_tests_domain_S_Trade _elementOverrideRemove()
{
this._elementOverride = null;
return this;
}
public java.lang.String _s_tradeId;
public Root_meta_external_store_service_tests_domain_S_Trade _s_tradeId(java.lang.String val)
{
this._s_tradeId = val;
return this;
}
public Root_meta_external_store_service_tests_domain_S_Trade _s_tradeId(RichIterable val)
{
return _s_tradeId(val.getFirst());
}
public Root_meta_external_store_service_tests_domain_S_Trade _s_tradeIdRemove()
{
this._s_tradeId = null;
return this;
}
public java.lang.String _s_tradeId()
{
return this._s_tradeId;
}
public org.finos.legend.pure.generated.Root_meta_external_store_service_tests_domain_S_Product _s_product;
public Root_meta_external_store_service_tests_domain_S_Trade _s_product(org.finos.legend.pure.generated.Root_meta_external_store_service_tests_domain_S_Product val)
{
if (this._s_product != null) {this._s_product._sever_reverse_s_trades(this);}
this._s_product = val;
if (val != null) {val._reverse_s_trades(this);}
return this;
}
public Root_meta_external_store_service_tests_domain_S_Trade _s_product(RichIterable val)
{
return _s_product(val.getFirst());
}
public Root_meta_external_store_service_tests_domain_S_Trade _s_productRemove()
{
this._s_product = null;
return this;
}
public void _reverse_s_product(org.finos.legend.pure.generated.Root_meta_external_store_service_tests_domain_S_Product val)
{
this._s_product = val;
}
public void _sever_reverse_s_product(org.finos.legend.pure.generated.Root_meta_external_store_service_tests_domain_S_Product val)
{
this._s_product = null;
}
public org.finos.legend.pure.generated.Root_meta_external_store_service_tests_domain_S_Product _s_product()
{
return this._elementOverride() == null || !GetterOverrideExecutor.class.isInstance(this._elementOverride()) ? this._s_product : (org.finos.legend.pure.generated.Root_meta_external_store_service_tests_domain_S_Product)((GetterOverrideExecutor)this._elementOverride()).executeToOne(this, "Root::meta::external::store::service::tests::domain::S_Trade", "s_product");
}
public Root_meta_external_store_service_tests_domain_S_Trade _classifierGenericType(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.GenericType val)
{
this._classifierGenericType = val;
return this;
}
public Root_meta_external_store_service_tests_domain_S_Trade _classifierGenericType(RichIterable val)
{
return _classifierGenericType(val.getFirst());
}
public Root_meta_external_store_service_tests_domain_S_Trade _classifierGenericTypeRemove()
{
this._classifierGenericType = null;
return this;
}
public java.lang.String _s_traderDetails;
public Root_meta_external_store_service_tests_domain_S_Trade _s_traderDetails(java.lang.String val)
{
this._s_traderDetails = val;
return this;
}
public Root_meta_external_store_service_tests_domain_S_Trade _s_traderDetails(RichIterable val)
{
return _s_traderDetails(val.getFirst());
}
public Root_meta_external_store_service_tests_domain_S_Trade _s_traderDetailsRemove()
{
this._s_traderDetails = null;
return this;
}
public java.lang.String _s_traderDetails()
{
return this._s_traderDetails;
}
public java.lang.String _s_tradeDetails;
public Root_meta_external_store_service_tests_domain_S_Trade _s_tradeDetails(java.lang.String val)
{
this._s_tradeDetails = val;
return this;
}
public Root_meta_external_store_service_tests_domain_S_Trade _s_tradeDetails(RichIterable val)
{
return _s_tradeDetails(val.getFirst());
}
public Root_meta_external_store_service_tests_domain_S_Trade _s_tradeDetailsRemove()
{
this._s_tradeDetails = null;
return this;
}
public java.lang.String _s_tradeDetails()
{
return this._s_tradeDetails;
}
public Root_meta_external_store_service_tests_domain_S_Trade copy()
{
return new Root_meta_external_store_service_tests_domain_S_Trade_Impl(this);
}
public Root_meta_external_store_service_tests_domain_S_Trade_Impl(Root_meta_external_store_service_tests_domain_S_Trade src)
{
this("Anonymous_NoCounter");
this.classifier = ((Root_meta_external_store_service_tests_domain_S_Trade_Impl)src).classifier;
this._elementOverride = (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.ElementOverride)((Root_meta_external_store_service_tests_domain_S_Trade_Impl)src)._elementOverride;
this._s_tradeId = (java.lang.String)((Root_meta_external_store_service_tests_domain_S_Trade_Impl)src)._s_tradeId;
this._s_product = (org.finos.legend.pure.generated.Root_meta_external_store_service_tests_domain_S_Product)((Root_meta_external_store_service_tests_domain_S_Trade_Impl)src)._s_product;
if (this._s_product != null)
{
this._s_product._reverse_s_trades(this);
}
this._classifierGenericType = (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.GenericType)((Root_meta_external_store_service_tests_domain_S_Trade_Impl)src)._classifierGenericType;
this._s_traderDetails = (java.lang.String)((Root_meta_external_store_service_tests_domain_S_Trade_Impl)src)._s_traderDetails;
this._s_tradeDetails = (java.lang.String)((Root_meta_external_store_service_tests_domain_S_Trade_Impl)src)._s_tradeDetails;
}
@Override
public String getFullSystemPath()
{
return tempFullTypeId;
}
public Root_meta_external_store_service_tests_domain_S_Trade_Impl _validate(boolean goDeep, org.finos.legend.pure.m4.coreinstance.SourceInformation sourceInformation, final ExecutionSupport es)
{
if (!this.hasCompileState(CompiledSupport.CONSTRAINTS_VALIDATED))
{
this.addCompileState(CompiledSupport.CONSTRAINTS_VALIDATED);
if (goDeep)
{
if (this._s_product() != null){this._s_product()._validate(goDeep, sourceInformation, es);}
}
}
return this;
}
}