summaryrefslogtreecommitdiff
path: root/source/com/c2kernel/collection/Aggregation.java
diff options
context:
space:
mode:
authorabranson <andrew.branson@cern.ch>2012-03-13 15:47:58 +0100
committerabranson <andrew.branson@cern.ch>2012-03-13 15:47:58 +0100
commit612739b1dc0c78d45c0e6be995c094d1f284d3f6 (patch)
treed107c2eadec9d076cde9bb329099d0747d468d07 /source/com/c2kernel/collection/Aggregation.java
parent70327d7c233941e6d583f65352363f2c82dc13ef (diff)
addMember methods return new CollectionmMember
Diffstat (limited to 'source/com/c2kernel/collection/Aggregation.java')
-rw-r--r--source/com/c2kernel/collection/Aggregation.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/com/c2kernel/collection/Aggregation.java b/source/com/c2kernel/collection/Aggregation.java
index 29cb067..e869621 100644
--- a/source/com/c2kernel/collection/Aggregation.java
+++ b/source/com/c2kernel/collection/Aggregation.java
@@ -66,7 +66,7 @@ abstract public class Aggregation extends Parent2ChildCollection<AggregationMemb
return null;
}
- public void addMember(int entityKey, CastorHashMap props, String classProps, GraphPoint location, int w, int h)
+ public AggregationMember addMember(int entityKey, CastorHashMap props, String classProps, GraphPoint location, int w, int h)
throws MembershipException
{
// Create new member object
@@ -85,17 +85,18 @@ abstract public class Aggregation extends Parent2ChildCollection<AggregationMemb
aggMem.setIsComposite( RelationshipUtils.getIsComposite(entityKey) );
mMembers.list.add(aggMem);
Logger.msg(8, "AggregationDescription::addMember(" + entityKey + ") added to children linked to vertexid " + vertex.getID());
+ return aggMem;
}
@Override
- public void addMember(int entityKey, CastorHashMap props, String classProps) throws MembershipException
+ public AggregationMember addMember(int entityKey, CastorHashMap props, String classProps) throws MembershipException
{
- addMember(entityKey, props, classProps, new GraphPoint(100,100*getCounter()), 20, 20);
+ return addMember(entityKey, props, classProps, new GraphPoint(100,100*getCounter()), 20, 20);
}
@Override
- public void addMember(int entityKey) throws MembershipException {
+ public AggregationMember addMember(int entityKey) throws MembershipException {
throw new MembershipException("Aggregations cannot accept arbitrary members without type info");
}