class ObjectReferentialRepository {

    public boolean delete(TapeLibraryObjectReferentialId tapeLibraryObjectReferentialId)
        throws ObjectReferentialException {
        try {
            DeleteResult deleteResult = collection.deleteOne(
                Filters.eq(TapeObjectReferentialEntity.ID,
                    toBson(tapeLibraryObjectReferentialId)));

            return (deleteResult.getDeletedCount() > 0L);
        } catch (MongoException ex) {
            throw new ObjectReferentialException(
                "Could not delete tar referential for id " +
                    tapeLibraryObjectReferentialId.getContainerName() + "/" +
                    tapeLibraryObjectReferentialId.getObjectName(), ex);
        }
    }

    public  ObjectReferentialRepository(MongoCollection<Document> collection);

}