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

com.mchange.v2.c3p0.impl.SetManagedResultSet Maven / Gradle / Ivy

There is a newer version: 0.9.5.5_1
Show newest version
package com.mchange.v2.c3p0.impl;

import java.sql.*;
import java.util.Set;
import com.mchange.v2.sql.filter.FilterResultSet;

abstract class SetManagedResultSet extends FilterResultSet
{
    Set activeResultSets;

    SetManagedResultSet(Set activeResultSets)
    {
 	this.activeResultSets = activeResultSets; 
    }

    SetManagedResultSet(ResultSet inner, Set activeResultSets)
    { 
	super( inner );
 	this.activeResultSets = activeResultSets; 
    }

    public synchronized void setInner(ResultSet inner)
    {
	this.inner = inner;
	activeResultSets.add( inner );
    }
    
    public synchronized void close() throws SQLException
    { 
	if ( inner != null )
	    {
		inner.close();
		activeResultSets.remove( inner ); 
		inner = null;
	    }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy