From 254ee6f47eebfc00462c10756a92066e82cc1a96 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Tue, 21 Jun 2011 15:46:02 +0200 Subject: Initial commit --- .../com/c2kernel/collection/RelationshipUtils.java | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 source/com/c2kernel/collection/RelationshipUtils.java (limited to 'source/com/c2kernel/collection/RelationshipUtils.java') diff --git a/source/com/c2kernel/collection/RelationshipUtils.java b/source/com/c2kernel/collection/RelationshipUtils.java new file mode 100755 index 0000000..fdd7e6b --- /dev/null +++ b/source/com/c2kernel/collection/RelationshipUtils.java @@ -0,0 +1,33 @@ +package com.c2kernel.collection; + + +import com.c2kernel.lookup.EntityPath; +import com.c2kernel.persistency.ClusterStorage; +import com.c2kernel.process.Gateway; + + +/** + * @version $Revision: 1.22 $ $Date: 2004/10/21 08:02:23 $ + * @author $Author: abranson $ + */ + +public class RelationshipUtils +{ + + static public boolean getIsComposite(int entityKey) + { + if (entityKey == -1) return false; + try + { + if ( ((Aggregation) Gateway.getProxyManager().getProxy(new EntityPath(entityKey)).getObject(ClusterStorage.COLLECTION+"/Composition" )).size() > 0 ) + return true; + } + catch (Exception ex) + { + //do nothing - member has no composition, thus elementary + } + + return false; + } + +} -- cgit v1.2.3