List of usage examples for org.springframework.data.jpa.repository.support JpaMetamodelEntityInformation JpaMetamodelEntityInformation
public JpaMetamodelEntityInformation(Class<T> domainClass, Metamodel metamodel)
From source file:example.springdata.jpa.compositions.FlushOnSaveRepositoryImpl.java
@SuppressWarnings({ "unchecked", "rawtypes" }) private <S extends T> EntityInformation<Object, S> getEntityInformation(S entity) { Class<?> userClass = ClassUtils.getUserClass(entity.getClass()); if (entity instanceof AbstractPersistable<?>) { return new JpaPersistableEntityInformation(userClass, entityManager.getMetamodel()); }/*from w w w . j a v a 2s . c o m*/ return new JpaMetamodelEntityInformation(userClass, entityManager.getMetamodel()); }