public class OrderedCollectionChangeRecord extends ChangeRecord implements OrderedCollectionChangeRecord
Purpose: This class holds the record of the changes made to a collection attribute of an object.
Description: Collections must be compared to each other and added and removed objects must be recorded seperately. NOTE: This class and its sub class are currently not used within TopLink and should be removed.
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Vector |
addIndexes |
protected java.util.Hashtable |
addObjectList |
protected int |
startIndexOfRemove |
attribute, mapping, owner| Constructor and Description |
|---|
OrderedCollectionChangeRecord(ObjectChangeSet owner)
This constructor returns a changeRecord representing the DirectCollection mapping
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAdditionChange(java.util.Hashtable additions,
java.util.Vector indexes,
UnitOfWorkChangeSet changes,
AbstractSession session)
This method takes a hastable of primitive objects and adds them to the add list.
|
java.util.Vector |
getAddIndexes()
This method returns the collection of indexes in which changes were made to this collection.
|
java.util.Hashtable |
getAddObjectList()
This method returns the collection of ChangeSets that were added to the collection.
|
int |
getStartRemoveIndex()
This method returns the index from where objects must be removed from the collection
|
void |
mergeRecord(ChangeRecord mergeFromRecord,
UnitOfWorkChangeSet mergeToChangeSet,
UnitOfWorkChangeSet mergeFromChangeSet)
INTERNAL:
This method will be used to merge one record into another
|
void |
setStartRemoveIndex(int startRemoveIndex)
This method sets the index from where objects must be removed from the collection
|
void |
updateReferences(UnitOfWorkChangeSet mergeToChangeSet,
UnitOfWorkChangeSet mergeFromChangeSet)
INTERNAL:
This method will be used to update the objectsChangeSets references
|
getAttribute, getMapping, getOwner, prepareForSynchronization, setAttribute, setMapping, setOwner, toString, updateChangeRecordWithNewValueclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAttribute, getOwnerprotected java.util.Hashtable addObjectList
protected java.util.Vector addIndexes
protected int startIndexOfRemove
public OrderedCollectionChangeRecord(ObjectChangeSet owner)
owner - prototype.changeset.ObjectChangeSet that ObjectChangeSet that uses this recordpublic void addAdditionChange(java.util.Hashtable additions,
java.util.Vector indexes,
UnitOfWorkChangeSet changes,
AbstractSession session)
public java.util.Vector getAddIndexes()
getAddIndexes in interface OrderedCollectionChangeRecordpublic java.util.Hashtable getAddObjectList()
getAddObjectList in interface OrderedCollectionChangeRecordpublic int getStartRemoveIndex()
getStartRemoveIndex in interface OrderedCollectionChangeRecordpublic void mergeRecord(ChangeRecord mergeFromRecord, UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet)
mergeRecord in class ChangeRecordpublic void setStartRemoveIndex(int startRemoveIndex)
public void updateReferences(UnitOfWorkChangeSet mergeToChangeSet, UnitOfWorkChangeSet mergeFromChangeSet)
updateReferences in class ChangeRecord