List of usage examples for org.springframework.data.repository.core.support RepositoryFactoryInformation getEntityInformation
EntityInformation<T, ID> getEntityInformation();
From source file:net.daum.clix.springframework.data.rest.client.repository.RestRepositories.java
private RepositoryFactoryInformation<Object, Serializable> getRepoInfoFor(Class<?> domainClass) { Assert.notNull(domainClass);/* w ww. j a va 2 s . com*/ for (RepositoryFactoryInformation<Object, Serializable> information : repositories.keySet()) { if (domainClass.equals(information.getEntityInformation().getJavaType())) { return information; } } return null; }
From source file:net.daum.clix.springframework.data.rest.client.repository.RestRepositories.java
/** * Returns the {@link EntityInformation} for the given domain class. * // www . jav a2s . c o m * @param domainClass * must not be {@literal null}. * @return */ @SuppressWarnings("unchecked") public <T, S extends Serializable> EntityInformation<T, S> getEntityInformationFor(Class<?> domainClass) { RepositoryFactoryInformation<Object, Serializable> information = getRepoInfoFor(domainClass); return information == null ? null : (EntityInformation<T, S>) information.getEntityInformation(); }