Class AbstractRefAssociation

  • All Implemented Interfaces:
    MapOwner, AbstractRefBaseObject, RepositoryProvider, javax.jmi.reflect.RefAssociation, javax.jmi.reflect.RefBaseObject
    Direct Known Subclasses:
    EcoreRefAssociation

    public abstract class AbstractRefAssociation
    extends com.nomagic.uml2.ext.jmi.reflect.AbstractRefBaseObjectImpl
    implements javax.jmi.reflect.RefAssociation
    The RefAssociation interface provides the metaobject description of an association. It also provides generic operations querying and updating the links that belong to the association. The model of association supported by this interface is of collection of two ended asymmetric links between objects. The links may be viewed as ordered on one or other of the ends, and there may be some form of cardinality constraints on either end. The RefAssociation interface is designed to be used with associations that contain no duplicate links, though this is not an absolute requirement. There is no assumption that different association objects for a given association type are mutually aware. Links are modeled as having no object identity.
    • Field Summary

      • Fields inherited from class com.nomagic.uml2.ext.jmi.reflect.AbstractRefBaseObjectImpl

        mMetaObject, repository
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractRefAssociation​(AbstractRepository repository, java.lang.String roleName1, java.lang.String referenceName1, boolean navigable1, boolean multivalued1, java.lang.Class class1, java.lang.String roleName2, java.lang.String referenceName2, boolean navigable2, boolean multivalued2, java.lang.Class class2)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean refAddLink​(javax.jmi.reflect.RefObject endOne, javax.jmi.reflect.RefObject endTwo)
      The "refAddLink" operation adds "newLink" into the set of links in the extent of this association object.
      java.util.Collection refAllLinks()
      The "refAllLinks" operation returns all links in the link set for this Association object.
      boolean refLinkExists​(javax.jmi.reflect.RefObject endOne, javax.jmi.reflect.RefObject endTwo)
      The "refLinkExists" operation returns true if and only if the supplied link is a member of the link set for this association object.
      java.util.Collection refQuery​(java.lang.String queryEndName, javax.jmi.reflect.RefObject queryObject)
      The "refQuery" operations return a list containing all instance objects that are linked to the supplied "queryObject" by links in the extent of this association object, where the links all have the "queryObject" at the "queryEnd"
      java.util.Collection refQuery​(javax.jmi.reflect.RefObject queryEnd, javax.jmi.reflect.RefObject queryObject)
      The "refQuery" operations return a list containing all instance objects that are linked to the supplied "queryObject" by links in the extent of this association object, where the links all have the "queryObject" at the "queryEnd"
      boolean refRemoveLink​(javax.jmi.reflect.RefObject endOne, javax.jmi.reflect.RefObject endTwo)
      The "refRemoveLink" operation removes the existing link from the association.
      • Methods inherited from class com.nomagic.uml2.ext.jmi.reflect.AbstractRefBaseObjectImpl

        getRepository, mapClear, mapPut, mapPutAll, mapRemove, mof_getRepository, refImmediatePackage, refMetaObject, refMofId, refOutermostPackage, refVerifyConstraints, setMofID, setOwner, setRefMetaObject, setRepository
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.jmi.reflect.RefBaseObject

        equals, hashCode, refImmediatePackage, refMetaObject, refMofId, refOutermostPackage, refVerifyConstraints
    • Constructor Detail

      • AbstractRefAssociation

        public AbstractRefAssociation​(AbstractRepository repository,
                                      java.lang.String roleName1,
                                      java.lang.String referenceName1,
                                      boolean navigable1,
                                      boolean multivalued1,
                                      java.lang.Class class1,
                                      java.lang.String roleName2,
                                      java.lang.String referenceName2,
                                      boolean navigable2,
                                      boolean multivalued2,
                                      java.lang.Class class2)
        Parameters:
        repository -
        roleName1 -
        referenceName1 -
        navigable1 -
        multivalued1 -
        class1 -
        roleName2 -
        referenceName2 -
        navigable2 -
        multivalued2 -
        class2 -
    • Method Detail

      • refAddLink

        public boolean refAddLink​(javax.jmi.reflect.RefObject endOne,
                                  javax.jmi.reflect.RefObject endTwo)
        The "refAddLink" operation adds "newLink" into the set of links in the extent of this association object. If one or other of the association's ends is ordered, the link is inserted after the last link with respect to that ordering. Both RefObject members of the "newLink" parameter should be valid instance objects.
        Specified by:
        refAddLink in interface javax.jmi.reflect.RefAssociation
      • refAllLinks

        public java.util.Collection refAllLinks()
        The "refAllLinks" operation returns all links in the link set for this Association object. specific analog: return type: isQuery: parameters: exceptions: none Collection yes none none This operation returns the current link set for the current association extent as defined for the specific version of this operation. Returns all links (Association instances )specified by this association. Returned collection does not support live update as it specified in jmi documentation.
        Specified by:
        refAllLinks in interface javax.jmi.reflect.RefAssociation
        Returns:
        collection of AssociationLink.
      • refLinkExists

        public boolean refLinkExists​(javax.jmi.reflect.RefObject endOne,
                                     javax.jmi.reflect.RefObject endTwo)
        The "refLinkExists" operation returns true if and only if the supplied link is a member of the link set for this association object. TypeMismatchException is raised if the parameters do not match the types of the respective association ends.
        Specified by:
        refLinkExists in interface javax.jmi.reflect.RefAssociation
      • refQuery

        public java.util.Collection refQuery​(javax.jmi.reflect.RefObject queryEnd,
                                             javax.jmi.reflect.RefObject queryObject)
        The "refQuery" operations return a list containing all instance objects that are linked to the supplied "queryObject" by links in the extent of this association object, where the links all have the "queryObject" at the "queryEnd"
        Specified by:
        refQuery in interface javax.jmi.reflect.RefAssociation
      • refQuery

        public java.util.Collection refQuery​(java.lang.String queryEndName,
                                             javax.jmi.reflect.RefObject queryObject)
        The "refQuery" operations return a list containing all instance objects that are linked to the supplied "queryObject" by links in the extent of this association object, where the links all have the "queryObject" at the "queryEnd"
        Specified by:
        refQuery in interface javax.jmi.reflect.RefAssociation
      • refRemoveLink

        public boolean refRemoveLink​(javax.jmi.reflect.RefObject endOne,
                                     javax.jmi.reflect.RefObject endTwo)
        The "refRemoveLink" operation removes the existing link from the association. Returns true if the link was successfully removed.
        Specified by:
        refRemoveLink in interface javax.jmi.reflect.RefAssociation