Interface JPACollectionAttribute

All Superinterfaces:
JPAAttribute, JPAElement

public interface JPACollectionAttribute extends JPAAttribute
  • Method Details

    • asAssociation

      Throws:
      ODataJPAModelException
    • getTargetAttribute

      JPAAttribute getTargetAttribute() throws ODataJPAModelException
      Returns for simple collections attributes the corresponding attribute of the target entity type. E.g. the following property definition:

      @ElementCollection(fetch = FetchType.LAZY)
      @CollectionTable(name = "\"Comment\"",
          joinColumns = @@JoinColumn(name = "\"BusinessPartnerID\""))
      @Column(name = "\"Text\"")
      private List comment = new ArrayList<>();


      creates a simple collection attribute. For this collection attribute jpa processor requires that a corresponding entity exists. This entity has to have a property pointing to the same database column, which is returned.
      Returns:
      In case of simple collections attributes the corresponding attribute of the target entity type otherwise null.
      Throws:
      ODataJPAModelException