summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/collection/AggregationInstance.java
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2012-05-30 08:37:45 +0200
committerAndrew Branson <andrew.branson@cern.ch>2012-05-30 08:37:45 +0200
commitb086f57f56bf0eb9dab9cf321a0f69aaaae84347 (patch)
tree8e6e26e8b7eed6abad7a17b093bdbb55c5e6b1ba /src/main/java/com/c2kernel/collection/AggregationInstance.java
parent22088ae8d2d5ff390518dbe1c4372325ffb3a647 (diff)
Initial Maven Conversion
Diffstat (limited to 'src/main/java/com/c2kernel/collection/AggregationInstance.java')
-rw-r--r--src/main/java/com/c2kernel/collection/AggregationInstance.java45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/main/java/com/c2kernel/collection/AggregationInstance.java b/src/main/java/com/c2kernel/collection/AggregationInstance.java
new file mode 100644
index 0000000..47e7c41
--- /dev/null
+++ b/src/main/java/com/c2kernel/collection/AggregationInstance.java
@@ -0,0 +1,45 @@
+package com.c2kernel.collection;
+
+/**
+ * @version $Revision: 1.30 $ $Date: 2003/06/04 13:21:24 $
+ * @author $Author: abranson $
+ */
+
+import com.c2kernel.graph.model.GraphPoint;
+import com.c2kernel.utils.CastorHashMap;
+
+public class AggregationInstance extends Aggregation
+{
+
+ public AggregationInstance()
+ {
+ setName("AggregationInstance");
+ }
+
+ public AggregationInstance(String name)
+ {
+ setName(name);
+ }
+
+
+ @Override
+ public AggregationMember addMember(int entityKey, CastorHashMap props, String classProps)
+ throws MembershipException
+ {
+ if( entityKey!=-1 && exists(entityKey))
+ throw new MembershipException(entityKey+" already exists in this collection.");
+ else
+ return super.addMember(entityKey, props, classProps);
+ }
+
+ @Override
+ public AggregationMember addMember(int entityKey, 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.");
+ else
+ return super.addMember(entityKey, props, classProps, location, w, h);
+ }
+}
+