package com.bankaudit.dao;

import org.hibernate.Session;
import org.springframework.stereotype.Repository;

@Repository("maintLegalEntityDao")
public class MaintLegalEntityDaoImpl extends AbstractDao implements MaintLegalEntityDao {

	@Override
	public void updateEntityStatus(Integer legalEntityCode, String entityStatus) {
		
		
		Session session=getSession();
		
		session.createQuery("update MaintLegalEntity le "
				+ " set le.entityStatus =:entityStatus ,"
				+ "  le.sysdateTimestamp =:sysdateTimestamp"
				+ " where le.legalEntityCode =:legalEntityCode")
		.setParameter("legalEntityCode", legalEntityCode)
		.executeUpdate();
		
		
	}

}
