/** * @return boolean * @param objectChange prototype.changeset.ObjectChangeSet */ public boolean equals(oracle.toplink.essentials.changesets.ObjectChangeSet objectChange) { if (this == objectChange) { return true; } else if (getCacheKey() == null) { //new objects are compared based on identity return false; } return (getCacheKey().equals(((ObjectChangeSet)objectChange).getCacheKey())); }
/** * ADVANCED: * This method returns the primary keys for the object that this change set represents * @return java.util.Vector */ public java.util.Vector getPrimaryKeys() { if (getCacheKey() == null) { return null; } return getCacheKey().getKey(); }
/** * This method overrides the hashcode method. If this set has a cacheKey then return the hashcode of the * cache key, otherwise return the identity hashcode of this object. * @return int */ public int hashCode() { if (getCacheKey() == null) { //new objects are compared based on identity return System.identityHashCode(this); } return getCacheKey().hashCode(); }
/** * INTERNAL: */ public void setPrimaryKeys(Vector key) { if (key == null) { return; } if (getCacheKey() == null) { setCacheKey(new CacheKey(key)); } else { getCacheKey().setKey(key); } }
if (objectChanges.getCacheKey() != null) { Hashtable table = (Hashtable)getObjectChanges().get(objectChanges.getClassName());
getAllChangeSets().put(objChangeSet, objChangeSet); if (objChangeSet.getCacheKey() != null) { Hashtable table = (Hashtable)getObjectChanges().get(objChangeSet.getClassName()); if (table == null) {
while (changeSetIterator.hasNext()) { ObjectChangeSet objectChangeSet = (ObjectChangeSet)changeSetIterator.next(); if (objectChangeSet.getCacheKey() == null) { CacheKey activeCacheKey = attemptToAcquireLock(objectClass, objectChangeSet.getCacheKey(), session); if (activeCacheKey == null) { activeCacheKey = waitOnObjectLock(objectClass, objectChangeSet.getCacheKey(), session); mergeManager.getAcquiredLocks().add(activeCacheKey); } else { activeCacheKey = session.getIdentityMapAccessorInstance().getCacheKeyForObject(objectChangeSet.getCacheKey().getKey(), objectClass, descriptor); Object[] params = new Object[2]; params[0] = activeCacheKey.getObject(); mergeManager.setWriteLockQueued(objectChangeSet.getCacheKey()); try {