X-Git-Url: https://gerrit.onap.org/r/gitweb?p=dmaap%2Fdatarouter.git;a=blobdiff_plain;f=datarouter-prov%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fprovisioning%2Fbeans%2FDeliveryRecord.java;h=0bce491050219e3c9c85b0c5a6469f4701dfc7fd;hp=07fe7372499f3f857ae1a23c2f2f2b0abf8bf3e8;hb=bc1df610cddfb558cf6bde90c269b4af59768648;hpb=a60d80ff7bfae8a152c950486d9a1877628e13a4 diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/DeliveryRecord.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/DeliveryRecord.java index 07fe7372..0bce4910 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/DeliveryRecord.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/DeliveryRecord.java @@ -46,19 +46,31 @@ public class DeliveryRecord extends BaseLogRecord { private int result; private String user; + /** + * Constructor for DeliverRecord. + * @param pp string array of DeliverRecord attributes + * @throws ParseException in case of parse error + */ public DeliveryRecord(String[] pp) throws ParseException { super(pp); String fileid = pp[5]; - if (fileid.lastIndexOf('/') >= 0) + if (fileid.lastIndexOf('/') >= 0) { fileid = fileid.substring(fileid.lastIndexOf('/') + 1); + } this.subid = Integer.parseInt(pp[4]); this.fileid = fileid; this.result = Integer.parseInt(pp[10]); this.user = pp[9]; - if (this.user != null && this.user.length() > 50) + if (this.user != null && this.user.length() > 50) { this.user = this.user.substring(0, 50); + } } + /** + * DeliverRecord constructor from ResultSet. + * @param rs ResultSet + * @throws SQLException in case of get error from SQL statement + */ public DeliveryRecord(ResultSet rs) throws SQLException { super(rs); this.subid = rs.getInt("DELIVERY_SUBID"); @@ -99,7 +111,11 @@ public class DeliveryRecord extends BaseLogRecord { this.user = user; } - + /** + * Method to reorder LOGJSONObject. + * @param jo LOGJSONObject + * @return new LOGJSONObject + */ public LOGJSONObject reOrderObject(LOGJSONObject jo) { LinkedHashMap logrecordObj = new LinkedHashMap<>();