Class ListCollectionMapper
- 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<List>
-
- org.hibernate.envers.internal.entities.mapper.relation.ListCollectionMapper
-
- All Implemented Interfaces:
DynamicComponentMapperSupport,ModifiedFlagMapperSupport,PropertyMapper
public final class ListCollectionMapper extends AbstractCollectionMapper<List> implements PropertyMapper
- Author:
- Adam Warski (adam at warski dot org), Chris Cranford
-
-
Field Summary
-
Fields inherited from class org.hibernate.envers.internal.entities.mapper.relation.AbstractCollectionMapper
collectionClass, commonCollectionMapperData, configuration, ordinalInId, revisionTypeInId
-
-
Constructor Summary
Constructors Constructor Description ListCollectionMapper(Configuration configuration, CommonCollectionMapperData commonCollectionMapperData, MiddleComponentData elementComponentData, MiddleComponentData indexComponentData, boolean revisionTypeInId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Set<Object>buildCollectionChangeSet(Object eventCollection, Collection collection)protected Initializor<List>getInitializor(EnversService enversService, AuditReaderImplementor versionsReader, Object primaryKey, Number revision, boolean removed)protected CollectiongetNewCollectionContent(org.hibernate.collection.spi.PersistentCollection newCollection)protected CollectiongetOldCollectionContent(Serializable oldCollection)protected List<PersistentCollectionChangeData>mapCollectionChanges(org.hibernate.engine.spi.SessionImplementor session, org.hibernate.collection.spi.PersistentCollection newColl, Serializable oldColl, Object id)Map collection changes using hash identity.protected voidmapToMapFromObject(org.hibernate.engine.spi.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, resolveCollectionPersister
-
Methods inherited from class org.hibernate.envers.internal.entities.mapper.AbstractPropertyMapper
isDynamicComponentMap, markAsDynamicComponentMap
-
Methods inherited from class org.hibernate.envers.internal.entities.mapper.AbstractMapper
doPrivileged, getAndSetValue, getValueFromObject, getValueFromObject, newObjectInstance, setValueOnObject
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.envers.internal.entities.mapper.DynamicComponentMapperSupport
isDynamicComponentMap, markAsDynamicComponentMap
-
Methods inherited from interface org.hibernate.envers.internal.entities.mapper.ModifiedFlagMapperSupport
hasPropertiesWithModifiedFlag
-
Methods inherited from interface org.hibernate.envers.internal.entities.mapper.PropertyMapper
mapCollectionChanges, mapModifiedFlagsToMapForCollectionChange, mapModifiedFlagsToMapFromEntity, mapToEntityFromMap, mapToEntityFromMap, mapToMapFromEntity
-
-
-
-
Constructor Detail
-
ListCollectionMapper
public ListCollectionMapper(Configuration configuration, CommonCollectionMapperData commonCollectionMapperData, MiddleComponentData elementComponentData, MiddleComponentData indexComponentData, boolean revisionTypeInId)
-
-
Method Detail
-
getInitializor
protected Initializor<List> getInitializor(EnversService enversService, AuditReaderImplementor versionsReader, Object primaryKey, Number revision, boolean removed)
- Specified by:
getInitializorin classAbstractCollectionMapper<List>
-
getNewCollectionContent
protected Collection getNewCollectionContent(org.hibernate.collection.spi.PersistentCollection newCollection)
- Specified by:
getNewCollectionContentin classAbstractCollectionMapper<List>
-
getOldCollectionContent
protected Collection getOldCollectionContent(Serializable oldCollection)
- Specified by:
getOldCollectionContentin classAbstractCollectionMapper<List>
-
mapToMapFromObject
protected void mapToMapFromObject(org.hibernate.engine.spi.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<List>idData- Map to which composite-id data should be added.data- Where to map the data.changed- The changed collection element to map.
-
buildCollectionChangeSet
protected Set<Object> buildCollectionChangeSet(Object eventCollection, Collection collection)
- Specified by:
buildCollectionChangeSetin classAbstractCollectionMapper<List>
-
mapCollectionChanges
protected List<PersistentCollectionChangeData> mapCollectionChanges(org.hibernate.engine.spi.SessionImplementor session, org.hibernate.collection.spi.PersistentCollection newColl, Serializable oldColl, Object id)
Description copied from class:AbstractCollectionMapperMap collection changes using hash identity.- Specified by:
mapCollectionChangesin classAbstractCollectionMapper<List>- Parameters:
session- The session.newColl- The new persistent collection.oldColl- The old collection.id- The owning entity identifier.- Returns:
- the persistent collection changes.
-
-