java.lang.Object
com.prog3.ipt.Model.FacadeClasses.DatabaseConnectionSingleton
DatabaseConnectionSingleton interfaces with a MySQL Database Schema for IPT system, applying the Singleton design pattern
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Connectionprivate static DatabaseConnectionSingletonprivate final Stringprivate final Stringprivate final String - 
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDatabaseConnectionSingleton constructor. - 
Method Summary
Modifier and TypeMethodDescriptionstatic DatabaseConnectionSingletonReturns the DatabaseConnectionSingleton instance The instance doesn't get created until the method is called for the first time. 
- 
Field Details
- 
instance
 - 
connection
 - 
url
- See Also:
 
 - 
username
- See Also:
 
 - 
password
- See Also:
 
 
 - 
 - 
Constructor Details
- 
DatabaseConnectionSingleton
private DatabaseConnectionSingleton()DatabaseConnectionSingleton constructor. Set up a connection passing url, username, password to DriverManager's getConnection method Protect against instantiation via reflection 
 - 
 - 
Method Details
- 
getConnection
 - 
getInstance
Returns the DatabaseConnectionSingleton instance The instance doesn't get created until the method is called for the first time.- Returns:
 - A reference to a DatabaseConnectionSingleton object
 
 
 -