class ArchiveReferentialRepository {

    public void insert(TapeArchiveReferentialEntity tapeArchiveReferentialEntity)
        throws ArchiveReferentialException {

        try {
            collection.insertOne(toBson(tapeArchiveReferentialEntity));
        } catch (MongoException ex) {
            throw new ArchiveReferentialException(
                "Could not insert or update archive referential for id " + tapeArchiveReferentialEntity.getArchiveId(), ex);
        }
    }

    public  ArchiveReferentialRepository(MongoCollection<Document> collection);

}