throw new IllegalArgumentException("requests can not contain a null value"); } else if (writeModel instanceof InsertOneModel) { TDocument document = ((InsertOneModel<TDocument>) writeModel).getDocument(); if (getCodec() instanceof CollectibleCodec) { document = ((CollectibleCodec<TDocument>) getCodec()).generateIdIfAbsentFromDocument(document);
@SuppressWarnings("unchecked") InsertOneModel<Document> a = (InsertOneModel<Document>) o; Document id = (Document) a.getDocument().get("_id");
} else { if (failedModel instanceof InsertOneModel) { log.error("The event '" + ((InsertOneModel) failedModel).getDocument().toString() + "' failed to insert into the Mongo Event Table due to " + bulkWriteError.getMessage()); } else {
throw new IllegalArgumentException("requests can not contain a null value"); } else if (writeModel instanceof InsertOneModel) { TDocument document = ((InsertOneModel<TDocument>) writeModel).getDocument(); if (getCodec() instanceof CollectibleCodec) { document = ((CollectibleCodec<TDocument>) getCodec()).generateIdIfAbsentFromDocument(document);