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.apps.controllerblueprints.service.repository
19 import org.onap.ccsdk.apps.controllerblueprints.service.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> {
27 * This is a findByModelName method
29 * @param modelName Model Name
30 * @return Optional<ModelType>
32 fun findByModelName(modelName: String): ModelType?
34 * This is a findByModelNameIn method
36 * @param modelNames Model Names
37 * @return List<ModelType>
39 fun findByModelNameIn(modelNames: List<String>): List<ModelType>
41 * This is a findByDerivedFrom method
43 * @param derivedFrom Derived From
44 * @return List<ModelType>
46 fun findByDerivedFrom(derivedFrom: String): List<ModelType>
48 * This is a findByDerivedFromIn method
50 * @param derivedFroms Derived Froms
51 * @return List<ModelType>
53 fun findByDerivedFromIn(derivedFroms: List<String>): List<ModelType>
56 * This is a findByDefinitionType method
58 * @param definitionType Definition Type
59 * @return List<ModelType>
61 fun findByDefinitionType(definitionType: String): List<ModelType>
63 * This is a findByDefinitionTypeIn method
65 * @param definitionTypes Definition Types
66 * @return List<ModelType>
68 fun findByDefinitionTypeIn(definitionTypes: List<String>): List<ModelType>
71 * This is a findByTagsContainingIgnoreCase method
74 * @return Optional<ModelType>
76 fun findByTagsContainingIgnoreCase(tags: String): List<ModelType>
79 * This is a deleteByModelName method
81 * @param modelName ModelName
84 fun deleteByModelName(modelName: String)