protected boolean compareObjectsWithoutPrivateOwned(Object firstCollection, Object secondCollection, AbstractSession session) { if(this.listOrderField != null) { return compareLists((List)firstCollection, (List)secondCollection, session, false);
protected boolean compareObjectsWithoutPrivateOwned(Object firstCollection, Object secondCollection, AbstractSession session) { if(this.listOrderField != null) { return compareLists((List)firstCollection, (List)secondCollection, session, false);
protected boolean compareObjectsWithPrivateOwned(Object firstCollection, Object secondCollection, AbstractSession session) { if(this.listOrderField != null) { return compareLists((List)firstCollection, (List)secondCollection, session, true);
protected boolean compareObjectsWithPrivateOwned(Object firstCollection, Object secondCollection, AbstractSession session) { if(this.listOrderField != null) { return compareLists((List)firstCollection, (List)secondCollection, session, true);
return compareLists((List)firstCollection, (List)secondCollection, session, true);
/** * Compare two objects if their parts are not private owned */ protected boolean compareObjectsWithoutPrivateOwned(Object firstCollection, Object secondCollection, AbstractSession session) { if(this.listOrderField != null) { return compareLists((List)firstCollection, (List)secondCollection, session, false); } ContainerPolicy cp = this.containerPolicy; if (cp.sizeFor(firstCollection) != cp.sizeFor(secondCollection)) { return false; } Object firstIter = cp.iteratorFor(firstCollection); Object secondIter = cp.iteratorFor(secondCollection); Vector keyValue = new Vector(); while (cp.hasNext(secondIter)) { Object secondObject = cp.next(secondIter, session); Vector primaryKey = getReferenceDescriptor().getObjectBuilder().extractPrimaryKeyFromObject(secondObject, session); keyValue.addElement(new CacheKey(primaryKey)); } while (cp.hasNext(firstIter)) { Object firstObject = cp.next(firstIter, session); Vector primaryKey = getReferenceDescriptor().getObjectBuilder().extractPrimaryKeyFromObject(firstObject, session); if (!keyValue.contains(new CacheKey(primaryKey))) { return false; } } return true; }