package com.elab.test.mongodb.ext;

import com.elab.mongodb.BaseMongodb;
import com.elab.test.mongodb.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;

/**
 *
 * @author Liukx
 * @create 2018-05-03 15:41
 * @email liukx@elab-plus.com
 **/
public class UserMongoDB extends BaseMongodb<User> {

    @Override
    public Class<User> getEntity() {
        return User.class;
    }

    @Autowired
    private MongoTemplate mongoTemplate;

    @Override
    public MongoTemplate getMongoTemplate() {
        return mongoTemplate;
    }

    public void setMongoTemplate(MongoTemplate mongoTemplate) {
        this.mongoTemplate = mongoTemplate;
    }
}
