jdbcadmin.core.tools
Class AbstractCnxUser

java.lang.Object
  extended byjdbcadmin.core.tools.AbstractCnxUser
Direct Known Subclasses:
DataManager, JdbcInspector

public abstract class AbstractCnxUser
extends java.lang.Object

Base class for classes which use a database connection
The public methods of the overriding classes must call the connect() and #diconnect methods


Field Summary
protected  java.sql.Connection cnx
          Connexion à la base, apres fermeture, elle doit être mise à null
protected  ConnectionInfo conInfos
          Informations de connexion à la base de donnée
 
Constructor Summary
AbstractCnxUser(ConnectionInfo aCnxInfos)
          Constructor
 
Method Summary
protected  boolean connect()
          If not initialized, creates or retrieves the connection
protected  void disconnect()
          Closes the db connection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

conInfos

protected ConnectionInfo conInfos
Informations de connexion à la base de donnée


cnx

protected java.sql.Connection cnx
Connexion à la base, apres fermeture, elle doit être mise à null

Constructor Detail

AbstractCnxUser

public AbstractCnxUser(ConnectionInfo aCnxInfos)
Constructor

Parameters:
aCnxInfos - Connection informations
Method Detail

connect

protected boolean connect()
                   throws TechnicalException
If not initialized, creates or retrieves the connection

Returns:
true if the connection had to be created/retrieved (in this case, the calling method must call disconnect()), false otherwise
Throws:
TechnicalException - error connecting to db.

disconnect

protected void disconnect()
Closes the db connection



Copyright © 2004-2005 Norsys. All Rights Reserved.