public void close() {
   if (shouldCloseLoader && !loader.isClosed()) {
     loader.close();
   }
   DatabaseFactory.freeConnection(cxn);
   cxn = null;
   loader = null;
 }
 public boolean isClosed() {
   return loader == null || loader.isClosed();
 }