X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=datarouter-prov%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fprovisioning%2Fbeans%2FPubFailRecord.java;h=719b44fe8b0d9a91eebaea6a8c8f28d14f480236;hb=8280a5e1a6cfd155edfafe882439b8c04c6a4509;hp=88d48826d3e7ce538884b1c6ec89dbbab0e75c38;hpb=f926474924870c9ed4d5c4c8ccba55a1942d8e37;p=dmaap%2Fdatarouter.git diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/PubFailRecord.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/PubFailRecord.java index 88d48826..719b44fe 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/PubFailRecord.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/PubFailRecord.java @@ -24,7 +24,6 @@ package org.onap.dmaap.datarouter.provisioning.beans; import java.sql.PreparedStatement; -import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Types; import java.text.ParseException; @@ -35,12 +34,18 @@ import java.text.ParseException; * @author Robert Eby * @version $Id: PubFailRecord.java,v 1.1 2013/10/28 18:06:53 eby Exp $ */ + public class PubFailRecord extends BaseLogRecord { private long contentLengthReceived; private String sourceIP; private String user; private String error; + /** + * PBF record constructor. + * @param pp string array of PBF attributes + * @throws ParseException in case of parse error + */ public PubFailRecord(String[] pp) throws ParseException { super(pp); this.contentLengthReceived = Long.parseLong(pp[8]); @@ -49,15 +54,6 @@ public class PubFailRecord extends BaseLogRecord { this.error = pp[11]; } - public PubFailRecord(ResultSet rs) throws SQLException { - super(rs); - // Note: because this record should be "rare" these fields are mapped to unconventional fields in the DB - this.contentLengthReceived = rs.getLong("CONTENT_LENGTH_2"); - this.sourceIP = rs.getString("REMOTE_ADDR"); - this.user = rs.getString("USER"); - this.error = rs.getString("FEED_FILEID"); - } - public long getContentLengthReceived() { return contentLengthReceived; }