Package org.opennms.netmgt.model
Class OnmsHwEntity
- java.lang.Object
-
- org.opennms.netmgt.model.OnmsHwEntity
-
- All Implemented Interfaces:
Serializable,Comparable<OnmsHwEntity>
@Entity public class OnmsHwEntity extends Object implements Serializable, Comparable<OnmsHwEntity>
The Class OnmsHwEntity.- Author:
- Alejandro Galue
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OnmsHwEntity()The Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttribute(HwEntityAttributeType type, String value)Adds the attribute.voidaddChildEntity(OnmsHwEntity child)Adds the child entity.voidaddEntAliases(SortedSet<OnmsHwEntityAlias> entAliases)voidaddHwEntAliasList(List<OnmsHwEntityAlias> entityAliasList)intcompareTo(OnmsHwEntity o)booleanequals(Object obj)voidfixRelationships()Fix relationships.OnmsHwEntityAttributegetAttribute(String typeName)Gets the attribute.StringgetAttributeClass(String typeName)Gets the attribute class.StringgetAttributeValue(String typeName)Gets the attribute value.OnmsHwEntitygetChildByIndex(Integer entPhysicalIndex)Gets the child by index.SortedSet<OnmsHwEntity>getChildren()Gets the children.SortedSet<OnmsHwEntityAlias>getEntAliases()Gets the entity alias mappings.StringgetEntPhysicalAlias()Gets the entity physical alias.StringgetEntPhysicalAssetID()Gets the entity physical asset id.StringgetEntPhysicalClass()Gets the entity physical class.IntegergetEntPhysicalContainedIn()Gets the entity physical contained in.StringgetEntPhysicalDescr()Gets the entity physical description.StringgetEntPhysicalFirmwareRev()Gets the entity physical firmware revision.StringgetEntPhysicalHardwareRev()Gets the entity physical hardware revision.IntegergetEntPhysicalIndex()Gets the entity physical index.BooleangetEntPhysicalIsFRU()Gets the entity physical is FRU.DategetEntPhysicalMfgDate()Gets the entity physical manufactured date.StringgetEntPhysicalMfgName()Gets the entity physical manufacturer name.StringgetEntPhysicalModelName()Gets the entity physical model name.StringgetEntPhysicalName()Gets the entity physical name.IntegergetEntPhysicalParentRelPos()Gets the entity physical parent relative position.StringgetEntPhysicalSerialNum()Gets the entity physical serial number.StringgetEntPhysicalSoftwareRev()Gets the entity physical software revision.StringgetEntPhysicalUris()Gets the entity physical URIs.StringgetEntPhysicalVendorType()Gets the entity physical vendor type.SortedSet<OnmsHwEntityAttribute>getHwEntityAttributes()Gets the hardware entity attributes.IntegergetId()Gets the id.OnmsNodegetNode()Gets the node.IntegergetNodeId()StringgetOnmsHwEntityId()Gets the entity id.OnmsHwEntitygetParent()Gets the parent.IntegergetParentId()IntegergetParentIndex()Gets the parent id.booleanhasChildren()Checks for children.inthashCode()booleanisRoot()Checks if is root.voidremoveChild(OnmsHwEntity child)Removes the child.voidsetChildren(SortedSet<OnmsHwEntity> children)Sets the children.voidsetEntAliases(SortedSet<OnmsHwEntityAlias> entAliases)Sets the entity alias mappings.voidsetEntPhysicalAlias(String entPhysicalAlias)Sets the entity physical alias.voidsetEntPhysicalAssetID(String entPhysicalAssetID)Sets the entity physical asset id.voidsetEntPhysicalClass(String entPhysicalClass)Sets the entity physical class.voidsetEntPhysicalContainedIn(Integer entPhysicalContainedIn)Sets the entity physical contained in.voidsetEntPhysicalDescr(String entPhysicalDescr)Sets the entity physical description.voidsetEntPhysicalFirmwareRev(String entPhysicalFirmwareRev)Sets the entity physical firmware revision.voidsetEntPhysicalHardwareRev(String entPhysicalHardwareRev)Sets the entity physical hardware revision.voidsetEntPhysicalIndex(Integer entPhysicalIndex)Sets the entity physical index.voidsetEntPhysicalIsFRU(Boolean entPhysicalIsFRU)Sets the entity physical is FRU.voidsetEntPhysicalMfgDate(Date entPhysicalMfgDate)Sets the entity physical manufactured date.voidsetEntPhysicalMfgName(String entPhysicalMfgName)Sets the entity physical manufacturer name.voidsetEntPhysicalModelName(String entPhysicalModelName)Sets the entity physical model name.voidsetEntPhysicalName(String entPhysicalName)Sets the entity physical name.voidsetEntPhysicalParentRelPos(Integer entPhysicalParentRelPos)Sets the entity physical parent relative position.voidsetEntPhysicalSerialNum(String entPhysicalSerialNum)Sets the entity physical serial number.voidsetEntPhysicalSoftwareRev(String entPhysicalSoftwareRev)Sets the entity physical software revision.voidsetEntPhysicalUris(String entPhysicalUris)Sets the entity physical URIs.voidsetEntPhysicalVendorType(String entPhysicalVendorType)Sets the entity physical vendor type.voidsetHwEntityAttributes(SortedSet<OnmsHwEntityAttribute> hwAttributes)Sets the hardware entity attributes.voidsetId(Integer id)Sets the id.voidsetNode(OnmsNode node)Sets the node.voidsetNodeId(Integer m_nodeId)voidsetOnmsHwEntityId(String id)Sets the entity id.voidsetParent(OnmsHwEntity parent)Sets the parent.voidsetParentId(Integer parentId)StringtoString()
-
-
-
Method Detail
-
getId
public Integer getId()
Gets the id.- Returns:
- the id
-
setId
public void setId(Integer id)
Sets the id.- Parameters:
id- the id
-
getEntAliases
public SortedSet<OnmsHwEntityAlias> getEntAliases()
Gets the entity alias mappings.- Returns:
- the entity alias mappings
-
setEntAliases
public void setEntAliases(SortedSet<OnmsHwEntityAlias> entAliases)
Sets the entity alias mappings.- Parameters:
entAliases- the entity alias mappings to set
-
addEntAliases
public void addEntAliases(SortedSet<OnmsHwEntityAlias> entAliases)
-
addHwEntAliasList
public void addHwEntAliasList(List<OnmsHwEntityAlias> entityAliasList)
-
getOnmsHwEntityId
public String getOnmsHwEntityId()
Gets the entity id.- Returns:
- the entity id
-
setOnmsHwEntityId
public void setOnmsHwEntityId(String id)
Sets the entity id.- Parameters:
id- the entity id
-
getEntPhysicalIndex
public Integer getEntPhysicalIndex()
Gets the entity physical index.- Returns:
- the entity physical index
-
setEntPhysicalIndex
public void setEntPhysicalIndex(Integer entPhysicalIndex)
Sets the entity physical index.- Parameters:
entPhysicalIndex- the entity physical index
-
getEntPhysicalContainedIn
public 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(Integer entPhysicalContainedIn)
Sets the entity physical contained in.- Parameters:
entPhysicalContainedIn- the entity physical contained in
-
getEntPhysicalDescr
public String getEntPhysicalDescr()
Gets the entity physical description.- Returns:
- the entity physical description
-
setEntPhysicalDescr
public void setEntPhysicalDescr(String entPhysicalDescr)
Sets the entity physical description.- Parameters:
entPhysicalDescr- the entity physical description
-
getEntPhysicalVendorType
public String getEntPhysicalVendorType()
Gets the entity physical vendor type.- Returns:
- the entity physical vendor type
-
setEntPhysicalVendorType
public void setEntPhysicalVendorType(String entPhysicalVendorType)
Sets the entity physical vendor type.- Parameters:
entPhysicalVendorType- the entity physical vendor type
-
getEntPhysicalClass
public String getEntPhysicalClass()
Gets the entity physical class.- Returns:
- the entity physical class
-
setEntPhysicalClass
public void setEntPhysicalClass(String entPhysicalClass)
Sets the entity physical class.- Parameters:
entPhysicalClass- the entity physical class
-
getEntPhysicalParentRelPos
public Integer getEntPhysicalParentRelPos()
Gets the entity physical parent relative position.- Returns:
- the entity physical parent relative position
-
setEntPhysicalParentRelPos
public void setEntPhysicalParentRelPos(Integer entPhysicalParentRelPos)
Sets the entity physical parent relative position.- Parameters:
entPhysicalParentRelPos- the entity physical parent relative position
-
getEntPhysicalName
public String getEntPhysicalName()
Gets the entity physical name.- Returns:
- the entity physical name
-
setEntPhysicalName
public void setEntPhysicalName(String entPhysicalName)
Sets the entity physical name.- Parameters:
entPhysicalName- the entity physical name
-
getEntPhysicalHardwareRev
public String getEntPhysicalHardwareRev()
Gets the entity physical hardware revision.- Returns:
- the entity physical hardware revision
-
setEntPhysicalHardwareRev
public void setEntPhysicalHardwareRev(String entPhysicalHardwareRev)
Sets the entity physical hardware revision.- Parameters:
entPhysicalHardwareRev- the entity physical hardware revision
-
getEntPhysicalFirmwareRev
public String getEntPhysicalFirmwareRev()
Gets the entity physical firmware revision.- Returns:
- the entity physical firmware revision
-
setEntPhysicalFirmwareRev
public void setEntPhysicalFirmwareRev(String entPhysicalFirmwareRev)
Sets the entity physical firmware revision.- Parameters:
entPhysicalFirmwareRev- the entity physical firmware revision
-
getEntPhysicalSoftwareRev
public String getEntPhysicalSoftwareRev()
Gets the entity physical software revision.- Returns:
- the entity physical software revision
-
setEntPhysicalSoftwareRev
public void setEntPhysicalSoftwareRev(String entPhysicalSoftwareRev)
Sets the entity physical software revision.- Parameters:
entPhysicalSoftwareRev- the entity physical software revision
-
getEntPhysicalSerialNum
public String getEntPhysicalSerialNum()
Gets the entity physical serial number.- Returns:
- the entity physical serial number
-
setEntPhysicalSerialNum
public void setEntPhysicalSerialNum(String entPhysicalSerialNum)
Sets the entity physical serial number.- Parameters:
entPhysicalSerialNum- the entity physical serial number
-
getEntPhysicalMfgName
public String getEntPhysicalMfgName()
Gets the entity physical manufacturer name.- Returns:
- the entity physical manufacturer name
-
setEntPhysicalMfgName
public void setEntPhysicalMfgName(String entPhysicalMfgName)
Sets the entity physical manufacturer name.- Parameters:
entPhysicalMfgName- the entity physical manufacturer name
-
getEntPhysicalModelName
public String getEntPhysicalModelName()
Gets the entity physical model name.- Returns:
- the entity physical model name
-
setEntPhysicalModelName
public void setEntPhysicalModelName(String entPhysicalModelName)
Sets the entity physical model name.- Parameters:
entPhysicalModelName- the entity physical model name
-
getEntPhysicalAlias
public String getEntPhysicalAlias()
Gets the entity physical alias.- Returns:
- the entity physical alias
-
setEntPhysicalAlias
public void setEntPhysicalAlias(String entPhysicalAlias)
Sets the entity physical alias.- Parameters:
entPhysicalAlias- the entity physical alias
-
getEntPhysicalAssetID
public String getEntPhysicalAssetID()
Gets the entity physical asset id.- Returns:
- the entity physical asset id
-
setEntPhysicalAssetID
public void setEntPhysicalAssetID(String entPhysicalAssetID)
Sets the entity physical asset id.- Parameters:
entPhysicalAssetID- the entity physical asset id
-
getEntPhysicalIsFRU
public Boolean getEntPhysicalIsFRU()
Gets the entity physical is FRU.- Returns:
- the entity physical is FRU
-
setEntPhysicalIsFRU
public void setEntPhysicalIsFRU(Boolean entPhysicalIsFRU)
Sets the entity physical is FRU.- Parameters:
entPhysicalIsFRU- the entity physical is FRU
-
getEntPhysicalMfgDate
public Date getEntPhysicalMfgDate()
Gets the entity physical manufactured date.- Returns:
- the entity physical manufactured date
-
setEntPhysicalMfgDate
public void setEntPhysicalMfgDate(Date entPhysicalMfgDate)
Sets the entity physical manufactured date.- Parameters:
entPhysicalMfgDate- the entity physical manufactured date
-
getEntPhysicalUris
public String getEntPhysicalUris()
Gets the entity physical URIs.- Returns:
- the entity physical URIs
-
setEntPhysicalUris
public void setEntPhysicalUris(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(Integer parentId)
-
getParentId
public Integer getParentId()
-
getParentIndex
public Integer getParentIndex()
Gets the parent id.- Returns:
- the parent id
-
getChildren
public SortedSet<OnmsHwEntity> getChildren()
Gets the children.- Returns:
- the children
-
setChildren
public void setChildren(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(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 Integer getNodeId()
-
setNodeId
public void setNodeId(Integer m_nodeId)
-
getHwEntityAttributes
public SortedSet<OnmsHwEntityAttribute> getHwEntityAttributes()
Gets the hardware entity attributes.- Returns:
- the hardware entity attributes
-
setHwEntityAttributes
public void setHwEntityAttributes(SortedSet<OnmsHwEntityAttribute> hwAttributes)
Sets the hardware entity attributes.- Parameters:
hwAttributes- the hardware entity attributes
-
addAttribute
public void addAttribute(HwEntityAttributeType type, String value)
Adds the attribute.- Parameters:
type- the typevalue- the value
-
getAttribute
public OnmsHwEntityAttribute getAttribute(String typeName)
Gets the attribute.- Parameters:
typeName- the type name- Returns:
- the attribute
-
getAttributeValue
public String getAttributeValue(String typeName)
Gets the attribute value.- Parameters:
typeName- the type name- Returns:
- the attribute value
-
getAttributeClass
public String getAttributeClass(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
-
compareTo
public int compareTo(OnmsHwEntity o)
- Specified by:
compareToin interfaceComparable<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.
-
-