This mini project was created in 2001 for learning/tutorial purposes.
It was recently retrieved from Geocities.com, one of the most popular and successful free personal web hosting services of the 1990s, which was shut down in October 2009.
Apparently all sites hosted on the service would be deleted and could not be recovered.
Thanks to Geocities for not deleting this and many of my other projects.
This demo uses metadata and java reflection to create a generic object factory.
The Manager class takes the name of a database table and the name of a java class as parameters and creates a class that represents the database entity. Everything is done with the use of java reflection that finds out how the table is structured in the database.
- DBConnection.java - Establishes connection to the database.
- Employee.java - Defines Employee class.
- Department.java - Defines Department class.
- Manager.java - Factory Class.
- MainDriver.java - Driver to test.