List of usage examples for org.springframework.data.querydsl EntityPathResolver createPath
<T> EntityPath<T> createPath(Class<T> domainClass);
From source file:org.springframework.data.document.mongodb.repository.QueryDslMongoRepository.java
/** * Creates a new {@link QueryDslMongoRepository} for the given {@link MongoEntityInformation}, * {@link MongoTemplate} and {@link EntityPathResolver}. * //w w w.j a va2 s. c o m * @param entityInformation * @param template * @param resolver */ public QueryDslMongoRepository(MongoEntityInformation<T, ID> entityInformation, MongoTemplate template, EntityPathResolver resolver) { super(entityInformation, template); this.transformer = new MongoConverterTransformer(template.getConverter()); this.serializer = new MongodbSerializer(); EntityPath<T> path = resolver.createPath(entityInformation.getJavaType()); this.builder = new PathBuilder<T>(path.getType(), path.getMetadata()); }
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}.//w w w . j a v a 2 s .c o m * * @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()); }