public abstract class AbstractDocumentEntityConverter extends Object implements DocumentEntityConverter
DocumentEntityConverter| Constructor and Description |
|---|
AbstractDocumentEntityConverter() |
| Modifier and Type | Method and Description |
|---|---|
protected <T> Consumer<String> |
feedObject(T instance,
List<org.jnosql.diana.api.document.Document> documents,
Map<String,FieldRepresentation> fieldsGroupByName) |
protected abstract ClassRepresentations |
getClassRepresentations() |
protected abstract Converters |
getConverters() |
protected abstract Reflections |
getReflections() |
org.jnosql.diana.api.document.DocumentEntity |
toDocument(Object entityInstance)
Converts the instance entity to
DocumentEntity |
<T> T |
toEntity(Class<T> entityClass,
org.jnosql.diana.api.document.DocumentEntity entity)
Converts a
DocumentEntity to entity |
protected <T> T |
toEntity(Class<T> entityClass,
List<org.jnosql.diana.api.document.Document> documents) |
<T> T |
toEntity(org.jnosql.diana.api.document.DocumentEntity entity)
Similar to
DocumentEntityConverter.toEntity(Class, DocumentEntity), but
search the instance type from DocumentEntity.getName() |
<T> T |
toEntity(T entityInstance,
org.jnosql.diana.api.document.DocumentEntity entity)
Converts a
DocumentEntity to entity
Instead of creating a new object is uses the instance used in this parameters |
protected abstract ClassRepresentations getClassRepresentations()
protected abstract Reflections getReflections()
protected abstract Converters getConverters()
public org.jnosql.diana.api.document.DocumentEntity toDocument(Object entityInstance)
DocumentEntityConverterDocumentEntitytoDocument in interface DocumentEntityConverterentityInstance - the instnaceDocumentEntity instancepublic <T> T toEntity(Class<T> entityClass, org.jnosql.diana.api.document.DocumentEntity entity)
DocumentEntityConverterDocumentEntity to entitytoEntity in interface DocumentEntityConverterT - the entity typeentityClass - the entity classentity - the DocumentEntity to be convertedDocumentEntitypublic <T> T toEntity(T entityInstance,
org.jnosql.diana.api.document.DocumentEntity entity)
DocumentEntityConverterDocumentEntity to entity
Instead of creating a new object is uses the instance used in this parameterstoEntity in interface DocumentEntityConverterT - the entity typeentityInstance - the entity classentity - the DocumentEntity to be convertedDocumentEntityprotected <T> T toEntity(Class<T> entityClass, List<org.jnosql.diana.api.document.Document> documents)
public <T> T toEntity(org.jnosql.diana.api.document.DocumentEntity entity)
DocumentEntityConverterDocumentEntityConverter.toEntity(Class, DocumentEntity), but
search the instance type from DocumentEntity.getName()toEntity in interface DocumentEntityConverterT - the entity typeentity - the DocumentEntity to be convertedDocumentEntityCopyright © 2018. All rights reserved.