W2i - Parametrizar Serie por Empresa (fixed bug #5522)

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@36881 d1611594-4594-4d17-8e1d-87c2c4800839
master
leonardo 2014-07-29 18:11:20 +00:00
parent cdd93ae5b7
commit 0284c6df57
4 changed files with 5 additions and 6 deletions

View File

@ -4,5 +4,5 @@ import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.SeguradoraEmpresa;
public interface SeguradoraEmpresaDAO extends GenericDAO<SeguradoraEmpresa, Integer> {
public boolean existe(Empresa empresa, String serie);
public boolean existe(Empresa empresa);
}

View File

@ -28,11 +28,10 @@ public class SeguradoraEmpresaHibernateDAO extends GenericHibernateDAO<Segurador
return c.list();
}
public boolean existe(Empresa empresa, String serie){
public boolean existe(Empresa empresa){
Criteria c = makeCriteria();
c.add(Restrictions.eq("activo", Boolean.TRUE));
c.add(Restrictions.eq("empresa", empresa));
c.add(Restrictions.eq("serie", serie));
return !c.list().isEmpty();
}

View File

@ -4,6 +4,6 @@ import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.SeguradoraEmpresa;
public interface SeguradoraEmpresaService extends GenericService<SeguradoraEmpresa, Integer>{
public boolean existe(Empresa empresa, String serie);
public boolean existe(Empresa empresa);
}

View File

@ -27,8 +27,8 @@ public class SeguradoraEmpresaServiceImpl implements SeguradoraEmpresaService {
return seguradoraEmpresaDAO.obtenerID(id);
}
public boolean existe(Empresa empresa, String serie){
return seguradoraEmpresaDAO.existe(empresa, serie);
public boolean existe(Empresa empresa){
return seguradoraEmpresaDAO.existe(empresa);
}
@Transactional