Interface JpaEntityInformation<T,ID>

All Superinterfaces:
EntityInformation<T,ID>, EntityMetadata<T>, JpaEntityMetadata<T>
All Known Implementing Classes:
JpaEntityInformationSupport, JpaMetamodelEntityInformation, JpaPersistableEntityInformation

public interface JpaEntityInformation<T,ID> extends EntityInformation<T,ID>, JpaEntityMetadata<T>
Extension of EntityInformation to capture additional JPA specific information about entities.
Author:
Oliver Gierke, Thomas Darimont, Mark Paluch
  • Method Details

    • getIdAttribute

      @Nullable jakarta.persistence.metamodel.SingularAttribute<? super T,?> getIdAttribute()
      Returns the id attribute of the entity.
      Returns:
    • getRequiredIdAttribute

      default jakarta.persistence.metamodel.SingularAttribute<? super T,?> getRequiredIdAttribute() throws IllegalArgumentException
      Returns the required identifier type.
      Returns:
      the identifier type.
      Throws:
      IllegalArgumentException - in case no id type could be obtained.
      Since:
      2.0
    • hasCompositeId

      boolean hasCompositeId()
      Returns true if the entity has a composite id.
      Returns:
    • getIdAttributeNames

      Iterable<String> getIdAttributeNames()
      Returns the attribute names of the id attributes. If the entity has a composite id, then all id attribute names are returned. If the entity has a single id attribute then this single attribute name is returned.
      Returns:
    • getCompositeIdAttributeValue

      @Nullable Object getCompositeIdAttributeValue(Object id, String idAttribute)
      Extracts the value for the given id attribute from a composite id
      Parameters:
      id -
      idAttribute -
      Returns: