diff options
Diffstat (limited to 'adapters/mso-requests-db-adapter/src/main/java')
3 files changed, 7 insertions, 4 deletions
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java index 28c56b32cd..2a661a7a6a 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java @@ -113,6 +113,7 @@ public class ArchiveInfraRequestsScheduler { archivedInfra.setNetworkType(iar.getNetworkType()); archivedInfra.setOperationalEnvId(iar.getOperationalEnvId()); archivedInfra.setOperationalEnvName(iar.getOperationalEnvName()); + archivedInfra.setRequestUrl(iar.getRequestUrl()); archivedInfra.setProgress(iar.getProgress()); archivedInfra.setProvStatus(iar.getProvStatus()); archivedInfra.setRequestAction(iar.getRequestAction()); @@ -150,9 +151,9 @@ public class ArchiveInfraRequestsScheduler { } logger.info("Creating archivedInfraRequest records: " + newArchivedReqs.size()); - archivedInfraRepo.save(newArchivedReqs); + archivedInfraRepo.saveAll(newArchivedReqs); logger.info("Deleting InfraActiveRequest records: "+ oldInfraReqs.size()); - infraActiveRepo.delete(oldInfraReqs); + infraActiveRepo.deleteAll(oldInfraReqs); } } diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java index a849478907..626e3568bc 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java @@ -301,7 +301,9 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter { String resourceTemplateUUID) throws MsoRequestsDbException { return resourceOperationStatusRepository - .findOne(new ResourceOperationStatusId(serviceId, operationId, resourceTemplateUUID)); + .findById(new ResourceOperationStatusId(serviceId, operationId, resourceTemplateUUID)). + orElseThrow( () -> new MsoRequestsDbException("Operation not found:" + operationId)); + } /** diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/RequestDBConfig.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/RequestDBConfig.java index bc1e17b067..99fa770974 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/RequestDBConfig.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/RequestDBConfig.java @@ -25,7 +25,7 @@ import javax.persistence.EntityManagerFactory; import javax.sql.DataSource; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder; +import org.springframework.boot.jdbc.DataSourceBuilder; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder; import org.springframework.context.annotation.Bean; |