code: boolean deleteEntity(@NotNull final PersistentStoreTransaction txn, @NotNull final PersistentEntity entity) {
          clearProperties(txn, entity);
          clearBlobs(txn, entity);
          deleteLinks(txn, entity);
          final PersistentEntityId id = entity.getId();
          final int entityTypeId = id.getTypeId();
          final long entityLocalId = id.getLocalId();
          final ByteIterable key = LongBinding.longToCompressedEntry(entityLocalId);
          if (config.isDebugSearchForIncomingLinksOnDelete()) {
              // search for incoming links
              final List<String> allLinkNames = getAllLinkNames(txn);
              for (final String entityType : txn.getEntityTypes()) {
                  for (final String linkName : allLinkNames) {
                      //noinspection LoopStatementThatDoesntLoop
                      for (final Entity referrer : txn.findLinks(entityType, entity, linkName)) {
                          throw new EntityStoreException(entity +
                              " is about to be deleted, but it is referenced by " + referrer + ", link name: " + linkName);
                      }
                  }
              }
          }
          if (getEntitiesTable(txn, entityTypeId).delete(txn.getEnvironmentTransaction(), key)) {
              txn.entityDeleted(id);
              return true;
          }
          return false;
      }
docs: Deletes specified entity clearing all its properties and deleting all its outgoing links.
  
  @param entity to delete.