X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=datarouter-prov%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fprovisioning%2Fbeans%2FDeliveryExtraRecord.java;h=4a26a9f6a8c267122a2af350e05fb9a9cc1394c6;hb=bc1df610cddfb558cf6bde90c269b4af59768648;hp=5aa513023603ce556bfcb80d814bd90ea9462a65;hpb=8cbe8a88bc6dfe8673a33a017fe6a5a3e7ce86c3;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 5aa51302..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,11 +57,12 @@ 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); ps.setNull(17, Types.VARCHAR); ps.setLong(19, contentLength2); + ps.setNull(20, Types.VARCHAR); } }