All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.finos.legend.pure.generated.Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore_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_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore_Impl extends Root_meta_protocols_pure_v1_30_0_metamodel_store_Store_Impl implements Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore
{
    public static final String tempTypeName = "ServiceStore";
    private static final String tempFullTypeId = "Root::meta::protocols::pure::v1_30_0::metamodel::store::service::ServiceStore";
    private static final KeyIndex KEY_INDEX = keyIndexBuilder(10)
           .withKeys(tempFullTypeId, "description", "elements", "securitySchemes")
           .withKeys("Root::meta::protocols::pure::v1_30_0::metamodel::PackageableElement", "_type", "name", "package", "sourceInformation")
           .withKey("Root::meta::protocols::pure::v1_30_0::metamodel::store::Store", "includedStores")
           .withKeys("Root::meta::pure::metamodel::type::Any", "classifierGenericType", "elementOverride")
           .build();
    private CoreInstance classifier;
    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore_Impl(String id)
    {
        super(id);
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore_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 "_type":
            {
                return ValCoreInstance.toCoreInstance(__type());
            }
            case "classifierGenericType":
            {
                return ValCoreInstance.toCoreInstance(_classifierGenericType());
            }
            case "description":
            {
                return ValCoreInstance.toCoreInstance(_description());
            }
            case "elementOverride":
            {
                return ValCoreInstance.toCoreInstance(_elementOverride());
            }
            case "name":
            {
                return ValCoreInstance.toCoreInstance(_name());
            }
            case "package":
            {
                return ValCoreInstance.toCoreInstance(_package());
            }
            case "securitySchemes":
            {
                return ValCoreInstance.toCoreInstance(_securitySchemes());
            }
            case "sourceInformation":
            {
                return ValCoreInstance.toCoreInstance(_sourceInformation());
            }
            default:
            {
                return super.getValueForMetaPropertyToOne(keyName);
            }
        }
    }

    @Override
    public ListIterable getValueForMetaPropertyToMany(String keyName)
    {
        switch (keyName)
        {
            case "elements":
            {
                return ValCoreInstance.toCoreInstances(_elements());
            }
            case "includedStores":
            {
                return ValCoreInstance.toCoreInstances(_includedStores());
            }
            default:
            {
                return super.getValueForMetaPropertyToMany(keyName);
            }
        }
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore __type(java.lang.String val)
    {
        this.__type = val;
        return this;
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore __type(RichIterable val)
    {
        return __type(val.getFirst());
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore __typeRemove()
    {
        this.__type = null;
        return this;
    }


    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _sourceInformation(org.finos.legend.pure.generated.Root_meta_pure_functions_meta_SourceInformation val)
    {
        this._sourceInformation = val;
        return this;
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _sourceInformation(RichIterable val)
    {
        return _sourceInformation(val.getFirst());
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _sourceInformationRemove()
    {
        this._sourceInformation = null;
        return this;
    }


    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _elementOverride(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.ElementOverride val)
    {
        this._elementOverride = val;
        return this;
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _elementOverride(RichIterable val)
    {
        return _elementOverride(val.getFirst());
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _elementOverrideRemove()
    {
        this._elementOverride = null;
        return this;
    }


    public java.lang.String _description;
    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _description(java.lang.String val)
    {
        this._description = val;
        return this;
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _description(RichIterable val)
    {
        return _description(val.getFirst());
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _descriptionRemove()
    {
        this._description = null;
        return this;
    }


    public java.lang.String _description()
    {
        return this._description;
    }

    public org.finos.legend.pure.runtime.java.compiled.generation.processors.support.map.PureMap _securitySchemes;
    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _securitySchemes(org.finos.legend.pure.runtime.java.compiled.generation.processors.support.map.PureMap val)
    {
        this._securitySchemes = val;
        return this;
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _securitySchemes(RichIterable val)
    {
        return _securitySchemes(val.getFirst());
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _securitySchemesRemove()
    {
        this._securitySchemes = null;
        return this;
    }


    public void _reverse_securitySchemes(org.finos.legend.pure.runtime.java.compiled.generation.processors.support.map.PureMap val)
    {
        this._securitySchemes = val;
    }

    public void _sever_reverse_securitySchemes(org.finos.legend.pure.runtime.java.compiled.generation.processors.support.map.PureMap val)
    {
        this._securitySchemes = null;
    }

    public org.finos.legend.pure.runtime.java.compiled.generation.processors.support.map.PureMap _securitySchemes()
    {
        return this._elementOverride() == null || !GetterOverrideExecutor.class.isInstance(this._elementOverride()) ? this._securitySchemes : (org.finos.legend.pure.runtime.java.compiled.generation.processors.support.map.PureMap)((GetterOverrideExecutor)this._elementOverride()).executeToOne(this, "Root::meta::protocols::pure::v1_30_0::metamodel::store::service::ServiceStore", "securitySchemes");
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _name(java.lang.String val)
    {
        this._name = val;
        return this;
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _name(RichIterable val)
    {
        return _name(val.getFirst());
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _nameRemove()
    {
        this._name = null;
        return this;
    }


    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _package(java.lang.String val)
    {
        this._package = val;
        return this;
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _package(RichIterable val)
    {
        return _package(val.getFirst());
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _packageRemove()
    {
        this._package = null;
        return this;
    }


    public RichIterable _elements = Lists.mutable.with();
    private Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _elements(org.finos.legend.pure.generated.Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStoreElement val, boolean add)
    {
        if (val == null)
        {
            if (!add)
            {
                this._elements = Lists.mutable.with();
            }
            return this;
        }
        if (add)
        {
            if (!(this._elements instanceof MutableList))
            {
                this._elements = this._elements.toList();
            }
            ((MutableList)this._elements).add(val);
        }
        else
        {
            this._elements = (val == null ? Lists.mutable.empty() : Lists.mutable.with(val));
        }
        return this;
    }

    private Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _elements(RichIterable val, boolean add)
    {
        if (add)
        {
            if (!(this._elements instanceof MutableList))
            {
                this._elements = this._elements.toList();
            }
            ((MutableList)this._elements).addAllIterable(val);
        }
        else
        {
            this._elements = val;
        }
        return this;
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _elements(RichIterable val)
    {
        return this._elements(val, false);
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _elementsAdd(org.finos.legend.pure.generated.Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStoreElement val)
    {
        return this._elements(Lists.immutable.with(val), true);
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _elementsAddAll(RichIterable val)
    {
        return this._elements(val, true);
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _elementsRemove()
    {
        this._elements = Lists.mutable.empty();
        return this;
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _elementsRemove(org.finos.legend.pure.generated.Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStoreElement val)
    {
        if (!(this._elements instanceof MutableList))
        {
            this._elements = this._elements.toList();
        }
        ((MutableList)this._elements).remove(val);
        return this;
    }


    public void _reverse_elements(org.finos.legend.pure.generated.Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStoreElement val)
    {
        if (!(this._elements instanceof MutableList))
        {
            this._elements = this._elements.toList();
        }
        ((MutableList)this._elements).add(val);
    }

    public void _sever_reverse_elements(org.finos.legend.pure.generated.Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStoreElement val)
    {
        if (!(this._elements instanceof MutableList))
        {
            this._elements = this._elements.toList();
        }
        ((MutableList)this._elements).remove(val);
    }

    public RichIterable _elements()
    {
        return this._elementOverride() == null || !GetterOverrideExecutor.class.isInstance(this._elementOverride()) ? this._elements : (RichIterable)((GetterOverrideExecutor)this._elementOverride()).executeToMany(this, "Root::meta::protocols::pure::v1_30_0::metamodel::store::service::ServiceStore", "elements");
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _classifierGenericType(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.GenericType val)
    {
        this._classifierGenericType = val;
        return this;
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _classifierGenericType(RichIterable val)
    {
        return _classifierGenericType(val.getFirst());
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _classifierGenericTypeRemove()
    {
        this._classifierGenericType = null;
        return this;
    }


    private Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _includedStores(java.lang.String val, boolean add)
    {
        if (add)
        {
            if (!(this._includedStores instanceof MutableList))
            {
                this._includedStores = this._includedStores.toList();
            }
            ((MutableList)this._includedStores).add(val);
        }
        else
        {
            this._includedStores = (val == null ? Lists.mutable.empty() : Lists.mutable.with(val));
        }
        return this;
    }

    private Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _includedStores(RichIterable val, boolean add)
    {
        if (add)
        {
            if (!(this._includedStores instanceof MutableList))
            {
                this._includedStores = this._includedStores.toList();
            }
            ((MutableList)this._includedStores).addAllIterable(val);
        }
        else
        {
            this._includedStores = val;
        }
        return this;
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _includedStores(RichIterable val)
    {
        return this._includedStores(val, false);
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _includedStoresAdd(java.lang.String val)
    {
        return this._includedStores(Lists.immutable.with(val), true);
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _includedStoresAddAll(RichIterable val)
    {
        return this._includedStores(val, true);
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _includedStoresRemove()
    {
        this._includedStores = Lists.mutable.empty();
        return this;
    }

    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore _includedStoresRemove(java.lang.String val)
    {
        if (!(this._includedStores instanceof MutableList))
        {
            this._includedStores = this._includedStores.toList();
        }
        ((MutableList)this._includedStores).remove(val);
        return this;
    }


    
    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore copy()
    {
        return new Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore_Impl(this);
    }
    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore_Impl(Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore src)
    {
        this("Anonymous_NoCounter");
        this.classifier = ((Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore_Impl)src).classifier;
        this.__type = (java.lang.String)((Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore_Impl)src).__type;
        this._sourceInformation = (org.finos.legend.pure.generated.Root_meta_pure_functions_meta_SourceInformation)((Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore_Impl)src)._sourceInformation;
        this._elementOverride = (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.ElementOverride)((Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore_Impl)src)._elementOverride;
        this._description = (java.lang.String)((Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore_Impl)src)._description;
        this._securitySchemes = (org.finos.legend.pure.runtime.java.compiled.generation.processors.support.map.PureMap)((Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore_Impl)src)._securitySchemes;
        this._name = (java.lang.String)((Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore_Impl)src)._name;
        this._package = (java.lang.String)((Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore_Impl)src)._package;
        this._elements = Lists.mutable.ofAll(((Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore_Impl)src)._elements);
        this._classifierGenericType = (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.GenericType)((Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore_Impl)src)._classifierGenericType;
        this._includedStores = Lists.mutable.ofAll(((Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore_Impl)src)._includedStores);
    }
public boolean pureEquals(Object o)
{
    if (this == o)
    {
        return true;
    }
    if (o == null || getClass() != o.getClass())
    {
        return false;
    }
    Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore_Impl that = (Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore_Impl)o;
    if (!CompiledSupport.equal(this._name, that._name))
    {
        return false;
    }
    if (!CompiledSupport.equal(this._package, that._package))
    {
        return false;
    }
    return true;
}

public int pureHashCode()
{
    int result = CompiledSupport.safeHashCode(this._name);
    result = 31 * result + CompiledSupport.safeHashCode(this._package);
    return result;
}
    @Override
    public String getFullSystemPath()
    {
         return tempFullTypeId;
    }
    public Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStore_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._sourceInformation() != null){this._sourceInformation()._validate(goDeep, sourceInformation, es);}
                for (org.finos.legend.pure.generated.Root_meta_protocols_pure_v1_30_0_metamodel_store_service_ServiceStoreElement o : this._elements())
                {
                    o._validate(goDeep, sourceInformation, es);
                }
            }
        }
        return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy