|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.common.notify.impl.AdapterImpl
com.ibm.db.models.db2.util.ReverseNavigationHelper.InverseAdapter
public static class ReverseNavigationHelper.InverseAdapter
A InverseAdapter
may be attached to any EObject
that is the source of
a one-way EMF relationship. This adapter will provide the ability to
navigate from a target object back to a source object via the ReverseNavigationHelper#getOppositeEnd(Notifier)
helper method.
A singleton instance of a InverseAdapter is needed for a given type of relationship.
This singleton instance can be attached to all instances of the
source of that relationship. The InverseAdapter must be constructed with the
EReference
that identifies the relationship and also
with a flag to indicate whether the virtual inverse relationship has a cardinality of
ReverseNavigationHelper.SINGLE
or ReverseNavigationHelper.MULTIPLE
.
SINGLE
, a given target object can have be accessed by only one source object on the
specified relationship.
MULTIPLE
, a given target object can be accessed by many source objects on
the specified relationship.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter |
---|
org.eclipse.emf.common.notify.Adapter.Internal |
Constructor Summary | |
---|---|
ReverseNavigationHelper.InverseAdapter(org.eclipse.emf.ecore.EReference reference)
Constructs a InverseAdapter for the specified relationship. |
|
ReverseNavigationHelper.InverseAdapter(org.eclipse.emf.ecore.EReference reference,
int inverseCardinality)
Constructs a InverseAdapter for the specified relationship and inverse cardinality. |
Method Summary | |
---|---|
java.lang.Object |
getOppositeEnd(org.eclipse.emf.common.notify.Notifier target)
Returns the source object of an augmented one-way relationship. |
boolean |
isAdapterForType(java.lang.Object type)
|
void |
notifyChanged(org.eclipse.emf.common.notify.Notification notification)
|
Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl |
---|
getTarget, setTarget, unsetTarget |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReverseNavigationHelper.InverseAdapter(org.eclipse.emf.ecore.EReference reference)
reference
- The EReference that represents a one-way EMF relationship that needs to be augmentedpublic ReverseNavigationHelper.InverseAdapter(org.eclipse.emf.ecore.EReference reference, int inverseCardinality)
reference
- The EReference that represents a one-way EMF relationship that needs to be augmentedinverseCardinality
- Either ReverseNavigationHelper.SINGLE
or ReverseNavigationHelper.MULTIPLE
.
Indicate of whether the target object can be 1 or many source objects via the specified relationship.Method Detail |
---|
public java.lang.Object getOppositeEnd(org.eclipse.emf.common.notify.Notifier target)
Usage Notes
SINGLE
, the getOppositeEnd
returns
the single EObject
at the other end of the relationship.
If there is no instance of the virtual inverse relationship
involving the specified object, null is returned.
MULTIPLE
, the getOppositeEnd
returns
an EList
containing all the other end of the relationship.
This EList
will be an unmodifiable list. Any attempt to add or remove members to or from the list
will throw an UnsupportedOperationException
.
If there is no instance of the virtual inverse relationship
involving the specified object, an empty list is returned.
target
- The object that is the target of the one-way relationship
ReverseNavigationHelper.SINGLE
, the result will be an EObject of the appropriate type.
If the inverseCardinality is ReverseNavigationHelper.MULTIPLE
, the result will be an unmodifiable EList
containing the objects.public boolean isAdapterForType(java.lang.Object type)
isAdapterForType
in interface org.eclipse.emf.common.notify.Adapter
isAdapterForType
in class org.eclipse.emf.common.notify.impl.AdapterImpl
public void notifyChanged(org.eclipse.emf.common.notify.Notification notification)
notifyChanged
in interface org.eclipse.emf.common.notify.Adapter
notifyChanged
in class org.eclipse.emf.common.notify.impl.AdapterImpl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |