fixes bug#15119

qua:
dev:lucas

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@97755 d1611594-4594-4d17-8e1d-87c2c4800839
master
walace 2019-09-20 22:09:02 +00:00
parent 502244a2c7
commit 0ab398e65b
3 changed files with 12 additions and 10 deletions

View File

@ -9,16 +9,16 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.rjconsultores.ventaboletos.dao.CustomDAO; import com.rjconsultores.ventaboletos.dao.ConfTotemDAO;
import com.rjconsultores.ventaboletos.entidad.Custom; import com.rjconsultores.ventaboletos.entidad.ConfTotem;
/** /**
* *
* @author Wallace * @author Wallace
*/ */
@Repository("confTotemDAO") @Repository("confTotemDAO")
public class ConfTotemHibernateDAO extends GenericHibernateDAO<Custom, Integer> public class ConfTotemHibernateDAO extends GenericHibernateDAO<ConfTotem, Integer>
implements CustomDAO { implements ConfTotemDAO {
@Autowired @Autowired
public ConfTotemHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) { public ConfTotemHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
@ -26,19 +26,19 @@ public class ConfTotemHibernateDAO extends GenericHibernateDAO<Custom, Integer>
} }
@Override @Override
public List<Custom> obtenerTodos() { public List<ConfTotem> 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(); return c.list();
} }
public Custom buscar(String chave) { public ConfTotem buscar(String chave) {
Criteria c = getSession().createCriteria(getPersistentClass()); Criteria c = getSession().createCriteria(getPersistentClass());
c.add(Restrictions.eq("activo", Boolean.TRUE)); c.add(Restrictions.eq("activo", Boolean.TRUE));
c.add(Restrictions.ilike("chave", chave)); c.add(Restrictions.ilike("chave", chave));
return c.list().isEmpty() ? null : (Custom) c.list().get(0); return c.list().isEmpty() ? null : (ConfTotem) c.list().get(0);
} }
} }

View File

@ -30,7 +30,7 @@ public class ConfTotem implements Serializable {
@Column(name = "CONFTOTEM_ID") @Column(name = "CONFTOTEM_ID")
private Integer confTotemId; private Integer confTotemId;
@Column(name = "VALOR") @Column(name = "VALOR")
private Boolean valor; private String valor;
@Column(name = "CHAVE") @Column(name = "CHAVE")
private String chave; private String chave;
@Column(name = "ACTIVO") @Column(name = "ACTIVO")
@ -75,10 +75,10 @@ public class ConfTotem implements Serializable {
return true; return true;
} }
public Boolean getValor() { public String getValor() {
return valor; return valor;
} }
public void setValor(Boolean valor) { public void setValor(String valor) {
this.valor = valor; this.valor = valor;
} }

View File

@ -4,6 +4,7 @@ import java.util.Calendar;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -12,6 +13,7 @@ import com.rjconsultores.ventaboletos.entidad.ConfTotem;
import com.rjconsultores.ventaboletos.service.ConfTotemService; import com.rjconsultores.ventaboletos.service.ConfTotemService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
@Service("confTotemService")
public class ConfTotemServiceImpl implements ConfTotemService { public class ConfTotemServiceImpl implements ConfTotemService {
@Autowired @Autowired