Bring over Extend Batch programs
[aaf/authz.git] / auth / auth-batch / src / main / java / org / onap / aaf / auth / batch / helpers / Cred.java
index b58506e..c4a9b0d 100644 (file)
@@ -138,13 +138,14 @@ public class Cred  {
                     row = iter.next();
                     int type = row.getInt(1);
                     if (types.length>0) { // filter by types, if requested
-                        boolean quit = true;
+                        boolean hastype = false;
                         for (int t : types) {
                             if (t==type) {
+                               hastype=true;
                                 break;
                             }
                         }
-                        if (quit) {
+                        if (!hastype) {
                             continue;
                         }
                     }
@@ -280,7 +281,7 @@ public class Cred  {
     }
 
 
-    public static void row(StringBuilder sb, List<String> row) {
+    public static void batchDelete(StringBuilder sb, List<String> row) {
        sb.append("DELETE from authz.cred WHERE id='");
        sb.append(row.get(1));
        sb.append("' AND type=");
@@ -291,7 +292,6 @@ public class Cred  {
        sb.append("));\n");
        }
 
-
        public String toString() {
         StringBuilder sb = new StringBuilder(id);
         sb.append('[');