Class JpaEntityInformationSupport<T,ID>
java.lang.Object
org.springframework.data.repository.core.support.AbstractEntityInformation<T,ID>
org.springframework.data.jpa.repository.support.JpaEntityInformationSupport<T,ID>
- All Implemented Interfaces:
JpaEntityMetadata<T>, JpaEntityInformation<T,ID>, EntityInformation<T, ID>, EntityMetadata<T>
- Direct Known Subclasses:
JpaMetamodelEntityInformation
public abstract class JpaEntityInformationSupport<T,ID>
extends AbstractEntityInformation<T,ID>
implements JpaEntityInformation<T,ID>
Base class for
JpaEntityInformation implementations to share common method implementations.- Author:
- Oliver Gierke, Mark Paluch, Greg Turnquist
-
Constructor Summary
ConstructorsConstructorDescriptionJpaEntityInformationSupport(Class<T> domainClass) Creates a newJpaEntityInformationSupportwith the given domain class.JpaEntityInformationSupport(JpaEntityMetadata<T> metadata) Creates a newJpaEntityInformationSupportwith the givenJpaEntityMetadata. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> JpaEntityInformation<T, ?> getEntityInformation(Class<T> domainClass, jakarta.persistence.EntityManager em) Creates aJpaEntityInformationfor the given domain class andEntityManager.static <T> JpaEntityInformation<T, ?> getEntityInformation(Class<T> domainClass, jakarta.persistence.metamodel.Metamodel metamodel, jakarta.persistence.PersistenceUnitUtil persistenceUnitUtil) Creates aJpaEntityInformationfor the given domain class andMetamodel.Returns the name of the entity.Methods inherited from class AbstractEntityInformation
getJavaType, isNewMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EntityInformation
getId, getIdType, getRequiredId, isNewMethods inherited from interface EntityMetadata
getJavaTypeMethods inherited from interface JpaEntityInformation
getCompositeIdAttributeValue, getIdAttribute, getIdAttributeNames, getKeyset, getRequiredIdAttribute, hasCompositeId
-
Constructor Details
-
JpaEntityInformationSupport
Creates a newJpaEntityInformationSupportwith the given domain class.- Parameters:
domainClass- must not be null.
-
JpaEntityInformationSupport
Creates a newJpaEntityInformationSupportwith the givenJpaEntityMetadata.- Parameters:
metadata- must not be null.
-
-
Method Details
-
getEntityInformation
public static <T> JpaEntityInformation<T,?> getEntityInformation(Class<T> domainClass, jakarta.persistence.EntityManager em) Creates aJpaEntityInformationfor the given domain class andEntityManager.- Parameters:
domainClass- must not be null.em- must not be null.- Returns:
-
getEntityInformation
public static <T> JpaEntityInformation<T,?> getEntityInformation(Class<T> domainClass, jakarta.persistence.metamodel.Metamodel metamodel, jakarta.persistence.PersistenceUnitUtil persistenceUnitUtil) Creates aJpaEntityInformationfor the given domain class andMetamodel.- Parameters:
domainClass- must not be null.metamodel- must not be null.persistenceUnitUtil- must not be null.- Returns:
- Since:
- 4.0
-
getEntityName
Description copied from interface:JpaEntityMetadataReturns the name of the entity.- Specified by:
getEntityNamein interfaceJpaEntityMetadata<T>- Returns:
-