|
Spring Data MongoDB | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - the type of the object to convert to a DBObjectpublic interface MongoWriter<T>
A MongoWriter is responsible for converting an object of type T to the native MongoDB representation DBObject.
| Method Summary | |
|---|---|
Object |
convertToMongoType(Object obj)
Converts the given object into one Mongo will be able to store natively. |
Object |
convertToMongoType(Object obj,
TypeInformation<?> typeInformation)
Converts the given object into one Mongo will be able to store natively but retains the type information in case the given TypeInformation differs from the given object type. |
com.mongodb.DBRef |
toDBRef(Object object,
MongoPersistentProperty referingProperty)
Creates a DBRef to refer to the given object. |
| Methods inherited from interface org.springframework.data.convert.EntityWriter |
|---|
write |
| Method Detail |
|---|
Object convertToMongoType(Object obj)
obj - can be null.
Object convertToMongoType(Object obj,
TypeInformation<?> typeInformation)
TypeInformation differs from the given object type.
obj - can be null.typeInformation - can be null.
com.mongodb.DBRef toDBRef(Object object,
MongoPersistentProperty referingProperty)
DBRef to refer to the given object.
object - the object to create a DBRef to link to. The object's type has to carry an id attribute.referingProperty - the client-side property referring to the object which might carry additional metadata for
the DBRef object to create. Can be null.
|
Spring Data MongoDB | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||