Interface JPAEdmComplexTypeView

  • All Superinterfaces:
    JPAEdmBaseView

    public interface JPAEdmComplexTypeView
    extends JPAEdmBaseView
    A view on Java Persistence embeddable types and EDM complex types. Java persistence embeddable types are converted into EDM entity types. Only those embeddable types that are
    1. used in a java persistence Entity type
    2. used as non embeddable id of a java persistence entity type
    are converted into EDM complex types.

    The implementation of the view provides access to EDM complex types for the given JPA EDM model. The view acts as a container for consistent list of EDM complex types. An EDM complex type is said to be consistent only if it used in at least one of the EDM entity type.

    See Also:
    JPAEdmComplexPropertyView
    • Method Detail

      • getEdmComplexType

        ComplexType getEdmComplexType()
        The method returns an EDM complex type that is currently being processed.
        Returns:
        an instance of type ComplexType
      • getJPAEmbeddableType

        javax.persistence.metamodel.EmbeddableType<?> getJPAEmbeddableType()
        The method returns an JPA embeddable type that is currently being processed.
        Returns:
        an instance of type EmbeddableType
      • getConsistentEdmComplexTypes

        List<ComplexType> getConsistentEdmComplexTypes()
        The method returns a consistent list of EDM complex types.
        Returns:
        a list of ComplexType
      • searchEdmComplexType

        ComplexType searchEdmComplexType​(String embeddableTypeName)
        The method searches for the EDM complex type with in the container for the given JPA embeddable type name.
        Parameters:
        embeddableTypeName - is the name of JPA embeddable type
        Returns:
        a reference to EDM complex type if found else null
      • addJPAEdmCompleTypeView

        void addJPAEdmCompleTypeView​(JPAEdmComplexTypeView view)
        The method add a JPA EDM complex type view to the container.
        Parameters:
        view -
        isReferencedInKey - is the complex type referenced in an Entity as a key property is an instance of type JPAEdmComplexTypeView
      • searchEdmComplexType

        ComplexType searchEdmComplexType​(FullQualifiedName type)
        The method searches for the EDM complex type with in the container for the given EDM complex type's fully qualified name.
        Parameters:
        type - is the fully qualified name of EDM complex type
        Returns:
        a reference to EDM complex type if found else null
      • expandEdmComplexType

        void expandEdmComplexType​(ComplexType complexType,
                                  List<Property> expandedPropertyList,
                                  String embeddablePropertyName)
        The method expands the given EDM complex type into a list of EDM simple properties.
        Parameters:
        complexType - is the EDM complex type to expand
        expandedPropertyList - is the list to be populated with expanded EDM simple properties
        embeddablePropertyName - is the name of the complex property. The name is used as the qualifier for the expanded simple property names.
      • isReferencedInKey

        boolean isReferencedInKey​(String complexTypeName)
        The method checks if the given EDM complex type is referenced as a Key property in any Entity
        Parameters:
        complexTypeName - EDM complex type name
        Returns:
        • true : if the complex type is referenced as an entity's key property
        • false : if the complex type is not referenced as an entity's key property
      • setReferencedInKey

        void setReferencedInKey​(String complexTypeName)
        The method sets the given EDM complex type as referenced in an Entity as a key property
        Parameters:
        complexTypeName - EDM complex Type name