NodeDao directly
 in most cases or use NodeLabelDaoImpl.public class NodeLabelJDBCImpl extends Object implements NodeLabel
This class contains convenience functions for retrieving and modifying the label associated with a managed node. The 'node' table contains a 'nodelabel' and 'nodelabelsource' field. The 'nodelabel' is a user-friendly name associated with the node. This name can be user-defined (via the WEB UI) or can be auto-generated based on what OpenNMS knows about the node and its interfaces. The 'nodelabelsource' field is a single character flag which indicates what the source for the node label was.
Valid values for node label source are: 'U' User defined 'H' Primary interface's IP host name 'S' Node's MIB-II sysName 'A' Primary interface's IP address
DEFAULT_SELECT_METHOD, MAX_NODE_LABEL_LENGTH, PROP_PRIMARY_INTERFACE_SELECT_METHOD, SELECT_METHOD_MAX, SELECT_METHOD_MIN| Constructor and Description | 
|---|
NodeLabelJDBCImpl()
Deprecated.  
Default constructor 
 | 
NodeLabelJDBCImpl(String nodeLabel,
                 OnmsNode.NodeLabelSource nodeLabelSource)
Deprecated.  
Constructor 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
assignLabel(int nodeID,
           NodeLabel nodeLabel)
Deprecated. 
 
Use a  
NodeDao#update(org.opennms.netmgt.model.OnmsNode) method call instead | 
NodeLabel | 
computeLabel(int nodeID)
Deprecated. 
 
Update this to use modern DAO methods instead of raw SQL 
 | 
String | 
getLabel()
Deprecated.  
Returns the node label . 
 | 
OnmsNode.NodeLabelSource | 
getSource()
Deprecated.  
Returns the node label source flag . 
 | 
NodeLabel | 
retrieveLabel(int nodeID)
Deprecated. 
 
Use a  
NodeDao#load(Integer) method call instead | 
String | 
toString()
Deprecated.  
This method is responsible for returning a String object which represents
 the content of this NodeLabel. 
 | 
public NodeLabelJDBCImpl()
public NodeLabelJDBCImpl(String nodeLabel, OnmsNode.NodeLabelSource nodeLabelSource)
nodeLabel - Node labelnodeLabelSource - Flag indicating source of node labelpublic String getLabel()
public OnmsNode.NodeLabelSource getSource()
public NodeLabel retrieveLabel(int nodeID) throws SQLException
NodeDao#load(Integer) method call insteadretrieveLabel in interface NodeLabelnodeID - Unique identifier of the node to be updated.SQLException - if any.public void assignLabel(int nodeID,
                        NodeLabel nodeLabel)
                 throws SQLException
NodeDao#update(org.opennms.netmgt.model.OnmsNode) method call insteadassignLabel in interface NodeLabelnodeID - Unique identifier of the node to be updated.nodeLabel - Object containing label and source values.SQLException - if any.public NodeLabel computeLabel(int nodeID) throws SQLException
computeLabel in interface NodeLabelnodeID - Unique identifier of the node to be updated.SQLException - if any.public String toString()
Copyright © 2020. All rights reserved.