List of usage examples for org.springframework.data.jpa.repository.support JpaPersistableEntityInformation JpaPersistableEntityInformation
public JpaPersistableEntityInformation(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 . ja va2 s .c o m return new JpaMetamodelEntityInformation(userClass, entityManager.getMetamodel()); }