public interface FirestoreClassMapper
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.
|
<T> com.google.firestore.v1.Value toFirestoreValue(T sourceValue)
T
- the type of the object to convertsourceValue
- the object to convert<T> com.google.firestore.v1.Document entityToDocument(T entity, String documentResourceName)
T
- the type of the object to convertentity
- the object to convertdocumentResourceName
- the fully-qualified identifier of the documentDocument
that can be stored in Firestore<T> T documentToEntity(com.google.firestore.v1.Document document, Class<T> clazz)
T
- the type of the target objectdocument
- the Document
to convertclazz
- the type of the target entity<T> T setUpdateTime(T entity, com.google.cloud.Timestamp updateTime)
Copyright © 2021. All rights reserved.