2 * Copyright © 2019 IBM.
3 * Modifications Copyright © 2019 Orange.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 package org.onap.ccsdk.cds.blueprintsprocessor.db.primary.repository
20 import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintModelSearch
21 import org.springframework.data.domain.Page
22 import org.springframework.data.domain.PageRequest
23 import org.springframework.data.domain.Pageable
24 import org.springframework.data.jpa.repository.JpaRepository
25 import org.springframework.stereotype.Repository
28 * Provide Configuration Generator AsdcArtifactsRepository
30 * @author Brinda Santh
34 interface BlueprintModelSearchRepository : JpaRepository<BlueprintModelSearch, Long> {
37 * This is a findById method
40 * @return Optional<BlueprintModelSearch>
41 </BlueprintModelSearch> */
42 fun findById(id: String): BlueprintModelSearch?
45 * This is a findAll method
46 * @return List<BlueprintModelSearch>
47 </BlueprintModelSearch> */
48 override fun findAll(): List<BlueprintModelSearch>
51 * This is a findByArtifactNameAndArtifactVersion method
53 * @param artifactName artifactName
54 * @param artifactVersion artifactVersion
55 * @return Optional<AsdcArtifacts>
57 fun findByArtifactNameAndArtifactVersion(artifactName: String, artifactVersion: String): BlueprintModelSearch?
60 * This is a findByTagsContainingIgnoreCase method
63 * @return Optional<BlueprintModelSearch>
64 </BlueprintModelSearch> */
65 fun findByTagsContainingIgnoreCase(tags: String): List<BlueprintModelSearch>
68 * This is a findby some attributes method
70 * @author Shaaban Ebrahim
75 * @param artifactVersion
77 * @return Optional<BlueprintModelSearch>
78 </BlueprintModelSearch>
80 fun findByUpdatedByOrTagsOrOrArtifactNameOrOrArtifactVersionOrArtifactType(updatedBy: String, tags: String, artifactName: String, artifactVersion: String,
81 artifactType: String): List<BlueprintModelSearch>
85 * This is a findby some attributes method
87 * @author Shaaban Ebrahim
92 * @param artifactVersion
95 * @return Page<BlueprintModelSearch>
97 fun findByUpdatedByOrTagsOrOrArtifactNameOrOrArtifactVersionOrArtifactType(updatedBy: String, tags: String, artifactName: String, artifactVersion: String,
98 artifactType: String,pageRequest: Pageable): Page<BlueprintModelSearch>