net.sf.farrago.cwm.datatypes
Interface UnionDiscriminator

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

public interface UnionDiscriminator
extends RefAssociation

UnionDiscriminator association proxy interface. The UnionDiscriminator association connects a Union instance with the StructuralFeature instance that can be used to determine which UnionMember instance is currently present in the Union instance. This "discriminating" attribute may be a feature of the UnionMembers themselves or may be a feature of some Classifier that contains the Union instance as one of its Features. In the former case, the discriminating feature will usually be present at the same offset in each UnionMember instance. If the discriminator reference is empty for a particular Union instance, it is considered to be an "undiscriminated" Union and determination of the current UnionMember residing in the Union is usage-defined.

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(CwmStructuralFeature discriminator, CwmUnion discriminatedUnion)
          Creates a link between the pair of instance objects in the associations link set.
 boolean exists(CwmStructuralFeature discriminator, CwmUnion discriminatedUnion)
          Queries whether a link currently exists between a given pair of instance objects in the associations link set.
 Collection<CwmUnion> getDiscriminatedUnion(CwmStructuralFeature discriminator)
          Queries the instance objects that are related to a particular instance object by a link in the current associations link set.
 CwmStructuralFeature getDiscriminator(CwmUnion discriminatedUnion)
          Queries the instance object that is related to a particular instance object by a link in the current associations link set.
 boolean remove(CwmStructuralFeature discriminator, CwmUnion discriminatedUnion)
          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(CwmStructuralFeature discriminator,
               CwmUnion discriminatedUnion)
Queries whether a link currently exists between a given pair of instance objects in the associations link set.

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

getDiscriminator

CwmStructuralFeature getDiscriminator(CwmUnion discriminatedUnion)
Queries the instance object that is related to a particular instance object by a link in the current associations link set.

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

getDiscriminatedUnion

Collection<CwmUnion> getDiscriminatedUnion(CwmStructuralFeature discriminator)
Queries the instance objects that are related to a particular instance object by a link in the current associations link set.

Parameters:
discriminator - Required value of the first association end.
Returns:
Collection of related objects.

add

boolean add(CwmStructuralFeature discriminator,
            CwmUnion discriminatedUnion)
Creates a link between the pair of instance objects in the associations link set.

Parameters:
discriminator - Value of the first association end.
discriminatedUnion - Value of the second association end.

remove

boolean remove(CwmStructuralFeature discriminator,
               CwmUnion discriminatedUnion)
Removes a link between a pair of instance objects in the current associations link set.

Parameters:
discriminator - Value of the first association end.
discriminatedUnion - Value of the second association end.