Example usage for org.springframework.data.mongodb.core MongoOperations getConverter

List of usage examples for org.springframework.data.mongodb.core MongoOperations getConverter

Introduction

In this page you can find the example usage for org.springframework.data.mongodb.core MongoOperations getConverter.

Prototype

MongoConverter getConverter();

Source Link

Document

Returns the underlying MongoConverter .

Usage

From source file:com.epam.ta.reportportal.database.dao.ReportPortalRepositoryImpl.java

ReportPortalRepositoryImpl(MongoEntityInformation<T, ID> metadata, MongoOperations mongoOperations) {
    super(metadata, mongoOperations);
    this.mongoEntityInformation = metadata;
    this.mongoOperations = mongoOperations;
    this.queryMapper = new QueryMapper(mongoOperations.getConverter());
}

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 ww . j  a  v a  2 s .  com
 * 
 * @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());
}

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

/**
 * Creates a new {@link QuerydslRepositorySupport} for the given {@link MongoOperations}.
 * //w w  w.j  a v  a2s.c o  m
 * @param operations must not be {@literal null}
 */
public QuerydslRepositorySupport(MongoOperations operations) {
    Assert.notNull(operations);
    this.template = operations;
    this.context = operations.getConverter().getMappingContext();
    this.serializer = new MongodbSerializer();
}