98f26473e836232cab906eac8891dc6f6c6db6b8
[ccsdk/features.git] /
1 /*\r
2  * Copyright © 2017-2018 AT&T Intellectual Property.\r
3  * \r
4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except\r
5  * in compliance with the License. You may obtain a copy of the License at\r
6  * \r
7  * http://www.apache.org/licenses/LICENSE-2.0\r
8  * \r
9  * Unless required by applicable law or agreed to in writing, software distributed under the License\r
10  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\r
11  * or implied. See the License for the specific language governing permissions and limitations under\r
12  * the License.\r
13  */\r
14 \r
15 package org.onap.ccsdk.config.data.adaptor.dao;\r
16 \r
17 import java.util.List;\r
18 import org.onap.ccsdk.config.data.adaptor.domain.ConfigResource;\r
19 import org.onap.ccsdk.sli.core.sli.SvcLogicException;\r
20 \r
21 public interface ConfigResourceDao {\r
22     \r
23     /**\r
24      * Issue a single SQL Insert operation for CONFIG_RESOURCE table via a prepared statement, binding\r
25      * the given arguments.\r
26      *\r
27      * @param transactionLog arguments to bind to the query (mapping it to the PreparedStatement to the\r
28      *        corresponding SQL type)\r
29      * @throws org.onap.ccsdk.sli.core.sli.SvcLogicException if there is any problem issuing the insert\r
30      */\r
31     public ConfigResource save(ConfigResource configResourceInput) throws SvcLogicException;\r
32     \r
33     /**\r
34      * Issue a single SQL Delete operation for CONFIG_RESOURCE table via a prepared statement, binding\r
35      * the given arguments.\r
36      *\r
37      * @param configResource arguments to bind to the query (mapping it to the PreparedStatement to the\r
38      *        corresponding SQL type)\r
39      * @throws org.onap.ccsdk.sli.core.sli.SvcLogicException if there is any problem issuing the insert\r
40      */\r
41     public void deleteByConfigResource(ConfigResource configResourceInput) throws SvcLogicException;\r
42     \r
43     /**\r
44      * Query CONFIG_RESOURCE table for given input param to create a prepared statement to bind to the\r
45      * query, mapping each row to a Java object via a ConfigResource RowMapper.\r
46      *\r
47      * @param configResource argument to bind to the query (mapping it to the PreparedStatement to the\r
48      *        corresponding SQL type)\r
49      * @return the result List, containing mapped objects\r
50      * @throws org.onap.ccsdk.sli.core.sli.SvcLogicException if the query fails\r
51      */\r
52     public List<ConfigResource> findByConfigResource(ConfigResource configResourceInput) throws SvcLogicException;\r
53     \r
54     public ConfigResource getConfigResource(ConfigResource configResource) throws SvcLogicException;\r
55 }\r