From cd4e9d63d68c9a836e4cc5f19ac2b75b87eb4721 Mon Sep 17 00:00:00 2001 From: Harry Huang Date: Wed, 5 Feb 2020 16:00:19 +0800 Subject: Add repository for OrchestrationTask Issue-ID: SO-2368 OrchestrationTask will be used to store the slicing options which can be reviewed by the maintainer. OrchestrationTask itself is designed to be generic and parameters stored inside can be customized based on different use cases. Change-Id: I42c0639a62bf18f5d0c8bece746cd8e831dd88e8 Signed-off-by: Harry Huang --- .../repository/OrchestrationTaskRepository.java | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/OrchestrationTaskRepository.java (limited to 'mso-api-handlers/mso-requests-db-repositories') diff --git a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/OrchestrationTaskRepository.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/OrchestrationTaskRepository.java new file mode 100644 index 0000000000..1093c79638 --- /dev/null +++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/OrchestrationTaskRepository.java @@ -0,0 +1,33 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License") + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.db.request.data.repository; + +import org.onap.so.db.request.beans.OrchestrationTask; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.repository.query.Param; +import org.springframework.data.rest.core.annotation.RepositoryRestResource; +import java.util.List; + +@RepositoryRestResource(collectionResourceRel = "orchestrationTask", path = "orchestrationTask") +public interface OrchestrationTaskRepository extends JpaRepository { + + public List findByStatus(@Param("status") String status); +} -- cgit 1.2.3-korg