package com.ecep.contract.controller.contract;

import java.util.HashMap;
import java.util.Map;

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.Contract;
import com.ecep.contract.model.IdentityEntity;
import com.ecep.contract.service.ContractService;
import com.ecep.contract.vm.ContractViewModel;
import com.ecep.contract.vm.IdentityViewModel;

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

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

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

    @Override
    public Map<String, Object> getSpecification(Contract parent) {
        Map<String, Object> params = new HashMap<>();
        params.put("contract", parent.getId());
        return params;
    }
}
