[DMAAP-48] Initial code import
[dmaap/datarouter.git] / datarouter-prov / src / main / java / com / att / research / datarouter / provisioning / beans / Loadable.java
1 /*******************************************************************************\r
2  * ============LICENSE_START==================================================\r
3  * * org.onap.dmaap\r
4  * * ===========================================================================\r
5  * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.\r
6  * * ===========================================================================\r
7  * * Licensed under the Apache License, Version 2.0 (the "License");\r
8  * * you may not use this file except in compliance with the License.\r
9  * * You may obtain a copy of the License at\r
10  * * \r
11  *  *      http://www.apache.org/licenses/LICENSE-2.0\r
12  * * \r
13  *  * Unless required by applicable law or agreed to in writing, software\r
14  * * distributed under the License is distributed on an "AS IS" BASIS,\r
15  * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16  * * See the License for the specific language governing permissions and\r
17  * * limitations under the License.\r
18  * * ============LICENSE_END====================================================\r
19  * *\r
20  * * ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
21  * *\r
22  ******************************************************************************/\r
23 \r
24 \r
25 package com.att.research.datarouter.provisioning.beans;\r
26 \r
27 import java.sql.PreparedStatement;\r
28 import java.sql.SQLException;\r
29 \r
30 import com.att.research.datarouter.provisioning.utils.LogfileLoader;\r
31 \r
32 /**\r
33  * This interface is used by bean classes that can be loaded into the LOG_RECORDS table using the\r
34  * PreparedStatement at {@link LogfileLoader}.INSERT_SQL.\r
35  *\r
36  * @author Robert Eby\r
37  * @version $Id: Loadable.java,v 1.2 2013/08/06 13:28:33 eby Exp $\r
38  */\r
39 public interface Loadable {\r
40         /**\r
41          * Load the 18 fields in the PreparedStatement <i>ps</i>. The fields are:\r
42          * <ol>\r
43          * <li>type (String)</li>\r
44          * <li>event_time (long)</li>\r
45          * <li>publish ID (String)</li>\r
46          * <li>feed ID (int)</li>\r
47          * <li>request URI (String)</li>\r
48          * <li>method (String)</li>\r
49          * <li>content type (String)</li>\r
50          * <li>content length (long)</li>\r
51          * <li>feed File ID (String)</li>\r
52          * <li>remote address (String)</li>\r
53          * <li>user (String)</li>\r
54          * <li>status (int)</li>\r
55          * <li>delivery subscriber id (int)</li>\r
56          * <li>delivery File ID (String)</li>\r
57          * <li>result (int)</li>\r
58          * <li>attempts (int)</li>\r
59          * <li>reason (String)</li>\r
60          * <li>record ID (long)</li>\r
61          * </ol>\r
62          * @param ps the PreparedStatement to load\r
63          */\r
64         public void load(PreparedStatement ps) throws SQLException;\r
65 }\r