use of org.eclipse.jnosql.communication.elasticsearch.document.EntityConverter.ENTITY in project jnosql-diana-driver by eclipse.
the class ElasticsearchEntry method toEntity.
DocumentEntity toEntity() {
Document id = Document.of(ID_FIELD, this.id);
List<Document> documents = map.keySet().stream().map(k -> toDocument(k, map)).collect(Collectors.toList());
DocumentEntity entity = DocumentEntity.of(collection, documents);
entity.remove(ID_FIELD);
entity.add(id);
return entity;
}
Aggregations