Package org.faktorips.runtime.model.type
Class PolicyCmptType
java.lang.Object
org.faktorips.runtime.model.type.ModelElement
org.faktorips.runtime.model.type.Type
org.faktorips.runtime.model.type.PolicyCmptType
Corresponds to a design time
IPolicyCmptType.-
Nested Class Summary
Nested classes/interfaces inherited from class org.faktorips.runtime.model.type.Type
Type.AnnotatedElementMatcher<T extends Annotation> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns this type's super type ifpresent, otherwise anempty Optional.getAssociation(String name) Returns the association with the givennamedeclared in this type or one of it's super types.Returns the type's associations including those defined in it's super types.getAttribute(String name) Returns the attribute with the givennamedeclared in this type or one of it's super types.Returns a list containing the type's attributes including those defined in the type's super types.getDeclaredAssociation(int index) Returns the association at the givenindex.getDeclaredAssociation(String name) Returns the association with the givennamedeclared in this type.Returns a list containing all associations declared in this type.getDeclaredAttribute(int index) Returns the declared attribute at the givenindex.getDeclaredAttribute(String name) Returns the attribute with the givennamedeclared in this type.Returns a list containing all attributes declared in this model type.getDeclaredValidationRule(int index) Returns the declaredValidationRuleat the givenindex.Returns theValidationRulewith the givennamedeclared in this type.Returns a list containing allValidationRulesdeclared in this model type.protected StringgetModelObjectAttributes(IModelObject modelObject) Returns theProductCmptTypethat configures this policy component type.Returns this type's super type ornullif it has none.getValidationRule(String name) Returns theValidationRulewith the givennamedeclared in this type or one of its super types.Returns a list containing all theValidationRulesincluding those defined in the super types.booleanisAssociationDeclared(String name) Returns whether the association with the givennameis declared in this type.booleanisAttributeDeclared(String name) Returns whether the attribute with the givennameis declared in this type.booleanReturns whether this policy component type is configured by a product component type.booleanReturns whether theValidationRulewith the givennameis declared in this type.Methods inherited from class org.faktorips.runtime.model.type.Type
findDeclaredField, findDeclaredMethod, findJavaInterface, getAnnotatedDeclaration, getDeclarationClass, getDeclaredFields, getDeclaredMethods, getDocumentation, getJavaClass, getJavaInterface, getMessageHelper, getMessageKey, isAssociationPresent, isAttributePresent, isSuperTypePresent, searchDeclaredMethod, toStringMethods inherited from class org.faktorips.runtime.model.type.ModelElement
createMessageHelper, getDeprecation, getDescription, getExtensionPropertyIds, getExtensionPropertyValue, getLabel, getName, getRelevantProductObject, invokeField, invokeMethod, isDeprecated
-
Field Details
-
KIND_NAME
- See Also:
-
-
Constructor Details
-
PolicyCmptType
-
-
Method Details
-
getKindName
- Specified by:
getKindNamein classType
-
isConfiguredByProductCmptType
public boolean isConfiguredByProductCmptType()Returns whether this policy component type is configured by a product component type. If this method returnstrueyou could usegetProductCmptType()to get the type of the configuring product.- Returns:
trueif this policy component type is configured elsefalse
-
getProductCmptType
Returns theProductCmptTypethat configures this policy component type. Throws anIllegalArgumentExceptionif this policy component type is not configured. UseisConfiguredByProductCmptType()to check whether it is configured or not.- Returns:
- the
ProductCmptTypethat configures this policy component type - Throws:
NullPointerException- if this policy component type is not configured
-
getSuperType
Description copied from class:TypeReturns this type's super type ornullif it has none.- Specified by:
getSuperTypein classType- See Also:
-
findSuperType
Description copied from class:TypeReturns this type's super type ifpresent, otherwise anempty Optional.- Overrides:
findSuperTypein classType
-
getDeclaredAttribute
Description copied from class:TypeReturns the attribute with the givennamedeclared in this type. Attributes defined in the type's super types are not returned.- Specified by:
getDeclaredAttributein classType- Parameters:
name- the name of the attribute- Returns:
- the attribute if it was found in this type
- See Also:
-
getDeclaredAttribute
Description copied from class:TypeReturns the declared attribute at the givenindex.- Overrides:
getDeclaredAttributein classType
-
getDeclaredAttributes
Description copied from class:TypeReturns a list containing all attributes declared in this model type. Attributes defined in the type's super types are not returned.- Specified by:
getDeclaredAttributesin classType- Returns:
- the list of attributes declared in this type
-
getAttribute
Description copied from class:TypeReturns the attribute with the givennamedeclared in this type or one of it's super types.- Overrides:
getAttributein classType
-
getAttributes
Description copied from class:TypeReturns a list containing the type's attributes including those defined in the type's super types.- Specified by:
getAttributesin classType- Returns:
- the list of all attributes declared in this type or in any supertype
-
getModelObjectAttributes
- Parameters:
modelObject- theIModelObjectlinked to the attributes- Returns:
- a list with
ModelObjectAttributes - Since:
- 21.6
-
getDeclaredAssociation
Description copied from class:TypeReturns the association with the givennamedeclared in this type. Associations defined in the type's super types are not considered. The name could either be the singular or the plural name.- Specified by:
getDeclaredAssociationin classType- Parameters:
name- the name of the association- Returns:
- the association if it was found in this type
- See Also:
-
getDeclaredAssociation
Description copied from class:TypeReturns the association at the givenindex. Associations defined in the type's super types are not returned.- Overrides:
getDeclaredAssociationin classType
-
getDeclaredAssociations
Description copied from class:TypeReturns a list containing all associations declared in this type. Associations defined in the type's super types are not returned.- Specified by:
getDeclaredAssociationsin classType- Returns:
- the list of associations declared in this type
-
getAssociation
Description copied from class:TypeReturns the association with the givennamedeclared in this type or one of it's super types. The name could either be the singular or the plural name.- Overrides:
getAssociationin classType
-
getAssociations
Description copied from class:TypeReturns the type's associations including those defined in it's super types.- Specified by:
getAssociationsin classType- Returns:
- the list of all associations declared in this type or in any super type
-
isAssociationDeclared
Description copied from class:TypeReturns whether the association with the givennameis declared in this type. Associations defined in the type's super types are not considered.- Specified by:
isAssociationDeclaredin classType- Parameters:
name- the name of the association- Returns:
trueif the association is declared in this type,falseif not- See Also:
-
isAttributeDeclared
Description copied from class:TypeReturns whether the attribute with the givennameis declared in this type. Attributes defined in the type's super types are not considered.- Specified by:
isAttributeDeclaredin classType- Parameters:
name- the name of the attribute- Returns:
trueif the attribute is declared in this type,falseif not
-
getDeclaredValidationRule
Returns theValidationRulewith the givennamedeclared in this type.ValidationRulesdefined in the type's super types is not returned.- Parameters:
name- the name of theValidationRule- Returns:
ValidationRulewith the givennameif it was found in this type- Throws:
IllegalArgumentException- if noValidationRulewith the givennameexists
-
getDeclaredValidationRule
Returns the declaredValidationRuleat the givenindex.- Parameters:
index- the position at which theValidationRuleis expected in the list of declaredValidationRules- Returns:
- the declared
ValidationRuleat the givenindex - Throws:
IndexOutOfBoundsException- if noValidationRuleexists for the givenindex
-
getDeclaredValidationRules
Returns a list containing allValidationRulesdeclared in this model type.ValidationRulesdefined in the type's super types are not returned.- Returns:
- the list of
ValidationRulesdeclared in this type
-
getValidationRule
Returns theValidationRulewith the givennamedeclared in this type or one of its super types.- Parameters:
name- the name of theValidationRule- Returns:
ValidationRulewith the givennamedeclared in this type or one of its super types- Throws:
IllegalArgumentException- if noValidationRulewith the givennameexists
-
getValidationRules
Returns a list containing all theValidationRulesincluding those defined in the super types.- Returns:
- the list of all
ValidationRulesdeclared in this type and in its super types
-
isValidationRuleDeclared
Returns whether theValidationRulewith the givennameis declared in this type.ValidationRulesdefined in the type's super types are not considered.- Parameters:
name- the name of theValidationRule- Returns:
trueif theValidationRuleis declared in this type,falseif not
-