package com.ecep.contract.controller.table.cell;

import static com.ecep.contract.SpringApp.getBean;

import com.ecep.contract.model.Project;
import com.ecep.contract.service.IEntityService;
import com.ecep.contract.service.ProjectService;

import lombok.NoArgsConstructor;

@NoArgsConstructor
public class ProjectTableCell<V> extends AsyncUpdateTableCell<V, Project> {

    public ProjectTableCell(ProjectService projectService) {
        setService(projectService);
    }

    @Override
    protected IEntityService<Project> getServiceBean() {
        return getBean(ProjectService.class);
    }


    @Override
    public String format(Project entity) {
        return entity.toPrettyString();
    }
}
