package org.onap.dmaap.datarouter.provisioning.beans;\r
\r
import java.sql.PreparedStatement;\r
-import java.sql.ResultSet;\r
import java.sql.SQLException;\r
import java.sql.Types;\r
import java.text.ParseException;\r
* @author Robert Eby\r
* @version $Id: PubFailRecord.java,v 1.1 2013/10/28 18:06:53 eby Exp $\r
*/\r
+\r
public class PubFailRecord extends BaseLogRecord {\r
private long contentLengthReceived;\r
private String sourceIP;\r
private String user;\r
private String error;\r
\r
+ /**\r
+ * PBF record constructor.\r
+ * @param pp string array of PBF attributes\r
+ * @throws ParseException in case of parse error\r
+ */\r
public PubFailRecord(String[] pp) throws ParseException {\r
super(pp);\r
this.contentLengthReceived = Long.parseLong(pp[8]);\r
this.error = pp[11];\r
}\r
\r
- public PubFailRecord(ResultSet rs) throws SQLException {\r
- super(rs);\r
- // Note: because this record should be "rare" these fields are mapped to unconventional fields in the DB\r
- this.contentLengthReceived = rs.getLong("CONTENT_LENGTH_2");\r
- this.sourceIP = rs.getString("REMOTE_ADDR");\r
- this.user = rs.getString("USER");\r
- this.error = rs.getString("FEED_FILEID");\r
- }\r
-\r
public long getContentLengthReceived() {\r
return contentLengthReceived;\r
}\r