fixed bug #7337 - alterações relatório gratuidade

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@54925 d1611594-4594-4d17-8e1d-87c2c4800839
master
frederico 2016-04-14 17:43:49 +00:00
parent 56dd82f638
commit 0901a7509b
4 changed files with 22 additions and 0 deletions

View File

@ -1,6 +1,10 @@
package com.rjconsultores.ventaboletos.dao; package com.rjconsultores.ventaboletos.dao;
import java.util.List;
import com.rjconsultores.ventaboletos.entidad.GrupoCategoria; import com.rjconsultores.ventaboletos.entidad.GrupoCategoria;
public interface GrupoCategoriaDAO extends GenericDAO<GrupoCategoria, Integer> { public interface GrupoCategoriaDAO extends GenericDAO<GrupoCategoria, Integer> {
public List<GrupoCategoria> buscar(String descricao);
} }

View File

@ -25,6 +25,15 @@ public class GrupoCategoriaHibernateDAO extends GenericHibernateDAO<GrupoCategor
public List<GrupoCategoria> obtenerTodos() { public List<GrupoCategoria> obtenerTodos() {
Criteria c = getSession().createCriteria(getPersistentClass()); Criteria c = getSession().createCriteria(getPersistentClass());
c.add(Restrictions.eq("activo", Boolean.TRUE)); c.add(Restrictions.eq("activo", Boolean.TRUE));
return c.list();
}
@SuppressWarnings("unchecked")
@Override
public List<GrupoCategoria> buscar(String descricao) {
Criteria c = getSession().createCriteria(getPersistentClass());
c.add(Restrictions.eq("activo", Boolean.TRUE));
c.add(Restrictions.eq("descGrupo", descricao));
return c.list(); return c.list();
} }

View File

@ -1,6 +1,10 @@
package com.rjconsultores.ventaboletos.service; package com.rjconsultores.ventaboletos.service;
import java.util.List;
import com.rjconsultores.ventaboletos.entidad.GrupoCategoria; import com.rjconsultores.ventaboletos.entidad.GrupoCategoria;
public interface GrupoCategoriaService extends GenericService<GrupoCategoria, Integer> { public interface GrupoCategoriaService extends GenericService<GrupoCategoria, Integer> {
public List<GrupoCategoria> buscar(String descricao);
} }

View File

@ -52,4 +52,9 @@ public class GrupoCategoriaServiceImpl implements GrupoCategoriaService {
grupoCategoriaDAO.actualizacion(entidad); grupoCategoriaDAO.actualizacion(entidad);
} }
@Override
public List<GrupoCategoria> buscar(String descricao) {
return grupoCategoriaDAO.buscar(descricao);
}
} }