Пример #1
0
 public synchronized void close__wrappee__base() throws DatabaseException {
   StringBuffer errors = null;
   checkEnv();
   checkProhibitedDbState(CLOSED, "Can't close Database:");
   this.hook44();
   removeAllTriggers();
   envHandle.removeReferringHandle(this);
   if (cursors.size() > 0) {
     errors = new StringBuffer("There are open cursors against the database.\n");
     errors.append("They will be closed.\n");
     Iterator iter = cursors.copy().iterator();
     while (iter.hasNext()) {
       Cursor dbc = (Cursor) iter.next();
       try {
         dbc.close();
       } catch (DatabaseException DBE) {
         errors.append("Exception while closing cursors:\n");
         errors.append(DBE.toString());
       }
     }
   }
   if (databaseImpl != null) {
     databaseImpl.removeReferringHandle(this);
     databaseImpl = null;
     handleLocker.setHandleLockOwner(true, this, true);
     handleLocker.operationEnd(true);
     state = CLOSED;
   }
   if (errors != null) {
     throw new DatabaseException(errors.toString());
   }
 }
Пример #2
0
 public String dumpString(int nSpaces, boolean dumpTags) {
   StringBuffer sb = new StringBuffer();
   sb.append(super.dumpString(nSpaces, dumpTags));
   sb.append('\n');
   sb.append(TreeUtils.indent(nSpaces));
   sb.append("<deleted val=\"").append(Boolean.toString(deleted));
   sb.append("\">");
   sb.append('\n');
   sb.append(databaseImpl.dumpString(nSpaces));
   return sb.toString();
 }
Пример #3
0
 public String dumpString(int nSpaces, boolean dumpTags) {
   StringBuffer self = new StringBuffer();
   if (dumpTags) {
     self.append(TreeUtils.indent(nSpaces));
     self.append(beginTag());
     self.append('\n');
   }
   self.append(super.dumpString(nSpaces + 2, true));
   self.append('\n');
   if (data != null) {
     self.append(TreeUtils.indent(nSpaces + 2));
     self.append("<data>");
     self.append(TreeUtils.dumpByteArray(data));
     self.append("</data>");
     self.append('\n');
   }
   if (dumpTags) {
     self.append(TreeUtils.indent(nSpaces));
     self.append(endTag());
   }
   return self.toString();
 }