org.springframework.data.mongodb.repository.query.MongoEntityInformation Java Examples

The following examples show how to use org.springframework.data.mongodb.repository.query.MongoEntityInformation. 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: ApplicationConfigurationTest.java    From spring-data-examples with Apache License 2.0 5 votes vote down vote up
@Test
public void repositoriesAreAssignedToAppropriateStores() {

	Repositories repositories = new Repositories(context);

	assertThat(repositories.getEntityInformationFor(Customer.class), is(instanceOf(JpaEntityInformation.class)));
	assertThat(repositories.getEntityInformationFor(Order.class), is(instanceOf(MongoEntityInformation.class)));
}
 
Example #2
Source File: DataTablesRepositoryImpl.java    From spring-data-mongodb-datatables with Apache License 2.0 2 votes vote down vote up
/**
 * Creates a new {@link SimpleMongoRepository} for the given {@link MongoEntityInformation} and {@link MongoTemplate}.
 *
 * @param metadata        must not be {@literal null}.
 * @param mongoOperations must not be {@literal null}.
 */
public DataTablesRepositoryImpl(MongoEntityInformation<T, ID> metadata, MongoOperations mongoOperations) {
    super(metadata, mongoOperations);
    this.metadata = metadata;
    this.mongoOperations = mongoOperations;
}