From 612739b1dc0c78d45c0e6be995c094d1f284d3f6 Mon Sep 17 00:00:00 2001 From: abranson Date: Tue, 13 Mar 2012 15:47:58 +0100 Subject: addMember methods return new CollectionmMember --- source/com/c2kernel/collection/Parent2ChildCollection.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source/com/c2kernel/collection/Parent2ChildCollection.java') diff --git a/source/com/c2kernel/collection/Parent2ChildCollection.java b/source/com/c2kernel/collection/Parent2ChildCollection.java index 09e9f07..c59132e 100644 --- a/source/com/c2kernel/collection/Parent2ChildCollection.java +++ b/source/com/c2kernel/collection/Parent2ChildCollection.java @@ -107,9 +107,8 @@ abstract public class Parent2ChildCollection impleme } @Override - public CollectionMember getMember(int memberId) throws ObjectNotFoundException { - for (Object name : mMembers.list) { - CollectionMember element = (CollectionMember)name; + public E getMember(int memberId) throws ObjectNotFoundException { + for (E element : mMembers.list) { if (element.getID() == memberId) return element; } @@ -123,6 +122,6 @@ abstract public class Parent2ChildCollection impleme } @Override - public abstract void addMember(int entityKey, CastorHashMap props, String classProps) throws MembershipException; + public abstract E addMember(int entityKey, CastorHashMap props, String classProps) throws MembershipException; } -- cgit v1.2.3