package de.jottyfan.camporganizer.module.confirmation.person;

import java.util.List;

import de.jottyfan.camporganizer.module.confirmation.person.impl.CampBean;
import de.jottyfan.camporganizer.module.confirmation.person.impl.PersonBean;

/**
 *
 * @author jotty
 *
 */
public interface IPersonService {

	/**
	 * get person bean from db if username can read it
	 *
	 * @param username the user to read from the database
	 * @param pk       the ID of the person to be read
	 * @return the person or null
	 */
	public PersonBean getPerson(String username, Integer pk);

	/**
	 * update bean in the database
	 *
	 * @param bean the bean
	 * @param worker the user that is doing the changes
	 * @return number of affected database rows
	 */
	public Integer updatePerson(PersonBean bean, String worker);

	/**
	 * get all camps from the database that the user has access to
	 *
	 * @param username the user
	 * @return a list of camp beans; an empty one at least
	 */
	public List<CampBean> getCamps(String username);

	/**
	 * get several annotations as a String
	 *
	 * @param pk the ID of the person
	 * @return the annotations; may be an empty string
	 */
	public String getAnnotations(Integer pk);
}
