2 * Copyright © 2021 Aarna Networks, Inc.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org.onap.ccsdk.cds.blueprintsprocessor.functions.workflow.audit.db
19 import org.springframework.data.jpa.repository.JpaRepository
20 import org.springframework.stereotype.Repository
21 import javax.transaction.Transactional
24 * JPA repository managing {@link BlueprintWorkflowAuditStatus} table.
27 interface BlueprintAuditStatusRepository :
28 JpaRepository<BlueprintWorkflowAuditStatus, String> {
31 * retireve records based on primary key ID.
33 * @return {@link BlueprintWorkflowAuditStatus}
35 fun findById(id: Long): BlueprintWorkflowAuditStatus
38 * retrieve records based on request ID
40 * @return list {@link BlueprintWorkflowAuditStatus}
44 ): List<BlueprintWorkflowAuditStatus>
47 * retrieve records based on request ID and subrequest ID
50 * @return list {@link BlueprintWorkflowAuditStatus}
52 fun findByRequestIdAndSubRequestId(
55 ): List<BlueprintWorkflowAuditStatus>
58 * retrieve records based on request id, blueprint name , blueprint version
60 * @param blueprintName
61 * @param blueprintVersion
62 * @return {@link BlueprintWorkflowAuditStatus}
64 fun findByRequestIdAndBlueprintNameAndBlueprintVersion(
66 blueprintName: String?,
67 blueprintVersion: String?
68 ): BlueprintWorkflowAuditStatus
71 * retrieve records based on request id, blueprint name , blueprint version
72 * @return {@link BlueprintWorkflowAuditStatus}
74 fun findByOriginatorIdAndRequestIdAndSubRequestIdAndWorkflowNameAndBlueprintNameAndBlueprintVersion(
77 subRequestId: String?,
79 blueprintName: String?,
80 blueprintVersion: String?
81 ): BlueprintWorkflowAuditStatus
84 * retrieve records based on request id, subrequest, originator, workflow,
85 * blueprint version, blueprint Name
86 * @return {@link BlueprintWorkflowAuditStatus}
88 fun findByIdAndOriginatorIdAndRequestIdAndSubRequestIdAndWorkflowNameAndBlueprintNameAndBlueprintVersion(
92 subRequestId: String?,
94 blueprintName: String?,
95 blueprintVersion: String?
96 ): BlueprintWorkflowAuditStatus
99 fun deleteByIdAndBlueprintNameAndBlueprintVersionAndOriginatorIdAndRequestIdAndSubRequestId(
101 blueprintName: String?,
102 blueprintVersion: String?,
103 originatorId: String,
105 subRequestId: String?