diff options
author | Arundathi Patil <arundpil@in.ibm.com> | 2019-02-07 20:35:53 +0530 |
---|---|---|
committer | IBM602-PC0F1E3C\Arundathi <arundpil@in.ibm.com> | 2019-02-07 20:36:07 +0530 |
commit | 98673e89bca05656f5a3c9595629a1929ac19d40 (patch) | |
tree | a5948e2eb8dd5f71eb57e08faabc3c507a30c54c | |
parent | e43bc462af00e9c05384313514b279e11372fd79 (diff) |
Sonar fix: Notification.java
Fixed sonar issues/code-smells across this file
Issue-ID: AAF-752
Change-Id: I124d59c91038e291f3cb49cb1e322a1823bffbdc
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
-rw-r--r-- | auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Notification.java | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Notification.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Notification.java index ac6cb67d..ae0d37b5 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Notification.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Notification.java @@ -84,6 +84,23 @@ public class Notification { private int current; public Organization org; public int count; + + public static Creator<Notification> v2_0_18 = new Creator<Notification>() { + @Override + public Notification create(Row row) { + int idx =row.getInt(1); + TYPE typeCreator = TYPE.get(idx); + if (typeCreator==null) { + return null; + } + return new Notification(row.getString(0), typeCreator, row.getTimestamp(2), row.getInt(3)); + } + + @Override + public String select() { + return "SELECT user,type,last,checksum FROM authz.notify LIMIT 100000"; + } + }; private Notification(String user, TYPE nt, Date last, int checksum) { this.user = user; @@ -144,23 +161,6 @@ public class Notification { public static Notification create(String user, TYPE type) { return new Notification(user,type,null,0); } - - public static Creator<Notification> v2_0_18 = new Creator<Notification>() { - @Override - public Notification create(Row row) { - int idx =row.getInt(1); - TYPE typeCreator = TYPE.get(idx); - if (typeCreator==null) { - return null; - } - return new Notification(row.getString(0), typeCreator, row.getTimestamp(2), row.getInt(3)); - } - - @Override - public String select() { - return "SELECT user,type,last,checksum FROM authz.notify LIMIT 100000"; - } - }; public void set(Message msg) { |