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

com.genexus.db.LocalDBConnectionManager Maven / Gradle / Ivy

Go to download

Core classes for the runtime used by Java and Android apps generated with GeneXus

There is a newer version: 4.7.0
Show newest version
package com.genexus.db;

import java.sql.SQLException;

import com.genexus.ModelContext;
import com.genexus.ServerPreferences;
import com.genexus.ModelContext;
import com.genexus.db.driver.GXConnection;

final class LocalDBConnectionManager extends DBConnectionManager
{
	static
	{
		if	(!com.genexus.ApplicationContext.getInstance().getReorganization())
			ServerPreferences.fileName = "client.cfg";
	}

	LocalDBConnectionManager()
	{
	}

	public UserInformation getNewUserInformation(Namespace namespace)
	{
		return new LocalUserInformation(namespace);
	}

	public void connect(ModelContext context, int handle, String dataSource) throws SQLException
	{
		((LocalUserInformation) getUserInformation(handle)).getConnection(context, dataSource);
	}

	public boolean isConnected(int handle, String dataSource)
	{
		return ((LocalUserInformation) getUserInformation(handle)).isConnected(dataSource);
	}


	public GXConnection getConnection(ModelContext context, int handle, String dataSource, boolean readOnly, boolean sticky) throws SQLException
	{
		return ((LocalUserInformation) getUserInformation(handle)).getConnection((ModelContext)context, dataSource);
	}

	public void dropAllCursors(int handle)
	{
		((LocalUserInformation) getUserInformation(handle)).dropAllCursors();
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy