@java.lang.SuppressWarnings({"rawtypes", "unchecked"}) public class MongoEntityPersister extends AbstractMongoObectEntityPersister
A EntityPersister implementation for the Mongo document store
Modifiers | Name | Description |
---|---|---|
static ValueRetrievalStrategy<Document> |
VALUE_RETRIEVAL_STRATEGY |
Fields inherited from class | Fields |
---|---|
class AbstractMongoObectEntityPersister |
INSTANCE_PREFIX, MONGO_CLASS_FIELD, MONGO_ID_FIELD, NEXT_ID_SUFFIX, hasNumericalIdentifier, hasStringIdentifier |
class NativeEntryEntityPersister |
EMBEDDED_PREFIX, classMapping |
class ThirdPartyCacheEntityPersister |
cacheAdapterRepository |
class LockableEntityPersister |
DEFAULT_TIMEOUT |
class EntityPersister |
proxyFactory, publisher, reflector, session |
Constructor and description |
---|
MongoEntityPersister(MappingContext mappingContext, PersistentEntity entity, MongoSession mongoSession, org.springframework.context.ApplicationEventPublisher publisher) |
Type Params | Return Type | Name and description |
---|---|---|
|
protected Document |
createDBObjectWithKey(java.lang.Object key) |
|
protected Document |
createNewEntry(java.lang.String family, java.lang.Object instance) |
|
protected Document |
createNewEntry(java.lang.String family) |
|
public Query |
createQuery() |
|
protected void |
deleteEntries(java.lang.String family, java.util.List<java.lang.Object> keys) |
|
protected void |
deleteEntry(java.lang.String family, java.lang.Object key, java.lang.Object entry) |
|
protected java.lang.Object |
generateIdentifier(PersistentEntity persistentEntity, Document nativeEntry) |
|
protected java.lang.String |
getCollectionName(PersistentEntity persistentEntity, Document nativeEntry) |
|
public static java.lang.Object |
getSimpleNativePropertyValue(java.lang.Object value, MappingContext mappingContext) Convert a value into a type suitable for use in Mongo. |
|
public java.lang.Object |
getValue(Document document, java.lang.String name) |
|
protected boolean |
isEmbeddedEntry(java.lang.Object entry) |
|
protected void |
loadEmbeddedCollection(EmbeddedCollection embeddedCollection, EntityAccess ea, java.lang.Object embeddedInstances, java.lang.String propertyKey) |
|
protected Document |
retrieveEntry(PersistentEntity persistentEntity, java.lang.String family, java.io.Serializable key) |
|
public void |
run() |
|
public static void |
setDBObjectValue(Document nativeEntry, java.lang.String key, java.lang.Object value, MappingContext mappingContext) |
|
protected void |
setEntryValue(Document nativeEntry, java.lang.String key, java.lang.Object value) |
|
public void |
setValue(Document document, java.lang.String name, java.lang.Object value) |
|
protected java.lang.Object |
storeEntry(PersistentEntity persistentEntity, EntityAccess entityAccess, java.lang.Object storeId, Document nativeEntry) |
|
public void |
updateEntry(PersistentEntity persistentEntity, EntityAccess ea, java.lang.Object key, Document entry) |
Convert a value into a type suitable for use in Mongo. Collections and maps are converted recursively. The mapping context is used for the conversion if possible, otherwise toString() is the eventual fallback.
value
- The value to convert (or null)mappingContext
- The mapping context.