ed863563ac53389a9255923cc81816d53e22fcc1
[ccsdk/cds.git] /
1 /*\r
2  * Copyright © 2017-2018 AT&T Intellectual Property.\r
3  * Modifications Copyright © 2019 Bell Canada.\r
4  *\r
5  * Licensed under the Apache License, Version 2.0 (the "License");\r
6  * you may not use this file except in compliance with the License.\r
7  * You may obtain a copy of the License at\r
8  *\r
9  *     http://www.apache.org/licenses/LICENSE-2.0\r
10  *\r
11  * Unless required by applicable law or agreed to in writing, software\r
12  * distributed under the License is distributed on an "AS IS" BASIS,\r
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
14  * See the License for the specific language governing permissions and\r
15  * limitations under the License.\r
16  */\r
17 \r
18 package org.onap.ccsdk.apps.controllerblueprints.service.repository;\r
19 \r
20 import org.onap.ccsdk.apps.controllerblueprints.service.domain.BlueprintModelSearch;\r
21 import org.springframework.data.jpa.repository.JpaRepository;\r
22 import org.springframework.stereotype.Repository;\r
23 \r
24 import javax.validation.constraints.NotNull;\r
25 import java.util.List;\r
26 import java.util.Optional;\r
27 \r
28 /**\r
29  * BlueprintModelSearchRepository.java Purpose: Provide Configuration Generator AsdcArtifactsRepository\r
30  *\r
31  * @author Brinda Santh\r
32  * @version 1.0\r
33  */\r
34 @Repository\r
35 public interface BlueprintModelSearchRepository extends JpaRepository<BlueprintModelSearch, Long> {\r
36 \r
37     /**\r
38      * This is a findById method\r
39      *\r
40      * @param id id\r
41      * @return Optional<BlueprintModelSearch>\r
42      */\r
43     @NotNull\r
44     Optional<BlueprintModelSearch> findById(@NotNull String id);\r
45 \r
46     /**\r
47      * This is a findAll method\r
48      * @return List<BlueprintModelSearch>\r
49      */\r
50     @Override\r
51     List<BlueprintModelSearch> findAll();\r
52 \r
53     /**\r
54      * This is a findByArtifactNameAndArtifactVersion method\r
55      *\r
56      * @param artifactName artifactName\r
57      * @param artifactVersion artifactVersion\r
58      * @return Optional<AsdcArtifacts>\r
59      */\r
60     Optional<BlueprintModelSearch> findByArtifactNameAndArtifactVersion(String artifactName, String artifactVersion);\r
61 \r
62     /**\r
63      * This is a findByTagsContainingIgnoreCase method\r
64      * \r
65      * @param tags\r
66      * @return Optional<BlueprintModelSearch>\r
67      */\r
68     List<BlueprintModelSearch> findByTagsContainingIgnoreCase(String tags);\r
69 }\r