Java源码示例:org.springframework.data.repository.core.support.PersistentEntityInformation

示例1
@Override
@SuppressWarnings("unchecked")
public <T, ID> EntityInformation<T, ID> getEntityInformation(Class<T> domainClass) {

	PersistentEntity<T, ?> entity = (PersistentEntity<T, ?>) context.getRequiredPersistentEntity(domainClass);

	return new PersistentEntityInformation<>(entity);
}
 
示例2
@SuppressWarnings("unchecked")
private <T, S> EntityInformation<T, S> getEntityInformationFor(Class<T> type) {

	PersistentEntity<T, ?> requiredPersistentEntity = (PersistentEntity<T, ?>) context
			.getRequiredPersistentEntity(type);

	return new PersistentEntityInformation<>(requiredPersistentEntity);
}
 
示例3
@Before
public void setUp_After_Super_SetUp() {
    PersistentEntityInformation<Makeup, String> entityInformation = new PersistentEntityInformation(keyValueOperations.getMappingContext().getPersistentEntity(Makeup.class));

    this.theRepository = new SimpleHazelcastRepository<>(entityInformation, keyValueOperations);
}