Interface JpaMetamodelAccessor


public interface JpaMetamodelAccessor
Since:
1.3.0
Author:
Jan-Willem Gmelig Meyling
  • Method Summary

    Modifier and Type Method Description
    AttributePath getAttributePath​(javax.persistence.metamodel.Metamodel metamodel, javax.persistence.metamodel.ManagedType<?> type, String attributePath)
    Construct an AttributePath for a particular attribute in type.
    AttributePath getBasicAttributePath​(javax.persistence.metamodel.Metamodel metamodel, javax.persistence.metamodel.ManagedType<?> type, String attributePath)
    Construct an AttributePath for a particular basic attribute in type.
    AttributePath getJoinTableCollectionAttributePath​(javax.persistence.metamodel.Metamodel metamodel, javax.persistence.metamodel.EntityType<?> type, String attributePath, String collectionName)
    Construct an AttributePath for a particular collection attribute in type.
    boolean isCompositeNode​(javax.persistence.metamodel.Attribute<?,​?> attr)
    Returns true if the attribute is composite (i.e. embeddable).
    boolean isElementCollection​(javax.persistence.metamodel.Attribute<?,​?> attribute)
    Returns whether the given attribute is an element collection.
    boolean isJoinable​(javax.persistence.metamodel.Attribute<?,​?> attr)
    Returns true if the attribute is joinable (i.e. association).
  • Method Details

    • getAttributePath

      AttributePath getAttributePath​(javax.persistence.metamodel.Metamodel metamodel, javax.persistence.metamodel.ManagedType<?> type, String attributePath)
      Construct an AttributePath for a particular attribute in type.
      Parameters:
      metamodel - JPA metamodel
      type - Owning type
      attributePath - The attribute path
      Returns:
      The created attribute path
    • getBasicAttributePath

      AttributePath getBasicAttributePath​(javax.persistence.metamodel.Metamodel metamodel, javax.persistence.metamodel.ManagedType<?> type, String attributePath)
      Construct an AttributePath for a particular basic attribute in type.
      Parameters:
      metamodel - JPA metamodel
      type - Owning type
      attributePath - The attribute path
      Returns:
      The created attribute path
    • getJoinTableCollectionAttributePath

      AttributePath getJoinTableCollectionAttributePath​(javax.persistence.metamodel.Metamodel metamodel, javax.persistence.metamodel.EntityType<?> type, String attributePath, String collectionName)
      Construct an AttributePath for a particular collection attribute in type.
      Parameters:
      metamodel - JPA metamodel
      type - Owning type
      attributePath - The attribute path
      collectionName - The name of the collection
      Returns:
      The created attribute path
    • isJoinable

      boolean isJoinable​(javax.persistence.metamodel.Attribute<?,​?> attr)
      Returns true if the attribute is joinable (i.e. association).
      Parameters:
      attr - The attribute
      Returns:
      Whether the attribute is joinable
    • isCompositeNode

      boolean isCompositeNode​(javax.persistence.metamodel.Attribute<?,​?> attr)
      Returns true if the attribute is composite (i.e. embeddable).
      Parameters:
      attr - The attribute
      Returns:
      Whether the attribute is composite
    • isElementCollection

      boolean isElementCollection​(javax.persistence.metamodel.Attribute<?,​?> attribute)
      Returns whether the given attribute is an element collection.
      Parameters:
      attribute - The attribute to check
      Returns:
      true if the attribute is an element collection, false otherwise