Class InstanceModelImpl

    • Constructor Detail

      • InstanceModelImpl

        public InstanceModelImpl()
    • Method Detail

      • getId

        public java.lang.String getId()
        Specified by:
        getId in interface InstanceModel
        Returns:
        the instance id
      • setId

        public void setId​(java.lang.String id)
        Specified by:
        setId in interface InstanceModel
        Parameters:
        id - instance id
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface InstanceModel
        Returns:
        the instance name
      • setName

        public void setName​(java.lang.String name)
        Specified by:
        setName in interface InstanceModel
        Parameters:
        name - instance name
      • getLanguageDependentName

        public java.lang.String getLanguageDependentName()
        Specified by:
        getLanguageDependentName in interface InstanceModel
        Returns:
        the instance language dependent name
      • setLanguageDependentName

        public void setLanguageDependentName​(java.lang.String languageDependentName)
        Specified by:
        setLanguageDependentName in interface InstanceModel
        Parameters:
        languageDependentName - instance language dependent name
      • setSubInstances

        public void setSubInstances​(java.util.List<InstanceModel> subInstances)
        Specified by:
        setSubInstances in interface InstanceModel
        Parameters:
        subInstances - list of subinstance models
      • getCstics

        public java.util.List<CsticModel> getCstics()
        Specified by:
        getCstics in interface InstanceModel
        Returns:
        unmodifiable list of characteristic models of this instance, to add/remove cstics, use manipulators of this interface
      • setCstics

        public void setCstics​(java.util.List<CsticModel> cstics)
        Specified by:
        setCstics in interface InstanceModel
        Parameters:
        cstics - list of characteristic models
      • isRootInstance

        public boolean isRootInstance()
        Specified by:
        isRootInstance in interface InstanceModel
        Returns:
        true if this instance is a root instance
      • setRootInstance

        public void setRootInstance​(boolean rootInstance)
        Specified by:
        setRootInstance in interface InstanceModel
        Parameters:
        rootInstance - flag indicating whether this instance is a root instance
      • isComplete

        public boolean isComplete()
        Specified by:
        isComplete in interface InstanceModel
        Returns:
        true if this instance is complete
      • setComplete

        public void setComplete​(boolean complete)
        Specified by:
        setComplete in interface InstanceModel
        Parameters:
        complete - flag indicating whether this instance is complete
      • isConsistent

        public boolean isConsistent()
        Specified by:
        isConsistent in interface InstanceModel
        Returns:
        true if this instance is consistent
      • setConsistent

        public void setConsistent​(boolean consistent)
        Specified by:
        setConsistent in interface InstanceModel
        Parameters:
        consistent - flag indicating whether this instance is consistent
      • getCstic

        public CsticModel getCstic​(java.lang.String csticName)
        Specified by:
        getCstic in interface InstanceModel
        Parameters:
        csticName - characteristic name
        Returns:
        the characteristic model for the given characteristic name
      • initCache

        protected void initCache()
      • removeCstic

        public boolean removeCstic​(CsticModel cstic)
        Specified by:
        removeCstic in interface InstanceModel
        Parameters:
        cstic - characteristic model
        Returns:
        true if the cstics was part of the list
      • getSubInstance

        public InstanceModel getSubInstance​(java.lang.String subInstanceId)
        Specified by:
        getSubInstance in interface InstanceModel
        Parameters:
        subInstanceId - subinstance id
        Returns:
        the subinstance model for the given subinstance id
      • removeSubInstance

        public InstanceModel removeSubInstance​(java.lang.String subInstanceId)
        Description copied from interface: InstanceModel
        removes the subinstance from the subinstance list for the given subinstance id
        Specified by:
        removeSubInstance in interface InstanceModel
        Parameters:
        subInstanceId - subinstance id
        Returns:
        removed subinstance model
      • setCsticGroups

        public void setCsticGroups​(java.util.List<CsticGroupModel> csticGroups)
        Specified by:
        setCsticGroups in interface InstanceModel
        Parameters:
        csticGroups - list of characteristic group models
      • getDisplayName

        protected java.lang.String getDisplayName​(java.lang.String langDepName,
                                                  java.lang.String name)
      • getPosition

        public java.lang.String getPosition()
        Specified by:
        getPosition in interface InstanceModel
        Returns:
        the BOM position of this instance
      • setPosition

        public void setPosition​(java.lang.String position)
        Specified by:
        setPosition in interface InstanceModel
        Parameters:
        position - BOM position of this instance
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object