public interface ObjectFactory
Modifier and Type | Method and Description |
---|---|
<T> T |
createInstance(Class<T> clazz)
Creates an instance of the given class.
|
<T> T |
createInstance(Class<T> clazz,
com.mongodb.DBObject dbObj)
Creates an instance of the class defined in the
Mapper.CLASS_NAME_FIELDNAME field in the dbObject passed in. |
Object |
createInstance(Mapper mapper,
MappedField mf,
com.mongodb.DBObject dbObj)
Creates an instance of the class defined in the
Mapper.CLASS_NAME_FIELDNAME field in the dbObject passed in. |
List |
createList(MappedField mf)
Defines how morphia creates a List object.
|
Map |
createMap(MappedField mf)
Defines how morphia creates a Map object.
|
Set |
createSet(MappedField mf)
Defines how morphia creates a Set object.
|
<T> T createInstance(Class<T> clazz)
<T> T createInstance(Class<T> clazz, com.mongodb.DBObject dbObj)
Mapper.CLASS_NAME_FIELDNAME
field in the dbObject passed in. If that field
is missing, the given Class is used instead.Object createInstance(Mapper mapper, MappedField mf, com.mongodb.DBObject dbObj)
Mapper.CLASS_NAME_FIELDNAME
field in the dbObject passed in. If that field
is missing, morphia attempts to the MappedField to determine which concrete class to instantiate.Map createMap(MappedField mf)
List createList(MappedField mf)
Set createSet(MappedField mf)
Copyright © 2016. All rights reserved.