Example usage for org.springframework.data.mongodb.repository.query MongoEntityInformation getJavaType

List of usage examples for org.springframework.data.mongodb.repository.query MongoEntityInformation getJavaType

Introduction

In this page you can find the example usage for org.springframework.data.mongodb.repository.query MongoEntityInformation getJavaType.

Prototype

Class<T> getJavaType();

Source Link

Document

Returns the actual domain class type.

Usage

From source file:org.springframework.data.mongodb.repository.support.QueryDslMongoRepository.java

/**
 * Creates a new {@link QueryDslMongoRepository} for the given {@link MongoEntityInformation}, {@link MongoTemplate}
 * and {@link EntityPathResolver}.//from   w w  w  . j a  va 2 s. c om
 * 
 * @param entityInformation
 * @param mongoOperations
 * @param resolver
 */
public QueryDslMongoRepository(MongoEntityInformation<T, ID> entityInformation, MongoOperations mongoOperations,
        EntityPathResolver resolver) {

    super(entityInformation, mongoOperations);
    Assert.notNull(resolver);
    EntityPath<T> path = resolver.createPath(entityInformation.getJavaType());
    this.builder = new PathBuilder<T>(path.getType(), path.getMetadata());
    this.serializer = new SpringDataMongodbSerializer(mongoOperations.getConverter());
}