@Override
	public Connection getConnection() {
		if (username == null) {
			try {
				Class.forName(databaseDriver);
				return DriverManager.getConnection(databaseUrl);
			} catch (ClassNotFoundException e) {
				throw new DbKingException(e);
			} catch (SQLException e) {
				throw new DbKingException(e);
			}
		} else {
			try {
				Class.forName(databaseDriver);
				return DriverManager.getConnection(databaseUrl, username,
						password);
			} catch (ClassNotFoundException e) {
				throw new DbKingException(e);
			} catch (SQLException e) {
				throw new DbKingException(e);
			}
		}
	}