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

## Interface JPAEdmMappingModelAccess

-     public interface JPAEdmMappingModelAccess

  Interface provides methods to access JPA EDM mapping model.
  See Also:
    `JPAEdmMappingModel`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `checkExclusionOfJPAAttributeType(String jpaEntityTypeName, String jpaAttributeName)` The method returns whether the JPA Attribute should be excluded from EDM Entity Type
    `boolean` | `checkExclusionOfJPAEmbeddableAttributeType(String jpaEmbeddableTypeName, String jpaAttributeName)` The method returns whether the JPA Embeddable Attribute Type should be excluded from EDM model
    `boolean` | `checkExclusionOfJPAEmbeddableType(String jpaEmbeddableTypeName)` The method returns whether the JPA Embeddable Type should be excluded from EDM model
    `boolean` | `checkExclusionOfJPAEntityType(String jpaEntityTypeName)` The method returns whether the JPA Entity should be excluded from EDM model
    `JPAEdmMappingModel` | `getJPAEdmMappingModel()` The method returns a JPA EDM mapping model Java object.
    `boolean` | `isMappingModelExists()` The method returns if there exists a mapping model.
    `void` | `loadMappingModel()` The method searches and loads the mapping model stored in <file>.xml file into the java object `JPAEdmMappingModel` .
    `String` | `mapJPAAttribute(String jpaEntityTypeName, String jpaAttributeName)` The method returns EDM property name for the Java persistence entity attribute name.
    `String` | `mapJPAEmbeddableType(String jpaEmbeddableTypeName)` The method returns EDM complex type name for the Java embeddable type name.
    `String` | `mapJPAEmbeddableTypeAttribute(String jpaEmbeddableTypeName, String jpaAttributeName)` The method returns EDM property name for the Java persistence embeddable type's attribute name.
    `String` | `mapJPAEntitySet(String jpaEntityTypeName)` The method returns EDM entity set name for the Java persistence entity type name
    `String` | `mapJPAEntityType(String jpaEntityTypeName)` The method returns EDM entity type name for the Java persistence entity type name
    `String` | `mapJPAPersistenceUnit(String persistenceUnitName)` The method returns EDM Schema namespace for the persistence unit name
    `String` | `mapJPARelationship(String jpaEntityTypeName, String jpaRelationshipName)` The method returns EDM navigation property name for the Java persistence entity relationship name.

