Chat applikasjon
Public Member Functions | Static Public Member Functions | List of all members
dao.Database Class Reference

Public Member Functions

Connection getConnection () throws SQLException
 

Static Public Member Functions

static Database instance ()
 

Detailed Description

Class used to create Database connection

Member Function Documentation

◆ getConnection()

Connection dao.Database.getConnection ( ) throws SQLException
inline

Method to get a connection from the Database object.

Returns
A connection to the Database object.
Exceptions
SQLExceptionif failing to get connection

◆ instance()

static Database dao.Database.instance ( )
inlinestatic

Checks if there is an existing instance of Database. If not, it creates one.

Returns
An instance of Database, either the existing one, or a newly created one.

The documentation for this class was generated from the following file: