1 package org.objectweb.modfact.jmi.repository.javax.jmi.model; 2 3 import org.objectweb.modfact.jmi.reflect.*; 4 public class RefersToImpl extends RefAssociationImpl implements javax.jmi.model.RefersTo { 5 6 public boolean exists(javax.jmi.model.Reference referent,javax.jmi.model.AssociationEnd referencedEnd) throws javax.jmi.reflect.JmiException { 7 return refLinkExists(referent,referencedEnd); 8 } 9 public boolean add(javax.jmi.model.Reference referent,javax.jmi.model.AssociationEnd referencedEnd) throws javax.jmi.reflect.JmiException { 10 return refAddLink(referent,referencedEnd); 11 } 12 public boolean remove(javax.jmi.model.Reference referent,javax.jmi.model.AssociationEnd referencedEnd) throws javax.jmi.reflect.JmiException { 13 return refRemoveLink(referent,referencedEnd); 14 } 15 public java.util.Collection getReferent(javax.jmi.model.AssociationEnd referencedEnd) throws javax.jmi.reflect.JmiException { 16 return (java.util.List ) refQuery("referencedEnd",referencedEnd); 17 } 18 public javax.jmi.model.AssociationEnd getReferencedEnd(javax.jmi.model.Reference referent) throws javax.jmi.reflect.JmiException { 19 java.util.Collection c =refQuery("referent",referent); 20 if(c.isEmpty()) return null; 21 return (javax.jmi.model.AssociationEnd) c.iterator().next(); 22 } 23 } 24 | Popular Tags |