use of org.opennms.core.utils.SingleResultQuerier in project opennms by OpenNMS.
the class MockDatabase method getServiceName.
public String getServiceName(int serviceId) {
SingleResultQuerier querier = new SingleResultQuerier(this, "select serviceName from service where serviceId = ?");
querier.execute(Integer.valueOf(serviceId));
return (String) querier.getResult();
}
use of org.opennms.core.utils.SingleResultQuerier in project opennms by OpenNMS.
the class MockDatabase method getInterfaceStatus.
public char getInterfaceStatus(MockInterface iface) {
SingleResultQuerier querier = new SingleResultQuerier(this, "select isManaged from ipInterface where nodeId = ? and ipAddr = ?");
querier.execute(Integer.valueOf(iface.getNodeId()), iface.getIpAddr());
String result = (String) querier.getResult();
if (result == null || "".equals(result)) {
return 'X';
}
return result.charAt(0);
}
use of org.opennms.core.utils.SingleResultQuerier in project opennms by OpenNMS.
the class NotificationManager method getQueueForNotification.
/**
* <p>getQueueForNotification</p>
*
* @param notifId a int.
* @return a {@link java.lang.String} object.
*/
public String getQueueForNotification(final int notifId) {
final SingleResultQuerier querier = new SingleResultQuerier(m_dataSource, "select queueID from notifications where notifyId = ?");
querier.execute(notifId);
return (String) querier.getResult();
}
Aggregations