net.sf.farrago.cwm.core
Interface ElementOwnership

All Superinterfaces:
RefAssociation, RefBaseObject
All Known Implementing Classes:
ElementOwnership$Hib

public interface ElementOwnership
extends RefAssociation

ElementOwnership association proxy interface. The ElementOwnership association identifies ModelElements owned by Namespaces. ModelElements may be owned by at most one Namespace. Refer to the above discussion of the Namespace class for more information on the nature of the ownership relationship between Namespaces and ModelElements.

Note: This type should not be subclassed, implemented or directly instantiated by clients. It is generated from a MOF metamodel and implemented by Enki or MDR.


Method Summary
 boolean add(CwmModelElement ownedElement, CwmNamespace namespace)
          Creates a link between the pair of instance objects in the associations link set.
 boolean exists(CwmModelElement ownedElement, CwmNamespace namespace)
          Queries whether a link currently exists between a given pair of instance objects in the associations link set.
 CwmNamespace getNamespace(CwmModelElement ownedElement)
          Queries the instance object that is related to a particular instance object by a link in the current associations link set.
 Collection<CwmModelElement> getOwnedElement(CwmNamespace namespace)
          Queries the instance objects that are related to a particular instance object by a link in the current associations link set.
 boolean remove(CwmModelElement ownedElement, CwmNamespace namespace)
          Removes a link between a pair of instance objects in the current associations link set.
 
Methods inherited from interface javax.jmi.reflect.RefAssociation
refAddLink, refAllLinks, refLinkExists, refQuery, refQuery, refRemoveLink
 
Methods inherited from interface javax.jmi.reflect.RefBaseObject
equals, hashCode, refImmediatePackage, refMetaObject, refMofId, refOutermostPackage, refVerifyConstraints
 

Method Detail

exists

boolean exists(CwmModelElement ownedElement,
               CwmNamespace namespace)
Queries whether a link currently exists between a given pair of instance objects in the associations link set.

Parameters:
ownedElement - Value of the first association end.
namespace - Value of the second association end.
Returns:
Returns true if the queried link exists.

getOwnedElement

Collection<CwmModelElement> getOwnedElement(CwmNamespace namespace)
Queries the instance objects that are related to a particular instance object by a link in the current associations link set.

Parameters:
namespace - Required value of the second association end.
Returns:
Collection of related objects.

getNamespace

CwmNamespace getNamespace(CwmModelElement ownedElement)
Queries the instance object that is related to a particular instance object by a link in the current associations link set.

Parameters:
ownedElement - Required value of the first association end.
Returns:
Related object or null if none exists.

add

boolean add(CwmModelElement ownedElement,
            CwmNamespace namespace)
Creates a link between the pair of instance objects in the associations link set.

Parameters:
ownedElement - Value of the first association end.
namespace - Value of the second association end.

remove

boolean remove(CwmModelElement ownedElement,
               CwmNamespace namespace)
Removes a link between a pair of instance objects in the current associations link set.

Parameters:
ownedElement - Value of the first association end.
namespace - Value of the second association end.