code: public boolean isDeleted(DbEntity dbEntity) {
      CachedDbEntity cachedDbEntity = getCachedEntity(dbEntity);
      if(cachedDbEntity == null) {
        return false;
      } else {
        return cachedDbEntity.getEntityState() == DELETED_MERGED
            || cachedDbEntity.getEntityState() == DELETED_PERSISTENT
            || cachedDbEntity.getEntityState() == DELETED_TRANSIENT;
      }
    }
docs: Allows checking whether the provided entity is present in the cache
  and is marked to be deleted.
  
  @param dbEntity the entity to check
  @return true if the provided entity is present in the cache and is
  marked to be deleted