diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/ConfTotemHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/ConfTotemHibernateDAO.java index 255dc4a76..7717f9e1d 100644 --- a/src/com/rjconsultores/ventaboletos/dao/hibernate/ConfTotemHibernateDAO.java +++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/ConfTotemHibernateDAO.java @@ -9,16 +9,16 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Repository; -import com.rjconsultores.ventaboletos.dao.CustomDAO; -import com.rjconsultores.ventaboletos.entidad.Custom; +import com.rjconsultores.ventaboletos.dao.ConfTotemDAO; +import com.rjconsultores.ventaboletos.entidad.ConfTotem; /** * * @author Wallace */ @Repository("confTotemDAO") -public class ConfTotemHibernateDAO extends GenericHibernateDAO - implements CustomDAO { +public class ConfTotemHibernateDAO extends GenericHibernateDAO + implements ConfTotemDAO { @Autowired public ConfTotemHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) { @@ -26,19 +26,19 @@ public class ConfTotemHibernateDAO extends GenericHibernateDAO } @Override - public List obtenerTodos() { + public List obtenerTodos() { Criteria c = getSession().createCriteria(getPersistentClass()); c.add(Restrictions.eq("activo", Boolean.TRUE)); return c.list(); } - public Custom buscar(String chave) { + public ConfTotem buscar(String chave) { Criteria c = getSession().createCriteria(getPersistentClass()); c.add(Restrictions.eq("activo", Boolean.TRUE)); 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); } } \ No newline at end of file diff --git a/src/com/rjconsultores/ventaboletos/entidad/ConfTotem.java b/src/com/rjconsultores/ventaboletos/entidad/ConfTotem.java index 4616cf76e..ff66ea38b 100644 --- a/src/com/rjconsultores/ventaboletos/entidad/ConfTotem.java +++ b/src/com/rjconsultores/ventaboletos/entidad/ConfTotem.java @@ -30,7 +30,7 @@ public class ConfTotem implements Serializable { @Column(name = "CONFTOTEM_ID") private Integer confTotemId; @Column(name = "VALOR") - private Boolean valor; + private String valor; @Column(name = "CHAVE") private String chave; @Column(name = "ACTIVO") @@ -75,10 +75,10 @@ public class ConfTotem implements Serializable { return true; } - public Boolean getValor() { + public String getValor() { return valor; } - public void setValor(Boolean valor) { + public void setValor(String valor) { this.valor = valor; } diff --git a/src/com/rjconsultores/ventaboletos/service/impl/ConfTotemServiceImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/ConfTotemServiceImpl.java index d755eb4b5..999c56512 100644 --- a/src/com/rjconsultores/ventaboletos/service/impl/ConfTotemServiceImpl.java +++ b/src/com/rjconsultores/ventaboletos/service/impl/ConfTotemServiceImpl.java @@ -4,6 +4,7 @@ import java.util.Calendar; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; 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.utilerias.UsuarioLogado; +@Service("confTotemService") public class ConfTotemServiceImpl implements ConfTotemService { @Autowired