summaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-requests-db-repositories
diff options
context:
space:
mode:
authorHarry Huang <huangxiangyu5@huawei.com>2020-02-05 16:00:19 +0800
committerHarry Huang <huangxiangyu5@huawei.com>2020-02-12 17:56:22 +0800
commitcd4e9d63d68c9a836e4cc5f19ac2b75b87eb4721 (patch)
tree2866547628252aadb30893ab2fdd248e46310b90 /mso-api-handlers/mso-requests-db-repositories
parent78eb0176ae83484534789cafb60f773c8f8d3f44 (diff)
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 <huangxiangyu5@huawei.com>
Diffstat (limited to 'mso-api-handlers/mso-requests-db-repositories')
-rw-r--r--mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/OrchestrationTaskRepository.java33
1 files changed, 33 insertions, 0 deletions
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<OrchestrationTask, String> {
+
+ public List<OrchestrationTask> findByStatus(@Param("status") String status);
+}