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

com.mars.mj.manager.ConnectionManager Maven / Gradle / Ivy

There is a newer version: 3.0.3
Show newest version
package com.mars.mj.manager;

import java.sql.Connection;

/**
 * 连接model
 */
public class ConnectionManager {

    /**
     * 是否有事务管理
     */
    private boolean hasTrantion;

    /**
     * 数据库连接
     */
    private Connection connection;

    public void close() throws Exception {
        if(hasTrantion){
            connection.close();
        }
    }

    public void setHasTrantion(boolean hasTrantion) {
        this.hasTrantion = hasTrantion;
    }

    public Connection getConnection() {
        return connection;
    }

    public void setConnection(Connection connection) {
        this.connection = connection;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy