X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=datarouter-prov%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fprovisioning%2Fbeans%2FDeliveryExtraRecord.java;h=4a26a9f6a8c267122a2af350e05fb9a9cc1394c6;hb=HEAD;hp=2a959f3d86a19de8a9a75a64a7d3631567d3adb0;hpb=5da50e90e6c78700d48d7468849d4a1599a249b3;p=dmaap%2Fdatarouter.git diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/DeliveryExtraRecord.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/DeliveryExtraRecord.java index 2a959f3d..4a26a9f6 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/DeliveryExtraRecord.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/DeliveryExtraRecord.java @@ -25,7 +25,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; @@ -39,17 +38,17 @@ public class DeliveryExtraRecord extends BaseLogRecord { private int subid; private long contentLength2; + /** + * DLX constructor. + * @param pp string array of DXL attributes + * @throws ParseException in case of parse error + */ public DeliveryExtraRecord(String[] pp) throws ParseException { super(pp); this.subid = Integer.parseInt(pp[4]); this.contentLength2 = Long.parseLong(pp[6]); } - public DeliveryExtraRecord(ResultSet rs) throws SQLException { - super(rs); - // Note: because this record should be "rare" these fields are mapped to unconventional fields in the DB - this.subid = rs.getInt("DELIVERY_SUBID"); - this.contentLength2 = rs.getInt("CONTENT_LENGTH_2"); - } + @Override public void load(PreparedStatement ps) throws SQLException { ps.setString(1, "dlx"); // field 1: type @@ -58,7 +57,7 @@ public class DeliveryExtraRecord extends BaseLogRecord { ps.setNull(10, Types.VARCHAR); ps.setNull(11, Types.VARCHAR); ps.setNull(12, Types.INTEGER); - ps.setInt (13, subid); + ps.setInt(13, subid); ps.setNull(14, Types.VARCHAR); ps.setNull(15, Types.INTEGER); ps.setNull(16, Types.INTEGER);