Package org.faktorips.runtime.model.type
Class ProductCmptType
java.lang.Object
org.faktorips.runtime.model.type.ModelElement
org.faktorips.runtime.model.type.Type
org.faktorips.runtime.model.type.ProductCmptType
Corresponds to a design time
IProductCmptType.-
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.getDeclaredTableUsage(String name) Returns theTableUsagewith the givennamewhich is declared in this type.Returns a list ofTableUsageswhich are declared in this type.Class<?>Class<?>Class<?>protected StringReturns the policy component type which is configured by this product component type.Returns this type's super type ornullif it has none.getTableUsage(String name) Returns theTableUsagefor the specified name.Returns a list ofTableUsageswhich are declared in this type or in any super type.booleanhasDeclaredTableUsage(String name) Returns whether theTableUsagefor the specifiednameis declared in this type.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 product component type is changing over time.booleanReturns whether this product component type is a configuration for a policy component type.booleanisSameOrSub(ProductCmptType reference) Returns whether thisProductCmptTypeis the same or sub-type compared to a referenceProductCmptType.Methods inherited from class org.faktorips.runtime.model.type.Type
findDeclaredField, findDeclaredMethod, findJavaInterface, getAnnotatedDeclaration, getDeclarationClass, getDeclaredFields, 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
The name of the design time implementation class. Don't ask about the 2.- See Also:
-
-
Constructor Details
-
ProductCmptType
-
-
Method Details
-
getKindName
- Specified by:
getKindNamein classType
-
getDeclaredMethods
- Overrides:
getDeclaredMethodsin classType
-
isChangingOverTime
public boolean isChangingOverTime()Returns whether this product component type is changing over time.- Returns:
trueif it has generations elsefalse
-
isConfigurationForPolicyCmptType
public boolean isConfigurationForPolicyCmptType()Returns whether this product component type is a configuration for a policy component type.- Returns:
trueif this type configures a policy component type,falseif not
-
isSameOrSub
Returns whether thisProductCmptTypeis the same or sub-type compared to a referenceProductCmptType.- Parameters:
reference- theProductCmptTypeto compare to- Returns:
trueif this type is the same or sub-type of the reference.
-
getPolicyCmptType
Returns the policy component type which is configured by this product component type. If this product component class has no configuration it throws aNullPointerException.- Returns:
- The configured policy component type
- Throws:
NullPointerException- if the product component type is not a configuration for a policy component type- See Also:
-
getTableUsage
Returns theTableUsagefor the specified name. May look in super types if there is no table usage in this type.- Parameters:
name- The name of the table usage- Returns:
- The
TableUsagewith the specified name - Throws:
IllegalArgumentException- if there is no table usage with the specified name
-
getDeclaredTableUsages
Returns a list ofTableUsageswhich are declared in this type. In contrast togetTableUsages()this does not return table usages of super types.- Returns:
- A list of
TableUsagesdeclared in this type
-
getDeclaredTableUsage
Returns theTableUsagewith the givennamewhich is declared in this type. Any table usage defined in the super types will not be returned.- Parameters:
name- The name of theTableUsage- Returns:
TableUsagedeclared in this type with the given name- Throws:
IllegalArgumentException- if this type does not have a declared table usage with the given name
-
hasDeclaredTableUsage
Returns whether theTableUsagefor the specifiednameis declared in this type. -
getTableUsages
Returns a list ofTableUsageswhich are declared in this type or in any super type.- Returns:
- All
TableUsagesaccessible in this product type.
-
getGenerationJavaClass
-
getGenerationJavaInterface
-
getGenerationDeclarationClass
-
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 declared attribute at the givenindex.- Overrides:
getDeclaredAttributein 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:
-
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
-
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
-
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
-
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:
-
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
-
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:
-
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
-