From: maroni Date: Thu, 15 Mar 2012 04:24:07 +0000 (-0300) Subject: (no commit message) X-Git-Url: http://200.18.67.61/gitweb/?a=commitdiff_plain;h=3c6b9f2e020ab076e2b7222a66f970feec41c69c;p=simdecs2.git --- diff --git a/src/conf/persistence.xml b/src/conf/persistence.xml index 9ccec6b..682a3c9 100644 --- a/src/conf/persistence.xml +++ b/src/conf/persistence.xml @@ -5,7 +5,7 @@ jdbc/SimDeCS org.ufcspa.simdecs.entities.Caso org.ufcspa.simdecs.entities.DependenciaNodo - org.ufcspa.simdecs.entities.IntervaloTabelaRespota + org.ufcspa.simdecs.entities.IntervaloTabelaResposta org.ufcspa.simdecs.entities.Log org.ufcspa.simdecs.entities.Nodo org.ufcspa.simdecs.entities.NodoPaciente diff --git a/src/java/org/ufcspa/simdecs/comunicacao/MetodoIniciaCaso.java b/src/java/org/ufcspa/simdecs/comunicacao/MetodoIniciaCaso.java index 652d968..00e24e6 100644 --- a/src/java/org/ufcspa/simdecs/comunicacao/MetodoIniciaCaso.java +++ b/src/java/org/ufcspa/simdecs/comunicacao/MetodoIniciaCaso.java @@ -75,14 +75,14 @@ public class MetodoIniciaCaso extends HttpServlet { for(RespostaNodo resposta : respostas) { if (i++ == random) { - List listaInt = em.createQuery("From IntervaloTabelaResposta Where tabelaResposta.id=:pIdTabela and :pProbabilidade between pesoInicial and pesoFinal") + List listaInt = em.createQuery("From IntervaloTabelaResposta Where tabelaResposta.id=:pIdTabela and :pProbabilidade between pesoInicial and pesoFinal") .setParameter("pIdTabela", resposta.getTabelaResposta().getId()) .setParameter("pProbabilidade", nodoBean.getPercentualProbabilidade()) .getResultList(); int randomInt = (int) (1+Math.random()*listaInt.size()); int x=1; - for(IntervaloTabelaRespota intervalo : listaInt) { + for(IntervaloTabelaResposta intervalo : listaInt) { if (x++ == random) return resposta.getTexto().replaceAll("&&tabela", intervalo.getTexto()); } diff --git a/src/java/org/ufcspa/simdecs/entities/IntervaloTabelaRespota.java b/src/java/org/ufcspa/simdecs/entities/IntervaloTabelaResposta.java similarity index 92% rename from src/java/org/ufcspa/simdecs/entities/IntervaloTabelaRespota.java rename to src/java/org/ufcspa/simdecs/entities/IntervaloTabelaResposta.java index deb341a..c405dd2 100644 --- a/src/java/org/ufcspa/simdecs/entities/IntervaloTabelaRespota.java +++ b/src/java/org/ufcspa/simdecs/entities/IntervaloTabelaResposta.java @@ -13,7 +13,7 @@ import javax.persistence.*; */ @Entity @Table(name="INTERVALO_TABELA_REPOSTA") -public class IntervaloTabelaRespota implements Serializable { +public class IntervaloTabelaResposta implements Serializable { private static final long serialVersionUID = 1L; @Id @SequenceGenerator(name="seqIntervaloTabelaResposta", sequenceName="SQ_INTERVALO_TABELA_RESPOSTA") @@ -84,10 +84,10 @@ public class IntervaloTabelaRespota implements Serializable { @Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set - if (!(object instanceof IntervaloTabelaRespota)) { + if (!(object instanceof IntervaloTabelaResposta)) { return false; } - IntervaloTabelaRespota other = (IntervaloTabelaRespota) object; + IntervaloTabelaResposta other = (IntervaloTabelaResposta) object; if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { return false; } diff --git a/web/login.xhtml b/web/login.xhtml index 7eb0c30..4b3dd0c 100644 --- a/web/login.xhtml +++ b/web/login.xhtml @@ -33,7 +33,7 @@

- +