- - ### Method Detail

    - #### loadMappingModel

          void loadMappingModel()

      The method searches and loads the mapping model stored in <file>.xml file into the java object `JPAEdmMappingModel` . The name of the file is set into ODataJPAContext method.
      See Also:
        `ODataJPAContext.setJPAEdmMappingModel(String)`

    - #### isMappingModelExists

          boolean isMappingModelExists()

      The method returns if there exists a mapping model.
      Returns:
        true - if there exists a mapping model for the OData service else false

    - #### getJPAEdmMappingModel

          JPAEdmMappingModel getJPAEdmMappingModel()

      The method returns a JPA EDM mapping model Java object. The mapping model in XML files is un-marshaled into the Java object.
      Returns:
        an instance of type `JPAEdmMappingModel`

    - #### mapJPAPersistenceUnit

          String mapJPAPersistenceUnit(String persistenceUnitName)

      The method returns EDM Schema namespace for the persistence unit name
      Parameters:
        `persistenceUnitName` - is the Java persistence unit name
      Returns:
        EDM schema name space mapped to Java persistence unit name or null if no mapping is available

    - #### mapJPAEntityType

          String mapJPAEntityType(String jpaEntityTypeName)

      The method returns EDM entity type name for the Java persistence entity type name
      Parameters:
        `jpaEntityTypeName` - is the Java persistence entity type name
      Returns:
        EDM entity type name mapped to Java persistence entity type name or null if no mapping is available

    - #### mapJPAEntitySet

          String mapJPAEntitySet(String jpaEntityTypeName)

      The method returns EDM entity set name for the Java persistence entity type name
      Parameters:
        `jpaEntityTypeName` - is the Java persistence entity type name
      Returns:
        EDM entity set name mapped to Java persistence entity type name or null if no mapping is available

    - #### mapJPAAttribute

          String mapJPAAttribute(String jpaEntityTypeName,
                                 String jpaAttributeName)

      The method returns EDM property name for the Java persistence entity attribute name.
      Parameters:
        `jpaEntityTypeName` - is the Java persistence entity type name
        `jpaAttributeName` - is the Java persistence attribute name
      Returns:
        EDM property name mapped to Java persistence attribute name or null if no mapping is available

    - #### mapJPARelationship

          String mapJPARelationship(String jpaEntityTypeName,
                                    String jpaRelationshipName)

      The method returns EDM navigation property name for the Java persistence entity relationship name.
      Parameters:
        `jpaEntityTypeName` - is the Java persistence entity type name
        `jpaRelationshipName` - is the Java persistence relationship name
      Returns:
        EDM navigation property name mapped to Java persistence entity relationship name or null if no mapping is available

    - #### mapJPAEmbeddableType

          String mapJPAEmbeddableType(String jpaEmbeddableTypeName)

      The method returns EDM complex type name for the Java embeddable type name.
      Parameters:
        `jpaEmbeddableTypeName` - is the Java persistence embeddable type name
      Returns:
        EDM complex type name mapped to Java persistence entity relationship name or null if no mapping is available

    - #### mapJPAEmbeddableTypeAttribute

          String mapJPAEmbeddableTypeAttribute(String jpaEmbeddableTypeName,
                                               String jpaAttributeName)

      The method returns EDM property name for the Java persistence embeddable type's attribute name.
      Parameters:
        `jpaEmbeddableTypeName` - is the Java persistence
        `jpaAttributeName` - is the Java persistence attribute name
      Returns:
        EDM property name mapped to Java persistence attribute name or null if no mapping is available

    - #### checkExclusionOfJPAEntityType

          boolean checkExclusionOfJPAEntityType(String jpaEntityTypeName)

      The method returns whether the JPA Entity should be excluded from EDM model
      Parameters:
        `jpaEntityTypeName` - is the name of JPA Entity Type
      Returns:
        true - if JPA Entity should be excluded
        false - if JPA Entity should be not be excluded

    - #### checkExclusionOfJPAAttributeType

          boolean checkExclusionOfJPAAttributeType(String jpaEntityTypeName,
                                                   String jpaAttributeName)

      The method returns whether the JPA Attribute should be excluded from EDM Entity Type
      Parameters:
        `jpaEntityTypeName` - is the name of JPA Entity Type
        `jpaAttributeName` - is the name of JPA attribute
      Returns:
        true - if JPA attribute should be excluded
        false - if JPA attribute should be not be excluded

    - #### checkExclusionOfJPAEmbeddableType

          boolean checkExclusionOfJPAEmbeddableType(String jpaEmbeddableTypeName)

      The method returns whether the JPA Embeddable Type should be excluded from EDM model
      Parameters:
        `jpaEmbeddableTypeName` - is the name of JPA Embeddable Type
      Returns:
        true - if JPA Embeddable Type should be excluded
        false - if JPA Embeddable Type should be not be excluded

    - #### checkExclusionOfJPAEmbeddableAttributeType

          boolean checkExclusionOfJPAEmbeddableAttributeType(String jpaEmbeddableTypeName,
                                                             String jpaAttributeName)

      The method returns whether the JPA Embeddable Attribute Type should be excluded from EDM model
      Parameters:
        `jpaEmbeddableTypeName` - is the name of JPA Embeddable Attribute Type
        `jpaAttributeName` - is the name of JPA Attribute name
      Returns:
        true - if JPA Embeddable Attribute Type should be excluded
        false - if JPA Embeddable Attribute Type should be not be excluded

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