package com.bankaudit.dao;

import java.util.List;
import java.util.Map;

import com.bankaudit.dto.DataTableResponse;
import com.bankaudit.model.MaintEntity;

public interface MaintEntityDao extends Dao {

	MaintEntity getUnique(Integer legalEntityCode, String unitCode,String status);

	DataTableResponse getMaintEntity(Integer legalEntityCode, String levelCodeStr,String userId,String parentUnitCode, String search, Integer orderColumn,
			String orderDirection, Integer page, Integer size);

	List<MaintEntity> getMaintEntityByLegalEntityCodeAndLevelCode(Integer legalEntityCode, String levelCode);

	Boolean isHeadUser(Integer legalEntityCode, String userId, String unitCode);

	void deleteMaintEntity(Integer legalEntityCode, String unitCode);

	void deleteMaintEntityWrk(Integer legalEntityCode, String unitCode);

	Boolean isMaintEntity(Integer legalEntityCode, String unitCode);

	Boolean isChildUnitActivated(Integer legalEntityCode, String unitCode);

	public List<MaintEntity> getSubBranchesGyUserIdOrUnitId(Integer legalEntityCode,String role,String type,String userIdOrUnitId);

	List<MaintEntity> getImmediateChild(Integer legalEntityCode, String unitCode);

	List<String> getSubBranchesGyUserIdOrUnitId(Integer legalEntityCode, String type, String userIdOrUnitId);
	
	List<MaintEntity> getMaintEntityByLEAndUser(Integer legalEntityCode,String role,List<String> unitLst);
	
	Map<String, String> getRiskManagerDetails(Integer legalEntityCode, String userId, String role, String unitCode);
	
	List<MaintEntity> getEntityByLevelAndNotInGrpEntityMapping (Integer legalEntityCode, String levelCode, String status);

	List<MaintEntity> getMaintEntityByLegalEntityCodeAndAuditTypeCode(Integer legalEntityCode, String auditTypeCode);
	
	MaintEntity getUnitDetails(int legalEntityCode, String unitId);
	
	List<MaintEntity> getUnitCodes(Integer legalEntityCode, String userId, String role);
	
	List<MaintEntity> getEntityForPlanLevel(Integer legalEntityCode, String userId, String levelCode);

    MaintEntity getUnitDetailsByUnitId(int legalEntityCode, String unitId);

	void saveMaintEntity(Integer legalEntityCode, String userId, Integer uploadDocId);
	
	String getLicenseeCodeForUnitCode(Integer legalEntityCode, String unitCode);

}
