diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/EstacionHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/EstacionHibernateDAO.java index 77af646e1..bdefe6687 100644 --- a/src/com/rjconsultores/ventaboletos/dao/hibernate/EstacionHibernateDAO.java +++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/EstacionHibernateDAO.java @@ -30,6 +30,7 @@ import com.rjconsultores.ventaboletos.entidad.Usuario; * @author Administrador */ @Repository("estacionDAO") +@SuppressWarnings({"unchecked", "rawtypes"}) public class EstacionHibernateDAO extends GenericHibernateDAO implements EstacionDAO { @Autowired @@ -187,7 +188,6 @@ public class EstacionHibernateDAO extends GenericHibernateDAO } - @SuppressWarnings("unchecked") @Override public List buscarEstaciones(List lsPuntoVenta) { @@ -214,7 +214,6 @@ public class EstacionHibernateDAO extends GenericHibernateDAO return c.list(); } - @SuppressWarnings("unchecked") public Estacion buscarEstacionDuplicada(String descMac, Integer estacionId) { StringBuilder sQuery = new StringBuilder(); sQuery.append("SELECT e ") diff --git a/src/com/rjconsultores/ventaboletos/service/impl/EstacionServiceImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/EstacionServiceImpl.java index f6800ab86..cfc805ff9 100644 --- a/src/com/rjconsultores/ventaboletos/service/impl/EstacionServiceImpl.java +++ b/src/com/rjconsultores/ventaboletos/service/impl/EstacionServiceImpl.java @@ -62,9 +62,17 @@ public class EstacionServiceImpl implements EstacionService { esMacDuplicado = Boolean.TRUE; } if (esMacDuplicado) { - throw new BusinessException(Labels.getLabel("estacionServiceImpl.msg.macDuplicado") + "\n" - + Labels.getLabel("estacionServiceImpl.msg.macDuplicado.descricaoEstacao") + nomeEstacao + "\n" - + Labels.getLabel("estacionServiceImpl.msg.macDuplicado.numeroCaixa") + numeroCaixa, Boolean.TRUE); + + StringBuilder msg = new StringBuilder(); + msg.append( Labels.getLabel("estacionServiceImpl.msg.macDuplicado") ); + msg.append( "\n" ); + msg.append( Labels.getLabel("estacionServiceImpl.msg.macDuplicado.descricaoEstacao") ); + msg.append( nomeEstacao ); + msg.append( "\n" ); + msg.append( Labels.getLabel("estacionServiceImpl.msg.macDuplicado.numeroCaixa") ); + msg.append( numeroCaixa.toString() ); + + throw new BusinessException( msg.toString()); } boolean esCajaDuplicado = false;