package Model;

import java.sql.SQLException;
import java.util.List;

import Controler.IO.DB;

public class Signature implements ISignature {

	private User user;

	public Signature(User user) {
		this.user = user;
	}

	public List<IAcquisition> getAcquisitions() {
		return DB.getInstance().getAllAcquisitions(this);
	}

	public User getUser() {
		return user;
	}
	
	public IAcquisition addAcquisition(boolean isLog) throws SQLException {
		int id = DB.getInstance().addAcquisition(user, isLog);
		return new Acquisition(id, isLog);
	}
	
}
