code: public void delete(NodeData data) throws RepositoryException, UnsupportedOperationException,
        InvalidItemStateException, IllegalStateException
     {
        checkIfOpened();
  
        final String cid = getInternalId(data.getIdentifier());
  
        try
        {
           int nc = deleteItemByIdentifier(cid);
           if (nc <= 0)
           {
              throw new JCRInvalidItemStateException("(delete) Node not found " + data.getQPath().getAsString() + " "
                 + data.getIdentifier() + ". Probably was deleted by another session ", data.getIdentifier(),
                 ItemState.DELETED);
           }
  
           if (LOG.isDebugEnabled())
           {
              LOG.debug("Node deleted " + data.getQPath().getAsString() + ", " + data.getIdentifier() + ", "
                 + (data).getPrimaryTypeName().getAsString());
           }
  
        }
        catch (SQLException e)
        {
           if (LOG.isDebugEnabled())
           {
              LOG.error("Node remove. Database error: " + e, e);
           }
           exceptionHandler.handleDeleteException(e, data);
        }
     }
docs: {@inheritDoc}