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 void
addAttribute(HwEntityAttributeType type, String value)
Adds the attribute.void
addChildEntity(OnmsHwEntity child)
Adds the child entity.void
addEntAliases(SortedSet<OnmsHwEntityAlias> entAliases)
void
addHwEntAliasList(List<OnmsHwEntityAlias> entityAliasList)
int
compareTo(OnmsHwEntity o)
boolean
equals(Object obj)
void
fixRelationships()
Fix relationships.OnmsHwEntityAttribute
getAttribute(String typeName)
Gets the attribute.String
getAttributeClass(String typeName)
Gets the attribute class.String
getAttributeValue(String typeName)
Gets the attribute value.OnmsHwEntity
getChildByIndex(Integer entPhysicalIndex)
Gets the child by index.SortedSet<OnmsHwEntity>
getChildren()
Gets the children.SortedSet<OnmsHwEntityAlias>
getEntAliases()
Gets the entity alias mappings.String
getEntPhysicalAlias()
Gets the entity physical alias.String
getEntPhysicalAssetID()
Gets the entity physical asset id.String
getEntPhysicalClass()
Gets the entity physical class.Integer
getEntPhysicalContainedIn()
Gets the entity physical contained in.String
getEntPhysicalDescr()
Gets the entity physical description.String
getEntPhysicalFirmwareRev()
Gets the entity physical firmware revision.String
getEntPhysicalHardwareRev()
Gets the entity physical hardware revision.Integer
getEntPhysicalIndex()
Gets the entity physical index.Boolean
getEntPhysicalIsFRU()
Gets the entity physical is FRU.Date
getEntPhysicalMfgDate()
Gets the entity physical manufactured date.String
getEntPhysicalMfgName()
Gets the entity physical manufacturer name.String
getEntPhysicalModelName()
Gets the entity physical model name.String
getEntPhysicalName()
Gets the entity physical name.Integer
getEntPhysicalParentRelPos()
Gets the entity physical parent relative position.String
getEntPhysicalSerialNum()
Gets the entity physical serial number.String
getEntPhysicalSoftwareRev()
Gets the entity physical software revision.String
getEntPhysicalUris()
Gets the entity physical URIs.String
getEntPhysicalVendorType()
Gets the entity physical vendor type.SortedSet<OnmsHwEntityAttribute>
getHwEntityAttributes()
Gets the hardware entity attributes.Integer
getId()
Gets the id.OnmsNode
getNode()
Gets the node.Integer
getNodeId()
String
getOnmsHwEntityId()
Gets the entity id.OnmsHwEntity
getParent()
Gets the parent.Integer
getParentId()
Integer
getParentIndex()
Gets the parent id.boolean
hasChildren()
Checks for children.int
hashCode()
boolean
isRoot()
Checks if is root.void
removeChild(OnmsHwEntity child)
Removes the child.void
setChildren(SortedSet<OnmsHwEntity> children)
Sets the children.void
setEntAliases(SortedSet<OnmsHwEntityAlias> entAliases)
Sets the entity alias mappings.void
setEntPhysicalAlias(String entPhysicalAlias)
Sets the entity physical alias.void
setEntPhysicalAssetID(String entPhysicalAssetID)
Sets the entity physical asset id.void
setEntPhysicalClass(String entPhysicalClass)
Sets the entity physical class.void
setEntPhysicalContainedIn(Integer entPhysicalContainedIn)
Sets the entity physical contained in.void
setEntPhysicalDescr(String entPhysicalDescr)
Sets the entity physical description.void
setEntPhysicalFirmwareRev(String entPhysicalFirmwareRev)
Sets the entity physical firmware revision.void
setEntPhysicalHardwareRev(String entPhysicalHardwareRev)
Sets the entity physical hardware revision.void
setEntPhysicalIndex(Integer entPhysicalIndex)
Sets the entity physical index.void
setEntPhysicalIsFRU(Boolean entPhysicalIsFRU)
Sets the entity physical is FRU.void
setEntPhysicalMfgDate(Date entPhysicalMfgDate)
Sets the entity physical manufactured date.void
setEntPhysicalMfgName(String entPhysicalMfgName)
Sets the entity physical manufacturer name.void
setEntPhysicalModelName(String entPhysicalModelName)
Sets the entity physical model name.void
setEntPhysicalName(String entPhysicalName)
Sets the entity physical name.void
setEntPhysicalParentRelPos(Integer entPhysicalParentRelPos)
Sets the entity physical parent relative position.void
setEntPhysicalSerialNum(String entPhysicalSerialNum)
Sets the entity physical serial number.void
setEntPhysicalSoftwareRev(String entPhysicalSoftwareRev)
Sets the entity physical software revision.void
setEntPhysicalUris(String entPhysicalUris)
Sets the entity physical URIs.void
setEntPhysicalVendorType(String entPhysicalVendorType)
Sets the entity physical vendor type.void
setHwEntityAttributes(SortedSet<OnmsHwEntityAttribute> hwAttributes)
Sets the hardware entity attributes.void
setId(Integer id)
Sets the id.void
setNode(OnmsNode node)
Sets the node.void
setNodeId(Integer m_nodeId)
void
setOnmsHwEntityId(String id)
Sets the entity id.void
setParent(OnmsHwEntity parent)
Sets the parent.void
setParentId(Integer parentId)
String
toString()
-
-
-
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:
compareTo
in 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.
-
-