org.apache.olingo.odata2.jpa.processor.api.model

## Interface JPAEdmReferentialConstraintRoleView

- All Superinterfaces:
    JPAEdmBaseView

      public interface JPAEdmReferentialConstraintRoleView
      extends JPAEdmBaseView

  A view on Java Persistence Entity Join Column's "name" and "referenced column name" attributes and Entity Data Model Referential Constraint's dependent and principal roles respectively. Each java persistence entity with properties annotated with Join Columns are transformed into Referential constraints and Referential constraint roles.

  The implementation of the view provides access to EDM referential constraint roles created from Java Persistence Entity Join Columns. The implementation acts as a container for EDM referential constraint roles. A referential constraint role is consistent only if the principal role and dependent roles can be created from JPA Entity relationships.

  See Also:
    `JPAEdmReferentialConstraintView`
  Do not implement this interface or derive from class.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `JPAEdmReferentialConstraintRoleView.RoleType` Two types of EDM roles of a referential constraint.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getEdmAssociationName()` The method returns the EDM association name.
    `String` | `getEdmEntityTypeName()` The method returns the EDM entity type name that holds the relationship/referential constraint.
    `ReferentialConstraintRole` | `getEdmReferentialConstraintRole()` The method returns the Referential constraint role that is currently being processed.
    `String` | `getJPAColumnName()` The method returns the name of JPA attribute's column name (annotated with @Column).
    `JPAEdmReferentialConstraintRoleView.RoleType` | `getRoleType()` The method returns the role type (PRINCIPAL or DEPENDENT)
    `boolean` | `isExists()` The method tells if there exists a valid referential constraint for a given association.

    - ### Methods inherited from interface org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmBaseView

      `clean, getBuilder, getJPAEdmExtension, getJPAEdmMappingModelAccess, getJPAMetaModel, getpUnitName, isConsistent, isDefaultNamingSkipped`

- - ### Method Detail

    - #### getRoleType

          JPAEdmReferentialConstraintRoleView.RoleType getRoleType()

      The method returns the role type (PRINCIPAL or DEPENDENT)
      Returns:
        a `JPAEdmReferentialConstraintRoleView.RoleType`

    - #### getEdmReferentialConstraintRole

          ReferentialConstraintRole getEdmReferentialConstraintRole()

      The method returns the Referential constraint role that is currently being processed.
      Returns:
        an instance of type `ReferentialConstraintRole`

    - #### getJPAColumnName

          String getJPAColumnName()

      The method returns the name of JPA attribute's column name (annotated with @Column). The returned Column Name acts as the PRINCIPAL entity type.
      Returns:
        name of JPA Column name

    - #### getEdmEntityTypeName

          String getEdmEntityTypeName()

      The method returns the EDM entity type name that holds the relationship/referential constraint. The entity type that acts as a DEPENDENT entity type.
      Returns:
        name of EDM entity type

    - #### getEdmAssociationName

          String getEdmAssociationName()

      The method returns the EDM association name.
      Returns:
        name of EDM association

    - #### isExists

          boolean isExists()

      The method tells if there exists a valid referential constraint for a given association.
      Returns:
        true - if valid referential constraint exits else false

Copyright © 2013-2023 The Apache Software Foundation. All Rights Reserved.