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

io.github.jinghui70.rainbow.dbaccess.memory.MemoryDataSource Maven / Gradle / Ivy

There is a newer version: 5.2.11
Show newest version
package io.github.jinghui70.rainbow.dbaccess.memory;

import javax.sql.DataSource;
import java.io.PrintWriter;
import java.sql.Connection;
import java.util.logging.Logger;

public class MemoryDataSource implements DataSource {

    private final MemoryConnection con;

    public MemoryDataSource(MemoryConnection con) {
        this.con = con;
    }

    @Override
    public Connection getConnection() {
        return con;
    }

    @Override
    public Connection getConnection(String username, String password) {
        return con;
    }

    @Override
    public Logger getParentLogger() {
        return null;
    }

    @Override
    public  T unwrap(Class iface) {
        return null;
    }

    @Override
    public boolean isWrapperFor(Class iface) {
        return false;
    }

    @Override
    public PrintWriter getLogWriter() {
        return null;
    }

    @Override
    public void setLogWriter(PrintWriter out) {
    }

    @Override
    public int getLoginTimeout() {
        return 0;
    }

    @Override
    public void setLoginTimeout(int seconds) {
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy