private void check(boolean mustExist, boolean mustNotExist)
throws IllegalStateException, MissingBlobException, DuplicateBlobException {
ensureOpen();
if (mustExist && storeId == null)
throw new MissingBlobException(getId());
if (mustNotExist && storeId != null)
throw new DuplicateBlobException(getId());
}