IOT-3160 39/26939/1
authorOndrej Tomcik <ondrej.tomcik@kistler.com>
Fri, 23 Feb 2018 06:01:26 +0000 (07:01 +0100)
committerPeter Rafaj <peter.rafaj@kistler.com>
Tue, 11 Sep 2018 07:24:09 +0000 (09:24 +0200)
Change-Id: Ie9da1b7ea7ac70dcca094eba45cc51a59779eb34
Signed-off-by: Peter Rafaj <peter.rafaj@kistler.com>
cloud/account/src/main/java/org/iotivity/cloud/accountserver/db/MongoDB.java
cloud/resourcedirectory/src/main/java/org/iotivity/cloud/rdserver/db/MongoDB.java

index d91a19b..7df3546 100644 (file)
@@ -167,8 +167,6 @@ public class MongoDB {
             return false;
         }
 
-        showRecord(tableName);
-
         return true;
     }
 
@@ -206,8 +204,6 @@ public class MongoDB {
             return false;
         }
 
-        showRecord(tableName);
-
         return true;
     }
 
@@ -237,8 +233,6 @@ public class MongoDB {
             return false;
         }
 
-        showRecord(tableName);
-
         return true;
     }
 
@@ -274,8 +268,6 @@ public class MongoDB {
             return false;
         }
 
-        showRecord(tableName);
-
         return true;
     }
 
@@ -351,25 +343,4 @@ public class MongoDB {
 
         return resourceMap;
     }
-
-    private void showRecord(String tableName) {
-
-        MongoCollection<Document> collection = db.getCollection(tableName);
-        MongoCursor<Document> cursor = collection.find().iterator();
-
-        Log.info("<" + tableName + ">");
-
-        HashMap<String, Object> records = null;
-        int index = 0;
-        while (cursor.hasNext()) {
-
-            Document doc = cursor.next();
-            records = convertDocumentToHashMap(doc);
-
-            Log.info("[" + index + "] " + records.toString());
-            index++;
-        }
-
-        cursor.close();
-    }
 }
index fc14645..80d2869 100644 (file)
@@ -165,8 +165,6 @@ public class MongoDB {
             return false;
         }
 
-        showRecord(tableName);
-
         return true;
     }
 
@@ -204,8 +202,6 @@ public class MongoDB {
             return false;
         }
 
-        showRecord(tableName);
-
         return true;
     }
 
@@ -235,8 +231,6 @@ public class MongoDB {
             return false;
         }
 
-        showRecord(tableName);
-
         return true;
     }
 
@@ -267,8 +261,6 @@ public class MongoDB {
             return false;
         }
 
-        showRecord(tableName);
-
         return true;
     }
 
@@ -329,25 +321,4 @@ public class MongoDB {
 
         return resourceMap;
     }
-
-    private void showRecord(String tableName) {
-
-        MongoCollection<Document> collection = db.getCollection(tableName);
-        MongoCursor<Document> cursor = collection.find().iterator();
-
-        Log.info("<" + tableName + ">");
-
-        HashMap<String, Object> records = null;
-        int index = 0;
-        while (cursor.hasNext()) {
-
-            Document doc = cursor.next();
-            records = convertDocumentToHashMap(doc);
-
-            Log.info("[" + index + "] " + records.toString());
-            index++;
-        }
-
-        cursor.close();
-    }
 }