@Override
	public AuthorModel addAuthor(AuthorModel author) throws WebshopAppException {
		int generatedId = AuthorModel.DEFAULT_ID;
		if (isValidAuthor(author, "ADD_AUTHOR")) {
			try (Connection conn = getConnection()) {

				String sql = "INSERT INTO author (firstname, lastname, dob, country)"
						+ "VALUES (?, ?, ?, ?)";
				try (PreparedStatement pstmt = conn.prepareStatement(sql,
						Statement.RETURN_GENERATED_KEYS)) {
					prepareStatementFromModel(pstmt, author);

					pstmt.executeUpdate();

					try (ResultSet rs = pstmt.getGeneratedKeys()) {

						if (rs.next()) {
							generatedId = rs.getInt(1);
						}

					}

				}

				LOGGER.trace(String.format("%s.ADD_AUTHOR - %s %s", this
						.getClass().getSimpleName(), "Author added: ", author));

			} catch (SQLException e) {
				WebshopAppException excep = new WebshopAppException(
						e.getMessage(), this.getClass().getSimpleName(),
						"ADD_AUTHOR");
				LOGGER.error(excep);
				throw excep;
			}
		} else {
			LOGGER.error("Add author: Author is null.");
		}
		return new AuthorModel.Builder(generatedId, author.getFirstname(),
				author.getLastname()).dob(author.getDob())
				.country(author.getCountry()).build();
	}