Package org.opennms.netmgt.dao.mock
Class JdbcEventdServiceManager
- java.lang.Object
-
- org.opennms.netmgt.dao.mock.JdbcEventdServiceManager
-
- All Implemented Interfaces:
EventdServiceManager,org.springframework.beans.factory.InitializingBean
public class JdbcEventdServiceManager extends Object implements org.springframework.beans.factory.InitializingBean, EventdServiceManager
JdbcEventdServiceManager class.
- Version:
- $Id: $
- Author:
- ranger
-
-
Constructor Summary
Constructors Constructor Description JdbcEventdServiceManager()Constructor for JdbcEventdServiceManager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()afterPropertiesSetvoiddataSourceSync()dataSourceSyncDataSourcegetDataSource()getDataSourceintgetServiceId(String serviceName)Lookup the service ID for a specific service by name.voidsetDataSource(DataSource dataSource)setDataSource
-
-
-
Method Detail
-
getServiceId
public int getServiceId(String serviceName) throws org.springframework.dao.DataAccessException
Lookup the service ID for a specific service by name.- Specified by:
getServiceIdin interfaceEventdServiceManager- Parameters:
serviceName- aStringobject.- Returns:
- service ID for the given service name or -1 if not found
- Throws:
org.springframework.dao.DataAccessException- if there is an error accessing the database
-
dataSourceSync
public void dataSourceSync()
dataSourceSync
- Specified by:
dataSourceSyncin interfaceEventdServiceManager
-
afterPropertiesSet
public void afterPropertiesSet() throws ExceptionafterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception- if any.
-
getDataSource
public DataSource getDataSource()
getDataSource
- Returns:
- a
DataSourceobject.
-
setDataSource
public void setDataSource(DataSource dataSource)
setDataSource
- Parameters:
dataSource- aDataSourceobject.
-
-