273a19d66b233a82f9664607d20b901dcf38aff6
[ccsdk/cds.git] /
1 /*
2  * Copyright © 2018 IBM Intellectual Property.
3  *
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
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 package org.onap.ccsdk.apps.controllerblueprints.service.repository;
18
19 import org.jetbrains.annotations.NotNull;
20 import org.onap.ccsdk.apps.controllerblueprints.service.domain.CbaContent;
21 import org.onap.ccsdk.apps.controllerblueprints.service.domain.ConfigModel;
22 import org.springframework.data.jpa.repository.JpaRepository;
23 import org.springframework.stereotype.Repository;
24
25 import java.util.List;
26 import java.util.Optional;
27
28 /**
29  * CBAContentRepository.java Purpose: Provide Configuration Generator CRUD methods for CBAContent table
30  *
31  * @author Ruben Chang
32  * @version 1.0
33  */
34 @Repository
35 public interface CBAContentRepository extends JpaRepository<CbaContent, String>  {
36
37     /**
38      * This is a findAll method
39      * @return List<CbaContent>
40      */
41     @Override
42     List<CbaContent> findAll();
43
44     /**
45      * Returns a CbaContent based on the cbaUUID
46      * @param cbaUUID the CbaUUID
47      * @return Optional<CbaContent>
48      */
49     @Override
50     @NotNull
51     Optional<CbaContent> findById(@NotNull String cbaUUID);
52
53     /**
54      * This is a deleteById methid
55      * @param cbaUUID the user ID for a particular CBAFile
56      */
57     @Override
58     void deleteById(@NotNull String cbaUUID);
59 }