/** * 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. */ public void fixRelationships() { for (OnmsHwEntityAttribute attrib : m_hwAttributes) { attrib.setHwEntity(this); } if (m_children == null) return; for (OnmsHwEntity child : m_children) { child.setParent(this); child.fixRelationships(); } } }