package de.jottyfan.camporganizer.module.business.bookings;

import java.util.List;

import de.jottyfan.camporganizer.module.business.bookings.impl.BookerBean;

/**
 *
 * @author jotty
 *
 */
public interface IBookingsService {
	/**
	 * get the bookers information
	 *
	 * @param username the name of the user in this session
	 * @return the list of bookers; an empty one at least
	 */
	public List<BookerBean> getBookers(String username);

	/**
	 * get the booker referenced by id
	 *
	 * @param id       the ID of the booker
	 * @param username the name of the user in this session
	 * @return the booker if found; null otherwise
	 */
	public BookerBean getBooker(Integer id, String username);

	/**
	 * add payment to the paid values of user with id
	 *
	 * @param id      the ID of the booker
	 * @param payment the payment (additional value)
	 * @return number of affected database rows, should be 1
	 */
	public Integer addPayment(Integer id, Double payment);
}
