Code style cleanup for prov authz and beans
[dmaap/datarouter.git] / datarouter-prov / src / main / java / org / onap / dmaap / datarouter / provisioning / beans / ExpiryRecord.java
index 8e841e6..d812036 100644 (file)
@@ -46,19 +46,31 @@ public class ExpiryRecord extends BaseLogRecord {
     private int attempts;\r
     private String reason;\r
 \r
+    /**\r
+     * ExpiryRecord constructor.\r
+     * @param pp string array of ExpiryRecord attributes\r
+     * @throws ParseException in case of parse error\r
+     */\r
     public ExpiryRecord(String[] pp) throws ParseException {\r
         super(pp);\r
         String fileid = pp[5];\r
-        if (fileid.lastIndexOf('/') >= 0)\r
+        if (fileid.lastIndexOf('/') >= 0) {\r
             fileid = fileid.substring(fileid.lastIndexOf('/') + 1);\r
+        }\r
         this.subid = Integer.parseInt(pp[4]);\r
         this.fileid = fileid;\r
         this.attempts = Integer.parseInt(pp[10]);\r
         this.reason = pp[9];\r
-        if (!reason.equals("notRetryable") && !reason.equals("retriesExhausted") && !reason.equals("diskFull"))\r
+        if (!reason.equals("notRetryable") && !reason.equals("retriesExhausted") && !reason.equals("diskFull")) {\r
             this.reason = "other";\r
+        }\r
     }\r
 \r
+    /**\r
+     * ExpiryRecord constructor from ResultSet.\r
+     * @param rs ResultSet of ExpiryREcord attributes\r
+     * @throws SQLException in case of error with SQL statement\r
+     */\r
     public ExpiryRecord(ResultSet rs) throws SQLException {\r
         super(rs);\r
         this.subid = rs.getInt("DELIVERY_SUBID");\r
@@ -99,6 +111,11 @@ public class ExpiryRecord extends BaseLogRecord {
         this.reason = reason;\r
     }\r
 \r
+    /**\r
+     * Method to reorder LOGJSONObject.\r
+     * @param jo LOGJSONObject\r
+     * @return LOGJSONObject\r
+     */\r
     public LOGJSONObject reOrderObject(LOGJSONObject jo) {\r
         LinkedHashMap<String, Object> logrecordObj = new LinkedHashMap<>();\r
 \r
@@ -122,7 +139,7 @@ public class ExpiryRecord extends BaseLogRecord {
         jo.put("expiryReason", reason);\r
         jo.put("attempts", attempts);\r
 \r
-        return this.reOrderObject(jo);\r
+        return reOrderObject(jo);\r
     }\r
 \r
     @Override\r