public abstract class AbstractMongoObectEntityPersister<T> extends NativeEntryEntityPersister
Abstract implementation of MongoDB mongo object mapping entity persister. This entity persister converts to and from MongoDB BSON object types (either Document or DBObject)
Modifiers | Name | Description |
---|---|---|
protected class |
AbstractMongoObectEntityPersister.MongoAssociationIndexer |
|
static interface |
AbstractMongoObectEntityPersister.ValueRetrievalStrategy |
Strategy interface for implementors to implement to set and get values from the native type |
Modifiers | Name | Description |
---|---|---|
static java.lang.String |
INSTANCE_PREFIX |
|
static java.lang.String |
MONGO_CLASS_FIELD |
|
static java.lang.String |
MONGO_ID_FIELD |
|
protected static java.lang.String |
NEXT_ID_SUFFIX |
|
protected boolean |
hasNumericalIdentifier |
|
protected boolean |
hasStringIdentifier |
|
static org.slf4j.Logger |
log |
Fields inherited from class | Fields |
---|---|
class NativeEntryEntityPersister |
EMBEDDED_PREFIX, classMapping |
class ThirdPartyCacheEntityPersister |
cacheAdapterRepository |
class LockableEntityPersister |
DEFAULT_TIMEOUT |
class EntityPersister |
mappingContext, persistentEntity, proxyFactory, publisher, reflector, session |
Constructor and description |
---|
AbstractMongoObectEntityPersister
(MappingContext mappingContext, PersistentEntity entity, Session session, org.springframework.context.ApplicationEventPublisher publisher) |
Type Params | Return Type | Name and description |
---|---|---|
|
protected void |
cascadeDeleteCollection(EntityAccess entityAccess, Association association) |
|
public static java.lang.String |
createInstanceCacheEntryKey(java.lang.Object instance) |
|
protected PersistentEntity |
discriminatePersistentEntity(PersistentEntity persistentEntity, T nativeEntry) |
|
protected boolean |
doesRequirePropertyIndexing() |
|
protected java.lang.Object |
formulateDatabaseReference(PersistentEntity persistentEntity, Association association, java.io.Serializable associationId) |
|
public AssociationIndexer |
getAssociationIndexer(T nativeEntry, Association association) |
|
public java.lang.String |
getCollectionName(PersistentEntity persistentEntity) |
|
protected abstract java.lang.String |
getCollectionName(PersistentEntity persistentEntity, T nativeEntry) |
|
protected T |
getEmbedded(T nativeEntry, java.lang.String key) |
|
public java.lang.String |
getEntityFamily() |
|
protected java.lang.Object |
getEntryValue(T nativeEntry, java.lang.String property) |
|
protected java.lang.Object |
getIdentifierForKey(java.lang.Object key) |
|
protected java.util.Collection |
getManyToManyKeys(PersistentEntity persistentEntity, java.lang.Object object, java.io.Serializable nativeKey, T nativeEntry, ManyToMany manyToMany) |
|
public MongoSession |
getMongoSession() |
|
public PropertyValueIndexer |
getPropertyIndexer(PersistentProperty property) |
|
protected java.lang.String |
getPropertyKey(PersistentProperty prop) |
|
abstract ValueRetrievalStrategy<T> |
getValueRetrievalStrategy()
|
|
public boolean |
isDirty(java.lang.Object instance, java.lang.Object entry) |
|
protected boolean |
isReference(Association association) |
|
protected java.util.List |
loadEmbeddedCollectionKeys(Association association, EntityAccess ea, T nativeEntry) Implementors who want to support one-to-many associations embedded should implement this method |
|
protected void |
refreshObjectStateFromNativeEntry(PersistentEntity persistentEntity, java.lang.Object obj, java.io.Serializable nativeKey, T nativeEntry, boolean isEmbedded) |
|
protected java.util.List<java.lang.Object> |
retrieveAllEntities(PersistentEntity persistentEntity, java.lang.Iterable<java.io.Serializable> keys) |
|
protected java.util.List<java.lang.Object> |
retrieveAllEntities(PersistentEntity persistentEntity, java.io.Serializable[] keys) |
|
protected void |
setEmbedded(T nativeEntry, java.lang.String key, T embeddedEntry) |
|
protected void |
setEmbeddedCollection(T nativeEntry, java.lang.String key, java.util.Collection<?> instances, java.util.List<T> embeddedEntries) |
|
protected void |
setEmbeddedCollectionKeys(Association association, EntityAccess embeddedEntityAccess, T embeddedEntry, java.util.List<java.io.Serializable> keys) |
|
protected void |
setEmbeddedMap(T nativeEntry, java.lang.String key, java.util.Map instances, java.util.Map<java.lang.Object, T> embeddedEntries) |
|
protected void |
setManyToMany(PersistentEntity persistentEntity, java.lang.Object obj, T nativeEntry, ManyToMany manyToMany, java.util.Collection associatedObjects, java.util.Map<Association, java.util.List<java.io.Serializable>> toManyKeys) |
Implementors who want to support one-to-many associations embedded should implement this method
association
- The association