Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

DoctorDb Class Reference

Inheritance diagram for DoctorDb:

ConnectionFactory List of all members.

Public Member Functions

Connection connect () throws ClassNotFoundException, SQLException
void disconnect (Connection conn) throws SQLException

Static Public Member Functions

static DoctorDb getSingleton ()

Static Public Attributes

static final int PRACTICE_ID = 67

Static Package Attributes

static DoctorDb singleton

Detailed Description

Definition at line 7 of file DoctorDb.java.


Member Function Documentation

Connection DoctorDb::connect  )  throws ClassNotFoundException, SQLException [inline, virtual]
 

Implements ConnectionFactory.

Definition at line 12 of file DoctorDb.java.

00013   {
00014     Class.forName("org.postgresql.Driver");
00015     Connection conn = DriverManager.getConnection(
00016       "jdbc:postgresql://localhost/doctor",
00017       "postgres", "lewrujop"
00018     );
00019     return conn;
00020   }

void DoctorDb::disconnect Connection  conn  )  throws SQLException [inline, virtual]
 

Implements ConnectionFactory.

Definition at line 22 of file DoctorDb.java.

00023   {
00024     if (conn != null) conn.close();
00025   }

static DoctorDb DoctorDb::getSingleton  )  [inline, static]
 

Definition at line 33 of file DoctorDb.java.

References singleton.

00034   {
00035     if (singleton == null) singleton = new DoctorDb();
00036     return singleton;
00037   }


Member Data Documentation

final int DoctorDb::PRACTICE_ID = 67 [static]
 

Definition at line 10 of file DoctorDb.java.

DoctorDb DoctorDb::singleton [static, package]
 

Definition at line 31 of file DoctorDb.java.


The documentation for this class was generated from the following file:
Generated on Mon Mar 6 23:34:35 2006 by  doxygen 1.4.4