package com.bankaudit.dao;

import java.util.Collections;
import java.util.List;

import org.hibernate.Query;
import org.hibernate.ScrollMode;
import org.hibernate.ScrollableResults;
import org.hibernate.Session;
import org.hibernate.transform.Transformers;
import org.springframework.stereotype.Repository;

import com.bankaudit.dto.DataTableResponse;
import com.bankaudit.model.RiskScoreAuditGrp;
import com.bankaudit.model.RiskScoreAuditSubgrp;
import com.bankaudit.util.BankAuditUtil;

import java.util.ArrayList;

@Repository("riskScoreAuditSubgrpDao")
public class RiskScoreAuditSubgrpDaoImpl extends AbstractDao implements RiskScoreAuditSubgrpDao {

	@Override
	public void deleteByLegalEntityCodeAndAuditTypeCodeAndAuditGroupCode(Integer legalEntityCode, String auditTypeCode,
			String auditGroupCode) {

		Session session=getSession();
		
		session.createQuery("delete from RiskScoreAuditSubgrp where "
				+ " legalEntityCode =:legalEntityCode "
				+ " and auditTypeCode =:auditTypeCode "
				+ " and auditGroupCode =:auditGroupCode ")
		.setParameter("legalEntityCode", legalEntityCode)
		.setParameter("auditTypeCode",auditTypeCode)
		.setParameter("auditGroupCode",auditGroupCode).executeUpdate();
	}



	
}
