本文整理汇总了Java中org.opennms.netmgt.model.OnmsNode.setType方法的典型用法代码示例。如果您正苦于以下问题:Java OnmsNode.setType方法的具体用法?Java OnmsNode.setType怎么用?Java OnmsNode.setType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opennms.netmgt.model.OnmsNode
的用法示例。
在下文中一共展示了OnmsNode.setType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SaveOrUpdateOperation
import org.opennms.netmgt.model.OnmsNode; //导入方法依赖的package包/类
/**
* <p>Constructor for SaveOrUpdateOperation.</p>
*
* @param nodeId a {@link java.lang.Integer} object.
* @param foreignSource a {@link java.lang.String} object.
* @param foreignId a {@link java.lang.String} object.
* @param nodeLabel a {@link java.lang.String} object.
* @param building a {@link java.lang.String} object.
* @param city a {@link java.lang.String} object.
* @param provisionService a {@link org.opennms.netmgt.provision.service.ProvisionService} object.
* @param rescanExisting a {@link java.lang.Boolean} object
*/
public SaveOrUpdateOperation(Integer nodeId, String foreignSource, String foreignId, String nodeLabel, String building, String city, ProvisionService provisionService, boolean rescanExisting) {
super(provisionService);
m_node = new OnmsNode();
m_node.setId(nodeId);
m_node.setLabel(nodeLabel);
m_node.setLabelSource("U");
m_node.setType("A");
m_node.setForeignSource(foreignSource);
m_node.setForeignId(foreignId);
m_node.getAssetRecord().setBuilding(building);
m_node.getAssetRecord().setCity(city);
m_rescanExisting = rescanExisting;
}
示例2: AbstractSaveOrUpdateOperation
import org.opennms.netmgt.model.OnmsNode; //导入方法依赖的package包/类
/**
* <p>Constructor for AbstractSaveOrUpdateOperation.</p>
*
* @param nodeId a {@link java.lang.Integer} object.
* @param foreignSource a {@link java.lang.String} object.
* @param foreignId a {@link java.lang.String} object.
* @param nodeLabel a {@link java.lang.String} object.
* @param building a {@link java.lang.String} object.
* @param city a {@link java.lang.String} object.
*/
public AbstractSaveOrUpdateOperation(final Integer nodeId, final String foreignSource, final String foreignId, final String nodeLabel, final String building, final String city) {
m_node = new OnmsNode();
m_node.setId(nodeId);
m_node.setLabel(nodeLabel);
m_node.setLabelSource("U");
m_node.setType("A");
m_node.setForeignSource(foreignSource);
m_node.setForeignId(foreignId);
m_node.getAssetRecord().setBuilding(building);
m_node.getAssetRecord().setCity(city);
}