public abstract class Association extends TypePart implements IModelTypeAssociation
Types.IModelTypeAssociation.AssociationType| Constructor and Description |
|---|
Association(Type type,
Method getterMethod) |
| Modifier and Type | Method and Description |
|---|---|
abstract Association |
createOverwritingAssociationFor(Type subType) |
AssociationKind |
getAssociationKind()
Returns what kind of association this is.
|
IModelTypeAssociation.AssociationType |
getAssociationType()
Deprecated.
|
protected Method |
getGetterMethod() |
String |
getInverseAssociation()
Returns the name of the inverse association if it is defined.
|
String |
getLabelForPlural(Locale locale)
Returns the plural label for this model element in the specified locale.
|
Association |
getMatchingAssociation()
Returns the matching product respectively policy component type association or
null if no matching association is defined for this association. |
String |
getMatchingAssociationName()
Returns the name of the matching product respectively policy component type association or
null if no matching association is defined for this association. |
String |
getMatchingAssociationSource()
Returns the qualified name of source type of the matching association or
null if
no matching association is defined. |
Type |
getMatchingAssociationSourceType()
Returns the
Type identified by getMatchingAssociationSource() |
int |
getMaxCardinality()
Returns the maximum cardinality for this association.
|
int |
getMinCardinality()
Returns the minimum cardinality for this association.
|
String |
getNamePlural()
Returns the plural form of this model type's name or the empty String if no plural for the
name is set.
|
Type |
getTarget()
Returns the target
Type of this association. |
String |
getUsedName()
Returns the singular or plural form of this association's name as used in code generation
depending on cardinality.
|
boolean |
isDerivedUnion()
Returns if this association is a derived union.
|
boolean |
isMatchingAssociationPresent()
Returns
true if the association has a matching association. |
boolean |
isProductRelevant()
Deprecated.
Since 3.18, use isMatchingAssociationPresent
|
boolean |
isSubsetOfADerivedUnion()
Returns if this association is a subset of a derived union.
|
String |
toString() |
getMessageHelper, getMessageKey, getModelType, getType, getTypeNamecreateMessageHelper, getDescription, getDocumentation, getExtensionPropertyIds, getExtensionPropertyValue, getLabel, getName, getRelevantProductObject, invokeField, invokeMethodclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetModelTypegetDescription, getExtensionPropertyIds, getExtensionPropertyValue, getLabel, getNamepublic String getLabelForPlural(Locale locale)
getLabelForPlural in interface IModelTypeAssociationpublic AssociationKind getAssociationKind()
@Deprecated public IModelTypeAssociation.AssociationType getAssociationType()
getAssociationKind()getAssociationType in interface IModelTypeAssociationpublic int getMinCardinality()
0 if no minimum is set.getMinCardinality in interface IModelTypeAssociationpublic int getMaxCardinality()
Integer.MAX_VALUE if no
maximum is set.getMaxCardinality in interface IModelTypeAssociationpublic String getNamePlural()
getNamePlural in interface IModelTypeAssociationpublic Type getTarget()
Type of this association.getTarget in interface IModelTypeAssociationpublic String getUsedName()
getUsedName in interface IModelTypeAssociationpublic boolean isDerivedUnion()
isDerivedUnion in interface IModelTypeAssociationpublic boolean isSubsetOfADerivedUnion()
isSubsetOfADerivedUnion in interface IModelTypeAssociationpublic String getInverseAssociation()
getInverseAssociation in interface IModelTypeAssociationnull if there is no inverse
association or it is a product component associations@Deprecated public boolean isProductRelevant()
isProductRelevant in interface IModelTypeAssociationpublic boolean isMatchingAssociationPresent()
true if the association has a matching association. For policy
associations that means it is configured by the product component. For product component
associations that means it configures a policy association.isMatchingAssociationPresent in interface IModelTypeAssociationtrue if this association has a matching association.getMatchingAssociationName()public String getMatchingAssociationName()
null if no matching association is defined for this association.
Example: Taking two policy component types called 'Policy' and 'Coverage' with a composition association between them. Policy is constrained by the product component type 'Product' and coverage by 'CoverageType'. There is also an association from 'Product' to 'CoverageType'. The product association configures the policy association. If this is a model type association for the policy association this method returns the name of the matching product association and vice versa.
getMatchingAssociationName in interface IModelTypeAssociationpublic Association getMatchingAssociation()
null if no matching association is defined for this association.
Example: Taking two policy component types called 'Policy' and 'Coverage' with a composition association between them. Policy is constrained by the product component type 'Product' and coverage by 'CoverageType'. There is also an association from 'Product' to 'CoverageType'. The product association configures the policy association. If this is a association for the policy association this method returns the matching product association and vice versa.
public String getMatchingAssociationSource()
null if
no matching association is defined.
Example: Taking two policy component types called 'Policy' and 'Coverage' with a composition association between them. Policy is constrained by the product component type 'Product' and coverage by 'CoverageType'. There is also an association from 'Product' to 'CoverageType'. The product association configures the policy association. If this is a model type association for the policy association this method returns the qualified name of the source of the matching product association and vice versa. The source is the type which defines the matching association.
getMatchingAssociationSource in interface IModelTypeAssociationpublic Type getMatchingAssociationSourceType()
Type identified by getMatchingAssociationSource()getMatchingAssociationSourceType in interface IModelTypeAssociationType of the matching association sourcegetMatchingAssociationSource()protected Method getGetterMethod()
public abstract Association createOverwritingAssociationFor(Type subType)
public String toString()
toString in class ModelElementCopyright © 2016. All rights reserved.