diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-09-09 12:13:21 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-09-09 12:13:21 +0200 |
| commit | da731d2bb81666b9c697d9099da632e7dfcdc0f7 (patch) | |
| tree | 567693c3c48f3d15ecbb2dac4f9db03bb6e58c72 /src/main/java/com/c2kernel/collection/AggregationInstance.java | |
| parent | ae1e79e33fd30e3d8bcedbef8891a14a048276d7 (diff) | |
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.
Diffstat (limited to 'src/main/java/com/c2kernel/collection/AggregationInstance.java')
| -rw-r--r-- | src/main/java/com/c2kernel/collection/AggregationInstance.java | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/main/java/com/c2kernel/collection/AggregationInstance.java b/src/main/java/com/c2kernel/collection/AggregationInstance.java index 47e7c41..f46b691 100644 --- a/src/main/java/com/c2kernel/collection/AggregationInstance.java +++ b/src/main/java/com/c2kernel/collection/AggregationInstance.java @@ -6,6 +6,7 @@ package com.c2kernel.collection; */
import com.c2kernel.graph.model.GraphPoint;
+import com.c2kernel.lookup.ItemPath;
import com.c2kernel.utils.CastorHashMap;
public class AggregationInstance extends Aggregation
@@ -23,23 +24,23 @@ public class AggregationInstance extends Aggregation @Override
- public AggregationMember addMember(int entityKey, CastorHashMap props, String classProps)
+ public AggregationMember addMember(ItemPath itemPath, CastorHashMap props, String classProps)
throws MembershipException
{
- if( entityKey!=-1 && exists(entityKey))
- throw new MembershipException(entityKey+" already exists in this collection.");
+ if( itemPath != null && exists(itemPath))
+ throw new MembershipException(itemPath+" already exists in this collection.");
else
- return super.addMember(entityKey, props, classProps);
+ return super.addMember(itemPath, props, classProps);
}
@Override
- public AggregationMember addMember(int entityKey, CastorHashMap props, String classProps, GraphPoint location, int w, int h)
+ public AggregationMember addMember(ItemPath itemPath, CastorHashMap props, String classProps, GraphPoint location, int w, int h)
throws MembershipException
{
- if( entityKey!=-1 && exists(entityKey))
- throw new MembershipException(entityKey+" already exists in this collection.");
+ if( itemPath != null && exists(itemPath))
+ throw new MembershipException(itemPath+" already exists in this collection.");
else
- return super.addMember(entityKey, props, classProps, location, w, h);
+ return super.addMember(itemPath, props, classProps, location, w, h);
}
}
|
