f87dbb7458d9cc5645cd216905908ebc1c884e14
[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.TransactionLog;\r
19 import org.onap.ccsdk.sli.core.sli.SvcLogicException;\r
20 \r
21 public interface TransactionLogDao {\r
22     \r
23     /**\r
24      * Issue a single SQL Insert operation for CONFIG_TRANSACTION_LOG table via a prepared statement,\r
25      * binding 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 void save(TransactionLog transactionLog) throws SvcLogicException;\r
32     \r
33     /**\r
34      * Query CONFIG_TRANSACTION_LOG table for given request_id, mapping each row to a Java object via a\r
35      * TransactionLog RowMapper.\r
36      *\r
37      * @param requestId argument to bind to the query (leaving it to the PreparedStatement to guess the\r
38      *        corresponding SQL type)\r
39      * @return the result List, containing mapped objects\r
40      * @throws org.onap.ccsdk.sli.core.sli.SvcLogicException if the query fails\r
41      */\r
42     public List<TransactionLog> getTransactionsByRequestId(String requestId) throws SvcLogicException;\r
43     \r
44     /**\r
45      * Query CONFIG_TRANSACTION_LOG table for given request_id, mapping each row to a Java object via a\r
46      * TransactionLog RowMapper.\r
47      *\r
48      * @param requestId argument to bind to the query (leaving it to the PreparedStatement to guess the\r
49      *        corresponding SQL type)\r
50      * @param messageType argument to bind to the query (leaving it to the PreparedStatement to guess\r
51      *        the corresponding SQL type)\r
52      * @return the result List, containing mapped objects\r
53      * @throws org.onap.ccsdk.sli.core.sli.SvcLogicException if the query fails\r
54      */\r
55     public List<TransactionLog> getTransactionsByRequestId(String requestId, String messageType)\r
56             throws SvcLogicException;\r
57     \r
58 }\r