Methods Summary |
---|
public boolean | hasOrder()INTERNAL:
Returns true if the collection has order.
return true;
|
public boolean | isListPolicy()INTERNAL:
Returns true if this is a ListContainerPolicy.
return true;
|
public boolean | isValidContainer(java.lang.Object container)INTERNAL:
Validate the container type.
// PERF: Use instanceof which is inlined, not isAssignable which is very inefficent.
return container instanceof List;
|
public void | recordAddToCollectionInChangeRecord(oracle.toplink.essentials.internal.sessions.ObjectChangeSet changeSetToAdd, oracle.toplink.essentials.internal.sessions.CollectionChangeRecord collectionChangeRecord)This method is used to bridge the behaviour between Attribute Change
Tracking and deferred change tracking with respect to adding the same
instance multiple times. Each containerplicy type will implement specific
behaviour for the collection type it is wrapping. These methods are only
valid for collections containing object references.
if (collectionChangeRecord.getRemoveObjectList().containsKey(changeSetToAdd)) {
collectionChangeRecord.getRemoveObjectList().remove(changeSetToAdd);
} else {
if (collectionChangeRecord.getAddObjectList().contains(changeSetToAdd)) {
collectionChangeRecord.getAddOverFlow().add(changeSetToAdd);
} else {
collectionChangeRecord.getAddObjectList().put(changeSetToAdd, changeSetToAdd);
}
}
|
public void | recordRemoveFromCollectionInChangeRecord(oracle.toplink.essentials.internal.sessions.ObjectChangeSet changeSetToRemove, oracle.toplink.essentials.internal.sessions.CollectionChangeRecord collectionChangeRecord)This method is used to bridge the behaviour between Attribute Change
Tracking and deferred change tracking with respect to adding the same
instance multiple times. Each container policy type will implement
specific behaviour for the collection type it is wrapping. These methods
are only valid for collections containing object references.
if (collectionChangeRecord.getAddObjectList().containsKey(changeSetToRemove)) {
if (collectionChangeRecord.getAddOverFlow().contains(changeSetToRemove)){
collectionChangeRecord.getAddOverFlow().remove(changeSetToRemove);
} else {
collectionChangeRecord.getAddObjectList().remove(changeSetToRemove);
}
} else {
collectionChangeRecord.getRemoveObjectList().put(changeSetToRemove, changeSetToRemove);
}
|