Class OnmsHwEntity

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<OnmsHwEntity>

    @Entity
    public class OnmsHwEntity
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Comparable<OnmsHwEntity>
    The Class OnmsHwEntity.
    Author:
    Alejandro Galue
    See Also:
    Serialized Form
    • Constructor Detail

      • OnmsHwEntity

        public OnmsHwEntity()
        The Constructor.
    • Method Detail

      • getId

        public java.lang.Integer getId()
        Gets the id.
        Returns:
        the id
      • setId

        public void setId​(java.lang.Integer id)
        Sets the id.
        Parameters:
        id - the id
      • getEntAliases

        public java.util.SortedSet<OnmsHwEntityAlias> getEntAliases()
        Gets the entity alias mappings.
        Returns:
        the entity alias mappings
      • setEntAliases

        public void setEntAliases​(java.util.SortedSet<OnmsHwEntityAlias> entAliases)
        Sets the entity alias mappings.
        Parameters:
        entAliases - the entity alias mappings to set
      • addEntAliases

        public void addEntAliases​(java.util.SortedSet<OnmsHwEntityAlias> entAliases)
      • addHwEntAliasList

        public void addHwEntAliasList​(java.util.List<OnmsHwEntityAlias> entityAliasList)
      • getOnmsHwEntityId

        public java.lang.String getOnmsHwEntityId()
        Gets the entity id.
        Returns:
        the entity id
      • setOnmsHwEntityId

        public void setOnmsHwEntityId​(java.lang.String id)
        Sets the entity id.
        Parameters:
        id - the entity id
      • getEntPhysicalIndex

        public java.lang.Integer getEntPhysicalIndex()
        Gets the entity physical index.
        Returns:
        the entity physical index
      • setEntPhysicalIndex

        public void setEntPhysicalIndex​(java.lang.Integer entPhysicalIndex)
        Sets the entity physical index.
        Parameters:
        entPhysicalIndex - the entity physical index
      • getEntPhysicalContainedIn

        public java.lang.Integer getEntPhysicalContainedIn()
        Gets the entity physical contained in.

        This is used only by the ENTITY-MIB parser, it is not required to persist it on the database.

        Returns:
        the entity physical contained in
      • setEntPhysicalContainedIn

        public void setEntPhysicalContainedIn​(java.lang.Integer entPhysicalContainedIn)
        Sets the entity physical contained in.
        Parameters:
        entPhysicalContainedIn - the entity physical contained in
      • getEntPhysicalDescr

        public java.lang.String getEntPhysicalDescr()
        Gets the entity physical description.
        Returns:
        the entity physical description
      • setEntPhysicalDescr

        public void setEntPhysicalDescr​(java.lang.String entPhysicalDescr)
        Sets the entity physical description.
        Parameters:
        entPhysicalDescr - the entity physical description
      • getEntPhysicalVendorType

        public java.lang.String getEntPhysicalVendorType()
        Gets the entity physical vendor type.
        Returns:
        the entity physical vendor type
      • setEntPhysicalVendorType

        public void setEntPhysicalVendorType​(java.lang.String entPhysicalVendorType)
        Sets the entity physical vendor type.
        Parameters:
        entPhysicalVendorType - the entity physical vendor type
      • getEntPhysicalClass

        public java.lang.String getEntPhysicalClass()
        Gets the entity physical class.
        Returns:
        the entity physical class
      • setEntPhysicalClass

        public void setEntPhysicalClass​(java.lang.String entPhysicalClass)
        Sets the entity physical class.
        Parameters:
        entPhysicalClass - the entity physical class
      • getEntPhysicalParentRelPos

        public java.lang.Integer getEntPhysicalParentRelPos()
        Gets the entity physical parent relative position.
        Returns:
        the entity physical parent relative position
      • setEntPhysicalParentRelPos

        public void setEntPhysicalParentRelPos​(java.lang.Integer entPhysicalParentRelPos)
        Sets the entity physical parent relative position.
        Parameters:
        entPhysicalParentRelPos - the entity physical parent relative position
      • getEntPhysicalName

        public java.lang.String getEntPhysicalName()
        Gets the entity physical name.
        Returns:
        the entity physical name
      • setEntPhysicalName

        public void setEntPhysicalName​(java.lang.String entPhysicalName)
        Sets the entity physical name.
        Parameters:
        entPhysicalName - the entity physical name
      • getEntPhysicalHardwareRev

        public java.lang.String getEntPhysicalHardwareRev()
        Gets the entity physical hardware revision.
        Returns:
        the entity physical hardware revision
      • setEntPhysicalHardwareRev

        public void setEntPhysicalHardwareRev​(java.lang.String entPhysicalHardwareRev)
        Sets the entity physical hardware revision.
        Parameters:
        entPhysicalHardwareRev - the entity physical hardware revision
      • getEntPhysicalFirmwareRev

        public java.lang.String getEntPhysicalFirmwareRev()
        Gets the entity physical firmware revision.
        Returns:
        the entity physical firmware revision
      • setEntPhysicalFirmwareRev

        public void setEntPhysicalFirmwareRev​(java.lang.String entPhysicalFirmwareRev)
        Sets the entity physical firmware revision.
        Parameters:
        entPhysicalFirmwareRev - the entity physical firmware revision
      • getEntPhysicalSoftwareRev

        public java.lang.String getEntPhysicalSoftwareRev()
        Gets the entity physical software revision.
        Returns:
        the entity physical software revision
      • setEntPhysicalSoftwareRev

        public void setEntPhysicalSoftwareRev​(java.lang.String entPhysicalSoftwareRev)
        Sets the entity physical software revision.
        Parameters:
        entPhysicalSoftwareRev - the entity physical software revision
      • getEntPhysicalSerialNum

        public java.lang.String getEntPhysicalSerialNum()
        Gets the entity physical serial number.
        Returns:
        the entity physical serial number
      • setEntPhysicalSerialNum

        public void setEntPhysicalSerialNum​(java.lang.String entPhysicalSerialNum)
        Sets the entity physical serial number.
        Parameters:
        entPhysicalSerialNum - the entity physical serial number
      • getEntPhysicalMfgName

        public java.lang.String getEntPhysicalMfgName()
        Gets the entity physical manufacturer name.
        Returns:
        the entity physical manufacturer name
      • setEntPhysicalMfgName

        public void setEntPhysicalMfgName​(java.lang.String entPhysicalMfgName)
        Sets the entity physical manufacturer name.
        Parameters:
        entPhysicalMfgName - the entity physical manufacturer name
      • getEntPhysicalModelName

        public java.lang.String getEntPhysicalModelName()
        Gets the entity physical model name.
        Returns:
        the entity physical model name
      • setEntPhysicalModelName

        public void setEntPhysicalModelName​(java.lang.String entPhysicalModelName)
        Sets the entity physical model name.
        Parameters:
        entPhysicalModelName - the entity physical model name
      • getEntPhysicalAlias

        public java.lang.String getEntPhysicalAlias()
        Gets the entity physical alias.
        Returns:
        the entity physical alias
      • setEntPhysicalAlias

        public void setEntPhysicalAlias​(java.lang.String entPhysicalAlias)
        Sets the entity physical alias.
        Parameters:
        entPhysicalAlias - the entity physical alias
      • getEntPhysicalAssetID

        public java.lang.String getEntPhysicalAssetID()
        Gets the entity physical asset id.
        Returns:
        the entity physical asset id
      • setEntPhysicalAssetID

        public void setEntPhysicalAssetID​(java.lang.String entPhysicalAssetID)
        Sets the entity physical asset id.
        Parameters:
        entPhysicalAssetID - the entity physical asset id
      • getEntPhysicalIsFRU

        public java.lang.Boolean getEntPhysicalIsFRU()
        Gets the entity physical is FRU.
        Returns:
        the entity physical is FRU
      • setEntPhysicalIsFRU

        public void setEntPhysicalIsFRU​(java.lang.Boolean entPhysicalIsFRU)
        Sets the entity physical is FRU.
        Parameters:
        entPhysicalIsFRU - the entity physical is FRU
      • getEntPhysicalMfgDate

        public java.util.Date getEntPhysicalMfgDate()
        Gets the entity physical manufactured date.
        Returns:
        the entity physical manufactured date
      • setEntPhysicalMfgDate

        public void setEntPhysicalMfgDate​(java.util.Date entPhysicalMfgDate)
        Sets the entity physical manufactured date.
        Parameters:
        entPhysicalMfgDate - the entity physical manufactured date
      • getEntPhysicalUris

        public java.lang.String getEntPhysicalUris()
        Gets the entity physical URIs.
        Returns:
        the entity physical URIs
      • setEntPhysicalUris

        public void setEntPhysicalUris​(java.lang.String entPhysicalUris)
        Sets the entity physical URIs.
        Parameters:
        entPhysicalUris - the entity physical URIs
      • getParent

        public OnmsHwEntity getParent()
        Gets the parent.
        Returns:
        the parent
      • setParent

        public void setParent​(OnmsHwEntity parent)
        Sets the parent.
        Parameters:
        parent - the parent
      • setParentId

        public void setParentId​(java.lang.Integer parentId)
      • getParentId

        public java.lang.Integer getParentId()
      • getParentIndex

        public java.lang.Integer getParentIndex()
        Gets the parent id.
        Returns:
        the parent id
      • getChildren

        public java.util.SortedSet<OnmsHwEntity> getChildren()
        Gets the children.
        Returns:
        the children
      • setChildren

        public void setChildren​(java.util.SortedSet<OnmsHwEntity> children)
        Sets the children.
        Parameters:
        children - the children
      • addChildEntity

        public void addChildEntity​(OnmsHwEntity child)
        Adds the child entity.
        Parameters:
        child - the child
      • getChildByIndex

        public OnmsHwEntity getChildByIndex​(java.lang.Integer entPhysicalIndex)
        Gets the child by index.
        Parameters:
        entPhysicalIndex - the entity physical index
        Returns:
        the child by index
      • removeChild

        public void removeChild​(OnmsHwEntity child)
        Removes the child.
        Parameters:
        child - child entity
      • getNode

        public OnmsNode getNode()
        Gets the node.
        Returns:
        the node
      • setNode

        public void setNode​(OnmsNode node)
        Sets the node.
        Parameters:
        node - the node
      • getNodeId

        public java.lang.Integer getNodeId()
      • setNodeId

        public void setNodeId​(java.lang.Integer m_nodeId)
      • getHwEntityAttributes

        public java.util.SortedSet<OnmsHwEntityAttribute> getHwEntityAttributes()
        Gets the hardware entity attributes.
        Returns:
        the hardware entity attributes
      • setHwEntityAttributes

        public void setHwEntityAttributes​(java.util.SortedSet<OnmsHwEntityAttribute> hwAttributes)
        Sets the hardware entity attributes.
        Parameters:
        hwAttributes - the hardware entity attributes
      • addAttribute

        public void addAttribute​(HwEntityAttributeType type,
                                 java.lang.String value)
        Adds the attribute.
        Parameters:
        type - the type
        value - the value
      • getAttribute

        public OnmsHwEntityAttribute getAttribute​(java.lang.String typeName)
        Gets the attribute.
        Parameters:
        typeName - the type name
        Returns:
        the attribute
      • getAttributeValue

        public java.lang.String getAttributeValue​(java.lang.String typeName)
        Gets the attribute value.
        Parameters:
        typeName - the type name
        Returns:
        the attribute value
      • getAttributeClass

        public java.lang.String getAttributeClass​(java.lang.String typeName)
        Gets the attribute class.
        Parameters:
        typeName - the type name
        Returns:
        the attribute class
      • isRoot

        public boolean isRoot()
        Checks if is root.
        Returns:
        true, if checks if is root
      • hasChildren

        public boolean hasChildren()
        Checks for children.
        Returns:
        true, if checks for children
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • 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
      • compareTo

        public int compareTo​(OnmsHwEntity o)
        Specified by:
        compareTo in interface java.lang.Comparable<OnmsHwEntity>
      • fixRelationships

        public void fixRelationships()
        Fix relationships. When a node is created from a XML, the internal relationships may not be correct. Prior storing an hardware object into the database, this method must be called to ensure that the DB relationships are correct.