package com.ecep.contract.controller.company;

import com.ecep.contract.controller.tab.AbstEntityBasedTabSkin;
import com.ecep.contract.controller.tab.TabSkin;
import com.ecep.contract.model.Company;
import com.ecep.contract.service.CompanyService;
import com.ecep.contract.vm.CompanyViewModel;

import javafx.concurrent.Task;

public abstract class AbstCompanyBasedTabSkin
        extends AbstEntityBasedTabSkin<CompanyWindowController, Company, CompanyViewModel>
        implements TabSkin {

    public AbstCompanyBasedTabSkin(CompanyWindowController controller) {
        super(controller);
    }

    protected CompanyService getCompanyService() {
        Task<CompanyService> task = new Task<>() {
            @Override
            protected CompanyService call() throws Exception {
                return controller.getViewModelService();
            }
        };
        return controller.getViewModelService();
    }
}
