|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IModelTypeAssociation
| Nested Class Summary | |
|---|---|
static class |
IModelTypeAssociation.AssociationType
Enum defining the possible association types. |
| Field Summary | |
|---|---|
static String |
PROPERTY_ASSOCIATION_TYPE
|
static String |
PROPERTY_DERIVED_UNION
|
static String |
PROPERTY_INVERSE_ASSOCIATION
|
static String |
PROPERTY_MATCHING_ASSOCIATION_NAME
|
static String |
PROPERTY_MATCHING_ASSOCIATION_SOURCE
|
static String |
PROPERTY_MAX_CARDINALITY
|
static String |
PROPERTY_MIN_CARDINALITY
|
static String |
PROPERTY_NAME_PLURAL
|
static String |
PROPERTY_PRODUCT_RELEVANT
|
static String |
PROPERTY_SUBSET_OF_A_DERIVED_UNION
|
static String |
PROPERTY_TARGET
|
static String |
PROPERTY_TARGET_ROLE_PLURAL_REQUIRED
|
static String |
XML_TAG
|
static String |
XML_WRAPPER_TAG
|
| Fields inherited from interface org.faktorips.runtime.modeltype.IModelElement |
|---|
DESCRIPTIONS_PROPERTY_LOCALE, DESCRIPTIONS_XML_TAG, DESCRIPTIONS_XML_WRAPPER_TAG, EXTENSION_PROPERTIES_PROPERTY_ID, EXTENSION_PROPERTIES_PROPERTY_NULL, EXTENSION_PROPERTIES_XML_TAG, EXTENSION_PROPERTIES_XML_WRAPPER_TAG, LABELS_PROPERTY_LOCALE, LABELS_PROPERTY_PLURAL_VALUE, LABELS_PROPERTY_VALUE, LABELS_XML_TAG, LABELS_XML_WRAPPER_TAG, PROPERTY_NAME |
| Method Summary | |
|---|---|
IModelTypeAssociation.AssociationType |
getAssociationType()
Returns the type of this association. |
String |
getInverseAssociation()
Returns the name of the inverse association if it is defined. |
String |
getLabelForPlural(Locale locale)
Returns the plural label for the given locale. |
String |
getMatchingAssociationName()
Returns the name of the matching product respectively policy component type association or null if no matching association is defined for this associations. |
String |
getMatchingAssociationSource()
Returns the qualified target name of the matching product respectively policy component type association or null if no matching association is defined for component
associations. |
int |
getMaxCardinality()
Returns the maximum cardinality for this association. |
int |
getMinCardinality()
Returns the minimum cardinality for this association. |
IModelType |
getModelType()
Returns the model type this association belongs to. |
String |
getNamePlural()
Returns the plural form of this model type's name or null if no plural for for
the name is set. |
IModelType |
getTarget()
Returns the target model type object of this association. |
List<IModelObject> |
getTargetObjects(IModelObject source)
Returns a list of the target(s) of the given model object's association identified by this model type association. |
String |
getUsedName()
Returns the singular or plural form of this model type's name as used in code generation depending on cardinality. |
boolean |
isDerivedUnion()
Returns if this association is a derived union. |
boolean |
isProductRelevant()
Returns if this association is product relevant. |
boolean |
isSubsetOfADerivedUnion()
Returns if this association is a subset of a derived union. |
| Methods inherited from interface org.faktorips.runtime.modeltype.IModelElement |
|---|
getDescription, getExtensionPropertyIds, getExtensionPropertyValue, getLabel, getName, getRepository, initExtPropertiesFromXml, initFromXml |
| Field Detail |
|---|
static final String XML_TAG
static final String XML_WRAPPER_TAG
static final String PROPERTY_NAME_PLURAL
static final String PROPERTY_TARGET
static final String PROPERTY_MIN_CARDINALITY
static final String PROPERTY_MAX_CARDINALITY
static final String PROPERTY_ASSOCIATION_TYPE
static final String PROPERTY_PRODUCT_RELEVANT
static final String PROPERTY_DERIVED_UNION
static final String PROPERTY_SUBSET_OF_A_DERIVED_UNION
static final String PROPERTY_TARGET_ROLE_PLURAL_REQUIRED
static final String PROPERTY_INVERSE_ASSOCIATION
static final String PROPERTY_MATCHING_ASSOCIATION_NAME
static final String PROPERTY_MATCHING_ASSOCIATION_SOURCE
| Method Detail |
|---|
IModelType getModelType()
IModelType getTarget()
throws ClassNotFoundException
ClassNotFoundException - if the target class could not be loaded.int getMinCardinality()
0 if no minimum is set.
int getMaxCardinality()
Integer.MAX_VALUE if no
maximum is set.
String getNamePlural()
null if no plural for for
the name is set.
String getUsedName()
IModelTypeAssociation.AssociationType getAssociationType()
boolean isProductRelevant()
boolean isDerivedUnion()
boolean isSubsetOfADerivedUnion()
String getInverseAssociation()
String getLabelForPlural(Locale locale)
Returns the association's plural name if no plural label for the given locale exists.
List<IModelObject> getTargetObjects(IModelObject source)
source - a model object corresponding to the IModelType this association belongs
to
IllegalArgumentException - if the model object does not have an association fitting
this model type association or that association is not accessible for any reasonString getMatchingAssociationName()
null if no matching association is defined for this associations.
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.
String getMatchingAssociationSource()
null if no matching association is defined for component
associations.
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 source of the matching product association and vice versa. The source is the type which defines the matching association.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||