org.springframework.data.repository.core.support.PersistentEntityInformation Java Examples

The following examples show how to use org.springframework.data.repository.core.support.PersistentEntityInformation. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: KeyValueRepositoryFactory.java    From spring-data-keyvalue with Apache License 2.0 5 votes vote down vote up
@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);
}
 
Example #2
Source File: SimpleKeyValueRepositoryUnitTests.java    From spring-data-keyvalue with Apache License 2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
private <T, S> EntityInformation<T, S> getEntityInformationFor(Class<T> type) {

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

	return new PersistentEntityInformation<>(requiredPersistentEntity);
}
 
Example #3
Source File: SimpleHazelcastRepositoryIT.java    From spring-data-hazelcast with Apache License 2.0 4 votes vote down vote up
@Before
public void setUp_After_Super_SetUp() {
    PersistentEntityInformation<Makeup, String> entityInformation = new PersistentEntityInformation(keyValueOperations.getMappingContext().getPersistentEntity(Makeup.class));

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