package com.ecep.contract.controller.project.sale_type;

import java.util.Map;

import com.ecep.contract.controller.tab.TabSkin;
import com.ecep.contract.controller.table.AbstEntityTableTabSkin;
import com.ecep.contract.model.IdentityEntity;
import com.ecep.contract.model.ProjectSaleType;
import com.ecep.contract.service.SaleTypeService;
import com.ecep.contract.vm.IdentityViewModel;
import com.ecep.contract.vm.ProjectSaleTypeViewModel;

public abstract class AbstProjectSaleTypeTableTabSkin<T extends IdentityEntity, TV extends IdentityViewModel<T>>
        extends AbstEntityTableTabSkin<ProjectSaleTypeWindowController, ProjectSaleType,ProjectSaleTypeViewModel, T, TV>
        implements TabSkin {

    public AbstProjectSaleTypeTableTabSkin(ProjectSaleTypeWindowController controller) {
        super(controller);
    }

    public SaleTypeService getSaleTypeService() {
        return controller.saleTypeService;
    }

    @Override
    public Map<String, Object> getSpecification(ProjectSaleType parent) {
        Map<String, Object> params = getSpecification();
        params.put("saleType", parent.getId());
        return params;
    }
}
