code: public boolean isDeleted(Identity id)
      {
          ObjectEnvelope envelope = buffer.getByIdentity(id);
  
          return (envelope != null && envelope.needsDelete());
      }
docs: Checks if the object with the given identity has been deleted
  within the transaction.
  @param id The identity
  @return true if the object has been deleted
  @throws PersistenceBrokerException