2 * Copyright © 2017-2018 AT&T Intellectual Property.
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.designer.api.repository
19 import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
20 import org.springframework.data.jpa.repository.JpaRepository
21 import org.springframework.stereotype.Repository
22 import javax.transaction.Transactional
25 interface ModelTypeRepository : JpaRepository<ModelType, String> {
28 * This is a findByModelName method
30 * @param modelName Model Name
31 * @return Optional<ModelType>
33 fun findByModelName(modelName: String): ModelType?
36 * This is a findByModelNameIn method
38 * @param modelNames Model Names
39 * @return List<ModelType>
41 fun findByModelNameIn(modelNames: List<String>): List<ModelType>
44 * This is a findByDerivedFrom method
46 * @param derivedFrom Derived From
47 * @return List<ModelType>
49 fun findByDerivedFrom(derivedFrom: String): List<ModelType>
52 * This is a findByDerivedFromIn method
54 * @param derivedFroms Derived Froms
55 * @return List<ModelType>
57 fun findByDerivedFromIn(derivedFroms: List<String>): List<ModelType>
60 * This is a findByDefinitionType method
62 * @param definitionType Definition Type
63 * @return List<ModelType>
65 fun findByDefinitionType(definitionType: String): List<ModelType>
68 * This is a findByDefinitionTypeIn method
70 * @param definitionTypes Definition Types
71 * @return List<ModelType>
73 fun findByDefinitionTypeIn(definitionTypes: List<String>): List<ModelType>
76 * This is a findByTagsContainingIgnoreCase method
79 * @return Optional<ModelType>
81 fun findByTagsContainingIgnoreCase(tags: String): List<ModelType>
84 * This is a deleteByModelName method
86 * @param modelName ModelName
89 fun deleteByModelName(modelName: String)