package com.ecep.contract.controller.vendor;

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.service.CompanyService;
import com.ecep.contract.service.CompanyVendorService;
import com.ecep.contract.util.ParamUtils;
import com.ecep.contract.vm.CompanyVendorViewModel;
import com.ecep.contract.vm.IdentityViewModel;
import com.ecep.contract.vo.CompanyVendorVo;

public abstract class AbstCompanyVendorTableTabSkin<T extends IdentityEntity, TV extends IdentityViewModel<T>>
        extends AbstEntityTableTabSkin<CompanyVendorWindowController, CompanyVendorVo, CompanyVendorViewModel, T, TV>
        implements TabSkin {
    public AbstCompanyVendorTableTabSkin(CompanyVendorWindowController controller) {
        super(controller);
    }

    public CompanyService getCompanyService() {
        return controller.getCompanyService();
    }

    public CompanyVendorService getCompanyVendorService() {
       return getCachedBean(CompanyVendorService.class);
    }

    @Override
    public ParamUtils.Builder getSpecification(CompanyVendorVo parent) {
        ParamUtils.Builder params = getSpecification();
        params.equals("vendor", parent.getId());
        return params;
    }
}
