All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.aidensuen.mongo.spring.MongoSessionHolder Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
package com.github.aidensuen.mongo.spring;

import com.github.aidensuen.mongo.session.ExecutorType;
import com.github.aidensuen.mongo.session.MongoSession;
import org.springframework.dao.support.PersistenceExceptionTranslator;
import org.springframework.transaction.support.ResourceHolderSupport;

public final class MongoSessionHolder extends ResourceHolderSupport {

    private final MongoSession mongoSession;
    private final ExecutorType executorType;
    private final PersistenceExceptionTranslator exceptionTranslator;

    public MongoSessionHolder(MongoSession mongoSession, ExecutorType executorType, PersistenceExceptionTranslator exceptionTranslator) {
        this.mongoSession = mongoSession;
        this.executorType = executorType;
        this.exceptionTranslator = exceptionTranslator;
    }

    public MongoSession getMongoSession() {
        return mongoSession;
    }

    public ExecutorType getExecutorType() {
        return executorType;
    }

    public PersistenceExceptionTranslator getExceptionTranslator() {
        return exceptionTranslator;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy