public void createDatabaseEntitiesForBusinessObjectDataNotificationRegistrationTesting(String namespace,List<String> notificationEventTypes,String businessObjectDefinitionNamespace,String businessObjectDefinitionName,List<String> fileTypes,List<String> storageNames,List<String> businessObjectDataStatuses,List<JobAction> jobActions){
  NamespaceEntity namespaceEntity=namespaceDao.getNamespaceByCd(namespace);
  if (namespaceEntity == null) {
    namespaceDaoTestHelper.createNamespaceEntity(namespace);
  }
  if (!CollectionUtils.isEmpty(notificationEventTypes)) {
    for (    String notificationEventType : notificationEventTypes) {
      NotificationEventTypeEntity notificationEventTypeEntity=notificationEventTypeDao.getNotificationEventTypeByCode(notificationEventType);
      if (notificationEventTypeEntity == null) {
        notificationRegistrationDaoTestHelper.createNotificationEventTypeEntity(notificationEventType);
      }
    }
  }
  BusinessObjectDefinitionEntity businessObjectDefinitionEntity=businessObjectDefinitionDao.getBusinessObjectDefinitionByKey(new BusinessObjectDefinitionKey(businessObjectDefinitionNamespace,businessObjectDefinitionName));
  if (businessObjectDefinitionEntity == null) {
    businessObjectDefinitionDaoTestHelper.createBusinessObjectDefinitionEntity(businessObjectDefinitionNamespace,businessObjectDefinitionName,AbstractServiceTest.DATA_PROVIDER_NAME,AbstractServiceTest.BDEF_DESCRIPTION);
  }
  if (!CollectionUtils.isEmpty(fileTypes)) {
    for (    String businessObjectFormatFileType : fileTypes) {
      fileTypeDaoTestHelper.createFileTypeEntity(businessObjectFormatFileType);
    }
  }
  if (!CollectionUtils.isEmpty(storageNames)) {
    for (    String storageName : storageNames) {
      storageDaoTestHelper.createStorageEntity(storageName,StoragePlatformEntity.S3);
    }
  }
  if (!CollectionUtils.isEmpty(businessObjectDataStatuses)) {
    for (    String businessObjectDataStatus : businessObjectDataStatuses) {
      BusinessObjectDataStatusEntity businessObjectDataStatusEntity=businessObjectDataStatusDao.getBusinessObjectDataStatusByCode(businessObjectDataStatus);
      if (businessObjectDataStatusEntity == null) {
        businessObjectDataStatusDaoTestHelper.createBusinessObjectDataStatusEntity(businessObjectDataStatus);
      }
    }
  }
  if (!CollectionUtils.isEmpty(jobActions)) {
    for (    JobAction jobAction : jobActions) {
      jobDefinitionDaoTestHelper.createJobDefinitionEntity(jobAction.getNamespace(),jobAction.getJobName(),String.format("Description of \"%s.%s\" job definition.",jobAction.getNamespace(),jobAction.getJobName()),String.format("%s.%s.%s",jobAction.getNamespace(),jobAction.getJobName(),AbstractServiceTest.ACTIVITI_ID));
    }
  }
}

public void createDatabaseEntitiesForBusinessObjectDataNotificationRegistrationTesting ( String namespace , List < String > notificationEventTypes , String businessObjectDefinitionNamespace , String businessObjectDefinitionName , List < String > fileTypes , List < String > storageNames , List < String > businessObjectDataStatuses , List < JobAction > jobActions ) { NamespaceEntity namespaceEntity = namespaceDao . getNamespaceByCd ( namespace ) ; if ( namespaceEntity == null ) { namespaceDaoTestHelper . createNamespaceEntity ( namespace ) ; } if ( ! CollectionUtils . isEmpty ( notificationEventTypes ) ) { for ( String notificationEventType : notificationEventTypes ) { NotificationEventTypeEntity notificationEventTypeEntity = notificationEventTypeDao . getNotificationEventTypeByCode ( notificationEventType ) ; if ( notificationEventTypeEntity == null ) { notificationRegistrationDaoTestHelper . createNotificationEventTypeEntity ( notificationEventType ) ; } } } BusinessObjectDefinitionEntity businessObjectDefinitionEntity = businessObjectDefinitionDao . getBusinessObjectDefinitionByKey ( new BusinessObjectDefinitionKey ( businessObjectDefinitionNamespace , businessObjectDefinitionName ) ) ; if ( businessObjectDefinitionEntity == null ) { businessObjectDefinitionDaoTestHelper . createBusinessObjectDefinitionEntity ( businessObjectDefinitionNamespace , businessObjectDefinitionName , AbstractServiceTest . DATA_PROVIDER_NAME , AbstractServiceTest . BDEF_DESCRIPTION ) ; } if ( ! CollectionUtils . isEmpty ( fileTypes ) ) { for ( String businessObjectFormatFileType : fileTypes ) { fileTypeDaoTestHelper . createFileTypeEntity ( businessObjectFormatFileType ) ; } } if ( ! CollectionUtils . isEmpty ( storageNames ) ) { for ( String storageName : storageNames ) { storageDaoTestHelper . createStorageEntity ( storageName , StoragePlatformEntity . S3 ) ; } } if ( ! CollectionUtils . isEmpty ( businessObjectDataStatuses ) ) { for ( String businessObjectDataStatus : businessObjectDataStatuses ) { BusinessObjectDataStatusEntity businessObjectDataStatusEntity = businessObjectDataStatusDao . getBusinessObjectDataStatusByCode ( businessObjectDataStatus ) ; if ( businessObjectDataStatusEntity == null ) { businessObjectDataStatusDaoTestHelper . createBusinessObjectDataStatusEntity ( businessObjectDataStatus ) ; } } } if ( ! CollectionUtils . isEmpty ( jobActions ) ) { for ( JobAction jobAction : jobActions ) { jobDefinitionDaoTestHelper . createJobDefinitionEntity ( jobAction . getNamespace ( ) , jobAction . getJobName ( ) , String . format ( "Description of \"%s.%s\" job definition." , jobAction . getNamespace ( ) , jobAction . getJobName ( ) ) , String . format ( "%s.%s.%s" , jobAction . getNamespace ( ) , jobAction . getJobName ( ) , AbstractServiceTest . ACTIVITI_ID ) ) ; } } }
create and persist database entities required for testing .
