package com.senla.bolkunets.autoservice.api.managers;

import java.util.Comparator;
import java.util.Date;
import java.util.List;

import com.senla.bolkunets.autoservice.api.beans.IOrder;
import com.senla.bolkunets.autoservice.api.enums.OrderStatus;


public interface IOrdersManager {
	
	List<IOrder> getOrders();
	
	void addOrder(IOrder order);

	boolean changeOrderStatus(long id, OrderStatus orderStatus);

	List<IOrder> getSortedListProgressOrders(Comparator<IOrder> orderComparator);

	List<IOrder> getSortedListAllOrders(Comparator<IOrder> orderComparator);

	IOrder getOrder(long idMaster);
	
	void setGarageToOrder(long idGarage, long idOrder);
	
	void removeGarageFromOrder(long idOrder);
	
	boolean addMasterToOrder(long idMaster, long idOrder);
	
	void removeMasterFromOrder(long idMaster, long idOrder);

	List<IOrder> getOrders(OrderStatus status, Date dateLeft, Date dateRight, Comparator<IOrder> comp);

	public int getCountFreePlace(Date date);

	Date getNextFreeDate();

	void shiftOrders(long orderId, int countDay);
	
	void save();
}
