package com.ecep.contract.controller.contract;

import com.ecep.contract.controller.tab.TabSkin;
import com.ecep.contract.controller.table.AbstEntityTableTabSkin;
import com.ecep.contract.controller.table.TableOfTabSkin;

import com.ecep.contract.model.IdentityEntity;
import com.ecep.contract.service.ContractService;
import com.ecep.contract.util.ParamUtils;
import com.ecep.contract.vm.ContractViewModel;
import com.ecep.contract.vm.IdentityViewModel;
import com.ecep.contract.vo.ContractVo;

public abstract class AbstContractTableTabSkin<T extends IdentityEntity, TV extends IdentityViewModel<T>>
        extends AbstEntityTableTabSkin<ContractWindowController, ContractVo, ContractViewModel, T, TV>
        implements TabSkin, TableOfTabSkin<ContractVo, T, TV> {

    public AbstContractTableTabSkin(ContractWindowController controller) {
        super(controller);
    }

    public ContractService getContractService() {
        return controller.getViewModelService();
    }

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