Class ProductCmptType


  • public class ProductCmptType
    extends Type
    Corresponds to a design time IProductCmptType.
    • Field Detail

      • KIND_NAME

        public static final java.lang.String KIND_NAME
        The name of the design time implementation class. Don't ask about the 2.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ProductCmptType

        public ProductCmptType​(java.lang.String name,
                               AnnotatedDeclaration annotatedDeclaration)
    • Method Detail

      • getKindName

        protected java.lang.String getKindName()
        Specified by:
        getKindName in class Type
      • getDeclaredMethods

        protected java.util.List<java.lang.reflect.Method> getDeclaredMethods()
        Overrides:
        getDeclaredMethods in class Type
      • isChangingOverTime

        public boolean isChangingOverTime()
        Returns whether this product component type is changing over time.
        Returns:
        true if it has generations else false
      • isConfigurationForPolicyCmptType

        public boolean isConfigurationForPolicyCmptType()
        Returns whether this product component type is a configuration for a policy component type.
        Returns:
        true if this type configures a policy component type, false if not
      • getPolicyCmptType

        public PolicyCmptType getPolicyCmptType()
        Returns the policy component type which is configured by this product component type. If this product component class has no configuration it throws a NullPointerException.
        Returns:
        The configured policy component type
        Throws:
        java.lang.NullPointerException - if the product component type is not a configuration for a policy component type
        See Also:
        isConfigurationForPolicyCmptType()
      • getTableUsage

        public TableUsage getTableUsage​(java.lang.String name)
        Returns the TableUsage for 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 TableUsage with the specified name
        Throws:
        java.lang.IllegalArgumentException - if there is no table usage with the specified name
      • getDeclaredTableUsages

        public java.util.List<TableUsage> getDeclaredTableUsages()
        Returns a list of TableUsages which are declared in this type. In contrast to getTableUsages() this does not return table usages of super types.
        Returns:
        A list of TableUsages declared in this type
      • getDeclaredTableUsage

        public TableUsage getDeclaredTableUsage​(java.lang.String name)
        Returns the TableUsage with the given name which is declared in this type. Any table usage defined in the super types will not be returned.
        Parameters:
        name - The name of the TableUsage
        Returns:
        TableUsage declared in this type with the given name
        Throws:
        java.lang.IllegalArgumentException - if this type does not have a declared table usage with the given name
      • hasDeclaredTableUsage

        public boolean hasDeclaredTableUsage​(java.lang.String name)
        Returns whether the TableUsage for the specified name is declared in this type.
      • getTableUsages

        public java.util.List<TableUsage> getTableUsages()
        Returns a list of TableUsages which are declared in this type or in any super type.
        Returns:
        All TableUsages accessible in this product type.
      • getGenerationJavaClass

        public java.lang.Class<?> getGenerationJavaClass()
      • getGenerationJavaInterface

        public java.lang.Class<?> getGenerationJavaInterface()
      • getGenerationDeclarationClass

        public java.lang.Class<?> getGenerationDeclarationClass()
      • findSuperType

        public java.util.Optional<ProductCmptType> findSuperType()
        Description copied from class: Type
        Returns this type's super type if present, otherwise an empty Optional.
        Overrides:
        findSuperType in class Type
      • getDeclaredAttribute

        public ProductAttribute getDeclaredAttribute​(int index)
        Description copied from class: Type
        Returns the declared attribute at the given index.
        Overrides:
        getDeclaredAttribute in class Type
      • getDeclaredAttribute

        public ProductAttribute getDeclaredAttribute​(java.lang.String name)
        Description copied from class: Type
        Returns the attribute with the given name declared in this type. Attributes defined in the type's super types are not returned.
        Specified by:
        getDeclaredAttribute in class Type
        Parameters:
        name - the name of the attribute
        Returns:
        the attribute if it was found in this type
        See Also:
        Type.isAttributeDeclared(String)
      • getDeclaredAttributes

        public java.util.List<ProductAttribute> getDeclaredAttributes()
        Description copied from class: Type
        Returns a list containing all attributes declared in this model type. Attributes defined in the type's super types are not returned.
        Specified by:
        getDeclaredAttributes in class Type
        Returns:
        the list of attributes declared in this type
      • getAttribute

        public ProductAttribute getAttribute​(java.lang.String name)
        Description copied from class: Type
        Returns the attribute with the given name declared in this type or one of it's super types.
        Overrides:
        getAttribute in class Type
      • getAttributes

        public java.util.List<ProductAttribute> getAttributes()
        Description copied from class: Type
        Returns a list containing the type's attributes including those defined in the type's super types.
        Specified by:
        getAttributes in class Type
        Returns:
        the list of all attributes declared in this type or in any supertype
      • isAttributeDeclared

        public boolean isAttributeDeclared​(java.lang.String name)
        Description copied from class: Type
        Returns whether the attribute with the given name is declared in this type. Attributes defined in the type's super types are not considered.
        Specified by:
        isAttributeDeclared in class Type
        Parameters:
        name - the name of the attribute
        Returns:
        true if the attribute is declared in this type, false if not
      • getDeclaredAssociation

        public ProductAssociation getDeclaredAssociation​(int index)
        Description copied from class: Type
        Returns the association at the given index. Associations defined in the type's super types are not returned.
        Overrides:
        getDeclaredAssociation in class Type
      • getDeclaredAssociation

        public ProductAssociation getDeclaredAssociation​(java.lang.String name)
        Description copied from class: Type
        Returns the association with the given name declared 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:
        getDeclaredAssociation in class Type
        Parameters:
        name - the name of the association
        Returns:
        the association if it was found in this type
        See Also:
        Type.isAssociationDeclared(String)
      • getDeclaredAssociations

        public java.util.List<ProductAssociation> getDeclaredAssociations()
        Description copied from class: Type
        Returns a list containing all associations declared in this type. Associations defined in the type's super types are not returned.
        Specified by:
        getDeclaredAssociations in class Type
        Returns:
        the list of associations declared in this type
      • isAssociationDeclared

        public boolean isAssociationDeclared​(java.lang.String name)
        Description copied from class: Type
        Returns whether the association with the given name is declared in this type. Associations defined in the type's super types are not considered.
        Specified by:
        isAssociationDeclared in class Type
        Parameters:
        name - the name of the association
        Returns:
        true if the association is declared in this type, false if not
        See Also:
        Type.isAssociationPresent(String)
      • getAssociation

        public ProductAssociation getAssociation​(java.lang.String name)
        Description copied from class: Type
        Returns the association with the given name declared in this type or one of it's super types. The name could either be the singular or the plural name.
        Overrides:
        getAssociation in class Type
      • getAssociations

        public java.util.List<ProductAssociation> getAssociations()
        Description copied from class: Type
        Returns the type's associations including those defined in it's super types.
        Specified by:
        getAssociations in class Type
        Returns:
        the list of all associations declared in this type or in any super type