Class DatabasePopulator

  • Direct Known Subclasses:
    BsmDatabasePopulator

    public class DatabasePopulator
    extends java.lang.Object
    Populates a test database with some entities (nodes, interfaces, services). Example usage:
     private DatabasePopulator m_populator;
    Author:
    DJ Gregor
    • Constructor Detail

      • DatabasePopulator

        public DatabasePopulator()
    • Method Detail

      • lookupDao

        public <T extends OnmsDao<?,​?>> T lookupDao​(java.lang.Class<? super OnmsDao<?,​?>> daoClass)
      • registerDao

        public void registerDao​(java.lang.Class<? super OnmsDao<?,​?>> daoClass,
                                OnmsDao<?,​?> dao)
      • populateInSeparateTransaction

        public boolean populateInSeparateTransaction()
      • setPopulateInSeparateTransaction

        public void setPopulateInSeparateTransaction​(boolean pop)
      • setResetInSeperateTransaction

        public void setResetInSeperateTransaction​(boolean resetInSeperateTransaction)
      • populateDatabase

        public void populateDatabase()
      • resetDatabase

        public void resetDatabase()
      • getService

        public OnmsServiceType getService​(java.lang.String serviceName)
      • getAlarmDao

        public AlarmDao getAlarmDao()
      • setAlarmDao

        public void setAlarmDao​(AlarmDao alarmDao)
      • setAssetRecordDao

        public void setAssetRecordDao​(AssetRecordDao assetRecordDao)
      • setCategoryDao

        public void setCategoryDao​(CategoryDao categoryDao)
      • setDistPollerDao

        public void setDistPollerDao​(DistPollerDao distPollerDao)
      • getEventDao

        public EventDao getEventDao()
      • setEventDao

        public void setEventDao​(EventDao eventDao)
      • setIpInterfaceDao

        public void setIpInterfaceDao​(IpInterfaceDao ipInterfaceDao)
      • setMonitoredServiceDao

        public void setMonitoredServiceDao​(MonitoredServiceDao monitoredServiceDao)
      • getNodeDao

        public NodeDao getNodeDao()
      • setNodeDao

        public void setNodeDao​(NodeDao nodeDao)
      • setNotificationDao

        public void setNotificationDao​(NotificationDao notificationDao)
      • getOutageDao

        public OutageDao getOutageDao()
      • setOutageDao

        public void setOutageDao​(OutageDao outageDao)
      • setServiceTypeDao

        public void setServiceTypeDao​(ServiceTypeDao serviceTypeDao)
      • setSnmpInterfaceDao

        public void setSnmpInterfaceDao​(SnmpInterfaceDao snmpInterfaceDao)
      • setUserNotificationDao

        public void setUserNotificationDao​(UserNotificationDao userNotificationDao)
      • setMonitoringLocationDao

        public void setMonitoringLocationDao​(MonitoringLocationDao monitoringLocationDao)
      • setApplicationDao

        public void setApplicationDao​(ApplicationDao applicationDao)
      • setAcknowledgmentDao

        public void setAcknowledgmentDao​(AcknowledgmentDao acknowledgmentDao)
      • getTransactionTemplate

        public org.springframework.transaction.support.TransactionOperations getTransactionTemplate()
      • setTransactionTemplate

        public void setTransactionTemplate​(org.springframework.transaction.support.TransactionOperations transactionOperation)