public abstract class ReferenceImpl<T extends ModelElementInstance> extends Object implements Reference<T>
Modifier and Type | Field and Description |
---|---|
protected AttributeImpl<String> |
referenceTargetAttribute |
Constructor and Description |
---|
ReferenceImpl() |
Modifier and Type | Method and Description |
---|---|
Collection<ModelElementInstance> |
findReferenceSourceElements(ModelElementInstance referenceTargetElement)
Find all reference source element instances of the reference target model element instance
|
Attribute<String> |
getReferenceTargetAttribute()
Get the reference target attribute
|
T |
getReferenceTargetElement(ModelElementInstance referenceSourceElement)
Get the reference target model element instance
|
void |
referencedElementRemoved(ModelElementInstance referenceTargetElement,
Object referenceIdentifier)
Remove the reference if the target element is removed
|
void |
referencedElementUpdated(ModelElementInstance referenceTargetElement,
String oldIdentifier,
String newIdentifier)
Update the reference identifier
|
protected abstract void |
removeReference(ModelElementInstance referenceSourceElement,
ModelElementInstance referenceTargetElement)
Remove the reference in the reference source model element instance
|
protected abstract void |
setReferenceIdentifier(ModelElementInstance referenceSourceElement,
String referenceIdentifier)
Set the reference identifier in the reference source
|
void |
setReferenceTargetAttribute(AttributeImpl<String> referenceTargetAttribute)
Set the reference target attribute
|
void |
setReferenceTargetElement(ModelElementInstance referenceSourceElement,
T referenceTargetElement)
Set the reference target model element instance
|
void |
setReferenceTargetElementType(ModelElementTypeImpl referenceTargetElementType)
Set the reference target model element type
|
protected abstract void |
updateReference(ModelElementInstance referenceSourceElement,
String oldIdentifier,
String newIdentifier)
Update the reference identifier of the reference source model element instance
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getReferenceIdentifier, getReferenceSourceElementType
protected AttributeImpl<String> referenceTargetAttribute
protected abstract void setReferenceIdentifier(ModelElementInstance referenceSourceElement, String referenceIdentifier)
referenceSourceElement
- the reference source model element instancereferenceIdentifier
- the new reference identifierpublic T getReferenceTargetElement(ModelElementInstance referenceSourceElement)
getReferenceTargetElement
in interface Reference<T extends ModelElementInstance>
referenceSourceElement
- the reference source model element instancepublic void setReferenceTargetElement(ModelElementInstance referenceSourceElement, T referenceTargetElement)
setReferenceTargetElement
in interface Reference<T extends ModelElementInstance>
referenceSourceElement
- the reference source model element instancereferenceTargetElement
- the reference target model element instanceModelReferenceException
- if element is not already added to the modelpublic void setReferenceTargetAttribute(AttributeImpl<String> referenceTargetAttribute)
referenceTargetAttribute
- the reference target string attributepublic Attribute<String> getReferenceTargetAttribute()
getReferenceTargetAttribute
in interface Reference<T extends ModelElementInstance>
public void setReferenceTargetElementType(ModelElementTypeImpl referenceTargetElementType)
referenceTargetElementType
- the referenceTargetElementType to setpublic Collection<ModelElementInstance> findReferenceSourceElements(ModelElementInstance referenceTargetElement)
Reference
findReferenceSourceElements
in interface Reference<T extends ModelElementInstance>
referenceTargetElement
- the reference target model element instanceprotected abstract void updateReference(ModelElementInstance referenceSourceElement, String oldIdentifier, String newIdentifier)
referenceSourceElement
- the reference source model element instanceoldIdentifier
- the old reference identifiernewIdentifier
- the new reference identifierpublic void referencedElementUpdated(ModelElementInstance referenceTargetElement, String oldIdentifier, String newIdentifier)
referenceTargetElement
- the reference target model element instanceoldIdentifier
- the old reference identifiernewIdentifier
- the new reference identifierprotected abstract void removeReference(ModelElementInstance referenceSourceElement, ModelElementInstance referenceTargetElement)
referenceSourceElement
- the reference source model element instancepublic void referencedElementRemoved(ModelElementInstance referenceTargetElement, Object referenceIdentifier)
referenceTargetElement
- the reference target model element instance, which is removedreferenceIdentifier
- the identifier of the reference to filter reference source elementsCopyright © 2019. All rights reserved.