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

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

There is a newer version: 0.9.5.2_1
Show newest version
/* Autogenerated code!!! DO NOT HAND EDIT! */

package com.mchange.v2.c3p0.impl;

import java.sql.*;
import com.mchange.v2.sql.SqlUtils;
import com.mchange.v2.c3p0.C3P0ProxyConnection;

public final class NewProxyConnectionJdbc43Full extends AbstractNewProxyConnection implements Connection, C3P0ProxyConnection
{
	
	public NewProxyConnectionJdbc43Full(Connection inner, NewPooledConnection parentPooledConnection) { super(inner, parentPooledConnection); }
	
	public final boolean setShardingKeyIfValid(ShardingKey a, ShardingKey b, int c) throws SQLException
	{
		this.lock.lock();
		try
		{
			try
			{
				txn_known_resolved = false;
				
				return inner.setShardingKeyIfValid(a, b, c);
			}
			catch (NullPointerException exc)
			{
				if ( this.isDetached() )
				{
					throw SqlUtils.toSQLException("You can't operate on a closed Connection!!!", exc);
				}
				else throw exc;
			}
			catch (Exception exc)
			{
				if (! this.isDetached())
				{
					throw parentPooledConnection.handleThrowable( exc );
				}
				else throw SqlUtils.toSQLException( exc );
			}
		}
		finally
		{ this.lock.unlock(); }
	}
	
	public final boolean setShardingKeyIfValid(ShardingKey a, int b) throws SQLException
	{
		this.lock.lock();
		try
		{
			try
			{
				txn_known_resolved = false;
				
				return inner.setShardingKeyIfValid(a, b);
			}
			catch (NullPointerException exc)
			{
				if ( this.isDetached() )
				{
					throw SqlUtils.toSQLException("You can't operate on a closed Connection!!!", exc);
				}
				else throw exc;
			}
			catch (Exception exc)
			{
				if (! this.isDetached())
				{
					throw parentPooledConnection.handleThrowable( exc );
				}
				else throw SqlUtils.toSQLException( exc );
			}
		}
		finally
		{ this.lock.unlock(); }
	}
	
	public final void setShardingKey(ShardingKey a, ShardingKey b) throws SQLException
	{
		this.lock.lock();
		try
		{
			try
			{
				txn_known_resolved = false;
				
				inner.setShardingKey(a, b);
			}
			catch (NullPointerException exc)
			{
				if ( this.isDetached() )
				{
					throw SqlUtils.toSQLException("You can't operate on a closed Connection!!!", exc);
				}
				else throw exc;
			}
			catch (Exception exc)
			{
				if (! this.isDetached())
				{
					throw parentPooledConnection.handleThrowable( exc );
				}
				else throw SqlUtils.toSQLException( exc );
			}
		}
		finally
		{ this.lock.unlock(); }
	}
	
	public final void setShardingKey(ShardingKey a) throws SQLException
	{
		this.lock.lock();
		try
		{
			try
			{
				txn_known_resolved = false;
				
				inner.setShardingKey(a);
			}
			catch (NullPointerException exc)
			{
				if ( this.isDetached() )
				{
					throw SqlUtils.toSQLException("You can't operate on a closed Connection!!!", exc);
				}
				else throw exc;
			}
			catch (Exception exc)
			{
				if (! this.isDetached())
				{
					throw parentPooledConnection.handleThrowable( exc );
				}
				else throw SqlUtils.toSQLException( exc );
			}
		}
		finally
		{ this.lock.unlock(); }
	}
	
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy