From da731d2bb81666b9c697d9099da632e7dfcdc0f7 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Tue, 9 Sep 2014 12:13:21 +0200 Subject: Replaced int sysKey Item identifier with UUID, which is now portable. ItemPath objects are now used to identify Items throughout the kernel, replacing ints and Integers. --- .../java/com/c2kernel/collection/Parent2ChildCollection.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/java/com/c2kernel/collection/Parent2ChildCollection.java') diff --git a/src/main/java/com/c2kernel/collection/Parent2ChildCollection.java b/src/main/java/com/c2kernel/collection/Parent2ChildCollection.java index 814cca8..26aa451 100644 --- a/src/main/java/com/c2kernel/collection/Parent2ChildCollection.java +++ b/src/main/java/com/c2kernel/collection/Parent2ChildCollection.java @@ -3,6 +3,7 @@ package com.c2kernel.collection; import java.util.Iterator; import com.c2kernel.common.ObjectNotFoundException; +import com.c2kernel.lookup.ItemPath; import com.c2kernel.persistency.ClusterStorage; import com.c2kernel.utils.CastorHashMap; @@ -88,10 +89,10 @@ abstract public class Parent2ChildCollection impleme mMembers = newMembers; } - public boolean contains(int sysKey) { + public boolean contains(ItemPath itemPath) { for (Object name : mMembers.list) { CollectionMember element = (CollectionMember)name; - if (element.getSystemKey() == sysKey) + if (element.getItemPath().equals(itemPath)) return true; } return false; @@ -102,7 +103,7 @@ abstract public class Parent2ChildCollection impleme for (int i=0; i impleme } @Override - public abstract E addMember(int entityKey, CastorHashMap props, String classProps) throws MembershipException; + public abstract E addMember(ItemPath itemPath, CastorHashMap props, String classProps) throws MembershipException; public boolean equals(Parent2ChildCollection other) { boolean same = mName.equals(other.getName()) && mURLInfo.equals(other.getURLInfo()) && size() == other.size(); -- cgit v1.2.3