Class BasicCollectionMapper<T extends Collection>
java.lang.Object
org.hibernate.envers.internal.entities.mapper.AbstractMapper
org.hibernate.envers.internal.entities.mapper.AbstractPropertyMapper
org.hibernate.envers.internal.entities.mapper.relation.AbstractCollectionMapper<T>
org.hibernate.envers.internal.entities.mapper.relation.BasicCollectionMapper<T>
- All Implemented Interfaces:
DynamicComponentMapperSupport,ModifiedFlagMapperSupport,PropertyMapper
- Direct Known Subclasses:
SortedSetCollectionMapper
public class BasicCollectionMapper<T extends Collection>
extends AbstractCollectionMapper<T>
implements PropertyMapper
-
Field Summary
FieldsFields inherited from class org.hibernate.envers.internal.entities.mapper.relation.AbstractCollectionMapper
collectionClass, commonCollectionMapperData, configuration, ordinalInId, revisionTypeInId -
Constructor Summary
ConstructorsConstructorDescriptionBasicCollectionMapper(Configuration configuration, CommonCollectionMapperData commonCollectionMapperData, Class<? extends T> collectionClass, Class<? extends T> proxyClass, MiddleComponentData elementComponentData, boolean ordinalInId, boolean revisionTypeInId) -
Method Summary
Modifier and TypeMethodDescriptionbuildCollectionChangeSet(Object eventCollection, Collection collection) protected Initializor<T>getInitializor(EnversService enversService, AuditReaderImplementor versionsReader, Object primaryKey, Number revision, boolean removed) protected CollectiongetNewCollectionContent(PersistentCollection newCollection) protected CollectiongetOldCollectionContent(Serializable oldCollection) protected List<PersistentCollectionChangeData>mapCollectionChanges(SessionImplementor session, PersistentCollection newColl, Serializable oldColl, Object id) Map collection changes using hash identity.protected voidmapToMapFromObject(SessionImplementor session, Map<String, Object> idData, Map<String, Object> data, Object changed) Maps the changed collection element to the given map.Methods inherited from class org.hibernate.envers.internal.entities.mapper.relation.AbstractCollectionMapper
addCollectionChanges, createIdMap, hasPropertiesWithModifiedFlag, isSame, mapCollectionChanges, mapModifiedFlagsToMapForCollectionChange, mapModifiedFlagsToMapFromEntity, mapToEntityFromMap, mapToEntityFromMap, mapToMapFromEntity, resolveCollectionPersisterMethods inherited from class org.hibernate.envers.internal.entities.mapper.AbstractPropertyMapper
isDynamicComponentMap, markAsDynamicComponentMapMethods inherited from class org.hibernate.envers.internal.entities.mapper.AbstractMapper
getAndSetValue, getValueFromObject, getValueFromObject, newObjectInstance, setValueOnObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.envers.internal.entities.mapper.DynamicComponentMapperSupport
isDynamicComponentMap, markAsDynamicComponentMapMethods inherited from interface org.hibernate.envers.internal.entities.mapper.ModifiedFlagMapperSupport
hasPropertiesWithModifiedFlagMethods inherited from interface org.hibernate.envers.internal.entities.mapper.PropertyMapper
mapCollectionChanges, mapModifiedFlagsToMapForCollectionChange, mapModifiedFlagsToMapFromEntity, mapToEntityFromMap, mapToEntityFromMap, mapToMapFromEntity
-
Field Details
-
elementComponentData
-
-
Constructor Details
-
BasicCollectionMapper
public BasicCollectionMapper(Configuration configuration, CommonCollectionMapperData commonCollectionMapperData, Class<? extends T> collectionClass, Class<? extends T> proxyClass, MiddleComponentData elementComponentData, boolean ordinalInId, boolean revisionTypeInId)
-
-
Method Details
-
getInitializor
protected Initializor<T> getInitializor(EnversService enversService, AuditReaderImplementor versionsReader, Object primaryKey, Number revision, boolean removed) - Specified by:
getInitializorin classAbstractCollectionMapper<T extends Collection>
-
getNewCollectionContent
- Specified by:
getNewCollectionContentin classAbstractCollectionMapper<T extends Collection>
-
getOldCollectionContent
- Specified by:
getOldCollectionContentin classAbstractCollectionMapper<T extends Collection>
-
mapToMapFromObject
protected void mapToMapFromObject(SessionImplementor session, Map<String, Object> idData, Map<String, Object> data, Object changed) Description copied from class:AbstractCollectionMapperMaps the changed collection element to the given map.- Specified by:
mapToMapFromObjectin classAbstractCollectionMapper<T extends Collection>idData- Map to which composite-id data should be added.data- Where to map the data.changed- The changed collection element to map.
-
buildCollectionChangeSet
- Specified by:
buildCollectionChangeSetin classAbstractCollectionMapper<T extends Collection>
-
mapCollectionChanges
protected List<PersistentCollectionChangeData> mapCollectionChanges(SessionImplementor session, PersistentCollection newColl, Serializable oldColl, Object id) Description copied from class:AbstractCollectionMapperMap collection changes using hash identity.- Specified by:
mapCollectionChangesin classAbstractCollectionMapper<T extends Collection>- Parameters:
session- The session.newColl- The new persistent collection.oldColl- The old collection.id- The owning entity identifier.- Returns:
- the persistent collection changes.
-