public final class FirestoreDefaultClassMapper extends Object implements FirestoreClassMapper
| Constructor and Description |
|---|
FirestoreDefaultClassMapper(FirestoreMappingContext mappingContext) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
documentToEntity(com.google.firestore.v1.Document document,
Class<T> clazz)
Converts a Firestore document to an entity.
|
<T> com.google.firestore.v1.Document |
entityToDocument(T entity,
String documentResourceName)
Converts an entity to a Firestore document.
|
<T> T |
setUpdateTime(T entity,
com.google.cloud.Timestamp updateTime) |
<T> com.google.firestore.v1.Value |
toFirestoreValue(T sourceValue)
Converts an entity to a Firestore type.
|
public FirestoreDefaultClassMapper(FirestoreMappingContext mappingContext)
public <T> com.google.firestore.v1.Value toFirestoreValue(T sourceValue)
FirestoreClassMappertoFirestoreValue in interface FirestoreClassMapperT - the type of the object to convertsourceValue - the object to convertpublic <T> com.google.firestore.v1.Document entityToDocument(T entity,
String documentResourceName)
FirestoreClassMapperentityToDocument in interface FirestoreClassMapperT - the type of the object to convertentity - the object to convertdocumentResourceName - the fully-qualified identifier of the documentDocument that can be stored in Firestorepublic <T> T documentToEntity(com.google.firestore.v1.Document document,
Class<T> clazz)
FirestoreClassMapperdocumentToEntity in interface FirestoreClassMapperT - the type of the target objectdocument - the Document to convertclazz - the type of the target entitypublic <T> T setUpdateTime(T entity,
com.google.cloud.Timestamp updateTime)
setUpdateTime in interface FirestoreClassMapperCopyright © 2024. All rights reserved.