package com.rjconsultores.ventaboletos.dao.hibernate; import org.hibernate.SessionFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Repository; import com.rjconsultores.ventaboletos.dao.RutaCasetaDAO; import com.rjconsultores.ventaboletos.dao.RutaDAO; import com.rjconsultores.ventaboletos.entidad.RutaCaseta; @Repository("rutaCasetaDAO") public class RutaCasetaHibernateDAO extends GenericHibernateDAO implements RutaCasetaDAO { @Autowired public RutaCasetaHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) { setSessionFactory(factory); } public void deletarRutaCasetasFromRutaSecuenciaId(Integer id){ this.getSession().createQuery("DELETE from RutaCaseta rc WHERE rc.rutaSecuencia.rutasecuenciaId = "+id+" ").executeUpdate(); } }