<?php

abstract class Dao_Factory {
	abstract public function setConnection($conn);
	abstract public function getConnection();

	abstract public function getSpotDao();
	abstract public function getUserDao();
	abstract public function getCacheDao();
	abstract public function getAuditDao();
	abstract public function getUserFilterDao();
	abstract public function getSessionDao();
	abstract public function getBlackWhiteListDao();
	abstract public function getNotificationDao();
	abstract public function getCommentDao();
	abstract public function getSpotReportDao();
	abstract public function getSettingDao();
	abstract public function getUserFilterCountDao();
	abstract public function getSpotStateListDao();
	abstract public function getNntpConfigDao();

	/*
	 * Factory class which instantiates the specified DAO factory object
	 */
	public static function getDAOFactory($which) {
		switch($which) {
			case 'postgresql'			: return new Dao_Postgresql_Factory(); break;
			case 'mysql'				: return new Dao_Mysql_Factory(); break;
			case 'sqlite'				: return new Dao_Sqlite_Factory(); break;

			default						: throw new Exception("Unknown DAO factory specified");
		} // switch
	} # getDayFactory()

} // Dao_Factory

<?php

abstract class Dao_Factory {
	abstract public function setConnection($conn);
	abstract public function getConnection();

	abstract public function getSpotDao();
	abstract public function getUserDao();
	abstract public function getCacheDao();
	abstract public function getAuditDao();
	abstract public function getUserFilterDao();
	abstract public function getSessionDao();
	abstract public function getBlackWhiteListDao();
	abstract public function getNotificationDao();
	abstract public function getCommentDao();
	abstract public function getSpotReportDao();
	abstract public function getSettingDao();
	abstract public function getUserFilterCountDao();
	abstract public function getSpotStateListDao();
	abstract public function getNntpConfigDao();

	/*
	 * Factory class which instantiates the specified DAO factory object
	 */
	public static function getDAOFactory($which) {
		switch($which) {
			case 'postgresql'			: return new Dao_Postgresql_Factory(); break;
			case 'mysql'				: return new Dao_Mysql_Factory(); break;
			case 'sqlite'				: return new Dao_Sqlite_Factory(); break;
			case 'nntp'					: return new Dao_Nntp_Factory(); break;

			default						: throw new Exception("Unknown DAO factory specified");
		} // switch
	} # getDayFactory()

} // Dao_Factory

Revert "Don't implement NNTP as a Dao"
Revert "Don't implement NNTP as a Dao"

This reverts commit 02591dec515e0fcb3fa32d7c2f13888465cb16ab.
