()
| 104 | } // end of MongoConnect |
| 105 | |
| 106 | public int MongoDisconnect() { |
| 107 | int rc = 0; |
| 108 | |
| 109 | try { |
| 110 | if (cursor != null) { |
| 111 | if (DEBUG) |
| 112 | System.out.println("Closing cursor"); |
| 113 | |
| 114 | cursor.close(); |
| 115 | cursor = null; |
| 116 | } // endif client |
| 117 | |
| 118 | if (client != null) { |
| 119 | if (DEBUG) |
| 120 | System.out.println("Closing connection"); |
| 121 | |
| 122 | client.close(); |
| 123 | client = null; |
| 124 | } // endif client |
| 125 | |
| 126 | } catch (MongoException se) { |
| 127 | SetErrmsg(se); |
| 128 | rc += 8; |
| 129 | } // end try/catch |
| 130 | |
| 131 | return rc; |
| 132 | } // end of MongoDisconnect |
| 133 | |
| 134 | public boolean GetCollection(String name) { |
| 135 | if (DEBUG) |