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-87c2c4800839master
parent
502244a2c7
commit
0ab398e65b
|
@ -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<Custom, Integer>
|
||||
implements CustomDAO {
|
||||
public class ConfTotemHibernateDAO extends GenericHibernateDAO<ConfTotem, Integer>
|
||||
implements ConfTotemDAO {
|
||||
|
||||
@Autowired
|
||||
public ConfTotemHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
|
@ -26,19 +26,19 @@ public class ConfTotemHibernateDAO extends GenericHibernateDAO<Custom, Integer>
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<Custom> obtenerTodos() {
|
||||
public List<ConfTotem> 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);
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue