Por favor, aceda a www.siprp.pt, separador colaboradores em 'Acesso à Gestão de Análises de Acidentes de Trabalho' e prossiga com a gestão do processo " + a.getAnalise_nr() + ".
";
+
+ System.out.println( "Sending mail to next user." );
+
+ String responsavel_loja = "n";
+ switch (estado.intValue())
+ {
+ case Global.ESTADO_RH1:
+ tipo = new Integer(Global.TIPO_UTILIZADOR_RH);
+ break;
+ case Global.ESTADO_HS:
+ tipo = new Integer(Global.TIPO_UTILIZADOR_HS);
+ break;
+ case Global.ESTADO_RH2:
+ tipo = new Integer(Global.TIPO_UTILIZADOR_RH);
+ break;
+ case Global.ESTADO_CONSOLIDACAO:
+ tipo = new Integer(Global.TIPO_UTILIZADOR_HS);
+ break;
+ case Global.ESTADO_ASSINATURA_SEG:
+ tipo =new Integer(Global.TIPO_UTILIZADOR_SEGURANCA);
+ responsavel_loja = "y";
+ break;
+ case Global.ESTADO_ASSINATURA_RH:
+ tipo = new Integer(Global.TIPO_UTILIZADOR_RH);
+ responsavel_loja = "y";
+ break;
+ case Global.ESTADO_FECHAR:
+ tipo = new Integer(Global.TIPO_UTILIZADOR_HS);
+ break;
+ }
+
+// if(estado.intValue() == Global.ESTADO_FECHAR)
+// {
+// tipo = new Integer(Global.TIPO_UTILIZADOR_HS); // hs
+// }
+// else
+// {
+// tipo = estado;
+// }
+
+ UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
+ try
+ {
+ ArrayList list = udp.getUtilizadoresListByTipo(tipo, responsavel_loja, a.getEstabelecimento_id());
+ ListIterator iter = list.listIterator();
+ while(iter.hasNext())
+ {
+ Utilizador u = (Utilizador) iter.next();
+ System.out.println("USER MAIL NEXT FASE : " + u.getLogin() + " ; " + u.getEmail());
+ try
+ {
+ //sendEmail(u.getEmail(), Global.ENDERECO_ENVIO, assunto, texto_email);
+ sendEmailWithPdf(a, u.getEmail(), Global.ENDERECO_ENVIO, assunto, texto_email);
+ }
+ catch(Exception ex1)
+ {
+ ex1.printStackTrace();
+ System.out.println("MAIL ERROR : " + ex1.getMessage());
+ }
+
+ }
+ }
+ catch(Exception ex)
+ {
+ //ex.printStackTrace();
+ }
+
+ }
+
+ private void sendEmailResponsavelHierarquico(AnaliseAcidente a)
+ {
+ Acidentado ac = getSessionBean1().getAcidentado();
+ String assunto = "Comunicação de Análise de Acidentes de Trabalho de " + ac.getNome();
+
+ String data_acidente = "";
+ try
+ {
+ java.util.Date ddate = new java.util.Date(a.getData_acidente().getTime());
+ data_acidente = utils.Utils.dateToYYYYMMDD(ddate);
+ }
+ catch(Exception ex){}
+
+ String texto_email = "Na sequência do acidente de trabalho do colaborador ";
+ texto_email += ac.getNome();
+ texto_email += " no dia " + data_acidente;
+ texto_email += ", vimos pelo presente remeter cópia da análise do acidente " + a.getAnalise_nr() + " que se encontra em processo de averiguação pelo departamento de Segurança, Recursos Humanos e pela SIPRP para seu conhecimento. Caso tenha qualquer informação importante sobre o processo ou pretenda esclarecimentos adicionais contacte, por favor, a secção de Recursos Humanos.
";
+ texto_email += "Cumprimentos.
";
+ try
+ {
+ sendEmailWithPdf(a, ac.getEmail_superior_hierarquico(), Global.ENDERECO_ENVIO, assunto, texto_email );
+ //sendEmail(ac.getEmail_superior_hierarquico(), Global.ENDERECO_ENVIO, assunto, texto_email);
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+
+ private void sendEmailFimProcesso(AnaliseAcidente a)
+ {
+ Acidentado ac = getSessionBean1().getAcidentado();
+ String assunto = "Fecho do Processo de Análise de Acidente de Trabalho de " + ac.getNome();
+ UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
+ ArrayList responsavelRh_list = udp.getResponsavelRhList( a.getEstabelecimento_id() );
+ if(responsavelRh_list != null)
+ {
+ ListIterator iter = responsavelRh_list.listIterator();
+ while(iter.hasNext())
+ {
+ Utilizador u = (Utilizador) iter.next();
+ String texto_email = "Exmo. (a) Senhor(a), " + u.getNome() + "
";
+ texto_email += "Informamos que o processo de análise de acidente de trabalho nº " + a.getAnalise_nr() + " se encontra finalizado, ";
+ texto_email += "pelo que solicitamos a sua impressão e arquivamento em pasta própria, juntamente com a participação de sinistro à seguradora.
";
+ texto_email += "Caso pretenda qualquer esclarecimento, contacte-nos, por favor, através de acidentes.auchan@siprp.pt ou pelo telefone 213 504 540.
";
+ texto_email += "Os melhores cumprimentos.
";
+ texto_email += "Exmo. (a) Senhor(a),
";
+ texto_email += "Confirmamos que o processo de Análise de Acidente de Trabalho nº " + a.getAnalise_nr()+ " se encontra encerrado após o preenchimento e validação de todos os intervenientes.
";
+ texto_email += "Sugerimos que imprima o ficheiro que enviamos em anexo e o junte à Participação de Sinistro à Seguradora para dar conhecimento ao Médico do Trabalho do seu estabelecimento. Após o seu conhecimento, aconselhamos que entregue uma cópia da Ficha de Análise de Acidente de Trabalho à equipa de Saúde Ocupacional, para que esta a arquive no processo clínico do trabalhador antes de juntar toda a documentação no processo individual do colaborador nos Recursos Humanos.
";
+ texto_email += "Agradecemos a sua colaboração e ficamos ao dispor para qualquer esclarecimento através dos telefones 213 504 544 (Catarina Leonardo) ou 213 504 542 (Sónia Campos).
";
+ texto_email += " 0)
+ {
+ booNrOk = true;
+ }
+ else
+ {
+ nr_mecano = null;
+ }
+ }
+
+ if(txtNomeTrabalhador.getText() != null)
+ {
+ nome = (String) txtNomeTrabalhador.getText();
+ if(nome.trim().length() > 0)
+ {
+ booNomeOk = true;
+ }
+ else
+ {
+ nome = null;
+ }
+ }
+
+ if(! booNrOk && !booNomeOk)
+ {
+ getSessionBean1().setMsg("Tem de preencher Numero Mecanográfico ou Nome");
+ return null;
+ }
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ Trabalhador t = null;
+ if(nome != null)
+ {
+ nome = utils.Utils.textToUnicode( nome.toUpperCase());
+ }
+ try
+ {
+ ArrayList list = adp.searchTrabalhador(getSessionBean1().getCurrentUser().getEmpresa_id(), getSessionBean1().getCurrentUser().getEstabelecimento_id(), nr_mecano, nome );
+ if(list.size() == 1)
+ {
+ t = (Trabalhador) list.get(0);
+ txtTrabalhador.setText(t.getNome());
+ txtNomeAcidentado.setText(t.getNome());
+ txtDataNascimento.setText(t.getData_nascimento());
+ Acidentado a = new Acidentado();
+ a.setTrabalhador_id(t.getId());
+ a.setData_nascimento(t.getData_nascimento());
+ a.setNome(t.getNome());
+ a.setFuncao(utils.Utils.unicodeToHTML(t.getFuncao()));
+ a.setData_admissao(t.getData_admissao());
+ a.setNumero_mecanografico(t.getNumero_mecanografico());
+ getSessionBean1().setAcidentado(a);
+ gridSiprp.setRendered(true);
+ gridDadosAcidenteSeg.setRendered(true);
+ gridTrabalhadores.setRendered(false);
+ }
+ else
+ {
+ tblTrabalhadores.setRendered(true);
+ getSessionBean1().getTrabalhadoresListDataProvider().setList(list);
+ }
+ if(getSessionBean1().getCurrentAnalise() != null) // new analise)
+ {
+ gridTrabalhadores.setRendered(false);
+ }
+ }
+ catch(Exception ex)
+ {
+ getSessionBean1().setMsg("Trabalhador inexistente ! ");
+ tblTrabalhadores.setRendered(false);
+ txtTrabalhador.setText("");
+ gridSiprp.setRendered(false);
+ gridDadosAcidenteSeg.setRendered(false);
+ ex.printStackTrace();
+ }
+
+ return null;
+ }
+
+ public String lnkPOR_action() {
+ // TODO: Replace with your code
+ getSessionBean1().setIeBug(true);
+ Trabalhador t = getTrabalhadorRowData();
+ Acidentado ac = setAcidentado(t);
+ gridSiprp.setRendered(true);
+ gridAcidentadoView.setRendered(true);
+ gridDadosAcidenteSeg.setRendered(true);
+ gridTrabalhadores.setRendered(false);
+ fillAcidentadoView(ac);
+ return null;
+ }
+
+ public String lnkNomeTrabalhador_action() {
+ // TODO: Replace with your code
+ getSessionBean1().setIeBug(true);
+ Trabalhador t = getTrabalhadorRowData();
+ Acidentado ac = setAcidentado(t);
+ gridSiprp.setRendered(true);
+ gridAcidentadoView.setRendered(true);
+ gridDadosAcidenteSeg.setRendered(true);
+ gridTrabalhadores.setRendered(false);
+ fillAcidentadoView(ac);
+ return null;
+ }
+
+ public String lnkEstabelecimentoTrabalhador_action() {
+ // TODO: Replace with your code
+ getSessionBean1().setIeBug(true);
+ Trabalhador t = getTrabalhadorRowData();
+ Acidentado ac = setAcidentado(t);
+ gridSiprp.setRendered(true);
+ gridAcidentadoView.setRendered(true);
+ gridDadosAcidenteSeg.setRendered(true);
+ gridTrabalhadores.setRendered(false);
+ fillAcidentadoView(ac);
+ return null;
+ }
+
+ private Trabalhador getTrabalhadorRowData()
+ {
+ RowKey rk = tableRowGroup1.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ TrabalhadoresListDataProvider provider = (TrabalhadoresListDataProvider) tableRowGroup1.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ Trabalhador t = (Trabalhador)list.get(k);
+ return t;
+ }
+
+ private Acidentado setAcidentado(Trabalhador t)
+ {
+ txtTrabalhador.setText(t.getNome());
+ txtNomeAcidentado.setText(t.getNome());
+ txtDataNascimento.setText(t.getData_nascimento());
+ Acidentado a = new Acidentado();
+ a.setTrabalhador_id(t.getId());
+ a.setData_nascimento(t.getData_nascimento());
+ a.setNome(t.getNome());
+ a.setMorada("");
+ a.setFuncao(utils.Utils.unicodeToHTML(t.getFuncao()));
+ a.setData_admissao(t.getData_admissao());
+ a.setNumero_mecanografico(t.getNumero_mecanografico());
+ a.setEstabelecimento_origem(t.getEstabelecimento());
+ getSessionBean1().setAcidentado(a);
+ return a;
+ }
+
+ public String butCorrecao_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+ getSessionBean1().setIeBug(true);
+ getSessionBean1().setCorrecao(null);
+ return "correcao";
+ }
+
+ public String lnkNewUser_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ private boolean isRecomendacoesEmpty()
+ {
+ boolean res = true;
+
+ for(int i=0; i < gridRecomendacoes.getChildren().size(); i++)
+ {
+ HtmlPanelGrid g = (HtmlPanelGrid) gridRecomendacoes.getChildren().get(i);
+ TextArea t = (TextArea) g.getChildren().get(1);
+ if(t.getText() != null)
+ {
+ String txt = (String) t.getText();
+ if(txt.trim().length() > 0)
+ {
+ res = false;
+ break;
+ }
+ }
+ }
+
+ return res;
+ }
+
+ private boolean isMedidasEmpty()
+ {
+ boolean res = true;
+
+ for(int i=0; i < gridMedidas.getChildren().size(); i++)
+ {
+ HtmlPanelGrid g = (HtmlPanelGrid) gridMedidas.getChildren().get(i);
+ TextArea t = (TextArea) g.getChildren().get(1);
+ if(t.getText() != null)
+ {
+ String txt = (String) t.getText();
+ if(txt.trim().length() > 0)
+ {
+ res = false;
+ break;
+ }
+ }
+ }
+
+ return res;
+ }
+
+ public void drpDepartamento_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ Integer departamento_id = (Integer) drpDepartamento.getSelected();
+ try
+ {
+ if(departamento_id.intValue()== 0)
+ {
+ getSessionBean1().setSeccaoOptions(adp.getSeccoesList(null));
+ }
+ else
+ {
+ getSessionBean1().setSeccaoOptions(adp.getSeccoesList(departamento_id));
+ }
+
+ drpSeccao.setSelected(new Integer(0));
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ hidAnchor.setValue("dados");
+ }
+
+ public String lnkAjuda_action() {
+ // TODO: Replace with your code
+// ServletContext theApplicationsServletContext =
+// (ServletContext) this.getExternalContext().getContext();
+// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL);
+// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf";
+//
+// Global global = new Global();
+// try
+// {
+// global.showPdf(pdfFilePath);
+// }
+// catch(Exception ex)
+// {
+// ex.printStackTrace();
+// }
+ getSessionBean1().setIeBug(true);
+ return null;
+ }
+
+ private boolean checkRecomendacoesLen()
+ {
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ HashMap meta = new HashMap();
+ try
+ {
+ meta = adp.getMetaData("recomendacoes");
+ ArrayList list = new ArrayList();
+ ListIterator iter = gridRecomendacoes.getChildren().listIterator();
+ while(iter.hasNext())
+ {
+ HtmlPanelGrid grd = (HtmlPanelGrid)iter.next();
+ TextArea ta = (TextArea) grd.getChildren().get(1);
+ if(ta.getText() != null )
+ {
+ String txt = (String) ta.getText();
+ if(txt.length() > 0)
+ {
+ int len = ( (Integer) meta.get("recomendacao") ).intValue();
+ if(txt.length() > len)
+ {
+ getSessionBean1().setMsg("Os Campos Recomendações não podem exceder " + len + " caracteres!");
+ return false;
+ }
+ }
+ }
+ }
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ return false;
+ }
+ return true;
+ }
+
+ private boolean checkMedidasLen()
+ {
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ HashMap meta = new HashMap();
+
+ try
+ {
+ meta = adp.getMetaData("medidas");
+ ArrayList list = new ArrayList();
+ ListIterator iter = gridMedidas.getChildren().listIterator();
+ while(iter.hasNext())
+ {
+ HtmlPanelGrid grd = (HtmlPanelGrid)iter.next();
+ TextArea ta = (TextArea) grd.getChildren().get(1);
+ if(ta.getText() != null )
+ {
+ String txt = (String) ta.getText();
+ if(txt.length() > 0)
+ {
+ int len = ( (Integer) meta.get("medida") ).intValue();
+ if(txt.length() > len)
+ {
+ getSessionBean1().setMsg("Os Campos Medidas não podem exceder " + len + " caracteres!");
+ return false;
+ }
+ }
+ }
+ }
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ return false;
+ }
+
+ return true;
+ }
+
+ public String lnkPlanosActuacao_action() {
+ // TODO: Replace with your code
+ return null;
+ }
+
+}
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/ApplicationBean1.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/ApplicationBean1.java
new file mode 100644
index 00000000..36df6ef2
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/ApplicationBean1.java
@@ -0,0 +1,100 @@
+/*
+ * ApplicationBean1.java
+ *
+ * Created on September 18, 2007, 3:14 PM
+ * Copyright lluis
+ */
+package analiseacidentestrabalho;
+
+import com.sun.rave.web.ui.appbase.AbstractApplicationBean;
+import javax.faces.FacesException;
+
+/**
+ * Application scope data bean for your application. Create properties
+ * here to represent cached data that should be made available to all users
+ * and pages in the application.
+ *
+ * An instance of this class will be created for you automatically,
+ * the first time your application evaluates a value binding expression
+ * or method binding expression that references a managed bean using
+ * this class.
+ */
+public class ApplicationBean1 extends AbstractApplicationBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+ //
+
+ /**
+ * Construct a new application data bean instance.
+ */
+ public ApplicationBean1() {
+ }
+
+ /**
+ * This method is called when this bean is initially added to
+ * application scope. Typically, this occurs as a result of evaluating
+ * a value binding or method binding expression, which utilizes the
+ * managed bean facility to instantiate this bean and store it into
+ * application scope.
+ *
+ * You may customize this method to initialize and cache application wide
+ * data values (such as the lists of valid options for dropdown list
+ * components), or to allocate resources that are required for the
+ * lifetime of the application.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("ApplicationBean1 Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+ }
+
+ /**
+ * This method is called when this bean is removed from
+ * application scope. Typically, this occurs as a result of
+ * the application being shut down by its owning container.
+ *
+ * You may customize this method to clean up resources allocated
+ * during the execution of the init() method, or
+ * at any later time during the lifetime of the application.
+ */
+ public void destroy() {
+ }
+
+ /**
+ * Return an appropriate character encoding based on the
+ * Locale defined for the current JavaServer Faces
+ * view. If no more suitable encoding can be found, return
+ * "UTF-8" as a general purpose default.
+ *
+ * The default implementation uses the implementation from
+ * our superclass, AbstractApplicationBean.
+ */
+ public String getLocaleCharacterEncoding() {
+ return super.getLocaleCharacterEncoding();
+ }
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Bundle.properties b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Bundle.properties
new file mode 100644
index 00000000..13e936fe
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Bundle.properties
@@ -0,0 +1 @@
+# Sample ResourceBundle properties file
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Causa.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Causa.java
new file mode 100644
index 00000000..35f0ef4e
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Causa.java
@@ -0,0 +1,40 @@
+/*
+ * Causa.java
+ *
+ * Created on November 27, 2007, 4:21 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package analiseacidentestrabalho;
+
+/**
+ *
+ * @author lluis
+ */
+public class Causa {
+ private Integer id;
+ private String causa;
+
+ /** Creates a new instance of Causa */
+ public Causa() {
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getCausa() {
+ return causa;
+ }
+
+ public void setCausa(String causa) {
+ this.causa = causa;
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Controle.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Controle.java
new file mode 100644
index 00000000..eecef399
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Controle.java
@@ -0,0 +1,49 @@
+/*
+ * Controle.java
+ *
+ * Created on January 7, 2008, 3:03 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package analiseacidentestrabalho;
+
+/**
+ *
+ * @author lluis
+ */
+public class Controle {
+ private Integer id;
+ private Integer analise_year;
+ private Integer last_analise_nr;
+
+ /** Creates a new instance of Controle */
+ public Controle() {
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public Integer getAnalise_year() {
+ return analise_year;
+ }
+
+ public void setAnalise_year(Integer analise_year) {
+ this.analise_year = analise_year;
+ }
+
+ public Integer getLast_analise_nr() {
+ return last_analise_nr;
+ }
+
+ public void setLast_analise_nr(Integer last_analise_nr) {
+ this.last_analise_nr = last_analise_nr;
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Correcao.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Correcao.java
new file mode 100644
index 00000000..5df8a389
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Correcao.java
@@ -0,0 +1,75 @@
+/*
+ * Correcao.java
+ *
+ * Created on November 29, 2007, 10:42 AM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package analiseacidentestrabalho;
+
+/**
+ *
+ * @author lluis
+ */
+public class Correcao {
+ private Integer analise_id;
+ private String correcao; // 'y'/ 'n'
+ private Integer estado_actual;
+ private Integer estado_corr;
+ private String descricao; //descricao do estado a corrigir
+ private String observacoes;
+ /** Creates a new instance of Correcao */
+ public Correcao() {
+ }
+
+ public Integer getEstado_actual() {
+ return estado_actual;
+ }
+
+ public void setEstado_actual(Integer estado_actual) {
+ this.estado_actual = estado_actual;
+ }
+
+ public Integer getEstado_corr() {
+ return estado_corr;
+ }
+
+ public void setEstado_corr(Integer estado_corr) {
+ this.estado_corr = estado_corr;
+ }
+
+ public String getObservacoes() {
+ return observacoes;
+ }
+
+ public void setObservacoes(String observacoes) {
+ this.observacoes = observacoes;
+ }
+
+ public String getDescricao() {
+ return descricao;
+ }
+
+ public void setDescricao(String descricao) {
+ this.descricao = descricao;
+ }
+
+ public Integer getAnalise_id() {
+ return analise_id;
+ }
+
+ public void setAnalise_id(Integer analise_id) {
+ this.analise_id = analise_id;
+ }
+
+ public String getCorrecao() {
+ return correcao;
+ }
+
+ public void setCorrecao(String correcao) {
+ this.correcao = correcao;
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Departamento.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Departamento.java
new file mode 100644
index 00000000..5fdff6a2
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Departamento.java
@@ -0,0 +1,49 @@
+/*
+ * Departamento.java
+ *
+ * Created on December 28, 2007, 11:16 AM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package analiseacidentestrabalho;
+
+/**
+ *
+ * @author lluis
+ */
+public class Departamento {
+ private Integer id;
+ private String descricao;
+ private String activo;
+
+ /** Creates a new instance of Departamento */
+ public Departamento() {
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getDescricao() {
+ return descricao;
+ }
+
+ public void setDescricao(String descricao) {
+ this.descricao = descricao;
+ }
+
+ public String getActivo() {
+ return activo;
+ }
+
+ public void setActivo(String activo) {
+ this.activo = activo;
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Dummy.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Dummy.java
new file mode 100644
index 00000000..863ff953
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Dummy.java
@@ -0,0 +1,434 @@
+/*
+ * Dummy.java
+ *
+ *
+ * Created on September 19, 2007, 10:56 AM
+ * Copyright lluis
+ */
+package analiseacidentestrabalho;
+
+import com.sun.rave.web.ui.appbase.AbstractPageBean;
+import com.sun.rave.web.ui.component.Body;
+import com.sun.rave.web.ui.component.Button;
+import com.sun.rave.web.ui.component.Form;
+import com.sun.rave.web.ui.component.Head;
+import com.sun.rave.web.ui.component.HiddenField;
+import com.sun.rave.web.ui.component.Html;
+import com.sun.rave.web.ui.component.Hyperlink;
+import com.sun.rave.web.ui.component.ImageComponent;
+import com.sun.rave.web.ui.component.Link;
+import com.sun.rave.web.ui.component.Page;
+import com.sun.rave.web.ui.component.PanelGroup;
+import com.sun.rave.web.ui.component.StaticText;
+import com.sun.rave.web.ui.model.SingleSelectOptionsList;
+import global.Global;
+import java.io.File;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+import javax.faces.FacesException;
+import javax.faces.component.html.HtmlPanelGrid;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.ValueChangeEvent;
+import javax.servlet.ServletContext;
+
+/**
+ * Page bean that corresponds to a similarly named JSP page. This
+ * class contains component definitions (and initialization code) for
+ * all components that you have defined on this page, as well as
+ * lifecycle methods and event handlers where you may add behavior
+ * to respond to incoming events.
+ */
+public class Dummy extends AbstractPageBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+
+ private Page page1 = new Page();
+
+ public Page getPage1() {
+ return page1;
+ }
+
+ public void setPage1(Page p) {
+ this.page1 = p;
+ }
+
+ private Html html1 = new Html();
+
+ public Html getHtml1() {
+ return html1;
+ }
+
+ public void setHtml1(Html h) {
+ this.html1 = h;
+ }
+
+ private Head head1 = new Head();
+
+ public Head getHead1() {
+ return head1;
+ }
+
+ public void setHead1(Head h) {
+ this.head1 = h;
+ }
+
+ private Link link1 = new Link();
+
+ public Link getLink1() {
+ return link1;
+ }
+
+ public void setLink1(Link l) {
+ this.link1 = l;
+ }
+
+ private Body body1 = new Body();
+
+ public Body getBody1() {
+ return body1;
+ }
+
+ public void setBody1(Body b) {
+ this.body1 = b;
+ }
+
+ private Form form1 = new Form();
+
+ public Form getForm1() {
+ return form1;
+ }
+
+ public void setForm1(Form f) {
+ this.form1 = f;
+ }
+
+ private HiddenField hiddenField1 = new HiddenField();
+
+ public HiddenField getHiddenField1() {
+ return hiddenField1;
+ }
+
+ public void setHiddenField1(HiddenField hf) {
+ this.hiddenField1 = hf;
+ }
+
+ private HiddenField hidConfEnviar = new HiddenField();
+
+ public HiddenField getHidConfEnviar() {
+ return hidConfEnviar;
+ }
+
+ public void setHidConfEnviar(HiddenField hf) {
+ this.hidConfEnviar = hf;
+ }
+
+ private HiddenField hidConfDelete = new HiddenField();
+
+ public HiddenField getHidConfDelete() {
+ return hidConfDelete;
+ }
+
+ public void setHidConfDelete(HiddenField hf) {
+ this.hidConfDelete = hf;
+ }
+ private SingleSelectOptionsList dropDown1DefaultOptions = new SingleSelectOptionsList();
+
+ public SingleSelectOptionsList getDropDown1DefaultOptions() {
+ return dropDown1DefaultOptions;
+ }
+
+ public void setDropDown1DefaultOptions(SingleSelectOptionsList ssol) {
+ this.dropDown1DefaultOptions = ssol;
+ }
+ private SingleSelectOptionsList dropDown2DefaultOptions = new SingleSelectOptionsList();
+
+ public SingleSelectOptionsList getDropDown2DefaultOptions() {
+ return dropDown2DefaultOptions;
+ }
+
+ public void setDropDown2DefaultOptions(SingleSelectOptionsList ssol) {
+ this.dropDown2DefaultOptions = ssol;
+ }
+
+ //
+
+ /**
+ * Construct a new Page bean instance.
+ */
+ public Dummy() {
+ }
+
+ /**
+ * Callback method that is called whenever a page is navigated to,
+ * either directly via a URL, or indirectly via page navigation.
+ * Customize this method to acquire resources that will be needed
+ * for event handlers and lifecycle methods, whether or not this
+ * page is performing post back processing.
+ *
+ * Note that, if the current request is a postback, the property
+ * values of the components do not represent any
+ * values submitted with this request. Instead, they represent the
+ * property values that were saved for this view when it was rendered.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("Dummy Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+ }
+
+ /**
+ * Callback method that is called after the component tree has been
+ * restored, but before any event processing takes place. This method
+ * will only be called on a postback request that
+ * is processing a form submit. Customize this method to allocate
+ * resources that will be required in your event handlers.
+ */
+ public void preprocess() {
+ }
+
+ /**
+ * Callback method that is called just before rendering takes place.
+ * This method will only be called for the page that
+ * will actually be rendered (and not, for example, on a page that
+ * handled a postback and then navigated to a different page). Customize
+ * this method to allocate resources that will be required for rendering
+ * this page.
+ */
+ public void prerender() {
+ //txtIn.setText("OLA");
+ }
+
+ /**
+ * Callback method that is called after rendering is completed for
+ * this request, if init() was called (regardless of whether
+ * or not this was the page that was actually rendered). Customize this
+ * method to release resources acquired in the init(),
+ * preprocess(), or prerender() methods (or
+ * acquired during execution of an event handler).
+ */
+ public void destroy() {
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected RequestBean1 getRequestBean1() {
+ return (RequestBean1)getBean("RequestBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected SessionBean1 getSessionBean1() {
+ return (SessionBean1)getBean("SessionBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+
+
+
+ public String butCancelar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ return null;
+ }
+
+ public String butGravar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ return null;
+ }
+
+ public String butEnviar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ return null;
+ }
+
+ public String butImagem_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ return null;
+ }
+
+ public String lnkMoreMed1_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkNome_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkDataNascimento_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkEditUser_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkLogout_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String butProcurarTrab_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ return null;
+ }
+
+ public String lnkPOR_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkNomeTrabalhador_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkEstabelecimentoTrabalhador_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public void drpTipo_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+
+ }
+
+ public void drpNome_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+
+ }
+
+ public String hyperlink1_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public void lnk_actionListener(ActionEvent e)
+ {
+ System.out.println("LINK");
+ }
+
+
+
+// public String lnkAjuda_action() {
+// // TODO: Replace with your code
+// ServletContext theApplicationsServletContext =
+// (ServletContext) this.getExternalContext().getContext();
+// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL);
+// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf";
+//
+// Global global = new Global();
+// try
+// {
+// global.showPdf(pdfFilePath);
+// }
+// catch(Exception ex)
+// {
+// ex.printStackTrace();
+// }
+// return null;
+// }
+
+ public String butVoltar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ return null;
+ }
+
+ public String butEliminar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ return null;
+ }
+
+ public String lnkPlanosActuacao_action() {
+ // TODO: Replace with your code
+ return null;
+ }
+
+ public String lnkAnalisesAcidente_action() {
+ // TODO: Replace with your code
+ return null;
+ }
+
+ public String lnkNewUser_action() {
+ // TODO: Replace with your code
+ return null;
+ }
+
+ public String lnkAjuda_action() {
+ // TODO: Replace with your code
+ return null;
+ }
+
+ public String lnkGerirUtilizadores_action() {
+ // TODO: Replace with your code
+ return null;
+ }
+
+ public String lnkAnalises_action() {
+ // TODO: Replace with your code
+ return null;
+ }
+
+ public String lnkPlanos_action() {
+ // TODO: Replace with your code
+ return null;
+ }
+}
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/EditUser.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/EditUser.java
new file mode 100644
index 00000000..70fe873c
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/EditUser.java
@@ -0,0 +1,22 @@
+/*
+ * EditUser.java
+ *
+ * Created on December 5, 2007, 2:02 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package analiseacidentestrabalho;
+
+/**
+ *
+ * @author lluis
+ */
+public class EditUser extends Utilizador{
+
+ /** Creates a new instance of EditUser */
+ public EditUser() {
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/EnviarCorrecao.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/EnviarCorrecao.java
new file mode 100644
index 00000000..316e2a06
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/EnviarCorrecao.java
@@ -0,0 +1,762 @@
+/*
+ * EnviarCorrecao.java
+ *
+ * Created on November 28, 2007, 5:27 PM
+ * Copyright lluis
+ */
+package analiseacidentestrabalho;
+
+import com.sun.data.provider.RowKey;
+import com.sun.rave.web.ui.appbase.AbstractPageBean;
+import com.sun.rave.web.ui.component.Body;
+import com.sun.rave.web.ui.component.Button;
+import com.sun.rave.web.ui.component.Form;
+import com.sun.rave.web.ui.component.Head;
+import com.sun.rave.web.ui.component.Html;
+import com.sun.rave.web.ui.component.Hyperlink;
+import com.sun.rave.web.ui.component.ImageComponent;
+import com.sun.rave.web.ui.component.Link;
+import com.sun.rave.web.ui.component.Page;
+import com.sun.rave.web.ui.component.PanelGroup;
+import com.sun.rave.web.ui.component.StaticText;
+import com.sun.rave.web.ui.component.Table;
+import com.sun.rave.web.ui.component.TableColumn;
+import com.sun.rave.web.ui.component.TableRowGroup;
+import com.sun.rave.web.ui.component.TextArea;
+import db.AnalisesDataProvider;
+import db.EstadosCorrecaoDataProvider;
+import global.Global;
+import java.util.ArrayList;
+import javax.faces.FacesException;
+import javax.faces.component.html.HtmlPanelGrid;
+import javax.faces.event.ValueChangeEvent;
+import javax.servlet.ServletContext;
+
+/**
+ * Page bean that corresponds to a similarly named JSP page. This
+ * class contains component definitions (and initialization code) for
+ * all components that you have defined on this page, as well as
+ * lifecycle methods and event handlers where you may add behavior
+ * to respond to incoming events.
+ */
+public class EnviarCorrecao extends AbstractPageBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+
+ private Page page1 = new Page();
+
+ public Page getPage1() {
+ return page1;
+ }
+
+ public void setPage1(Page p) {
+ this.page1 = p;
+ }
+
+ private Html html1 = new Html();
+
+ public Html getHtml1() {
+ return html1;
+ }
+
+ public void setHtml1(Html h) {
+ this.html1 = h;
+ }
+
+ private Head head1 = new Head();
+
+ public Head getHead1() {
+ return head1;
+ }
+
+ public void setHead1(Head h) {
+ this.head1 = h;
+ }
+
+ private Link link1 = new Link();
+
+ public Link getLink1() {
+ return link1;
+ }
+
+ public void setLink1(Link l) {
+ this.link1 = l;
+ }
+
+ private Body body1 = new Body();
+
+ public Body getBody1() {
+ return body1;
+ }
+
+ public void setBody1(Body b) {
+ this.body1 = b;
+ }
+
+ private Form form1 = new Form();
+
+ public Form getForm1() {
+ return form1;
+ }
+
+ public void setForm1(Form f) {
+ this.form1 = f;
+ }
+
+ private HtmlPanelGrid gridBase1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridBase1() {
+ return gridBase1;
+ }
+
+ public void setGridBase1(HtmlPanelGrid hpg) {
+ this.gridBase1 = hpg;
+ }
+
+ private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLayout1() {
+ return gridLayout1;
+ }
+
+ public void setGridLayout1(HtmlPanelGrid hpg) {
+ this.gridLayout1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel1() {
+ return gridPanel1;
+ }
+
+ public void setGridPanel1(HtmlPanelGrid hpg) {
+ this.gridPanel1 = hpg;
+ }
+
+ private PanelGroup groupPanel1 = new PanelGroup();
+
+ public PanelGroup getGroupPanel1() {
+ return groupPanel1;
+ }
+
+ public void setGroupPanel1(PanelGroup pg) {
+ this.groupPanel1 = pg;
+ }
+
+ private ImageComponent image1 = new ImageComponent();
+
+ public ImageComponent getImage1() {
+ return image1;
+ }
+
+ public void setImage1(ImageComponent ic) {
+ this.image1 = ic;
+ }
+
+ private ImageComponent image2 = new ImageComponent();
+
+ public ImageComponent getImage2() {
+ return image2;
+ }
+
+ public void setImage2(ImageComponent ic) {
+ this.image2 = ic;
+ }
+
+ private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLayoutTop1() {
+ return gridLayoutTop1;
+ }
+
+ public void setGridLayoutTop1(HtmlPanelGrid hpg) {
+ this.gridLayoutTop1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel9() {
+ return gridPanel9;
+ }
+
+ public void setGridPanel9(HtmlPanelGrid hpg) {
+ this.gridPanel9 = hpg;
+ }
+
+ private PanelGroup groupPanel8 = new PanelGroup();
+
+ public PanelGroup getGroupPanel8() {
+ return groupPanel8;
+ }
+
+ public void setGroupPanel8(PanelGroup pg) {
+ this.groupPanel8 = pg;
+ }
+
+ private StaticText staticText10 = new StaticText();
+
+ public StaticText getStaticText10() {
+ return staticText10;
+ }
+
+ public void setStaticText10(StaticText st) {
+ this.staticText10 = st;
+ }
+
+ private ImageComponent image3 = new ImageComponent();
+
+ public ImageComponent getImage3() {
+ return image3;
+ }
+
+ public void setImage3(ImageComponent ic) {
+ this.image3 = ic;
+ }
+
+ private StaticText staticText11 = new StaticText();
+
+ public StaticText getStaticText11() {
+ return staticText11;
+ }
+
+ public void setStaticText11(StaticText st) {
+ this.staticText11 = st;
+ }
+
+ private HtmlPanelGrid gridMain1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridMain1() {
+ return gridMain1;
+ }
+
+ public void setGridMain1(HtmlPanelGrid hpg) {
+ this.gridMain1 = hpg;
+ }
+
+ private Table table1 = new Table();
+
+ public Table getTable1() {
+ return table1;
+ }
+
+ public void setTable1(Table t) {
+ this.table1 = t;
+ }
+
+ private TableRowGroup tableRowGroup1 = new TableRowGroup();
+
+ public TableRowGroup getTableRowGroup1() {
+ return tableRowGroup1;
+ }
+
+ public void setTableRowGroup1(TableRowGroup trg) {
+ this.tableRowGroup1 = trg;
+ }
+
+ private StaticText staticText6 = new StaticText();
+
+ public StaticText getStaticText6() {
+ return staticText6;
+ }
+
+ public void setStaticText6(StaticText st) {
+ this.staticText6 = st;
+ }
+
+ private TextArea txtObservacoes = new TextArea();
+
+ public TextArea getTxtObservacoes() {
+ return txtObservacoes;
+ }
+
+ public void setTxtObservacoes(TextArea ta) {
+ this.txtObservacoes = ta;
+ }
+
+ private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel2() {
+ return gridPanel2;
+ }
+
+ public void setGridPanel2(HtmlPanelGrid hpg) {
+ this.gridPanel2 = hpg;
+ }
+
+ private Button butCancelar = new Button();
+
+ public Button getButCancelar() {
+ return butCancelar;
+ }
+
+ public void setButCancelar(Button b) {
+ this.butCancelar = b;
+ }
+
+ private TableColumn tableColumn1 = new TableColumn();
+
+ public TableColumn getTableColumn1() {
+ return tableColumn1;
+ }
+
+ public void setTableColumn1(TableColumn tc) {
+ this.tableColumn1 = tc;
+ }
+
+ private Hyperlink lnkEstadoCorr = new Hyperlink();
+
+ public Hyperlink getLnkEstadoCorr() {
+ return lnkEstadoCorr;
+ }
+
+ public void setLnkEstadoCorr(Hyperlink h) {
+ this.lnkEstadoCorr = h;
+ }
+
+ private StaticText staticText5 = new StaticText();
+
+ public StaticText getStaticText5() {
+ return staticText5;
+ }
+
+ public void setStaticText5(StaticText st) {
+ this.staticText5 = st;
+ }
+
+ private Button butConfirmar = new Button();
+
+ public Button getButConfirmar() {
+ return butConfirmar;
+ }
+
+ public void setButConfirmar(Button b) {
+ this.butConfirmar = b;
+ }
+
+ private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel3() {
+ return gridPanel3;
+ }
+
+ public void setGridPanel3(HtmlPanelGrid hpg) {
+ this.gridPanel3 = hpg;
+ }
+
+ private StaticText txtMsg = new StaticText();
+
+ public StaticText getTxtMsg() {
+ return txtMsg;
+ }
+
+ public void setTxtMsg(StaticText st) {
+ this.txtMsg = st;
+ }
+ private StaticText lblUser = new StaticText();
+
+ public StaticText getLblUser() {
+ return lblUser;
+ }
+
+ public void setLblUser(StaticText st) {
+ this.lblUser = st;
+ }
+
+ //
+
+ /**
+ * Construct a new Page bean instance.
+ */
+ public EnviarCorrecao() {
+ }
+
+ /**
+ * Callback method that is called whenever a page is navigated to,
+ * either directly via a URL, or indirectly via page navigation.
+ * Customize this method to acquire resources that will be needed
+ * for event handlers and lifecycle methods, whether or not this
+ * page is performing post back processing.
+ *
+ * Note that, if the current request is a postback, the property
+ * values of the components do not represent any
+ * values submitted with this request. Instead, they represent the
+ * property values that were saved for this view when it was rendered.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("EnviarCorrecao Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+
+
+ }
+
+ /**
+ * Callback method that is called after the component tree has been
+ * restored, but before any event processing takes place. This method
+ * will only be called on a postback request that
+ * is processing a form submit. Customize this method to allocate
+ * resources that will be required in your event handlers.
+ */
+ public void preprocess() {
+
+ }
+
+ /**
+ * Callback method that is called just before rendering takes place.
+ * This method will only be called for the page that
+ * will actually be rendered (and not, for example, on a page that
+ * handled a postback and then navigated to a different page). Customize
+ * this method to allocate resources that will be required for rendering
+ * this page.
+ */
+ public void prerender() {
+ lblUser.setText( getSessionBean1().getCurrentUser().getLogin());
+ fillTabelaEstados();
+ txtMsg.setText(getSessionBean1().getMsg());
+ getSessionBean1().setMsg("");
+ }
+
+ /**
+ * Callback method that is called after rendering is completed for
+ * this request, if init() was called (regardless of whether
+ * or not this was the page that was actually rendered). Customize this
+ * method to release resources acquired in the init(),
+ * preprocess(), or prerender() methods (or
+ * acquired during execution of an event handler).
+ */
+ public void destroy() {
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected SessionBean1 getSessionBean1() {
+ return (SessionBean1)getBean("SessionBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected RequestBean1 getRequestBean1() {
+ return (RequestBean1)getBean("RequestBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+
+ public String lnkEditUser_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkLogout_action() {
+ // TODO: Replace with your code
+
+ try
+ {
+ javax.servlet.http.HttpSession session =
+ (javax.servlet.http.HttpSession) getExternalContext().getSession(true);
+ session.invalidate();
+ }
+ catch(Exception ex){}
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {}
+ //return "login";
+ return null;
+ }
+
+ public String lnkDataAcidente_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkNr_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkPor_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkNomeAcidentado_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkFase_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkDataAcidenteSeg_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkNrSeg_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkPorSeg_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkNomeAcidentadoSeg_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkFaseSeg_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public void drpAno_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+
+ }
+
+ public void drpMes_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+
+ }
+
+ public void drpDia_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+
+ }
+
+ public String butPesquisar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ return null;
+ }
+
+ public String lnkDataConcluida_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkNrConcluida_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkPorConcluida_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkNomeConcluida_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkEstabConcluida_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ private void fillTabelaEstados()
+ {
+ ArrayList list = new ArrayList();
+ Correcao c = null;
+ int estado = getSessionBean1().getCurrentAnalise().getEstado().intValue();
+
+ switch(estado)
+ {
+ case Global.ESTADO_HS:
+ c = new Correcao();
+ c.setCorrecao("y");
+ c.setAnalise_id(getSessionBean1().getCurrentAnalise().getId());
+ c.setEstado_actual(getSessionBean1().getCurrentAnalise().getEstado());
+ c.setEstado_corr(new Integer(Global.ESTADO_SEG));
+ c.setDescricao("FASE 1 - SEG - ABERTURA");
+ list.add(c);
+ c = new Correcao();
+ c.setCorrecao("y");
+ c.setAnalise_id(getSessionBean1().getCurrentAnalise().getId());
+ c.setEstado_actual(getSessionBean1().getCurrentAnalise().getEstado());
+ c.setEstado_corr(new Integer(Global.ESTADO_RH1));
+ c.setDescricao("FASE 2 - RH - ACOMPANHAMENTO");
+ list.add(c);
+ getSessionBean1().getEstadosCorrecaoDataProvider().setList(list);
+ break;
+ case Global.ESTADO_CONSOLIDACAO:
+ c = new Correcao();
+ c.setCorrecao("y");
+ c.setAnalise_id(getSessionBean1().getCurrentAnalise().getId());
+ c.setEstado_actual(getSessionBean1().getCurrentAnalise().getEstado());
+ c.setEstado_corr(new Integer(Global.ESTADO_RH2));
+ c.setDescricao("FASE 4 - RH - MEDIDAS + LESÃO");
+ list.add(c);
+// c = new Correcao();
+// c.setCorrecao("y");
+// c.setAnalise_id(getSessionBean1().getCurrentAnalise().getId());
+// c.setEstado_actual(getSessionBean1().getCurrentAnalise().getEstado());
+// c.setEstado_corr(new Integer(Global.ESTADO_MEDICINA));
+// c.setDescricao("Medicina");
+// list.add(c);
+ getSessionBean1().getEstadosCorrecaoDataProvider().setList(list);
+ break;
+ }
+ }
+
+ public String lnkEstadoCorr_action() {
+ // TODO: Replace with your code
+ RowKey rk = tableRowGroup1.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ EstadosCorrecaoDataProvider provider = (EstadosCorrecaoDataProvider) tableRowGroup1.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ Correcao c = (Correcao)list.get(k);
+
+ getSessionBean1().setCorrecao(c);
+
+// c.setObservacoes("");
+// if(txtObservacoes.getText() != null)
+// {
+// String obs = (String) txtObservacoes.getText();
+// c.setObservacoes(obs);
+// }
+// AnalisesDataProvider adp = new AnalisesDataProvider();
+// try
+// {
+// adp.changeEstado(c);
+//
+// }
+// catch(Exception ex)
+// {
+// ex.printStackTrace();
+// }
+// return "form_hs";
+ return null;
+ }
+
+ public String lnkNewUser_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String butCancelar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ //return "form_hs";
+ return "analise_acidente";
+ }
+
+ public String lnkAjuda_action() {
+ // TODO: Replace with your code
+// ServletContext theApplicationsServletContext =
+// (ServletContext) this.getExternalContext().getContext();
+// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL);
+// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf";
+//
+// Global global = new Global();
+// try
+// {
+// global.showPdf(pdfFilePath);
+// }
+// catch(Exception ex)
+// {
+// ex.printStackTrace();
+// }
+ return null;
+ }
+
+ public String butConfirmar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ Correcao c = getSessionBean1().getCorrecao();
+ if(c != null)
+ {
+ c.setObservacoes("");
+ if(txtObservacoes.getText() != null)
+ {
+ String obs = (String) txtObservacoes.getText();
+ c.setObservacoes(obs);
+ }
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ adp.changeEstado(c);
+
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ return "form_hs";
+ }
+ else
+ {
+ getSessionBean1().setMsg("Tem de indicar para onde enviar a correcção");
+ return null;
+ }
+
+ }
+
+ public String lnkAnalisesAcidente_action() {
+ // TODO: Replace with your code
+ return null;
+ }
+
+ public String lnkPlanosActuacao_action() {
+ // TODO: Replace with your code
+ return null;
+ }
+}
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Erro.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Erro.java
new file mode 100644
index 00000000..66aa2dc1
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Erro.java
@@ -0,0 +1,239 @@
+/*
+ * Error.java
+ *
+ * Created on September 19, 2007, 5:21 PM
+ * Copyright lluis
+ */
+package analiseacidentestrabalho;
+
+import com.sun.rave.web.ui.appbase.AbstractPageBean;
+import com.sun.rave.web.ui.component.Body;
+import com.sun.rave.web.ui.component.Form;
+import com.sun.rave.web.ui.component.Head;
+import com.sun.rave.web.ui.component.Html;
+import com.sun.rave.web.ui.component.Link;
+import com.sun.rave.web.ui.component.Page;
+import com.sun.rave.web.ui.component.StaticText;
+import com.sun.rave.web.ui.component.TextField;
+import javax.faces.FacesException;
+import javax.faces.component.html.HtmlPanelGrid;
+
+/**
+ * Page bean that corresponds to a similarly named JSP page. This
+ * class contains component definitions (and initialization code) for
+ * all components that you have defined on this page, as well as
+ * lifecycle methods and event handlers where you may add behavior
+ * to respond to incoming events.
+ */
+public class Erro extends AbstractPageBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+
+ private Page page1 = new Page();
+
+ public Page getPage1() {
+ return page1;
+ }
+
+ public void setPage1(Page p) {
+ this.page1 = p;
+ }
+
+ private Html html1 = new Html();
+
+ public Html getHtml1() {
+ return html1;
+ }
+
+ public void setHtml1(Html h) {
+ this.html1 = h;
+ }
+
+ private Head head1 = new Head();
+
+ public Head getHead1() {
+ return head1;
+ }
+
+ public void setHead1(Head h) {
+ this.head1 = h;
+ }
+
+ private Link link1 = new Link();
+
+ public Link getLink1() {
+ return link1;
+ }
+
+ public void setLink1(Link l) {
+ this.link1 = l;
+ }
+
+ private Body body1 = new Body();
+
+ public Body getBody1() {
+ return body1;
+ }
+
+ public void setBody1(Body b) {
+ this.body1 = b;
+ }
+
+ private Form form1 = new Form();
+
+ public Form getForm1() {
+ return form1;
+ }
+
+ public void setForm1(Form f) {
+ this.form1 = f;
+ }
+
+ private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel1() {
+ return gridPanel1;
+ }
+
+ public void setGridPanel1(HtmlPanelGrid hpg) {
+ this.gridPanel1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel2() {
+ return gridPanel2;
+ }
+
+ public void setGridPanel2(HtmlPanelGrid hpg) {
+ this.gridPanel2 = hpg;
+ }
+
+ private StaticText txtCab = new StaticText();
+
+ public StaticText getTxtCab() {
+ return txtCab;
+ }
+
+ public void setTxtCab(StaticText st) {
+ this.txtCab = st;
+ }
+
+ private StaticText txtMsg = new StaticText();
+
+ public StaticText getTxtMsg() {
+ return txtMsg;
+ }
+
+ public void setTxtMsg(StaticText st) {
+ this.txtMsg = st;
+ }
+
+ //
+
+ /**
+ * Construct a new Page bean instance.
+ */
+ public Erro() {
+ }
+
+ /**
+ * Callback method that is called whenever a page is navigated to,
+ * either directly via a URL, or indirectly via page navigation.
+ * Customize this method to acquire resources that will be needed
+ * for event handlers and lifecycle methods, whether or not this
+ * page is performing post back processing.
+ *
+ * Note that, if the current request is a postback, the property
+ * values of the components do not represent any
+ * values submitted with this request. Instead, they represent the
+ * property values that were saved for this view when it was rendered.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("Error Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+ }
+
+ /**
+ * Callback method that is called after the component tree has been
+ * restored, but before any event processing takes place. This method
+ * will only be called on a postback request that
+ * is processing a form submit. Customize this method to allocate
+ * resources that will be required in your event handlers.
+ */
+ public void preprocess() {
+ }
+
+ /**
+ * Callback method that is called just before rendering takes place.
+ * This method will only be called for the page that
+ * will actually be rendered (and not, for example, on a page that
+ * handled a postback and then navigated to a different page). Customize
+ * this method to allocate resources that will be required for rendering
+ * this page.
+ */
+ public void prerender() {
+ txtMsg.setText( getSessionBean1().getMsg() );
+ getSessionBean1().setMsg("");
+ System.out.println("ERROR PAGE");
+ }
+
+ /**
+ * Callback method that is called after rendering is completed for
+ * this request, if init() was called (regardless of whether
+ * or not this was the page that was actually rendered). Customize this
+ * method to release resources acquired in the init(),
+ * preprocess(), or prerender() methods (or
+ * acquired during execution of an event handler).
+ */
+ public void destroy() {
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected RequestBean1 getRequestBean1() {
+ return (RequestBean1)getBean("RequestBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected SessionBean1 getSessionBean1() {
+ return (SessionBean1)getBean("SessionBean1");
+ }
+}
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Estabelecimento.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Estabelecimento.java
new file mode 100644
index 00000000..afdcaecf
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Estabelecimento.java
@@ -0,0 +1,49 @@
+/*
+ * Empresa.java
+ *
+ * Created on October 11, 2007, 5:19 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package analiseacidentestrabalho;
+
+/**
+ *
+ * @author lluis
+ */
+public class Estabelecimento {
+ private Integer id;
+ private String nome_plain;
+ private String nome;
+
+ /** Creates a new instance of Empresa */
+ public Estabelecimento() {
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getNome_plain() {
+ return nome_plain;
+ }
+
+ public void setNome_plain(String nome_plain) {
+ this.nome_plain = nome_plain;
+ }
+
+ public String getNome() {
+ return nome;
+ }
+
+ public void setNome(String nome) {
+ this.nome = nome;
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Estado.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Estado.java
new file mode 100644
index 00000000..d7354742
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Estado.java
@@ -0,0 +1,39 @@
+/*
+ * Estado.java
+ *
+ * Created on November 29, 2007, 10:01 AM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package analiseacidentestrabalho;
+
+/**
+ *
+ * @author lluis
+ */
+public class Estado {
+ private Integer estado;
+ private String descricao;
+ /** Creates a new instance of Estado */
+ public Estado() {
+ }
+
+ public Integer getEstado() {
+ return estado;
+ }
+
+ public void setEstado(Integer estado) {
+ this.estado = estado;
+ }
+
+ public String getDescricao() {
+ return descricao;
+ }
+
+ public void setDescricao(String descricao) {
+ this.descricao = descricao;
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FichaUtilizador.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FichaUtilizador.java
new file mode 100644
index 00000000..0a184890
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FichaUtilizador.java
@@ -0,0 +1,1594 @@
+/*
+ * FichaUtilizador.java
+ *
+ * Created on October 11, 2007, 9:49 AM
+ * Copyright lluis
+ */
+package analiseacidentestrabalho;
+
+import com.sun.rave.web.ui.appbase.AbstractPageBean;
+import com.sun.rave.web.ui.component.Body;
+import com.sun.rave.web.ui.component.Button;
+import com.sun.rave.web.ui.component.Checkbox;
+import com.sun.rave.web.ui.component.DropDown;
+import com.sun.rave.web.ui.component.Form;
+import com.sun.rave.web.ui.component.Head;
+import com.sun.rave.web.ui.component.HiddenField;
+import com.sun.rave.web.ui.component.Html;
+import com.sun.rave.web.ui.component.Hyperlink;
+import com.sun.rave.web.ui.component.ImageComponent;
+import com.sun.rave.web.ui.component.Link;
+import com.sun.rave.web.ui.component.Page;
+import com.sun.rave.web.ui.component.PanelGroup;
+import com.sun.rave.web.ui.component.PasswordField;
+import com.sun.rave.web.ui.component.StaticText;
+import com.sun.rave.web.ui.component.TextField;
+import com.sun.rave.web.ui.model.SingleSelectOptionsList;
+import db.AnalisesDataProvider;
+import db.UtilizadoresDataProvider;
+import javax.faces.FacesException;
+import javax.faces.component.html.HtmlPanelGrid;
+import javax.faces.event.ValueChangeEvent;
+import javax.servlet.http.HttpServletRequest;
+import utils.Utils;
+import global.Global;
+import javax.faces.context.FacesContext;
+import utils.JSFUtils;
+
+/**
+ * Page bean that corresponds to a similarly named JSP page. This
+ * class contains component definitions (and initialization code) for
+ * all components that you have defined on this page, as well as
+ * lifecycle methods and event handlers where you may add behavior
+ * to respond to incoming events.
+ */
+public class FichaUtilizador extends AbstractPageBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+
+ private Page page1 = new Page();
+
+ public Page getPage1() {
+ return page1;
+ }
+
+ public void setPage1(Page p) {
+ this.page1 = p;
+ }
+
+ private Html html1 = new Html();
+
+ public Html getHtml1() {
+ return html1;
+ }
+
+ public void setHtml1(Html h) {
+ this.html1 = h;
+ }
+
+ private Head head1 = new Head();
+
+ public Head getHead1() {
+ return head1;
+ }
+
+ public void setHead1(Head h) {
+ this.head1 = h;
+ }
+
+ private Link link1 = new Link();
+
+ public Link getLink1() {
+ return link1;
+ }
+
+ public void setLink1(Link l) {
+ this.link1 = l;
+ }
+
+ private Body body1 = new Body();
+
+ public Body getBody1() {
+ return body1;
+ }
+
+ public void setBody1(Body b) {
+ this.body1 = b;
+ }
+
+ private Form form1 = new Form();
+
+ public Form getForm1() {
+ return form1;
+ }
+
+ public void setForm1(Form f) {
+ this.form1 = f;
+ }
+
+ private HtmlPanelGrid gridBase1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridBase1() {
+ return gridBase1;
+ }
+
+ public void setGridBase1(HtmlPanelGrid hpg) {
+ this.gridBase1 = hpg;
+ }
+
+ private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLayout1() {
+ return gridLayout1;
+ }
+
+ public void setGridLayout1(HtmlPanelGrid hpg) {
+ this.gridLayout1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel1() {
+ return gridPanel1;
+ }
+
+ public void setGridPanel1(HtmlPanelGrid hpg) {
+ this.gridPanel1 = hpg;
+ }
+
+ private PanelGroup groupPanel1 = new PanelGroup();
+
+ public PanelGroup getGroupPanel1() {
+ return groupPanel1;
+ }
+
+ public void setGroupPanel1(PanelGroup pg) {
+ this.groupPanel1 = pg;
+ }
+
+ private ImageComponent image1 = new ImageComponent();
+
+ public ImageComponent getImage1() {
+ return image1;
+ }
+
+ public void setImage1(ImageComponent ic) {
+ this.image1 = ic;
+ }
+
+ private ImageComponent image2 = new ImageComponent();
+
+ public ImageComponent getImage2() {
+ return image2;
+ }
+
+ public void setImage2(ImageComponent ic) {
+ this.image2 = ic;
+ }
+
+ private HtmlPanelGrid gridMsg1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridMsg1() {
+ return gridMsg1;
+ }
+
+ public void setGridMsg1(HtmlPanelGrid hpg) {
+ this.gridMsg1 = hpg;
+ }
+
+ private StaticText txtMsg = new StaticText();
+
+ public StaticText getTxtMsg() {
+ return txtMsg;
+ }
+
+ public void setTxtMsg(StaticText st) {
+ this.txtMsg = st;
+ }
+
+ private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel2() {
+ return gridPanel2;
+ }
+
+ public void setGridPanel2(HtmlPanelGrid hpg) {
+ this.gridPanel2 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel3() {
+ return gridPanel3;
+ }
+
+ public void setGridPanel3(HtmlPanelGrid hpg) {
+ this.gridPanel3 = hpg;
+ }
+
+ private PanelGroup groupPanel3 = new PanelGroup();
+
+ public PanelGroup getGroupPanel3() {
+ return groupPanel3;
+ }
+
+ public void setGroupPanel3(PanelGroup pg) {
+ this.groupPanel3 = pg;
+ }
+
+ private StaticText stCriarEditar = new StaticText();
+
+ public StaticText getStCriarEditar() {
+ return stCriarEditar;
+ }
+
+ public void setStCriarEditar(StaticText st) {
+ this.stCriarEditar = st;
+ }
+
+ private StaticText staticText4 = new StaticText();
+
+ public StaticText getStaticText4() {
+ return staticText4;
+ }
+
+ public void setStaticText4(StaticText st) {
+ this.staticText4 = st;
+ }
+
+ private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel4() {
+ return gridPanel4;
+ }
+
+ public void setGridPanel4(HtmlPanelGrid hpg) {
+ this.gridPanel4 = hpg;
+ }
+
+ private StaticText staticText5 = new StaticText();
+
+ public StaticText getStaticText5() {
+ return staticText5;
+ }
+
+ public void setStaticText5(StaticText st) {
+ this.staticText5 = st;
+ }
+
+ private DropDown drpTipo = new DropDown();
+
+ public DropDown getDrpTipo() {
+ return drpTipo;
+ }
+
+ public void setDrpTipo(DropDown dd) {
+ this.drpTipo = dd;
+ }
+
+ private StaticText staticText6 = new StaticText();
+
+ public StaticText getStaticText6() {
+ return staticText6;
+ }
+
+ public void setStaticText6(StaticText st) {
+ this.staticText6 = st;
+ }
+
+ private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel5() {
+ return gridPanel5;
+ }
+
+ public void setGridPanel5(HtmlPanelGrid hpg) {
+ this.gridPanel5 = hpg;
+ }
+
+ private DropDown drpNome = new DropDown();
+
+ public DropDown getDrpNome() {
+ return drpNome;
+ }
+
+ public void setDrpNome(DropDown dd) {
+ this.drpNome = dd;
+ }
+
+ private TextField txtNome = new TextField();
+
+ public TextField getTxtNome() {
+ return txtNome;
+ }
+
+ public void setTxtNome(TextField tf) {
+ this.txtNome = tf;
+ }
+
+ private StaticText staticText7 = new StaticText();
+
+ public StaticText getStaticText7() {
+ return staticText7;
+ }
+
+ public void setStaticText7(StaticText st) {
+ this.staticText7 = st;
+ }
+
+ private TextField txtLogin = new TextField();
+
+ public TextField getTxtLogin() {
+ return txtLogin;
+ }
+
+ public void setTxtLogin(TextField tf) {
+ this.txtLogin = tf;
+ }
+
+ private StaticText staticText8 = new StaticText();
+
+ public StaticText getStaticText8() {
+ return staticText8;
+ }
+
+ public void setStaticText8(StaticText st) {
+ this.staticText8 = st;
+ }
+
+ private PasswordField txtPassword = new PasswordField();
+
+ public PasswordField getTxtPassword() {
+ return txtPassword;
+ }
+
+ public void setTxtPassword(PasswordField pf) {
+ this.txtPassword = pf;
+ }
+
+ private StaticText staticText9 = new StaticText();
+
+ public StaticText getStaticText9() {
+ return staticText9;
+ }
+
+ public void setStaticText9(StaticText st) {
+ this.staticText9 = st;
+ }
+
+ private TextField txtEmail = new TextField();
+
+ public TextField getTxtEmail() {
+ return txtEmail;
+ }
+
+ public void setTxtEmail(TextField tf) {
+ this.txtEmail = tf;
+ }
+
+ private StaticText lblCap = new StaticText();
+
+ public StaticText getLblCap() {
+ return lblCap;
+ }
+
+ public void setLblCap(StaticText st) {
+ this.lblCap = st;
+ }
+
+ private TextField txtCap = new TextField();
+
+ public TextField getTxtCap() {
+ return txtCap;
+ }
+
+ public void setTxtCap(TextField tf) {
+ this.txtCap = tf;
+ }
+
+ private StaticText lblCedula = new StaticText();
+
+ public StaticText getLblCedula() {
+ return lblCedula;
+ }
+
+ public void setLblCedula(StaticText st) {
+ this.lblCedula = st;
+ }
+
+ private StaticText stCedula = new StaticText();
+
+ public StaticText getStCedula() {
+ return stCedula;
+ }
+
+ public void setStCedula(StaticText st) {
+ this.stCedula = st;
+ }
+
+ private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel6() {
+ return gridPanel6;
+ }
+
+ public void setGridPanel6(HtmlPanelGrid hpg) {
+ this.gridPanel6 = hpg;
+ }
+
+ private PanelGroup groupPanel4 = new PanelGroup();
+
+ public PanelGroup getGroupPanel4() {
+ return groupPanel4;
+ }
+
+ public void setGroupPanel4(PanelGroup pg) {
+ this.groupPanel4 = pg;
+ }
+
+ private StaticText staticText13 = new StaticText();
+
+ public StaticText getStaticText13() {
+ return staticText13;
+ }
+
+ public void setStaticText13(StaticText st) {
+ this.staticText13 = st;
+ }
+
+ private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel7() {
+ return gridPanel7;
+ }
+
+ public void setGridPanel7(HtmlPanelGrid hpg) {
+ this.gridPanel7 = hpg;
+ }
+
+ private Button butCancelar = new Button();
+
+ public Button getButCancelar() {
+ return butCancelar;
+ }
+
+ public void setButCancelar(Button b) {
+ this.butCancelar = b;
+ }
+
+ private PanelGroup groupPanel5 = new PanelGroup();
+
+ public PanelGroup getGroupPanel5() {
+ return groupPanel5;
+ }
+
+ public void setGroupPanel5(PanelGroup pg) {
+ this.groupPanel5 = pg;
+ }
+
+
+ private Button butGravar = new Button();
+
+ public Button getButGravar() {
+ return butGravar;
+ }
+
+ public void setButGravar(Button b) {
+ this.butGravar = b;
+ }
+
+ private HiddenField hidConfDelUser = new HiddenField();
+
+ public HiddenField getHidConfDelUser() {
+ return hidConfDelUser;
+ }
+
+ public void setHidConfDelUser(HiddenField hf) {
+ this.hidConfDelUser = hf;
+ }
+
+ //
+ private boolean isPostData = false;
+
+ private final static int SEG = 1;
+ private final static int RH = 2;
+ private final static int HS = 3;
+ private final static int MEDICO = 5;
+ private final static int GESTOR = 6;
+ private final static int DIRECTOR_RH = 7;
+ private final static int DIRECTOR_SIPRP = 8;
+ private final static int DIRECTOR_LOJA = 9;
+ private final static int DIRECTOR_NACIONAL_SEGURANCA = 10;
+
+ private boolean isFromPlanos = false;
+
+ private StaticText staticText12 = new StaticText();
+
+ public StaticText getStaticText12() {
+ return staticText12;
+ }
+
+ public void setStaticText12(StaticText st) {
+ this.staticText12 = st;
+ }
+
+ private DropDown drpEstabelecimentos = new DropDown();
+
+ public DropDown getDrpEstabelecimentos() {
+ return drpEstabelecimentos;
+ }
+
+ public void setDrpEstabelecimentos(DropDown dd) {
+ this.drpEstabelecimentos = dd;
+ }
+
+ private SingleSelectOptionsList drpEstabelecimentosDefaultOptions = new SingleSelectOptionsList();
+
+ public SingleSelectOptionsList getDrpEstabelecimentosDefaultOptions() {
+ return drpEstabelecimentosDefaultOptions;
+ }
+
+ public void setDrpEstabelecimentosDefaultOptions(SingleSelectOptionsList ssol) {
+ this.drpEstabelecimentosDefaultOptions = ssol;
+ }
+
+ private StaticText lblResponsavelLoja = new StaticText();
+
+ public StaticText getLblResponsavelLoja() {
+ return lblResponsavelLoja;
+ }
+
+ public void setLblResponsavelLoja(StaticText st) {
+ this.lblResponsavelLoja = st;
+ }
+
+ private Checkbox chkResponsavelLoja = new Checkbox();
+
+ public Checkbox getChkResponsavelLoja() {
+ return chkResponsavelLoja;
+ }
+
+ public void setChkResponsavelLoja(Checkbox c) {
+ this.chkResponsavelLoja = c;
+ }
+
+ private StaticText staticText3 = new StaticText();
+
+ public StaticText getStaticText3() {
+ return staticText3;
+ }
+
+ public void setStaticText3(StaticText st) {
+ this.staticText3 = st;
+ }
+
+ private PasswordField txtConfPassword = new PasswordField();
+
+ public PasswordField getTxtConfPassword() {
+ return txtConfPassword;
+ }
+
+ public void setTxtConfPassword(PasswordField pf) {
+ this.txtConfPassword = pf;
+ }
+
+ private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel8() {
+ return gridPanel8;
+ }
+
+ public void setGridPanel8(HtmlPanelGrid hpg) {
+ this.gridPanel8 = hpg;
+ }
+
+ private PanelGroup groupPanel6 = new PanelGroup();
+
+ public PanelGroup getGroupPanel6() {
+ return groupPanel6;
+ }
+
+ public void setGroupPanel6(PanelGroup pg) {
+ this.groupPanel6 = pg;
+ }
+
+ private StaticText staticText10 = new StaticText();
+
+ public StaticText getStaticText10() {
+ return staticText10;
+ }
+
+ public void setStaticText10(StaticText st) {
+ this.staticText10 = st;
+ }
+
+ private ImageComponent image3 = new ImageComponent();
+
+ public ImageComponent getImage3() {
+ return image3;
+ }
+
+ public void setImage3(ImageComponent ic) {
+ this.image3 = ic;
+ }
+
+ private StaticText staticText11 = new StaticText();
+
+ public StaticText getStaticText11() {
+ return staticText11;
+ }
+
+ public void setStaticText11(StaticText st) {
+ this.staticText11 = st;
+ }
+ private StaticText lblUser = new StaticText();
+
+ public StaticText getLblUser() {
+ return lblUser;
+ }
+
+ public void setLblUser(StaticText st) {
+ this.lblUser = st;
+ }
+ private Hyperlink lnkGerirUtilizadores = new Hyperlink();
+
+ public Hyperlink getLnkGerirUtilizadores() {
+ return lnkGerirUtilizadores;
+ }
+
+ public void setLnkGerirUtilizadores(Hyperlink h) {
+ this.lnkGerirUtilizadores = h;
+ }
+
+ /**
+ * Construct a new Page bean instance.
+ */
+ public FichaUtilizador() {
+ }
+
+ /**
+ * Callback method that is called whenever a page is navigated to,
+ * either directly via a URL, or indirectly via page navigation.
+ * Customize this method to acquire resources that will be needed
+ * for event handlers and lifecycle methods, whether or not this
+ * page is performing post back processing.
+ *
+ * Note that, if the current request is a postback, the property
+ * values of the components do not represent any
+ * values submitted with this request. Instead, they represent the
+ * property values that were saved for this view when it was rendered.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("FichaUtilizador Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+ if (!getSessionBean1().isLoggedIn()) {
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {
+ // . . . handle exception . . .
+ }
+ }
+ else
+ {
+
+ FacesContext fc = getFacesContext();
+ System.out.println("REQUEST PARAMETERS : " + JSFUtils.requestHasParameters(fc));
+ isFromPlanos = false;
+ if(JSFUtils.requestHasParameters(fc))
+ {
+ isFromPlanos = true;
+ String user_id = JSFUtils.getRequestParameter(fc, "user");
+ String mode = JSFUtils.getRequestParameter(fc, "mode");
+ if(mode != null)
+ {
+ if(mode.matches("edit"))
+ {
+ System.out.println("MODE PARAMETER : " + mode);
+ getSessionBean1().setModoEdicaoUtilizador("edit");
+ }
+ }
+
+ Utilizador u = null;
+ try
+ {
+ Integer userId = new Integer(Integer.parseInt(user_id));
+ System.out.println("USER ID FROM PLANOS : " + user_id);
+ try
+ {
+ UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
+ //udp.checkConnection();
+ u = udp.getUtilizador(userId);
+ getSessionBean1().setCurrentUser(u);
+ }
+ catch(Exception ex1)
+ {
+ ex1.printStackTrace();
+ }
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+
+
+ if(
+ getSessionBean1().getCurrentUser().getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_GERAL_RH
+ || getSessionBean1().getCurrentUser().getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP )
+ {
+ lnkGerirUtilizadores.setDisabled(false);
+ }
+ else
+ {
+ lnkGerirUtilizadores.setDisabled(true);
+ }
+
+ HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest();
+ String referer = request.getRequestURI();
+ String pageFrom = Utils.getPageFrom(referer);
+ if(isFromPlanos)
+ {
+ isPostData = false;
+ }
+ else
+ {
+ if(pageFrom.matches("FichaUtilizador.jsp"))
+ {
+ isPostData = true;
+ System.out.println("IS POSTDATA : " + isPostData);
+ }
+ }
+
+ if(!isPostData)
+ {
+
+
+ lblUser.setText( getSessionBean1().getCurrentUser().getLogin() );
+ UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ Integer permissao = udp.getPermissionCode( getSessionBean1().getCurrentUser().getId() );
+ getSessionBean1().setTiposOptions(adp.getTiposList(permissao));
+ drpTipo.setSelected(new Integer(0));
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ try
+ {
+ getSessionBean1().setEstabelecimentosOptions(adp.getEstabelecimentosList( getSessionBean1().getCurrentUser().getEmpresa_id(), new Boolean(false) ));
+ System.out.println("ESTABELECIMENTOS OPTIONS : " + getSessionBean1().getEstabelecimentosOptions().length);
+ drpEstabelecimentos.setSelected(new Integer(-1));
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ }
+ else //postData
+ {
+ String del_user = (String)getExternalContext().getRequestParameterMap().get("del_user");
+ if(del_user != null)
+ {
+ if(del_user.matches("yes"))
+ {
+ hidConfDelUser.setValue("");
+ try
+ {
+ deleteUser();
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ getSessionBean1().setMsg("Erro na eliminação do utilizador!");
+ }
+
+ //force a page reload
+ // try
+ // {
+ // getExternalContext().redirect("FichaUtilizador.jsp");
+ // System.out.println("REDIRECT");
+ // }
+ // catch(Exception ex)
+ // {
+ // ex.printStackTrace();
+ // }
+
+ }
+ else if(del_user.matches("no"))
+ {
+ hidConfDelUser.setValue("");
+ showUser();
+ }
+ }
+
+ }
+
+ }
+
+
+
+ }
+
+ /**
+ * Callback method that is called after the component tree has been
+ * restored, but before any event processing takes place. This method
+ * will only be called on a postback request that
+ * is processing a form submit. Customize this method to allocate
+ * resources that will be required in your event handlers.
+ */
+ public void preprocess() {
+ }
+
+ /**
+ * Callback method that is called just before rendering takes place.
+ * This method will only be called for the page that
+ * will actually be rendered (and not, for example, on a page that
+ * handled a postback and then navigated to a different page). Customize
+ * this method to allocate resources that will be required for rendering
+ * this page.
+ */
+ public void prerender() {
+ stCriarEditar.setText("EDITAR");
+
+ if(getSessionBean1().getModoEdicaoUtilizador().matches("new"))
+ {
+ if(!isPostData)
+ {
+ txtNome.setStyleClass("hide");
+ stCriarEditar.setText("CRIAR");
+ lblCap.setRendered(false);
+ txtCap.setRendered(false);
+ lblCedula.setRendered(false);
+ stCedula.setRendered(false);
+ }
+
+ }
+ if(getSessionBean1().getModoEdicaoUtilizador().matches("edit"))
+ {
+ //drpNome.setRendered(true);
+
+ if(!isPostData)
+ {
+ showUser();
+ }
+ }
+
+ txtMsg.setText(getSessionBean1().getMsg());
+ getSessionBean1().setMsg("");
+
+ if(getSessionBean1().isMudarPassword())
+ {
+ //txtMsg.setStyle("color: #000000; font-weight: bold");
+ if(!isPostData)
+ {
+ txtMsg.setText("Por favor confirme os seus dados e altere a password para uma apenas do seu conhecimento.");
+ }
+ //getSessionBean1().setMudarPassword(false);
+ }
+ }
+
+ /**
+ * Callback method that is called after rendering is completed for
+ * this request, if init() was called (regardless of whether
+ * or not this was the page that was actually rendered). Customize this
+ * method to release resources acquired in the init(),
+ * preprocess(), or prerender() methods (or
+ * acquired during execution of an event handler).
+ */
+ public void destroy() {
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected SessionBean1 getSessionBean1() {
+ return (SessionBean1)getBean("SessionBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected RequestBean1 getRequestBean1() {
+ return (RequestBean1)getBean("RequestBean1");
+ }
+
+ public String lnkAnalisesAcidente_action() {
+ //return navigate();
+ int tipo = getSessionBean1().getCurrentUser().getTipo().intValue();
+ if(tipo == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP)
+ {
+ return "form_dir_siprp";
+ }
+ else if(tipo == Global.TIPO_UTILIZADOR_DIRECTOR_GERAL_RH)
+ {
+ return "form_dir_ger_rh";
+ }
+ else if(tipo == Global.TIPO_UTILIZADOR_SEGURANCA)
+ {
+ return "form_seguranca";
+ }
+ else if(tipo == Global.TIPO_UTILIZADOR_RH)
+ {
+ return "form_rh";
+ }
+ else if(tipo == Global.TIPO_UTILIZADOR_RH)
+ {
+ return "form_rh";
+ }
+ else if(tipo == Global.TIPO_UTILIZADOR_HS)
+ {
+ return "form_hs";
+ }
+ else if(tipo == Global.TIPO_UTILIZADOR_GESTOR)
+ {
+ return "form_gestor";
+ }
+ else if(tipo == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA)
+ {
+ return "form_gestor";
+ }
+ else if(tipo == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA)
+ {
+ return "form_gestor";
+ }
+
+ return null;
+ }
+
+ public String lnkLogout_action() {
+ // TODO: Replace with your code
+ try
+ {
+ javax.servlet.http.HttpSession session =
+ (javax.servlet.http.HttpSession) getExternalContext().getSession(true);
+ session.invalidate();
+ }
+ catch(Exception ex){}
+
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {}
+ //return "login";
+ return null;
+ }
+
+
+ public String butCancelar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ return navigate();
+ }
+
+ public String butGravar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+ if(validationOk())
+ {
+ if(getSessionBean1().getModoEdicaoUtilizador().matches("new"))
+ {
+ try
+ {
+ Utilizador u = addUser();
+ addPermissao(u);
+ getSessionBean1().setMsg("Utilizador criado");
+ }
+ catch(Exception ex)
+ {
+ getSessionBean1().setMsg("Erro na criação do utilizador!");
+ ex.printStackTrace();
+ }
+ }
+ else //edit
+ {
+ try
+ {
+ updateUser();
+ //getSessionBean1().setMsg("Dados actualizados");
+ return navigate();
+ }
+ catch(Exception ex)
+ {
+ getSessionBean1().setMsg("Erro na actualização do utilizador");
+ ex.printStackTrace();
+ }
+ }
+
+ if(getSessionBean1().isMudarPassword())
+ {
+ getSessionBean1().setMudarPassword(false);
+ }
+
+ }
+
+ return null;
+ }
+
+ public void drpTipo_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+ drpNome.setVisible(true);
+ Integer tipo = (Integer) drpTipo.getSelected();
+ boolean booGestor = false;
+ if(tipo.intValue() == GESTOR)
+ {
+ booGestor = true;
+ }
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ getSessionBean1().setEstabelecimentosOptions(adp.getEstabelecimentosList( getSessionBean1().getCurrentUser().getEmpresa_id(), new Boolean(booGestor) ));
+ drpEstabelecimentos.setSelected(new Integer(-1));
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ if(tipo.intValue() == SEG || tipo.intValue() == RH || tipo.intValue() == GESTOR || tipo.intValue() == DIRECTOR_RH || tipo.intValue() == DIRECTOR_SIPRP)
+ {
+ drpNome.setRendered(false);
+ txtNome.setStyleClass("show");
+ lblCap.setRendered(false);
+ txtCap.setRendered(false);
+ lblCedula.setRendered(false);
+ stCedula.setRendered(false);
+ }
+ else if(tipo.intValue() == HS || tipo.intValue() == MEDICO)
+ {
+ drpNome.setRendered(true);
+ txtNome.setStyleClass("hide");
+ if(tipo.intValue() == HS)
+ {
+ lblCap.setRendered(true);
+ txtCap.setRendered(true);
+ lblCedula.setRendered(false);
+ stCedula.setRendered(false);
+ try
+ {
+ getSessionBean1().setMedicosOptions(adp.getTecnicosSaudeList());
+ drpNome.setSelected(new Integer(0));
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+ else // medicos
+ {
+ lblCedula.setRendered(true);
+ stCedula.setRendered(true);
+ lblCap.setRendered(false);
+ txtCap.setRendered(false);
+ try
+ {
+ getSessionBean1().setMedicosOptions(adp.getMedicosList());
+ drpNome.setSelected(new Integer(0));
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+ }
+ }
+
+ private boolean validationOk()
+ {
+ Integer tipo = (Integer) drpTipo.getSelected();
+// if(tipo.intValue() == 0)
+// {
+// getSessionBean1().setMsg("Tem de escolher um tipo!");
+// return false;
+// }
+// Integer estabelecimento = (Integer) drpEstabelecimentos.getSelected();
+// if(estabelecimento.intValue() == -1)
+// {
+// getSessionBean1().setMsg("Tem de escolher um estabelecimento!");
+// return false;
+// }
+
+// if(tipo.intValue() == SEG || tipo.intValue() == RH || tipo.intValue() == GESTOR || tipo.intValue() == DIRECTOR_RH || tipo.intValue() == DIRECTOR_SIPRP)
+// {
+// if(txtNome.getText() == null)
+// {
+// getSessionBean1().setMsg("Tem de indicar o nome!");
+// return false;
+// }
+// else
+// {
+// String nome = (String) txtNome.getText();
+// if(nome.trim().length() == 0)
+// {
+// getSessionBean1().setMsg("Tem de indicar o nome!");
+// return false;
+// }
+// }
+// }
+// else if(tipo.intValue() == HS || tipo.intValue() == MEDICO)
+// {
+// Integer nome = (Integer) drpNome.getSelected();
+// if(nome.intValue() == 0)
+// {
+// getSessionBean1().setMsg("Tem de indicar o nome!");
+// return false;
+// }
+// }
+
+// if(txtLogin.getText() == null)
+// {
+// getSessionBean1().setMsg("Tem de indicar o login!");
+// return false;
+// }
+// else
+// {
+// String login = (String) txtLogin.getText();
+// if(login.trim().length() == 0)
+// {
+// getSessionBean1().setMsg("Tem de indicar o login!");
+// return false;
+// }
+// }
+
+ if(txtPassword.getText() == null)
+ {
+ getSessionBean1().setMsg("Tem de indicar a password!");
+ return false;
+ }
+ else
+ {
+ String password = (String) txtPassword.getText();
+ if(password.trim().length() == 0)
+ {
+ getSessionBean1().setMsg("Tem de indicar a password!");
+ return false;
+ }
+ else
+ {
+ if(txtConfPassword.getText() == null)
+ {
+ getSessionBean1().setMsg("Tem de confirmar a password!");
+ return false;
+ }
+ else
+ {
+ String conf_password = (String) txtConfPassword.getText();
+ if(conf_password.trim().length() == 0)
+ {
+ getSessionBean1().setMsg("Tem de confirmar a password!");
+ return false;
+ }
+ else
+ {
+ if(!password.equals(conf_password))
+ {
+ getSessionBean1().setMsg("A confirmação tem de ser igual à a password!");
+ return false;
+ }
+ }
+ }
+ } //
+ }
+
+ if(getSessionBean1().isMudarPassword())
+ {
+ String password = (String) txtPassword.getText();
+ if(password.matches(getSessionBean1().getCurrentUser().getPassword()))
+ {
+ getSessionBean1().setMsg("A nova password tem de ser diferente da password actual!");
+ return false;
+ }
+
+ }
+
+// if(tipo.intValue() == HS)
+// {
+// if(txtCap.getText() == null )
+// {
+// getSessionBean1().setMsg("Tem de indicar o c.a.p.!");
+// return false;
+// }
+// else
+// {
+// String cap = (String) txtCap.getText();
+// if(cap.trim().length() == 0)
+// {
+// getSessionBean1().setMsg("Tem de indicar o c.a.p.!");
+// return false;
+// }
+// }
+// }
+
+ return true;
+ }
+
+ public void drpNome_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+ Integer tipo = (Integer) drpTipo.getSelected();
+ if(tipo.intValue() == MEDICO)
+ {
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ Integer medico_id = (Integer) drpNome.getSelected();
+ try
+ {
+ String numero_cedula = adp.getNumeroCedula(medico_id);
+ stCedula.setText(numero_cedula);
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+ }
+
+ private Utilizador addUser() throws Exception
+ {
+ Utilizador u = fillUser();
+ UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
+ Integer id = udp.createNewUtilizador(u);
+ u.setId(id);
+ return u;
+ }
+
+ private void addPermissao(Utilizador u) throws Exception
+ {
+ Permissao p = new Permissao();
+ p.setUser_id(u.getId());
+ p.setCodigo_permissao(u.getTipo());
+ UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
+ udp.createPermissao(p);
+ }
+
+ private void updateUser() throws Exception
+ {
+ Utilizador u = fillUser();
+ u.setId(getSessionBean1().getCurrentUser().getId());
+ UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
+ udp.updateUtilizador(u);
+ }
+
+ private void deleteUser() throws Exception
+ {
+ UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
+ udp.deleteUser(getSessionBean1().getCurrentUser().getId());
+ }
+
+ private void showUser()
+ {
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ Utilizador u = getSessionBean1().getCurrentUser();
+ drpTipo.setSelected(u.getTipo());
+ if(u.getTipo().intValue() == SEG || u.getTipo().intValue() == RH || u.getTipo().intValue() == HS || u.getTipo().intValue() == MEDICO || u.getTipo().intValue() == GESTOR || u.getTipo().intValue() == DIRECTOR_RH || u.getTipo().intValue() == DIRECTOR_SIPRP)
+ {
+ drpNome.setRendered(false);
+ txtNome.setStyleClass("show");
+ lblCap.setRendered(false);
+ txtCap.setRendered(false);
+ lblCedula.setRendered(false);
+ stCedula.setRendered(false);
+ txtNome.setText(utils.Utils.unicodeToHTML(u.getNome()));
+ }
+ else if(u.getTipo().intValue() == HS)
+ {
+ //txtNome.setRendered(false);
+ try
+ {
+ getSessionBean1().setMedicosOptions(adp.getTecnicosSaudeList());
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ drpNome.setSelected(u.getFuncionario_hst_id());
+ drpNome.setStyleClass("show");
+ lblCap.setRendered(true);
+ txtCap.setRendered(true);
+ lblCedula.setRendered(false);
+ stCedula.setRendered(false);
+ txtCap.setText(u.getCap());
+ }
+ else if(u.getTipo().intValue() == DIRECTOR_LOJA || u.getTipo().intValue() == DIRECTOR_NACIONAL_SEGURANCA)
+ {
+ drpNome.setRendered(false);
+ txtNome.setStyleClass("show");
+ lblCap.setRendered(false);
+ txtCap.setRendered(false);
+ lblCedula.setRendered(false);
+ stCedula.setRendered(false);
+ lblResponsavelLoja.setRendered(false);
+ chkResponsavelLoja.setRendered(false);
+ txtNome.setText(utils.Utils.unicodeToHTML(u.getNome()));
+ }
+ else if(u.getTipo().intValue() == MEDICO) //medico
+ {
+ drpNome.setRendered(true);
+ try
+ {
+ getSessionBean1().setMedicosOptions(adp.getMedicosList());
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ drpNome.setSelected(u.getMedico_id());
+ txtNome.setStyleClass("hide");
+ lblCap.setRendered(false);
+ txtCap.setRendered(false);
+ lblCedula.setRendered(true);
+ stCedula.setRendered(true);
+ stCedula.setText(u.getNumero_cedula());
+
+ }
+ if(u.getEstabelecimento_id() != null)
+ {
+ drpEstabelecimentos.setSelected(u.getEstabelecimento_id());
+ }
+
+ txtLogin.setText(u.getLogin());
+ //txtPassword.setText(u.getPassword());
+ txtEmail.setText(u.getEmail());
+ }
+
+ private Utilizador fillUser()
+ {
+ //Utilizador u = new Utilizador();
+ Utilizador u = getSessionBean1().getCurrentUser();
+// u.setActivo("y");
+// u.setAdministrador("n");
+// u.setTipo((Integer) drpTipo.getSelected());
+// u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id());
+// u.setEstabelecimento_id( (Integer) drpEstabelecimentos.getSelected() );
+// u.setLogin( (String) txtLogin.getText() );
+ String password = (String) txtPassword.getText();
+ u.setPassword( password );
+ java.util.Date today =
+ new java.util.Date();
+ java.sql.Date sqlToday =
+ new java.sql.Date(today.getTime());
+ u.setData_password(sqlToday);
+
+
+ u.setEmail("");
+ if(txtEmail.getText() != null)
+ {
+ u.setEmail( (String) txtEmail.getText() );
+ }
+
+ Integer tipo = (Integer) drpTipo.getSelected();
+
+// u.setNumero_cedula("");
+// u.setCap("");
+// if(tipo.intValue() == HS || tipo.intValue() == MEDICO)
+// {
+// AnalisesDataProvider adp = new AnalisesDataProvider();
+// if(tipo.intValue() == HS)
+// {
+// try
+// {
+// Integer tecnico_id = (Integer) drpNome.getSelected();
+// u.setFuncionario_hst_id(tecnico_id);
+// u.setNome( adp.getTecnicoSaudeNome(tecnico_id) );
+// }
+// catch(Exception ex)
+// {
+// ex.printStackTrace();
+// }
+// u.setCap( (String) txtCap.getText());
+// }
+// else // medico
+// {
+// try
+// {
+// Integer medico_id = (Integer) drpNome.getSelected();
+// u.setMedico_id(medico_id);
+// u.setNome( adp.getMedicoNome(medico_id) );
+// }
+// catch(Exception ex)
+// {
+// ex.printStackTrace();
+// }
+// u.setNumero_cedula( (String) stCedula.getText());
+// }
+// }
+// else
+// {
+// u.setNome( (String) txtNome.getText() );
+// }
+
+// u.setResponsavel_loja("n");
+// if(chkResponsavelLoja.getSelected() != null)
+// {
+// if(chkResponsavelLoja.getSelected().equals(new Boolean(true)))
+// {
+// u.setResponsavel_loja("y");
+// }
+// }
+//
+// if(u.getGestor_geral() == null)
+// {
+// u.setGestor_geral("n");
+// }
+
+ u.setPrimeiro_login("n");
+ return u;
+ }
+
+ public String lnkEditUser_action() {
+ // TODO: Replace with your code
+
+ getSessionBean1().setModoEdicaoUtilizador("edit");
+ return "user";
+ }
+
+ public String butApagar_action() {
+ // TODO: Replace with your code
+ hidConfDelUser.setValue("apagar");
+ return null;
+ }
+
+ private String navigate()
+ {
+ if(isFromPlanos)
+ {
+ Utilizador u = getSessionBean1().getCurrentUser();
+ // String curUser = "?user=" + u.getId().toString();
+ FacesContext fc = getFacesContext().getCurrentInstance();
+ Global.redirectToPlanos(fc, u);
+ return null;
+ }
+ String nav_from = getSessionBean1().getNavFrom();
+ if(nav_from.matches("FormSeguranca"))
+ {
+ return "form_seguranca";
+ }
+ else if(nav_from.matches("FormRH"))
+ {
+ return "form_rh";
+ }
+ else if(nav_from.matches("FormHS"))
+ {
+ return "form_hs";
+ }
+ else if(nav_from.matches("FormMedico"))
+ {
+ return "form_medico";
+ }
+ else if(nav_from.matches("AnaliseAcidenteTrabalho"))
+ {
+ return "analise_acidente";
+ }
+ else if(nav_from.matches("ViewAnaliseAcidenteTrabalho"))
+ {
+ return "view_analise";
+ }
+ else if(nav_from.matches("FormGestor"))
+ {
+ return "form_gestor";
+ }
+ else if(nav_from.matches("FormDirGerRh"))
+ {
+ return "form_dir_ger_rh";
+ }
+ else if(nav_from.matches("FormDirSiprp"))
+ {
+ return "form_dir_siprp";
+ }
+ else if(nav_from.matches("GestaoUtilizadores"))
+ {
+ return "gestao_utilizadores";
+ }
+ else if(nav_from.matches("NovoUtilizador"))
+ {
+ return "novo_utilizador";
+ }
+ else if(nav_from.matches("Login")) // first login
+ {
+ int tipo = getSessionBean1().getCurrentUser().getTipo().intValue();
+ switch(tipo)
+ {
+ case Global.TIPO_UTILIZADOR_SEGURANCA:
+ return "form_seguranca";
+ case Global.TIPO_UTILIZADOR_RH:
+ return "form_rh";
+ case Global.TIPO_UTILIZADOR_HS:
+ return "form_hs";
+ case Global.TIPO_UTILIZADOR_MEDICO:
+ return "form_medico";
+ case Global.TIPO_UTILIZADOR_GESTOR:
+ return "form_gestor";
+ case Global.TIPO_UTILIZADOR_DIRECTOR_GERAL_RH:
+ return "form_dir_ger_rh";
+ case Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP:
+ return "form_dir_siprp";
+ case Global.TIPO_UTILIZADOR_DIRECTOR_LOJA:
+ return "form_gestor";
+ case Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA:
+ return "form_gestor";
+ }
+ }
+ return null;
+ }
+
+ public String lnkNewUser_action() {
+ // TODO: Replace with your code
+
+ if(getSessionBean1().getCurrentUser().getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_GERAL_RH)
+ {
+ getSessionBean1().setNavFrom("FormDirGerRh");
+ }
+ else if(getSessionBean1().getCurrentUser().getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP)
+ {
+ getSessionBean1().setNavFrom("FormDirSiprp");
+ }
+
+
+ return "gestao_utilizadores";
+
+ }
+
+ public String lnkAjuda_action() {
+ // TODO: Replace with your code
+// ServletContext theApplicationsServletContext =
+// (ServletContext) this.getExternalContext().getContext();
+// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL);
+// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf";
+//
+// Global global = new Global();
+// try
+// {
+// global.showPdf(pdfFilePath);
+// }
+// catch(Exception ex)
+// {
+// ex.printStackTrace();
+// }
+ return null;
+ }
+
+ public String lnkPlanosActuacao_action() {
+ // TODO: Replace with your code
+ Utilizador u = getSessionBean1().getCurrentUser();
+// String curUser = "?user=" + u.getId().toString();
+ FacesContext fc = getFacesContext().getCurrentInstance();
+ Global.redirectToPlanos(fc, u);
+ return null;
+ }
+}
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Footer.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Footer.java
new file mode 100644
index 00000000..52f9e49d
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Footer.java
@@ -0,0 +1,152 @@
+/*
+ * Footer.java
+ *
+ * Created on September 19, 2007, 10:57 AM
+ * Copyright lluis
+ */
+package analiseacidentestrabalho;
+
+import com.sun.rave.web.ui.appbase.AbstractFragmentBean;
+import com.sun.rave.web.ui.component.ImageComponent;
+import com.sun.rave.web.ui.component.PanelGroup;
+import com.sun.rave.web.ui.component.StaticText;
+import javax.faces.FacesException;
+import javax.faces.component.html.HtmlPanelGrid;
+
+/**
+ * Fragment bean that corresponds to a similarly named JSP page
+ * fragment. This class contains component definitions (and initialization
+ * code) for all components that you have defined on this fragment, as well as
+ * lifecycle methods and event handlers where you may add behavior
+ * to respond to incoming events.
+ */
+public class Footer extends AbstractFragmentBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+
+ private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel1() {
+ return gridPanel1;
+ }
+
+ public void setGridPanel1(HtmlPanelGrid hpg) {
+ this.gridPanel1 = hpg;
+ }
+
+ private PanelGroup groupPanel1 = new PanelGroup();
+
+ public PanelGroup getGroupPanel1() {
+ return groupPanel1;
+ }
+
+ public void setGroupPanel1(PanelGroup pg) {
+ this.groupPanel1 = pg;
+ }
+
+ private StaticText staticText1 = new StaticText();
+
+ public StaticText getStaticText1() {
+ return staticText1;
+ }
+
+ public void setStaticText1(StaticText st) {
+ this.staticText1 = st;
+ }
+
+ private StaticText staticText2 = new StaticText();
+
+ public StaticText getStaticText2() {
+ return staticText2;
+ }
+
+ public void setStaticText2(StaticText st) {
+ this.staticText2 = st;
+ }
+
+ private ImageComponent image1 = new ImageComponent();
+
+ public ImageComponent getImage1() {
+ return image1;
+ }
+
+ public void setImage1(ImageComponent ic) {
+ this.image1 = ic;
+ }
+ //
+
+ public Footer() {
+ }
+
+ /**
+ * Callback method that is called whenever a page containing
+ * this page fragment is navigated to, either directly via a URL,
+ * or indirectly via page navigation. Override this method to acquire
+ * resources that will be needed for event handlers and lifecycle methods.
+ *
+ * The default implementation does nothing.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("Page1 Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+ }
+
+ /**
+ * Callback method that is called after rendering is completed for
+ * this request, if init() was called. Override this
+ * method to release resources acquired in the init()
+ * resources that will be needed for event handlers and lifecycle methods.
+ *
+ * The default implementation does nothing.
+ */
+ public void destroy() {
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected RequestBean1 getRequestBean1() {
+ return (RequestBean1)getBean("RequestBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected SessionBean1 getSessionBean1() {
+ return (SessionBean1)getBean("SessionBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormDirGerRh.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormDirGerRh.java
new file mode 100644
index 00000000..b9b83ca0
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormDirGerRh.java
@@ -0,0 +1,1556 @@
+/*
+ * FormDirGerRh.java
+ *
+ * Created on December 19, 2007, 11:48 AM
+ * Copyright lluis
+ */
+package analiseacidentestrabalho;
+
+import com.sun.data.provider.RowKey;
+import com.sun.rave.web.ui.appbase.AbstractPageBean;
+import com.sun.rave.web.ui.component.Body;
+import com.sun.rave.web.ui.component.Button;
+import com.sun.rave.web.ui.component.DropDown;
+import com.sun.rave.web.ui.component.Form;
+import com.sun.rave.web.ui.component.Head;
+import com.sun.rave.web.ui.component.Html;
+import com.sun.rave.web.ui.component.Hyperlink;
+import com.sun.rave.web.ui.component.ImageComponent;
+import com.sun.rave.web.ui.component.Link;
+import com.sun.rave.web.ui.component.Page;
+import com.sun.rave.web.ui.component.PanelGroup;
+import com.sun.rave.web.ui.component.StaticText;
+import com.sun.rave.web.ui.component.Table;
+import com.sun.rave.web.ui.component.TableColumn;
+import com.sun.rave.web.ui.component.TableRowGroup;
+import com.sun.rave.web.ui.component.TextField;
+import com.sun.rave.web.ui.model.Option;
+import db.AnalisesConcluidasDataProvider;
+import db.AnalisesDataProvider;
+import db.AnalisesSeguimentoDataProvider;
+import global.Global;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.ListIterator;
+import javax.faces.FacesException;
+import javax.faces.component.html.HtmlPanelGrid;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ValueChangeEvent;
+import javax.servlet.http.HttpServletRequest;
+import utils.Utils;
+
+/**
+ * Page bean that corresponds to a similarly named JSP page. This
+ * class contains component definitions (and initialization code) for
+ * all components that you have defined on this page, as well as
+ * lifecycle methods and event handlers where you may add behavior
+ * to respond to incoming events.
+ */
+public class FormDirGerRh extends AbstractPageBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+
+ private Page page1 = new Page();
+
+ public Page getPage1() {
+ return page1;
+ }
+
+ public void setPage1(Page p) {
+ this.page1 = p;
+ }
+
+ private Html html1 = new Html();
+
+ public Html getHtml1() {
+ return html1;
+ }
+
+ public void setHtml1(Html h) {
+ this.html1 = h;
+ }
+
+ private Head head1 = new Head();
+
+ public Head getHead1() {
+ return head1;
+ }
+
+ public void setHead1(Head h) {
+ this.head1 = h;
+ }
+
+ private Link link1 = new Link();
+
+ public Link getLink1() {
+ return link1;
+ }
+
+ public void setLink1(Link l) {
+ this.link1 = l;
+ }
+
+ private Body body1 = new Body();
+
+ public Body getBody1() {
+ return body1;
+ }
+
+ public void setBody1(Body b) {
+ this.body1 = b;
+ }
+
+ private Form form1 = new Form();
+
+ public Form getForm1() {
+ return form1;
+ }
+
+ public void setForm1(Form f) {
+ this.form1 = f;
+ }
+
+ private HtmlPanelGrid gridBase1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridBase1() {
+ return gridBase1;
+ }
+
+ public void setGridBase1(HtmlPanelGrid hpg) {
+ this.gridBase1 = hpg;
+ }
+
+ private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLayout1() {
+ return gridLayout1;
+ }
+
+ public void setGridLayout1(HtmlPanelGrid hpg) {
+ this.gridLayout1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel1() {
+ return gridPanel1;
+ }
+
+ public void setGridPanel1(HtmlPanelGrid hpg) {
+ this.gridPanel1 = hpg;
+ }
+
+ private PanelGroup groupPanel1 = new PanelGroup();
+
+ public PanelGroup getGroupPanel1() {
+ return groupPanel1;
+ }
+
+ public void setGroupPanel1(PanelGroup pg) {
+ this.groupPanel1 = pg;
+ }
+
+ private ImageComponent image1 = new ImageComponent();
+
+ public ImageComponent getImage1() {
+ return image1;
+ }
+
+ public void setImage1(ImageComponent ic) {
+ this.image1 = ic;
+ }
+
+ private ImageComponent image2 = new ImageComponent();
+
+ public ImageComponent getImage2() {
+ return image2;
+ }
+
+ public void setImage2(ImageComponent ic) {
+ this.image2 = ic;
+ }
+
+ private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLayoutTop1() {
+ return gridLayoutTop1;
+ }
+
+ public void setGridLayoutTop1(HtmlPanelGrid hpg) {
+ this.gridLayoutTop1 = hpg;
+ }
+
+ private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridSeguimento1() {
+ return gridSeguimento1;
+ }
+
+ public void setGridSeguimento1(HtmlPanelGrid hpg) {
+ this.gridSeguimento1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel2() {
+ return gridPanel2;
+ }
+
+ public void setGridPanel2(HtmlPanelGrid hpg) {
+ this.gridPanel2 = hpg;
+ }
+
+ private StaticText staticText2 = new StaticText();
+
+ public StaticText getStaticText2() {
+ return staticText2;
+ }
+
+ public void setStaticText2(StaticText st) {
+ this.staticText2 = st;
+ }
+
+ private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel3() {
+ return gridPanel3;
+ }
+
+ public void setGridPanel3(HtmlPanelGrid hpg) {
+ this.gridPanel3 = hpg;
+ }
+
+ private Table table1 = new Table();
+
+ public Table getTable1() {
+ return table1;
+ }
+
+ public void setTable1(Table t) {
+ this.table1 = t;
+ }
+
+ private TableRowGroup tableRowGroup1 = new TableRowGroup();
+
+ public TableRowGroup getTableRowGroup1() {
+ return tableRowGroup1;
+ }
+
+ public void setTableRowGroup1(TableRowGroup trg) {
+ this.tableRowGroup1 = trg;
+ }
+
+ private TableColumn tableColumn1 = new TableColumn();
+
+ public TableColumn getTableColumn1() {
+ return tableColumn1;
+ }
+
+ public void setTableColumn1(TableColumn tc) {
+ this.tableColumn1 = tc;
+ }
+
+ private Hyperlink lnkDataAcidenteSeg = new Hyperlink();
+
+ public Hyperlink getLnkDataAcidenteSeg() {
+ return lnkDataAcidenteSeg;
+ }
+
+ public void setLnkDataAcidenteSeg(Hyperlink h) {
+ this.lnkDataAcidenteSeg = h;
+ }
+
+ private TableColumn tableColumn2 = new TableColumn();
+
+ public TableColumn getTableColumn2() {
+ return tableColumn2;
+ }
+
+ public void setTableColumn2(TableColumn tc) {
+ this.tableColumn2 = tc;
+ }
+
+ private Hyperlink lnkNrSeg = new Hyperlink();
+
+ public Hyperlink getLnkNrSeg() {
+ return lnkNrSeg;
+ }
+
+ public void setLnkNrSeg(Hyperlink h) {
+ this.lnkNrSeg = h;
+ }
+
+ private TableColumn tableColumn3 = new TableColumn();
+
+ public TableColumn getTableColumn3() {
+ return tableColumn3;
+ }
+
+ public void setTableColumn3(TableColumn tc) {
+ this.tableColumn3 = tc;
+ }
+
+ private Hyperlink lnkPorSeg = new Hyperlink();
+
+ public Hyperlink getLnkPorSeg() {
+ return lnkPorSeg;
+ }
+
+ public void setLnkPorSeg(Hyperlink h) {
+ this.lnkPorSeg = h;
+ }
+
+ private TableColumn tableColumn4 = new TableColumn();
+
+ public TableColumn getTableColumn4() {
+ return tableColumn4;
+ }
+
+ public void setTableColumn4(TableColumn tc) {
+ this.tableColumn4 = tc;
+ }
+
+ private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink();
+
+ public Hyperlink getLnkNomeAcidentadoSeg() {
+ return lnkNomeAcidentadoSeg;
+ }
+
+ public void setLnkNomeAcidentadoSeg(Hyperlink h) {
+ this.lnkNomeAcidentadoSeg = h;
+ }
+
+ private TableColumn tableColumn5 = new TableColumn();
+
+ public TableColumn getTableColumn5() {
+ return tableColumn5;
+ }
+
+ public void setTableColumn5(TableColumn tc) {
+ this.tableColumn5 = tc;
+ }
+
+ private Hyperlink lnkFaseSeg = new Hyperlink();
+
+ public Hyperlink getLnkFaseSeg() {
+ return lnkFaseSeg;
+ }
+
+ public void setLnkFaseSeg(Hyperlink h) {
+ this.lnkFaseSeg = h;
+ }
+
+
+ private Hyperlink lnkEstabelecimentoSeg = new Hyperlink();
+
+ public Hyperlink getLnkEstabelecimentoSeg() {
+ return lnkEstabelecimentoSeg;
+ }
+
+ public void setLnkEstabelecimentoSeg(Hyperlink h) {
+ this.lnkEstabelecimentoSeg = h;
+ }
+
+ private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridConcluidos1() {
+ return gridConcluidos1;
+ }
+
+ public void setGridConcluidos1(HtmlPanelGrid hpg) {
+ this.gridConcluidos1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel4() {
+ return gridPanel4;
+ }
+
+ public void setGridPanel4(HtmlPanelGrid hpg) {
+ this.gridPanel4 = hpg;
+ }
+
+ private StaticText staticText3 = new StaticText();
+
+ public StaticText getStaticText3() {
+ return staticText3;
+ }
+
+ public void setStaticText3(StaticText st) {
+ this.staticText3 = st;
+ }
+
+ private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel5() {
+ return gridPanel5;
+ }
+
+ public void setGridPanel5(HtmlPanelGrid hpg) {
+ this.gridPanel5 = hpg;
+ }
+
+ private PanelGroup groupPanel3 = new PanelGroup();
+
+ public PanelGroup getGroupPanel3() {
+ return groupPanel3;
+ }
+
+ public void setGroupPanel3(PanelGroup pg) {
+ this.groupPanel3 = pg;
+ }
+
+ private StaticText staticText4 = new StaticText();
+
+ public StaticText getStaticText4() {
+ return staticText4;
+ }
+
+ public void setStaticText4(StaticText st) {
+ this.staticText4 = st;
+ }
+
+ private DropDown drpAno = new DropDown();
+
+ public DropDown getDrpAno() {
+ return drpAno;
+ }
+
+ public void setDrpAno(DropDown dd) {
+ this.drpAno = dd;
+ }
+
+ private PanelGroup groupPanel4 = new PanelGroup();
+
+ public PanelGroup getGroupPanel4() {
+ return groupPanel4;
+ }
+
+ public void setGroupPanel4(PanelGroup pg) {
+ this.groupPanel4 = pg;
+ }
+
+ private StaticText lblMes = new StaticText();
+
+ public StaticText getLblMes() {
+ return lblMes;
+ }
+
+ public void setLblMes(StaticText st) {
+ this.lblMes = st;
+ }
+
+ private DropDown drpMes = new DropDown();
+
+ public DropDown getDrpMes() {
+ return drpMes;
+ }
+
+ public void setDrpMes(DropDown dd) {
+ this.drpMes = dd;
+ }
+
+ private PanelGroup groupPanel5 = new PanelGroup();
+
+ public PanelGroup getGroupPanel5() {
+ return groupPanel5;
+ }
+
+ public void setGroupPanel5(PanelGroup pg) {
+ this.groupPanel5 = pg;
+ }
+
+ private StaticText lblDia = new StaticText();
+
+ public StaticText getLblDia() {
+ return lblDia;
+ }
+
+ public void setLblDia(StaticText st) {
+ this.lblDia = st;
+ }
+
+ private DropDown drpDia = new DropDown();
+
+ public DropDown getDrpDia() {
+ return drpDia;
+ }
+
+ public void setDrpDia(DropDown dd) {
+ this.drpDia = dd;
+ }
+
+ private PanelGroup groupPanel6 = new PanelGroup();
+
+ public PanelGroup getGroupPanel6() {
+ return groupPanel6;
+ }
+
+ public void setGroupPanel6(PanelGroup pg) {
+ this.groupPanel6 = pg;
+ }
+
+ private StaticText staticText5 = new StaticText();
+
+ public StaticText getStaticText5() {
+ return staticText5;
+ }
+
+ public void setStaticText5(StaticText st) {
+ this.staticText5 = st;
+ }
+
+ private TextField txtPor = new TextField();
+
+ public TextField getTxtPor() {
+ return txtPor;
+ }
+
+ public void setTxtPor(TextField tf) {
+ this.txtPor = tf;
+ }
+
+ private PanelGroup groupPanel7 = new PanelGroup();
+
+ public PanelGroup getGroupPanel7() {
+ return groupPanel7;
+ }
+
+ public void setGroupPanel7(PanelGroup pg) {
+ this.groupPanel7 = pg;
+ }
+
+ private StaticText staticText6 = new StaticText();
+
+ public StaticText getStaticText6() {
+ return staticText6;
+ }
+
+ public void setStaticText6(StaticText st) {
+ this.staticText6 = st;
+ }
+
+ private TextField txtNome = new TextField();
+
+ public TextField getTxtNome() {
+ return txtNome;
+ }
+
+ public void setTxtNome(TextField tf) {
+ this.txtNome = tf;
+ }
+
+ private Button butPesquisar = new Button();
+
+ public Button getButPesquisar() {
+ return butPesquisar;
+ }
+
+ public void setButPesquisar(Button b) {
+ this.butPesquisar = b;
+ }
+
+ private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel6() {
+ return gridPanel6;
+ }
+
+ public void setGridPanel6(HtmlPanelGrid hpg) {
+ this.gridPanel6 = hpg;
+ }
+
+ private Table table2 = new Table();
+
+ public Table getTable2() {
+ return table2;
+ }
+
+ public void setTable2(Table t) {
+ this.table2 = t;
+ }
+
+ private TableRowGroup tableRowGroup2 = new TableRowGroup();
+
+ public TableRowGroup getTableRowGroup2() {
+ return tableRowGroup2;
+ }
+
+ public void setTableRowGroup2(TableRowGroup trg) {
+ this.tableRowGroup2 = trg;
+ }
+
+ private TableColumn tableColumn6 = new TableColumn();
+
+ public TableColumn getTableColumn6() {
+ return tableColumn6;
+ }
+
+ public void setTableColumn6(TableColumn tc) {
+ this.tableColumn6 = tc;
+ }
+
+ private Hyperlink lnkDataConcluida = new Hyperlink();
+
+ public Hyperlink getLnkDataConcluida() {
+ return lnkDataConcluida;
+ }
+
+ public void setLnkDataConcluida(Hyperlink h) {
+ this.lnkDataConcluida = h;
+ }
+
+ private TableColumn tableColumn7 = new TableColumn();
+
+ public TableColumn getTableColumn7() {
+ return tableColumn7;
+ }
+
+ public void setTableColumn7(TableColumn tc) {
+ this.tableColumn7 = tc;
+ }
+
+ private Hyperlink lnkNrConcluida = new Hyperlink();
+
+ public Hyperlink getLnkNrConcluida() {
+ return lnkNrConcluida;
+ }
+
+ public void setLnkNrConcluida(Hyperlink h) {
+ this.lnkNrConcluida = h;
+ }
+
+ private TableColumn tableColumn8 = new TableColumn();
+
+ public TableColumn getTableColumn8() {
+ return tableColumn8;
+ }
+
+ public void setTableColumn8(TableColumn tc) {
+ this.tableColumn8 = tc;
+ }
+
+ private Hyperlink lnkPorConcluida = new Hyperlink();
+
+ public Hyperlink getLnkPorConcluida() {
+ return lnkPorConcluida;
+ }
+
+ public void setLnkPorConcluida(Hyperlink h) {
+ this.lnkPorConcluida = h;
+ }
+
+ private TableColumn tableColumn9 = new TableColumn();
+
+ public TableColumn getTableColumn9() {
+ return tableColumn9;
+ }
+
+ public void setTableColumn9(TableColumn tc) {
+ this.tableColumn9 = tc;
+ }
+
+ private Hyperlink lnkNomeConcluida = new Hyperlink();
+
+ public Hyperlink getLnkNomeConcluida() {
+ return lnkNomeConcluida;
+ }
+
+ public void setLnkNomeConcluida(Hyperlink h) {
+ this.lnkNomeConcluida = h;
+ }
+
+ private TableColumn tableColumn10 = new TableColumn();
+
+ public TableColumn getTableColumn10() {
+ return tableColumn10;
+ }
+
+ public void setTableColumn10(TableColumn tc) {
+ this.tableColumn10 = tc;
+ }
+
+ private Hyperlink lnkEstabConcluida = new Hyperlink();
+
+ public Hyperlink getLnkEstabConcluida() {
+ return lnkEstabConcluida;
+ }
+
+ public void setLnkEstabConcluida(Hyperlink h) {
+ this.lnkEstabConcluida = h;
+ }
+
+ private StaticText txtSearchMsg = new StaticText();
+
+ public StaticText getTxtSearchMsg() {
+ return txtSearchMsg;
+ }
+
+ public void setTxtSearchMsg(StaticText st) {
+ this.txtSearchMsg = st;
+ }
+
+ private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel7() {
+ return gridPanel7;
+ }
+
+ public void setGridPanel7(HtmlPanelGrid hpg) {
+ this.gridPanel7 = hpg;
+ }
+
+ private PanelGroup groupPanel8 = new PanelGroup();
+
+ public PanelGroup getGroupPanel8() {
+ return groupPanel8;
+ }
+
+ public void setGroupPanel8(PanelGroup pg) {
+ this.groupPanel8 = pg;
+ }
+
+ private StaticText staticText7 = new StaticText();
+
+ public StaticText getStaticText7() {
+ return staticText7;
+ }
+
+ public void setStaticText7(StaticText st) {
+ this.staticText7 = st;
+ }
+
+ private ImageComponent image3 = new ImageComponent();
+
+ public ImageComponent getImage3() {
+ return image3;
+ }
+
+ public void setImage3(ImageComponent ic) {
+ this.image3 = ic;
+ }
+
+ private StaticText staticText8 = new StaticText();
+
+ public StaticText getStaticText8() {
+ return staticText8;
+ }
+
+ public void setStaticText8(StaticText st) {
+ this.staticText8 = st;
+ }
+
+ private TableColumn tableColumn11 = new TableColumn();
+
+ public TableColumn getTableColumn11() {
+ return tableColumn11;
+ }
+
+ public void setTableColumn11(TableColumn tc) {
+ this.tableColumn11 = tc;
+ }
+
+ private Hyperlink lnkDataAberturaSeg = new Hyperlink();
+
+ public Hyperlink getLnkDataAberturaSeg() {
+ return lnkDataAberturaSeg;
+ }
+
+ public void setLnkDataAberturaSeg(Hyperlink h) {
+ this.lnkDataAberturaSeg = h;
+ }
+
+ private TableColumn tableColumn12 = new TableColumn();
+
+ public TableColumn getTableColumn12() {
+ return tableColumn12;
+ }
+
+ public void setTableColumn12(TableColumn tc) {
+ this.tableColumn12 = tc;
+ }
+
+ private TableColumn tableColumn13 = new TableColumn();
+
+ public TableColumn getTableColumn13() {
+ return tableColumn13;
+ }
+
+ public void setTableColumn13(TableColumn tc) {
+ this.tableColumn13 = tc;
+ }
+
+ private Hyperlink lnkDataAberturaConcluida = new Hyperlink();
+
+ public Hyperlink getLnkDataAberturaConcluida() {
+ return lnkDataAberturaConcluida;
+ }
+
+ public void setLnkDataAberturaConcluida(Hyperlink h) {
+ this.lnkDataAberturaConcluida = h;
+ }
+ private StaticText lblUser = new StaticText();
+
+ public StaticText getLblUser() {
+ return lblUser;
+ }
+
+ public void setLblUser(StaticText st) {
+ this.lblUser = st;
+ }
+ private Hyperlink lnkPlanosActuacao = new Hyperlink();
+
+ public Hyperlink getLnkPlanosActuacao() {
+ return lnkPlanosActuacao;
+ }
+
+ public void setLnkPlanosActuacao(Hyperlink h) {
+ this.lnkPlanosActuacao = h;
+ }
+
+
+ private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid();
+ public HtmlPanelGrid getGridPanelFilterSeg()
+ {
+ return this.gridPanelFilterSeg;
+ }
+ public void setGridPanelFilterSeg( HtmlPanelGrid pg )
+ {
+ this.gridPanelFilterSeg = pg;
+ }
+
+ private PanelGroup groupPanelFilterSeg = new PanelGroup();
+ public PanelGroup getGroupPanelFilterSeg()
+ {
+ return this.groupPanelFilterSeg;
+ }
+ public void setGroupPanelFilterSeg( PanelGroup pg )
+ {
+ this.groupPanelFilterSeg = pg;
+ }
+
+ private StaticText labelFilterNameSeg = new StaticText();
+ public StaticText getLabelFilterNameSeg()
+ {
+ return this.labelFilterNameSeg;
+ }
+ public void setLabelFilterNameSeg( StaticText st )
+ {
+ this.labelFilterNameSeg = st;
+ }
+
+ private TextField textFilterNameSeg = new TextField();
+ public TextField getTextFilterNameSeg()
+ {
+ return this.textFilterNameSeg;
+ }
+ public void setTextFilterNameSeg( TextField tf )
+ {
+ this.textFilterNameSeg = tf;
+ }
+
+ private StaticText labelFilterEstabelecimentoSeg = new StaticText();
+ public StaticText getLabelFilterEstabelecimentoSeg() {
+ return labelFilterEstabelecimentoSeg;
+ }
+ public void setLabelFilterEstabelecimentoSeg(StaticText labelFilterEstabelecimentoSeg) {
+ this.labelFilterEstabelecimentoSeg = labelFilterEstabelecimentoSeg;
+ }
+
+ private TextField textFilterEstabelecimentoSeg = new TextField();
+
+ public TextField getTextFilterEstabelecimentoSeg() {
+ return textFilterEstabelecimentoSeg;
+ }
+ public void setTextFilterEstabelecimentoSeg(TextField textFilterEstabelecimentoSeg) {
+ this.textFilterEstabelecimentoSeg = textFilterEstabelecimentoSeg;
+ }
+
+ private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar();
+ public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg()
+ {
+ return this.calFilterDateSeg;
+ }
+ public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c )
+ {
+ this.calFilterDateSeg = c;
+ }
+
+ private TextField textFilterPORSeg = new TextField();
+
+ public TextField getTextFilterPORSeg() {
+ return textFilterPORSeg;
+ }
+
+ public void setTextFilterPORSeg(TextField textFilterPORSeg) {
+ this.textFilterPORSeg = textFilterPORSeg;
+ }
+
+
+ private Button buttonFilterSeg = new Button();
+ public Button getButtonFilterSeg()
+ {
+ return this.buttonFilterSeg;
+ }
+ public void setButtonFilterSeg( Button b )
+ {
+ this.buttonFilterSeg = b;
+ }
+
+ private TextField textFilterEstabelecimentoConc = new TextField();
+
+ public TextField getTextFilterEstabelecimentoConc() {
+ return textFilterEstabelecimentoConc;
+ }
+
+ public void setTextFilterEstabelecimentoConc(TextField textFilterEstabelecimentoConc) {
+ this.textFilterEstabelecimentoConc = textFilterEstabelecimentoConc;
+ }
+
+ private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" );
+ //
+
+
+ /**
+ * Construct a new Page bean instance.
+ */
+ public FormDirGerRh() {
+ }
+
+ /**
+ * Callback method that is called whenever a page is navigated to,
+ * either directly via a URL, or indirectly via page navigation.
+ * Customize this method to acquire resources that will be needed
+ * for event handlers and lifecycle methods, whether or not this
+ * page is performing post back processing.
+ *
+ * Note that, if the current request is a postback, the property
+ * values of the components do not represent any
+ * values submitted with this request. Instead, they represent the
+ * property values that were saved for this view when it was rendered.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+ if (!getSessionBean1().isLoggedIn()) {
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {
+ // . . . handle exception . . .
+ }
+ }
+
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("FormDirGerRh Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+ }
+
+ /**
+ * Callback method that is called after the component tree has been
+ * restored, but before any event processing takes place. This method
+ * will only be called on a postback request that
+ * is processing a form submit. Customize this method to allocate
+ * resources that will be required in your event handlers.
+ */
+ public void preprocess() {
+ }
+
+ /**
+ * Callback method that is called just before rendering takes place.
+ * This method will only be called for the page that
+ * will actually be rendered (and not, for example, on a page that
+ * handled a postback and then navigated to a different page). Customize
+ * this method to allocate resources that will be required for rendering
+ * this page.
+ */
+ public void prerender() {
+ System.out.println("=== FORM_DIR_GER_RH ===");
+ lblUser.setText( getSessionBean1().getCurrentUser().getLogin() );
+
+ HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest();
+ String referer = request.getRequestURI();
+ String pageFrom = Utils.getPageFrom(referer);
+ if(!pageFrom.matches("FormDirGerRh.jsp"))
+ {
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ //lblActivos.setRendered(true);
+ table1.setRendered(true);
+
+ ArrayList seguimentoList = adp.getAnalisesSeguimentoDirGerRhList();
+ getSessionBean1().getAnalisesSeguimentoDataProvider().setList(seguimentoList);
+ }
+ catch(Exception ex)
+ {
+ //lblActivos.setRendered(false);
+ table1.setRendered(false);
+ //ex.printStackTrace();
+ }
+
+ try
+ {
+ //lblActivos.setRendered(true);
+ table2.setRendered(true);
+
+ ArrayList concluidasList = adp.getAnalisesConcluidasList(null);
+ getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList);
+ }
+ catch(Exception ex)
+ {
+ //lblActivos.setRendered(false);
+ table2.setRendered(false);
+ //ex.printStackTrace();
+ }
+ fillAnoDropDown();
+ }
+ }
+
+ /**
+ * Callback method that is called after rendering is completed for
+ * this request, if init() was called (regardless of whether
+ * or not this was the page that was actually rendered). Customize this
+ * method to release resources acquired in the init(),
+ * preprocess(), or prerender() methods (or
+ * acquired during execution of an event handler).
+ */
+ public void destroy() {
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected SessionBean1 getSessionBean1() {
+ return (SessionBean1)getBean("SessionBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected RequestBean1 getRequestBean1() {
+ return (RequestBean1)getBean("RequestBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+
+ public String lnkAnalisesAcidente_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkNewUser_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkEditUser_action() {
+ // TODO: Replace with your code
+
+ getSessionBean1().setNavFrom("FormDirGerRh");
+ getSessionBean1().setModoEdicaoUtilizador("edit");
+ return "user";
+ }
+
+ public String lnkLogout_action() {
+ // TODO: Replace with your code
+
+ try
+ {
+ javax.servlet.http.HttpSession session =
+ (javax.servlet.http.HttpSession) getExternalContext().getSession(true);
+ session.invalidate();
+ }
+ catch(Exception ex){}
+
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {}
+ //return "login";
+ return null;
+ }
+
+ public String lnkDataAcidenteSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirGerRh");
+ return "view_analise";
+
+ }
+
+ public String lnkDataAberturaSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirGerRh");
+ return "view_analise";
+ }
+
+ public String lnkNrSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirGerRh");
+ return "view_analise";
+
+ }
+
+ public String lnkPorSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirGerRh");
+ return "view_analise";
+
+ }
+
+ public String lnkNomeAcidentadoSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirGerRh");
+ return "view_analise";
+
+ }
+
+ public String lnkFaseSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirGerRh");
+ return "view_analise";
+
+ }
+
+
+ public String lnkEstabelecimentoSeg_action() {
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirGerRh");
+ return "view_analise";
+ }
+
+ private AnaliseAcidente getTableSeguimentoRowData()
+ {
+ RowKey rk = tableRowGroup1.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ AnalisesSeguimentoDataProvider provider = (AnalisesSeguimentoDataProvider) tableRowGroup1.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ AnaliseAcidente a = (AnaliseAcidente)list.get(k);
+ return a;
+ }
+
+
+ public void drpAno_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+ Object ano = event.getNewValue();
+ if(ano == null)
+ {
+ lblMes.setVisible(false);
+ drpMes.setVisible(false);
+ lblDia.setVisible(false);
+ drpDia.setVisible(false);
+ }
+ else
+ {
+ lblMes.setVisible(true);
+ drpMes.setVisible(true);
+ fillMesDropDown();
+ }
+ }
+
+ public void drpMes_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+ Object mes = event.getNewValue();
+ if(mes == null)
+ {
+ lblDia.setVisible(false);
+ drpDia.setVisible(false);
+ }
+ else
+ {
+ lblDia.setVisible(true);
+ drpDia.setVisible(true);
+ //fillDiaDropDown();
+ }
+ }
+
+ public void drpDia_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+
+ }
+
+ public String butPesquisar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+ Object obAno = null;
+ Object obMes = null;
+ Object obDia = null;
+ try
+ {
+ obAno = drpAno.getSelected();
+ obMes = drpMes.getSelected();
+ obDia = drpDia.getSelected();
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ Integer ano = null;
+ Integer mes = null;
+ Integer dia = null;
+
+ if(obAno != null)
+ {
+ ano = (Integer) obAno;
+ }
+
+ if(obMes != null)
+ {
+ mes = (Integer) obMes;
+ }
+
+ if(obDia != null)
+ {
+ dia = (Integer) obDia;
+ }
+
+ String por = null;
+ if(txtPor.getText() != null)
+ {
+ por = (String) txtPor.getText();
+ if(por.trim().length() == 0)
+ {
+ por = null;
+ }
+ }
+
+ String nome = null;
+ if(txtNome.getText() != null)
+ {
+ nome = (String) txtNome.getText();
+ if(nome.trim().length() == 0)
+ {
+ nome = null;
+ }
+ }
+
+ String estabelecimento = null;
+ if ( textFilterEstabelecimentoConc.getText() != null )
+ {
+ estabelecimento = (( String ) textFilterEstabelecimentoConc.getText()).trim();
+ if( estabelecimento.length() == 0 )
+ {
+ estabelecimento = null;
+ }
+ }
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+
+ //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList());
+ ArrayList concluidasList = adp.searchAanalisesConcluidasList(
+ null, ano, mes, dia, por, nome, estabelecimento );
+
+ table2.setRendered(true);
+ txtSearchMsg.setRendered(false);
+ getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList);
+
+
+ }
+ catch(Exception ex)
+ {
+ table2.setRendered(false);
+ txtSearchMsg.setRendered(true);
+ txtSearchMsg.setText("Não foram encontrados registos para a sua pesquisa !");
+ //ex.printStackTrace();
+ }
+
+ return null;
+ }
+
+ public String lnkDataConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirGerRh");
+ return "view_analise";
+
+ }
+
+ public String lnkDataAberturaConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirGerRh");
+ return "view_analise";
+ }
+
+ public String lnkNrConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirGerRh");
+ return "view_analise";
+
+ }
+
+ public String lnkPorConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirGerRh");
+ return "view_analise";
+
+ }
+
+ public String lnkNomeConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirGerRh");
+ return "view_analise";
+
+ }
+
+ public String lnkEstabConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirGerRh");
+ return "view_analise";
+
+ }
+
+ private AnaliseAcidente getTableConcluidasRowData()
+ {
+ RowKey rk = tableRowGroup2.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ AnalisesConcluidasDataProvider provider = (AnalisesConcluidasDataProvider) tableRowGroup2.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ AnaliseAcidente a = (AnaliseAcidente)list.get(k);
+ return a;
+ }
+
+
+ public String lnkGerirUtilizadores_action() {
+ // TODO: Replace with your code
+
+ getSessionBean1().setNavFrom("FormDirGerRh");
+ //getSessionBean1().setModoEdicaoUtilizador("new");
+ return "gestao_utilizadores";
+
+ }
+
+ private void fillAnoDropDown()
+ {
+// ArrayList anosList = new ArrayList();
+// for(int ano=2007; ano<2051; ano++)
+// {
+// anosList.add(new Integer(ano));
+// }
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ ArrayList anosList = adp.getAnosListFromAnalises();
+ com.sun.rave.web.ui.model.Option[] anoOptions = new com.sun.rave.web.ui.model.Option[anosList.size()+1];
+ anoOptions[0] = new Option("", "");
+ ListIterator iter = anosList.listIterator();
+ int i = 1;
+ while(iter.hasNext())
+ {
+ Integer ano = (Integer) iter.next();
+
+ anoOptions[i] = new Option(ano, ano.toString());
+ i++;
+ }
+ getSessionBean1().setAnoOptions(anoOptions);
+ Calendar cal = new GregorianCalendar();
+ int year = cal.get(Calendar.YEAR);
+ //drpAno.setSelected( new Integer(year) );
+
+ }
+ catch(Exception ex)
+ {
+ //ex.printStackTrace();
+ }
+
+ }
+
+
+ private void fillMesDropDown()
+ {
+ com.sun.rave.web.ui.model.Option[] mesOptions = new com.sun.rave.web.ui.model.Option[13];
+ mesOptions[0] = new Option("", "");
+ mesOptions[1] = new Option(new Integer(1), "Janeiro");
+ mesOptions[2] = new Option(new Integer(2), "Fevereiro");
+ mesOptions[3] = new Option(new Integer(3), "Março");
+ mesOptions[4] = new Option(new Integer(4), "Abril");
+ mesOptions[5] = new Option(new Integer(5), "Maio");
+ mesOptions[6] = new Option(new Integer(6), "Junho");
+ mesOptions[7] = new Option(new Integer(7), "Julho");
+ mesOptions[8] = new Option(new Integer(8), "Agosto");
+ mesOptions[9] = new Option(new Integer(9), "Setembro");
+ mesOptions[10] = new Option(new Integer(10), "Outubro");
+ mesOptions[11] = new Option(new Integer(11), "Novembro");
+ mesOptions[12] = new Option(new Integer(12), "Dezembro");
+ getSessionBean1().setMesOptions(mesOptions);
+ Calendar cal = new GregorianCalendar();
+ int month = cal.get(Calendar.MONTH); // 0=Jan, 1=Feb, ...
+ //drpMes.setSelected( new Integer(month+1) );
+ }
+
+// private void fillDiaDropDown()
+// {
+//
+// }
+
+ public String lnkAjuda_action() {
+ // TODO: Replace with your code
+// ServletContext theApplicationsServletContext =
+// (ServletContext) this.getExternalContext().getContext();
+// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL);
+// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf";
+//
+// Global global = new Global();
+// try
+// {
+// global.showPdf(pdfFilePath);
+// }
+// catch(Exception ex)
+// {
+// ex.printStackTrace();
+// }
+ return null;
+ }
+
+ public String lnkPlanosActuacao_action() {
+ // TODO: Replace with your code
+ Utilizador u = getSessionBean1().getCurrentUser();
+// String curUser = "?user=" + u.getId().toString();
+ FacesContext fc = getFacesContext().getCurrentInstance();
+ Global.redirectToPlanos(fc, u);
+// Utilizador u = getSessionBean1().getCurrentUser();
+// String curUser = "?user=" + u.getId().toString();
+// FacesContext fc = getFacesContext().getCurrentInstance();
+// try
+// {
+// JSFUtils.redirect(fc, Global.PLANOS_ACTUACAO_URL + curUser);
+// }
+// catch(Exception ex)
+// {
+//
+// }
+ return null;
+ }
+
+ public String buttonFilterSeg_action()
+ {
+ Date visitaDate = ( Date ) calFilterDateSeg.getValue();
+ String visitaDateStr = null;
+ if ( visitaDate != null )
+ {
+ visitaDateStr = D_F.format( visitaDate );
+ }
+
+ String POR = null;
+ if ( textFilterPORSeg.getText() != null )
+ {
+ POR = ( ( String ) textFilterPORSeg.getText() ).trim();
+ if ( POR.length() == 0 )
+ {
+ POR = null;
+ }
+ }
+
+ String nome = null;
+ if ( textFilterNameSeg.getText() != null )
+ {
+ nome = (( String ) textFilterNameSeg.getText()).trim();
+ if( nome.length() == 0 )
+ {
+ nome = null;
+ }
+ }
+
+ String estabelecimento = null;
+ if ( textFilterEstabelecimentoSeg.getText() != null )
+ {
+ estabelecimento = (( String ) textFilterEstabelecimentoSeg.getText()).trim();
+ if ( estabelecimento.length() == 0 )
+ {
+ estabelecimento = null;
+ }
+ }
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ ArrayList seguimentoList = adp.searchAnalisesSeguimentoDirGerRh( nome, estabelecimento, visitaDateStr, POR );
+
+ table1.setRendered( true );
+ txtSearchMsg.setRendered( false );
+ getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList );
+ }
+ catch( Exception e )
+ {
+ table1.setRendered( false );
+ txtSearchMsg.setRendered( true );
+ txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" );
+ }
+
+ return null;
+ }
+
+}
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormDirSiprp.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormDirSiprp.java
new file mode 100755
index 00000000..5fe5e2be
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormDirSiprp.java
@@ -0,0 +1,1593 @@
+/*
+ * FormDirSiprp.java
+ *
+ * Created on November 21, 2007, 1:25 PM
+ * Copyright lluis2
+ */
+package analiseacidentestrabalho;
+
+import com.sun.data.provider.RowKey;
+import com.sun.rave.web.ui.appbase.AbstractPageBean;
+import com.sun.rave.web.ui.component.Body;
+import com.sun.rave.web.ui.component.Button;
+import com.sun.rave.web.ui.component.DropDown;
+import com.sun.rave.web.ui.component.Form;
+import com.sun.rave.web.ui.component.Head;
+import com.sun.rave.web.ui.component.Html;
+import com.sun.rave.web.ui.component.Hyperlink;
+import com.sun.rave.web.ui.component.ImageComponent;
+import com.sun.rave.web.ui.component.Link;
+import com.sun.rave.web.ui.component.Page;
+import com.sun.rave.web.ui.component.PanelGroup;
+import com.sun.rave.web.ui.component.StaticText;
+import com.sun.rave.web.ui.component.Table;
+import com.sun.rave.web.ui.component.TableColumn;
+import com.sun.rave.web.ui.component.TableRowGroup;
+import com.sun.rave.web.ui.component.TextField;
+import com.sun.rave.web.ui.model.Option;
+import db.AnalisesConcluidasDataProvider;
+import db.AnalisesDataProvider;
+import db.AnalisesSeguimentoDataProvider;
+import global.Global;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.ListIterator;
+import javax.faces.FacesException;
+import javax.faces.component.html.HtmlPanelGrid;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ValueChangeEvent;
+import javax.servlet.http.HttpServletRequest;
+import utils.Utils;
+
+/**
+ * Page bean that corresponds to a similarly named JSP page. This
+ * class contains component definitions (and initialization code) for
+ * all components that you have defined on this page, as well as
+ * lifecycle methods and event handlers where you may add behavior
+ * to respond to incoming events.
+ */
+public class FormDirSiprp extends AbstractPageBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+
+ private Page page1 = new Page();
+
+ public Page getPage1() {
+ return page1;
+ }
+
+ public void setPage1(Page p) {
+ this.page1 = p;
+ }
+
+ private Html html1 = new Html();
+
+ public Html getHtml1() {
+ return html1;
+ }
+
+ public void setHtml1(Html h) {
+ this.html1 = h;
+ }
+
+ private Head head1 = new Head();
+
+ public Head getHead1() {
+ return head1;
+ }
+
+ public void setHead1(Head h) {
+ this.head1 = h;
+ }
+
+ private Link link1 = new Link();
+
+ public Link getLink1() {
+ return link1;
+ }
+
+ public void setLink1(Link l) {
+ this.link1 = l;
+ }
+
+ private Body body1 = new Body();
+
+ public Body getBody1() {
+ return body1;
+ }
+
+ public void setBody1(Body b) {
+ this.body1 = b;
+ }
+
+ private Form form1 = new Form();
+
+ public Form getForm1() {
+ return form1;
+ }
+
+ public void setForm1(Form f) {
+ this.form1 = f;
+ }
+
+ private HtmlPanelGrid gridBase1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridBase1() {
+ return gridBase1;
+ }
+
+ public void setGridBase1(HtmlPanelGrid hpg) {
+ this.gridBase1 = hpg;
+ }
+
+ private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLayout1() {
+ return gridLayout1;
+ }
+
+ public void setGridLayout1(HtmlPanelGrid hpg) {
+ this.gridLayout1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel1() {
+ return gridPanel1;
+ }
+
+ public void setGridPanel1(HtmlPanelGrid hpg) {
+ this.gridPanel1 = hpg;
+ }
+
+ private PanelGroup groupPanel1 = new PanelGroup();
+
+ public PanelGroup getGroupPanel1() {
+ return groupPanel1;
+ }
+
+ public void setGroupPanel1(PanelGroup pg) {
+ this.groupPanel1 = pg;
+ }
+
+ private ImageComponent image1 = new ImageComponent();
+
+ public ImageComponent getImage1() {
+ return image1;
+ }
+
+ public void setImage1(ImageComponent ic) {
+ this.image1 = ic;
+ }
+
+ private ImageComponent image2 = new ImageComponent();
+
+ public ImageComponent getImage2() {
+ return image2;
+ }
+
+ public void setImage2(ImageComponent ic) {
+ this.image2 = ic;
+ }
+
+ private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLayoutTop1() {
+ return gridLayoutTop1;
+ }
+
+ public void setGridLayoutTop1(HtmlPanelGrid hpg) {
+ this.gridLayoutTop1 = hpg;
+ }
+
+ private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridSeguimento1() {
+ return gridSeguimento1;
+ }
+
+ public void setGridSeguimento1(HtmlPanelGrid hpg) {
+ this.gridSeguimento1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel4() {
+ return gridPanel4;
+ }
+
+ public void setGridPanel4(HtmlPanelGrid hpg) {
+ this.gridPanel4 = hpg;
+ }
+
+ private StaticText staticText4 = new StaticText();
+
+ public StaticText getStaticText4() {
+ return staticText4;
+ }
+
+ public void setStaticText4(StaticText st) {
+ this.staticText4 = st;
+ }
+
+ private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel5() {
+ return gridPanel5;
+ }
+
+ public void setGridPanel5(HtmlPanelGrid hpg) {
+ this.gridPanel5 = hpg;
+ }
+
+ private Table table2 = new Table();
+
+ public Table getTable2() {
+ return table2;
+ }
+
+ public void setTable2(Table t) {
+ this.table2 = t;
+ }
+
+ private TableRowGroup tableRowGroup2 = new TableRowGroup();
+
+ public TableRowGroup getTableRowGroup2() {
+ return tableRowGroup2;
+ }
+
+ public void setTableRowGroup2(TableRowGroup trg) {
+ this.tableRowGroup2 = trg;
+ }
+
+ private TableColumn tableColumn6 = new TableColumn();
+
+ public TableColumn getTableColumn6() {
+ return tableColumn6;
+ }
+
+ public void setTableColumn6(TableColumn tc) {
+ this.tableColumn6 = tc;
+ }
+
+ private Hyperlink lnkDataAcidenteSeg = new Hyperlink();
+
+ public Hyperlink getLnkDataAcidenteSeg() {
+ return lnkDataAcidenteSeg;
+ }
+
+ public void setLnkDataAcidenteSeg(Hyperlink h) {
+ this.lnkDataAcidenteSeg = h;
+ }
+
+ private TableColumn tableColumn7 = new TableColumn();
+
+ public TableColumn getTableColumn7() {
+ return tableColumn7;
+ }
+
+ public void setTableColumn7(TableColumn tc) {
+ this.tableColumn7 = tc;
+ }
+
+ private Hyperlink lnkNrSeg = new Hyperlink();
+
+ public Hyperlink getLnkNrSeg() {
+ return lnkNrSeg;
+ }
+
+ public void setLnkNrSeg(Hyperlink h) {
+ this.lnkNrSeg = h;
+ }
+
+ private TableColumn tableColumn8 = new TableColumn();
+
+ public TableColumn getTableColumn8() {
+ return tableColumn8;
+ }
+
+ public void setTableColumn8(TableColumn tc) {
+ this.tableColumn8 = tc;
+ }
+
+ private Hyperlink lnkPorSeg = new Hyperlink();
+
+ public Hyperlink getLnkPorSeg() {
+ return lnkPorSeg;
+ }
+
+ public void setLnkPorSeg(Hyperlink h) {
+ this.lnkPorSeg = h;
+ }
+
+ private TableColumn tableColumn9 = new TableColumn();
+
+ public TableColumn getTableColumn9() {
+ return tableColumn9;
+ }
+
+ public void setTableColumn9(TableColumn tc) {
+ this.tableColumn9 = tc;
+ }
+
+ private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink();
+
+ public Hyperlink getLnkNomeAcidentadoSeg() {
+ return lnkNomeAcidentadoSeg;
+ }
+
+ public void setLnkNomeAcidentadoSeg(Hyperlink h) {
+ this.lnkNomeAcidentadoSeg = h;
+ }
+
+ private TableColumn tableColumn10 = new TableColumn();
+
+ public TableColumn getTableColumn10() {
+ return tableColumn10;
+ }
+
+ public void setTableColumn10(TableColumn tc) {
+ this.tableColumn10 = tc;
+ }
+
+ private Hyperlink lnkFaseSeg = new Hyperlink();
+
+ public Hyperlink getLnkFaseSeg() {
+ return lnkFaseSeg;
+ }
+
+ public void setLnkFaseSeg(Hyperlink h) {
+ this.lnkFaseSeg = h;
+ }
+
+ private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridConcluidos1() {
+ return gridConcluidos1;
+ }
+
+ public void setGridConcluidos1(HtmlPanelGrid hpg) {
+ this.gridConcluidos1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel6() {
+ return gridPanel6;
+ }
+
+ public void setGridPanel6(HtmlPanelGrid hpg) {
+ this.gridPanel6 = hpg;
+ }
+
+ private StaticText staticText5 = new StaticText();
+
+ public StaticText getStaticText5() {
+ return staticText5;
+ }
+
+ public void setStaticText5(StaticText st) {
+ this.staticText5 = st;
+ }
+
+ private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel7() {
+ return gridPanel7;
+ }
+
+ public void setGridPanel7(HtmlPanelGrid hpg) {
+ this.gridPanel7 = hpg;
+ }
+
+ private PanelGroup groupPanel3 = new PanelGroup();
+
+ public PanelGroup getGroupPanel3() {
+ return groupPanel3;
+ }
+
+ public void setGroupPanel3(PanelGroup pg) {
+ this.groupPanel3 = pg;
+ }
+
+ private StaticText staticText6 = new StaticText();
+
+ public StaticText getStaticText6() {
+ return staticText6;
+ }
+
+ public void setStaticText6(StaticText st) {
+ this.staticText6 = st;
+ }
+
+ private DropDown drpAno = new DropDown();
+
+ public DropDown getDrpAno() {
+ return drpAno;
+ }
+
+ public void setDrpAno(DropDown dd) {
+ this.drpAno = dd;
+ }
+
+ private PanelGroup groupPanel4 = new PanelGroup();
+
+ public PanelGroup getGroupPanel4() {
+ return groupPanel4;
+ }
+
+ public void setGroupPanel4(PanelGroup pg) {
+ this.groupPanel4 = pg;
+ }
+
+ private StaticText lblMes = new StaticText();
+
+ public StaticText getLblMes() {
+ return lblMes;
+ }
+
+ public void setLblMes(StaticText st) {
+ this.lblMes = st;
+ }
+
+ private DropDown drpMes = new DropDown();
+
+ public DropDown getDrpMes() {
+ return drpMes;
+ }
+
+ public void setDrpMes(DropDown dd) {
+ this.drpMes = dd;
+ }
+
+ private PanelGroup groupPanel5 = new PanelGroup();
+
+ public PanelGroup getGroupPanel5() {
+ return groupPanel5;
+ }
+
+ public void setGroupPanel5(PanelGroup pg) {
+ this.groupPanel5 = pg;
+ }
+
+ private StaticText lblDia = new StaticText();
+
+ public StaticText getLblDia() {
+ return lblDia;
+ }
+
+ public void setLblDia(StaticText st) {
+ this.lblDia = st;
+ }
+
+ private DropDown drpDia = new DropDown();
+
+ public DropDown getDrpDia() {
+ return drpDia;
+ }
+
+ public void setDrpDia(DropDown dd) {
+ this.drpDia = dd;
+ }
+
+ private PanelGroup groupPanel6 = new PanelGroup();
+
+ public PanelGroup getGroupPanel6() {
+ return groupPanel6;
+ }
+
+ public void setGroupPanel6(PanelGroup pg) {
+ this.groupPanel6 = pg;
+ }
+
+ private StaticText staticText7 = new StaticText();
+
+ public StaticText getStaticText7() {
+ return staticText7;
+ }
+
+ public void setStaticText7(StaticText st) {
+ this.staticText7 = st;
+ }
+
+ private TextField txtPor = new TextField();
+
+ public TextField getTxtPor() {
+ return txtPor;
+ }
+
+ public void setTxtPor(TextField tf) {
+ this.txtPor = tf;
+ }
+
+ private PanelGroup groupPanel7 = new PanelGroup();
+
+ public PanelGroup getGroupPanel7() {
+ return groupPanel7;
+ }
+
+ public void setGroupPanel7(PanelGroup pg) {
+ this.groupPanel7 = pg;
+ }
+
+ private StaticText staticText8 = new StaticText();
+
+ public StaticText getStaticText8() {
+ return staticText8;
+ }
+
+ public void setStaticText8(StaticText st) {
+ this.staticText8 = st;
+ }
+
+ private TextField txtNome = new TextField();
+
+ public TextField getTxtNome() {
+ return txtNome;
+ }
+
+ public void setTxtNome(TextField tf) {
+ this.txtNome = tf;
+ }
+
+ private Button butPesquisar = new Button();
+
+ public Button getButPesquisar() {
+ return butPesquisar;
+ }
+
+ public void setButPesquisar(Button b) {
+ this.butPesquisar = b;
+ }
+
+ private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel8() {
+ return gridPanel8;
+ }
+
+ public void setGridPanel8(HtmlPanelGrid hpg) {
+ this.gridPanel8 = hpg;
+ }
+
+ private Table table3 = new Table();
+
+ public Table getTable3() {
+ return table3;
+ }
+
+ public void setTable3(Table t) {
+ this.table3 = t;
+ }
+
+ private TableRowGroup tableRowGroup3 = new TableRowGroup();
+
+ public TableRowGroup getTableRowGroup3() {
+ return tableRowGroup3;
+ }
+
+ public void setTableRowGroup3(TableRowGroup trg) {
+ this.tableRowGroup3 = trg;
+ }
+
+ private TableColumn tableColumn11 = new TableColumn();
+
+ public TableColumn getTableColumn11() {
+ return tableColumn11;
+ }
+
+ public void setTableColumn11(TableColumn tc) {
+ this.tableColumn11 = tc;
+ }
+
+ private Hyperlink lnkDataConcluida = new Hyperlink();
+
+ public Hyperlink getLnkDataConcluida() {
+ return lnkDataConcluida;
+ }
+
+ public void setLnkDataConcluida(Hyperlink h) {
+ this.lnkDataConcluida = h;
+ }
+
+ private TableColumn tableColumn12 = new TableColumn();
+
+ public TableColumn getTableColumn12() {
+ return tableColumn12;
+ }
+
+ public void setTableColumn12(TableColumn tc) {
+ this.tableColumn12 = tc;
+ }
+
+ private Hyperlink lnkNrConcluida = new Hyperlink();
+
+ public Hyperlink getLnkNrConcluida() {
+ return lnkNrConcluida;
+ }
+
+ public void setLnkNrConcluida(Hyperlink h) {
+ this.lnkNrConcluida = h;
+ }
+
+ private TableColumn tableColumn13 = new TableColumn();
+
+ public TableColumn getTableColumn13() {
+ return tableColumn13;
+ }
+
+ public void setTableColumn13(TableColumn tc) {
+ this.tableColumn13 = tc;
+ }
+
+ private Hyperlink lnkPorConcluida = new Hyperlink();
+
+ public Hyperlink getLnkPorConcluida() {
+ return lnkPorConcluida;
+ }
+
+ public void setLnkPorConcluida(Hyperlink h) {
+ this.lnkPorConcluida = h;
+ }
+
+ private TableColumn tableColumn14 = new TableColumn();
+
+ public TableColumn getTableColumn14() {
+ return tableColumn14;
+ }
+
+ public void setTableColumn14(TableColumn tc) {
+ this.tableColumn14 = tc;
+ }
+
+ private Hyperlink lnkNomeConcluida = new Hyperlink();
+
+ public Hyperlink getLnkNomeConcluida() {
+ return lnkNomeConcluida;
+ }
+
+ public void setLnkNomeConcluida(Hyperlink h) {
+ this.lnkNomeConcluida = h;
+ }
+
+ private TableColumn tableColumn15 = new TableColumn();
+
+ public TableColumn getTableColumn15() {
+ return tableColumn15;
+ }
+
+ public void setTableColumn15(TableColumn tc) {
+ this.tableColumn15 = tc;
+ }
+
+ private Hyperlink lnkEstabConcluida = new Hyperlink();
+
+ public Hyperlink getLnkEstabConcluida() {
+ return lnkEstabConcluida;
+ }
+
+ public void setLnkEstabConcluida(Hyperlink h) {
+ this.lnkEstabConcluida = h;
+ }
+
+ private StaticText txtSearchMsg = new StaticText();
+
+ public StaticText getTxtSearchMsg() {
+ return txtSearchMsg;
+ }
+
+ public void setTxtSearchMsg(StaticText st) {
+ this.txtSearchMsg = st;
+ }
+
+ private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel9() {
+ return gridPanel9;
+ }
+
+ public void setGridPanel9(HtmlPanelGrid hpg) {
+ this.gridPanel9 = hpg;
+ }
+
+ private PanelGroup groupPanel8 = new PanelGroup();
+
+ public PanelGroup getGroupPanel8() {
+ return groupPanel8;
+ }
+
+ public void setGroupPanel8(PanelGroup pg) {
+ this.groupPanel8 = pg;
+ }
+
+ private StaticText staticText9 = new StaticText();
+
+ public StaticText getStaticText9() {
+ return staticText9;
+ }
+
+ public void setStaticText9(StaticText st) {
+ this.staticText9 = st;
+ }
+
+ private ImageComponent image3 = new ImageComponent();
+
+ public ImageComponent getImage3() {
+ return image3;
+ }
+
+ public void setImage3(ImageComponent ic) {
+ this.image3 = ic;
+ }
+
+ private StaticText staticText10 = new StaticText();
+
+ public StaticText getStaticText10() {
+ return staticText10;
+ }
+
+ public void setStaticText10(StaticText st) {
+ this.staticText10 = st;
+ }
+
+ private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel2() {
+ return gridPanel2;
+ }
+
+ public void setGridPanel2(HtmlPanelGrid hpg) {
+ this.gridPanel2 = hpg;
+ }
+
+ private StaticText txtMsg1 = new StaticText();
+
+ public StaticText getTxtMsg1() {
+ return txtMsg1;
+ }
+
+ public void setTxtMsg1(StaticText st) {
+ this.txtMsg1 = st;
+ }
+
+ private TableColumn tableColumn1 = new TableColumn();
+
+ public TableColumn getTableColumn1() {
+ return tableColumn1;
+ }
+
+ public void setTableColumn1(TableColumn tc) {
+ this.tableColumn1 = tc;
+ }
+
+ private Hyperlink lnkDataAberturaSeg1 = new Hyperlink();
+
+ public Hyperlink getLnkDataAberturaSeg1() {
+ return lnkDataAberturaSeg1;
+ }
+
+ public void setLnkDataAberturaSeg1(Hyperlink h) {
+ this.lnkDataAberturaSeg1 = h;
+ }
+
+ private TableColumn tableColumn2 = new TableColumn();
+
+ public TableColumn getTableColumn2() {
+ return tableColumn2;
+ }
+
+ public void setTableColumn2(TableColumn tc) {
+ this.tableColumn2 = tc;
+ }
+
+ private Hyperlink lnkDataAberturaConcluida1 = new Hyperlink();
+
+ public Hyperlink getLnkDataAberturaConcluida1() {
+ return lnkDataAberturaConcluida1;
+ }
+
+ public void setLnkDataAberturaConcluida1(Hyperlink h) {
+ this.lnkDataAberturaConcluida1 = h;
+ }
+
+ private TableColumn tableColumn3 = new TableColumn();
+
+ public TableColumn getTableColumn3() {
+ return tableColumn3;
+ }
+
+ public void setTableColumn3(TableColumn tc) {
+ this.tableColumn3 = tc;
+ }
+
+ private Hyperlink lnkEstabelecimentoSeg1 = new Hyperlink();
+
+ public Hyperlink getLnkEstabelecimentoSeg1() {
+ return lnkEstabelecimentoSeg1;
+ }
+
+ public void setLnkEstabelecimentoSeg1(Hyperlink h) {
+ this.lnkEstabelecimentoSeg1 = h;
+ }
+ private Hyperlink lnkPlanosActuacao = new Hyperlink();
+
+ public Hyperlink getLnkPlanosActuacao() {
+ return lnkPlanosActuacao;
+ }
+
+ public void setLnkPlanosActuacao(Hyperlink h) {
+ this.lnkPlanosActuacao = h;
+ }
+ private StaticText lblUser = new StaticText();
+
+ public StaticText getLblUser() {
+ return lblUser;
+ }
+
+ public void setLblUser(StaticText st) {
+ this.lblUser = st;
+ }
+
+ //
+
+
+
+ private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid();
+ public HtmlPanelGrid getGridPanelFilterSeg()
+ {
+ return this.gridPanelFilterSeg;
+ }
+ public void setGridPanelFilterSeg( HtmlPanelGrid pg )
+ {
+ this.gridPanelFilterSeg = pg;
+ }
+
+ private PanelGroup groupPanelFilterSeg = new PanelGroup();
+ public PanelGroup getGroupPanelFilterSeg()
+ {
+ return this.groupPanelFilterSeg;
+ }
+ public void setGroupPanelFilterSeg( PanelGroup pg )
+ {
+ this.groupPanelFilterSeg = pg;
+ }
+
+ private StaticText labelFilterNameSeg = new StaticText();
+ public StaticText getLabelFilterNameSeg()
+ {
+ return this.labelFilterNameSeg;
+ }
+ public void setLabelFilterNameSeg( StaticText st )
+ {
+ this.labelFilterNameSeg = st;
+ }
+
+ private TextField textFilterNameSeg = new TextField();
+ public TextField getTextFilterNameSeg()
+ {
+ return this.textFilterNameSeg;
+ }
+ public void setTextFilterNameSeg( TextField tf )
+ {
+ this.textFilterNameSeg = tf;
+ }
+
+ private StaticText labelFilterEstabelecimentoSeg = new StaticText();
+ public StaticText getLabelFilterEstabelecimentoSeg() {
+ return labelFilterEstabelecimentoSeg;
+ }
+ public void setLabelFilterEstabelecimentoSeg(StaticText labelFilterEstabelecimentoSeg) {
+ this.labelFilterEstabelecimentoSeg = labelFilterEstabelecimentoSeg;
+ }
+
+ private TextField textFilterEstabelecimentoSeg = new TextField();
+
+ public TextField getTextFilterEstabelecimentoSeg() {
+ return textFilterEstabelecimentoSeg;
+ }
+ public void setTextFilterEstabelecimentoSeg(TextField textFilterEstabelecimentoSeg) {
+ this.textFilterEstabelecimentoSeg = textFilterEstabelecimentoSeg;
+ }
+
+ private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar();
+ public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg()
+ {
+ return this.calFilterDateSeg;
+ }
+ public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c )
+ {
+ this.calFilterDateSeg = c;
+ }
+
+ private TextField textFilterPORSeg = new TextField();
+
+ public TextField getTextFilterPORSeg() {
+ return textFilterPORSeg;
+ }
+
+ public void setTextFilterPORSeg(TextField textFilterPORSeg) {
+ this.textFilterPORSeg = textFilterPORSeg;
+ }
+
+
+ private Button buttonFilterSeg = new Button();
+ public Button getButtonFilterSeg()
+ {
+ return this.buttonFilterSeg;
+ }
+ public void setButtonFilterSeg( Button b )
+ {
+ this.buttonFilterSeg = b;
+ }
+
+ private TextField textFilterEstabelecimentoConc = new TextField();
+
+ public TextField getTextFilterEstabelecimentoConc() {
+ return textFilterEstabelecimentoConc;
+ }
+
+ public void setTextFilterEstabelecimentoConc(TextField textFilterEstabelecimentoConc) {
+ this.textFilterEstabelecimentoConc = textFilterEstabelecimentoConc;
+ }
+
+ private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" );
+
+ /**
+ * Construct a new Page bean instance.
+ */
+ public FormDirSiprp() {
+ }
+
+ /**
+ * Callback method that is called whenever a page is navigated to,
+ * either directly via a URL, or indirectly via page navigation.
+ * Customize this method to acquire resources that will be needed
+ * for event handlers and lifecycle methods, whether or not this
+ * page is performing post back processing.
+ *
+ * Note that, if the current request is a postback, the property
+ * values of the components do not represent any
+ * values submitted with this request. Instead, they represent the
+ * property values that were saved for this view when it was rendered.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+ if (!getSessionBean1().isLoggedIn()) {
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {
+ // . . . handle exception . . .
+ }
+ }
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("FormDirSiprp Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+ }
+
+ /**
+ * Callback method that is called after the component tree has been
+ * restored, but before any event processing takes place. This method
+ * will only be called on a postback request that
+ * is processing a form submit. Customize this method to allocate
+ * resources that will be required in your event handlers.
+ */
+ public void preprocess() {
+ txtMsg1.setText(getSessionBean1().getMsg());
+ getSessionBean1().setMsg("");
+ }
+
+ /**
+ * Callback method that is called just before rendering takes place.
+ * This method will only be called for the page that
+ * will actually be rendered (and not, for example, on a page that
+ * handled a postback and then navigated to a different page). Customize
+ * this method to allocate resources that will be required for rendering
+ * this page.
+ */
+ public void prerender() {
+ System.out.println("=== FORM_DIR_SIPRP ===");
+ lblUser.setText( getSessionBean1().getCurrentUser().getLogin() );
+
+ HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest();
+ String referer = request.getRequestURI();
+ String pageFrom = Utils.getPageFrom(referer);
+ if((!pageFrom.matches("FormDirSiprp.jsp")) || getSessionBean1().isFromAnaliseDeletion())
+ {
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+
+ try
+ {
+ //lblActivos.setRendered(true);
+ table2.setRendered( true );
+
+ ArrayList seguimentoList = adp.getAnalisesSeguimentoDirSiprpList();
+ getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList );
+ }
+ catch(Exception ex)
+ {
+ //lblActivos.setRendered(false);
+ table2.setRendered( false );
+ ex.printStackTrace();
+ }
+
+ try
+ {
+ //lblActivos.setRendered(true);
+ table3.setRendered(true);
+
+ ArrayList concluidasList = adp.getAnalisesConcluidasList(null);
+ getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList);
+ }
+ catch(Exception ex)
+ {
+ //lblActivos.setRendered(false);
+ table3.setRendered(false);
+ //ex.printStackTrace();
+ }
+ fillAnoDropDown();
+ }
+ }
+
+ //}
+
+ /**
+ * Callback method that is called after rendering is completed for
+ * this request, if init() was called (regardless of whether
+ * or not this was the page that was actually rendered). Customize this
+ * method to release resources acquired in the init(),
+ * preprocess(), or prerender() methods (or
+ * acquired during execution of an event handler).
+ */
+ public void destroy() {
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected RequestBean1 getRequestBean1() {
+ return (RequestBean1)getBean("RequestBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected SessionBean1 getSessionBean1() {
+ return (SessionBean1)getBean("SessionBean1");
+ }
+
+ public String lnkEditUser_action() {
+ // TODO: Replace with your code
+
+ getSessionBean1().setNavFrom("FormDirSiprp");
+ getSessionBean1().setModoEdicaoUtilizador("edit");
+ return "user";
+ }
+
+ public String lnkLogout_action() {
+ // TODO: Replace with your code
+
+ try
+ {
+ javax.servlet.http.HttpSession session =
+ (javax.servlet.http.HttpSession) getExternalContext().getSession(true);
+ session.invalidate();
+ }
+ catch(Exception ex){}
+
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {}
+ //return "login";
+ return null;
+ }
+
+ public String lnkDataAcidente_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkNr_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkPor_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkNomeAcidentado_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkFase_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkDataAcidenteSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirSiprp");
+ return "view_analise";
+ }
+
+ public String lnkDataAberturaSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirSiprp");
+ return "view_analise";
+ }
+
+ public String lnkNrSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirSiprp");
+ return "view_analise";
+ }
+
+ public String lnkPorSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirSiprp");
+ return "view_analise";
+ }
+
+ public String lnkNomeAcidentadoSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirSiprp");
+ return "view_analise";
+ }
+
+ public String lnkFaseSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirSiprp");
+ return "view_analise";
+ }
+
+ public String lnkEstabelecimentoSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirSiprp");
+ return "view_analise";
+ }
+
+
+ private AnaliseAcidente getTableSeguimentoRowData()
+ {
+ RowKey rk = tableRowGroup2.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ AnalisesSeguimentoDataProvider provider = (AnalisesSeguimentoDataProvider) tableRowGroup2.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ AnaliseAcidente a = (AnaliseAcidente)list.get(k);
+ return a;
+ }
+
+ public void drpAno_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+ Object ano = event.getNewValue();
+ if(ano == null)
+ {
+ lblMes.setVisible(false);
+ drpMes.setVisible(false);
+ lblDia.setVisible(false);
+ drpDia.setVisible(false);
+ }
+ else
+ {
+ lblMes.setVisible(true);
+ drpMes.setVisible(true);
+ fillMesDropDown();
+ }
+ }
+
+ public void drpMes_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+ Object mes = event.getNewValue();
+ if(mes == null)
+ {
+ lblDia.setVisible(false);
+ drpDia.setVisible(false);
+ }
+ else
+ {
+ lblDia.setVisible(true);
+ drpDia.setVisible(true);
+ //fillDiaDropDown();
+ }
+ }
+
+ public void drpDia_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+
+ }
+
+ public String butPesquisar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ Object obAno = null;
+ Object obMes = null;
+ Object obDia = null;
+ try
+ {
+ obAno = drpAno.getSelected();
+ obMes = drpMes.getSelected();
+ obDia = drpDia.getSelected();
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ Integer ano = null;
+ Integer mes = null;
+ Integer dia = null;
+
+ if(obAno != null)
+ {
+ ano = (Integer) obAno;
+ }
+
+ if(obMes != null)
+ {
+ mes = (Integer) obMes;
+ }
+
+ if(obDia != null)
+ {
+ dia = (Integer) obDia;
+ }
+
+ String por = null;
+ if(txtPor.getText() != null)
+ {
+ por = (String) txtPor.getText();
+ if(por.trim().length() == 0)
+ {
+ por = null;
+ }
+ }
+
+ String nome = null;
+ if(txtNome.getText() != null)
+ {
+ nome = (String) txtNome.getText();
+ if(nome.trim().length() == 0)
+ {
+ nome = null;
+ }
+ }
+
+ String estabelecimento = null;
+ if ( textFilterEstabelecimentoConc.getText() != null )
+ {
+ estabelecimento = (( String ) textFilterEstabelecimentoConc.getText()).trim();
+ if( estabelecimento.length() == 0 )
+ {
+ estabelecimento = null;
+ }
+ }
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+
+ //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList());
+ ArrayList concluidasList = adp.searchAanalisesConcluidasList(
+ null, ano, mes, dia, por, nome, estabelecimento );
+
+ table3.setRendered(true);
+ txtSearchMsg.setRendered(false);
+ getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList);
+
+
+ }
+ catch(Exception ex)
+ {
+ table3.setRendered(false);
+ txtSearchMsg.setRendered(true);
+ txtSearchMsg.setText("Não foram encontrados registos para a sua pesquisa !");
+ //ex.printStackTrace();
+ }
+
+ return null;
+ }
+
+ public String lnkDataConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirSiprp");
+ return "view_analise";
+ }
+
+ public String lnkDataAberturaConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirSiprp");
+ return "view_analise";
+ }
+
+ public String lnkNrConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirSiprp");
+ return "view_analise";
+ }
+
+ public String lnkPorConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirSiprp");
+ return "view_analise";
+ }
+
+ public String lnkNomeConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirSiprp");
+ return "view_analise";
+ }
+
+ public String lnkEstabConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormDirSiprp");
+ return "view_analise";
+ }
+
+ private AnaliseAcidente getTableConcluidasRowData()
+ {
+ RowKey rk = tableRowGroup3.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ AnalisesConcluidasDataProvider provider = (AnalisesConcluidasDataProvider) tableRowGroup3.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ AnaliseAcidente a = (AnaliseAcidente)list.get(k);
+ return a;
+ }
+
+ public String lnkNewUser_action() {
+ // TODO: Replace with your code
+
+ getSessionBean1().setNavFrom("FormDirSiprp");
+ //getSessionBean1().setModoEdicaoUtilizador("new");
+ return "gestao_utilizadores";
+ }
+
+ private void fillAnoDropDown()
+ {
+// ArrayList anosList = new ArrayList();
+// for(int ano=2007; ano<2051; ano++)
+// {
+// anosList.add(new Integer(ano));
+// }
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ ArrayList anosList = adp.getAnosListFromAnalises();
+ com.sun.rave.web.ui.model.Option[] anoOptions = new com.sun.rave.web.ui.model.Option[anosList.size()+1];
+ anoOptions[0] = new Option("", "");
+ ListIterator iter = anosList.listIterator();
+ int i = 1;
+ while(iter.hasNext())
+ {
+ Integer ano = (Integer) iter.next();
+
+ anoOptions[i] = new Option(ano, ano.toString());
+ i++;
+ }
+ getSessionBean1().setAnoOptions(anoOptions);
+ Calendar cal = new GregorianCalendar();
+ int year = cal.get(Calendar.YEAR);
+ //drpAno.setSelected( new Integer(year) );
+
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ }
+
+
+ private void fillMesDropDown()
+ {
+ com.sun.rave.web.ui.model.Option[] mesOptions = new com.sun.rave.web.ui.model.Option[13];
+ mesOptions[0] = new Option("", "");
+ mesOptions[1] = new Option(new Integer(1), "Janeiro");
+ mesOptions[2] = new Option(new Integer(2), "Fevereiro");
+ mesOptions[3] = new Option(new Integer(3), "Março");
+ mesOptions[4] = new Option(new Integer(4), "Abril");
+ mesOptions[5] = new Option(new Integer(5), "Maio");
+ mesOptions[6] = new Option(new Integer(6), "Junho");
+ mesOptions[7] = new Option(new Integer(7), "Julho");
+ mesOptions[8] = new Option(new Integer(8), "Agosto");
+ mesOptions[9] = new Option(new Integer(9), "Setembro");
+ mesOptions[10] = new Option(new Integer(10), "Outubro");
+ mesOptions[11] = new Option(new Integer(11), "Novembro");
+ mesOptions[12] = new Option(new Integer(12), "Dezembro");
+ getSessionBean1().setMesOptions(mesOptions);
+ Calendar cal = new GregorianCalendar();
+ int month = cal.get(Calendar.MONTH); // 0=Jan, 1=Feb, ...
+ //drpMes.setSelected( new Integer(month+1) );
+ }
+
+// private void fillDiaDropDown()
+// {
+//
+// }
+
+ public String lnkAjuda_action() {
+ // TODO: Replace with your code
+// ServletContext theApplicationsServletContext =
+// (ServletContext) this.getExternalContext().getContext();
+// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL);
+// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf";
+//
+// Global global = new Global();
+// try
+// {
+// global.showPdf(pdfFilePath);
+// }
+// catch(Exception ex)
+// {
+// ex.printStackTrace();
+// }
+ return null;
+ }
+
+ public String lnkAnalisesAcidente_action() {
+ // TODO: Replace with your code
+ return null;
+ }
+
+ public String lnkPlanosActuacao_action() {
+ // TODO: Replace with your code
+ Utilizador u = getSessionBean1().getCurrentUser();
+// String curUser = "?user=" + u.getId().toString();
+ FacesContext fc = getFacesContext().getCurrentInstance();
+ Global.redirectToPlanos(fc, u);
+// Utilizador u = getSessionBean1().getCurrentUser();
+// String curUser = "?user=" + u.getId().toString();
+// FacesContext fc = getFacesContext().getCurrentInstance();
+// try
+// {
+// JSFUtils.redirect(fc, Global.PLANOS_ACTUACAO_URL + curUser);
+// }
+// catch(Exception ex)
+// {
+//
+// }
+ return null;
+ }
+
+
+ public String buttonFilterSeg_action()
+ {
+ Date visitaDate = ( Date ) calFilterDateSeg.getValue();
+ String visitaDateStr = null;
+ if ( visitaDate != null )
+ {
+ visitaDateStr = D_F.format( visitaDate );
+ }
+
+ String POR = null;
+ if ( textFilterPORSeg.getText() != null )
+ {
+ POR = ( ( String ) textFilterPORSeg.getText() ).trim();
+ if ( POR.length() == 0 )
+ {
+ POR = null;
+ }
+ }
+
+ String nome = null;
+ if ( textFilterNameSeg.getText() != null )
+ {
+ nome = (( String ) textFilterNameSeg.getText()).trim();
+ if( nome.length() == 0 )
+ {
+ nome = null;
+ }
+ }
+
+ String estabelecimento = null;
+ if ( textFilterEstabelecimentoSeg.getText() != null )
+ {
+ estabelecimento = (( String ) textFilterEstabelecimentoSeg.getText()).trim();
+ if ( estabelecimento.length() == 0 )
+ {
+ estabelecimento = null;
+ }
+ }
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ ArrayList seguimentoList = adp.searchAnalisesSeguimentoDirSiprp( nome, estabelecimento, visitaDateStr, POR );
+
+ table2.setRendered( true );
+ txtSearchMsg.setRendered( false );
+ getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList );
+ }
+ catch( Exception e )
+ {
+ table2.setRendered( false );
+ txtSearchMsg.setRendered( true );
+ txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" );
+ }
+
+ return null;
+ }
+
+}
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormGestor.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormGestor.java
new file mode 100644
index 00000000..27155ae2
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormGestor.java
@@ -0,0 +1,1637 @@
+/*
+ * FormGestor.java
+ *
+ * Created on December 19, 2007, 3:58 PM
+ * Copyright lluis
+ */
+package analiseacidentestrabalho;
+
+import com.sun.data.provider.RowKey;
+import com.sun.rave.web.ui.appbase.AbstractPageBean;
+import com.sun.rave.web.ui.component.Body;
+import com.sun.rave.web.ui.component.Button;
+import com.sun.rave.web.ui.component.DropDown;
+import com.sun.rave.web.ui.component.Form;
+import com.sun.rave.web.ui.component.Head;
+import com.sun.rave.web.ui.component.Html;
+import com.sun.rave.web.ui.component.Hyperlink;
+import com.sun.rave.web.ui.component.ImageComponent;
+import com.sun.rave.web.ui.component.Link;
+import com.sun.rave.web.ui.component.Page;
+import com.sun.rave.web.ui.component.PanelGroup;
+import com.sun.rave.web.ui.component.StaticText;
+import com.sun.rave.web.ui.component.Table;
+import com.sun.rave.web.ui.component.TableColumn;
+import com.sun.rave.web.ui.component.TableRowGroup;
+import com.sun.rave.web.ui.component.TextField;
+import com.sun.rave.web.ui.model.Option;
+import db.AnalisesConcluidasDataProvider;
+import db.AnalisesDataProvider;
+import db.AnalisesSeguimentoDataProvider;
+import global.Global;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.ListIterator;
+import javax.faces.FacesException;
+import javax.faces.component.html.HtmlPanelGrid;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ValueChangeEvent;
+import javax.servlet.http.HttpServletRequest;
+import utils.Utils;
+
+/**
+ * Page bean that corresponds to a similarly named JSP page. This
+ * class contains component definitions (and initialization code) for
+ * all components that you have defined on this page, as well as
+ * lifecycle methods and event handlers where you may add behavior
+ * to respond to incoming events.
+ */
+public class FormGestor extends AbstractPageBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+
+ private Page page1 = new Page();
+
+ public Page getPage1() {
+ return page1;
+ }
+
+ public void setPage1(Page p) {
+ this.page1 = p;
+ }
+
+ private Html html1 = new Html();
+
+ public Html getHtml1() {
+ return html1;
+ }
+
+ public void setHtml1(Html h) {
+ this.html1 = h;
+ }
+
+ private Head head1 = new Head();
+
+ public Head getHead1() {
+ return head1;
+ }
+
+ public void setHead1(Head h) {
+ this.head1 = h;
+ }
+
+ private Link link1 = new Link();
+
+ public Link getLink1() {
+ return link1;
+ }
+
+ public void setLink1(Link l) {
+ this.link1 = l;
+ }
+
+ private Body body1 = new Body();
+
+ public Body getBody1() {
+ return body1;
+ }
+
+ public void setBody1(Body b) {
+ this.body1 = b;
+ }
+
+ private Form form1 = new Form();
+
+ public Form getForm1() {
+ return form1;
+ }
+
+ public void setForm1(Form f) {
+ this.form1 = f;
+ }
+
+ private HtmlPanelGrid gridBase1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridBase1() {
+ return gridBase1;
+ }
+
+ public void setGridBase1(HtmlPanelGrid hpg) {
+ this.gridBase1 = hpg;
+ }
+
+ private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLayout1() {
+ return gridLayout1;
+ }
+
+ public void setGridLayout1(HtmlPanelGrid hpg) {
+ this.gridLayout1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel1() {
+ return gridPanel1;
+ }
+
+ public void setGridPanel1(HtmlPanelGrid hpg) {
+ this.gridPanel1 = hpg;
+ }
+
+ private PanelGroup groupPanel1 = new PanelGroup();
+
+ public PanelGroup getGroupPanel1() {
+ return groupPanel1;
+ }
+
+ public void setGroupPanel1(PanelGroup pg) {
+ this.groupPanel1 = pg;
+ }
+
+ private ImageComponent image1 = new ImageComponent();
+
+ public ImageComponent getImage1() {
+ return image1;
+ }
+
+ public void setImage1(ImageComponent ic) {
+ this.image1 = ic;
+ }
+
+ private ImageComponent image2 = new ImageComponent();
+
+ public ImageComponent getImage2() {
+ return image2;
+ }
+
+ public void setImage2(ImageComponent ic) {
+ this.image2 = ic;
+ }
+
+ private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLayoutTop1() {
+ return gridLayoutTop1;
+ }
+
+ public void setGridLayoutTop1(HtmlPanelGrid hpg) {
+ this.gridLayoutTop1 = hpg;
+ }
+
+ private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridSeguimento1() {
+ return gridSeguimento1;
+ }
+
+ public void setGridSeguimento1(HtmlPanelGrid hpg) {
+ this.gridSeguimento1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel2() {
+ return gridPanel2;
+ }
+
+ public void setGridPanel2(HtmlPanelGrid hpg) {
+ this.gridPanel2 = hpg;
+ }
+
+ private StaticText staticText2 = new StaticText();
+
+ public StaticText getStaticText2() {
+ return staticText2;
+ }
+
+ public void setStaticText2(StaticText st) {
+ this.staticText2 = st;
+ }
+
+ private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel3() {
+ return gridPanel3;
+ }
+
+ public void setGridPanel3(HtmlPanelGrid hpg) {
+ this.gridPanel3 = hpg;
+ }
+
+ private Table table1 = new Table();
+
+ public Table getTable1() {
+ return table1;
+ }
+
+ public void setTable1(Table t) {
+ this.table1 = t;
+ }
+
+ private TableRowGroup tableRowGroup1 = new TableRowGroup();
+
+ public TableRowGroup getTableRowGroup1() {
+ return tableRowGroup1;
+ }
+
+ public void setTableRowGroup1(TableRowGroup trg) {
+ this.tableRowGroup1 = trg;
+ }
+
+ private TableColumn tableColumn1 = new TableColumn();
+
+ public TableColumn getTableColumn1() {
+ return tableColumn1;
+ }
+
+ public void setTableColumn1(TableColumn tc) {
+ this.tableColumn1 = tc;
+ }
+
+ private Hyperlink lnkDataAcidenteSeg = new Hyperlink();
+
+ public Hyperlink getLnkDataAcidenteSeg() {
+ return lnkDataAcidenteSeg;
+ }
+
+ public void setLnkDataAcidenteSeg(Hyperlink h) {
+ this.lnkDataAcidenteSeg = h;
+ }
+
+ private TableColumn tableColumn2 = new TableColumn();
+
+ public TableColumn getTableColumn2() {
+ return tableColumn2;
+ }
+
+ public void setTableColumn2(TableColumn tc) {
+ this.tableColumn2 = tc;
+ }
+
+ private Hyperlink lnkNrSeg = new Hyperlink();
+
+ public Hyperlink getLnkNrSeg() {
+ return lnkNrSeg;
+ }
+
+ public void setLnkNrSeg(Hyperlink h) {
+ this.lnkNrSeg = h;
+ }
+
+ private TableColumn tableColumn3 = new TableColumn();
+
+ public TableColumn getTableColumn3() {
+ return tableColumn3;
+ }
+
+ public void setTableColumn3(TableColumn tc) {
+ this.tableColumn3 = tc;
+ }
+
+ private Hyperlink lnkPorSeg = new Hyperlink();
+
+ public Hyperlink getLnkPorSeg() {
+ return lnkPorSeg;
+ }
+
+ public void setLnkPorSeg(Hyperlink h) {
+ this.lnkPorSeg = h;
+ }
+
+ private TableColumn tableColumn4 = new TableColumn();
+
+ public TableColumn getTableColumn4() {
+ return tableColumn4;
+ }
+
+ public void setTableColumn4(TableColumn tc) {
+ this.tableColumn4 = tc;
+ }
+
+ private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink();
+
+ public Hyperlink getLnkNomeAcidentadoSeg() {
+ return lnkNomeAcidentadoSeg;
+ }
+
+ public void setLnkNomeAcidentadoSeg(Hyperlink h) {
+ this.lnkNomeAcidentadoSeg = h;
+ }
+
+ private TableColumn tableColumn5 = new TableColumn();
+
+ public TableColumn getTableColumn5() {
+ return tableColumn5;
+ }
+
+ public void setTableColumn5(TableColumn tc) {
+ this.tableColumn5 = tc;
+ }
+
+ private Hyperlink lnkFaseSeg = new Hyperlink();
+
+ public Hyperlink getLnkFaseSeg() {
+ return lnkFaseSeg;
+ }
+
+ public void setLnkFaseSeg(Hyperlink h) {
+ this.lnkFaseSeg = h;
+ }
+
+ private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridConcluidos1() {
+ return gridConcluidos1;
+ }
+
+ public void setGridConcluidos1(HtmlPanelGrid hpg) {
+ this.gridConcluidos1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel4() {
+ return gridPanel4;
+ }
+
+ public void setGridPanel4(HtmlPanelGrid hpg) {
+ this.gridPanel4 = hpg;
+ }
+
+ private StaticText staticText3 = new StaticText();
+
+ public StaticText getStaticText3() {
+ return staticText3;
+ }
+
+ public void setStaticText3(StaticText st) {
+ this.staticText3 = st;
+ }
+
+ private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel5() {
+ return gridPanel5;
+ }
+
+ public void setGridPanel5(HtmlPanelGrid hpg) {
+ this.gridPanel5 = hpg;
+ }
+
+ private PanelGroup groupPanel3 = new PanelGroup();
+
+ public PanelGroup getGroupPanel3() {
+ return groupPanel3;
+ }
+
+ public void setGroupPanel3(PanelGroup pg) {
+ this.groupPanel3 = pg;
+ }
+
+ private StaticText staticText4 = new StaticText();
+
+ public StaticText getStaticText4() {
+ return staticText4;
+ }
+
+ public void setStaticText4(StaticText st) {
+ this.staticText4 = st;
+ }
+
+ private DropDown drpAno = new DropDown();
+
+ public DropDown getDrpAno() {
+ return drpAno;
+ }
+
+ public void setDrpAno(DropDown dd) {
+ this.drpAno = dd;
+ }
+
+ private PanelGroup groupPanel4 = new PanelGroup();
+
+ public PanelGroup getGroupPanel4() {
+ return groupPanel4;
+ }
+
+ public void setGroupPanel4(PanelGroup pg) {
+ this.groupPanel4 = pg;
+ }
+
+ private StaticText lblMes = new StaticText();
+
+ public StaticText getLblMes() {
+ return lblMes;
+ }
+
+ public void setLblMes(StaticText st) {
+ this.lblMes = st;
+ }
+
+ private DropDown drpMes = new DropDown();
+
+ public DropDown getDrpMes() {
+ return drpMes;
+ }
+
+ public void setDrpMes(DropDown dd) {
+ this.drpMes = dd;
+ }
+
+ private PanelGroup groupPanel5 = new PanelGroup();
+
+ public PanelGroup getGroupPanel5() {
+ return groupPanel5;
+ }
+
+ public void setGroupPanel5(PanelGroup pg) {
+ this.groupPanel5 = pg;
+ }
+
+ private StaticText lblDia = new StaticText();
+
+ public StaticText getLblDia() {
+ return lblDia;
+ }
+
+ public void setLblDia(StaticText st) {
+ this.lblDia = st;
+ }
+
+ private DropDown drpDia = new DropDown();
+
+ public DropDown getDrpDia() {
+ return drpDia;
+ }
+
+ public void setDrpDia(DropDown dd) {
+ this.drpDia = dd;
+ }
+
+ private PanelGroup groupPanel6 = new PanelGroup();
+
+ public PanelGroup getGroupPanel6() {
+ return groupPanel6;
+ }
+
+ public void setGroupPanel6(PanelGroup pg) {
+ this.groupPanel6 = pg;
+ }
+
+ private StaticText staticText5 = new StaticText();
+
+ public StaticText getStaticText5() {
+ return staticText5;
+ }
+
+ public void setStaticText5(StaticText st) {
+ this.staticText5 = st;
+ }
+
+ private TextField txtPor = new TextField();
+
+ public TextField getTxtPor() {
+ return txtPor;
+ }
+
+ public void setTxtPor(TextField tf) {
+ this.txtPor = tf;
+ }
+
+ private PanelGroup groupPanel7 = new PanelGroup();
+
+ public PanelGroup getGroupPanel7() {
+ return groupPanel7;
+ }
+
+ public void setGroupPanel7(PanelGroup pg) {
+ this.groupPanel7 = pg;
+ }
+
+ private StaticText staticText6 = new StaticText();
+
+ public StaticText getStaticText6() {
+ return staticText6;
+ }
+
+ public void setStaticText6(StaticText st) {
+ this.staticText6 = st;
+ }
+
+ private TextField txtNome = new TextField();
+
+ public TextField getTxtNome() {
+ return txtNome;
+ }
+
+ public void setTxtNome(TextField tf) {
+ this.txtNome = tf;
+ }
+
+ private Button butPesquisar = new Button();
+
+ public Button getButPesquisar() {
+ return butPesquisar;
+ }
+
+ public void setButPesquisar(Button b) {
+ this.butPesquisar = b;
+ }
+
+ private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel6() {
+ return gridPanel6;
+ }
+
+ public void setGridPanel6(HtmlPanelGrid hpg) {
+ this.gridPanel6 = hpg;
+ }
+
+ private Table table2 = new Table();
+
+ public Table getTable2() {
+ return table2;
+ }
+
+ public void setTable2(Table t) {
+ this.table2 = t;
+ }
+
+ private TableRowGroup tableRowGroup2 = new TableRowGroup();
+
+ public TableRowGroup getTableRowGroup2() {
+ return tableRowGroup2;
+ }
+
+ public void setTableRowGroup2(TableRowGroup trg) {
+ this.tableRowGroup2 = trg;
+ }
+
+ private TableColumn tableColumn6 = new TableColumn();
+
+ public TableColumn getTableColumn6() {
+ return tableColumn6;
+ }
+
+ public void setTableColumn6(TableColumn tc) {
+ this.tableColumn6 = tc;
+ }
+
+ private Hyperlink lnkDataConcluida = new Hyperlink();
+
+ public Hyperlink getLnkDataConcluida() {
+ return lnkDataConcluida;
+ }
+
+ public void setLnkDataConcluida(Hyperlink h) {
+ this.lnkDataConcluida = h;
+ }
+
+ private TableColumn tableColumn7 = new TableColumn();
+
+ public TableColumn getTableColumn7() {
+ return tableColumn7;
+ }
+
+ public void setTableColumn7(TableColumn tc) {
+ this.tableColumn7 = tc;
+ }
+
+ private Hyperlink lnkNrConcluida = new Hyperlink();
+
+ public Hyperlink getLnkNrConcluida() {
+ return lnkNrConcluida;
+ }
+
+ public void setLnkNrConcluida(Hyperlink h) {
+ this.lnkNrConcluida = h;
+ }
+
+ private TableColumn tableColumn8 = new TableColumn();
+
+ public TableColumn getTableColumn8() {
+ return tableColumn8;
+ }
+
+ public void setTableColumn8(TableColumn tc) {
+ this.tableColumn8 = tc;
+ }
+
+ private Hyperlink lnkPorConcluida = new Hyperlink();
+
+ public Hyperlink getLnkPorConcluida() {
+ return lnkPorConcluida;
+ }
+
+ public void setLnkPorConcluida(Hyperlink h) {
+ this.lnkPorConcluida = h;
+ }
+
+ private TableColumn tableColumn9 = new TableColumn();
+
+ public TableColumn getTableColumn9() {
+ return tableColumn9;
+ }
+
+ public void setTableColumn9(TableColumn tc) {
+ this.tableColumn9 = tc;
+ }
+
+ private Hyperlink lnkNomeConcluida = new Hyperlink();
+
+ public Hyperlink getLnkNomeConcluida() {
+ return lnkNomeConcluida;
+ }
+
+ public void setLnkNomeConcluida(Hyperlink h) {
+ this.lnkNomeConcluida = h;
+ }
+
+ private TableColumn tableColumn10 = new TableColumn();
+
+ public TableColumn getTableColumn10() {
+ return tableColumn10;
+ }
+
+ public void setTableColumn10(TableColumn tc) {
+ this.tableColumn10 = tc;
+ }
+
+ private Hyperlink lnkEstabConcluida = new Hyperlink();
+
+ public Hyperlink getLnkEstabConcluida() {
+ return lnkEstabConcluida;
+ }
+
+ public void setLnkEstabConcluida(Hyperlink h) {
+ this.lnkEstabConcluida = h;
+ }
+
+ private StaticText txtSearchMsg = new StaticText();
+
+ public StaticText getTxtSearchMsg() {
+ return txtSearchMsg;
+ }
+
+ public void setTxtSearchMsg(StaticText st) {
+ this.txtSearchMsg = st;
+ }
+
+ private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel7() {
+ return gridPanel7;
+ }
+
+ public void setGridPanel7(HtmlPanelGrid hpg) {
+ this.gridPanel7 = hpg;
+ }
+
+ private PanelGroup groupPanel8 = new PanelGroup();
+
+ public PanelGroup getGroupPanel8() {
+ return groupPanel8;
+ }
+
+ public void setGroupPanel8(PanelGroup pg) {
+ this.groupPanel8 = pg;
+ }
+
+ private StaticText staticText7 = new StaticText();
+
+ public StaticText getStaticText7() {
+ return staticText7;
+ }
+
+ public void setStaticText7(StaticText st) {
+ this.staticText7 = st;
+ }
+
+ private ImageComponent image3 = new ImageComponent();
+
+ public ImageComponent getImage3() {
+ return image3;
+ }
+
+ public void setImage3(ImageComponent ic) {
+ this.image3 = ic;
+ }
+
+ private StaticText staticText8 = new StaticText();
+
+ public StaticText getStaticText8() {
+ return staticText8;
+ }
+
+ public void setStaticText8(StaticText st) {
+ this.staticText8 = st;
+ }
+
+ private TableColumn tableColumn11 = new TableColumn();
+
+ public TableColumn getTableColumn11() {
+ return tableColumn11;
+ }
+
+ public void setTableColumn11(TableColumn tc) {
+ this.tableColumn11 = tc;
+ }
+
+ private Hyperlink lnkDataAberturaSeg1 = new Hyperlink();
+
+ public Hyperlink getLnkDataAberturaSeg1() {
+ return lnkDataAberturaSeg1;
+ }
+
+ public void setLnkDataAberturaSeg1(Hyperlink h) {
+ this.lnkDataAberturaSeg1 = h;
+ }
+
+ private TableColumn tableColumn12 = new TableColumn();
+
+ public TableColumn getTableColumn12() {
+ return tableColumn12;
+ }
+
+ public void setTableColumn12(TableColumn tc) {
+ this.tableColumn12 = tc;
+ }
+
+ private Hyperlink lnkDataAberturaConcluida1 = new Hyperlink();
+
+ public Hyperlink getLnkDataAberturaConcluida1() {
+ return lnkDataAberturaConcluida1;
+ }
+
+ public void setLnkDataAberturaConcluida1(Hyperlink h) {
+ this.lnkDataAberturaConcluida1 = h;
+ }
+
+ private TableColumn tableColumn13 = new TableColumn();
+
+ public TableColumn getTableColumn13() {
+ return tableColumn13;
+ }
+
+ public void setTableColumn13(TableColumn tc) {
+ this.tableColumn13 = tc;
+ }
+
+ private Hyperlink lnkEstabelecimentoSeg1 = new Hyperlink();
+
+ public Hyperlink getLnkEstabelecimentoSeg1() {
+ return lnkEstabelecimentoSeg1;
+ }
+
+ public void setLnkEstabelecimentoSeg1(Hyperlink h) {
+ this.lnkEstabelecimentoSeg1 = h;
+ }
+ private StaticText lblUser = new StaticText();
+
+ public StaticText getLblUser() {
+ return lblUser;
+ }
+
+ public void setLblUser(StaticText st) {
+ this.lblUser = st;
+ }
+ private Hyperlink lnkPlanosActuacao = new Hyperlink();
+
+ public Hyperlink getLnkPlanosActuacao() {
+ return lnkPlanosActuacao;
+ }
+
+ public void setLnkPlanosActuacao(Hyperlink h) {
+ this.lnkPlanosActuacao = h;
+ }
+
+
+
+ private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid();
+ public HtmlPanelGrid getGridPanelFilterSeg()
+ {
+ return this.gridPanelFilterSeg;
+ }
+ public void setGridPanelFilterSeg( HtmlPanelGrid pg )
+ {
+ this.gridPanelFilterSeg = pg;
+ }
+
+ private PanelGroup groupPanelFilterSeg = new PanelGroup();
+ public PanelGroup getGroupPanelFilterSeg()
+ {
+ return this.groupPanelFilterSeg;
+ }
+ public void setGroupPanelFilterSeg( PanelGroup pg )
+ {
+ this.groupPanelFilterSeg = pg;
+ }
+
+ private StaticText labelFilterNameSeg = new StaticText();
+ public StaticText getLabelFilterNameSeg()
+ {
+ return this.labelFilterNameSeg;
+ }
+ public void setLabelFilterNameSeg( StaticText st )
+ {
+ this.labelFilterNameSeg = st;
+ }
+
+ private TextField textFilterNameSeg = new TextField();
+ public TextField getTextFilterNameSeg()
+ {
+ return this.textFilterNameSeg;
+ }
+ public void setTextFilterNameSeg( TextField tf )
+ {
+ this.textFilterNameSeg = tf;
+ }
+
+ private StaticText labelFilterEstabelecimentoSeg = new StaticText();
+ public StaticText getLabelFilterEstabelecimentoSeg() {
+ return labelFilterEstabelecimentoSeg;
+ }
+ public void setLabelFilterEstabelecimentoSeg(StaticText labelFilterEstabelecimentoSeg) {
+ this.labelFilterEstabelecimentoSeg = labelFilterEstabelecimentoSeg;
+ }
+
+ private TextField textFilterEstabelecimentoSeg = new TextField();
+
+ public TextField getTextFilterEstabelecimentoSeg() {
+ return textFilterEstabelecimentoSeg;
+ }
+ public void setTextFilterEstabelecimentoSeg(TextField textFilterEstabelecimentoSeg) {
+ this.textFilterEstabelecimentoSeg = textFilterEstabelecimentoSeg;
+ }
+
+ private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar();
+ public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg()
+ {
+ return this.calFilterDateSeg;
+ }
+ public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c )
+ {
+ this.calFilterDateSeg = c;
+ }
+
+ private TextField textFilterPORSeg = new TextField();
+
+ public TextField getTextFilterPORSeg() {
+ return textFilterPORSeg;
+ }
+
+ public void setTextFilterPORSeg(TextField textFilterPORSeg) {
+ this.textFilterPORSeg = textFilterPORSeg;
+ }
+
+
+ private Button buttonFilterSeg = new Button();
+ public Button getButtonFilterSeg()
+ {
+ return this.buttonFilterSeg;
+ }
+ public void setButtonFilterSeg( Button b )
+ {
+ this.buttonFilterSeg = b;
+ }
+
+ private TextField textFilterEstabelecimentoConc = new TextField();
+
+ public TextField getTextFilterEstabelecimentoConc() {
+ return textFilterEstabelecimentoConc;
+ }
+
+ public void setTextFilterEstabelecimentoConc(TextField textFilterEstabelecimentoConc) {
+ this.textFilterEstabelecimentoConc = textFilterEstabelecimentoConc;
+ }
+
+
+ private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" );
+ //
+
+ /**
+ * Construct a new Page bean instance.
+ */
+ public FormGestor() {
+ }
+
+ /**
+ * Callback method that is called whenever a page is navigated to,
+ * either directly via a URL, or indirectly via page navigation.
+ * Customize this method to acquire resources that will be needed
+ * for event handlers and lifecycle methods, whether or not this
+ * page is performing post back processing.
+ *
+ * Note that, if the current request is a postback, the property
+ * values of the components do not represent any
+ * values submitted with this request. Instead, they represent the
+ * property values that were saved for this view when it was rendered.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+ if (!getSessionBean1().isLoggedIn()) {
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {
+ // . . . handle exception . . .
+ }
+ }
+
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("FormGestor Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+ }
+
+ /**
+ * Callback method that is called after the component tree has been
+ * restored, but before any event processing takes place. This method
+ * will only be called on a postback request that
+ * is processing a form submit. Customize this method to allocate
+ * resources that will be required in your event handlers.
+ */
+ public void preprocess() {
+ }
+
+ /**
+ * Callback method that is called just before rendering takes place.
+ * This method will only be called for the page that
+ * will actually be rendered (and not, for example, on a page that
+ * handled a postback and then navigated to a different page). Customize
+ * this method to allocate resources that will be required for rendering
+ * this page.
+ */
+ public void prerender() {
+ System.out.println("=== FORM_GESTOR ===");
+ Utilizador curUser = getSessionBean1().getCurrentUser();
+ lblUser.setText( curUser.getLogin() );
+ if(curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_GESTOR)
+ {
+ if(curUser.getGestor_geral().matches("n"))
+ {
+ lnkPlanosActuacao.setDisabled(true);
+ }
+ }
+ else if(curUser.getTipo().intValue() != Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA)
+ {
+ if(curUser.getTipo().intValue() != Global.TIPO_UTILIZADOR_DIRECTOR_LOJA)
+ {
+ lnkPlanosActuacao.setDisabled(true);
+ }
+ }
+
+
+ HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest();
+ String referer = request.getRequestURI();
+ String pageFrom = Utils.getPageFrom(referer);
+ if(!pageFrom.matches("FormGestor.jsp"))
+ {
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ Integer estabelecimento_id = null;
+ //lblActivos.setRendered(true);
+ table1.setRendered(true);
+ ArrayList seguimentoList = null;
+ //if(curUser.getGestor_geral().matches("y") || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA)
+ if(curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_GESTOR)
+ {
+ estabelecimento_id = curUser.getEstabelecimento_gestor();
+ if(estabelecimento_id.intValue() == 0)
+ {
+ seguimentoList = adp.getAnalisesSeguimentoGestorList(null);
+ }
+ else
+ {
+ seguimentoList = adp.getAnalisesSeguimentoGestorList(curUser.getEstabelecimento_id());
+ }
+ }
+
+ else if(curUser.getGestor_geral().matches("y") || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA)
+ {
+ seguimentoList = adp.getAnalisesSeguimentoGestorList(null);
+ }
+ else if(curUser.getGestor_geral().matches("n") || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA)
+ {
+ seguimentoList = adp.getAnalisesSeguimentoGestorList(curUser.getEstabelecimento_id());
+ }
+
+ getSessionBean1().getAnalisesSeguimentoDataProvider().setList(seguimentoList);
+ }
+ catch(Exception ex)
+ {
+ //lblActivos.setRendered(false);
+ table1.setRendered(false);
+ //ex.printStackTrace();
+ }
+
+ try
+ {
+ //lblActivos.setRendered(true);
+ table2.setRendered(true);
+ ArrayList concluidasList = null;
+ if(getSessionBean1().getCurrentUser().getGestor_geral().matches("y") || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA)
+ {
+ concluidasList = adp.getAnalisesConcluidasList(null);
+ }
+ else
+ {
+ concluidasList = adp.getAnalisesConcluidasList(getSessionBean1().getCurrentUser().getEstabelecimento_id());
+ }
+
+ getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList);
+ }
+ catch(Exception ex)
+ {
+ //lblActivos.setRendered(false);
+ table2.setRendered(false);
+ //ex.printStackTrace();
+ }
+ fillAnoDropDown();
+ }
+ }
+
+ /**
+ * Callback method that is called after rendering is completed for
+ * this request, if init() was called (regardless of whether
+ * or not this was the page that was actually rendered). Customize this
+ * method to release resources acquired in the init(),
+ * preprocess(), or prerender() methods (or
+ * acquired during execution of an event handler).
+ */
+ public void destroy() {
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected RequestBean1 getRequestBean1() {
+ return (RequestBean1)getBean("RequestBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected SessionBean1 getSessionBean1() {
+ return (SessionBean1)getBean("SessionBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+
+ public String lnkPlanosActuacao_action() {
+ // TODO: Replace with your code
+ Utilizador u = getSessionBean1().getCurrentUser();
+// String curUser = "?user=" + u.getId().toString();
+ FacesContext fc = getFacesContext().getCurrentInstance();
+ Global.redirectToPlanos(fc, u);
+
+// Utilizador u = getSessionBean1().getCurrentUser();
+// String curUser = "?user=" + u.getId().toString();
+// FacesContext fc = getFacesContext().getCurrentInstance();
+// try
+// {
+// JSFUtils.redirect(fc, Global.PLANOS_ACTUACAO_URL + curUser);
+// }
+// catch(Exception ex)
+// {
+//
+// }
+ return null;
+ }
+
+ public String lnkAnalisesAcidente_action() {
+ return null;
+ }
+
+ public String lnkGerirUtilizadores_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkEditUser_action() {
+ // TODO: Replace with your code
+
+ getSessionBean1().setNavFrom("FormGestor");
+ getSessionBean1().setModoEdicaoUtilizador("edit");
+ return "user";
+
+ }
+
+ public String lnkLogout_action() {
+ // TODO: Replace with your code
+
+ try
+ {
+ javax.servlet.http.HttpSession session =
+ (javax.servlet.http.HttpSession) getExternalContext().getSession(true);
+ session.invalidate();
+ }
+ catch(Exception ex){}
+
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {}
+ //return "login";
+ return null;
+ }
+
+ public String lnkDataAcidenteSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormGestor");
+ return "view_analise";
+
+ }
+
+ public String lnkDataAberturaSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormGestor");
+ return "view_analise";
+ }
+
+ public String lnkNrSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormGestor");
+ return "view_analise";
+
+ }
+
+ public String lnkPorSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormGestor");
+ return "view_analise";
+
+ }
+
+ public String lnkNomeAcidentadoSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormGestor");
+ return "view_analise";
+
+ }
+
+ public String lnkFaseSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormGestor");
+ return "view_analise";
+
+ }
+
+ public String lnkEstabelecimentoSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormGestor");
+ return "view_analise";
+ }
+
+ private AnaliseAcidente getTableSeguimentoRowData()
+ {
+ RowKey rk = tableRowGroup1.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ AnalisesSeguimentoDataProvider provider = (AnalisesSeguimentoDataProvider) tableRowGroup1.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ AnaliseAcidente a = (AnaliseAcidente)list.get(k);
+ return a;
+ }
+
+
+ public void drpAno_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+ Object ano = event.getNewValue();
+ if(ano == null)
+ {
+ lblMes.setVisible(false);
+ drpMes.setVisible(false);
+ lblDia.setVisible(false);
+ drpDia.setVisible(false);
+ }
+ else
+ {
+ lblMes.setVisible(true);
+ drpMes.setVisible(true);
+ fillMesDropDown();
+ }
+ }
+
+ public void drpMes_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+ Object mes = event.getNewValue();
+ if(mes == null)
+ {
+ lblDia.setVisible(false);
+ drpDia.setVisible(false);
+ }
+ else
+ {
+ lblDia.setVisible(true);
+ drpDia.setVisible(true);
+ //fillDiaDropDown();
+ }
+ }
+
+ public void drpDia_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+
+ }
+
+ public String butPesquisar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ Object obAno = null;
+ Object obMes = null;
+ Object obDia = null;
+ try
+ {
+ obAno = drpAno.getSelected();
+ obMes = drpMes.getSelected();
+ obDia = drpDia.getSelected();
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ Integer ano = null;
+ Integer mes = null;
+ Integer dia = null;
+
+ if(obAno != null)
+ {
+ ano = (Integer) obAno;
+ }
+
+ if(obMes != null)
+ {
+ mes = (Integer) obMes;
+ }
+
+ if(obDia != null)
+ {
+ dia = (Integer) obDia;
+ }
+
+ String por = null;
+ if(txtPor.getText() != null)
+ {
+ por = (String) txtPor.getText();
+ if(por.trim().length() == 0)
+ {
+ por = null;
+ }
+ }
+
+ String nome = null;
+ if(txtNome.getText() != null)
+ {
+ nome = (String) txtNome.getText();
+ if(nome.trim().length() == 0)
+ {
+ nome = null;
+ }
+ }
+
+ String estabelecimento = null;
+ if ( textFilterEstabelecimentoConc.getText() != null )
+ {
+ estabelecimento = (( String ) textFilterEstabelecimentoConc.getText()).trim();
+ if( estabelecimento.length() == 0 )
+ {
+ estabelecimento = null;
+ }
+ }
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+
+ //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList());
+ ArrayList concluidasList = null;
+ if ( getSessionBean1().getCurrentUser().getGestor_geral().matches( "y" ) )
+ {
+ concluidasList = adp.searchAanalisesConcluidasList(
+ null, ano, mes, dia, por, nome, estabelecimento );
+ }
+ else
+ {
+ concluidasList = adp.searchAanalisesConcluidasList(
+ getSessionBean1().getCurrentUser().getEstabelecimento_id(),
+ ano, mes, dia, por, nome, null );
+ }
+
+
+ table2.setRendered(true);
+ txtSearchMsg.setRendered(false);
+ getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList);
+
+
+ }
+ catch(Exception ex)
+ {
+ table2.setRendered(false);
+ txtSearchMsg.setRendered(true);
+ txtSearchMsg.setText("Não foram encontrados registos para a sua pesquisa !");
+ //ex.printStackTrace();
+ }
+
+ return null;
+ }
+
+ public String lnkDataConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormGestor");
+ return "view_analise";
+
+ }
+
+ public String lnkDataAberturaConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormGestor");
+ return "view_analise";
+ }
+
+ public String lnkNrConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormGestor");
+ return "view_analise";
+
+ }
+
+ public String lnkPorConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormGestor");
+ return "view_analise";
+
+ }
+
+ public String lnkNomeConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormGestor");
+ return "view_analise";
+
+ }
+
+ public String lnkEstabConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormGestor");
+ return "view_analise";
+
+ }
+
+ private AnaliseAcidente getTableConcluidasRowData()
+ {
+ RowKey rk = tableRowGroup2.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ AnalisesConcluidasDataProvider provider = (AnalisesConcluidasDataProvider) tableRowGroup2.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ AnaliseAcidente a = (AnaliseAcidente)list.get(k);
+ return a;
+ }
+
+
+ private void fillAnoDropDown()
+ {
+// ArrayList anosList = new ArrayList();
+// for(int ano=2007; ano<2051; ano++)
+// {
+// anosList.add(new Integer(ano));
+// }
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ ArrayList anosList = adp.getAnosListFromAnalises();
+ com.sun.rave.web.ui.model.Option[] anoOptions = new com.sun.rave.web.ui.model.Option[anosList.size()+1];
+ anoOptions[0] = new Option("", "");
+ ListIterator iter = anosList.listIterator();
+ int i = 1;
+ while(iter.hasNext())
+ {
+ Integer ano = (Integer) iter.next();
+
+ anoOptions[i] = new Option(ano, ano.toString());
+ i++;
+ }
+ getSessionBean1().setAnoOptions(anoOptions);
+ Calendar cal = new GregorianCalendar();
+ int year = cal.get(Calendar.YEAR);
+ //drpAno.setSelected( new Integer(year) );
+
+ }
+ catch(Exception ex)
+ {
+ //ex.printStackTrace();
+ }
+
+ }
+
+
+ private void fillMesDropDown()
+ {
+ com.sun.rave.web.ui.model.Option[] mesOptions = new com.sun.rave.web.ui.model.Option[13];
+ mesOptions[0] = new Option("", "");
+ mesOptions[1] = new Option(new Integer(1), "Janeiro");
+ mesOptions[2] = new Option(new Integer(2), "Fevereiro");
+ mesOptions[3] = new Option(new Integer(3), "Março");
+ mesOptions[4] = new Option(new Integer(4), "Abril");
+ mesOptions[5] = new Option(new Integer(5), "Maio");
+ mesOptions[6] = new Option(new Integer(6), "Junho");
+ mesOptions[7] = new Option(new Integer(7), "Julho");
+ mesOptions[8] = new Option(new Integer(8), "Agosto");
+ mesOptions[9] = new Option(new Integer(9), "Setembro");
+ mesOptions[10] = new Option(new Integer(10), "Outubro");
+ mesOptions[11] = new Option(new Integer(11), "Novembro");
+ mesOptions[12] = new Option(new Integer(12), "Dezembro");
+ getSessionBean1().setMesOptions(mesOptions);
+ Calendar cal = new GregorianCalendar();
+ int month = cal.get(Calendar.MONTH); // 0=Jan, 1=Feb, ...
+ //drpMes.setSelected( new Integer(month+1) );
+ }
+
+// private void fillDiaDropDown()
+// {
+//
+// }
+
+ public String lnkAjuda_action() {
+ // TODO: Replace with your code
+// ServletContext theApplicationsServletContext =
+// (ServletContext) this.getExternalContext().getContext();
+// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL);
+// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf";
+//
+// Global global = new Global();
+// try
+// {
+// global.showPdf(pdfFilePath);
+// }
+// catch(Exception ex)
+// {
+// ex.printStackTrace();
+// }
+ return null;
+ }
+
+ public String lnkEstabelecimento_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String buttonFilterSeg_action()
+ {
+ Date visitaDate = ( Date ) calFilterDateSeg.getValue();
+ String visitaDateStr = null;
+ if ( visitaDate != null )
+ {
+ visitaDateStr = D_F.format( visitaDate );
+ }
+
+ String POR = null;
+ if ( textFilterPORSeg.getText() != null )
+ {
+ POR = ( ( String ) textFilterPORSeg.getText() ).trim();
+ if ( POR.length() == 0 )
+ {
+ POR = null;
+ }
+ }
+
+ String nome = null;
+ if ( textFilterNameSeg.getText() != null )
+ {
+ nome = (( String ) textFilterNameSeg.getText()).trim();
+ if( nome.length() == 0 )
+ {
+ nome = null;
+ }
+ }
+
+ String estabelecimento = null;
+ if ( textFilterEstabelecimentoSeg.getText() != null )
+ {
+ estabelecimento = (( String ) textFilterEstabelecimentoSeg.getText()).trim();
+ if ( estabelecimento.length() == 0 )
+ {
+ estabelecimento = null;
+ }
+ }
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ Utilizador curUser = getSessionBean1().getCurrentUser();
+ ArrayList seguimentoList = null;
+ Integer estabelecimento_id = null;
+
+ if ( curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_GESTOR )
+ {
+ estabelecimento_id = curUser.getEstabelecimento_gestor();
+ if ( estabelecimento_id.intValue() == 0 )
+ {
+ seguimentoList = adp.searchAnalisesSeguimentoGestor( null, nome, estabelecimento, visitaDateStr, POR );
+ }
+ else
+ {
+ seguimentoList = adp.searchAnalisesSeguimentoGestor( curUser.getEstabelecimento_id(), nome, estabelecimento, visitaDateStr, POR );
+ }
+ }
+ else if ( curUser.getGestor_geral().matches( "y" ) || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA )
+ {
+ seguimentoList = adp.searchAnalisesSeguimentoGestor( null, nome, estabelecimento, visitaDateStr, POR );
+ }
+ else if ( curUser.getGestor_geral().matches( "n" ) || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA )
+ {
+ seguimentoList = adp.searchAnalisesSeguimentoGestor( curUser.getEstabelecimento_id(), nome, estabelecimento, visitaDateStr, POR );
+ }
+
+ table1.setRendered( true );
+ txtSearchMsg.setRendered( false );
+ getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList );
+ }
+ catch( Exception e )
+ {
+ table1.setRendered( false );
+ txtSearchMsg.setRendered( true );
+ txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" );
+ }
+
+ return null;
+ }
+
+}
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormHS.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormHS.java
new file mode 100644
index 00000000..e7630a0c
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormHS.java
@@ -0,0 +1,2068 @@
+/*
+ * FormHS.java
+ *
+ * Created on October 1, 2007, 1:43 PM
+ * Copyright lluis
+ */
+package analiseacidentestrabalho;
+
+import com.sun.data.provider.RowKey;
+import com.sun.rave.web.ui.appbase.AbstractPageBean;
+import com.sun.rave.web.ui.component.Body;
+import com.sun.rave.web.ui.component.Button;
+import com.sun.rave.web.ui.component.DropDown;
+import com.sun.rave.web.ui.component.Form;
+import com.sun.rave.web.ui.component.Head;
+import com.sun.rave.web.ui.component.Html;
+import com.sun.rave.web.ui.component.Hyperlink;
+import com.sun.rave.web.ui.component.ImageComponent;
+import com.sun.rave.web.ui.component.Link;
+import com.sun.rave.web.ui.component.Page;
+import com.sun.rave.web.ui.component.PanelGroup;
+import com.sun.rave.web.ui.component.StaticText;
+import com.sun.rave.web.ui.component.Table;
+import com.sun.rave.web.ui.component.TableColumn;
+import com.sun.rave.web.ui.component.TableRowGroup;
+import com.sun.rave.web.ui.component.TextField;
+import com.sun.rave.web.ui.model.Option;
+import db.AnalisesActualDataProvider;
+import db.AnalisesConcluidasDataProvider;
+import db.AnalisesDataProvider;
+import db.AnalisesSeguimentoDataProvider;
+import global.Global;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.ListIterator;
+import javax.faces.FacesException;
+import javax.faces.component.html.HtmlPanelGrid;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ValueChangeEvent;
+import javax.servlet.http.HttpServletRequest;
+import utils.Utils;
+
+/**
+ * Page bean that corresponds to a similarly named JSP page. This
+ * class contains component definitions (and initialization code) for
+ * all components that you have defined on this page, as well as
+ * lifecycle methods and event handlers where you may add behavior
+ * to respond to incoming events.
+ */
+public class FormHS extends AbstractPageBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+
+ private Page page1 = new Page();
+
+ public Page getPage1() {
+ return page1;
+ }
+
+ public void setPage1(Page p) {
+ this.page1 = p;
+ }
+
+ private Html html1 = new Html();
+
+ public Html getHtml1() {
+ return html1;
+ }
+
+ public void setHtml1(Html h) {
+ this.html1 = h;
+ }
+
+ private Head head1 = new Head();
+
+ public Head getHead1() {
+ return head1;
+ }
+
+ public void setHead1(Head h) {
+ this.head1 = h;
+ }
+
+ private Link link1 = new Link();
+
+ public Link getLink1() {
+ return link1;
+ }
+
+ public void setLink1(Link l) {
+ this.link1 = l;
+ }
+
+ private Body body1 = new Body();
+
+ public Body getBody1() {
+ return body1;
+ }
+
+ public void setBody1(Body b) {
+ this.body1 = b;
+ }
+
+ private Form form1 = new Form();
+
+ public Form getForm1() {
+ return form1;
+ }
+
+ public void setForm1(Form f) {
+ this.form1 = f;
+ }
+
+ private HtmlPanelGrid gridBase1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridBase1() {
+ return gridBase1;
+ }
+
+ public void setGridBase1(HtmlPanelGrid hpg) {
+ this.gridBase1 = hpg;
+ }
+
+ private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLayout1() {
+ return gridLayout1;
+ }
+
+ public void setGridLayout1(HtmlPanelGrid hpg) {
+ this.gridLayout1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel1() {
+ return gridPanel1;
+ }
+
+ public void setGridPanel1(HtmlPanelGrid hpg) {
+ this.gridPanel1 = hpg;
+ }
+
+ private PanelGroup groupPanel1 = new PanelGroup();
+
+ public PanelGroup getGroupPanel1() {
+ return groupPanel1;
+ }
+
+ public void setGroupPanel1(PanelGroup pg) {
+ this.groupPanel1 = pg;
+ }
+
+ private ImageComponent image1 = new ImageComponent();
+
+ public ImageComponent getImage1() {
+ return image1;
+ }
+
+ public void setImage1(ImageComponent ic) {
+ this.image1 = ic;
+ }
+
+ private ImageComponent image2 = new ImageComponent();
+
+ public ImageComponent getImage2() {
+ return image2;
+ }
+
+ public void setImage2(ImageComponent ic) {
+ this.image2 = ic;
+ }
+
+ private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLayoutTop1() {
+ return gridLayoutTop1;
+ }
+
+ public void setGridLayoutTop1(HtmlPanelGrid hpg) {
+ this.gridLayoutTop1 = hpg;
+ }
+
+ private HtmlPanelGrid gridActual1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridActual1() {
+ return gridActual1;
+ }
+
+ public void setGridActual1(HtmlPanelGrid hpg) {
+ this.gridActual1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel2() {
+ return gridPanel2;
+ }
+
+ public void setGridPanel2(HtmlPanelGrid hpg) {
+ this.gridPanel2 = hpg;
+ }
+
+ private StaticText staticText4 = new StaticText();
+
+ public StaticText getStaticText4() {
+ return staticText4;
+ }
+
+ public void setStaticText4(StaticText st) {
+ this.staticText4 = st;
+ }
+
+ private StaticText staticText5 = new StaticText();
+
+ public StaticText getStaticText5() {
+ return staticText5;
+ }
+
+ public void setStaticText5(StaticText st) {
+ this.staticText5 = st;
+ }
+
+ private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel3() {
+ return gridPanel3;
+ }
+
+ public void setGridPanel3(HtmlPanelGrid hpg) {
+ this.gridPanel3 = hpg;
+ }
+
+ private Table table1 = new Table();
+
+ public Table getTable1() {
+ return table1;
+ }
+
+ public void setTable1(Table t) {
+ this.table1 = t;
+ }
+
+ private TableRowGroup tableRowGroup1 = new TableRowGroup();
+
+ public TableRowGroup getTableRowGroup1() {
+ return tableRowGroup1;
+ }
+
+ public void setTableRowGroup1(TableRowGroup trg) {
+ this.tableRowGroup1 = trg;
+ }
+
+ private TableColumn tableColumn1 = new TableColumn();
+
+ public TableColumn getTableColumn1() {
+ return tableColumn1;
+ }
+
+ public void setTableColumn1(TableColumn tc) {
+ this.tableColumn1 = tc;
+ }
+
+ private Hyperlink lnkDataAcidente = new Hyperlink();
+
+ public Hyperlink getLnkDataAcidente() {
+ return lnkDataAcidente;
+ }
+
+ public void setLnkDataAcidente(Hyperlink h) {
+ this.lnkDataAcidente = h;
+ }
+
+ private TableColumn tableColumn2 = new TableColumn();
+
+ public TableColumn getTableColumn2() {
+ return tableColumn2;
+ }
+
+ public void setTableColumn2(TableColumn tc) {
+ this.tableColumn2 = tc;
+ }
+
+ private Hyperlink lnkNr = new Hyperlink();
+
+ public Hyperlink getLnkNr() {
+ return lnkNr;
+ }
+
+ public void setLnkNr(Hyperlink h) {
+ this.lnkNr = h;
+ }
+
+ private TableColumn tableColumn3 = new TableColumn();
+
+ public TableColumn getTableColumn3() {
+ return tableColumn3;
+ }
+
+ public void setTableColumn3(TableColumn tc) {
+ this.tableColumn3 = tc;
+ }
+
+ private Hyperlink lnkNomeAcidentado = new Hyperlink();
+
+ public Hyperlink getLnkNomeAcidentado() {
+ return lnkNomeAcidentado;
+ }
+
+ public void setLnkNomeAcidentado(Hyperlink h) {
+ this.lnkNomeAcidentado = h;
+ }
+
+ private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridSeguimento1() {
+ return gridSeguimento1;
+ }
+
+ public void setGridSeguimento1(HtmlPanelGrid hpg) {
+ this.gridSeguimento1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel4() {
+ return gridPanel4;
+ }
+
+ public void setGridPanel4(HtmlPanelGrid hpg) {
+ this.gridPanel4 = hpg;
+ }
+
+ private StaticText staticText6 = new StaticText();
+
+ public StaticText getStaticText6() {
+ return staticText6;
+ }
+
+ public void setStaticText6(StaticText st) {
+ this.staticText6 = st;
+ }
+
+ private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel5() {
+ return gridPanel5;
+ }
+
+ public void setGridPanel5(HtmlPanelGrid hpg) {
+ this.gridPanel5 = hpg;
+ }
+
+ private Table table2 = new Table();
+
+ public Table getTable2() {
+ return table2;
+ }
+
+ public void setTable2(Table t) {
+ this.table2 = t;
+ }
+
+ private TableRowGroup tableRowGroup2 = new TableRowGroup();
+
+ public TableRowGroup getTableRowGroup2() {
+ return tableRowGroup2;
+ }
+
+ public void setTableRowGroup2(TableRowGroup trg) {
+ this.tableRowGroup2 = trg;
+ }
+
+ private TableColumn tableColumn4 = new TableColumn();
+
+ public TableColumn getTableColumn4() {
+ return tableColumn4;
+ }
+
+ public void setTableColumn4(TableColumn tc) {
+ this.tableColumn4 = tc;
+ }
+
+ private Hyperlink lnkDataAcidenteSeg = new Hyperlink();
+
+ public Hyperlink getLnkDataAcidenteSeg() {
+ return lnkDataAcidenteSeg;
+ }
+
+ public void setLnkDataAcidenteSeg(Hyperlink h) {
+ this.lnkDataAcidenteSeg = h;
+ }
+
+ private TableColumn tableColumn5 = new TableColumn();
+
+ public TableColumn getTableColumn5() {
+ return tableColumn5;
+ }
+
+ public void setTableColumn5(TableColumn tc) {
+ this.tableColumn5 = tc;
+ }
+
+ private Hyperlink lnkNrSeg = new Hyperlink();
+
+ public Hyperlink getLnkNrSeg() {
+ return lnkNrSeg;
+ }
+
+ public void setLnkNrSeg(Hyperlink h) {
+ this.lnkNrSeg = h;
+ }
+
+ private TableColumn tableColumn6 = new TableColumn();
+
+ public TableColumn getTableColumn6() {
+ return tableColumn6;
+ }
+
+ public void setTableColumn6(TableColumn tc) {
+ this.tableColumn6 = tc;
+ }
+
+ private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink();
+
+ public Hyperlink getLnkNomeAcidentadoSeg() {
+ return lnkNomeAcidentadoSeg;
+ }
+
+ public void setLnkNomeAcidentadoSeg(Hyperlink h) {
+ this.lnkNomeAcidentadoSeg = h;
+ }
+
+ private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridConcluidos1() {
+ return gridConcluidos1;
+ }
+
+ public void setGridConcluidos1(HtmlPanelGrid hpg) {
+ this.gridConcluidos1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel6() {
+ return gridPanel6;
+ }
+
+ public void setGridPanel6(HtmlPanelGrid hpg) {
+ this.gridPanel6 = hpg;
+ }
+
+ private StaticText staticText7 = new StaticText();
+
+ public StaticText getStaticText7() {
+ return staticText7;
+ }
+
+ public void setStaticText7(StaticText st) {
+ this.staticText7 = st;
+ }
+
+ private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel7() {
+ return gridPanel7;
+ }
+
+ public void setGridPanel7(HtmlPanelGrid hpg) {
+ this.gridPanel7 = hpg;
+ }
+
+ private PanelGroup groupPanel3 = new PanelGroup();
+
+ public PanelGroup getGroupPanel3() {
+ return groupPanel3;
+ }
+
+ public void setGroupPanel3(PanelGroup pg) {
+ this.groupPanel3 = pg;
+ }
+
+ private StaticText staticText8 = new StaticText();
+
+ public StaticText getStaticText8() {
+ return staticText8;
+ }
+
+ public void setStaticText8(StaticText st) {
+ this.staticText8 = st;
+ }
+
+ private DropDown drpAno = new DropDown();
+
+ public DropDown getDrpAno() {
+ return drpAno;
+ }
+
+ public void setDrpAno(DropDown dd) {
+ this.drpAno = dd;
+ }
+
+ private PanelGroup groupPanel4 = new PanelGroup();
+
+ public PanelGroup getGroupPanel4() {
+ return groupPanel4;
+ }
+
+ public void setGroupPanel4(PanelGroup pg) {
+ this.groupPanel4 = pg;
+ }
+
+ private StaticText lblMes = new StaticText();
+
+ public StaticText getLblMes() {
+ return lblMes;
+ }
+
+ public void setLblMes(StaticText st) {
+ this.lblMes = st;
+ }
+
+ private DropDown drpMes = new DropDown();
+
+ public DropDown getDrpMes() {
+ return drpMes;
+ }
+
+ public void setDrpMes(DropDown dd) {
+ this.drpMes = dd;
+ }
+
+ private PanelGroup groupPanel5 = new PanelGroup();
+
+ public PanelGroup getGroupPanel5() {
+ return groupPanel5;
+ }
+
+ public void setGroupPanel5(PanelGroup pg) {
+ this.groupPanel5 = pg;
+ }
+
+ private StaticText lblDia = new StaticText();
+
+ public StaticText getLblDia() {
+ return lblDia;
+ }
+
+ public void setLblDia(StaticText st) {
+ this.lblDia = st;
+ }
+
+ private DropDown drpDia = new DropDown();
+
+ public DropDown getDrpDia() {
+ return drpDia;
+ }
+
+ public void setDrpDia(DropDown dd) {
+ this.drpDia = dd;
+ }
+
+ private PanelGroup groupPanel6 = new PanelGroup();
+
+ public PanelGroup getGroupPanel6() {
+ return groupPanel6;
+ }
+
+ public void setGroupPanel6(PanelGroup pg) {
+ this.groupPanel6 = pg;
+ }
+
+ private StaticText staticText9 = new StaticText();
+
+ public StaticText getStaticText9() {
+ return staticText9;
+ }
+
+ public void setStaticText9(StaticText st) {
+ this.staticText9 = st;
+ }
+
+ private TextField txtNome = new TextField();
+
+ public TextField getTxtNome() {
+ return txtNome;
+ }
+
+ public void setTxtNome(TextField tf) {
+ this.txtNome = tf;
+ }
+
+ private Button butPesquisar = new Button();
+
+ public Button getButPesquisar() {
+ return butPesquisar;
+ }
+
+ public void setButPesquisar(Button b) {
+ this.butPesquisar = b;
+ }
+
+ private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel8() {
+ return gridPanel8;
+ }
+
+ public void setGridPanel8(HtmlPanelGrid hpg) {
+ this.gridPanel8 = hpg;
+ }
+
+ private Table table3 = new Table();
+
+ public Table getTable3() {
+ return table3;
+ }
+
+ public void setTable3(Table t) {
+ this.table3 = t;
+ }
+
+ private TableRowGroup tableRowGroup3 = new TableRowGroup();
+
+ public TableRowGroup getTableRowGroup3() {
+ return tableRowGroup3;
+ }
+
+ public void setTableRowGroup3(TableRowGroup trg) {
+ this.tableRowGroup3 = trg;
+ }
+
+ private TableColumn tableColumn7 = new TableColumn();
+
+ public TableColumn getTableColumn7() {
+ return tableColumn7;
+ }
+
+ public void setTableColumn7(TableColumn tc) {
+ this.tableColumn7 = tc;
+ }
+
+ private Hyperlink lnkDataConcluida = new Hyperlink();
+
+ public Hyperlink getLnkDataConcluida() {
+ return lnkDataConcluida;
+ }
+
+ public void setLnkDataConcluida(Hyperlink h) {
+ this.lnkDataConcluida = h;
+ }
+
+ private TableColumn tableColumn8 = new TableColumn();
+
+ public TableColumn getTableColumn8() {
+ return tableColumn8;
+ }
+
+ public void setTableColumn8(TableColumn tc) {
+ this.tableColumn8 = tc;
+ }
+
+ private Hyperlink lnkNrConcluida = new Hyperlink();
+
+ public Hyperlink getLnkNrConcluida() {
+ return lnkNrConcluida;
+ }
+
+ public void setLnkNrConcluida(Hyperlink h) {
+ this.lnkNrConcluida = h;
+ }
+
+ private TableColumn tableColumn9 = new TableColumn();
+
+ public TableColumn getTableColumn9() {
+ return tableColumn9;
+ }
+
+ public void setTableColumn9(TableColumn tc) {
+ this.tableColumn9 = tc;
+ }
+
+ private Hyperlink lnkNomeConcluida = new Hyperlink();
+
+ public Hyperlink getLnkNomeConcluida() {
+ return lnkNomeConcluida;
+ }
+
+ public void setLnkNomeConcluida(Hyperlink h) {
+ this.lnkNomeConcluida = h;
+ }
+
+ private StaticText txtSearchMsg = new StaticText();
+
+ public StaticText getTxtSearchMsg() {
+ return txtSearchMsg;
+ }
+
+ public void setTxtSearchMsg(StaticText st) {
+ this.txtSearchMsg = st;
+ }
+
+ private TableColumn tableColumn10 = new TableColumn();
+
+ public TableColumn getTableColumn10() {
+ return tableColumn10;
+ }
+
+ public void setTableColumn10(TableColumn tc) {
+ this.tableColumn10 = tc;
+ }
+
+ private Hyperlink lnkFase = new Hyperlink();
+
+ public Hyperlink getLnkFase() {
+ return lnkFase;
+ }
+
+ public void setLnkFase(Hyperlink h) {
+ this.lnkFase = h;
+ }
+
+ private TableColumn tableColumn11 = new TableColumn();
+
+ public TableColumn getTableColumn11() {
+ return tableColumn11;
+ }
+
+ public void setTableColumn11(TableColumn tc) {
+ this.tableColumn11 = tc;
+ }
+
+ private Hyperlink lnkFaseSeg = new Hyperlink();
+
+ public Hyperlink getLnkFaseSeg() {
+ return lnkFaseSeg;
+ }
+
+ public void setLnkFaseSeg(Hyperlink h) {
+ this.lnkFaseSeg = h;
+ }
+
+ private TableColumn tableColumn12 = new TableColumn();
+
+ public TableColumn getTableColumn12() {
+ return tableColumn12;
+ }
+
+ public void setTableColumn12(TableColumn tc) {
+ this.tableColumn12 = tc;
+ }
+
+ private TableColumn tableColumn13 = new TableColumn();
+
+ public TableColumn getTableColumn13() {
+ return tableColumn13;
+ }
+
+ public void setTableColumn13(TableColumn tc) {
+ this.tableColumn13 = tc;
+ }
+
+ private TableColumn tableColumn14 = new TableColumn();
+
+ public TableColumn getTableColumn14() {
+ return tableColumn14;
+ }
+
+ public void setTableColumn14(TableColumn tc) {
+ this.tableColumn14 = tc;
+ }
+
+ private TableColumn tableColumn15 = new TableColumn();
+
+ public TableColumn getTableColumn15() {
+ return tableColumn15;
+ }
+
+ public void setTableColumn15(TableColumn tc) {
+ this.tableColumn15 = tc;
+ }
+
+ private Hyperlink lnkPor = new Hyperlink();
+
+ public Hyperlink getLnkPor() {
+ return lnkPor;
+ }
+
+ public void setLnkPor(Hyperlink h) {
+ this.lnkPor = h;
+ }
+
+ private Hyperlink lnkPorSeg = new Hyperlink();
+
+ public Hyperlink getLnkPorSeg() {
+ return lnkPorSeg;
+ }
+
+ public void setLnkPorSeg(Hyperlink h) {
+ this.lnkPorSeg = h;
+ }
+
+ private Hyperlink lnkPorConcluida = new Hyperlink();
+
+ public Hyperlink getLnkPorConcluida() {
+ return lnkPorConcluida;
+ }
+
+ public void setLnkPorConcluida(Hyperlink h) {
+ this.lnkPorConcluida = h;
+ }
+
+ private Hyperlink lnkEstabConcluida = new Hyperlink();
+
+ public Hyperlink getLnkEstabConcluida() {
+ return lnkEstabConcluida;
+ }
+
+ public void setLnkEstabConcluida(Hyperlink h) {
+ this.lnkEstabConcluida = h;
+ }
+
+ private PanelGroup groupPanel7 = new PanelGroup();
+
+ public PanelGroup getGroupPanel7() {
+ return groupPanel7;
+ }
+
+ public void setGroupPanel7(PanelGroup pg) {
+ this.groupPanel7 = pg;
+ }
+
+ private StaticText staticText3 = new StaticText();
+
+ public StaticText getStaticText3() {
+ return staticText3;
+ }
+
+ public void setStaticText3(StaticText st) {
+ this.staticText3 = st;
+ }
+
+ private TextField txtPor = new TextField();
+
+ public TextField getTxtPor() {
+ return txtPor;
+ }
+
+ public void setTxtPor(TextField tf) {
+ this.txtPor = tf;
+ }
+
+ private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel9() {
+ return gridPanel9;
+ }
+
+ public void setGridPanel9(HtmlPanelGrid hpg) {
+ this.gridPanel9 = hpg;
+ }
+
+ private PanelGroup groupPanel8 = new PanelGroup();
+
+ public PanelGroup getGroupPanel8() {
+ return groupPanel8;
+ }
+
+ public void setGroupPanel8(PanelGroup pg) {
+ this.groupPanel8 = pg;
+ }
+
+ private StaticText staticText10 = new StaticText();
+
+ public StaticText getStaticText10() {
+ return staticText10;
+ }
+
+ public void setStaticText10(StaticText st) {
+ this.staticText10 = st;
+ }
+
+ private ImageComponent image3 = new ImageComponent();
+
+ public ImageComponent getImage3() {
+ return image3;
+ }
+
+ public void setImage3(ImageComponent ic) {
+ this.image3 = ic;
+ }
+
+ private StaticText staticText11 = new StaticText();
+
+ public StaticText getStaticText11() {
+ return staticText11;
+ }
+
+ public void setStaticText11(StaticText st) {
+ this.staticText11 = st;
+ }
+
+ private HtmlPanelGrid gridPanel10 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel10() {
+ return gridPanel10;
+ }
+
+ public void setGridPanel10(HtmlPanelGrid hpg) {
+ this.gridPanel10 = hpg;
+ }
+
+ private StaticText txtMsg = new StaticText();
+
+ public StaticText getTxtMsg() {
+ return txtMsg;
+ }
+
+ public void setTxtMsg(StaticText st) {
+ this.txtMsg = st;
+ }
+
+ private TableColumn tableColumn16 = new TableColumn();
+
+ public TableColumn getTableColumn16() {
+ return tableColumn16;
+ }
+
+ public void setTableColumn16(TableColumn tc) {
+ this.tableColumn16 = tc;
+ }
+
+ private Hyperlink lnkDataAbertura = new Hyperlink();
+
+ public Hyperlink getLnkDataAbertura() {
+ return lnkDataAbertura;
+ }
+
+ public void setLnkDataAbertura(Hyperlink h) {
+ this.lnkDataAbertura = h;
+ }
+
+ private TableColumn tableColumn17 = new TableColumn();
+
+ public TableColumn getTableColumn17() {
+ return tableColumn17;
+ }
+
+ public void setTableColumn17(TableColumn tc) {
+ this.tableColumn17 = tc;
+ }
+
+ private Hyperlink lnkDataAberturaSeg = new Hyperlink();
+
+ public Hyperlink getLnkDataAberturaSeg() {
+ return lnkDataAberturaSeg;
+ }
+
+ public void setLnkDataAberturaSeg(Hyperlink h) {
+ this.lnkDataAberturaSeg = h;
+ }
+
+ private TableColumn tableColumn18 = new TableColumn();
+
+ public TableColumn getTableColumn18() {
+ return tableColumn18;
+ }
+
+ public void setTableColumn18(TableColumn tc) {
+ this.tableColumn18 = tc;
+ }
+
+ private Hyperlink lnkDataAberturaConcluida = new Hyperlink();
+
+ public Hyperlink getLnkDataAberturaConcluida() {
+ return lnkDataAberturaConcluida;
+ }
+
+ public void setLnkDataAberturaConcluida(Hyperlink h) {
+ this.lnkDataAberturaConcluida = h;
+ }
+
+ private TableColumn tableColumn19 = new TableColumn();
+
+ public TableColumn getTableColumn19() {
+ return tableColumn19;
+ }
+
+ public void setTableColumn19(TableColumn tc) {
+ this.tableColumn19 = tc;
+ }
+
+ private Hyperlink lnkEstabelecimento = new Hyperlink();
+
+ public Hyperlink getLnkEstabelecimento() {
+ return lnkEstabelecimento;
+ }
+
+ public void setLnkEstabelecimento(Hyperlink h) {
+ this.lnkEstabelecimento = h;
+ }
+
+ private TableColumn tableColumn20 = new TableColumn();
+
+ public TableColumn getTableColumn20() {
+ return tableColumn20;
+ }
+
+ public void setTableColumn20(TableColumn tc) {
+ this.tableColumn20 = tc;
+ }
+
+ private Hyperlink lnkEstabelecimentoSeg = new Hyperlink();
+
+ public Hyperlink getLnkEstabelecimentoSeg() {
+ return lnkEstabelecimentoSeg;
+ }
+
+ public void setLnkEstabelecimentoSeg(Hyperlink h) {
+ this.lnkEstabelecimentoSeg = h;
+ }
+ private StaticText lblUser = new StaticText();
+
+ public StaticText getLblUser() {
+ return lblUser;
+ }
+
+ public void setLblUser(StaticText st) {
+ this.lblUser = st;
+ }
+ private Hyperlink lnkPlanosActuacao = new Hyperlink();
+
+ public Hyperlink getLnkPlanosActuacao() {
+ return lnkPlanosActuacao;
+ }
+
+ public void setLnkPlanosActuacao(Hyperlink h) {
+ this.lnkPlanosActuacao = h;
+ }
+
+
+ private HtmlPanelGrid gridPanelFilterActual = new HtmlPanelGrid();
+ public HtmlPanelGrid getGridPanelFilterActual()
+ {
+ return this.gridPanelFilterActual;
+ }
+ public void setGridPanelFilterActual( HtmlPanelGrid pg )
+ {
+ this.gridPanelFilterActual = pg;
+ }
+
+ private PanelGroup groupPanelFilterActual = new PanelGroup();
+ public PanelGroup getGroupPanelFilterActual()
+ {
+ return this.groupPanelFilterActual;
+ }
+ public void setGroupPanelFilterActual( PanelGroup pg )
+ {
+ this.groupPanelFilterActual = pg;
+ }
+
+ private StaticText labelFilterNameActual = new StaticText();
+ public StaticText getLabelFilterNameActual()
+ {
+ return this.labelFilterNameActual;
+ }
+ public void setLabelFilterNameActual( StaticText st )
+ {
+ this.labelFilterNameActual = st;
+ }
+
+ private TextField textFilterNameActual = new TextField();
+ public TextField getTextFilterNameActual()
+ {
+ return this.textFilterNameActual;
+ }
+ public void setTextFilterNameActual( TextField tf )
+ {
+ this.textFilterNameActual = tf;
+ }
+
+ private StaticText labelFilterEstabelecimentoActual = new StaticText();
+ public StaticText getLabelFilterEstabelecimentoActual() {
+ return labelFilterEstabelecimentoActual;
+ }
+ public void setLabelFilterEstabelecimentoActual(StaticText labelFilterEstabelecimentoActual) {
+ this.labelFilterEstabelecimentoActual = labelFilterEstabelecimentoActual;
+ }
+
+ private TextField textFilterEstabelecimentoActual = new TextField();
+
+ public TextField getTextFilterEstabelecimentoActual() {
+ return textFilterEstabelecimentoActual;
+ }
+ public void setTextFilterEstabelecimentoActual(TextField textFilterEstabelecimentoActual) {
+ this.textFilterEstabelecimentoActual = textFilterEstabelecimentoActual;
+ }
+
+ private com.sun.rave.web.ui.component.Calendar calFilterDateActual = new com.sun.rave.web.ui.component.Calendar();
+ public com.sun.rave.web.ui.component.Calendar getCalFilterDateActual()
+ {
+ return this.calFilterDateActual;
+ }
+ public void setCalFilterDateActual( com.sun.rave.web.ui.component.Calendar c )
+ {
+ this.calFilterDateActual = c;
+ }
+
+ private TextField textFilterPORActual = new TextField();
+
+ public TextField getTextFilterPORActual() {
+ return textFilterPORActual;
+ }
+
+ public void setTextFilterPORActual(TextField textFilterPORActual) {
+ this.textFilterPORActual = textFilterPORActual;
+ }
+
+
+ private Button buttonFilterActual = new Button();
+ public Button getButtonFilterActual()
+ {
+ return this.buttonFilterActual;
+ }
+ public void setButtonFilterActual( Button b )
+ {
+ this.buttonFilterActual = b;
+ }
+
+ private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid();
+ public HtmlPanelGrid getGridPanelFilterSeg()
+ {
+ return this.gridPanelFilterSeg;
+ }
+ public void setGridPanelFilterSeg( HtmlPanelGrid pg )
+ {
+ this.gridPanelFilterSeg = pg;
+ }
+
+ private PanelGroup groupPanelFilterSeg = new PanelGroup();
+ public PanelGroup getGroupPanelFilterSeg()
+ {
+ return this.groupPanelFilterSeg;
+ }
+ public void setGroupPanelFilterSeg( PanelGroup pg )
+ {
+ this.groupPanelFilterSeg = pg;
+ }
+
+ private StaticText labelFilterNameSeg = new StaticText();
+ public StaticText getLabelFilterNameSeg()
+ {
+ return this.labelFilterNameSeg;
+ }
+ public void setLabelFilterNameSeg( StaticText st )
+ {
+ this.labelFilterNameSeg = st;
+ }
+
+ private TextField textFilterNameSeg = new TextField();
+ public TextField getTextFilterNameSeg()
+ {
+ return this.textFilterNameSeg;
+ }
+ public void setTextFilterNameSeg( TextField tf )
+ {
+ this.textFilterNameSeg = tf;
+ }
+
+ private StaticText labelFilterEstabelecimentoSeg = new StaticText();
+ public StaticText getLabelFilterEstabelecimentoSeg() {
+ return labelFilterEstabelecimentoSeg;
+ }
+ public void setLabelFilterEstabelecimentoSeg(StaticText labelFilterEstabelecimentoSeg) {
+ this.labelFilterEstabelecimentoSeg = labelFilterEstabelecimentoSeg;
+ }
+
+ private TextField textFilterEstabelecimentoSeg = new TextField();
+
+ public TextField getTextFilterEstabelecimentoSeg() {
+ return textFilterEstabelecimentoSeg;
+ }
+ public void setTextFilterEstabelecimentoSeg(TextField textFilterEstabelecimentoSeg) {
+ this.textFilterEstabelecimentoSeg = textFilterEstabelecimentoSeg;
+ }
+
+ private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar();
+ public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg()
+ {
+ return this.calFilterDateSeg;
+ }
+ public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c )
+ {
+ this.calFilterDateSeg = c;
+ }
+
+ private TextField textFilterPORSeg = new TextField();
+
+ public TextField getTextFilterPORSeg() {
+ return textFilterPORSeg;
+ }
+
+ public void setTextFilterPORSeg(TextField textFilterPORSeg) {
+ this.textFilterPORSeg = textFilterPORSeg;
+ }
+
+
+ private Button buttonFilterSeg = new Button();
+ public Button getButtonFilterSeg()
+ {
+ return this.buttonFilterSeg;
+ }
+ public void setButtonFilterSeg( Button b )
+ {
+ this.buttonFilterSeg = b;
+ }
+
+
+ private TextField textFilterEstabelecimentoConc = new TextField();
+
+ public TextField getTextFilterEstabelecimentoConc() {
+ return textFilterEstabelecimentoConc;
+ }
+
+ public void setTextFilterEstabelecimentoConc(TextField textFilterEstabelecimentoConc) {
+ this.textFilterEstabelecimentoConc = textFilterEstabelecimentoConc;
+ }
+
+
+ private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" );
+ //
+
+ /**
+ * Construct a new Page bean instance.
+ */
+ public FormHS() {
+ }
+
+ /**
+ * Callback method that is called whenever a page is navigated to,
+ * either directly via a URL, or indirectly via page navigation.
+ * Customize this method to acquire resources that will be needed
+ * for event handlers and lifecycle methods, whether or not this
+ * page is performing post back processing.
+ *
+ * Note that, if the current request is a postback, the property
+ * values of the components do not represent any
+ * values submitted with this request. Instead, they represent the
+ * property values that were saved for this view when it was rendered.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("FormHS Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+
+ if (!getSessionBean1().isLoggedIn()) {
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {
+ // . . . handle exception . . .
+ }
+ }
+ }
+
+ /**
+ * Callback method that is called after the component tree has been
+ * restored, but before any event processing takes place. This method
+ * will only be called on a postback request that
+ * is processing a form submit. Customize this method to allocate
+ * resources that will be required in your event handlers.
+ */
+ public void preprocess() {
+ }
+
+ /**
+ * Callback method that is called just before rendering takes place.
+ * This method will only be called for the page that
+ * will actually be rendered (and not, for example, on a page that
+ * handled a postback and then navigated to a different page). Customize
+ * this method to allocate resources that will be required for rendering
+ * this page.
+ */
+ public void prerender() {
+ System.out.println("=== FORM_HS ===");
+ lblUser.setText( getSessionBean1().getCurrentUser().getLogin() );
+
+ HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest();
+ String referer = request.getRequestURI();
+ String pageFrom = Utils.getPageFrom(referer);
+ System.out.println("PAGE FROM : " + pageFrom);
+ if((!pageFrom.matches("FormHS.jsp")) || getSessionBean1().isFromAnaliseDeletion())
+ {
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ //lblActivos.setRendered(true);
+ table1.setRendered(true);
+
+ //ArrayList actuaisList = adp.getAnalisesActuaisList(getSessionBean1().getCurrentUser().getEstabelecimento_id(), new Integer(3));
+ ArrayList actuaisList = adp.getAnalisesActuaisHsList( getSessionBean1().getCurrentUser().getEstabelecimento_id() );
+ getSessionBean1().getAnalisesActualDataProvider().setList(actuaisList);
+ }
+ catch(Exception ex)
+ {
+ //lblActivos.setRendered(false);
+ table1.setRendered(false);
+ //ex.printStackTrace();
+ }
+
+ try
+ {
+ //lblActivos.setRendered(true);
+ table2.setRendered(true);
+
+ ArrayList seguimentoList = adp.getAnalisesSeguimentoHsList(getSessionBean1().getCurrentUser().getEstabelecimento_id());
+ getSessionBean1().getAnalisesSeguimentoDataProvider().setList(seguimentoList);
+ }
+ catch(Exception ex)
+ {
+ //lblActivos.setRendered(false);
+ table2.setRendered(false);
+ //ex.printStackTrace();
+ }
+
+ try
+ {
+ //lblActivos.setRendered(true);
+ System.out.println("CONCLUIDAS TABLE");
+ getSessionBean1().getAnalisesConcluidasDataProvider().setList(null);
+ table3.setRendered(true);
+ ArrayList concluidasList = adp.getAnalisesConcluidasHsList();
+ getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList);
+ }
+ catch(Exception ex)
+ {
+ //lblActivos.setRendered(false);
+ table3.setRendered(false);
+ ex.printStackTrace();
+ System.out.println("ERRRRRROR : " + ex.getMessage());
+ }
+ fillAnoDropDown();
+ }
+
+ txtMsg.setText(getSessionBean1().getMsg());
+ getSessionBean1().setMsg("");
+ }
+
+ /**
+ * Callback method that is called after rendering is completed for
+ * this request, if init() was called (regardless of whether
+ * or not this was the page that was actually rendered). Customize this
+ * method to release resources acquired in the init(),
+ * preprocess(), or prerender() methods (or
+ * acquired during execution of an event handler).
+ */
+ public void destroy() {
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected SessionBean1 getSessionBean1() {
+ return (SessionBean1)getBean("SessionBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected RequestBean1 getRequestBean1() {
+ return (RequestBean1)getBean("RequestBean1");
+ }
+
+ public String lnkLogout_action() {
+ // TODO: Replace with your code
+
+ try
+ {
+ javax.servlet.http.HttpSession session =
+ (javax.servlet.http.HttpSession) getExternalContext().getSession(true);
+ session.invalidate();
+ }
+ catch(Exception ex){}
+
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {}
+ //return "login";
+ return null;
+ }
+
+ public String lnkDataAcidente_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableActivosRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormHS");
+ return "analise_acidente";
+ }
+
+ public String lnkDataAbertura_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableActivosRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormHS");
+ return "analise_acidente";
+ }
+
+ public String lnkNr_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableActivosRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormHS");
+ return "analise_acidente";
+ }
+
+ public String lnkNomeAcidentado_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableActivosRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormHS");
+ return "analise_acidente";
+ }
+
+ private AnaliseAcidente getTableActivosRowData()
+ {
+ RowKey rk = tableRowGroup1.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ AnalisesActualDataProvider provider = (AnalisesActualDataProvider) tableRowGroup1.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ AnaliseAcidente a = (AnaliseAcidente)list.get(k);
+ return a;
+ }
+
+ public String lnkDataAcidenteSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormHS");
+ return "view_analise";
+ }
+
+ public String lnkDataAberturaSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormHS");
+ return "view_analise";
+ }
+
+ public String lnkNrSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormHS");
+ return "view_analise";
+ }
+
+ public String lnkNomeAcidentadoSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormHS");
+ return "view_analise";
+ }
+
+ private AnaliseAcidente getTableSeguimentoRowData()
+ {
+ RowKey rk = tableRowGroup2.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ AnalisesSeguimentoDataProvider provider = (AnalisesSeguimentoDataProvider) tableRowGroup2.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ AnaliseAcidente a = (AnaliseAcidente)list.get(k);
+ return a;
+ }
+
+ private AnaliseAcidente getTableConcluidasRowData()
+ {
+ RowKey rk = tableRowGroup3.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ AnalisesConcluidasDataProvider provider = (AnalisesConcluidasDataProvider) tableRowGroup3.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ AnaliseAcidente a = (AnaliseAcidente)list.get(k);
+ return a;
+ }
+
+ public void drpAno_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+ Object ano = event.getNewValue();
+ if(ano == null)
+ {
+ lblMes.setVisible(false);
+ drpMes.setVisible(false);
+ lblDia.setVisible(false);
+ drpDia.setVisible(false);
+ }
+ else
+ {
+ lblMes.setVisible(true);
+ drpMes.setVisible(true);
+ fillMesDropDown();
+ }
+ }
+
+ public void drpMes_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+ Object mes = event.getNewValue();
+ if(mes == null)
+ {
+ lblDia.setVisible(false);
+ drpDia.setVisible(false);
+ }
+ else
+ {
+ lblDia.setVisible(true);
+ drpDia.setVisible(true);
+ //fillDiaDropDown();
+ }
+ }
+
+ public void drpDia_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+
+ }
+
+ public String butPesquisar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ Object obAno = null;
+ Object obMes = null;
+ Object obDia = null;
+ try
+ {
+ obAno = drpAno.getSelected();
+ obMes = drpMes.getSelected();
+ obDia = drpDia.getSelected();
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ Integer ano = null;
+ Integer mes = null;
+ Integer dia = null;
+
+ if(obAno != null)
+ {
+ ano = (Integer) obAno;
+ }
+
+ if(obMes != null)
+ {
+ mes = (Integer) obMes;
+ }
+
+ if(obDia != null)
+ {
+ dia = (Integer) obDia;
+ }
+
+ String por = null;
+ if(txtPor.getText() != null)
+ {
+ por = (String) txtPor.getText();
+ if(por.trim().length() == 0)
+ {
+ por = null;
+ }
+ }
+
+ String nome = null;
+ if(txtNome.getText() != null)
+ {
+ nome = (String) txtNome.getText();
+ if(nome.trim().length() == 0)
+ {
+ nome = null;
+ }
+ }
+
+ String estabelecimento = null;
+ if ( textFilterEstabelecimentoConc.getText() != null )
+ {
+ estabelecimento = (( String ) textFilterEstabelecimentoConc.getText()).trim();
+ if( estabelecimento.length() == 0 )
+ {
+ estabelecimento = null;
+ }
+ }
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+
+ //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList());
+ ArrayList concluidasList = adp.searchAanalisesConcluidasList(
+ getSessionBean1().getCurrentUser().getEstabelecimento_id(),
+ ano, mes, dia, por, nome, estabelecimento );
+
+ table3.setRendered(true);
+ txtSearchMsg.setRendered(false);
+ getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList);
+
+
+ }
+ catch(Exception ex)
+ {
+ table3.setRendered(false);
+ txtSearchMsg.setRendered(true);
+ txtSearchMsg.setText("Não foram encontrados registos para a sua pesquisa !");
+ //ex.printStackTrace();
+ }
+
+ return null;
+ }
+
+// private String getPageFrom(String referer)
+// {
+// String pageFrom = referer.substring(referer.lastIndexOf("/")+1);
+// return pageFrom;
+// }
+
+ private void fillAnoDropDown()
+ {
+// ArrayList anosList = new ArrayList();
+// for(int ano=2007; ano<2051; ano++)
+// {
+// anosList.add(new Integer(ano));
+// }
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ ArrayList anosList = adp.getAnosListFromAnalises();
+ com.sun.rave.web.ui.model.Option[] anoOptions = new com.sun.rave.web.ui.model.Option[anosList.size()+1];
+ anoOptions[0] = new Option("", "");
+ ListIterator iter = anosList.listIterator();
+ int i = 1;
+ while(iter.hasNext())
+ {
+ Integer ano = (Integer) iter.next();
+
+ anoOptions[i] = new Option(ano, ano.toString());
+ i++;
+ }
+ getSessionBean1().setAnoOptions(anoOptions);
+ Calendar cal = new GregorianCalendar();
+ int year = cal.get(Calendar.YEAR);
+ //drpAno.setSelected( new Integer(year) );
+
+ }
+ catch(Exception ex)
+ {
+ //ex.printStackTrace();
+ }
+
+ }
+
+
+ private void fillMesDropDown()
+ {
+ com.sun.rave.web.ui.model.Option[] mesOptions = new com.sun.rave.web.ui.model.Option[13];
+ mesOptions[0] = new Option("", "");
+ mesOptions[1] = new Option(new Integer(1), "Janeiro");
+ mesOptions[2] = new Option(new Integer(2), "Fevereiro");
+ mesOptions[3] = new Option(new Integer(3), "Março");
+ mesOptions[4] = new Option(new Integer(4), "Abril");
+ mesOptions[5] = new Option(new Integer(5), "Maio");
+ mesOptions[6] = new Option(new Integer(6), "Junho");
+ mesOptions[7] = new Option(new Integer(7), "Julho");
+ mesOptions[8] = new Option(new Integer(8), "Agosto");
+ mesOptions[9] = new Option(new Integer(9), "Setembro");
+ mesOptions[10] = new Option(new Integer(10), "Outubro");
+ mesOptions[11] = new Option(new Integer(11), "Novembro");
+ mesOptions[12] = new Option(new Integer(12), "Dezembro");
+ getSessionBean1().setMesOptions(mesOptions);
+ Calendar cal = new GregorianCalendar();
+ int month = cal.get(Calendar.MONTH); // 0=Jan, 1=Feb, ...
+ //drpMes.setSelected( new Integer(month+1) );
+ }
+
+ private void fillDiaDropDown()
+ {
+// int ano = ( (Integer)drpAno.getSelected() ).intValue();
+// int mes = ( (Integer)drpMes.getSelected() ).intValue();
+// int dias = 0;
+// switch (mes) {
+// case 1: dias=31; break;
+// case 2:
+// GregorianCalendar cal = new GregorianCalendar();
+// if(cal.isLeapYear(ano))
+// {
+// dias = 29;
+// }
+// else
+// {
+// dias = 28;
+// }
+// break;
+// case 3: dias=31; break;
+// case 4: dias=30; break;
+// case 5: dias=31; break;
+// case 6: dias=30; break;
+// case 7: dias=31; break;
+// case 8: dias=31; break;
+// case 9: dias=30; break;
+// case 10: dias=31; break;
+// case 11: dias=30; break;
+// case 12: dias=31; break;
+// default: System.out.println("Invalid month.");break;
+// }
+//
+// ArrayList diasList = new ArrayList();
+// for(int dia=1; diaPage bean that corresponds to a similarly named JSP page. This
+ * class contains component definitions (and initialization code) for
+ * all components that you have defined on this page, as well as
+ * lifecycle methods and event handlers where you may add behavior
+ * to respond to incoming events.
+ */
+public class FormMedico extends AbstractPageBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+
+ private Page page1 = new Page();
+
+ public Page getPage1() {
+ return page1;
+ }
+
+ public void setPage1(Page p) {
+ this.page1 = p;
+ }
+
+ private Html html1 = new Html();
+
+ public Html getHtml1() {
+ return html1;
+ }
+
+ public void setHtml1(Html h) {
+ this.html1 = h;
+ }
+
+ private Head head1 = new Head();
+
+ public Head getHead1() {
+ return head1;
+ }
+
+ public void setHead1(Head h) {
+ this.head1 = h;
+ }
+
+ private Link link1 = new Link();
+
+ public Link getLink1() {
+ return link1;
+ }
+
+ public void setLink1(Link l) {
+ this.link1 = l;
+ }
+
+ private Body body1 = new Body();
+
+ public Body getBody1() {
+ return body1;
+ }
+
+ public void setBody1(Body b) {
+ this.body1 = b;
+ }
+
+ private Form form1 = new Form();
+
+ public Form getForm1() {
+ return form1;
+ }
+
+ public void setForm1(Form f) {
+ this.form1 = f;
+ }
+
+ private HtmlPanelGrid gridBase1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridBase1() {
+ return gridBase1;
+ }
+
+ public void setGridBase1(HtmlPanelGrid hpg) {
+ this.gridBase1 = hpg;
+ }
+
+ private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLayout1() {
+ return gridLayout1;
+ }
+
+ public void setGridLayout1(HtmlPanelGrid hpg) {
+ this.gridLayout1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel1() {
+ return gridPanel1;
+ }
+
+ public void setGridPanel1(HtmlPanelGrid hpg) {
+ this.gridPanel1 = hpg;
+ }
+
+ private PanelGroup groupPanel1 = new PanelGroup();
+
+ public PanelGroup getGroupPanel1() {
+ return groupPanel1;
+ }
+
+ public void setGroupPanel1(PanelGroup pg) {
+ this.groupPanel1 = pg;
+ }
+
+ private ImageComponent image1 = new ImageComponent();
+
+ public ImageComponent getImage1() {
+ return image1;
+ }
+
+ public void setImage1(ImageComponent ic) {
+ this.image1 = ic;
+ }
+
+ private ImageComponent image2 = new ImageComponent();
+
+ public ImageComponent getImage2() {
+ return image2;
+ }
+
+ public void setImage2(ImageComponent ic) {
+ this.image2 = ic;
+ }
+
+ private PanelGroup groupPanel2 = new PanelGroup();
+
+ public PanelGroup getGroupPanel2() {
+ return groupPanel2;
+ }
+
+ public void setGroupPanel2(PanelGroup pg) {
+ this.groupPanel2 = pg;
+ }
+
+ private StaticText lblUser = new StaticText();
+
+ public StaticText getLblUser() {
+ return lblUser;
+ }
+
+ public void setLblUser(StaticText st) {
+ this.lblUser = st;
+ }
+
+ private StaticText staticText1 = new StaticText();
+
+ public StaticText getStaticText1() {
+ return staticText1;
+ }
+
+ public void setStaticText1(StaticText st) {
+ this.staticText1 = st;
+ }
+
+ private Hyperlink lnkEditUser = new Hyperlink();
+
+ public Hyperlink getLnkEditUser() {
+ return lnkEditUser;
+ }
+
+ public void setLnkEditUser(Hyperlink h) {
+ this.lnkEditUser = h;
+ }
+
+ private StaticText staticText2 = new StaticText();
+
+ public StaticText getStaticText2() {
+ return staticText2;
+ }
+
+ public void setStaticText2(StaticText st) {
+ this.staticText2 = st;
+ }
+
+ private Hyperlink lnkLogout = new Hyperlink();
+
+ public Hyperlink getLnkLogout() {
+ return lnkLogout;
+ }
+
+ public void setLnkLogout(Hyperlink h) {
+ this.lnkLogout = h;
+ }
+
+ private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLayoutTop1() {
+ return gridLayoutTop1;
+ }
+
+ public void setGridLayoutTop1(HtmlPanelGrid hpg) {
+ this.gridLayoutTop1 = hpg;
+ }
+
+ private HtmlPanelGrid gridActual = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridActual() {
+ return gridActual;
+ }
+
+ public void setGridActual(HtmlPanelGrid hpg) {
+ this.gridActual = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel2() {
+ return gridPanel2;
+ }
+
+ public void setGridPanel2(HtmlPanelGrid hpg) {
+ this.gridPanel2 = hpg;
+ }
+
+ private StaticText staticText4 = new StaticText();
+
+ public StaticText getStaticText4() {
+ return staticText4;
+ }
+
+ public void setStaticText4(StaticText st) {
+ this.staticText4 = st;
+ }
+
+ private StaticText staticText5 = new StaticText();
+
+ public StaticText getStaticText5() {
+ return staticText5;
+ }
+
+ public void setStaticText5(StaticText st) {
+ this.staticText5 = st;
+ }
+
+ private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel3() {
+ return gridPanel3;
+ }
+
+ public void setGridPanel3(HtmlPanelGrid hpg) {
+ this.gridPanel3 = hpg;
+ }
+
+ private Table table1 = new Table();
+
+ public Table getTable1() {
+ return table1;
+ }
+
+ public void setTable1(Table t) {
+ this.table1 = t;
+ }
+
+ private TableRowGroup tableRowGroup1 = new TableRowGroup();
+
+ public TableRowGroup getTableRowGroup1() {
+ return tableRowGroup1;
+ }
+
+ public void setTableRowGroup1(TableRowGroup trg) {
+ this.tableRowGroup1 = trg;
+ }
+
+ private TableColumn tableColumn1 = new TableColumn();
+
+ public TableColumn getTableColumn1() {
+ return tableColumn1;
+ }
+
+ public void setTableColumn1(TableColumn tc) {
+ this.tableColumn1 = tc;
+ }
+
+ private Hyperlink lnkDataAcidente = new Hyperlink();
+
+ public Hyperlink getLnkDataAcidente() {
+ return lnkDataAcidente;
+ }
+
+ public void setLnkDataAcidente(Hyperlink h) {
+ this.lnkDataAcidente = h;
+ }
+
+ private TableColumn tableColumn2 = new TableColumn();
+
+ public TableColumn getTableColumn2() {
+ return tableColumn2;
+ }
+
+ public void setTableColumn2(TableColumn tc) {
+ this.tableColumn2 = tc;
+ }
+
+ private Hyperlink lnkNr = new Hyperlink();
+
+ public Hyperlink getLnkNr() {
+ return lnkNr;
+ }
+
+ public void setLnkNr(Hyperlink h) {
+ this.lnkNr = h;
+ }
+
+ private TableColumn tableColumn3 = new TableColumn();
+
+ public TableColumn getTableColumn3() {
+ return tableColumn3;
+ }
+
+ public void setTableColumn3(TableColumn tc) {
+ this.tableColumn3 = tc;
+ }
+
+ private Hyperlink lnkNomeAcidentado = new Hyperlink();
+
+ public Hyperlink getLnkNomeAcidentado() {
+ return lnkNomeAcidentado;
+ }
+
+ public void setLnkNomeAcidentado(Hyperlink h) {
+ this.lnkNomeAcidentado = h;
+ }
+
+ private HtmlPanelGrid gridSeguimento = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridSeguimento() {
+ return gridSeguimento;
+ }
+
+ public void setGridSeguimento(HtmlPanelGrid hpg) {
+ this.gridSeguimento = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel4() {
+ return gridPanel4;
+ }
+
+ public void setGridPanel4(HtmlPanelGrid hpg) {
+ this.gridPanel4 = hpg;
+ }
+
+ private StaticText staticText6 = new StaticText();
+
+ public StaticText getStaticText6() {
+ return staticText6;
+ }
+
+ public void setStaticText6(StaticText st) {
+ this.staticText6 = st;
+ }
+
+ private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel5() {
+ return gridPanel5;
+ }
+
+ public void setGridPanel5(HtmlPanelGrid hpg) {
+ this.gridPanel5 = hpg;
+ }
+
+ private Table table2 = new Table();
+
+ public Table getTable2() {
+ return table2;
+ }
+
+ public void setTable2(Table t) {
+ this.table2 = t;
+ }
+
+ private TableRowGroup tableRowGroup2 = new TableRowGroup();
+
+ public TableRowGroup getTableRowGroup2() {
+ return tableRowGroup2;
+ }
+
+ public void setTableRowGroup2(TableRowGroup trg) {
+ this.tableRowGroup2 = trg;
+ }
+
+ private TableColumn tableColumn4 = new TableColumn();
+
+ public TableColumn getTableColumn4() {
+ return tableColumn4;
+ }
+
+ public void setTableColumn4(TableColumn tc) {
+ this.tableColumn4 = tc;
+ }
+
+ private Hyperlink lnkDataAcidenteSeg = new Hyperlink();
+
+ public Hyperlink getLnkDataAcidenteSeg() {
+ return lnkDataAcidenteSeg;
+ }
+
+ public void setLnkDataAcidenteSeg(Hyperlink h) {
+ this.lnkDataAcidenteSeg = h;
+ }
+
+ private TableColumn tableColumn5 = new TableColumn();
+
+ public TableColumn getTableColumn5() {
+ return tableColumn5;
+ }
+
+ public void setTableColumn5(TableColumn tc) {
+ this.tableColumn5 = tc;
+ }
+
+ private Hyperlink lnkNrSeg = new Hyperlink();
+
+ public Hyperlink getLnkNrSeg() {
+ return lnkNrSeg;
+ }
+
+ public void setLnkNrSeg(Hyperlink h) {
+ this.lnkNrSeg = h;
+ }
+
+ private TableColumn tableColumn6 = new TableColumn();
+
+ public TableColumn getTableColumn6() {
+ return tableColumn6;
+ }
+
+ public void setTableColumn6(TableColumn tc) {
+ this.tableColumn6 = tc;
+ }
+
+ private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink();
+
+ public Hyperlink getLnkNomeAcidentadoSeg() {
+ return lnkNomeAcidentadoSeg;
+ }
+
+ public void setLnkNomeAcidentadoSeg(Hyperlink h) {
+ this.lnkNomeAcidentadoSeg = h;
+ }
+
+ private HtmlPanelGrid gridConcluidos = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridConcluidos() {
+ return gridConcluidos;
+ }
+
+ public void setGridConcluidos(HtmlPanelGrid hpg) {
+ this.gridConcluidos = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel6() {
+ return gridPanel6;
+ }
+
+ public void setGridPanel6(HtmlPanelGrid hpg) {
+ this.gridPanel6 = hpg;
+ }
+
+ private StaticText staticText7 = new StaticText();
+
+ public StaticText getStaticText7() {
+ return staticText7;
+ }
+
+ public void setStaticText7(StaticText st) {
+ this.staticText7 = st;
+ }
+
+ private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel7() {
+ return gridPanel7;
+ }
+
+ public void setGridPanel7(HtmlPanelGrid hpg) {
+ this.gridPanel7 = hpg;
+ }
+
+ private PanelGroup groupPanel3 = new PanelGroup();
+
+ public PanelGroup getGroupPanel3() {
+ return groupPanel3;
+ }
+
+ public void setGroupPanel3(PanelGroup pg) {
+ this.groupPanel3 = pg;
+ }
+
+ private StaticText staticText8 = new StaticText();
+
+ public StaticText getStaticText8() {
+ return staticText8;
+ }
+
+ public void setStaticText8(StaticText st) {
+ this.staticText8 = st;
+ }
+
+ private DropDown drpAno = new DropDown();
+
+ public DropDown getDrpAno() {
+ return drpAno;
+ }
+
+ public void setDrpAno(DropDown dd) {
+ this.drpAno = dd;
+ }
+
+ private PanelGroup groupPanel4 = new PanelGroup();
+
+ public PanelGroup getGroupPanel4() {
+ return groupPanel4;
+ }
+
+ public void setGroupPanel4(PanelGroup pg) {
+ this.groupPanel4 = pg;
+ }
+
+ private StaticText lblMes = new StaticText();
+
+ public StaticText getLblMes() {
+ return lblMes;
+ }
+
+ public void setLblMes(StaticText st) {
+ this.lblMes = st;
+ }
+
+ private DropDown drpMes = new DropDown();
+
+ public DropDown getDrpMes() {
+ return drpMes;
+ }
+
+ public void setDrpMes(DropDown dd) {
+ this.drpMes = dd;
+ }
+
+ private PanelGroup groupPanel5 = new PanelGroup();
+
+ public PanelGroup getGroupPanel5() {
+ return groupPanel5;
+ }
+
+ public void setGroupPanel5(PanelGroup pg) {
+ this.groupPanel5 = pg;
+ }
+
+ private StaticText lblDia = new StaticText();
+
+ public StaticText getLblDia() {
+ return lblDia;
+ }
+
+ public void setLblDia(StaticText st) {
+ this.lblDia = st;
+ }
+
+ private DropDown drpDia = new DropDown();
+
+ public DropDown getDrpDia() {
+ return drpDia;
+ }
+
+ public void setDrpDia(DropDown dd) {
+ this.drpDia = dd;
+ }
+
+ private PanelGroup groupPanel6 = new PanelGroup();
+
+ public PanelGroup getGroupPanel6() {
+ return groupPanel6;
+ }
+
+ public void setGroupPanel6(PanelGroup pg) {
+ this.groupPanel6 = pg;
+ }
+
+ private StaticText staticText9 = new StaticText();
+
+ public StaticText getStaticText9() {
+ return staticText9;
+ }
+
+ public void setStaticText9(StaticText st) {
+ this.staticText9 = st;
+ }
+
+ private TextField txtNome = new TextField();
+
+ public TextField getTxtNome() {
+ return txtNome;
+ }
+
+ public void setTxtNome(TextField tf) {
+ this.txtNome = tf;
+ }
+
+ private Button butPesquisar = new Button();
+
+ public Button getButPesquisar() {
+ return butPesquisar;
+ }
+
+ public void setButPesquisar(Button b) {
+ this.butPesquisar = b;
+ }
+
+ private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel8() {
+ return gridPanel8;
+ }
+
+ public void setGridPanel8(HtmlPanelGrid hpg) {
+ this.gridPanel8 = hpg;
+ }
+
+ private Table table3 = new Table();
+
+ public Table getTable3() {
+ return table3;
+ }
+
+ public void setTable3(Table t) {
+ this.table3 = t;
+ }
+
+ private TableRowGroup tableRowGroup3 = new TableRowGroup();
+
+ public TableRowGroup getTableRowGroup3() {
+ return tableRowGroup3;
+ }
+
+ public void setTableRowGroup3(TableRowGroup trg) {
+ this.tableRowGroup3 = trg;
+ }
+
+ private TableColumn tableColumn7 = new TableColumn();
+
+ public TableColumn getTableColumn7() {
+ return tableColumn7;
+ }
+
+ public void setTableColumn7(TableColumn tc) {
+ this.tableColumn7 = tc;
+ }
+
+ private Hyperlink lnkDataConcluida = new Hyperlink();
+
+ public Hyperlink getLnkDataConcluida() {
+ return lnkDataConcluida;
+ }
+
+ public void setLnkDataConcluida(Hyperlink h) {
+ this.lnkDataConcluida = h;
+ }
+
+ private TableColumn tableColumn8 = new TableColumn();
+
+ public TableColumn getTableColumn8() {
+ return tableColumn8;
+ }
+
+ public void setTableColumn8(TableColumn tc) {
+ this.tableColumn8 = tc;
+ }
+
+ private Hyperlink lnkNrConcluida = new Hyperlink();
+
+ public Hyperlink getLnkNrConcluida() {
+ return lnkNrConcluida;
+ }
+
+ public void setLnkNrConcluida(Hyperlink h) {
+ this.lnkNrConcluida = h;
+ }
+
+ private TableColumn tableColumn9 = new TableColumn();
+
+ public TableColumn getTableColumn9() {
+ return tableColumn9;
+ }
+
+ public void setTableColumn9(TableColumn tc) {
+ this.tableColumn9 = tc;
+ }
+
+ private Hyperlink lnkNomeConcluida = new Hyperlink();
+
+ public Hyperlink getLnkNomeConcluida() {
+ return lnkNomeConcluida;
+ }
+
+ public void setLnkNomeConcluida(Hyperlink h) {
+ this.lnkNomeConcluida = h;
+ }
+
+ private StaticText txtSearchMsg = new StaticText();
+
+ public StaticText getTxtSearchMsg() {
+ return txtSearchMsg;
+ }
+
+ public void setTxtSearchMsg(StaticText st) {
+ this.txtSearchMsg = st;
+ }
+
+ private TableColumn tableColumn10 = new TableColumn();
+
+ public TableColumn getTableColumn10() {
+ return tableColumn10;
+ }
+
+ public void setTableColumn10(TableColumn tc) {
+ this.tableColumn10 = tc;
+ }
+
+ private Hyperlink lnkFase = new Hyperlink();
+
+ public Hyperlink getLnkFase() {
+ return lnkFase;
+ }
+
+ public void setLnkFase(Hyperlink h) {
+ this.lnkFase = h;
+ }
+
+ private Hyperlink lnkEstabelecimento = new Hyperlink();
+
+ public Hyperlink getLnkEstabelecimento() {
+ return lnkEstabelecimento;
+ }
+
+ public void setLnkEstabelecimento(Hyperlink h) {
+ this.lnkEstabelecimento = h;
+ }
+
+ private TableColumn tableColumn16 = new TableColumn();
+
+ public TableColumn getTableColumn16() {
+ return tableColumn16;
+ }
+
+ public void setTableColumn16(TableColumn tc) {
+ this.tableColumn16 = tc;
+ }
+
+ private TableColumn tableColumn17 = new TableColumn();
+
+ public TableColumn getTableColumn17() {
+ return tableColumn17;
+ }
+
+ public void setTableColumn17(TableColumn tc) {
+ this.tableColumn17 = tc;
+ }
+
+ private TableColumn tableColumn11 = new TableColumn();
+
+ public TableColumn getTableColumn11() {
+ return tableColumn11;
+ }
+
+ public void setTableColumn11(TableColumn tc) {
+ this.tableColumn11 = tc;
+ }
+
+ private Hyperlink lnkFaseSeg = new Hyperlink();
+
+ public Hyperlink getLnkFaseSeg() {
+ return lnkFaseSeg;
+ }
+
+ public void setLnkFaseSeg(Hyperlink h) {
+ this.lnkFaseSeg = h;
+ }
+
+ private Hyperlink lnkEstabelecimentoSeg = new Hyperlink();
+
+ public Hyperlink getLnkEstabelecimentoSeg() {
+ return lnkEstabelecimentoSeg;
+ }
+
+ public void setLnkEstabelecimentoSeg(Hyperlink h) {
+ this.lnkEstabelecimentoSeg = h;
+ }
+
+ private TableColumn tableColumn12 = new TableColumn();
+
+ public TableColumn getTableColumn12() {
+ return tableColumn12;
+ }
+
+ public void setTableColumn12(TableColumn tc) {
+ this.tableColumn12 = tc;
+ }
+
+ private TableColumn tableColumn13 = new TableColumn();
+
+ public TableColumn getTableColumn13() {
+ return tableColumn13;
+ }
+
+ public void setTableColumn13(TableColumn tc) {
+ this.tableColumn13 = tc;
+ }
+
+ private TableColumn tableColumn14 = new TableColumn();
+
+ public TableColumn getTableColumn14() {
+ return tableColumn14;
+ }
+
+ public void setTableColumn14(TableColumn tc) {
+ this.tableColumn14 = tc;
+ }
+
+ private TableColumn tableColumn15 = new TableColumn();
+
+ public TableColumn getTableColumn15() {
+ return tableColumn15;
+ }
+
+ public void setTableColumn15(TableColumn tc) {
+ this.tableColumn15 = tc;
+ }
+
+ private Hyperlink lnkPor = new Hyperlink();
+
+ public Hyperlink getLnkPor() {
+ return lnkPor;
+ }
+
+ public void setLnkPor(Hyperlink h) {
+ this.lnkPor = h;
+ }
+
+ private Hyperlink lnkPorSeg = new Hyperlink();
+
+ public Hyperlink getLnkPorSeg() {
+ return lnkPorSeg;
+ }
+
+ public void setLnkPorSeg(Hyperlink h) {
+ this.lnkPorSeg = h;
+ }
+
+ private Hyperlink lnkPorConcluida = new Hyperlink();
+
+ public Hyperlink getLnkPorConcluida() {
+ return lnkPorConcluida;
+ }
+
+ public void setLnkPorConcluida(Hyperlink h) {
+ this.lnkPorConcluida = h;
+ }
+
+ private Hyperlink lnkEstabConcluida = new Hyperlink();
+
+ public Hyperlink getLnkEstabConcluida() {
+ return lnkEstabConcluida;
+ }
+
+ public void setLnkEstabConcluida(Hyperlink h) {
+ this.lnkEstabConcluida = h;
+ }
+
+ private PanelGroup groupPanel7 = new PanelGroup();
+
+ public PanelGroup getGroupPanel7() {
+ return groupPanel7;
+ }
+
+ public void setGroupPanel7(PanelGroup pg) {
+ this.groupPanel7 = pg;
+ }
+
+ private StaticText staticText3 = new StaticText();
+
+ public StaticText getStaticText3() {
+ return staticText3;
+ }
+
+ public void setStaticText3(StaticText st) {
+ this.staticText3 = st;
+ }
+
+ private TextField txtPor = new TextField();
+
+ public TextField getTxtPor() {
+ return txtPor;
+ }
+
+ public void setTxtPor(TextField tf) {
+ this.txtPor = tf;
+ }
+
+ private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel9() {
+ return gridPanel9;
+ }
+
+ public void setGridPanel9(HtmlPanelGrid hpg) {
+ this.gridPanel9 = hpg;
+ }
+
+ private PanelGroup groupPanel8 = new PanelGroup();
+
+ public PanelGroup getGroupPanel8() {
+ return groupPanel8;
+ }
+
+ public void setGroupPanel8(PanelGroup pg) {
+ this.groupPanel8 = pg;
+ }
+
+ private StaticText staticText10 = new StaticText();
+
+ public StaticText getStaticText10() {
+ return staticText10;
+ }
+
+ public void setStaticText10(StaticText st) {
+ this.staticText10 = st;
+ }
+
+ private ImageComponent image3 = new ImageComponent();
+
+ public ImageComponent getImage3() {
+ return image3;
+ }
+
+ public void setImage3(ImageComponent ic) {
+ this.image3 = ic;
+ }
+
+ private StaticText staticText11 = new StaticText();
+
+ public StaticText getStaticText11() {
+ return staticText11;
+ }
+
+ public void setStaticText11(StaticText st) {
+ this.staticText11 = st;
+ }
+
+
+
+ private HtmlPanelGrid gridPanelFilterActual = new HtmlPanelGrid();
+ public HtmlPanelGrid getGridPanelFilterActual()
+ {
+ return this.gridPanelFilterActual;
+ }
+ public void setGridPanelFilterActual( HtmlPanelGrid pg )
+ {
+ this.gridPanelFilterActual = pg;
+ }
+
+ private PanelGroup groupPanelFilterActual = new PanelGroup();
+ public PanelGroup getGroupPanelFilterActual()
+ {
+ return this.groupPanelFilterActual;
+ }
+ public void setGroupPanelFilterActual( PanelGroup pg )
+ {
+ this.groupPanelFilterActual = pg;
+ }
+
+ private StaticText labelFilterNameActual = new StaticText();
+ public StaticText getLabelFilterNameActual()
+ {
+ return this.labelFilterNameActual;
+ }
+ public void setLabelFilterNameActual( StaticText st )
+ {
+ this.labelFilterNameActual = st;
+ }
+
+ private TextField textFilterNameActual = new TextField();
+ public TextField getTextFilterNameActual()
+ {
+ return this.textFilterNameActual;
+ }
+ public void setTextFilterNameActual( TextField tf )
+ {
+ this.textFilterNameActual = tf;
+ }
+
+ private com.sun.rave.web.ui.component.Calendar calFilterDateActual = new com.sun.rave.web.ui.component.Calendar();
+ public com.sun.rave.web.ui.component.Calendar getCalFilterDateActual()
+ {
+ return this.calFilterDateActual;
+ }
+ public void setCalFilterDateActual( com.sun.rave.web.ui.component.Calendar c )
+ {
+ this.calFilterDateActual = c;
+ }
+
+ private TextField textFilterPORActual = new TextField();
+
+ public TextField getTextFilterPORActual() {
+ return textFilterPORActual;
+ }
+
+ public void setTextFilterPORActual(TextField textFilterPORActual) {
+ this.textFilterPORActual = textFilterPORActual;
+ }
+
+
+ private Button buttonFilterActual = new Button();
+ public Button getButtonFilterActual()
+ {
+ return this.buttonFilterActual;
+ }
+ public void setButtonFilterActual( Button b )
+ {
+ this.buttonFilterActual = b;
+ }
+
+ private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid();
+ public HtmlPanelGrid getGridPanelFilterSeg()
+ {
+ return this.gridPanelFilterSeg;
+ }
+ public void setGridPanelFilterSeg( HtmlPanelGrid pg )
+ {
+ this.gridPanelFilterSeg = pg;
+ }
+
+ private PanelGroup groupPanelFilterSeg = new PanelGroup();
+ public PanelGroup getGroupPanelFilterSeg()
+ {
+ return this.groupPanelFilterSeg;
+ }
+ public void setGroupPanelFilterSeg( PanelGroup pg )
+ {
+ this.groupPanelFilterSeg = pg;
+ }
+
+ private StaticText labelFilterNameSeg = new StaticText();
+ public StaticText getLabelFilterNameSeg()
+ {
+ return this.labelFilterNameSeg;
+ }
+ public void setLabelFilterNameSeg( StaticText st )
+ {
+ this.labelFilterNameSeg = st;
+ }
+
+ private TextField textFilterNameSeg = new TextField();
+ public TextField getTextFilterNameSeg()
+ {
+ return this.textFilterNameSeg;
+ }
+ public void setTextFilterNameSeg( TextField tf )
+ {
+ this.textFilterNameSeg = tf;
+ }
+
+ private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar();
+ public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg()
+ {
+ return this.calFilterDateSeg;
+ }
+ public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c )
+ {
+ this.calFilterDateSeg = c;
+ }
+
+ private TextField textFilterPORSeg = new TextField();
+
+ public TextField getTextFilterPORSeg() {
+ return textFilterPORSeg;
+ }
+
+ public void setTextFilterPORSeg(TextField textFilterPORSeg) {
+ this.textFilterPORSeg = textFilterPORSeg;
+ }
+
+
+ private Button buttonFilterSeg = new Button();
+ public Button getButtonFilterSeg()
+ {
+ return this.buttonFilterSeg;
+ }
+ public void setButtonFilterSeg( Button b )
+ {
+ this.buttonFilterSeg = b;
+ }
+
+ private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" );
+ //
+
+ /**
+ * Construct a new Page bean instance.
+ */
+ public FormMedico() {
+ }
+
+ /**
+ * Callback method that is called whenever a page is navigated to,
+ * either directly via a URL, or indirectly via page navigation.
+ * Customize this method to acquire resources that will be needed
+ * for event handlers and lifecycle methods, whether or not this
+ * page is performing post back processing.
+ *
+ * Note that, if the current request is a postback, the property
+ * values of the components do not represent any
+ * values submitted with this request. Instead, they represent the
+ * property values that were saved for this view when it was rendered.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("FormMedico Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+
+ if (!getSessionBean1().isLoggedIn()) {
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {
+ // . . . handle exception . . .
+ }
+ }
+ }
+
+ /**
+ * Callback method that is called after the component tree has been
+ * restored, but before any event processing takes place. This method
+ * will only be called on a postback request that
+ * is processing a form submit. Customize this method to allocate
+ * resources that will be required in your event handlers.
+ */
+ public void preprocess() {
+ }
+
+ /**
+ * Callback method that is called just before rendering takes place.
+ * This method will only be called for the page that
+ * will actually be rendered (and not, for example, on a page that
+ * handled a postback and then navigated to a different page). Customize
+ * this method to allocate resources that will be required for rendering
+ * this page.
+ */
+ public void prerender() {
+ lblUser.setText( getSessionBean1().getCurrentUser().getLogin() );
+
+ HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest();
+ String referer = request.getRequestURI();
+ String pageFrom = Utils.getPageFrom(referer);
+ if(!pageFrom.matches("FormMedico.jsp"))
+ {
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ //lblActivos.setRendered(true);
+ table1.setRendered(true);
+
+ //ArrayList actuaisList = adp.getAnalisesActuaisList(getSessionBean1().getCurrentUser().getEstabelecimento_id(), new Integer(5));
+ // ArrayList actuaisList = adp.getAnalisesActuaisMedicoList( getSessionBean1().getCurrentUser().getEstabelecimento_id() );
+ // getSessionBean1().getAnalisesActualDataProvider().setList(actuaisList);
+ }
+ catch(Exception ex)
+ {
+ //lblActivos.setRendered(false);
+ table1.setRendered(false);
+ ex.printStackTrace();
+ }
+
+ table2.setRendered(false);
+
+ try
+ {
+ //lblActivos.setRendered(true);
+ table2.setRendered(true);
+
+ ArrayList seguimentoList = adp.getAnalisesSeguimentoMedList(getSessionBean1().getCurrentUser().getEstabelecimento_id());
+ getSessionBean1().getAnalisesSeguimentoDataProvider().setList(seguimentoList);
+ }
+ catch(Exception ex)
+ {
+ //lblActivos.setRendered(false);
+ table2.setRendered(false);
+ ex.printStackTrace();
+ }
+
+ try
+ {
+ //lblActivos.setRendered(true);
+ table3.setRendered(true);
+
+ ArrayList concluidasList = adp.getAnalisesConcluidasList(getSessionBean1().getCurrentUser().getEstabelecimento_id());
+ getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList);
+ }
+ catch(Exception ex)
+ {
+ //lblActivos.setRendered(false);
+ table3.setRendered(false);
+ ex.printStackTrace();
+ }
+ fillAnoDropDown();
+ }
+ }
+
+ /**
+ * Callback method that is called after rendering is completed for
+ * this request, if init() was called (regardless of whether
+ * or not this was the page that was actually rendered). Customize this
+ * method to release resources acquired in the init(),
+ * preprocess(), or prerender() methods (or
+ * acquired during execution of an event handler).
+ */
+ public void destroy() {
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected RequestBean1 getRequestBean1() {
+ return (RequestBean1)getBean("RequestBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected SessionBean1 getSessionBean1() {
+ return (SessionBean1)getBean("SessionBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+
+ public String lnkEditUser_action() {
+ // TODO: Replace with your code
+
+ getSessionBean1().setNavFrom("FormMedico");
+ getSessionBean1().setModoEdicaoUtilizador("edit");
+ return "user";
+ }
+
+ public String lnkLogout_action() {
+ // TODO: Replace with your code
+
+ try
+ {
+ javax.servlet.http.HttpSession session =
+ (javax.servlet.http.HttpSession) getExternalContext().getSession(true);
+ session.invalidate();
+ }
+ catch(Exception ex){}
+
+ return "login";
+ }
+
+ public String lnkDataAcidente_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableActivosRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormMedico");
+ return "analise_acidente";
+ }
+
+ public String lnkNr_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableActivosRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormMedico");
+ return "analise_acidente";
+ }
+
+ public String lnkNomeAcidentado_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableActivosRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormMedico");
+ return "analise_acidente";
+ }
+
+ private AnaliseAcidente getTableActivosRowData()
+ {
+ RowKey rk = tableRowGroup1.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ AnalisesActualDataProvider provider = (AnalisesActualDataProvider) tableRowGroup1.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ AnaliseAcidente a = (AnaliseAcidente)list.get(k);
+ return a;
+ }
+
+ private AnaliseAcidente getTableConcluidasRowData()
+ {
+ RowKey rk = tableRowGroup3.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ AnalisesConcluidasDataProvider provider = (AnalisesConcluidasDataProvider) tableRowGroup3.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ AnaliseAcidente a = (AnaliseAcidente)list.get(k);
+ return a;
+ }
+
+ public String lnkDataAcidenteSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormMedico");
+ return "view_analise";
+ }
+
+ public String lnkNrSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormMedico");
+ return "view_analise";
+ }
+
+ public String lnkNomeAcidentadoSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormMedico");
+ return "view_analise";
+ }
+
+ private AnaliseAcidente getTableSeguimentoRowData()
+ {
+ RowKey rk = tableRowGroup2.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ AnalisesSeguimentoDataProvider provider = (AnalisesSeguimentoDataProvider) tableRowGroup2.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ AnaliseAcidente a = (AnaliseAcidente)list.get(k);
+ return a;
+ }
+
+ public void drpAno_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+ Object ano = event.getNewValue();
+ if(ano == null)
+ {
+ lblMes.setVisible(false);
+ drpMes.setVisible(false);
+ lblDia.setVisible(false);
+ drpDia.setVisible(false);
+ }
+ else
+ {
+ lblMes.setVisible(true);
+ drpMes.setVisible(true);
+ fillMesDropDown();
+ }
+ }
+
+ public void drpMes_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+ Object mes = event.getNewValue();
+ if(mes == null)
+ {
+ lblDia.setVisible(false);
+ drpDia.setVisible(false);
+ }
+ else
+ {
+ lblDia.setVisible(true);
+ drpDia.setVisible(true);
+ fillDiaDropDown();
+ }
+ }
+
+ public void drpDia_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+
+ }
+
+ public String butPesquisar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+ Object obAno = null;
+ Object obMes = null;
+ Object obDia = null;
+ try
+ {
+ obAno = drpAno.getSelected();
+ obMes = drpMes.getSelected();
+ obDia = drpDia.getSelected();
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ Integer ano = null;
+ Integer mes = null;
+ Integer dia = null;
+
+ if(obAno != null)
+ {
+ ano = (Integer) obAno;
+ }
+
+ if(obMes != null)
+ {
+ mes = (Integer) obMes;
+ }
+
+ if(obDia != null)
+ {
+ dia = (Integer) obDia;
+ }
+
+ String por = null;
+ if(txtPor.getText() != null)
+ {
+ por = (String) txtPor.getText();
+ if(por.trim().length() == 0)
+ {
+ por = null;
+ }
+ }
+
+ String nome = null;
+ if(txtNome.getText() != null)
+ {
+ nome = (String) txtNome.getText();
+ if(nome.trim().length() == 0)
+ {
+ nome = null;
+ }
+ }
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+
+ //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList());
+ ArrayList concluidasList = adp.searchAanalisesConcluidasList(
+ getSessionBean1().getCurrentUser().getEstabelecimento_id(),
+ ano, mes, dia, por, nome, null
+ );
+
+ table3.setRendered(true);
+ txtSearchMsg.setRendered(false);
+ getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList);
+
+
+ }
+ catch(Exception ex)
+ {
+ table3.setRendered(false);
+ txtSearchMsg.setRendered(true);
+ txtSearchMsg.setText("Não foram encontrados registos para a sua pesquisa !");
+ ex.printStackTrace();
+ }
+ return null;
+ }
+
+ private void fillAnoDropDown()
+ {
+// ArrayList anosList = new ArrayList();
+// for(int ano=2007; ano<2051; ano++)
+// {
+// anosList.add(new Integer(ano));
+// }
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ ArrayList anosList = adp.getAnosListFromAnalises();
+ com.sun.rave.web.ui.model.Option[] anoOptions = new com.sun.rave.web.ui.model.Option[anosList.size()+1];
+ anoOptions[0] = new Option("", "");
+ ListIterator iter = anosList.listIterator();
+ int i = 1;
+ while(iter.hasNext())
+ {
+ Integer ano = (Integer) iter.next();
+
+ anoOptions[i] = new Option(ano, ano.toString());
+ i++;
+ }
+ getSessionBean1().setAnoOptions(anoOptions);
+ Calendar cal = new GregorianCalendar();
+ int year = cal.get(Calendar.YEAR);
+ //drpAno.setSelected( new Integer(year) );
+
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ }
+
+
+ private void fillMesDropDown()
+ {
+ com.sun.rave.web.ui.model.Option[] mesOptions = new com.sun.rave.web.ui.model.Option[13];
+ mesOptions[0] = new Option("", "");
+ mesOptions[1] = new Option(new Integer(1), "Janeiro");
+ mesOptions[2] = new Option(new Integer(2), "Fevereiro");
+ mesOptions[3] = new Option(new Integer(3), "Março");
+ mesOptions[4] = new Option(new Integer(4), "Abril");
+ mesOptions[5] = new Option(new Integer(5), "Maio");
+ mesOptions[6] = new Option(new Integer(6), "Junho");
+ mesOptions[7] = new Option(new Integer(7), "Julho");
+ mesOptions[8] = new Option(new Integer(8), "Agosto");
+ mesOptions[9] = new Option(new Integer(9), "Setembro");
+ mesOptions[10] = new Option(new Integer(10), "Outubro");
+ mesOptions[11] = new Option(new Integer(11), "Novembro");
+ mesOptions[12] = new Option(new Integer(12), "Dezembro");
+ getSessionBean1().setMesOptions(mesOptions);
+ Calendar cal = new GregorianCalendar();
+ int month = cal.get(Calendar.MONTH); // 0=Jan, 1=Feb, ...
+ //drpMes.setSelected( new Integer(month+1) );
+ }
+
+ private void fillDiaDropDown()
+ {
+
+ }
+
+ public String lnkDataConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormMedico");
+ return "view_analise";
+ }
+
+ public String lnkNrConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormMedico");
+ return "view_analise";
+ }
+
+ public String lnkNomeConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormMedico");
+ return "view_analise";
+ }
+
+ public String lnkFase_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableActivosRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormMedico");
+ return "analise_acidente";
+ }
+
+ public String lnkEstabelecimento_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableActivosRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormMedico");
+ return "analise_acidente";
+ }
+
+ public String lnkFaseSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormMedico");
+ return "view_analise";
+ }
+
+ public String lnkEstabelecimentoSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormMedico");
+ return "view_analise";
+ }
+
+ public String lnkPor_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableActivosRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormMedico");
+ return "analise_acidente";
+ }
+
+ public String lnkPorSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormMedico");
+ return "view_analise";
+ }
+
+ public String lnkPorConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormMedico");
+ return "view_analise";
+ }
+
+ public String lnkEstabConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormMedico");
+ return "view_analise";
+ }
+
+
+
+
+ public String buttonFilterActual_action()
+ {
+ Date visitaDate = ( Date ) calFilterDateActual.getValue();
+ String visitaDateStr = null;
+ if ( visitaDate != null )
+ {
+ visitaDateStr = D_F.format( visitaDate );
+ }
+
+ String POR = null;
+ if ( textFilterPORActual.getText() != null )
+ {
+ POR = ( ( String ) textFilterPORActual.getText() ).trim();
+ if ( POR.length() == 0 )
+ {
+ POR = null;
+ }
+ }
+
+ String nome = null;
+ if ( textFilterNameActual.getText() != null )
+ {
+ nome = (( String ) textFilterNameActual.getText()).trim();
+ if( nome.length() == 0 )
+ {
+ nome = null;
+ }
+ }
+
+// AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+// ArrayList actualList = adp.searchAnalisesActuaisMedico(
+// getSessionBean1().getCurrentUser().getEstabelecimento_id(), nome, visitaDateStr );
+
+ table1.setRendered( true );
+ txtSearchMsg.setRendered( false );
+// getSessionBean1().getAnalisesActualDataProvider().setList( actualList );
+ }
+ catch( Exception e )
+ {
+ table1.setRendered( false );
+ txtSearchMsg.setRendered( true );
+ txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" );
+ }
+
+ return null;
+ }
+
+ public String buttonFilterSeg_action()
+ {
+ Date visitaDate = ( Date ) calFilterDateSeg.getValue();
+ String visitaDateStr = null;
+ if ( visitaDate != null )
+ {
+ visitaDateStr = D_F.format( visitaDate );
+ }
+
+ String POR = null;
+ if ( textFilterPORSeg.getText() != null )
+ {
+ POR = ( ( String ) textFilterPORSeg.getText() ).trim();
+ if ( POR.length() == 0 )
+ {
+ POR = null;
+ }
+ }
+
+ String nome = null;
+ if ( textFilterNameSeg.getText() != null )
+ {
+ nome = (( String ) textFilterNameSeg.getText()).trim();
+ if( nome.length() == 0 )
+ {
+ nome = null;
+ }
+ }
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ ArrayList seguimentoList = adp.searchAnalisesSeguimentoMedico(
+ getSessionBean1().getCurrentUser().getEstabelecimento_id(),
+ nome, visitaDateStr, POR );
+
+ table2.setRendered( true );
+ txtSearchMsg.setRendered( false );
+ getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList );
+ }
+ catch( Exception e )
+ {
+ table2.setRendered( false );
+ txtSearchMsg.setRendered( true );
+ txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" );
+ }
+
+ return null;
+ }
+
+}
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormRH.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormRH.java
new file mode 100644
index 00000000..dea9ff6d
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormRH.java
@@ -0,0 +1,2021 @@
+/*
+ * FormRH.java
+ *
+ * Created on October 1, 2007, 11:43 AM
+ * Copyright lluis
+ */
+package analiseacidentestrabalho;
+
+import com.sun.data.provider.RowKey;
+import com.sun.rave.web.ui.appbase.AbstractPageBean;
+import com.sun.rave.web.ui.component.Body;
+import com.sun.rave.web.ui.component.Button;
+import com.sun.rave.web.ui.component.DropDown;
+import com.sun.rave.web.ui.component.Form;
+import com.sun.rave.web.ui.component.Head;
+import com.sun.rave.web.ui.component.Html;
+import com.sun.rave.web.ui.component.Hyperlink;
+import com.sun.rave.web.ui.component.ImageComponent;
+import com.sun.rave.web.ui.component.Link;
+import com.sun.rave.web.ui.component.Page;
+import com.sun.rave.web.ui.component.PanelGroup;
+import com.sun.rave.web.ui.component.StaticText;
+import com.sun.rave.web.ui.component.Table;
+import com.sun.rave.web.ui.component.TableColumn;
+import com.sun.rave.web.ui.component.TableRowGroup;
+import com.sun.rave.web.ui.component.TextField;
+import com.sun.rave.web.ui.model.Option;
+import db.AnalisesActualDataProvider;
+import db.AnalisesConcluidasDataProvider;
+import db.AnalisesDataProvider;
+import db.AnalisesSeguimentoDataProvider;
+import global.Global;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.ListIterator;
+import javax.faces.FacesException;
+import javax.faces.component.html.HtmlPanelGrid;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ValueChangeEvent;
+import javax.servlet.http.HttpServletRequest;
+import utils.Utils;
+
+/**
+ * Page bean that corresponds to a similarly named JSP page. This
+ * class contains component definitions (and initialization code) for
+ * all components that you have defined on this page, as well as
+ * lifecycle methods and event handlers where you may add behavior
+ * to respond to incoming events.
+ */
+public class FormRH extends AbstractPageBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+
+ private Page page1 = new Page();
+
+ public Page getPage1() {
+ return page1;
+ }
+
+ public void setPage1(Page p) {
+ this.page1 = p;
+ }
+
+ private Html html1 = new Html();
+
+ public Html getHtml1() {
+ return html1;
+ }
+
+ public void setHtml1(Html h) {
+ this.html1 = h;
+ }
+
+ private Head head1 = new Head();
+
+ public Head getHead1() {
+ return head1;
+ }
+
+ public void setHead1(Head h) {
+ this.head1 = h;
+ }
+
+ private Link link1 = new Link();
+
+ public Link getLink1() {
+ return link1;
+ }
+
+ public void setLink1(Link l) {
+ this.link1 = l;
+ }
+
+ private Body body1 = new Body();
+
+ public Body getBody1() {
+ return body1;
+ }
+
+ public void setBody1(Body b) {
+ this.body1 = b;
+ }
+
+ private Form form1 = new Form();
+
+ public Form getForm1() {
+ return form1;
+ }
+
+ public void setForm1(Form f) {
+ this.form1 = f;
+ }
+
+ private HtmlPanelGrid gridBase1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridBase1() {
+ return gridBase1;
+ }
+
+ public void setGridBase1(HtmlPanelGrid hpg) {
+ this.gridBase1 = hpg;
+ }
+
+ private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLayout1() {
+ return gridLayout1;
+ }
+
+ public void setGridLayout1(HtmlPanelGrid hpg) {
+ this.gridLayout1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel1() {
+ return gridPanel1;
+ }
+
+ public void setGridPanel1(HtmlPanelGrid hpg) {
+ this.gridPanel1 = hpg;
+ }
+
+ private PanelGroup groupPanel1 = new PanelGroup();
+
+ public PanelGroup getGroupPanel1() {
+ return groupPanel1;
+ }
+
+ public void setGroupPanel1(PanelGroup pg) {
+ this.groupPanel1 = pg;
+ }
+
+ private ImageComponent image1 = new ImageComponent();
+
+ public ImageComponent getImage1() {
+ return image1;
+ }
+
+ public void setImage1(ImageComponent ic) {
+ this.image1 = ic;
+ }
+
+ private ImageComponent image2 = new ImageComponent();
+
+ public ImageComponent getImage2() {
+ return image2;
+ }
+
+ public void setImage2(ImageComponent ic) {
+ this.image2 = ic;
+ }
+
+ private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLayoutTop1() {
+ return gridLayoutTop1;
+ }
+
+ public void setGridLayoutTop1(HtmlPanelGrid hpg) {
+ this.gridLayoutTop1 = hpg;
+ }
+
+ private HtmlPanelGrid gridActual1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridActual1() {
+ return gridActual1;
+ }
+
+ public void setGridActual1(HtmlPanelGrid hpg) {
+ this.gridActual1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel2() {
+ return gridPanel2;
+ }
+
+ public void setGridPanel2(HtmlPanelGrid hpg) {
+ this.gridPanel2 = hpg;
+ }
+
+ private StaticText staticText4 = new StaticText();
+
+ public StaticText getStaticText4() {
+ return staticText4;
+ }
+
+ public void setStaticText4(StaticText st) {
+ this.staticText4 = st;
+ }
+
+ private StaticText staticText5 = new StaticText();
+
+ public StaticText getStaticText5() {
+ return staticText5;
+ }
+
+ public void setStaticText5(StaticText st) {
+ this.staticText5 = st;
+ }
+
+ private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel3() {
+ return gridPanel3;
+ }
+
+ public void setGridPanel3(HtmlPanelGrid hpg) {
+ this.gridPanel3 = hpg;
+ }
+
+ private Table table1 = new Table();
+
+ public Table getTable1() {
+ return table1;
+ }
+
+ public void setTable1(Table t) {
+ this.table1 = t;
+ }
+
+ private TableRowGroup tableRowGroup1 = new TableRowGroup();
+
+ public TableRowGroup getTableRowGroup1() {
+ return tableRowGroup1;
+ }
+
+ public void setTableRowGroup1(TableRowGroup trg) {
+ this.tableRowGroup1 = trg;
+ }
+
+ private TableColumn tableColumn1 = new TableColumn();
+
+ public TableColumn getTableColumn1() {
+ return tableColumn1;
+ }
+
+ public void setTableColumn1(TableColumn tc) {
+ this.tableColumn1 = tc;
+ }
+
+ private Hyperlink lnkDataAcidente = new Hyperlink();
+
+ public Hyperlink getLnkDataAcidente() {
+ return lnkDataAcidente;
+ }
+
+ public void setLnkDataAcidente(Hyperlink h) {
+ this.lnkDataAcidente = h;
+ }
+
+ private TableColumn tableColumn2 = new TableColumn();
+
+ public TableColumn getTableColumn2() {
+ return tableColumn2;
+ }
+
+ public void setTableColumn2(TableColumn tc) {
+ this.tableColumn2 = tc;
+ }
+
+ private Hyperlink lnkNr = new Hyperlink();
+
+ public Hyperlink getLnkNr() {
+ return lnkNr;
+ }
+
+ public void setLnkNr(Hyperlink h) {
+ this.lnkNr = h;
+ }
+
+ private TableColumn tableColumn3 = new TableColumn();
+
+ public TableColumn getTableColumn3() {
+ return tableColumn3;
+ }
+
+ public void setTableColumn3(TableColumn tc) {
+ this.tableColumn3 = tc;
+ }
+
+ private Hyperlink lnkNomeAcidentado = new Hyperlink();
+
+ public Hyperlink getLnkNomeAcidentado() {
+ return lnkNomeAcidentado;
+ }
+
+ public void setLnkNomeAcidentado(Hyperlink h) {
+ this.lnkNomeAcidentado = h;
+ }
+
+ private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridSeguimento1() {
+ return gridSeguimento1;
+ }
+
+ public void setGridSeguimento1(HtmlPanelGrid hpg) {
+ this.gridSeguimento1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel4() {
+ return gridPanel4;
+ }
+
+ public void setGridPanel4(HtmlPanelGrid hpg) {
+ this.gridPanel4 = hpg;
+ }
+
+ private StaticText staticText6 = new StaticText();
+
+ public StaticText getStaticText6() {
+ return staticText6;
+ }
+
+ public void setStaticText6(StaticText st) {
+ this.staticText6 = st;
+ }
+
+ private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel5() {
+ return gridPanel5;
+ }
+
+ public void setGridPanel5(HtmlPanelGrid hpg) {
+ this.gridPanel5 = hpg;
+ }
+
+ private Table table2 = new Table();
+
+ public Table getTable2() {
+ return table2;
+ }
+
+ public void setTable2(Table t) {
+ this.table2 = t;
+ }
+
+ private TableRowGroup tableRowGroup2 = new TableRowGroup();
+
+ public TableRowGroup getTableRowGroup2() {
+ return tableRowGroup2;
+ }
+
+ public void setTableRowGroup2(TableRowGroup trg) {
+ this.tableRowGroup2 = trg;
+ }
+
+ private TableColumn tableColumn4 = new TableColumn();
+
+ public TableColumn getTableColumn4() {
+ return tableColumn4;
+ }
+
+ public void setTableColumn4(TableColumn tc) {
+ this.tableColumn4 = tc;
+ }
+
+ private Hyperlink lnkDataAcidenteSeg = new Hyperlink();
+
+ public Hyperlink getLnkDataAcidenteSeg() {
+ return lnkDataAcidenteSeg;
+ }
+
+ public void setLnkDataAcidenteSeg(Hyperlink h) {
+ this.lnkDataAcidenteSeg = h;
+ }
+
+ private TableColumn tableColumn5 = new TableColumn();
+
+ public TableColumn getTableColumn5() {
+ return tableColumn5;
+ }
+
+ public void setTableColumn5(TableColumn tc) {
+ this.tableColumn5 = tc;
+ }
+
+ private Hyperlink lnkNrSeg = new Hyperlink();
+
+ public Hyperlink getLnkNrSeg() {
+ return lnkNrSeg;
+ }
+
+ public void setLnkNrSeg(Hyperlink h) {
+ this.lnkNrSeg = h;
+ }
+
+ private TableColumn tableColumn6 = new TableColumn();
+
+ public TableColumn getTableColumn6() {
+ return tableColumn6;
+ }
+
+ public void setTableColumn6(TableColumn tc) {
+ this.tableColumn6 = tc;
+ }
+
+ private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink();
+
+ public Hyperlink getLnkNomeAcidentadoSeg() {
+ return lnkNomeAcidentadoSeg;
+ }
+
+ public void setLnkNomeAcidentadoSeg(Hyperlink h) {
+ this.lnkNomeAcidentadoSeg = h;
+ }
+
+ private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridConcluidos1() {
+ return gridConcluidos1;
+ }
+
+ public void setGridConcluidos1(HtmlPanelGrid hpg) {
+ this.gridConcluidos1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel6() {
+ return gridPanel6;
+ }
+
+ public void setGridPanel6(HtmlPanelGrid hpg) {
+ this.gridPanel6 = hpg;
+ }
+
+ private StaticText staticText7 = new StaticText();
+
+ public StaticText getStaticText7() {
+ return staticText7;
+ }
+
+ public void setStaticText7(StaticText st) {
+ this.staticText7 = st;
+ }
+
+ private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel7() {
+ return gridPanel7;
+ }
+
+ public void setGridPanel7(HtmlPanelGrid hpg) {
+ this.gridPanel7 = hpg;
+ }
+
+ private PanelGroup groupPanel3 = new PanelGroup();
+
+ public PanelGroup getGroupPanel3() {
+ return groupPanel3;
+ }
+
+ public void setGroupPanel3(PanelGroup pg) {
+ this.groupPanel3 = pg;
+ }
+
+ private StaticText staticText8 = new StaticText();
+
+ public StaticText getStaticText8() {
+ return staticText8;
+ }
+
+ public void setStaticText8(StaticText st) {
+ this.staticText8 = st;
+ }
+
+ private DropDown drpAno = new DropDown();
+
+ public DropDown getDrpAno() {
+ return drpAno;
+ }
+
+ public void setDrpAno(DropDown dd) {
+ this.drpAno = dd;
+ }
+
+ private PanelGroup groupPanel4 = new PanelGroup();
+
+ public PanelGroup getGroupPanel4() {
+ return groupPanel4;
+ }
+
+ public void setGroupPanel4(PanelGroup pg) {
+ this.groupPanel4 = pg;
+ }
+
+ private StaticText lblMes = new StaticText();
+
+ public StaticText getLblMes() {
+ return lblMes;
+ }
+
+ public void setLblMes(StaticText st) {
+ this.lblMes = st;
+ }
+
+ private DropDown drpMes = new DropDown();
+
+ public DropDown getDrpMes() {
+ return drpMes;
+ }
+
+ public void setDrpMes(DropDown dd) {
+ this.drpMes = dd;
+ }
+
+ private PanelGroup groupPanel5 = new PanelGroup();
+
+ public PanelGroup getGroupPanel5() {
+ return groupPanel5;
+ }
+
+ public void setGroupPanel5(PanelGroup pg) {
+ this.groupPanel5 = pg;
+ }
+
+ private StaticText lblDia = new StaticText();
+
+ public StaticText getLblDia() {
+ return lblDia;
+ }
+
+ public void setLblDia(StaticText st) {
+ this.lblDia = st;
+ }
+
+ private DropDown drpDia = new DropDown();
+
+ public DropDown getDrpDia() {
+ return drpDia;
+ }
+
+ public void setDrpDia(DropDown dd) {
+ this.drpDia = dd;
+ }
+
+ private PanelGroup groupPanel6 = new PanelGroup();
+
+ public PanelGroup getGroupPanel6() {
+ return groupPanel6;
+ }
+
+ public void setGroupPanel6(PanelGroup pg) {
+ this.groupPanel6 = pg;
+ }
+
+ private StaticText staticText9 = new StaticText();
+
+ public StaticText getStaticText9() {
+ return staticText9;
+ }
+
+ public void setStaticText9(StaticText st) {
+ this.staticText9 = st;
+ }
+
+ private TextField txtNome = new TextField();
+
+ public TextField getTxtNome() {
+ return txtNome;
+ }
+
+ public void setTxtNome(TextField tf) {
+ this.txtNome = tf;
+ }
+
+ private Button butPesquisar = new Button();
+
+ public Button getButPesquisar() {
+ return butPesquisar;
+ }
+
+ public void setButPesquisar(Button b) {
+ this.butPesquisar = b;
+ }
+
+ private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel8() {
+ return gridPanel8;
+ }
+
+ public void setGridPanel8(HtmlPanelGrid hpg) {
+ this.gridPanel8 = hpg;
+ }
+
+ private Table table3 = new Table();
+
+ public Table getTable3() {
+ return table3;
+ }
+
+ public void setTable3(Table t) {
+ this.table3 = t;
+ }
+
+ private TableRowGroup tableRowGroup3 = new TableRowGroup();
+
+ public TableRowGroup getTableRowGroup3() {
+ return tableRowGroup3;
+ }
+
+ public void setTableRowGroup3(TableRowGroup trg) {
+ this.tableRowGroup3 = trg;
+ }
+
+ private TableColumn tableColumn7 = new TableColumn();
+
+ public TableColumn getTableColumn7() {
+ return tableColumn7;
+ }
+
+ public void setTableColumn7(TableColumn tc) {
+ this.tableColumn7 = tc;
+ }
+
+ private Hyperlink lnkDataConcluida = new Hyperlink();
+
+ public Hyperlink getLnkDataConcluida() {
+ return lnkDataConcluida;
+ }
+
+ public void setLnkDataConcluida(Hyperlink h) {
+ this.lnkDataConcluida = h;
+ }
+
+ private TableColumn tableColumn8 = new TableColumn();
+
+ public TableColumn getTableColumn8() {
+ return tableColumn8;
+ }
+
+ public void setTableColumn8(TableColumn tc) {
+ this.tableColumn8 = tc;
+ }
+
+ private Hyperlink lnkNrConcluida = new Hyperlink();
+
+ public Hyperlink getLnkNrConcluida() {
+ return lnkNrConcluida;
+ }
+
+ public void setLnkNrConcluida(Hyperlink h) {
+ this.lnkNrConcluida = h;
+ }
+
+ private TableColumn tableColumn9 = new TableColumn();
+
+ public TableColumn getTableColumn9() {
+ return tableColumn9;
+ }
+
+ public void setTableColumn9(TableColumn tc) {
+ this.tableColumn9 = tc;
+ }
+
+ private Hyperlink lnkNomeConcluida = new Hyperlink();
+
+ public Hyperlink getLnkNomeConcluida() {
+ return lnkNomeConcluida;
+ }
+
+ public void setLnkNomeConcluida(Hyperlink h) {
+ this.lnkNomeConcluida = h;
+ }
+
+ private StaticText txtSearchMsg = new StaticText();
+
+ public StaticText getTxtSearchMsg() {
+ return txtSearchMsg;
+ }
+
+ public void setTxtSearchMsg(StaticText st) {
+ this.txtSearchMsg = st;
+ }
+
+ private TableColumn tableColumn10 = new TableColumn();
+
+ public TableColumn getTableColumn10() {
+ return tableColumn10;
+ }
+
+ public void setTableColumn10(TableColumn tc) {
+ this.tableColumn10 = tc;
+ }
+
+ private Hyperlink lnkFase = new Hyperlink();
+
+ public Hyperlink getLnkFase() {
+ return lnkFase;
+ }
+
+ public void setLnkFase(Hyperlink h) {
+ this.lnkFase = h;
+ }
+
+ private Hyperlink lnkEstabelecimento = new Hyperlink();
+
+ public Hyperlink getLnkEstabelecimento() {
+ return lnkEstabelecimento;
+ }
+
+ public void setLnkEstabelecimento(Hyperlink h) {
+ this.lnkEstabelecimento = h;
+ }
+
+ private TableColumn tableColumn11 = new TableColumn();
+
+ public TableColumn getTableColumn11() {
+ return tableColumn11;
+ }
+
+ public void setTableColumn11(TableColumn tc) {
+ this.tableColumn11 = tc;
+ }
+
+ private Hyperlink lnkFaseSeg = new Hyperlink();
+
+ public Hyperlink getLnkFaseSeg() {
+ return lnkFaseSeg;
+ }
+
+ public void setLnkFaseSeg(Hyperlink h) {
+ this.lnkFaseSeg = h;
+ }
+
+ private Hyperlink lnkEstabelecimentoSeg = new Hyperlink();
+
+ public Hyperlink getLnkEstabelecimentoSeg() {
+ return lnkEstabelecimentoSeg;
+ }
+
+ public void setLnkEstabelecimentoSeg(Hyperlink h) {
+ this.lnkEstabelecimentoSeg = h;
+ }
+
+
+ private TableColumn tableColumn12 = new TableColumn();
+
+ public TableColumn getTableColumn12() {
+ return tableColumn12;
+ }
+
+ public void setTableColumn12(TableColumn tc) {
+ this.tableColumn12 = tc;
+ }
+
+ private TableColumn tableColumn13 = new TableColumn();
+
+ public TableColumn getTableColumn13() {
+ return tableColumn13;
+ }
+
+ public void setTableColumn13(TableColumn tc) {
+ this.tableColumn13 = tc;
+ }
+
+ private TableColumn tableColumn14 = new TableColumn();
+
+ public TableColumn getTableColumn14() {
+ return tableColumn14;
+ }
+
+ public void setTableColumn14(TableColumn tc) {
+ this.tableColumn14 = tc;
+ }
+
+ private TableColumn tableColumn15 = new TableColumn();
+
+ public TableColumn getTableColumn15() {
+ return tableColumn15;
+ }
+
+ public void setTableColumn15(TableColumn tc) {
+ this.tableColumn15 = tc;
+ }
+
+ private Hyperlink lnkPor = new Hyperlink();
+
+ public Hyperlink getLnkPor() {
+ return lnkPor;
+ }
+
+ public void setLnkPor(Hyperlink h) {
+ this.lnkPor = h;
+ }
+
+ private Hyperlink lnkPorSeg = new Hyperlink();
+
+ public Hyperlink getLnkPorSeg() {
+ return lnkPorSeg;
+ }
+
+ public void setLnkPorSeg(Hyperlink h) {
+ this.lnkPorSeg = h;
+ }
+
+ private Hyperlink lnkPorConcluida = new Hyperlink();
+
+ public Hyperlink getLnkPorConcluida() {
+ return lnkPorConcluida;
+ }
+
+ public void setLnkPorConcluida(Hyperlink h) {
+ this.lnkPorConcluida = h;
+ }
+
+ private Hyperlink lnkEstabConcluida = new Hyperlink();
+
+ public Hyperlink getLnkEstabConcluida() {
+ return lnkEstabConcluida;
+ }
+
+ public void setLnkEstabConcluida(Hyperlink h) {
+ this.lnkEstabConcluida = h;
+ }
+
+ private PanelGroup groupPanel7 = new PanelGroup();
+
+ public PanelGroup getGroupPanel7() {
+ return groupPanel7;
+ }
+
+ public void setGroupPanel7(PanelGroup pg) {
+ this.groupPanel7 = pg;
+ }
+
+ private StaticText staticText3 = new StaticText();
+
+ public StaticText getStaticText3() {
+ return staticText3;
+ }
+
+ public void setStaticText3(StaticText st) {
+ this.staticText3 = st;
+ }
+
+ private TextField txtPor = new TextField();
+
+ public TextField getTxtPor() {
+ return txtPor;
+ }
+
+ public void setTxtPor(TextField tf) {
+ this.txtPor = tf;
+ }
+
+ private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel9() {
+ return gridPanel9;
+ }
+
+ public void setGridPanel9(HtmlPanelGrid hpg) {
+ this.gridPanel9 = hpg;
+ }
+
+ private PanelGroup groupPanel8 = new PanelGroup();
+
+ public PanelGroup getGroupPanel8() {
+ return groupPanel8;
+ }
+
+ public void setGroupPanel8(PanelGroup pg) {
+ this.groupPanel8 = pg;
+ }
+
+ private StaticText staticText1 = new StaticText();
+
+ public StaticText getStaticText1() {
+ return staticText1;
+ }
+
+ public void setStaticText1(StaticText st) {
+ this.staticText1 = st;
+ }
+
+ private ImageComponent image3 = new ImageComponent();
+
+ public ImageComponent getImage3() {
+ return image3;
+ }
+
+ public void setImage3(ImageComponent ic) {
+ this.image3 = ic;
+ }
+
+ private StaticText staticText10 = new StaticText();
+
+ public StaticText getStaticText10() {
+ return staticText10;
+ }
+
+ public void setStaticText10(StaticText st) {
+ this.staticText10 = st;
+ }
+
+ private HtmlPanelGrid gridPanel10 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel10() {
+ return gridPanel10;
+ }
+
+ public void setGridPanel10(HtmlPanelGrid hpg) {
+ this.gridPanel10 = hpg;
+ }
+
+ private StaticText txtMsg1 = new StaticText();
+
+ public StaticText getTxtMsg1() {
+ return txtMsg1;
+ }
+
+ public void setTxtMsg1(StaticText st) {
+ this.txtMsg1 = st;
+ }
+
+ private TableColumn tableColumn16 = new TableColumn();
+
+ public TableColumn getTableColumn16() {
+ return tableColumn16;
+ }
+
+ public void setTableColumn16(TableColumn tc) {
+ this.tableColumn16 = tc;
+ }
+
+ private Hyperlink lnkDataAbertura = new Hyperlink();
+
+ public Hyperlink getLnkDataAbertura() {
+ return lnkDataAbertura;
+ }
+
+ public void setLnkDataAbertura(Hyperlink h) {
+ this.lnkDataAbertura = h;
+ }
+
+ private TableColumn tableColumn17 = new TableColumn();
+
+ public TableColumn getTableColumn17() {
+ return tableColumn17;
+ }
+
+ public void setTableColumn17(TableColumn tc) {
+ this.tableColumn17 = tc;
+ }
+
+ private Hyperlink lnkDataAberturaSeg = new Hyperlink();
+
+ public Hyperlink getLnkDataAberturaSeg() {
+ return lnkDataAberturaSeg;
+ }
+
+ public void setLnkDataAberturaSeg(Hyperlink h) {
+ this.lnkDataAberturaSeg = h;
+ }
+
+ private TableColumn tableColumn18 = new TableColumn();
+
+ public TableColumn getTableColumn18() {
+ return tableColumn18;
+ }
+
+ public void setTableColumn18(TableColumn tc) {
+ this.tableColumn18 = tc;
+ }
+
+ private TableColumn tableColumn19 = new TableColumn();
+
+ public TableColumn getTableColumn19() {
+ return tableColumn19;
+ }
+
+ public void setTableColumn19(TableColumn tc) {
+ this.tableColumn19 = tc;
+ }
+
+ private TableColumn tableColumn20 = new TableColumn();
+
+ public TableColumn getTableColumn20() {
+ return tableColumn20;
+ }
+
+ public void setTableColumn20(TableColumn tc) {
+ this.tableColumn20 = tc;
+ }
+
+ private Hyperlink lnkDataAberturaConcluida = new Hyperlink();
+
+ public Hyperlink getLnkDataAberturaConcluida() {
+ return lnkDataAberturaConcluida;
+ }
+
+ public void setLnkDataAberturaConcluida(Hyperlink h) {
+ this.lnkDataAberturaConcluida = h;
+ }
+ private Hyperlink lnkPlanosActuacao = new Hyperlink();
+
+ public Hyperlink getLnkPlanosActuacao() {
+ return lnkPlanosActuacao;
+ }
+
+ public void setLnkPlanosActuacao(Hyperlink h) {
+ this.lnkPlanosActuacao = h;
+ }
+ private StaticText lblUser = new StaticText();
+
+ public StaticText getLblUser() {
+ return lblUser;
+ }
+
+ public void setLblUser(StaticText st) {
+ this.lblUser = st;
+ }
+
+
+
+ private HtmlPanelGrid gridPanelFilterActual = new HtmlPanelGrid();
+ public HtmlPanelGrid getGridPanelFilterActual()
+ {
+ return this.gridPanelFilterActual;
+ }
+ public void setGridPanelFilterActual( HtmlPanelGrid pg )
+ {
+ this.gridPanelFilterActual = pg;
+ }
+
+ private PanelGroup groupPanelFilterActual = new PanelGroup();
+ public PanelGroup getGroupPanelFilterActual()
+ {
+ return this.groupPanelFilterActual;
+ }
+ public void setGroupPanelFilterActual( PanelGroup pg )
+ {
+ this.groupPanelFilterActual = pg;
+ }
+
+ private StaticText labelFilterNameActual = new StaticText();
+ public StaticText getLabelFilterNameActual()
+ {
+ return this.labelFilterNameActual;
+ }
+ public void setLabelFilterNameActual( StaticText st )
+ {
+ this.labelFilterNameActual = st;
+ }
+
+ private TextField textFilterNameActual = new TextField();
+ public TextField getTextFilterNameActual()
+ {
+ return this.textFilterNameActual;
+ }
+ public void setTextFilterNameActual( TextField tf )
+ {
+ this.textFilterNameActual = tf;
+ }
+ private com.sun.rave.web.ui.component.Calendar calFilterDateActual = new com.sun.rave.web.ui.component.Calendar();
+ public com.sun.rave.web.ui.component.Calendar getCalFilterDateActual()
+ {
+ return this.calFilterDateActual;
+ }
+ public void setCalFilterDateActual( com.sun.rave.web.ui.component.Calendar c )
+ {
+ this.calFilterDateActual = c;
+ }
+
+ private TextField textFilterPORActual = new TextField();
+
+ public TextField getTextFilterPORActual() {
+ return textFilterPORActual;
+ }
+
+ public void setTextFilterPORActual(TextField textFilterPORActual) {
+ this.textFilterPORActual = textFilterPORActual;
+ }
+
+
+ private Button buttonFilterActual = new Button();
+ public Button getButtonFilterActual()
+ {
+ return this.buttonFilterActual;
+ }
+ public void setButtonFilterActual( Button b )
+ {
+ this.buttonFilterActual = b;
+ }
+
+ private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid();
+ public HtmlPanelGrid getGridPanelFilterSeg()
+ {
+ return this.gridPanelFilterSeg;
+ }
+ public void setGridPanelFilterSeg( HtmlPanelGrid pg )
+ {
+ this.gridPanelFilterSeg = pg;
+ }
+
+ private PanelGroup groupPanelFilterSeg = new PanelGroup();
+ public PanelGroup getGroupPanelFilterSeg()
+ {
+ return this.groupPanelFilterSeg;
+ }
+ public void setGroupPanelFilterSeg( PanelGroup pg )
+ {
+ this.groupPanelFilterSeg = pg;
+ }
+
+ private StaticText labelFilterNameSeg = new StaticText();
+ public StaticText getLabelFilterNameSeg()
+ {
+ return this.labelFilterNameSeg;
+ }
+ public void setLabelFilterNameSeg( StaticText st )
+ {
+ this.labelFilterNameSeg = st;
+ }
+
+ private TextField textFilterNameSeg = new TextField();
+ public TextField getTextFilterNameSeg()
+ {
+ return this.textFilterNameSeg;
+ }
+ public void setTextFilterNameSeg( TextField tf )
+ {
+ this.textFilterNameSeg = tf;
+ }
+
+ private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar();
+ public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg()
+ {
+ return this.calFilterDateSeg;
+ }
+ public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c )
+ {
+ this.calFilterDateSeg = c;
+ }
+
+ private TextField textFilterPORSeg = new TextField();
+
+ public TextField getTextFilterPORSeg() {
+ return textFilterPORSeg;
+ }
+
+ public void setTextFilterPORSeg(TextField textFilterPORSeg) {
+ this.textFilterPORSeg = textFilterPORSeg;
+ }
+
+
+ private Button buttonFilterSeg = new Button();
+ public Button getButtonFilterSeg()
+ {
+ return this.buttonFilterSeg;
+ }
+ public void setButtonFilterSeg( Button b )
+ {
+ this.buttonFilterSeg = b;
+ }
+
+
+ private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" );
+ //
+
+ /**
+ * Construct a new Page bean instance.
+ */
+ public FormRH() {
+ }
+
+ /**
+ * Callback method that is called whenever a page is navigated to,
+ * either directly via a URL, or indirectly via page navigation.
+ * Customize this method to acquire resources that will be needed
+ * for event handlers and lifecycle methods, whether or not this
+ * page is performing post back processing.
+ *
+ * Note that, if the current request is a postback, the property
+ * values of the components do not represent any
+ * values submitted with this request. Instead, they represent the
+ * property values that were saved for this view when it was rendered.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("FormRH Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+
+ if (!getSessionBean1().isLoggedIn()) {
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {
+ // . . . handle exception . . .
+ }
+ }
+
+ }
+
+ /**
+ * Callback method that is called after the component tree has been
+ * restored, but before any event processing takes place. This method
+ * will only be called on a postback request that
+ * is processing a form submit. Customize this method to allocate
+ * resources that will be required in your event handlers.
+ */
+ public void preprocess() {
+ }
+
+ /**
+ * Callback method that is called just before rendering takes place.
+ * This method will only be called for the page that
+ * will actually be rendered (and not, for example, on a page that
+ * handled a postback and then navigated to a different page). Customize
+ * this method to allocate resources that will be required for rendering
+ * this page.
+ */
+ public void prerender() {
+ System.out.println("=== FORM_RH ===");
+ lblUser.setText( getSessionBean1().getCurrentUser().getLogin() );
+
+ String responsavel_loja = getSessionBean1().getCurrentUser().getResponsavel_loja();
+ if(responsavel_loja.matches("n"))
+ {
+ lnkPlanosActuacao.setDisabled(true);
+ }
+// if(getSessionBean1().getCurrentUser().getTipo().intValue() == 7) // director rh
+// {
+// //////stSep.setText("|");
+// }
+// else //rh
+// {
+// //////stSep.setText(" ");
+// //////lnkNewUser.setRendered(false);
+// stSep1.setRendered(false);
+// }
+
+
+ HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest();
+ String referer = request.getRequestURI();
+ String pageFrom = Utils.getPageFrom(referer);
+ if(!pageFrom.matches("FormRH.jsp"))
+ {
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ //lblActivos.setRendered(true);
+ table1.setRendered(true);
+
+ //ArrayList actuaisList = adp.getAnalisesActuaisList(getSessionBean1().getCurrentUser().getEstabelecimento_id());
+ ArrayList actuaisList = adp.getAnalisesActuaisRhList(getSessionBean1().getCurrentUser().getEstabelecimento_id(), responsavel_loja);
+ getSessionBean1().getAnalisesActualDataProvider().setList(actuaisList);
+ }
+ catch(Exception ex)
+ {
+ //lblActivos.setRendered(false);
+ table1.setRendered(false);
+ //ex.printStackTrace();
+ }
+
+ try
+ {
+ //lblActivos.setRendered(true);
+ table2.setRendered(true);
+
+ ArrayList seguimentoList = adp.getAnalisesSeguimentoRhList(getSessionBean1().getCurrentUser().getEstabelecimento_id(), responsavel_loja);
+ getSessionBean1().getAnalisesSeguimentoDataProvider().setList(seguimentoList);
+ }
+ catch(Exception ex)
+ {
+ //lblActivos.setRendered(false);
+ table2.setRendered(false);
+ //ex.printStackTrace();
+ }
+
+ try
+ {
+ //lblActivos.setRendered(true);
+ table3.setRendered(true);
+
+ ArrayList concluidasList = adp.getAnalisesConcluidasList(getSessionBean1().getCurrentUser().getEstabelecimento_id());
+ getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList);
+ }
+ catch(Exception ex)
+ {
+ //lblActivos.setRendered(false);
+ table3.setRendered(false);
+ //ex.printStackTrace();
+ }
+ fillAnoDropDown();
+ }
+
+ txtMsg1.setText(getSessionBean1().getMsg());
+ getSessionBean1().setMsg("");
+ }
+
+ /**
+ * Callback method that is called after rendering is completed for
+ * this request, if init() was called (regardless of whether
+ * or not this was the page that was actually rendered). Customize this
+ * method to release resources acquired in the init(),
+ * preprocess(), or prerender() methods (or
+ * acquired during execution of an event handler).
+ */
+ public void destroy() {
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected SessionBean1 getSessionBean1() {
+ return (SessionBean1)getBean("SessionBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected RequestBean1 getRequestBean1() {
+ return (RequestBean1)getBean("RequestBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+
+ public String lnkLogout_action() {
+ // TODO: Replace with your code
+
+ try
+ {
+ javax.servlet.http.HttpSession session =
+ (javax.servlet.http.HttpSession) getExternalContext().getSession(true);
+ session.invalidate();
+ }
+ catch(Exception ex){}
+
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {}
+ //return "login";
+ return null;
+ }
+
+ public String butNovaAnalise_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ return null;
+ }
+
+ public String lnkDataAcidente_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableActivosRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormRH");
+ return "analise_acidente";
+ }
+
+ public String lnkDataAbertura_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableActivosRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormRH");
+ return "analise_acidente";
+ }
+
+ public String lnkNr_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableActivosRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormRH");
+ return "analise_acidente";
+ }
+
+ public String lnkNomeAcidentado_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableActivosRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormRH");
+ return "analise_acidente";
+ }
+
+ private AnaliseAcidente getTableActivosRowData()
+ {
+ RowKey rk = tableRowGroup1.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ AnalisesActualDataProvider provider = (AnalisesActualDataProvider) tableRowGroup1.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ AnaliseAcidente a = (AnaliseAcidente)list.get(k);
+ return a;
+ }
+
+ public String lnkDataAcidenteSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormRH");
+ return "view_analise";
+ }
+
+ public String lnkDataAberturaSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormRH");
+ return "view_analise";
+ }
+
+ public String lnkNrSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormRH");
+ return "view_analise";
+ }
+
+
+ public String lnkNomeAcidentadoSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormRH");
+ return "view_analise";
+ }
+
+ private AnaliseAcidente getTableSeguimentoRowData()
+ {
+ RowKey rk = tableRowGroup2.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ AnalisesSeguimentoDataProvider provider = (AnalisesSeguimentoDataProvider) tableRowGroup2.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ AnaliseAcidente a = (AnaliseAcidente)list.get(k);
+ return a;
+ }
+
+ private AnaliseAcidente getTableConcluidasRowData()
+ {
+ RowKey rk = tableRowGroup3.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ AnalisesConcluidasDataProvider provider = (AnalisesConcluidasDataProvider) tableRowGroup3.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ AnaliseAcidente a = (AnaliseAcidente)list.get(k);
+ return a;
+ }
+
+ public void drpAno_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+ Object ano = event.getNewValue();
+ if(ano == null)
+ {
+ lblMes.setVisible(false);
+ drpMes.setVisible(false);
+ lblDia.setVisible(false);
+ drpDia.setVisible(false);
+ }
+ else
+ {
+ lblMes.setVisible(true);
+ drpMes.setVisible(true);
+ fillMesDropDown();
+ }
+ }
+
+ public void drpMes_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+ Object mes = event.getNewValue();
+ if(mes == null)
+ {
+ lblDia.setVisible(false);
+ drpDia.setVisible(false);
+ }
+ else
+ {
+ lblDia.setVisible(true);
+ drpDia.setVisible(true);
+ //fillDiaDropDown();
+ }
+ }
+
+ public void drpDia_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+
+ }
+
+ public String butPesquisar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ Object obAno = null;
+ Object obMes = null;
+ Object obDia = null;
+ try
+ {
+ obAno = drpAno.getSelected();
+ obMes = drpMes.getSelected();
+ obDia = drpDia.getSelected();
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ Integer ano = null;
+ Integer mes = null;
+ Integer dia = null;
+
+ if(obAno != null)
+ {
+ ano = (Integer) obAno;
+ }
+
+ if(obMes != null)
+ {
+ mes = (Integer) obMes;
+ }
+
+ if(obDia != null)
+ {
+ dia = (Integer) obDia;
+ }
+
+ String por = null;
+ if(txtPor.getText() != null)
+ {
+ por = (String) txtPor.getText();
+ if(por.trim().length() == 0)
+ {
+ por = null;
+ }
+ }
+
+ String nome = null;
+ if(txtNome.getText() != null)
+ {
+ nome = (String) txtNome.getText();
+ if(nome.trim().length() == 0)
+ {
+ nome = null;
+ }
+ }
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+
+ //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList());
+ ArrayList concluidasList = adp.searchAanalisesConcluidasList(
+ getSessionBean1().getCurrentUser().getEstabelecimento_id(),
+ ano, mes, dia, por, nome, null );
+
+ table3.setRendered(true);
+ txtSearchMsg.setRendered(false);
+ getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList);
+
+
+ }
+ catch(Exception ex)
+ {
+ table3.setRendered(false);
+ txtSearchMsg.setRendered(true);
+ txtSearchMsg.setText("Não foram encontrados registos para a sua pesquisa !");
+ //ex.printStackTrace();
+ }
+
+ return null;
+ }
+
+// private String getPageFrom(String referer)
+// {
+// String pageFrom = referer.substring(referer.lastIndexOf("/")+1);
+// return pageFrom;
+// }
+
+ private void fillAnoDropDown()
+ {
+// ArrayList anosList = new ArrayList();
+// for(int ano=2007; ano<2051; ano++)
+// {
+// anosList.add(new Integer(ano));
+// }
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ ArrayList anosList = adp.getAnosListFromAnalises();
+ com.sun.rave.web.ui.model.Option[] anoOptions = new com.sun.rave.web.ui.model.Option[anosList.size()+1];
+ anoOptions[0] = new Option("", "");
+ ListIterator iter = anosList.listIterator();
+ int i = 1;
+ while(iter.hasNext())
+ {
+ Integer ano = (Integer) iter.next();
+
+ anoOptions[i] = new Option(ano, ano.toString());
+ i++;
+ }
+ getSessionBean1().setAnoOptions(anoOptions);
+ Calendar cal = new GregorianCalendar();
+ int year = cal.get(Calendar.YEAR);
+ //drpAno.setSelected( new Integer(year) );
+
+ }
+ catch(Exception ex)
+ {
+ //ex.printStackTrace();
+ }
+
+ }
+
+
+ private void fillMesDropDown()
+ {
+ com.sun.rave.web.ui.model.Option[] mesOptions = new com.sun.rave.web.ui.model.Option[13];
+ mesOptions[0] = new Option("", "");
+ mesOptions[1] = new Option(new Integer(1), "Janeiro");
+ mesOptions[2] = new Option(new Integer(2), "Fevereiro");
+ mesOptions[3] = new Option(new Integer(3), "Março");
+ mesOptions[4] = new Option(new Integer(4), "Abril");
+ mesOptions[5] = new Option(new Integer(5), "Maio");
+ mesOptions[6] = new Option(new Integer(6), "Junho");
+ mesOptions[7] = new Option(new Integer(7), "Julho");
+ mesOptions[8] = new Option(new Integer(8), "Agosto");
+ mesOptions[9] = new Option(new Integer(9), "Setembro");
+ mesOptions[10] = new Option(new Integer(10), "Outubro");
+ mesOptions[11] = new Option(new Integer(11), "Novembro");
+ mesOptions[12] = new Option(new Integer(12), "Dezembro");
+ getSessionBean1().setMesOptions(mesOptions);
+ Calendar cal = new GregorianCalendar();
+ int month = cal.get(Calendar.MONTH); // 0=Jan, 1=Feb, ...
+ //drpMes.setSelected( new Integer(month+1) );
+ }
+
+ private void fillDiaDropDown()
+ {
+// int ano = ( (Integer)drpAno.getSelected() ).intValue();
+// int mes = ( (Integer)drpMes.getSelected() ).intValue();
+// int dias = 0;
+// switch (mes) {
+// case 1: dias=31; break;
+// case 2:
+// GregorianCalendar cal = new GregorianCalendar();
+// if(cal.isLeapYear(ano))
+// {
+// dias = 29;
+// }
+// else
+// {
+// dias = 28;
+// }
+// break;
+// case 3: dias=31; break;
+// case 4: dias=30; break;
+// case 5: dias=31; break;
+// case 6: dias=30; break;
+// case 7: dias=31; break;
+// case 8: dias=31; break;
+// case 9: dias=30; break;
+// case 10: dias=31; break;
+// case 11: dias=30; break;
+// case 12: dias=31; break;
+// default: System.out.println("Invalid month.");break;
+// }
+//
+// ArrayList diasList = new ArrayList();
+// for(int dia=1; diaPage bean that corresponds to a similarly named JSP page. This
+ * class contains component definitions (and initialization code) for
+ * all components that you have defined on this page, as well as
+ * lifecycle methods and event handlers where you may add behavior
+ * to respond to incoming events.
+ */
+public class FormSeguranca extends AbstractPageBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+
+ private Page page1 = new Page();
+
+ public Page getPage1() {
+ return page1;
+ }
+
+ public void setPage1(Page p) {
+ this.page1 = p;
+ }
+
+ private Html html1 = new Html();
+
+ public Html getHtml1() {
+ return html1;
+ }
+
+ public void setHtml1(Html h) {
+ this.html1 = h;
+ }
+
+ private Head head1 = new Head();
+
+ public Head getHead1() {
+ return head1;
+ }
+
+ public void setHead1(Head h) {
+ this.head1 = h;
+ }
+
+ private Link link1 = new Link();
+
+ public Link getLink1() {
+ return link1;
+ }
+
+ public void setLink1(Link l) {
+ this.link1 = l;
+ }
+
+ private Body body1 = new Body();
+
+ public Body getBody1() {
+ return body1;
+ }
+
+ public void setBody1(Body b) {
+ this.body1 = b;
+ }
+
+ private Form form1 = new Form();
+
+ public Form getForm1() {
+ return form1;
+ }
+
+ public void setForm1(Form f) {
+ this.form1 = f;
+ }
+
+ private HtmlPanelGrid gridBase = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridBase() {
+ return gridBase;
+ }
+
+ public void setGridBase(HtmlPanelGrid hpg) {
+ this.gridBase = hpg;
+ }
+
+ private HtmlPanelGrid gridLayout = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLayout() {
+ return gridLayout;
+ }
+
+ public void setGridLayout(HtmlPanelGrid hpg) {
+ this.gridLayout = hpg;
+ }
+
+ private HtmlPanelGrid gridLayoutTop = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLayoutTop() {
+ return gridLayoutTop;
+ }
+
+ public void setGridLayoutTop(HtmlPanelGrid hpg) {
+ this.gridLayoutTop = hpg;
+ }
+
+ private HtmlPanelGrid gridActual = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridActual() {
+ return gridActual;
+ }
+
+ public void setGridActual(HtmlPanelGrid hpg) {
+ this.gridActual = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel1() {
+ return gridPanel1;
+ }
+
+ public void setGridPanel1(HtmlPanelGrid hpg) {
+ this.gridPanel1 = hpg;
+ }
+
+ private StaticText staticText1 = new StaticText();
+
+ public StaticText getStaticText1() {
+ return staticText1;
+ }
+
+ public void setStaticText1(StaticText st) {
+ this.staticText1 = st;
+ }
+
+ private HtmlPanelGrid gridSeguimento = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridSeguimento() {
+ return gridSeguimento;
+ }
+
+ public void setGridSeguimento(HtmlPanelGrid hpg) {
+ this.gridSeguimento = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel2() {
+ return gridPanel2;
+ }
+
+ public void setGridPanel2(HtmlPanelGrid hpg) {
+ this.gridPanel2 = hpg;
+ }
+
+ private StaticText staticText2 = new StaticText();
+
+ public StaticText getStaticText2() {
+ return staticText2;
+ }
+
+ public void setStaticText2(StaticText st) {
+ this.staticText2 = st;
+ }
+
+ private HtmlPanelGrid gridConcluidos = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridConcluidos() {
+ return gridConcluidos;
+ }
+
+ public void setGridConcluidos(HtmlPanelGrid hpg) {
+ this.gridConcluidos = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel3() {
+ return gridPanel3;
+ }
+
+ public void setGridPanel3(HtmlPanelGrid hpg) {
+ this.gridPanel3 = hpg;
+ }
+
+ private StaticText staticText3 = new StaticText();
+
+ public StaticText getStaticText3() {
+ return staticText3;
+ }
+
+ public void setStaticText3(StaticText st) {
+ this.staticText3 = st;
+ }
+
+ private Link link2 = new Link();
+
+ public Link getLink2() {
+ return link2;
+ }
+
+ public void setLink2(Link l) {
+ this.link2 = l;
+ }
+
+ private Button butNovaAnalise = new Button();
+
+ public Button getButNovaAnalise() {
+ return butNovaAnalise;
+ }
+
+ public void setButNovaAnalise(Button b) {
+ this.butNovaAnalise = b;
+ }
+
+ private StaticText staticText4 = new StaticText();
+
+ public StaticText getStaticText4() {
+ return staticText4;
+ }
+
+ public void setStaticText4(StaticText st) {
+ this.staticText4 = st;
+ }
+
+ private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel4() {
+ return gridPanel4;
+ }
+
+ public void setGridPanel4(HtmlPanelGrid hpg) {
+ this.gridPanel4 = hpg;
+ }
+
+ private Table table1 = new Table();
+
+ public Table getTable1() {
+ return table1;
+ }
+
+ public void setTable1(Table t) {
+ this.table1 = t;
+ }
+
+ private TableRowGroup tableRowGroup1 = new TableRowGroup();
+
+ public TableRowGroup getTableRowGroup1() {
+ return tableRowGroup1;
+ }
+
+ public void setTableRowGroup1(TableRowGroup trg) {
+ this.tableRowGroup1 = trg;
+ }
+
+ private TableColumn tableColumn1 = new TableColumn();
+
+ public TableColumn getTableColumn1() {
+ return tableColumn1;
+ }
+
+ public void setTableColumn1(TableColumn tc) {
+ this.tableColumn1 = tc;
+ }
+
+ private TableColumn tableColumn2 = new TableColumn();
+
+ public TableColumn getTableColumn2() {
+ return tableColumn2;
+ }
+
+ public void setTableColumn2(TableColumn tc) {
+ this.tableColumn2 = tc;
+ }
+
+ private TableColumn tableColumn3 = new TableColumn();
+
+ public TableColumn getTableColumn3() {
+ return tableColumn3;
+ }
+
+ public void setTableColumn3(TableColumn tc) {
+ this.tableColumn3 = tc;
+ }
+
+ private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel5() {
+ return gridPanel5;
+ }
+
+ public void setGridPanel5(HtmlPanelGrid hpg) {
+ this.gridPanel5 = hpg;
+ }
+
+ private Table table2 = new Table();
+
+ public Table getTable2() {
+ return table2;
+ }
+
+ public void setTable2(Table t) {
+ this.table2 = t;
+ }
+
+ private TableRowGroup tableRowGroup2 = new TableRowGroup();
+
+ public TableRowGroup getTableRowGroup2() {
+ return tableRowGroup2;
+ }
+
+ public void setTableRowGroup2(TableRowGroup trg) {
+ this.tableRowGroup2 = trg;
+ }
+
+ private TableColumn tableColumn4 = new TableColumn();
+
+ public TableColumn getTableColumn4() {
+ return tableColumn4;
+ }
+
+ public void setTableColumn4(TableColumn tc) {
+ this.tableColumn4 = tc;
+ }
+
+ private TableColumn tableColumn5 = new TableColumn();
+
+ public TableColumn getTableColumn5() {
+ return tableColumn5;
+ }
+
+ public void setTableColumn5(TableColumn tc) {
+ this.tableColumn5 = tc;
+ }
+
+ private TableColumn tableColumn6 = new TableColumn();
+
+ public TableColumn getTableColumn6() {
+ return tableColumn6;
+ }
+
+ public void setTableColumn6(TableColumn tc) {
+ this.tableColumn6 = tc;
+ }
+
+ private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel6() {
+ return gridPanel6;
+ }
+
+ public void setGridPanel6(HtmlPanelGrid hpg) {
+ this.gridPanel6 = hpg;
+ }
+
+ private PanelGroup groupPanel1 = new PanelGroup();
+
+ public PanelGroup getGroupPanel1() {
+ return groupPanel1;
+ }
+
+ public void setGroupPanel1(PanelGroup pg) {
+ this.groupPanel1 = pg;
+ }
+
+ private StaticText staticText11 = new StaticText();
+
+ public StaticText getStaticText11() {
+ return staticText11;
+ }
+
+ public void setStaticText11(StaticText st) {
+ this.staticText11 = st;
+ }
+
+ private DropDown drpAno = new DropDown();
+
+ public DropDown getDrpAno() {
+ return drpAno;
+ }
+
+ public void setDrpAno(DropDown dd) {
+ this.drpAno = dd;
+ }
+
+ private PanelGroup groupPanel2 = new PanelGroup();
+
+ public PanelGroup getGroupPanel2() {
+ return groupPanel2;
+ }
+
+ public void setGroupPanel2(PanelGroup pg) {
+ this.groupPanel2 = pg;
+ }
+
+ private StaticText lblMes = new StaticText();
+
+ public StaticText getLblMes() {
+ return lblMes;
+ }
+
+ public void setLblMes(StaticText st) {
+ this.lblMes = st;
+ }
+
+ private DropDown drpMes = new DropDown();
+
+ public DropDown getDrpMes() {
+ return drpMes;
+ }
+
+ public void setDrpMes(DropDown dd) {
+ this.drpMes = dd;
+ }
+
+ private PanelGroup groupPanel3 = new PanelGroup();
+
+ public PanelGroup getGroupPanel3() {
+ return groupPanel3;
+ }
+
+ public void setGroupPanel3(PanelGroup pg) {
+ this.groupPanel3 = pg;
+ }
+
+ private StaticText lblDia = new StaticText();
+
+ public StaticText getLblDia() {
+ return lblDia;
+ }
+
+ public void setLblDia(StaticText st) {
+ this.lblDia = st;
+ }
+
+ private DropDown drpDia = new DropDown();
+
+ public DropDown getDrpDia() {
+ return drpDia;
+ }
+
+ public void setDrpDia(DropDown dd) {
+ this.drpDia = dd;
+ }
+
+ private PanelGroup groupPanel4 = new PanelGroup();
+
+ public PanelGroup getGroupPanel4() {
+ return groupPanel4;
+ }
+
+ public void setGroupPanel4(PanelGroup pg) {
+ this.groupPanel4 = pg;
+ }
+
+ private StaticText staticText14 = new StaticText();
+
+ public StaticText getStaticText14() {
+ return staticText14;
+ }
+
+ public void setStaticText14(StaticText st) {
+ this.staticText14 = st;
+ }
+
+ private TextField txtNome = new TextField();
+
+ public TextField getTxtNome() {
+ return txtNome;
+ }
+
+ public void setTxtNome(TextField tf) {
+ this.txtNome = tf;
+ }
+
+ private Button butPesquisar = new Button();
+
+ public Button getButPesquisar() {
+ return butPesquisar;
+ }
+
+ public void setButPesquisar(Button b) {
+ this.butPesquisar = b;
+ }
+
+ private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel7() {
+ return gridPanel7;
+ }
+
+ public void setGridPanel7(HtmlPanelGrid hpg) {
+ this.gridPanel7 = hpg;
+ }
+
+ private Table table3 = new Table();
+
+ public Table getTable3() {
+ return table3;
+ }
+
+ public void setTable3(Table t) {
+ this.table3 = t;
+ }
+
+ private TableRowGroup tableRowGroup3 = new TableRowGroup();
+
+ public TableRowGroup getTableRowGroup3() {
+ return tableRowGroup3;
+ }
+
+ public void setTableRowGroup3(TableRowGroup trg) {
+ this.tableRowGroup3 = trg;
+ }
+
+ private TableColumn tableColumn7 = new TableColumn();
+
+ public TableColumn getTableColumn7() {
+ return tableColumn7;
+ }
+
+ public void setTableColumn7(TableColumn tc) {
+ this.tableColumn7 = tc;
+ }
+
+ private TableColumn tableColumn8 = new TableColumn();
+
+ public TableColumn getTableColumn8() {
+ return tableColumn8;
+ }
+
+ public void setTableColumn8(TableColumn tc) {
+ this.tableColumn8 = tc;
+ }
+
+ private TableColumn tableColumn9 = new TableColumn();
+
+ public TableColumn getTableColumn9() {
+ return tableColumn9;
+ }
+
+ public void setTableColumn9(TableColumn tc) {
+ this.tableColumn9 = tc;
+ }
+
+ private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel8() {
+ return gridPanel8;
+ }
+
+ public void setGridPanel8(HtmlPanelGrid hpg) {
+ this.gridPanel8 = hpg;
+ }
+
+ private PanelGroup groupPanel5 = new PanelGroup();
+
+ public PanelGroup getGroupPanel5() {
+ return groupPanel5;
+ }
+
+ public void setGroupPanel5(PanelGroup pg) {
+ this.groupPanel5 = pg;
+ }
+
+ private ImageComponent image1 = new ImageComponent();
+
+ public ImageComponent getImage1() {
+ return image1;
+ }
+
+ public void setImage1(ImageComponent ic) {
+ this.image1 = ic;
+ }
+
+ private ImageComponent image2 = new ImageComponent();
+
+ public ImageComponent getImage2() {
+ return image2;
+ }
+
+ public void setImage2(ImageComponent ic) {
+ this.image2 = ic;
+ }
+
+ private Hyperlink lnkDataAcidente = new Hyperlink();
+
+ public Hyperlink getLnkDataAcidente() {
+ return lnkDataAcidente;
+ }
+
+ public void setLnkDataAcidente(Hyperlink h) {
+ this.lnkDataAcidente = h;
+ }
+
+ private Hyperlink lnkNr = new Hyperlink();
+
+ public Hyperlink getLnkNr() {
+ return lnkNr;
+ }
+
+ public void setLnkNr(Hyperlink h) {
+ this.lnkNr = h;
+ }
+
+ private Hyperlink lnkNomeAcidentado = new Hyperlink();
+
+ public Hyperlink getLnkNomeAcidentado() {
+ return lnkNomeAcidentado;
+ }
+
+ public void setLnkNomeAcidentado(Hyperlink h) {
+ this.lnkNomeAcidentado = h;
+ }
+
+ private Hyperlink lnkDataAcidenteSeg = new Hyperlink();
+
+ public Hyperlink getLnkDataAcidenteSeg() {
+ return lnkDataAcidenteSeg;
+ }
+
+ public void setLnkDataAcidenteSeg(Hyperlink h) {
+ this.lnkDataAcidenteSeg = h;
+ }
+
+ private Hyperlink lnkNrSeg = new Hyperlink();
+
+ public Hyperlink getLnkNrSeg() {
+ return lnkNrSeg;
+ }
+
+ public void setLnkNrSeg(Hyperlink h) {
+ this.lnkNrSeg = h;
+ }
+
+ private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink();
+
+ public Hyperlink getLnkNomeAcidentadoSeg() {
+ return lnkNomeAcidentadoSeg;
+ }
+
+ public void setLnkNomeAcidentadoSeg(Hyperlink h) {
+ this.lnkNomeAcidentadoSeg = h;
+ }
+
+ private Hyperlink lnkDataConcluida = new Hyperlink();
+
+ public Hyperlink getLnkDataConcluida() {
+ return lnkDataConcluida;
+ }
+
+ public void setLnkDataConcluida(Hyperlink h) {
+ this.lnkDataConcluida = h;
+ }
+
+ private Hyperlink lnkNrConcluida = new Hyperlink();
+
+ public Hyperlink getLnkNrConcluida() {
+ return lnkNrConcluida;
+ }
+
+ public void setLnkNrConcluida(Hyperlink h) {
+ this.lnkNrConcluida = h;
+ }
+
+ private Hyperlink lnkNomeConcluida = new Hyperlink();
+
+ public Hyperlink getLnkNomeConcluida() {
+ return lnkNomeConcluida;
+ }
+
+ public void setLnkNomeConcluida(Hyperlink h) {
+ this.lnkNomeConcluida = h;
+ }
+
+ private StaticText txtSearchMsg = new StaticText();
+
+ public StaticText getTxtSearchMsg() {
+ return txtSearchMsg;
+ }
+
+ public void setTxtSearchMsg(StaticText st) {
+ this.txtSearchMsg = st;
+ }
+
+ private TableColumn tableColumn10 = new TableColumn();
+
+ public TableColumn getTableColumn10() {
+ return tableColumn10;
+ }
+
+ public void setTableColumn10(TableColumn tc) {
+ this.tableColumn10 = tc;
+ }
+
+ private TableColumn tableColumn11 = new TableColumn();
+
+ public TableColumn getTableColumn11() {
+ return tableColumn11;
+ }
+
+ public void setTableColumn11(TableColumn tc) {
+ this.tableColumn11 = tc;
+ }
+
+ private Hyperlink lnkFase = new Hyperlink();
+
+ public Hyperlink getLnkFase() {
+ return lnkFase;
+ }
+
+ public void setLnkFase(Hyperlink h) {
+ this.lnkFase = h;
+ }
+
+ private Hyperlink lnkEstabelecimento = new Hyperlink();
+
+ public Hyperlink getLnkEstabelecimento() {
+ return lnkEstabelecimento;
+ }
+
+ public void setLnkEstabelecimento(Hyperlink h) {
+ this.lnkEstabelecimento = h;
+ }
+
+ private Hyperlink lnkFaseSeg = new Hyperlink();
+
+ public Hyperlink getLnkFaseSeg() {
+ return lnkFaseSeg;
+ }
+
+ public void setLnkFaseSeg(Hyperlink h) {
+ this.lnkFaseSeg = h;
+ }
+
+ private Hyperlink lnkEstabelecimentoSeg = new Hyperlink();
+
+ public Hyperlink getLnkEstabelecimentoSeg() {
+ return lnkEstabelecimentoSeg;
+ }
+
+ public void setLnkEstabelecimentoSeg(Hyperlink h) {
+ this.lnkEstabelecimentoSeg = h;
+ }
+
+ private TableColumn tableColumn12 = new TableColumn();
+
+ public TableColumn getTableColumn12() {
+ return tableColumn12;
+ }
+
+ public void setTableColumn12(TableColumn tc) {
+ this.tableColumn12 = tc;
+ }
+
+ private TableColumn tableColumn13 = new TableColumn();
+
+ public TableColumn getTableColumn13() {
+ return tableColumn13;
+ }
+
+ public void setTableColumn13(TableColumn tc) {
+ this.tableColumn13 = tc;
+ }
+
+ private TableColumn tableColumn14 = new TableColumn();
+
+ public TableColumn getTableColumn14() {
+ return tableColumn14;
+ }
+
+ public void setTableColumn14(TableColumn tc) {
+ this.tableColumn14 = tc;
+ }
+
+ private TableColumn tableColumn15 = new TableColumn();
+
+ public TableColumn getTableColumn15() {
+ return tableColumn15;
+ }
+
+ public void setTableColumn15(TableColumn tc) {
+ this.tableColumn15 = tc;
+ }
+
+ private Hyperlink lnkPor = new Hyperlink();
+
+ public Hyperlink getLnkPor() {
+ return lnkPor;
+ }
+
+ public void setLnkPor(Hyperlink h) {
+ this.lnkPor = h;
+ }
+
+ private Hyperlink lnkPorSeg = new Hyperlink();
+
+ public Hyperlink getLnkPorSeg() {
+ return lnkPorSeg;
+ }
+
+ public void setLnkPorSeg(Hyperlink h) {
+ this.lnkPorSeg = h;
+ }
+
+ private Hyperlink lnkPorConcluida = new Hyperlink();
+
+ public Hyperlink getLnkPorConcluida() {
+ return lnkPorConcluida;
+ }
+
+ public void setLnkPorConcluida(Hyperlink h) {
+ this.lnkPorConcluida = h;
+ }
+
+ private Hyperlink lnkEstabConcluida = new Hyperlink();
+
+ public Hyperlink getLnkEstabConcluida() {
+ return lnkEstabConcluida;
+ }
+
+ public void setLnkEstabConcluida(Hyperlink h) {
+ this.lnkEstabConcluida = h;
+ }
+
+ private PanelGroup groupPanel7 = new PanelGroup();
+
+ public PanelGroup getGroupPanel7() {
+ return groupPanel7;
+ }
+
+ public void setGroupPanel7(PanelGroup pg) {
+ this.groupPanel7 = pg;
+ }
+
+ private StaticText staticText5 = new StaticText();
+
+ public StaticText getStaticText5() {
+ return staticText5;
+ }
+
+ public void setStaticText5(StaticText st) {
+ this.staticText5 = st;
+ }
+
+ private TextField txtPor = new TextField();
+
+ public TextField getTxtPor() {
+ return txtPor;
+ }
+
+ public void setTxtPor(TextField tf) {
+ this.txtPor = tf;
+ }
+
+ private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel9() {
+ return gridPanel9;
+ }
+
+ public void setGridPanel9(HtmlPanelGrid hpg) {
+ this.gridPanel9 = hpg;
+ }
+
+ private PanelGroup groupPanel8 = new PanelGroup();
+
+ public PanelGroup getGroupPanel8() {
+ return groupPanel8;
+ }
+
+ public void setGroupPanel8(PanelGroup pg) {
+ this.groupPanel8 = pg;
+ }
+
+ private StaticText staticText6 = new StaticText();
+
+ public StaticText getStaticText6() {
+ return staticText6;
+ }
+
+ public void setStaticText6(StaticText st) {
+ this.staticText6 = st;
+ }
+
+ private ImageComponent image3 = new ImageComponent();
+
+ public ImageComponent getImage3() {
+ return image3;
+ }
+
+ public void setImage3(ImageComponent ic) {
+ this.image3 = ic;
+ }
+
+ private StaticText staticText7 = new StaticText();
+
+ public StaticText getStaticText7() {
+ return staticText7;
+ }
+
+ public void setStaticText7(StaticText st) {
+ this.staticText7 = st;
+ }
+
+ private StaticText staticText8 = new StaticText();
+
+ public StaticText getStaticText8() {
+ return staticText8;
+ }
+
+ public void setStaticText8(StaticText st) {
+ this.staticText8 = st;
+ }
+
+ private HtmlPanelGrid gridPanel10 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel10() {
+ return gridPanel10;
+ }
+
+ public void setGridPanel10(HtmlPanelGrid hpg) {
+ this.gridPanel10 = hpg;
+ }
+
+ private StaticText txtMsg = new StaticText();
+
+ public StaticText getTxtMsg() {
+ return txtMsg;
+ }
+
+ public void setTxtMsg(StaticText st) {
+ this.txtMsg = st;
+ }
+
+ private TableColumn tableColumn16 = new TableColumn();
+
+ public TableColumn getTableColumn16() {
+ return tableColumn16;
+ }
+
+ public void setTableColumn16(TableColumn tc) {
+ this.tableColumn16 = tc;
+ }
+
+ private Hyperlink lnkDataAbertura = new Hyperlink();
+
+ public Hyperlink getLnkDataAbertura() {
+ return lnkDataAbertura;
+ }
+
+ public void setLnkDataAbertura(Hyperlink h) {
+ this.lnkDataAbertura = h;
+ }
+
+ private TableColumn tableColumn17 = new TableColumn();
+
+ public TableColumn getTableColumn17() {
+ return tableColumn17;
+ }
+
+ public void setTableColumn17(TableColumn tc) {
+ this.tableColumn17 = tc;
+ }
+
+ private Hyperlink lnkDataAberturaSeg = new Hyperlink();
+
+ public Hyperlink getLnkDataAberturaSeg() {
+ return lnkDataAberturaSeg;
+ }
+
+ public void setLnkDataAberturaSeg(Hyperlink h) {
+ this.lnkDataAberturaSeg = h;
+ }
+
+ private TableColumn tableColumn18 = new TableColumn();
+
+ public TableColumn getTableColumn18() {
+ return tableColumn18;
+ }
+
+ public void setTableColumn18(TableColumn tc) {
+ this.tableColumn18 = tc;
+ }
+
+
+ private TableColumn tableColumn19 = new TableColumn();
+
+ public TableColumn getTableColumn19() {
+ return tableColumn19;
+ }
+
+ public void setTableColumn19(TableColumn tc) {
+ this.tableColumn19 = tc;
+ }
+
+ private TableColumn tableColumn20 = new TableColumn();
+
+ public TableColumn getTableColumn20() {
+ return tableColumn20;
+ }
+
+ public void setTableColumn20(TableColumn tc) {
+ this.tableColumn20 = tc;
+ }
+
+ private Hyperlink lnkDataAberturaConcluida = new Hyperlink();
+
+ public Hyperlink getLnkDataAberturaConcluida() {
+ return lnkDataAberturaConcluida;
+ }
+
+ public void setLnkDataAberturaConcluida(Hyperlink h) {
+ this.lnkDataAberturaConcluida = h;
+ }
+ private StaticText lblUser = new StaticText();
+
+ public StaticText getLblUser() {
+ return lblUser;
+ }
+
+ public void setLblUser(StaticText st) {
+ this.lblUser = st;
+ }
+ private Hyperlink lnkPlanosActuacao = new Hyperlink();
+
+ public Hyperlink getLnkPlanosActuacao() {
+ return lnkPlanosActuacao;
+ }
+
+ public void setLnkPlanosActuacao(Hyperlink h) {
+ this.lnkPlanosActuacao = h;
+ }
+
+
+ private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid();
+ public HtmlPanelGrid getGridPanelFilterSeg()
+ {
+ return this.gridPanelFilterSeg;
+ }
+ public void setGridPanelFilterSeg( HtmlPanelGrid pg )
+ {
+ this.gridPanelFilterSeg = pg;
+ }
+
+ private PanelGroup groupPanelFilterSeg = new PanelGroup();
+ public PanelGroup getGroupPanelFilterSeg()
+ {
+ return this.groupPanelFilterSeg;
+ }
+ public void setGroupPanelFilterSeg( PanelGroup pg )
+ {
+ this.groupPanelFilterSeg = pg;
+ }
+
+ private StaticText labelFilterNameSeg = new StaticText();
+ public StaticText getLabelFilterNameSeg()
+ {
+ return this.labelFilterNameSeg;
+ }
+ public void setLabelFilterNameSeg( StaticText st )
+ {
+ this.labelFilterNameSeg = st;
+ }
+
+ private TextField textFilterNameSeg = new TextField();
+ public TextField getTextFilterNameSeg()
+ {
+ return this.textFilterNameSeg;
+ }
+ public void setTextFilterNameSeg( TextField tf )
+ {
+ this.textFilterNameSeg = tf;
+ }
+
+ private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar();
+ public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg()
+ {
+ return this.calFilterDateSeg;
+ }
+ public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c )
+ {
+ this.calFilterDateSeg = c;
+ }
+
+ private TextField textFilterPORSeg = new TextField();
+
+ public TextField getTextFilterPORSeg() {
+ return textFilterPORSeg;
+ }
+
+ public void setTextFilterPORSeg(TextField textFilterPORSeg) {
+ this.textFilterPORSeg = textFilterPORSeg;
+ }
+
+
+ private Button buttonFilterSeg = new Button();
+ public Button getButtonFilterSeg()
+ {
+ return this.buttonFilterSeg;
+ }
+ public void setButtonFilterSeg( Button b )
+ {
+ this.buttonFilterSeg = b;
+ }
+
+
+ private HtmlPanelGrid gridPanelFilterActual = new HtmlPanelGrid();
+ public HtmlPanelGrid getGridPanelFilterActual()
+ {
+ return this.gridPanelFilterActual;
+ }
+ public void setGridPanelFilterActual( HtmlPanelGrid pg )
+ {
+ this.gridPanelFilterActual = pg;
+ }
+
+ private PanelGroup groupPanelFilterActual = new PanelGroup();
+ public PanelGroup getGroupPanelFilterActual()
+ {
+ return this.groupPanelFilterActual;
+ }
+ public void setGroupPanelFilterActual( PanelGroup pg )
+ {
+ this.groupPanelFilterActual = pg;
+ }
+
+ private StaticText labelFilterNameActual = new StaticText();
+ public StaticText getLabelFilterNameActual()
+ {
+ return this.labelFilterNameActual;
+ }
+ public void setLabelFilterNameActual( StaticText st )
+ {
+ this.labelFilterNameActual = st;
+ }
+
+ private TextField textFilterNameActual = new TextField();
+ public TextField getTextFilterNameActual()
+ {
+ return this.textFilterNameActual;
+ }
+ public void setTextFilterNameActual( TextField tf )
+ {
+ this.textFilterNameActual = tf;
+ }
+
+ private com.sun.rave.web.ui.component.Calendar calFilterDateActual = new com.sun.rave.web.ui.component.Calendar();
+ public com.sun.rave.web.ui.component.Calendar getCalFilterDateActual()
+ {
+ return this.calFilterDateActual;
+ }
+ public void setCalFilterDateActual( com.sun.rave.web.ui.component.Calendar c )
+ {
+ this.calFilterDateActual = c;
+ }
+
+ private TextField textFilterPORActual = new TextField();
+
+ public TextField getTextFilterPORActual() {
+ return textFilterPORActual;
+ }
+
+ public void setTextFilterPORActual(TextField textFilterPORActual) {
+ this.textFilterPORActual = textFilterPORActual;
+ }
+
+
+ private Button buttonFilterActual = new Button();
+ public Button getButtonFilterActual()
+ {
+ return this.buttonFilterActual;
+ }
+ public void setButtonFilterActual( Button b )
+ {
+ this.buttonFilterActual = b;
+ }
+
+ private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" );
+ //
+
+ /**
+ * Construct a new Page bean instance.
+ */
+ public FormSeguranca() {
+ }
+
+ /**
+ * Callback method that is called whenever a page is navigated to,
+ * either directly via a URL, or indirectly via page navigation.
+ * Customize this method to acquire resources that will be needed
+ * for event handlers and lifecycle methods, whether or not this
+ * page is performing post back processing.
+ *
+ * Note that, if the current request is a postback, the property
+ * values of the components do not represent any
+ * values submitted with this request. Instead, they represent the
+ * property values that were saved for this view when it was rendered.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("FormSeguranca Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+
+ if (!getSessionBean1().isLoggedIn()) {
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {
+ // . . . handle exception . . .
+ }
+ }
+ }
+
+ /**
+ * Callback method that is called after the component tree has been
+ * restored, but before any event processing takes place. This method
+ * will only be called on a postback request that
+ * is processing a form submit. Customize this method to allocate
+ * resources that will be required in your event handlers.
+ */
+ public void preprocess() {
+
+ }
+
+ /**
+ * Callback method that is called just before rendering takes place.
+ * This method will only be called for the page that
+ * will actually be rendered (and not, for example, on a page that
+ * handled a postback and then navigated to a different page). Customize
+ * this method to allocate resources that will be required for rendering
+ * this page.
+ */
+ public void prerender() {
+ System.out.println("=== FORM_SEGURANCA ===");
+ lblUser.setText( getSessionBean1().getCurrentUser().getLogin());
+ String responsavel_loja = getSessionBean1().getCurrentUser().getResponsavel_loja();
+ if(responsavel_loja.matches("n"))
+ {
+ lnkPlanosActuacao.setDisabled(true);
+ }
+
+
+ HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest();
+ String referer = request.getRequestURI();
+ String pageFrom = Utils.getPageFrom(referer);
+ if( ! pageFrom.matches( "FormSeguranca.jsp" ) )
+ {
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ //lblActivos.setRendered(true);
+ table1.setRendered(true);
+
+ //ArrayList actuaisList = adp.getAnalisesActuaisList(getSessionBean1().getCurrentUser().getEstabelecimento_id(), new Integer(1));
+ ArrayList actuaisList = adp.getAnalisesActuaisSegList( getSessionBean1().getCurrentUser().getEstabelecimento_id(), responsavel_loja );
+ getSessionBean1().getAnalisesActualDataProvider().setList(actuaisList);
+ }
+ catch(Exception ex)
+ {
+ //lblActivos.setRendered(false);
+ table1.setRendered(false);
+ //ex.printStackTrace();
+ }
+
+ try
+ {
+ //lblActivos.setRendered(true);
+ table2.setRendered( true );
+
+ ArrayList seguimentoList = adp.getAnalisesSeguimentoSegList(
+ getSessionBean1().getCurrentUser().getEstabelecimento_id(), responsavel_loja );
+ getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList );
+ }
+ catch(Exception ex)
+ {
+ //lblActivos.setRendered(false);
+ table2.setRendered(false);
+ //ex.printStackTrace();
+ }
+
+ try
+ {
+ //lblActivos.setRendered(true);
+ table3.setRendered(true);
+
+ ArrayList concluidasList = adp.getAnalisesConcluidasList(getSessionBean1().getCurrentUser().getEstabelecimento_id());
+ getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList);
+ }
+ catch(Exception ex)
+ {
+ //lblActivos.setRendered(false);
+ table3.setRendered(false);
+ //ex.printStackTrace();
+ }
+ fillAnoDropDown();
+ }
+ txtMsg.setText(getSessionBean1().getMsg());
+ getSessionBean1().setMsg("");
+ }
+
+ /**
+ * Callback method that is called after rendering is completed for
+ * this request, if init() was called (regardless of whether
+ * or not this was the page that was actually rendered). Customize this
+ * method to release resources acquired in the init(),
+ * preprocess(), or prerender() methods (or
+ * acquired during execution of an event handler).
+ */
+ public void destroy() {
+ }
+
+
+// private void fillDateDropDowns()
+// {
+// fillAnoDropDown();
+// //fillMesDropDown();
+// //fillDiaDropDown();
+// }
+
+ private void fillAnoDropDown()
+ {
+// ArrayList anosList = new ArrayList();
+// for(int ano=2007; ano<2051; ano++)
+// {
+// anosList.add(new Integer(ano));
+// }
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ ArrayList anosList = adp.getAnosListFromAnalises();
+ com.sun.rave.web.ui.model.Option[] anoOptions = new com.sun.rave.web.ui.model.Option[anosList.size()+1];
+ anoOptions[0] = new Option("", "");
+ ListIterator iter = anosList.listIterator();
+ int i = 1;
+ while(iter.hasNext())
+ {
+ Integer ano = (Integer) iter.next();
+
+ anoOptions[i] = new Option(ano, ano.toString());
+ i++;
+ }
+ getSessionBean1().setAnoOptions(anoOptions);
+ Calendar cal = new GregorianCalendar();
+ int year = cal.get(Calendar.YEAR);
+ //drpAno.setSelected( new Integer(year) );
+
+ }
+ catch(Exception ex)
+ {
+ //ex.printStackTrace();
+ }
+
+ }
+
+ private void fillMesDropDown()
+ {
+ com.sun.rave.web.ui.model.Option[] mesOptions = new com.sun.rave.web.ui.model.Option[13];
+ mesOptions[0] = new Option("", "");
+ mesOptions[1] = new Option(new Integer(1), "Janeiro");
+ mesOptions[2] = new Option(new Integer(2), "Fevereiro");
+ mesOptions[3] = new Option(new Integer(3), "Março");
+ mesOptions[4] = new Option(new Integer(4), "Abril");
+ mesOptions[5] = new Option(new Integer(5), "Maio");
+ mesOptions[6] = new Option(new Integer(6), "Junho");
+ mesOptions[7] = new Option(new Integer(7), "Julho");
+ mesOptions[8] = new Option(new Integer(8), "Agosto");
+ mesOptions[9] = new Option(new Integer(9), "Setembro");
+ mesOptions[10] = new Option(new Integer(10), "Outubro");
+ mesOptions[11] = new Option(new Integer(11), "Novembro");
+ mesOptions[12] = new Option(new Integer(12), "Dezembro");
+ getSessionBean1().setMesOptions(mesOptions);
+ Calendar cal = new GregorianCalendar();
+ int month = cal.get(Calendar.MONTH); // 0=Jan, 1=Feb, ...
+ //drpMes.setSelected( new Integer(month+1) );
+ }
+
+ private void fillDiaDropDown()
+ {
+ int ano = ( (Integer)drpAno.getSelected() ).intValue();
+ int mes = ( (Integer)drpMes.getSelected() ).intValue();
+ int dias = 0;
+ switch (mes) {
+ case 1: dias=31; break;
+ case 2:
+ GregorianCalendar cal = new GregorianCalendar();
+ if(cal.isLeapYear(ano))
+ {
+ dias = 29;
+ }
+ else
+ {
+ dias = 28;
+ }
+ break;
+ case 3: dias=31; break;
+ case 4: dias=30; break;
+ case 5: dias=31; break;
+ case 6: dias=30; break;
+ case 7: dias=31; break;
+ case 8: dias=31; break;
+ case 9: dias=30; break;
+ case 10: dias=31; break;
+ case 11: dias=30; break;
+ case 12: dias=31; break;
+ default: System.out.println("Invalid month.");break;
+ }
+
+ ArrayList diasList = new ArrayList();
+ for(int dia=1; diaReturn a reference to the scoped data bean.
+ */
+ protected RequestBean1 getRequestBean1() {
+ return (RequestBean1)getBean("RequestBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected SessionBean1 getSessionBean1() {
+ return (SessionBean1)getBean("SessionBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+
+ public String lnkLogout_action() {
+ // TODO: Replace with your code
+ // Invalidate the current session
+ try
+ {
+ javax.servlet.http.HttpSession session =
+ (javax.servlet.http.HttpSession) getExternalContext().getSession(true);
+ session.invalidate();
+ }
+ catch(Exception ex){}
+
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {}
+ //return "login";
+ return null;
+ }
+
+ public void drpAno_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+ Object ano = event.getNewValue();
+ if(ano == null)
+ {
+ lblMes.setVisible(false);
+ drpMes.setVisible(false);
+ lblDia.setVisible(false);
+ drpDia.setVisible(false);
+ }
+ else
+ {
+ lblMes.setVisible(true);
+ drpMes.setVisible(true);
+ fillMesDropDown();
+ }
+ }
+
+ public void drpMes_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+ Object mes = event.getNewValue();
+ if(mes == null)
+ {
+ lblDia.setVisible(false);
+ drpDia.setVisible(false);
+ }
+ else
+ {
+ lblDia.setVisible(true);
+ drpDia.setVisible(true);
+ fillDiaDropDown();
+ }
+ }
+
+ public String buttonFilterActual_action()
+ {
+ Date visitaDate = ( Date ) calFilterDateActual.getValue();
+ String visitaDateStr = null;
+ if ( visitaDate != null )
+ {
+ visitaDateStr = D_F.format( visitaDate );
+ }
+
+ String POR = null;
+ if ( textFilterPORActual.getText() != null )
+ {
+ POR = ( ( String ) textFilterPORActual.getText() ).trim();
+ if ( POR.length() == 0 )
+ {
+ POR = null;
+ }
+ }
+
+ String nome = null;
+ if ( textFilterNameActual.getText() != null )
+ {
+ nome = (( String ) textFilterNameActual.getText()).trim();
+ if( nome.length() == 0 )
+ {
+ nome = null;
+ }
+ }
+
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ ArrayList actualList = adp.searchAnalisesActualSeg(
+ getSessionBean1().getCurrentUser().getEstabelecimento_id(),
+ nome, visitaDateStr, POR,
+ getSessionBean1().getCurrentUser().getResponsavel_loja() );
+
+ table1.setRendered( true );
+ txtSearchMsg.setRendered( false );
+ getSessionBean1().getAnalisesActualDataProvider().setList( actualList );
+ }
+ catch( Exception e )
+ {
+ table1.setRendered( false );
+ txtSearchMsg.setRendered( true );
+ txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" );
+ }
+
+ return null;
+ }
+
+ public String buttonFilterSeg_action()
+ {
+ Date visitaDate = ( Date ) calFilterDateSeg.getValue();
+ String visitaDateStr = null;
+ if ( visitaDate != null )
+ {
+ visitaDateStr = D_F.format( visitaDate );
+ }
+
+ String POR = null;
+ if ( textFilterPORSeg.getText() != null )
+ {
+ POR = ( ( String ) textFilterPORSeg.getText() ).trim();
+ if ( POR.length() == 0 )
+ {
+ POR = null;
+ }
+ }
+
+ String nome = null;
+ if ( textFilterNameSeg.getText() != null )
+ {
+ nome = (( String ) textFilterNameSeg.getText()).trim();
+ if( nome.length() == 0 )
+ {
+ nome = null;
+ }
+ }
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ ArrayList seguimentoList = adp.searchAnalisesSeguimentoSeg(
+ getSessionBean1().getCurrentUser().getEstabelecimento_id(),
+ nome, visitaDateStr, POR,
+ getSessionBean1().getCurrentUser().getResponsavel_loja() );
+
+ table2.setRendered( true );
+ txtSearchMsg.setRendered( false );
+ getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList );
+ }
+ catch( Exception e )
+ {
+ table2.setRendered( false );
+ txtSearchMsg.setRendered( true );
+ txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" );
+ }
+
+ return null;
+ }
+
+ public String butPesquisar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+ Object obAno = null;
+ Object obMes = null;
+ Object obDia = null;
+ try
+ {
+ obAno = drpAno.getSelected();
+ obMes = drpMes.getSelected();
+ obDia = drpDia.getSelected();
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ Integer ano = null;
+ Integer mes = null;
+ Integer dia = null;
+
+ if(obAno != null)
+ {
+ ano = (Integer) obAno;
+ }
+
+ if(obMes != null)
+ {
+ mes = (Integer) obMes;
+ }
+
+ if(obDia != null)
+ {
+ dia = (Integer) obDia;
+ }
+
+ String por = null;
+ if(txtPor.getText() != null)
+ {
+ por = (String) txtPor.getText();
+ if(por.trim().length() == 0)
+ {
+ por = null;
+ }
+ }
+
+
+ String nome = null;
+ if(txtNome.getText() != null)
+ {
+ nome = (String) txtNome.getText();
+ if(nome.trim().length() == 0)
+ {
+ nome = null;
+ }
+ }
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+
+ //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList());
+ ArrayList concluidasList = adp.searchAanalisesConcluidasList(
+ getSessionBean1().getCurrentUser().getEstabelecimento_id(),
+ ano, mes, dia, por, nome, null );
+
+ table3.setRendered(true);
+ txtSearchMsg.setRendered(false);
+ getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList);
+
+
+ }
+ catch(Exception ex)
+ {
+ table3.setRendered(false);
+ txtSearchMsg.setRendered(true);
+ txtSearchMsg.setText("Não foram encontrados registos para a sua pesquisa !");
+ //ex.printStackTrace();
+ }
+
+ return null;
+ }
+
+ public void drpDia_processValueChange(ValueChangeEvent vce) {
+ // TODO: Replace with your code
+
+ }
+
+// private String getPageFrom(String referer)
+// {
+// String pageFrom = referer.substring(referer.lastIndexOf("/")+1);
+// return pageFrom;
+// }
+
+ public String butNovaAnalise_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ getSessionBean1().setNavFrom("FormSeguranca");
+ getSessionBean1().setCurrentAnalise(null);
+ return "analise_acidente";
+ }
+
+ public String lnkDataAcidente_action() {
+ // TODO: Replace with your code
+ AnaliseAcidente a = getTableActivosRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormSeguranca");
+ return "analise_acidente";
+ }
+
+ public String lnkDataAbertura_action() {
+ // TODO: Replace with your code
+ AnaliseAcidente a = getTableActivosRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormSeguranca");
+ return "analise_acidente";
+ }
+
+ public String lnkNr_action() {
+ // TODO: Replace with your code
+ AnaliseAcidente a = getTableActivosRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormSeguranca");
+ return "analise_acidente";
+ }
+
+ public String lnkNomeAcidentado_action() {
+ // TODO: Replace with your code
+ AnaliseAcidente a = getTableActivosRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormSeguranca");
+ return "analise_acidente";
+ }
+
+ private AnaliseAcidente getTableActivosRowData()
+ {
+ RowKey rk = tableRowGroup1.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ AnalisesActualDataProvider provider = (AnalisesActualDataProvider) tableRowGroup1.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ AnaliseAcidente a = (AnaliseAcidente)list.get(k);
+ return a;
+ }
+
+ public String lnkDataAcidenteSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormSeguranca");
+ return "view_analise";
+
+ }
+
+ public String lnkDataAberturaSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormSeguranca");
+ return "view_analise";
+ }
+
+ public String lnkNrSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormSeguranca");
+ return "view_analise";
+ }
+
+ public String lnkNomeAcidentadoSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormSeguranca");
+ return "view_analise";
+ }
+
+ private AnaliseAcidente getTableSeguimentoRowData()
+ {
+ RowKey rk = tableRowGroup2.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ AnalisesSeguimentoDataProvider provider = (AnalisesSeguimentoDataProvider) tableRowGroup2.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ AnaliseAcidente a = (AnaliseAcidente)list.get(k);
+ return a;
+ }
+
+ private AnaliseAcidente getTableConcluidasRowData()
+ {
+ RowKey rk = tableRowGroup3.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ AnalisesConcluidasDataProvider provider = (AnalisesConcluidasDataProvider) tableRowGroup3.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ AnaliseAcidente a = (AnaliseAcidente)list.get(k);
+ return a;
+ }
+
+ public String lnkEditUser_action() {
+ System.out.println("EDIT USER");
+ // TODO: Replace with your code
+ getSessionBean1().setNavFrom("FormSeguranca");
+ getSessionBean1().setModoEdicaoUtilizador("edit");
+ return "user";
+ }
+
+ public String lnkDataConcluida_action() {
+ // TODO: Replace with your code
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormSeguranca");
+ return "view_analise";
+ }
+
+ public String lnkDataAberturaConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormSeguranca");
+ return "view_analise";
+ }
+
+ public String lnkNrConcluida_action() {
+ // TODO: Replace with your code
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormSeguranca");
+ return "view_analise";
+ }
+
+ public String lnkNomeConcluida_action() {
+ // TODO: Replace with your code
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormSeguranca");
+ return "view_analise";
+ }
+
+ public String lnkFase_action() {
+ // TODO: Replace with your code
+ AnaliseAcidente a = getTableActivosRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormSeguranca");
+ return "analise_acidente";
+ }
+
+ public String lnkEstabelecimento_action() {
+ // TODO: Replace with your code
+ AnaliseAcidente a = getTableActivosRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormSeguranca");
+ return "analise_acidente";
+ }
+
+ public String lnkFaseSeg_action() {
+ // TODO: Replace with your code
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormSeguranca");
+ return "view_analise";
+ }
+
+ public String lnkEstabelecimentoSeg_action() {
+ // TODO: Replace with your code
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormSeguranca");
+ return "view_analise";
+ }
+
+ public String lnkPor_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableActivosRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormSeguranca");
+ return "analise_acidente"; }
+
+ public String lnkPorSeg_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableSeguimentoRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormSeguranca");
+ return "view_analise";
+ }
+
+ public String lnkPorConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormSeguranca");
+ return "view_analise";
+ }
+
+ public String lnkEstabConcluida_action() {
+ // TODO: Replace with your code
+
+ AnaliseAcidente a = getTableConcluidasRowData();
+ getSessionBean1().setCurrentAnalise(a);
+ getSessionBean1().setNavFrom("FormSeguranca");
+ return "view_analise";
+ }
+
+ public String lnkNewUser_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkAjuda_action() {
+ System.out.println("AJUDA");
+// // TODO: Replace with your code
+// ServletContext theApplicationsServletContext =
+// (ServletContext) this.getExternalContext().getContext();
+// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL);
+// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf";
+//
+// Global global = new Global();
+// try
+// {
+// global.showPdf(pdfFilePath);
+// }
+// catch(Exception ex)
+// {
+// ex.printStackTrace();
+// return null;
+// }
+ return null;
+ }
+
+ private void showPdf(String pdfFilePath) throws Exception
+ {
+
+ File pdfFile = new File(pdfFilePath);
+ FileInputStream fis = new FileInputStream(pdfFile);
+ byte[] buf = new byte[(int)pdfFile.length()];
+ while ((fis.read(buf)) > 0)
+ {
+ //fos.write(buf, 0, buf.length);
+ }
+ fis.close();
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ if (!ctx.getResponseComplete())
+ {
+ HttpServletResponse response = (HttpServletResponse)ctx.getExternalContext().getResponse();
+ String contentType = "application/pdf";
+ response.setContentType(contentType);
+ response.setHeader("Content-Disposition","attachment;filename=\"" + "Ajuda.pdf" + "\"");
+
+ ServletOutputStream out = response.getOutputStream();
+
+ //out.write(model.getInfo().getBytes());
+ out.write(buf, 0, buf.length);
+ out.flush();
+ out.close();
+ ctx.responseComplete();
+ ctx.release();
+ }
+ }
+
+ public String lnkPlanosActuacao_action() {
+ // TODO: Replace with your code
+ Utilizador u = getSessionBean1().getCurrentUser();
+// String curUser = "?user=" + u.getId().toString();
+ FacesContext fc = getFacesContext().getCurrentInstance();
+ Global.redirectToPlanos(fc, u);
+// Utilizador u = getSessionBean1().getCurrentUser();
+// String curUser = "?user=" + u.getId().toString();
+// FacesContext fc = getFacesContext().getCurrentInstance();
+// try
+// {
+// JSFUtils.redirect(fc, Global.PLANOS_ACTUACAO_URL + curUser);
+// }
+// catch(Exception ex)
+// {
+//
+// }
+ return null;
+ }
+
+ public String lnkAnalisesAcidente_action() {
+ return null;
+ }
+
+}
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/GestaoUtilizadores.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/GestaoUtilizadores.java
new file mode 100644
index 00000000..9e4027f0
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/GestaoUtilizadores.java
@@ -0,0 +1,1212 @@
+/*
+ * GestaoUtilizadores.java
+ *
+ * Created on November 30, 2007, 1:34 PM
+ * Copyright lluis
+ */
+package analiseacidentestrabalho;
+
+import com.sun.data.provider.RowKey;
+import com.sun.rave.web.ui.appbase.AbstractPageBean;
+import com.sun.rave.web.ui.component.Body;
+import com.sun.rave.web.ui.component.Button;
+import com.sun.rave.web.ui.component.DropDown;
+import com.sun.rave.web.ui.component.Form;
+import com.sun.rave.web.ui.component.Head;
+import com.sun.rave.web.ui.component.Html;
+import com.sun.rave.web.ui.component.Hyperlink;
+import com.sun.rave.web.ui.component.ImageComponent;
+import com.sun.rave.web.ui.component.Link;
+import com.sun.rave.web.ui.component.Page;
+import com.sun.rave.web.ui.component.PanelGroup;
+import com.sun.rave.web.ui.component.StaticText;
+import com.sun.rave.web.ui.component.Table;
+import com.sun.rave.web.ui.component.TableColumn;
+import com.sun.rave.web.ui.component.TableRowGroup;
+import com.sun.rave.web.ui.component.TextField;
+import com.sun.rave.web.ui.model.SingleSelectOptionsList;
+import db.AnalisesDataProvider;
+import db.UtilizadoresActivosListDataProvider;
+import db.UtilizadoresDataProvider;
+import db.UtilizadoresInactivosListDataProvider;
+import global.Global;
+import java.util.ArrayList;
+import java.util.Map;
+import javax.faces.FacesException;
+import javax.faces.component.html.HtmlPanelGrid;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ValueChangeEvent;
+import javax.servlet.http.HttpServletRequest;
+import utils.JSFUtils;
+import utils.Utils;
+
+/**
+ * Page bean that corresponds to a similarly named JSP page. This
+ * class contains component definitions (and initialization code) for
+ * all components that you have defined on this page, as well as
+ * lifecycle methods and event handlers where you may add behavior
+ * to respond to incoming events.
+ */
+public class GestaoUtilizadores extends AbstractPageBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+
+ private Page page1 = new Page();
+
+ public Page getPage1() {
+ return page1;
+ }
+
+ public void setPage1(Page p) {
+ this.page1 = p;
+ }
+
+ private Html html1 = new Html();
+
+ public Html getHtml1() {
+ return html1;
+ }
+
+ public void setHtml1(Html h) {
+ this.html1 = h;
+ }
+
+ private Head head1 = new Head();
+
+ public Head getHead1() {
+ return head1;
+ }
+
+ public void setHead1(Head h) {
+ this.head1 = h;
+ }
+
+ private Link link1 = new Link();
+
+ public Link getLink1() {
+ return link1;
+ }
+
+ public void setLink1(Link l) {
+ this.link1 = l;
+ }
+
+ private Body body1 = new Body();
+
+ public Body getBody1() {
+ return body1;
+ }
+
+ public void setBody1(Body b) {
+ this.body1 = b;
+ }
+
+ private Form form1 = new Form();
+
+ public Form getForm1() {
+ return form1;
+ }
+
+ public void setForm1(Form f) {
+ this.form1 = f;
+ }
+
+ private HtmlPanelGrid gridBase1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridBase1() {
+ return gridBase1;
+ }
+
+ public void setGridBase1(HtmlPanelGrid hpg) {
+ this.gridBase1 = hpg;
+ }
+
+ private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLayout1() {
+ return gridLayout1;
+ }
+
+ public void setGridLayout1(HtmlPanelGrid hpg) {
+ this.gridLayout1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel1() {
+ return gridPanel1;
+ }
+
+ public void setGridPanel1(HtmlPanelGrid hpg) {
+ this.gridPanel1 = hpg;
+ }
+
+ private PanelGroup groupPanel1 = new PanelGroup();
+
+ public PanelGroup getGroupPanel1() {
+ return groupPanel1;
+ }
+
+ public void setGroupPanel1(PanelGroup pg) {
+ this.groupPanel1 = pg;
+ }
+
+ private ImageComponent image1 = new ImageComponent();
+
+ public ImageComponent getImage1() {
+ return image1;
+ }
+
+ public void setImage1(ImageComponent ic) {
+ this.image1 = ic;
+ }
+
+ private ImageComponent image2 = new ImageComponent();
+
+ public ImageComponent getImage2() {
+ return image2;
+ }
+
+ public void setImage2(ImageComponent ic) {
+ this.image2 = ic;
+ }
+
+ private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridConcluidos1() {
+ return gridConcluidos1;
+ }
+
+ public void setGridConcluidos1(HtmlPanelGrid hpg) {
+ this.gridConcluidos1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel6() {
+ return gridPanel6;
+ }
+
+ public void setGridPanel6(HtmlPanelGrid hpg) {
+ this.gridPanel6 = hpg;
+ }
+
+ private StaticText staticText5 = new StaticText();
+
+ public StaticText getStaticText5() {
+ return staticText5;
+ }
+
+ public void setStaticText5(StaticText st) {
+ this.staticText5 = st;
+ }
+
+ private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel7() {
+ return gridPanel7;
+ }
+
+ public void setGridPanel7(HtmlPanelGrid hpg) {
+ this.gridPanel7 = hpg;
+ }
+
+ private PanelGroup groupPanel6 = new PanelGroup();
+
+ public PanelGroup getGroupPanel6() {
+ return groupPanel6;
+ }
+
+ public void setGroupPanel6(PanelGroup pg) {
+ this.groupPanel6 = pg;
+ }
+
+ private StaticText staticText7 = new StaticText();
+
+ public StaticText getStaticText7() {
+ return staticText7;
+ }
+
+ public void setStaticText7(StaticText st) {
+ this.staticText7 = st;
+ }
+
+ private TextField txtPor = new TextField();
+
+ public TextField getTxtPor() {
+ return txtPor;
+ }
+
+ public void setTxtPor(TextField tf) {
+ this.txtPor = tf;
+ }
+
+ private PanelGroup groupPanel7 = new PanelGroup();
+
+ public PanelGroup getGroupPanel7() {
+ return groupPanel7;
+ }
+
+ public void setGroupPanel7(PanelGroup pg) {
+ this.groupPanel7 = pg;
+ }
+
+ private StaticText staticText8 = new StaticText();
+
+ public StaticText getStaticText8() {
+ return staticText8;
+ }
+
+ public void setStaticText8(StaticText st) {
+ this.staticText8 = st;
+ }
+
+ private TextField txtNome = new TextField();
+
+ public TextField getTxtNome() {
+ return txtNome;
+ }
+
+ public void setTxtNome(TextField tf) {
+ this.txtNome = tf;
+ }
+
+ private Button butPesquisar = new Button();
+
+ public Button getButPesquisar() {
+ return butPesquisar;
+ }
+
+ public void setButPesquisar(Button b) {
+ this.butPesquisar = b;
+ }
+
+ private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel8() {
+ return gridPanel8;
+ }
+
+ public void setGridPanel8(HtmlPanelGrid hpg) {
+ this.gridPanel8 = hpg;
+ }
+
+ private Table table3 = new Table();
+
+ public Table getTable3() {
+ return table3;
+ }
+
+ public void setTable3(Table t) {
+ this.table3 = t;
+ }
+
+ private TableRowGroup tableRowGroup3 = new TableRowGroup();
+
+ public TableRowGroup getTableRowGroup3() {
+ return tableRowGroup3;
+ }
+
+ public void setTableRowGroup3(TableRowGroup trg) {
+ this.tableRowGroup3 = trg;
+ }
+
+ private TableColumn tableColumn11 = new TableColumn();
+
+ public TableColumn getTableColumn11() {
+ return tableColumn11;
+ }
+
+ public void setTableColumn11(TableColumn tc) {
+ this.tableColumn11 = tc;
+ }
+
+ private Hyperlink lnkCategoriaActivos = new Hyperlink();
+
+ public Hyperlink getLnkCategoriaActivos() {
+ return lnkCategoriaActivos;
+ }
+
+ public void setLnkCategoriaActivos(Hyperlink h) {
+ this.lnkCategoriaActivos = h;
+ }
+
+ private TableColumn tableColumn13 = new TableColumn();
+
+ public TableColumn getTableColumn13() {
+ return tableColumn13;
+ }
+
+ public void setTableColumn13(TableColumn tc) {
+ this.tableColumn13 = tc;
+ }
+
+ private Hyperlink lnkPorActivos = new Hyperlink();
+
+ public Hyperlink getLnkPorActivos() {
+ return lnkPorActivos;
+ }
+
+ public void setLnkPorActivos(Hyperlink h) {
+ this.lnkPorActivos = h;
+ }
+
+ private TableColumn tableColumn14 = new TableColumn();
+
+ public TableColumn getTableColumn14() {
+ return tableColumn14;
+ }
+
+ public void setTableColumn14(TableColumn tc) {
+ this.tableColumn14 = tc;
+ }
+
+ private Hyperlink lnkNomeActivos = new Hyperlink();
+
+ public Hyperlink getLnkNomeActivos() {
+ return lnkNomeActivos;
+ }
+
+ public void setLnkNomeActivos(Hyperlink h) {
+ this.lnkNomeActivos = h;
+ }
+
+ private TableColumn tableColumn15 = new TableColumn();
+
+ public TableColumn getTableColumn15() {
+ return tableColumn15;
+ }
+
+ public void setTableColumn15(TableColumn tc) {
+ this.tableColumn15 = tc;
+ }
+
+ private Hyperlink lnkEstabelecimentoActivos = new Hyperlink();
+
+ public Hyperlink getLnkEstabelecimentoActivos() {
+ return lnkEstabelecimentoActivos;
+ }
+
+ public void setLnkEstabelecimentoActivos(Hyperlink h) {
+ this.lnkEstabelecimentoActivos = h;
+ }
+
+ private StaticText txtSearchMsg1 = new StaticText();
+
+ public StaticText getTxtSearchMsg1() {
+ return txtSearchMsg1;
+ }
+
+ public void setTxtSearchMsg1(StaticText st) {
+ this.txtSearchMsg1 = st;
+ }
+
+ private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel9() {
+ return gridPanel9;
+ }
+
+ public void setGridPanel9(HtmlPanelGrid hpg) {
+ this.gridPanel9 = hpg;
+ }
+
+ private PanelGroup groupPanel8 = new PanelGroup();
+
+ public PanelGroup getGroupPanel8() {
+ return groupPanel8;
+ }
+
+ public void setGroupPanel8(PanelGroup pg) {
+ this.groupPanel8 = pg;
+ }
+
+ private StaticText staticText9 = new StaticText();
+
+ public StaticText getStaticText9() {
+ return staticText9;
+ }
+
+ public void setStaticText9(StaticText st) {
+ this.staticText9 = st;
+ }
+
+ private ImageComponent image3 = new ImageComponent();
+
+ public ImageComponent getImage3() {
+ return image3;
+ }
+
+ public void setImage3(ImageComponent ic) {
+ this.image3 = ic;
+ }
+
+ private StaticText staticText10 = new StaticText();
+
+ public StaticText getStaticText10() {
+ return staticText10;
+ }
+
+ public void setStaticText10(StaticText st) {
+ this.staticText10 = st;
+ }
+
+ private PanelGroup groupPanel3 = new PanelGroup();
+
+ public PanelGroup getGroupPanel3() {
+ return groupPanel3;
+ }
+
+ public void setGroupPanel3(PanelGroup pg) {
+ this.groupPanel3 = pg;
+ }
+
+ private StaticText staticText2 = new StaticText();
+
+ public StaticText getStaticText2() {
+ return staticText2;
+ }
+
+ public void setStaticText2(StaticText st) {
+ this.staticText2 = st;
+ }
+
+ private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel2() {
+ return gridPanel2;
+ }
+
+ public void setGridPanel2(HtmlPanelGrid hpg) {
+ this.gridPanel2 = hpg;
+ }
+
+ private Table table1 = new Table();
+
+ public Table getTable1() {
+ return table1;
+ }
+
+ public void setTable1(Table t) {
+ this.table1 = t;
+ }
+
+ private TableRowGroup tableRowGroup1 = new TableRowGroup();
+
+ public TableRowGroup getTableRowGroup1() {
+ return tableRowGroup1;
+ }
+
+ public void setTableRowGroup1(TableRowGroup trg) {
+ this.tableRowGroup1 = trg;
+ }
+
+ private TableColumn tableColumn1 = new TableColumn();
+
+ public TableColumn getTableColumn1() {
+ return tableColumn1;
+ }
+
+ public void setTableColumn1(TableColumn tc) {
+ this.tableColumn1 = tc;
+ }
+
+ private Hyperlink lnkPorInactivos = new Hyperlink();
+
+ public Hyperlink getLnkPorInactivos() {
+ return lnkPorInactivos;
+ }
+
+ public void setLnkPorInactivos(Hyperlink h) {
+ this.lnkPorInactivos = h;
+ }
+
+ private TableColumn tableColumn2 = new TableColumn();
+
+ public TableColumn getTableColumn2() {
+ return tableColumn2;
+ }
+
+ public void setTableColumn2(TableColumn tc) {
+ this.tableColumn2 = tc;
+ }
+
+ private Hyperlink lnkNomeInactivos = new Hyperlink();
+
+ public Hyperlink getLnkNomeInactivos() {
+ return lnkNomeInactivos;
+ }
+
+ public void setLnkNomeInactivos(Hyperlink h) {
+ this.lnkNomeInactivos = h;
+ }
+
+ private TableColumn tableColumn3 = new TableColumn();
+
+ public TableColumn getTableColumn3() {
+ return tableColumn3;
+ }
+
+ public void setTableColumn3(TableColumn tc) {
+ this.tableColumn3 = tc;
+ }
+
+ private Hyperlink lnkCategoriaInactivos = new Hyperlink();
+
+ public Hyperlink getLnkCategoriaInactivos() {
+ return lnkCategoriaInactivos;
+ }
+
+ public void setLnkCategoriaInactivos(Hyperlink h) {
+ this.lnkCategoriaInactivos = h;
+ }
+
+ private TableColumn tableColumn4 = new TableColumn();
+
+ public TableColumn getTableColumn4() {
+ return tableColumn4;
+ }
+
+ public void setTableColumn4(TableColumn tc) {
+ this.tableColumn4 = tc;
+ }
+
+ private Hyperlink lnkEstabelecimentoInactivos = new Hyperlink();
+
+ public Hyperlink getLnkEstabelecimentoInactivos() {
+ return lnkEstabelecimentoInactivos;
+ }
+
+ public void setLnkEstabelecimentoInactivos(Hyperlink h) {
+ this.lnkEstabelecimentoInactivos = h;
+ }
+
+ private StaticText txtSearchMsg2 = new StaticText();
+
+ public StaticText getTxtSearchMsg2() {
+ return txtSearchMsg2;
+ }
+
+ public void setTxtSearchMsg2(StaticText st) {
+ this.txtSearchMsg2 = st;
+ }
+
+ private DropDown drpEstabelecimentos = new DropDown();
+
+ public DropDown getDrpEstabelecimentos() {
+ return drpEstabelecimentos;
+ }
+
+ public void setDrpEstabelecimentos(DropDown dd) {
+ this.drpEstabelecimentos = dd;
+ }
+
+ private SingleSelectOptionsList drpEstabelecimentosDefaultOptions = new SingleSelectOptionsList();
+
+ public SingleSelectOptionsList getDrpEstabelecimentosDefaultOptions() {
+ return drpEstabelecimentosDefaultOptions;
+ }
+
+ public void setDrpEstabelecimentosDefaultOptions(SingleSelectOptionsList ssol) {
+ this.drpEstabelecimentosDefaultOptions = ssol;
+ }
+
+ //
+ boolean isPostback = false;
+
+ private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel3() {
+ return gridPanel3;
+ }
+
+ public void setGridPanel3(HtmlPanelGrid hpg) {
+ this.gridPanel3 = hpg;
+ }
+
+ private StaticText staticText3 = new StaticText();
+
+ public StaticText getStaticText3() {
+ return staticText3;
+ }
+
+ public void setStaticText3(StaticText st) {
+ this.staticText3 = st;
+ }
+
+ private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel5() {
+ return gridPanel5;
+ }
+
+ public void setGridPanel5(HtmlPanelGrid hpg) {
+ this.gridPanel5 = hpg;
+ }
+
+ private Button butNovoUtilizador = new Button();
+
+ public Button getButNovoUtilizador() {
+ return butNovoUtilizador;
+ }
+
+ public void setButNovoUtilizador(Button b) {
+ this.butNovoUtilizador = b;
+ }
+
+ private HtmlPanelGrid gridMsg1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridMsg1() {
+ return gridMsg1;
+ }
+
+ public void setGridMsg1(HtmlPanelGrid hpg) {
+ this.gridMsg1 = hpg;
+ }
+
+ private StaticText txtMsg = new StaticText();
+
+ public StaticText getTxtMsg() {
+ return txtMsg;
+ }
+
+ public void setTxtMsg(StaticText st) {
+ this.txtMsg = st;
+ }
+ private StaticText lblUser = new StaticText();
+
+ public StaticText getLblUser() {
+ return lblUser;
+ }
+
+ public void setLblUser(StaticText st) {
+ this.lblUser = st;
+ }
+ private Hyperlink lnkPlanosActuacao = new Hyperlink();
+
+ public Hyperlink getLnkPlanosActuacao() {
+ return lnkPlanosActuacao;
+ }
+
+ public void setLnkPlanosActuacao(Hyperlink h) {
+ this.lnkPlanosActuacao = h;
+ }
+ /**
+ * Construct a new Page bean instance.
+ */
+ public GestaoUtilizadores() {
+ }
+
+ /**
+ * Callback method that is called whenever a page is navigated to,
+ * either directly via a URL, or indirectly via page navigation.
+ * Customize this method to acquire resources that will be needed
+ * for event handlers and lifecycle methods, whether or not this
+ * page is performing post back processing.
+ *
+ * Note that, if the current request is a postback, the property
+ * values of the components do not represent any
+ * values submitted with this request. Instead, they represent the
+ * property values that were saved for this view when it was rendered.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("GestaoUtilizadores Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+ if (!getSessionBean1().isLoggedIn()) {
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {
+ // . . . handle exception . . .
+ }
+ }
+ else
+ {
+ lblUser.setText( getSessionBean1().getCurrentUser().getLogin() );
+
+ HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest();
+ String referer = request.getRequestURI();
+ String pageFrom = Utils.getPageFrom(referer);
+
+ boolean userDeleted = getSessionBean1().isUserDeleted();
+
+ if(userDeleted)
+ {
+ getSessionBean1().setUserDeleted(false);
+ }
+
+ FacesContext fc = getFacesContext();
+ Map parameters = fc.getCurrentInstance().getExternalContext().getRequestParameterMap();
+ if(!pageFrom.matches("GestaoUtilizadores.jsp") || userDeleted || parameters.size() > 0)
+ {
+ isPostback = false;
+ }
+ else
+ {
+ isPostback = true;
+ }
+
+
+ }
+
+ }
+
+ /**
+ * Callback method that is called after the component tree has been
+ * restored, but before any event processing takes place. This method
+ * will only be called on a postback request that
+ * is processing a form submit. Customize this method to allocate
+ * resources that will be required in your event handlers.
+ */
+ public void preprocess() {
+ }
+
+ /**
+ * Callback method that is called just before rendering takes place.
+ * This method will only be called for the page that
+ * will actually be rendered (and not, for example, on a page that
+ * handled a postback and then navigated to a different page). Customize
+ * this method to allocate resources that will be required for rendering
+ * this page.
+ */
+ public void prerender() {
+ Utilizador u = getSessionBean1().getCurrentUser();
+ if(u.getTipo().intValue() != Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP)
+ {
+ lnkPlanosActuacao.setDisabled(true);
+ }
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
+ System.out.println("POSTBACK : " + isPostback);
+ if(!isPostback)
+ {
+ try
+ {
+ com.sun.rave.web.ui.model.Option[] listOptions = adp.getEstabelecimentosList( getSessionBean1().getCurrentUser().getEmpresa_id(), new Boolean(false));
+ listOptions[0].setLabel("-Todos-");
+ getSessionBean1().setEstabelecimentosOptions( listOptions );
+ drpEstabelecimentos.setSelected(new Integer(-1));
+ }
+ catch(Exception ex)
+ {
+ //ex.printStackTrace();
+ }
+
+ String isDirRh = "n";
+ if(getSessionBean1().getCurrentUser().getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_GERAL_RH) // Director geral rh
+ {
+ isDirRh = "y";
+ }
+ try
+ {
+ ArrayList list = udp.getUtilizadoresList(null, null, null, "y", isDirRh);
+ getSessionBean1().getUtilizadoresActivosListDataProvider().setList(list);
+ }
+ catch(Exception ex)
+ {
+ //ex.printStackTrace();
+ }
+
+ try
+ {
+ ArrayList list = udp.getUtilizadoresList(null, null, null, "n", isDirRh);
+ getSessionBean1().getUtilizadoresInactivosListDataProvider().setList(list);
+ }
+ catch(Exception ex)
+ {
+ //ex.printStackTrace();
+ getSessionBean1().getUtilizadoresInactivosListDataProvider().setList(new ArrayList());
+ table1.setRendered(false);
+ }
+
+ }
+ txtMsg.setText(getSessionBean1().getMsg());
+ getSessionBean1().setMsg("");
+ }
+
+ /**
+ * Callback method that is called after rendering is completed for
+ * this request, if init() was called (regardless of whether
+ * or not this was the page that was actually rendered). Customize this
+ * method to release resources acquired in the init(),
+ * preprocess(), or prerender() methods (or
+ * acquired during execution of an event handler).
+ */
+ public void destroy() {
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected RequestBean1 getRequestBean1() {
+ return (RequestBean1)getBean("RequestBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected SessionBean1 getSessionBean1() {
+ return (SessionBean1)getBean("SessionBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+
+ public String lnkEditUser_action() {
+ // TODO: Replace with your code
+
+ getSessionBean1().setNavFrom("GestaoUtilizadores");
+ getSessionBean1().setModoEdicaoUtilizador("edit");
+ return "user";
+ }
+
+ public String lnkLogout_action() {
+ // TODO: Replace with your code
+
+ javax.servlet.http.HttpSession session =
+ (javax.servlet.http.HttpSession) getExternalContext().getSession(true);
+ session.invalidate();
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {}
+ //return "login";
+ return null;
+
+ }
+
+ public String butNovaAnalise_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ return null;
+ }
+
+ public String lnkDataAcidente_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkNr_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkPor_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkNomeAcidentado_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkFase_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkDataAcidenteSeg_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkNrSeg_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkPorSeg_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkNomeAcidentadoSeg_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkFaseSeg_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public void drpAno_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+
+ }
+
+ public void drpMes_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+
+ }
+
+ public void drpDia_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+
+ }
+
+ public String butPesquisar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ String por = null;
+ String nome = null;
+ Integer estabelecimento_id = null;
+
+ if(txtPor.getText() != null)
+ {
+ por = (String) txtPor.getText();
+ if(por.trim().length() == 0)
+ {
+ por = null;
+ }
+ else
+ {
+ por = por.toLowerCase();
+ }
+ }
+
+ if(txtNome.getText() != null)
+ {
+ nome = (String) txtNome.getText();
+ if(nome.trim().length() == 0)
+ {
+ nome = null;
+ }
+ else
+ {
+ nome = nome.toLowerCase();
+ }
+ }
+
+ estabelecimento_id = (Integer) drpEstabelecimentos.getSelected();
+ if(estabelecimento_id.intValue() == -1)
+ {
+ estabelecimento_id = null;
+ }
+
+ String isDirRh = "n";
+
+ if(getSessionBean1().getCurrentUser().getTipo().intValue() == 7) //director geral rh
+ {
+ isDirRh = "y";
+ }
+
+ UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
+ try
+ {
+ ArrayList list = udp.getUtilizadoresList(por, nome, estabelecimento_id, "y", isDirRh);
+ getSessionBean1().getUtilizadoresActivosListDataProvider().setList(list);
+ }
+ catch(Exception ex)
+ {
+ //ex.printStackTrace();
+ getSessionBean1().getUtilizadoresActivosListDataProvider().setList(new ArrayList());
+ }
+
+ try
+ {
+ ArrayList list = udp.getUtilizadoresList(por, nome, estabelecimento_id, "n", isDirRh);
+ getSessionBean1().getUtilizadoresInactivosListDataProvider().setList(list);
+ }
+ catch(Exception ex)
+ {
+ //ex.printStackTrace();
+ getSessionBean1().getUtilizadoresInactivosListDataProvider().setList(new ArrayList());
+ }
+
+ return null;
+ }
+
+ public String lnkPorActivos_action() {
+ // TODO: Replace with your code
+ Utilizador u = getUtilizadorActivoRowData();
+ getSessionBean1().setEditUser(u);
+ getSessionBean1().setModoEdicaoUtilizador("edit");
+ getSessionBean1().setNavFrom("GestaoUtilizadores");
+ return "user_fields";
+ }
+
+ public String lnkNomeActivos_action() {
+ // TODO: Replace with your code
+ Utilizador u = getUtilizadorActivoRowData();
+ System.out.println("UTILIZADOR ID : " + u.getId());
+ getSessionBean1().setEditUser(u);
+ getSessionBean1().setModoEdicaoUtilizador("edit");
+ getSessionBean1().setNavFrom("GestaoUtilizadores");
+ return "user_fields";
+ }
+
+ public String lnkCategoriaActivos_action() {
+ // TODO: Replace with your code
+ Utilizador u = getUtilizadorActivoRowData();
+ getSessionBean1().setEditUser(u);
+ getSessionBean1().setModoEdicaoUtilizador("edit");
+ getSessionBean1().setNavFrom("GestaoUtilizadores");
+ return "user_fields";
+ }
+
+ public String lnkEstabelecimentosActivos_action() {
+ // TODO: Replace with your code
+ Utilizador u = getUtilizadorActivoRowData();
+ getSessionBean1().setEditUser(u);
+ getSessionBean1().setModoEdicaoUtilizador("edit");
+ getSessionBean1().setNavFrom("GestaoUtilizadores");
+ return "user_fields";
+ }
+
+ private Utilizador getUtilizadorActivoRowData()
+ {
+ RowKey rk = tableRowGroup3.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ UtilizadoresActivosListDataProvider provider = (UtilizadoresActivosListDataProvider) tableRowGroup3.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ Utilizador u = (Utilizador)list.get(k);
+ return u;
+ }
+
+
+ public String lnkPorInactivos_action() {
+ // TODO: Replace with your code
+ Utilizador u = getUtilizadorInactivoRowData();
+ getSessionBean1().setEditUser(u);
+ getSessionBean1().setModoEdicaoUtilizador("edit");
+ getSessionBean1().setNavFrom("GestaoUtilizadores");
+ return "user_fields";
+ }
+
+ public String lnkNomeInactivos_action() {
+ // TODO: Replace with your code
+ Utilizador u = getUtilizadorInactivoRowData();
+ getSessionBean1().setEditUser(u);
+ getSessionBean1().setModoEdicaoUtilizador("edit");
+ getSessionBean1().setNavFrom("GestaoUtilizadores");
+ return "user_fields";
+ }
+
+ public String lnkCategoriaInactivos_action() {
+ // TODO: Replace with your code
+ Utilizador u = getUtilizadorInactivoRowData();
+ getSessionBean1().setEditUser(u);
+ getSessionBean1().setModoEdicaoUtilizador("edit");
+ getSessionBean1().setNavFrom("GestaoUtilizadores");
+ return "user_fields";
+ }
+
+ public String lnkEstabelecimentoInactivos_action() {
+ // TODO: Replace with your code
+ Utilizador u = getUtilizadorInactivoRowData();
+ getSessionBean1().setEditUser(u);
+ getSessionBean1().setModoEdicaoUtilizador("edit");
+ getSessionBean1().setNavFrom("GestaoUtilizadores");
+ return "user_fields";
+ }
+
+ private Utilizador getUtilizadorInactivoRowData()
+ {
+ RowKey rk = tableRowGroup1.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ UtilizadoresInactivosListDataProvider provider = (UtilizadoresInactivosListDataProvider) tableRowGroup1.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ Utilizador u = (Utilizador)list.get(k);
+ return u;
+ }
+
+
+ public String lnkNewUser_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String butNovoUtilizador_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ return "novo_utilizador";
+ }
+
+ public String lnkAnalisesAcidente_action() {
+ // TODO: Replace with your code
+ String nav_from = getSessionBean1().getNavFrom();
+ Integer tipo_utilizador = getSessionBean1().getCurrentUser().getTipo();
+ if(tipo_utilizador.intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP)
+ {
+ return "form_dir_siprp";
+ }
+ else if( tipo_utilizador.intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_GERAL_RH )
+ {
+ return "form_dir_ger_rh";
+ }
+ return null;
+ }
+
+ public String lnkAjuda_action() {
+ // TODO: Replace with your code
+// ServletContext theApplicationsServletContext =
+// (ServletContext) this.getExternalContext().getContext();
+// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL);
+// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf";
+//
+// Global global = new Global();
+// try
+// {
+// global.showPdf(pdfFilePath);
+// }
+// catch(Exception ex)
+// {
+// ex.printStackTrace();
+// }
+ return null;
+ }
+
+ public String lnkPlanosActuacao_action() {
+ // TODO: Replace with your code
+ Utilizador u = getSessionBean1().getCurrentUser();
+// String curUser = "?user=" + u.getId().toString();
+ FacesContext fc = getFacesContext().getCurrentInstance();
+ Global.redirectToPlanos(fc, u);
+ return null;
+ }
+}
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Header.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Header.java
new file mode 100644
index 00000000..713acb0e
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Header.java
@@ -0,0 +1,130 @@
+/*
+ * Header.java
+ *
+ * Created on September 19, 2007, 10:14 AM
+ * Copyright lluis
+ */
+package analiseacidentestrabalho;
+
+import com.sun.rave.web.ui.appbase.AbstractFragmentBean;
+import com.sun.rave.web.ui.component.StaticText;
+import javax.faces.FacesException;
+import javax.faces.component.html.HtmlPanelGrid;
+
+/**
+ * Fragment bean that corresponds to a similarly named JSP page
+ * fragment. This class contains component definitions (and initialization
+ * code) for all components that you have defined on this fragment, as well as
+ * lifecycle methods and event handlers where you may add behavior
+ * to respond to incoming events.
+ */
+public class Header extends AbstractFragmentBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+ //
+
+ public Header() {
+ }
+
+ /**
+ * Callback method that is called whenever a page containing
+ * this page fragment is navigated to, either directly via a URL,
+ * or indirectly via page navigation. Override this method to acquire
+ * resources that will be needed for event handlers and lifecycle methods.
+ *
+ * The default implementation does nothing.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("Page1 Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+ }
+
+ /**
+ * Callback method that is called after rendering is completed for
+ * this request, if init() was called. Override this
+ * method to release resources acquired in the init()
+ * resources that will be needed for event handlers and lifecycle methods.
+ *
+ * The default implementation does nothing.
+ */
+ public void destroy() {
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected RequestBean1 getRequestBean1() {
+ return (RequestBean1)getBean("RequestBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected SessionBean1 getSessionBean1() {
+ return (SessionBean1)getBean("SessionBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+
+ public String lnkAnalisesAcidente_action() {
+ // TODO: Replace with your code
+ return null;
+ }
+
+ public String lnkPlanosActuacao_action() {
+ // TODO: Replace with your code
+ return null;
+ }
+
+ public String lnkNewUser_action() {
+ // TODO: Replace with your code
+ return null;
+ }
+
+ public String lnkEditUser_action() {
+ // TODO: Replace with your code
+ return null;
+ }
+
+ public String lnkAjuda_action() {
+ // TODO: Replace with your code
+ return null;
+ }
+
+ public String lnkLogout_action() {
+ // TODO: Replace with your code
+ return null;
+ }
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/LoadImage.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/LoadImage.java
new file mode 100644
index 00000000..7d194938
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/LoadImage.java
@@ -0,0 +1,473 @@
+/*
+ * LoadImage.java
+ *
+ * Created on September 26, 2007, 5:36 PM
+ * Copyright lluis
+ */
+package analiseacidentestrabalho;
+
+import com.sun.rave.web.ui.appbase.AbstractPageBean;
+import com.sun.rave.web.ui.component.Body;
+import com.sun.rave.web.ui.component.Button;
+import com.sun.rave.web.ui.component.Form;
+import com.sun.rave.web.ui.component.Head;
+import com.sun.rave.web.ui.component.Html;
+import com.sun.rave.web.ui.component.Link;
+import com.sun.rave.web.ui.component.Page;
+import com.sun.rave.web.ui.component.PanelGroup;
+import com.sun.rave.web.ui.component.StaticText;
+import com.sun.rave.web.ui.component.Upload;
+import com.sun.rave.web.ui.model.UploadedFile;
+import global.Global;
+import java.io.File;
+import javax.faces.FacesException;
+import javax.faces.component.html.HtmlPanelGrid;
+import javax.servlet.ServletContext;
+
+/**
+ * Page bean that corresponds to a similarly named JSP page. This
+ * class contains component definitions (and initialization code) for
+ * all components that you have defined on this page, as well as
+ * lifecycle methods and event handlers where you may add behavior
+ * to respond to incoming events.
+ */
+public class LoadImage extends AbstractPageBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+
+ private Page page1 = new Page();
+
+ public Page getPage1() {
+ return page1;
+ }
+
+ public void setPage1(Page p) {
+ this.page1 = p;
+ }
+
+ private Html html1 = new Html();
+
+ public Html getHtml1() {
+ return html1;
+ }
+
+ public void setHtml1(Html h) {
+ this.html1 = h;
+ }
+
+ private Head head1 = new Head();
+
+ public Head getHead1() {
+ return head1;
+ }
+
+ public void setHead1(Head h) {
+ this.head1 = h;
+ }
+
+ private Link link1 = new Link();
+
+ public Link getLink1() {
+ return link1;
+ }
+
+ public void setLink1(Link l) {
+ this.link1 = l;
+ }
+
+ private Body body1 = new Body();
+
+ public Body getBody1() {
+ return body1;
+ }
+
+ public void setBody1(Body b) {
+ this.body1 = b;
+ }
+
+ private Form form1 = new Form();
+
+ public Form getForm1() {
+ return form1;
+ }
+
+ public void setForm1(Form f) {
+ this.form1 = f;
+ }
+
+ private HtmlPanelGrid gridBase1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridBase1() {
+ return gridBase1;
+ }
+
+ public void setGridBase1(HtmlPanelGrid hpg) {
+ this.gridBase1 = hpg;
+ }
+
+ private HtmlPanelGrid gridLayout = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLayout() {
+ return gridLayout;
+ }
+
+ public void setGridLayout(HtmlPanelGrid hpg) {
+ this.gridLayout = hpg;
+ }
+
+ private StaticText staticText1 = new StaticText();
+
+ public StaticText getStaticText1() {
+ return staticText1;
+ }
+
+ public void setStaticText1(StaticText st) {
+ this.staticText1 = st;
+ }
+
+ private Upload fileUpload1 = new Upload();
+
+ public Upload getFileUpload1() {
+ return fileUpload1;
+ }
+
+ public void setFileUpload1(Upload u) {
+ this.fileUpload1 = u;
+ }
+
+ //
+ /**
+ * Construct a new Page bean instance.
+ */
+
+ private String realImageFilePath;
+ //private static final String IMAGE_URL = "/resources/image-file";
+ //private String IMAGE_URL = "/resources/images";
+
+ private StaticText staticText2 = new StaticText();
+
+ public StaticText getStaticText2() {
+ return staticText2;
+ }
+
+ public void setStaticText2(StaticText st) {
+ this.staticText2 = st;
+ }
+
+ private StaticText txtMsg = new StaticText();
+
+ public StaticText getTxtMsg() {
+ return txtMsg;
+ }
+
+ public void setTxtMsg(StaticText st) {
+ this.txtMsg = st;
+ }
+
+ private PanelGroup groupPanel4 = new PanelGroup();
+
+ public PanelGroup getGroupPanel4() {
+ return groupPanel4;
+ }
+
+ public void setGroupPanel4(PanelGroup pg) {
+ this.groupPanel4 = pg;
+ }
+
+ private Button butUpload = new Button();
+
+ public Button getButUpload() {
+ return butUpload;
+ }
+
+ public void setButUpload(Button b) {
+ this.butUpload = b;
+ }
+
+ private Button butCancelar = new Button();
+
+ public Button getButCancelar() {
+ return butCancelar;
+ }
+
+ public void setButCancelar(Button b) {
+ this.butCancelar = b;
+ }
+ public LoadImage() {
+ }
+
+ /**
+ * Callback method that is called whenever a page is navigated to,
+ * either directly via a URL, or indirectly via page navigation.
+ * Customize this method to acquire resources that will be needed
+ * for event handlers and lifecycle methods, whether or not this
+ * page is performing post back processing.
+ *
+ * Note that, if the current request is a postback, the property
+ * values of the components do not represent any
+ * values submitted with this request. Instead, they represent the
+ * property values that were saved for this view when it was rendered.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("LoadImage Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+
+ if (!getSessionBean1().isLoggedIn()) {
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {
+ // . . . handle exception . . .
+ }
+ }
+ else
+ {
+
+ getSessionBean1().setImageName(null);
+ ServletContext theApplicationsServletContext =
+ (ServletContext) this.getExternalContext().getContext();
+ //this.realImageFilePath = theApplicationsServletContext.getRealPath(IMAGE_URL);
+ //this.realImageFilePath = theApplicationsServletContext.getRealPath(Global.IMAGE_FOLDER);
+ try
+ {
+ realImageFilePath = Global.IMAGE_FOLDER + "/tmp" + getSessionBean1().getCurrentUser().getLogin();
+ File f = new File(realImageFilePath);
+ f.mkdir();
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+
+
+
+ }
+
+ /**
+ * Callback method that is called after the component tree has been
+ * restored, but before any event processing takes place. This method
+ * will only be called on a postback request that
+ * is processing a form submit. Customize this method to allocate
+ * resources that will be required in your event handlers.
+ */
+ public void preprocess() {
+ }
+
+ /**
+ * Callback method that is called just before rendering takes place.
+ * This method will only be called for the page that
+ * will actually be rendered (and not, for example, on a page that
+ * handled a postback and then navigated to a different page). Customize
+ * this method to allocate resources that will be required for rendering
+ * this page.
+ */
+ public void prerender() {
+ //String uploadedFileName = (String) this.txtFileName.getValue();
+ //if ( uploadedFileName != null ) {
+// IMAGE_URL += getSessionBean1().getImageName();
+// System.out.println("IMAGE URL : " + IMAGE_URL);
+ //image1.setUrl(IMAGE_URL);
+// }
+ txtMsg.setText(getSessionBean1().getMsg());
+ getSessionBean1().setMsg("");
+
+ }
+
+ /**
+ * Callback method that is called after rendering is completed for
+ * this request, if init() was called (regardless of whether
+ * or not this was the page that was actually rendered). Customize this
+ * method to release resources acquired in the init(),
+ * preprocess(), or prerender() methods (or
+ * acquired during execution of an event handler).
+ */
+ public void destroy() {
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected RequestBean1 getRequestBean1() {
+ return (RequestBean1)getBean("RequestBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected SessionBean1 getSessionBean1() {
+ return (SessionBean1)getBean("SessionBean1");
+ }
+
+ public String lnkLogout_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkNome_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkDataNascimento_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String butCancelar_action() {
+ getSessionBean1().setImageName(null);
+ return "analise_acidente";
+ }
+
+ public String butUpload_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ //realImageFilePath += "/tmp" + getSessionBean1().getCurrentUser().getLogin();
+ System.out.println("REAL IMAGE FILE PATH : " + realImageFilePath);
+ File fdir = new File(realImageFilePath);
+ System.out.println("FDIR : " + fdir);
+
+
+ UploadedFile uploadedFile = fileUpload1.getUploadedFile();
+ if(uploadedFile != null)
+ {
+
+ String uploadedFileName = uploadedFile.getOriginalName();
+
+ // Some browsers return complete path name, some don't
+ // Make sure we only have the file name
+ // First, try forward slash
+ int index = uploadedFileName.lastIndexOf('/');
+ String justFileName;
+ if ( index >= 0) {
+ justFileName = uploadedFileName.substring( index + 1 );
+ } else {
+ // Try backslash
+ index = uploadedFileName.lastIndexOf('\\');
+ if (index >= 0) {
+ justFileName = uploadedFileName.substring( index + 1 );
+ } else {
+ // No forward or back slashes
+ justFileName = uploadedFileName;
+ }
+ }
+ //justFileName = justFileName.substring(0, justFileName.lastIndexOf('.'));
+ int firstImageNr = getFirstImageNr().intValue();
+ File files[] = fdir.listFiles();
+ // realImageFilePath += "/" + justFileName;
+ System.out.println("FILES : " + files);
+
+ int imageName = firstImageNr + files.length + 1;
+ justFileName = new Integer(imageName).toString();
+
+ if(imageName < 10)
+ {
+ justFileName = "0" + justFileName;
+ }
+ //this.txtFileName.setValue(justFileName);
+ Long uploadedFileSize = new Long(uploadedFile.getSize());
+ //this.txtFileSize.setValue(uploadedFileSize);
+ String uploadedFileType = uploadedFile.getContentType();
+ //this.txtFileType.setValue(uploadedFileType);
+ if ( uploadedFileType.equals("image/jpeg")
+ || uploadedFileType.equals("image/pjpeg")
+ || uploadedFileType.equals("image/gif")
+ || uploadedFileType.equals("image/png")
+ || uploadedFileType.equals("image/x-png")) {
+ try {
+
+ realImageFilePath += "/" + justFileName;
+ File file = new File(this.realImageFilePath);
+ uploadedFile.write(file);
+ getSessionBean1().setImageName(justFileName);
+ //getSessionBean1().setMsg("Ficheiro carregado !");
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ getSessionBean1().setMsg("Não foi possivel carregar o ficheiro !");
+ return null;
+ }
+ } else {
+ getSessionBean1().setMsg("Tem de seleccionar um ficheiro do tipo JPEG, PJPEG, GIF, PNG, ou X-PNG !");
+ new File(this.realImageFilePath).delete();
+ return null;
+ }
+ }
+ else
+ {
+ getSessionBean1().setImageName(null);
+ }
+
+ return "analise_acidente";
+ }
+
+ private Integer getFirstImageNr()
+ {
+ if(getSessionBean1().getCurrentAnalise() == null)
+ {
+ return new Integer(0);
+ }
+ else
+ {
+ String folderName = getSessionBean1().getCurrentAnalise().getAnalise_nr().substring(0,2) + getSessionBean1().getCurrentAnalise().getAnalise_nr().substring(3);
+ ServletContext theApplicationsServletContext =
+ (ServletContext) this.getExternalContext().getContext();
+// String imageFileFolder = theApplicationsServletContext.getRealPath(Global.IMAGE_FOLDER + "/" + folderName);
+ String imageFileFolder = Global.IMAGE_FOLDER + "/" + folderName;
+ File fdir = new File(imageFileFolder);
+ int nr = 0;
+ if(fdir.exists())
+ {
+ File files[] = fdir.listFiles();
+ for(int i=0; i < files.length; i++)
+ {
+ String nr_str = files[i].getName();
+ int i_nr = Integer.parseInt(nr_str);
+ if(i_nr > nr)
+ {
+ nr = i_nr;
+ }
+ }
+ return new Integer(nr);
+ }
+
+ return new Integer(0);
+ }
+ }
+}
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Login.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Login.java
new file mode 100644
index 00000000..40bd21e4
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Login.java
@@ -0,0 +1,658 @@
+/*
+ * Page1.java
+ *
+ * Created on September 18, 2007, 3:14 PM
+ * Copyright lluis
+ */
+package analiseacidentestrabalho;
+
+import com.sun.rave.web.ui.appbase.AbstractPageBean;
+import com.sun.rave.web.ui.component.Body;
+import com.sun.rave.web.ui.component.Button;
+import com.sun.rave.web.ui.component.Form;
+import com.sun.rave.web.ui.component.Head;
+import com.sun.rave.web.ui.component.Html;
+import com.sun.rave.web.ui.component.Hyperlink;
+import com.sun.rave.web.ui.component.Link;
+import com.sun.rave.web.ui.component.Page;
+import com.sun.rave.web.ui.component.PasswordField;
+import com.sun.rave.web.ui.component.StaticText;
+import com.sun.rave.web.ui.component.TextField;
+import com.sun.rave.web.ui.model.Option;
+import db.AnalisesDataProvider;
+import db.UtilizadoresDataProvider;
+import global.Global;
+import java.sql.Connection;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+import javax.faces.FacesException;
+import javax.faces.component.html.HtmlPanelGrid;
+import javax.faces.context.FacesContext;
+import utils.JSFUtils;
+
+/**
+ * Page bean that corresponds to a similarly named JSP page. This
+ * class contains component definitions (and initialization code) for
+ * all components that you have defined on this page, as well as
+ * lifecycle methods and event handlers where you may add behavior
+ * to respond to incoming events.
+ */
+public class Login extends AbstractPageBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+
+ private Page page1 = new Page();
+
+ public Page getPage1() {
+ return page1;
+ }
+
+ public void setPage1(Page p) {
+ this.page1 = p;
+ }
+
+ private Html html1 = new Html();
+
+ public Html getHtml1() {
+ return html1;
+ }
+
+ public void setHtml1(Html h) {
+ this.html1 = h;
+ }
+
+ private Head head1 = new Head();
+
+ public Head getHead1() {
+ return head1;
+ }
+
+ public void setHead1(Head h) {
+ this.head1 = h;
+ }
+
+ private Link link1 = new Link();
+
+ public Link getLink1() {
+ return link1;
+ }
+
+ public void setLink1(Link l) {
+ this.link1 = l;
+ }
+
+ private Body body1 = new Body();
+
+ public Body getBody1() {
+ return body1;
+ }
+
+ public void setBody1(Body b) {
+ this.body1 = b;
+ }
+
+ private Form form1 = new Form();
+
+ public Form getForm1() {
+ return form1;
+ }
+
+ public void setForm1(Form f) {
+ this.form1 = f;
+ }
+
+ private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel6() {
+ return gridPanel6;
+ }
+
+ public void setGridPanel6(HtmlPanelGrid hpg) {
+ this.gridPanel6 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel1() {
+ return gridPanel1;
+ }
+
+ public void setGridPanel1(HtmlPanelGrid hpg) {
+ this.gridPanel1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel2() {
+ return gridPanel2;
+ }
+
+ public void setGridPanel2(HtmlPanelGrid hpg) {
+ this.gridPanel2 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel3() {
+ return gridPanel3;
+ }
+
+ public void setGridPanel3(HtmlPanelGrid hpg) {
+ this.gridPanel3 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel4() {
+ return gridPanel4;
+ }
+
+ public void setGridPanel4(HtmlPanelGrid hpg) {
+ this.gridPanel4 = hpg;
+ }
+
+ private StaticText staticText1 = new StaticText();
+
+ public StaticText getStaticText1() {
+ return staticText1;
+ }
+
+ public void setStaticText1(StaticText st) {
+ this.staticText1 = st;
+ }
+
+ private TextField txtUtilizador = new TextField();
+
+ public TextField getTxtUtilizador() {
+ return txtUtilizador;
+ }
+
+ public void setTxtUtilizador(TextField tf) {
+ this.txtUtilizador = tf;
+ }
+
+ private StaticText staticText2 = new StaticText();
+
+ public StaticText getStaticText2() {
+ return staticText2;
+ }
+
+ public void setStaticText2(StaticText st) {
+ this.staticText2 = st;
+ }
+
+ private PasswordField txtPassword = new PasswordField();
+
+ public PasswordField getTxtPassword() {
+ return txtPassword;
+ }
+
+ public void setTxtPassword(PasswordField pf) {
+ this.txtPassword = pf;
+ }
+
+ private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel5() {
+ return gridPanel5;
+ }
+
+ public void setGridPanel5(HtmlPanelGrid hpg) {
+ this.gridPanel5 = hpg;
+ }
+
+ private Hyperlink lnkPassRecovery = new Hyperlink();
+
+ public Hyperlink getLnkPassRecovery() {
+ return lnkPassRecovery;
+ }
+
+ public void setLnkPassRecovery(Hyperlink h) {
+ this.lnkPassRecovery = h;
+ }
+
+ private Button butLogin = new Button();
+
+ public Button getButLogin() {
+ return butLogin;
+ }
+
+ public void setButLogin(Button b) {
+ this.butLogin = b;
+ }
+
+ private StaticText txtMsg = new StaticText();
+
+ public StaticText getTxtMsg() {
+ return txtMsg;
+ }
+
+ public void setTxtMsg(StaticText st) {
+ this.txtMsg = st;
+ }
+
+ //
+ /**
+ * Construct a new Page bean instance.
+ */
+ public Login() {
+ connect();
+ }
+
+ /**
+ * Callback method that is called whenever a page is navigated to,
+ * either directly via a URL, or indirectly via page navigation.
+ * Customize this method to acquire resources that will be needed
+ * for event handlers and lifecycle methods, whether or not this
+ * page is performing post back processing.
+ *
+ * Note that, if the current request is a postback, the property
+ * values of the components do not represent any
+ * values submitted with this request. Instead, they represent the
+ * property values that were saved for this view when it was rendered.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("Page1 Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+
+ }
+
+ /**
+ * Callback method that is called after the component tree has been
+ * restored, but before any event processing takes place. This method
+ * will only be called on a postback request that
+ * is processing a form submit. Customize this method to allocate
+ * resources that will be required in your event handlers.
+ */
+ public void preprocess() {
+ }
+
+ /**
+ * Callback method that is called just before rendering takes place.
+ * This method will only be called for the page that
+ * will actually be rendered (and not, for example, on a page that
+ * handled a postback and then navigated to a different page). Customize
+ * this method to allocate resources that will be required for rendering
+ * this page.
+ */
+ public void prerender() {
+
+ txtMsg.setText(getSessionBean1().getMsg());
+ getSessionBean1().setMsg("");
+ }
+
+ /**
+ * Callback method that is called after rendering is completed for
+ * this request, if init() was called (regardless of whether
+ * or not this was the page that was actually rendered). Customize this
+ * method to release resources acquired in the init(),
+ * preprocess(), or prerender() methods (or
+ * acquired during execution of an event handler).
+ */
+ public void destroy() {
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected SessionBean1 getSessionBean1() {
+ return (SessionBean1)getBean("SessionBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected RequestBean1 getRequestBean1() {
+ return (RequestBean1)getBean("RequestBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+
+ public String butLogin_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+ String sRet = null;
+
+ UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
+ if(txtUtilizador.getText() != null)
+ {
+ String utilizador = (String) txtUtilizador.getText();
+ if(utilizador.trim().length() > 0)
+ {
+ if(txtPassword.getText() != null)
+ {
+ String password = (String) txtPassword.getText();
+ if(password.trim().length() > 0)
+ {
+ try
+ {
+ Utilizador u = udp.getUtilizador(utilizador);
+ if(u.getActivo().matches("y"))
+ {
+ if(!password.equals(u.getPassword()))
+ {
+ getSessionBean1().setMsg("Palavra-chave inválida !");
+ }
+ else
+ {
+ //if(u.getOwner_id().intValue() == 0 )
+
+ //Login Ok !
+// if(u.getPrimeiro_login().matches("y") || mustChangePassword(u))
+ if(u.getPrimeiro_login().matches("y") )
+ {
+ getSessionBean1().setMudarPassword(true);
+ getSessionBean1().setCurrentUser( u );
+ getSessionBean1().setNavFrom("Login");
+ getSessionBean1().setModoEdicaoUtilizador("edit");
+ getSessionBean1().setLoggedIn(true);
+ initializeClock();
+ initializeDropDownOptions();
+ return "user";
+ }
+ try
+ {
+ Integer permissao = udp.getPermissionCode(u.getId());
+ if(permissao.intValue() == 1) //seguranca
+ {
+ if(u.getResponsavel_loja().matches("y"))
+ {
+ sRet = "acesso";
+ }
+ else
+ {
+ sRet = "form_seguranca";
+ }
+ }
+ else if(permissao.intValue() == 2) // rh
+ {
+ if(u.getResponsavel_loja().matches("y"))
+ {
+ sRet = "acesso";
+ }
+ else
+ {
+ sRet = "form_rh";
+ }
+ //sRet = "form_rh";
+ }
+ else if(permissao.intValue() == 3) // hs
+ {
+ //sRet = "form_hs";
+ sRet = "acesso";
+ }
+ else if(permissao.intValue() == 5) // medico
+ {
+ sRet = "form_medico";
+ }
+ else if(permissao.intValue() == 6) // gestor
+ {
+ //sRet = "form_gestor";
+ sRet = "acesso";
+ }
+ else if(permissao.intValue() == 7) // director geral rh
+ {
+ //sRet = "form_rh";
+ //sRet = "form_dir_ger_rh";
+ sRet = "acesso";
+ }
+ else if(permissao.intValue() == 8) // director siprp
+ {
+ //sRet = "form_dir_siprp";
+ sRet = "acesso";
+ }
+ else if(permissao.intValue() == 9) // director loja
+ {
+ sRet = "acesso";
+ }
+ else if(permissao.intValue() == 10) // director nacional de seguranca
+ {
+ sRet = "acesso";
+ }
+
+ u.setCodigo_permissao(permissao);
+ getSessionBean1().setCurrentUser( u );
+ getSessionBean1().setLoggedIn(true);
+ initializeClock();
+ initializeDropDownOptions();
+
+ // só para testes. retirar depois :
+ ///getSessionBean1().setModoEdicaoUtilizador("new");
+ ///sRet = "create_user";
+ }
+ catch(Exception e1)
+ {
+ e1.printStackTrace();
+ getSessionBean1().setMsg("Não tem permissão para entrar na aplicação !");
+ }
+ }
+
+ }
+ else
+ {
+ getSessionBean1().setMsg("Utilizador inválido ! ");
+ }
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ getSessionBean1().setMsg("Utilizador inválido ! ");
+ }
+ }
+ else
+ {
+ getSessionBean1().setMsg("Falta palavra-chave !");
+ }
+ }
+ else
+ {
+ getSessionBean1().setMsg("Falta palavra-chave !");
+ }
+ }
+ else
+ {
+ getSessionBean1().setMsg("Falta utilizador !");
+ }
+ }
+ else
+ {
+ getSessionBean1().setMsg("Falta utilizador !");
+ }
+ return sRet;
+ }
+
+ public String lnkPassRecovery_action() {
+ // TODO: Replace with your code
+
+ return "recuperar_password";
+ }
+
+ private void connect()
+ {
+ db.Db db = new db.Db();
+ try
+ {
+ Connection connection = db.connect();
+ }
+ catch(Exception ex)
+ {
+ getSessionBean1().setMsg("Erro na ligação à Base de Dados");
+ //***** terminate session
+ try {
+ getExternalContext().redirect("faces/Erro.jsp");
+ } catch(Exception e) {
+ // . . . handle exception . . .
+ e.printStackTrace();
+ }
+ ex.printStackTrace();
+ }
+ }
+
+ private void initializeClock()
+ {
+ com.sun.rave.web.ui.model.Option[] horasOptions = new com.sun.rave.web.ui.model.Option[25];
+ horasOptions[0] = new Option(new Integer(-1), "-");
+ int j = 0;
+ String str_j = "";
+ for(int i=1; i < 25; i++)
+ {
+ if(j < 10)
+ {
+ str_j = "0" + new Integer(j).toString();
+ }
+ else
+ {
+ str_j = new Integer(j).toString();
+ }
+ horasOptions[i] = new Option(new Integer(j), str_j);
+ j++;
+ }
+ getSessionBean1().setHorasOptions(horasOptions);
+
+ com.sun.rave.web.ui.model.Option[] minutosOptions = new com.sun.rave.web.ui.model.Option[13];
+ minutosOptions[0] = new Option(new Integer(-1), "-");
+ j = 0;
+ for(int i=1; i < 13; i++)
+ {
+ if(j < 10)
+ {
+ str_j = "0" + new Integer(j).toString();
+ }
+ else
+ {
+ str_j = new Integer(j).toString();
+ }
+ minutosOptions[i] = new Option(new Integer(j), str_j);
+ j += 5;
+ }
+ getSessionBean1().setMinutosOptions(minutosOptions);
+ }
+
+ private void initializeDropDownOptions()
+ {
+ UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
+// try
+// {
+// getSessionBean1().setTecnicosOptions(udp.getTecnicosSaudeList());
+// //drpTipo.setSelected(new Integer(0));
+// }
+// catch(Exception ex)
+// {
+// ex.printStackTrace();
+// }
+
+// try
+// {
+// getSessionBean1().setMedicosOptions(udp.getMedicosList());
+// //drpTipo.setSelected(new Integer(0));
+// }
+// catch(Exception ex)
+// {
+// ex.printStackTrace();
+// }
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ getSessionBean1().setCausasOptions(adp.getCausasList());
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ try
+ {
+ getSessionBean1().setDepartamentoOptions(adp.getDepartamentosList());
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ }
+
+ private boolean mustChangePassword(Utilizador u)
+ {
+ java.util.Date now = new java.util.Date();
+ Calendar cal = new GregorianCalendar();
+ cal.setTime(now);
+ int ano = cal.get(Calendar.YEAR);
+ int mes = cal.get(Calendar.MONTH);
+ int dia = cal.get(Calendar.DAY_OF_MONTH);
+
+ Calendar today = new GregorianCalendar(ano, mes, dia);
+ Calendar firstJan = new GregorianCalendar(ano, Calendar.JANUARY, 1);
+// Calendar firstJan = new GregorianCalendar(ano, Calendar.DECEMBER, 27);
+ Calendar firstJul = new GregorianCalendar(ano, Calendar.JULY, 1);
+
+ if(today.compareTo(firstJan) == 0 || today.compareTo(firstJul) == 0)
+ {
+ return true;
+ }
+
+ if(u.getData_password() == null)
+ {
+ return true;
+ }
+ else
+ {
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ try
+ {
+ java.util.Date dt_password = sdf.parse(u.getData_password().toString());
+ Calendar cal_dt_password = new GregorianCalendar();
+ cal_dt_password.setTime(dt_password);
+ cal_dt_password.add(GregorianCalendar.MONTH, 6);
+ if(cal.compareTo(cal_dt_password) > 0)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ }
+ return false;
+ }
+}
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Medico.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Medico.java
new file mode 100644
index 00000000..257089e6
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Medico.java
@@ -0,0 +1,53 @@
+/*
+ * Medico.java
+ *
+ * Created on October 12, 2007, 11:00 AM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package analiseacidentestrabalho;
+
+/**
+ *
+ * @author lluis
+ */
+public class Medico {
+ private Integer id;
+ private String nome;
+ private String numero_cedula;
+
+ /** Creates a new instance of Medico */
+ public Medico() {
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getNome() {
+ return nome;
+ }
+
+ public void setNome(String nome) {
+ this.nome = nome;
+ }
+
+ public String getNumero_cedula() {
+ return numero_cedula;
+ }
+
+ public void setNumero_cedula(String numero_cedula) {
+ this.numero_cedula = numero_cedula;
+ }
+
+ public String toString() {
+ return utils.Utils.unicodeToHTML(nome);
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Medida.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Medida.java
new file mode 100644
index 00000000..5fe9c763
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Medida.java
@@ -0,0 +1,49 @@
+/*
+ * Medida.java
+ *
+ * Created on October 19, 2007, 4:59 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package analiseacidentestrabalho;
+
+/**
+ *
+ * @author lluis
+ */
+public class Medida {
+ private Integer id;
+ private Integer analise_id;
+ private String medida;
+
+ /** Creates a new instance of Medida */
+ public Medida() {
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public Integer getAnalise_id() {
+ return analise_id;
+ }
+
+ public void setAnalise_id(Integer analise_id) {
+ this.analise_id = analise_id;
+ }
+
+ public String getMedida() {
+ return medida;
+ }
+
+ public void setMedida(String medida) {
+ this.medida = medida;
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/NewUser.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/NewUser.java
new file mode 100644
index 00000000..3b713ced
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/NewUser.java
@@ -0,0 +1,176 @@
+/*
+ * NewUser.java
+ *
+ * Created on December 4, 2007, 11:29 AM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package analiseacidentestrabalho;
+
+/**
+ *
+ * @author lluis
+ */
+public class NewUser {
+ private Integer tipo;
+ private String tipo_descricao;
+ private String nome;
+ private Integer estabelecimento;
+ private String estabelecimento_descricao;
+ private String login;
+ private String password;
+ private String email;
+
+ private String numero_mecanografico;
+ private Integer empresa_id;
+ private String numero_cedula;
+ private String cap;
+ private Integer funcionario_hst_id;
+ private Integer medico_id;
+ private String responsavel_loja;
+ private String gestor_geral;
+ private String activo;
+
+ /** Creates a new instance of NewUser */
+ public NewUser() {
+ }
+
+ public Integer getTipo() {
+ return tipo;
+ }
+
+ public void setTipo(Integer tipo) {
+ this.tipo = tipo;
+ }
+
+ public String getTipo_descricao() {
+ return tipo_descricao;
+ }
+
+ public void setTipo_descricao(String tipo_descricao) {
+ this.tipo_descricao = tipo_descricao;
+ }
+
+ public String getNome() {
+ return nome;
+ }
+
+ public void setNome(String nome) {
+ this.nome = nome;
+ }
+
+ public Integer getEstabelecimento() {
+ return estabelecimento;
+ }
+
+ public void setEstabelecimento(Integer estabelecimento) {
+ this.estabelecimento = estabelecimento;
+ }
+
+ public String getEstabelecimento_descricao() {
+ return estabelecimento_descricao;
+ }
+
+ public void setEstabelecimento_descricao(String estabelecimento_descricao) {
+ this.estabelecimento_descricao = estabelecimento_descricao;
+ }
+
+ public String getLogin() {
+ return login;
+ }
+
+ public void setLogin(String login) {
+ this.login = login;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public String getNumero_mecanografico() {
+ return numero_mecanografico;
+ }
+
+ public void setNumero_mecanografico(String numero_mecanografico) {
+ this.numero_mecanografico = numero_mecanografico;
+ }
+
+ public Integer getEmpresa_id() {
+ return empresa_id;
+ }
+
+ public void setEmpresa_id(Integer empresa_id) {
+ this.empresa_id = empresa_id;
+ }
+
+ public String getNumero_cedula() {
+ return numero_cedula;
+ }
+
+ public void setNumero_cedula(String numero_cedula) {
+ this.numero_cedula = numero_cedula;
+ }
+
+ public String getCap() {
+ return cap;
+ }
+
+ public void setCap(String cap) {
+ this.cap = cap;
+ }
+
+ public Integer getFuncionario_hst_id() {
+ return funcionario_hst_id;
+ }
+
+ public void setFuncionario_hst_id(Integer funcionario_hst_id) {
+ this.funcionario_hst_id = funcionario_hst_id;
+ }
+
+ public Integer getMedico_id() {
+ return medico_id;
+ }
+
+ public void setMedico_id(Integer medico_id) {
+ this.medico_id = medico_id;
+ }
+
+ public String getResponsavel_loja() {
+ return responsavel_loja;
+ }
+
+ public void setResponsavel_loja(String responsavel_loja) {
+ this.responsavel_loja = responsavel_loja;
+ }
+
+ public String getActivo() {
+ return activo;
+ }
+
+ public void setActivo(String activo) {
+ this.activo = activo;
+ }
+
+ public String getGestor_geral() {
+ return gestor_geral;
+ }
+
+ public void setGestor_geral(String gestor_geral) {
+ this.gestor_geral = gestor_geral;
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/NovoUtilizador.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/NovoUtilizador.java
new file mode 100644
index 00000000..310b1a75
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/NovoUtilizador.java
@@ -0,0 +1,2026 @@
+/*
+ * NovoUtilizador.java
+ *
+ * Created on December 3, 2007, 2:30 PM
+ * Copyright lluis
+ */
+package analiseacidentestrabalho;
+
+import com.sun.data.provider.RowKey;
+import com.sun.rave.web.ui.appbase.AbstractPageBean;
+import com.sun.rave.web.ui.component.Body;
+import com.sun.rave.web.ui.component.Button;
+import com.sun.rave.web.ui.component.Checkbox;
+import com.sun.rave.web.ui.component.DropDown;
+import com.sun.rave.web.ui.component.Form;
+import com.sun.rave.web.ui.component.Head;
+import com.sun.rave.web.ui.component.HiddenField;
+import com.sun.rave.web.ui.component.Html;
+import com.sun.rave.web.ui.component.Hyperlink;
+import com.sun.rave.web.ui.component.ImageComponent;
+import com.sun.rave.web.ui.component.Link;
+import com.sun.rave.web.ui.component.Page;
+import com.sun.rave.web.ui.component.PanelGroup;
+import com.sun.rave.web.ui.component.RadioButton;
+import com.sun.rave.web.ui.component.StaticText;
+import com.sun.rave.web.ui.component.Table;
+import com.sun.rave.web.ui.component.TableColumn;
+import com.sun.rave.web.ui.component.TableRowGroup;
+import com.sun.rave.web.ui.component.TextField;
+import db.AnalisesDataProvider;
+import db.TrabalhadoresListDataProvider;
+import global.Global;
+import java.util.ArrayList;
+import javax.faces.FacesException;
+import javax.faces.component.html.HtmlPanelGrid;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ValueChangeEvent;
+import javax.servlet.http.HttpServletRequest;
+import utils.Utils;
+
+/**
+ * Page bean that corresponds to a similarly named JSP page. This
+ * class contains component definitions (and initialization code) for
+ * all components that you have defined on this page, as well as
+ * lifecycle methods and event handlers where you may add behavior
+ * to respond to incoming events.
+ */
+public class NovoUtilizador extends AbstractPageBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+
+ private Page page1 = new Page();
+
+ public Page getPage1() {
+ return page1;
+ }
+
+ public void setPage1(Page p) {
+ this.page1 = p;
+ }
+
+ private Html html1 = new Html();
+
+ public Html getHtml1() {
+ return html1;
+ }
+
+ public void setHtml1(Html h) {
+ this.html1 = h;
+ }
+
+ private Head head1 = new Head();
+
+ public Head getHead1() {
+ return head1;
+ }
+
+ public void setHead1(Head h) {
+ this.head1 = h;
+ }
+
+ private Link link1 = new Link();
+
+ public Link getLink1() {
+ return link1;
+ }
+
+ public void setLink1(Link l) {
+ this.link1 = l;
+ }
+
+ private Body body1 = new Body();
+
+ public Body getBody1() {
+ return body1;
+ }
+
+ public void setBody1(Body b) {
+ this.body1 = b;
+ }
+
+ private Form form1 = new Form();
+
+ public Form getForm1() {
+ return form1;
+ }
+
+ public void setForm1(Form f) {
+ this.form1 = f;
+ }
+
+ private HtmlPanelGrid gridBase1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridBase1() {
+ return gridBase1;
+ }
+
+ public void setGridBase1(HtmlPanelGrid hpg) {
+ this.gridBase1 = hpg;
+ }
+
+ private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLayout1() {
+ return gridLayout1;
+ }
+
+ public void setGridLayout1(HtmlPanelGrid hpg) {
+ this.gridLayout1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel1() {
+ return gridPanel1;
+ }
+
+ public void setGridPanel1(HtmlPanelGrid hpg) {
+ this.gridPanel1 = hpg;
+ }
+
+ private PanelGroup groupPanel1 = new PanelGroup();
+
+ public PanelGroup getGroupPanel1() {
+ return groupPanel1;
+ }
+
+ public void setGroupPanel1(PanelGroup pg) {
+ this.groupPanel1 = pg;
+ }
+
+ private ImageComponent image1 = new ImageComponent();
+
+ public ImageComponent getImage1() {
+ return image1;
+ }
+
+ public void setImage1(ImageComponent ic) {
+ this.image1 = ic;
+ }
+
+ private ImageComponent image2 = new ImageComponent();
+
+ public ImageComponent getImage2() {
+ return image2;
+ }
+
+ public void setImage2(ImageComponent ic) {
+ this.image2 = ic;
+ }
+
+ private HtmlPanelGrid gridMsg1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridMsg1() {
+ return gridMsg1;
+ }
+
+ public void setGridMsg1(HtmlPanelGrid hpg) {
+ this.gridMsg1 = hpg;
+ }
+
+ private StaticText txtMsg = new StaticText();
+
+ public StaticText getTxtMsg() {
+ return txtMsg;
+ }
+
+ public void setTxtMsg(StaticText st) {
+ this.txtMsg = st;
+ }
+
+ private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel2() {
+ return gridPanel2;
+ }
+
+ public void setGridPanel2(HtmlPanelGrid hpg) {
+ this.gridPanel2 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel3() {
+ return gridPanel3;
+ }
+
+ public void setGridPanel3(HtmlPanelGrid hpg) {
+ this.gridPanel3 = hpg;
+ }
+
+ private PanelGroup groupPanel3 = new PanelGroup();
+
+ public PanelGroup getGroupPanel3() {
+ return groupPanel3;
+ }
+
+ public void setGroupPanel3(PanelGroup pg) {
+ this.groupPanel3 = pg;
+ }
+
+ private StaticText staticText3 = new StaticText();
+
+ public StaticText getStaticText3() {
+ return staticText3;
+ }
+
+ public void setStaticText3(StaticText st) {
+ this.staticText3 = st;
+ }
+
+ private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel6() {
+ return gridPanel6;
+ }
+
+ public void setGridPanel6(HtmlPanelGrid hpg) {
+ this.gridPanel6 = hpg;
+ }
+
+ private PanelGroup groupPanel4 = new PanelGroup();
+
+ public PanelGroup getGroupPanel4() {
+ return groupPanel4;
+ }
+
+ public void setGroupPanel4(PanelGroup pg) {
+ this.groupPanel4 = pg;
+ }
+
+ private StaticText staticText10 = new StaticText();
+
+ public StaticText getStaticText10() {
+ return staticText10;
+ }
+
+ public void setStaticText10(StaticText st) {
+ this.staticText10 = st;
+ }
+
+ private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel7() {
+ return gridPanel7;
+ }
+
+ public void setGridPanel7(HtmlPanelGrid hpg) {
+ this.gridPanel7 = hpg;
+ }
+
+ private Button butCancelar = new Button();
+
+ public Button getButCancelar() {
+ return butCancelar;
+ }
+
+ public void setButCancelar(Button b) {
+ this.butCancelar = b;
+ }
+
+ private PanelGroup groupPanel5 = new PanelGroup();
+
+ public PanelGroup getGroupPanel5() {
+ return groupPanel5;
+ }
+
+ public void setGroupPanel5(PanelGroup pg) {
+ this.groupPanel5 = pg;
+ }
+
+ private Button butContinuar = new Button();
+
+ public Button getButContinuar() {
+ return butContinuar;
+ }
+
+ public void setButContinuar(Button b) {
+ this.butContinuar = b;
+ }
+
+ private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel4() {
+ return gridPanel4;
+ }
+
+ public void setGridPanel4(HtmlPanelGrid hpg) {
+ this.gridPanel4 = hpg;
+ }
+
+ private HtmlPanelGrid gridCategoria = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridCategoria() {
+ return gridCategoria;
+ }
+
+ public void setGridCategoria(HtmlPanelGrid hpg) {
+ this.gridCategoria = hpg;
+ }
+
+ private HtmlPanelGrid gridUtilizador = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridUtilizador() {
+ return gridUtilizador;
+ }
+
+ public void setGridUtilizador(HtmlPanelGrid hpg) {
+ this.gridUtilizador = hpg;
+ }
+
+ private PanelGroup pgCatDirRh = new PanelGroup();
+
+ public PanelGroup getPgCatDirRh() {
+ return pgCatDirRh;
+ }
+
+ public void setPgCatDirRh(PanelGroup pg) {
+ this.pgCatDirRh = pg;
+ }
+
+ private RadioButton rbCatDirRh = new RadioButton();
+
+ public RadioButton getRbCatDirRh() {
+ return rbCatDirRh;
+ }
+
+ public void setRbCatDirRh(RadioButton rbCatGestao) {
+ this.rbCatDirRh = rbCatGestao;
+ }
+
+ private StaticText staticText11 = new StaticText();
+
+ public StaticText getStaticText11() {
+ return staticText11;
+ }
+
+ public void setStaticText11(StaticText st) {
+ this.staticText11 = st;
+ }
+
+ private PanelGroup pgCatGestao = new PanelGroup();
+
+ public PanelGroup getPgCatGestao() {
+ return pgCatGestao;
+ }
+
+ public void setPgCatGestao(PanelGroup pg) {
+ this.pgCatGestao = pg;
+ }
+
+ private RadioButton rbCatGestao = new RadioButton();
+
+ public RadioButton getRbCatGestao() {
+ return rbCatGestao;
+ }
+
+ public void setRbCatGestao(RadioButton rbCatGestao) {
+ this.rbCatGestao = rbCatGestao;
+ }
+
+ private StaticText staticText12 = new StaticText();
+
+ public StaticText getStaticText12() {
+ return staticText12;
+ }
+
+ public void setStaticText12(StaticText st) {
+ this.staticText12 = st;
+ }
+
+ private PanelGroup pgCatGestaoAd = new PanelGroup();
+
+ public PanelGroup getPgCatGestaoAd() {
+ return pgCatGestaoAd;
+ }
+
+ public void setPgCatGestaoAd(PanelGroup pg) {
+ this.pgCatGestaoAd = pg;
+ }
+
+ private StaticText staticText13 = new StaticText();
+
+ public StaticText getStaticText13() {
+ return staticText13;
+ }
+
+ public void setStaticText13(StaticText st) {
+ this.staticText13 = st;
+ }
+
+ private Checkbox chkGestaoGeral = new Checkbox();
+
+ public Checkbox getChkGestaoGeral() {
+ return chkGestaoGeral;
+ }
+
+ public void setChkGestaoGeral(Checkbox c) {
+ this.chkGestaoGeral = c;
+ }
+
+ private PanelGroup pgCatHs = new PanelGroup();
+
+ public PanelGroup getPgCatHs() {
+ return pgCatHs;
+ }
+
+ public void setPgCatHs(PanelGroup pg) {
+ this.pgCatHs = pg;
+ }
+
+ private RadioButton rbCatHs = new RadioButton();
+
+ public RadioButton getRbCatHs() {
+ return rbCatHs;
+ }
+
+ public void setRbCatHs(RadioButton rbCatGestao) {
+ this.rbCatHs = rbCatGestao;
+ }
+
+ private StaticText staticText14 = new StaticText();
+
+ public StaticText getStaticText14() {
+ return staticText14;
+ }
+
+ public void setStaticText14(StaticText st) {
+ this.staticText14 = st;
+ }
+
+ private PanelGroup pgCatMed = new PanelGroup();
+
+ public PanelGroup getPgCatMed() {
+ return pgCatMed;
+ }
+
+ public void setPgCatMed(PanelGroup pg) {
+ this.pgCatMed = pg;
+ }
+
+ private RadioButton rbCatMed = new RadioButton();
+
+ public RadioButton getRbCatMed() {
+ return rbCatMed;
+ }
+
+ public void setRbCatMed(RadioButton rbCatGestao) {
+ this.rbCatMed = rbCatGestao;
+ }
+
+ private StaticText staticText15 = new StaticText();
+
+ public StaticText getStaticText15() {
+ return staticText15;
+ }
+
+ public void setStaticText15(StaticText st) {
+ this.staticText15 = st;
+ }
+
+ private PanelGroup pgCatRh = new PanelGroup();
+
+ public PanelGroup getPgCatRh() {
+ return pgCatRh;
+ }
+
+ public void setPgCatRh(PanelGroup pg) {
+ this.pgCatRh = pg;
+ }
+
+ private RadioButton rbCatRh = new RadioButton();
+
+ public RadioButton getRbCatRh() {
+ return rbCatRh;
+ }
+
+ public void setRbCatRh(RadioButton rbCatGestao) {
+ this.rbCatRh = rbCatGestao;
+ }
+
+ private StaticText staticText16 = new StaticText();
+
+ public StaticText getStaticText16() {
+ return staticText16;
+ }
+
+ public void setStaticText16(StaticText st) {
+ this.staticText16 = st;
+ }
+
+ private PanelGroup pgCatRhAd = new PanelGroup();
+
+ public PanelGroup getPgCatRhAd() {
+ return pgCatRhAd;
+ }
+
+ public void setPgCatRhAd(PanelGroup pg) {
+ this.pgCatRhAd = pg;
+ }
+
+ private StaticText staticText17 = new StaticText();
+
+ public StaticText getStaticText17() {
+ return staticText17;
+ }
+
+ public void setStaticText17(StaticText st) {
+ this.staticText17 = st;
+ }
+
+ private Checkbox chkRhResp = new Checkbox();
+
+ public Checkbox getChkRhResp() {
+ return chkRhResp;
+ }
+
+ public void setChkRhResp(Checkbox c) {
+ this.chkRhResp = c;
+ }
+
+ private PanelGroup pgCatSeg = new PanelGroup();
+
+ public PanelGroup getPgCatSeg() {
+ return pgCatSeg;
+ }
+
+ public void setPgCatSeg(PanelGroup pg) {
+ this.pgCatSeg = pg;
+ }
+
+ private RadioButton rbCatSeg = new RadioButton();
+
+ public RadioButton getRbCatSeg() {
+ return rbCatSeg;
+ }
+
+ public void setRbCatSeg(RadioButton rbCatGestao) {
+ this.rbCatSeg = rbCatGestao;
+ }
+
+ private StaticText staticText18 = new StaticText();
+
+ public StaticText getStaticText18() {
+ return staticText18;
+ }
+
+ public void setStaticText18(StaticText st) {
+ this.staticText18 = st;
+ }
+
+ private PanelGroup pgCatSegAd = new PanelGroup();
+
+ public PanelGroup getPgCatSegAd() {
+ return pgCatSegAd;
+ }
+
+ public void setPgCatSegAd(PanelGroup pg) {
+ this.pgCatSegAd = pg;
+ }
+
+ private StaticText staticText19 = new StaticText();
+
+ public StaticText getStaticText19() {
+ return staticText19;
+ }
+
+ public void setStaticText19(StaticText st) {
+ this.staticText19 = st;
+ }
+
+ private Checkbox chkSegResp = new Checkbox();
+
+ public Checkbox getChkSegResp() {
+ return chkSegResp;
+ }
+
+ public void setChkSegResp(Checkbox c) {
+ this.chkSegResp = c;
+ }
+
+ private HtmlPanelGrid gridTrabalhadores = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridTrabalhadores() {
+ return gridTrabalhadores;
+ }
+
+ public void setGridTrabalhadores(HtmlPanelGrid hpg) {
+ this.gridTrabalhadores = hpg;
+ }
+
+ private StaticText txtSearchMsg1 = new StaticText();
+
+ public StaticText getTxtSearchMsg1() {
+ return txtSearchMsg1;
+ }
+
+ public void setTxtSearchMsg1(StaticText st) {
+ this.txtSearchMsg1 = st;
+ }
+
+ private PanelGroup groupPanel6 = new PanelGroup();
+
+ public PanelGroup getGroupPanel6() {
+ return groupPanel6;
+ }
+
+ public void setGroupPanel6(PanelGroup pg) {
+ this.groupPanel6 = pg;
+ }
+
+ private StaticText staticText4 = new StaticText();
+
+ public StaticText getStaticText4() {
+ return staticText4;
+ }
+
+ public void setStaticText4(StaticText st) {
+ this.staticText4 = st;
+ }
+
+ private TextField txtNrMecanografico = new TextField();
+
+ public TextField getTxtNrMecanografico() {
+ return txtNrMecanografico;
+ }
+
+ public void setTxtNrMecanografico(TextField tf) {
+ this.txtNrMecanografico = tf;
+ }
+
+ private StaticText staticText5 = new StaticText();
+
+ public StaticText getStaticText5() {
+ return staticText5;
+ }
+
+ public void setStaticText5(StaticText st) {
+ this.staticText5 = st;
+ }
+
+ private TextField txtNomeTrabalhador = new TextField();
+
+ public TextField getTxtNomeTrabalhador() {
+ return txtNomeTrabalhador;
+ }
+
+ public void setTxtNomeTrabalhador(TextField tf) {
+ this.txtNomeTrabalhador = tf;
+ }
+
+ private StaticText staticText6 = new StaticText();
+
+ public StaticText getStaticText6() {
+ return staticText6;
+ }
+
+ public void setStaticText6(StaticText st) {
+ this.staticText6 = st;
+ }
+
+ private Button butProcurarTrab = new Button();
+
+ public Button getButProcurarTrab() {
+ return butProcurarTrab;
+ }
+
+ public void setButProcurarTrab(Button b) {
+ this.butProcurarTrab = b;
+ }
+
+ private Table tblTrabalhadores = new Table();
+
+ public Table getTblTrabalhadores() {
+ return tblTrabalhadores;
+ }
+
+ public void setTblTrabalhadores(Table t) {
+ this.tblTrabalhadores = t;
+ }
+
+ private TableRowGroup tableRowGroup1 = new TableRowGroup();
+
+ public TableRowGroup getTableRowGroup1() {
+ return tableRowGroup1;
+ }
+
+ public void setTableRowGroup1(TableRowGroup trg) {
+ this.tableRowGroup1 = trg;
+ }
+
+ private TableColumn tableColumn1 = new TableColumn();
+
+ public TableColumn getTableColumn1() {
+ return tableColumn1;
+ }
+
+ public void setTableColumn1(TableColumn tc) {
+ this.tableColumn1 = tc;
+ }
+
+ private Hyperlink lnkPOR = new Hyperlink();
+
+ public Hyperlink getLnkPOR() {
+ return lnkPOR;
+ }
+
+ public void setLnkPOR(Hyperlink h) {
+ this.lnkPOR = h;
+ }
+
+ private TableColumn tableColumn2 = new TableColumn();
+
+ public TableColumn getTableColumn2() {
+ return tableColumn2;
+ }
+
+ public void setTableColumn2(TableColumn tc) {
+ this.tableColumn2 = tc;
+ }
+
+ private Hyperlink lnkNomeTrabalhador = new Hyperlink();
+
+ public Hyperlink getLnkNomeTrabalhador() {
+ return lnkNomeTrabalhador;
+ }
+
+ public void setLnkNomeTrabalhador(Hyperlink h) {
+ this.lnkNomeTrabalhador = h;
+ }
+
+ private TableColumn tableColumn3 = new TableColumn();
+
+ public TableColumn getTableColumn3() {
+ return tableColumn3;
+ }
+
+ public void setTableColumn3(TableColumn tc) {
+ this.tableColumn3 = tc;
+ }
+
+ private Hyperlink lnkEstabelecimentoTrabalhador = new Hyperlink();
+
+ public Hyperlink getLnkEstabelecimentoTrabalhador() {
+ return lnkEstabelecimentoTrabalhador;
+ }
+
+ public void setLnkEstabelecimentoTrabalhador(Hyperlink h) {
+ this.lnkEstabelecimentoTrabalhador = h;
+ }
+
+ private StaticText staticText7 = new StaticText();
+
+ public StaticText getStaticText7() {
+ return staticText7;
+ }
+
+ public void setStaticText7(StaticText st) {
+ this.staticText7 = st;
+ }
+
+ private StaticText stOutro = new StaticText();
+
+ public StaticText getStOutro() {
+ return stOutro;
+ }
+
+ public void setStOutro(StaticText st) {
+ this.stOutro = st;
+ }
+
+ private HtmlPanelGrid gridOutro = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridOutro() {
+ return gridOutro;
+ }
+
+ public void setGridOutro(HtmlPanelGrid hpg) {
+ this.gridOutro = hpg;
+ }
+
+ private StaticText staticText9 = new StaticText();
+
+ public StaticText getStaticText9() {
+ return staticText9;
+ }
+
+ public void setStaticText9(StaticText st) {
+ this.staticText9 = st;
+ }
+
+ private TextField txtNomeOutro = new TextField();
+
+ public TextField getTxtNomeOutro() {
+ return txtNomeOutro;
+ }
+
+ public void setTxtNomeOutro(TextField tf) {
+ this.txtNomeOutro = tf;
+ }
+
+ private StaticText staticText20 = new StaticText();
+
+ public StaticText getStaticText20() {
+ return staticText20;
+ }
+
+ public void setStaticText20(StaticText st) {
+ this.staticText20 = st;
+ }
+
+ private DropDown drpEstabelecimentoOutro = new DropDown();
+
+ public DropDown getDrpEstabelecimentoOutro() {
+ return drpEstabelecimentoOutro;
+ }
+
+ public void setDrpEstabelecimentoOutro(DropDown dd) {
+ this.drpEstabelecimentoOutro = dd;
+ }
+
+ private HtmlPanelGrid gridTecnicosHs = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridTecnicosHs() {
+ return gridTecnicosHs;
+ }
+
+ public void setGridTecnicosHs(HtmlPanelGrid hpg) {
+ this.gridTecnicosHs = hpg;
+ }
+
+ private StaticText staticText21 = new StaticText();
+
+ public StaticText getStaticText21() {
+ return staticText21;
+ }
+
+ public void setStaticText21(StaticText st) {
+ this.staticText21 = st;
+ }
+
+ private DropDown drpNomeHs = new DropDown();
+
+ public DropDown getDrpNomeHs() {
+ return drpNomeHs;
+ }
+
+ public void setDrpNomeHs(DropDown dd) {
+ this.drpNomeHs = dd;
+ }
+
+ private StaticText staticText22 = new StaticText();
+
+ public StaticText getStaticText22() {
+ return staticText22;
+ }
+
+ public void setStaticText22(StaticText st) {
+ this.staticText22 = st;
+ }
+
+ private TextField txtCap = new TextField();
+
+ public TextField getTxtCap() {
+ return txtCap;
+ }
+
+ public void setTxtCap(TextField tf) {
+ this.txtCap = tf;
+ }
+
+ private HtmlPanelGrid gridMedicos = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridMedicos() {
+ return gridMedicos;
+ }
+
+ public void setGridMedicos(HtmlPanelGrid hpg) {
+ this.gridMedicos = hpg;
+ }
+
+ private StaticText staticText23 = new StaticText();
+
+ public StaticText getStaticText23() {
+ return staticText23;
+ }
+
+ public void setStaticText23(StaticText st) {
+ this.staticText23 = st;
+ }
+
+ private DropDown drpNomeMed = new DropDown();
+
+ public DropDown getDrpNomeMed() {
+ return drpNomeMed;
+ }
+
+ public void setDrpNomeMed(DropDown dd) {
+ this.drpNomeMed = dd;
+ }
+
+ private StaticText staticText24 = new StaticText();
+
+ public StaticText getStaticText24() {
+ return staticText24;
+ }
+
+ public void setStaticText24(StaticText st) {
+ this.staticText24 = st;
+ }
+
+ private DropDown drpEstabelecimentoMed = new DropDown();
+
+ public DropDown getDrpEstabelecimentoMed() {
+ return drpEstabelecimentoMed;
+ }
+
+ public void setDrpEstabelecimentoMed(DropDown dd) {
+ this.drpEstabelecimentoMed = dd;
+ }
+
+ //
+ boolean isPostback = false;
+
+ private HiddenField hidHighlight = new HiddenField();
+
+ public HiddenField getHidHighlight() {
+ return hidHighlight;
+ }
+
+ public void setHidHighlight(HiddenField hf) {
+ this.hidHighlight = hf;
+ }
+
+ private HiddenField hidClear = new HiddenField();
+
+ public HiddenField getHidClear() {
+ return hidClear;
+ }
+
+ public void setHidClear(HiddenField hf) {
+ this.hidClear = hf;
+ }
+
+ private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel8() {
+ return gridPanel8;
+ }
+
+ public void setGridPanel8(HtmlPanelGrid hpg) {
+ this.gridPanel8 = hpg;
+ }
+
+ private PanelGroup groupPanel7 = new PanelGroup();
+
+ public PanelGroup getGroupPanel7() {
+ return groupPanel7;
+ }
+
+ public void setGroupPanel7(PanelGroup pg) {
+ this.groupPanel7 = pg;
+ }
+
+ private StaticText staticText25 = new StaticText();
+
+ public StaticText getStaticText25() {
+ return staticText25;
+ }
+
+ public void setStaticText25(StaticText st) {
+ this.staticText25 = st;
+ }
+
+ private ImageComponent image3 = new ImageComponent();
+
+ public ImageComponent getImage3() {
+ return image3;
+ }
+
+ public void setImage3(ImageComponent ic) {
+ this.image3 = ic;
+ }
+
+ private StaticText staticText26 = new StaticText();
+
+ public StaticText getStaticText26() {
+ return staticText26;
+ }
+
+ public void setStaticText26(StaticText st) {
+ this.staticText26 = st;
+ }
+ private RadioButton rbCatDirNacSeg = new RadioButton();
+
+ public RadioButton getRbCatDirNacSeg() {
+ return rbCatDirNacSeg;
+ }
+
+ public void setRbCatDirNacSeg(RadioButton rb) {
+ this.rbCatDirNacSeg = rb;
+ }
+ private RadioButton rbCatDirLoja = new RadioButton();
+
+ public RadioButton getRbCatDirLoja() {
+ return rbCatDirLoja;
+ }
+
+ public void setRbCatDirLoja(RadioButton rb) {
+ this.rbCatDirLoja = rb;
+ }
+ private StaticText lblUser = new StaticText();
+
+ public StaticText getLblUser() {
+ return lblUser;
+ }
+
+ public void setLblUser(StaticText st) {
+ this.lblUser = st;
+ }
+ /**
+ * Construct a new Page bean instance.
+ */
+ public NovoUtilizador() {
+ }
+
+ /**
+ * Callback method that is called whenever a page is navigated to,
+ * either directly via a URL, or indirectly via page navigation.
+ * Customize this method to acquire resources that will be needed
+ * for event handlers and lifecycle methods, whether or not this
+ * page is performing post back processing.
+ *
+ * Note that, if the current request is a postback, the property
+ * values of the components do not represent any
+ * values submitted with this request. Instead, they represent the
+ * property values that were saved for this view when it was rendered.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("NovoUtilizador Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+ if (!getSessionBean1().isLoggedIn()) {
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {
+ // . . . handle exception . . .
+ }
+ }
+ else
+ {
+ lblUser.setText( getSessionBean1().getCurrentUser().getLogin() );
+
+ HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest();
+ String referer = request.getRequestURI();
+ String pageFrom = Utils.getPageFrom(referer);
+ if(!pageFrom.matches("NovoUtilizador.jsp"))
+ {
+ isPostback = false;
+ }
+ else
+ {
+ isPostback = true;
+ }
+
+ }
+
+ }
+
+ /**
+ * Callback method that is called after the component tree has been
+ * restored, but before any event processing takes place. This method
+ * will only be called on a postback request that
+ * is processing a form submit. Customize this method to allocate
+ * resources that will be required in your event handlers.
+ */
+ public void preprocess() {
+ }
+
+ /**
+ * Callback method that is called just before rendering takes place.
+ * This method will only be called for the page that
+ * will actually be rendered (and not, for example, on a page that
+ * handled a postback and then navigated to a different page). Customize
+ * this method to allocate resources that will be required for rendering
+ * this page.
+ */
+ public void prerender() {
+ if(!isPostback)
+ {
+ getSessionBean1().setNewUser(null);
+ initializePage();
+ }
+ else
+ {
+ showPagePostback();
+ }
+
+ txtMsg.setText(getSessionBean1().getMsg());
+ getSessionBean1().setMsg("");
+
+ }
+
+ /**
+ * Callback method that is called after rendering is completed for
+ * this request, if init() was called (regardless of whether
+ * or not this was the page that was actually rendered). Customize this
+ * method to release resources acquired in the init(),
+ * preprocess(), or prerender() methods (or
+ * acquired during execution of an event handler).
+ */
+ public void destroy() {
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected RequestBean1 getRequestBean1() {
+ return (RequestBean1)getBean("RequestBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected SessionBean1 getSessionBean1() {
+ return (SessionBean1)getBean("SessionBean1");
+ }
+
+ public String lnkEditUser_action() {
+ // TODO: Replace with your code
+
+ getSessionBean1().setNavFrom("NovoUtilizador");
+ getSessionBean1().setModoEdicaoUtilizador("edit");
+ return "user";
+
+ }
+
+ public String lnkLogout_action() {
+ // TODO: Replace with your code
+
+ try
+ {
+ javax.servlet.http.HttpSession session =
+ (javax.servlet.http.HttpSession) getExternalContext().getSession(true);
+ session.invalidate();
+ }
+ catch(Exception ex){}
+
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {}
+ //return "login";
+ return null;
+
+ }
+
+ public void drpTipo_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+
+ }
+
+ public void drpNome_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+
+ }
+
+ public String butCancelar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ return "gestao_utilizadores";
+ }
+
+ public String butApagar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ return null;
+ }
+
+ public String butContinuar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+
+ if(rbCatHs.getSelected() != null)
+ {
+ if(rbCatHs.getSelected().equals(new Boolean(true)))
+ {
+ if(drpNomeHs.getSelected().equals(new Integer(0) ))
+ {
+ getSessionBean1().setMsg("Falta nome do técnico de higiena e segurança!");
+ return null;
+ }
+ else if(txtCap.getText() == null)
+ {
+ getSessionBean1().setMsg("Falta cap!");
+ return null;
+ }
+ else
+ {
+ String cap = (String) txtCap.getText();
+ if(cap.trim().length() == 0)
+ {
+ getSessionBean1().setMsg("Falta cap!");
+ return null;
+ }
+ else
+ {
+ NewUser u = new NewUser();
+ u.setTipo(new Integer(3));
+ u.setNumero_mecanografico("");
+ try
+ {
+ u.setTipo_descricao(adp.getTipoDescricao(u.getTipo()));
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ u.setFuncionario_hst_id((Integer) drpNomeHs.getSelected());
+ try
+ {
+ Integer tecnico_id = (Integer) drpNomeHs.getSelected();
+ u.setNome(Utils.unicodeToHTML(adp.getTecnicoSaudeNome(tecnico_id)));
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ u.setCap(cap);
+ u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id());
+ u.setResponsavel_loja("n");
+ u.setEstabelecimento(null);
+ getSessionBean1().setNewUser(u);
+ getSessionBean1().setModoEdicaoUtilizador("new");
+ getSessionBean1().setNavFrom("NovoUtilizador");
+ return "new_user_fields";
+ }
+ }
+ }
+ }
+ else if(rbCatMed.getSelected() != null)
+ {
+ if(rbCatMed.getSelected().equals(new Boolean(true)))
+ {
+ if(drpNomeMed.getSelected().equals(new Integer(0)))
+ {
+ getSessionBean1().setMsg("Falta nome do médico!");
+ return null;
+ }
+ else if(drpEstabelecimentoMed.getSelected().equals(new Integer(-1)))
+ {
+ getSessionBean1().setMsg("Falta estabelecimento!");
+ return null;
+ }
+ else
+ {
+ NewUser u = new NewUser();
+ u.setTipo(new Integer(5));
+ u.setNumero_mecanografico("");
+ try
+ {
+ u.setTipo_descricao(adp.getTipoDescricao(u.getTipo()));
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ u.setMedico_id((Integer) drpNomeMed.getSelected());
+ //u.setNome(drpNomeMed.getLabel());
+ Medico m = null;
+ try
+ {
+ Integer medico_id = (Integer) drpNomeMed.getSelected();
+ m = adp.getMedico(medico_id);
+ u.setNome(m.getNome());
+ u.setNumero_cedula(m.getNumero_cedula());
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id());
+ u.setEstabelecimento((Integer) drpEstabelecimentoMed.getSelected());
+ try
+ {
+ u.setEstabelecimento_descricao(adp.getEstabelecimentoNome(u.getEstabelecimento()));
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ u.setResponsavel_loja("n");
+ getSessionBean1().setNewUser(u);
+ getSessionBean1().setModoEdicaoUtilizador("new");
+ getSessionBean1().setNavFrom("NovoUtilizador");
+ return "new_user_fields";
+ }
+ }
+ }
+ else //
+ {
+ if(getSessionBean1().getNewUser() == null)
+ {
+ boolean booOutro = false;
+ NewUser u = new NewUser();
+ if(txtNomeOutro.getText() != null)
+ {
+ String nome_outro = (String) txtNomeOutro.getText();
+ if(nome_outro.trim().length() > 0)
+ {
+ u.setNome(nome_outro);
+ booOutro = true;
+ }
+ else
+ {
+ getSessionBean1().setMsg("Falta designação!");
+ return null;
+ }
+ }
+ else
+ {
+ getSessionBean1().setMsg("Falta designação!");
+ return null;
+ }
+ Integer estabelecimento_outro = (Integer) drpEstabelecimentoOutro.getSelected();
+ System.out.println("ESTABELECIMENTO OUTRO : " + estabelecimento_outro.intValue());
+ if(estabelecimento_outro.intValue() == -1)
+ {
+ getSessionBean1().setMsg("Falta estabelecimento!");
+ return null;
+ }
+ else
+ {
+ u.setEstabelecimento(estabelecimento_outro);
+ try
+ {
+ u.setEstabelecimento_descricao(adp.getEstabelecimentoNome(estabelecimento_outro));
+ booOutro = true;
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+ u = setUserTipo(u);
+ u.setNumero_mecanografico("");
+ u.setResponsavel_loja("n");
+ u.setGestor_geral("n");
+ switch(u.getTipo().intValue())
+ {
+ case 1: //seg
+ if(chkSegResp.getSelected() != null)
+ {
+ if(chkSegResp.getSelected().equals(new Boolean(true)))
+ {
+ u.setResponsavel_loja("y");
+ }
+ }
+ break;
+ case 2: //rh
+ if(chkRhResp.getSelected() != null)
+ {
+ if(chkRhResp.getSelected().equals(new Boolean(true)))
+ {
+ u.setResponsavel_loja("y");
+ }
+ }
+ break;
+ case 6: //gestor
+ if(chkGestaoGeral.getSelected() != null)
+ {
+ if(chkGestaoGeral.getSelected().equals(new Boolean(true)))
+ {
+ u.setGestor_geral("y");
+ }
+ }
+
+ break;
+ }
+ u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id());
+ if(booOutro)
+ {
+ getSessionBean1().setNewUser(u);
+ getSessionBean1().setModoEdicaoUtilizador("new");
+ getSessionBean1().setNavFrom("NovoUtilizador");
+ return "new_user_fields";
+ }
+ getSessionBean1().setNewUser(u);
+ }
+ }
+
+ if(getSessionBean1().getNewUser() == null)
+ {
+ getSessionBean1().setMsg("Tem de definir um novo utilizador !");
+ return null;
+ }
+ else
+ {
+
+ getSessionBean1().setModoEdicaoUtilizador("new");
+ getSessionBean1().setNavFrom("NovoUtilizador");
+ return "new_user_fields";
+ }
+ }
+
+
+
+ private void initializePage()
+ {
+ getSessionBean1().getTrabalhadoresListDataProvider().setList(new ArrayList());
+ int tipo = getSessionBean1().getCurrentUser().getTipo().intValue();
+ switch(tipo)
+ {
+ case 7: //Director RH
+ pgCatDirRh.setRendered(false);
+ pgCatHs.setRendered(false);
+ pgCatMed.setRendered(false);
+ break;
+ }
+
+ //gridUtilizador.setRendered(false);
+ gridTrabalhadores.setStyleClass("hidden");
+ tblTrabalhadores.setStyleClass("hidden");
+ gridTecnicosHs.setStyleClass("hidden");
+ gridMedicos.setStyleClass("hidden");
+
+ rbCatDirRh.setSelected(null);
+ rbCatGestao.setSelected(null);
+ rbCatHs.setSelected(null);
+ rbCatMed.setSelected(null);
+ rbCatRh.setSelected(null);
+ rbCatSeg.setSelected(null);
+ rbCatDirNacSeg.setSelected(null);
+ rbCatDirLoja.setSelected(null);
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+
+ try
+ {
+ com.sun.rave.web.ui.model.Option[] listMedOptions = adp.getEstabelecimentosList( new Integer(Global.AUCHAN), new Boolean(false));
+ listMedOptions[0].setLabel("-Seleccionar-");
+ com.sun.rave.web.ui.model.Option[] listOutroOptions = adp.getEstabelecimentosList( getSessionBean1().getCurrentUser().getEmpresa_id(), new Boolean(false));
+ listOutroOptions[0].setLabel("-Seleccionar-");
+
+
+ getSessionBean1().setEstabelecimentosMedOptions(listMedOptions);
+ getSessionBean1().setEstabelecimentosOutroOptions( listOutroOptions );
+ drpEstabelecimentoOutro.setSelected(new Integer(-1));
+ drpEstabelecimentoMed.setSelected(new Integer(-1));
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ try
+ {
+ getSessionBean1().setTecnicosOptions(adp.getTecnicosSaudeList());
+ drpNomeHs.setSelected(new Integer(0));
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ try
+ {
+ getSessionBean1().setMedicosOptions(adp.getMedicosList());
+ drpNomeMed.setSelected(new Integer(0));
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+
+ public String butProcurarTrab_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+ boolean booNrOk = false;
+ boolean booNomeOk = false;
+ String nr_mecano = null;
+ String nome = null;
+ if(txtNrMecanografico.getText() != null)
+ {
+ nr_mecano = (String) txtNrMecanografico.getText();
+ if(nr_mecano.trim().length() > 0)
+ {
+ booNrOk = true;
+ }
+ else
+ {
+ nr_mecano = null;
+ }
+ }
+
+ if(txtNomeTrabalhador.getText() != null)
+ {
+ nome = (String) txtNomeTrabalhador.getText();
+
+ if(nome.trim().length() > 0)
+ {
+ booNomeOk = true;
+ }
+ else
+ {
+ nome = null;
+ }
+ }
+
+ if(! booNrOk && !booNomeOk)
+ {
+ getSessionBean1().setMsg("Tem de preencher Numero Mecanográfico ou Nome");
+ return null;
+ }
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ Trabalhador t = null;
+ if(nome != null)
+ {
+ nome = utils.Utils.textToUnicode( nome.toUpperCase());
+ }
+ try
+ {
+ ArrayList list = adp.searchTrabalhador(getSessionBean1().getCurrentUser().getEmpresa_id(), nr_mecano, nome );
+// if(list.size() == 1)
+// {
+// t = (Trabalhador) list.get(0);
+// NewUser u = new NewUser();
+//
+// u.setNome(t.getNome());
+// u.setNumero_mecanografico(t.getNumero_mecanografico());
+// u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id());
+// u.setEstabelecimento(t.getEstabelecimento_id());
+// u.setEstabelecimento_descricao(t.getEstabelecimento());
+// u = setUserTipo(u);
+// u.setResponsavel_loja("n");
+// if(u.getTipo().intValue() == 1) //seg
+// {
+// if(chkSegResp.getSelected() != null)
+// {
+// if(chkSegResp.getSelected().equals(new Boolean(true)))
+// {
+// u.setResponsavel_loja("y");
+// }
+// }
+// }
+// else if(u.getTipo().intValue() == 2) //rh
+// {
+// if(chkRhResp.getSelected() != null)
+// {
+// if(chkRhResp.getSelected().equals(new Boolean(true)))
+// {
+// u.setResponsavel_loja("y");
+// }
+// }
+// }
+// getSessionBean1().setNewUser(u);
+// }
+// else
+// {
+ //tblTrabalhadores.setRendered(true);
+ gridTrabalhadores.setStyleClass("");
+ tblTrabalhadores.setStyleClass("");
+ getSessionBean1().getTrabalhadoresListDataProvider().setList(list);
+// }
+ }
+ catch(Exception ex)
+ {
+ getSessionBean1().setMsg("Trabalhador inexistente !");
+ getSessionBean1().getTrabalhadoresListDataProvider().setList(new ArrayList());
+ tblTrabalhadores.setStyleClass("hidden");
+ ex.printStackTrace();
+ }
+ return null;
+ }
+
+ public String lnkPOR_action() {
+ // TODO: Replace with your code
+ Trabalhador t = getTrabalhadorRowData();
+ NewUser u = new NewUser();
+ u = setUserTipo(u);
+ u.setNome(t.getNome());
+ u.setNumero_mecanografico(t.getNumero_mecanografico());
+ u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id());
+ u.setEstabelecimento(t.getEstabelecimento_id());
+ u.setEstabelecimento_descricao(t.getEstabelecimento());
+ u.setResponsavel_loja("n");
+ u.setGestor_geral("n");
+ if(u.getTipo().intValue() == 1) //seg
+ {
+ if(chkSegResp.getSelected() != null)
+ {
+ if(chkSegResp.getSelected().equals(new Boolean(true)))
+ {
+ u.setResponsavel_loja("y");
+ }
+ }
+ }
+ else if(u.getTipo().intValue() == 2) //rh
+ {
+ if(chkRhResp.getSelected() != null)
+ {
+ if(chkRhResp.getSelected().equals(new Boolean(true)))
+ {
+ u.setResponsavel_loja("y");
+ }
+ }
+ }
+ else if(u.getTipo().intValue() == 6) //gestor
+ {
+ if(chkGestaoGeral.getSelected() != null)
+ {
+ if(chkGestaoGeral.getSelected().equals(new Boolean(true)))
+ {
+ u.setGestor_geral("y");
+ }
+ }
+
+ }
+
+
+ getSessionBean1().setNewUser(u);
+ getSessionBean1().setModoEdicaoUtilizador("new");
+ getSessionBean1().setNavFrom("NovoUtilizador");
+
+ return "new_user_fields";
+ }
+
+ public String lnkNomeTrabalhador_action() {
+ // TODO: Replace with your code
+ Trabalhador t = getTrabalhadorRowData();
+ NewUser u = new NewUser();
+ u = setUserTipo(u);
+ u.setNome(t.getNome());
+ u.setNumero_mecanografico(t.getNumero_mecanografico());
+ u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id());
+ u.setEstabelecimento(t.getEstabelecimento_id());
+ u.setEstabelecimento_descricao(t.getEstabelecimento());
+ u.setResponsavel_loja("n");
+ u.setGestor_geral("n");
+ if(u.getTipo().intValue() == 1) //seg
+ {
+ if(chkSegResp.getSelected() != null)
+ {
+ if(chkSegResp.getSelected().equals(new Boolean(true)))
+ {
+ u.setResponsavel_loja("y");
+ }
+ }
+ }
+ else if(u.getTipo().intValue() == 2) //rh
+ {
+ if(chkRhResp.getSelected() != null)
+ {
+ if(chkRhResp.getSelected().equals(new Boolean(true)))
+ {
+ u.setResponsavel_loja("y");
+ }
+ }
+ }
+ else if(u.getTipo().intValue() == 6) //gestor
+ {
+ if(chkGestaoGeral.getSelected() != null)
+ {
+ if(chkGestaoGeral.getSelected().equals(new Boolean(true)))
+ {
+ u.setGestor_geral("y");
+ }
+ }
+
+ }
+
+ getSessionBean1().setNewUser(u);
+ getSessionBean1().setModoEdicaoUtilizador("new");
+ getSessionBean1().setNavFrom("NovoUtilizador");
+
+ return "new_user_fields";
+ }
+
+ public String lnkEstabelecimentoTrabalhador_action() {
+ // TODO: Replace with your code
+ Trabalhador t = getTrabalhadorRowData();
+ NewUser u = new NewUser();
+ u = setUserTipo(u);
+ u.setNome(t.getNome());
+ u.setNumero_mecanografico(t.getNumero_mecanografico());
+ u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id());
+ u.setEstabelecimento(t.getEstabelecimento_id());
+ u.setEstabelecimento_descricao(t.getEstabelecimento());
+ u.setResponsavel_loja("n");
+ u.setGestor_geral("n");
+ if(u.getTipo().intValue() == 1) //seg
+ {
+ if(chkSegResp.getSelected() != null)
+ {
+ if(chkSegResp.getSelected().equals(new Boolean(true)))
+ {
+ u.setResponsavel_loja("y");
+ }
+ }
+ }
+ else if(u.getTipo().intValue() == 2) //rh
+ {
+ if(chkRhResp.getSelected() != null)
+ {
+ if(chkRhResp.getSelected().equals(new Boolean(true)))
+ {
+ u.setResponsavel_loja("y");
+ }
+ }
+ }
+ else if(u.getTipo().intValue() == 6) //gestor
+ {
+ if(chkGestaoGeral.getSelected() != null)
+ {
+ if(chkGestaoGeral.getSelected().equals(new Boolean(true)))
+ {
+ u.setGestor_geral("y");
+ }
+ }
+
+ }
+
+ getSessionBean1().setNewUser(u);
+ getSessionBean1().setModoEdicaoUtilizador("new");
+ getSessionBean1().setNavFrom("NovoUtilizador");
+
+ return "new_user_fields";
+ }
+
+ private Trabalhador getTrabalhadorRowData()
+ {
+ RowKey rk = tableRowGroup1.getRowKey();
+ int k = Integer.parseInt(rk.getRowId());
+ TrabalhadoresListDataProvider provider = (TrabalhadoresListDataProvider) tableRowGroup1.getSourceData();
+ ArrayList list = (ArrayList) provider.getList();
+ Trabalhador t = (Trabalhador)list.get(k);
+ hidHighlight.setValue(rk.getRowId());
+ return t;
+ }
+
+ private NewUser setUserTipo(NewUser u)
+ {
+ if(rbCatDirNacSeg.getSelected() != null)
+ {
+ if(rbCatDirNacSeg.getSelected().equals(new Boolean(true)))
+ {
+ u.setTipo(new Integer(10));
+ }
+ }
+ if(rbCatDirLoja.getSelected() != null)
+ {
+ if(rbCatDirLoja.getSelected().equals(new Boolean(true)))
+ {
+ u.setTipo(new Integer(9));
+ }
+ }
+ if(rbCatDirRh.getSelected() != null)
+ {
+ if(rbCatDirRh.getSelected().equals(new Boolean(true)))
+ {
+ u.setTipo(new Integer(7));
+ }
+ }
+ if(rbCatGestao.getSelected() != null)
+ {
+ if(rbCatGestao.getSelected().equals(new Boolean(true)))
+ {
+ u.setTipo(new Integer(6));
+ }
+ }
+ if(rbCatRh.getSelected() != null)
+ {
+ if(rbCatRh.getSelected().equals(new Boolean(true)))
+ {
+ u.setTipo(new Integer(2));
+ }
+ }
+ if(rbCatSeg.getSelected() != null)
+ {
+ if(rbCatSeg.getSelected().equals(new Boolean(true)))
+ {
+ u.setTipo(new Integer(1));
+ }
+ }
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ u.setTipo_descricao(adp.getTipoDescricao(u.getTipo()));
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ return u;
+ }
+
+ private void showPagePostback()
+ {
+ if(rbCatDirRh.getSelected() != null)
+ {
+ if(rbCatDirRh.getSelected().equals( new Boolean(true) ))
+ {
+ gridTrabalhadores.setStyleClass("");
+ return;
+ }
+ }
+
+ if(rbCatGestao.getSelected() != null)
+ {
+ if(rbCatGestao.getSelected().equals( new Boolean(true) ))
+ {
+ gridTrabalhadores.setStyleClass("");
+ return;
+ }
+ }
+
+ if(rbCatRh.getSelected() != null)
+ {
+ if(rbCatRh.getSelected().equals( new Boolean(true) ))
+ {
+ gridTrabalhadores.setStyleClass("");
+ return;
+ }
+ }
+ if(rbCatSeg.getSelected() != null)
+ {
+ if(rbCatSeg.getSelected().equals( new Boolean(true) ))
+ {
+ gridTrabalhadores.setStyleClass("");
+ return;
+ }
+ }
+
+ if(rbCatHs.getSelected() != null)
+ {
+ if(rbCatHs.getSelected().equals( new Boolean(true) ))
+ {
+ gridTecnicosHs.setStyleClass("");
+ return;
+ }
+ }
+
+ if(rbCatMed.getSelected() != null)
+ {
+ if(rbCatMed.getSelected().equals( new Boolean(true) ))
+ {
+ gridMedicos.setStyleClass("");
+ return;
+ }
+ }
+
+ }
+
+// public String getColumnStyle(){
+// TableRowDataProvider trdp = (TableRowDataProvider) getBean("currentRow");
+// RowKey rowKey = trdp.getTableRow();
+// System.out.println(rowKey);
+// if ((Integer.parseInt(rowKey.getRowId()) % 2) == 0){
+// return " ";
+// }
+// else {
+// return "background-color: #eeeeee";
+// }
+// }
+
+ private void setNewUser()
+ {
+
+ NewUser u = new NewUser();
+ u = setUserTipo(u);
+ u.setNumero_mecanografico("");
+ u.setResponsavel_loja("n");
+ u.setGestor_geral("n");
+ switch(u.getTipo().intValue())
+ {
+ case 1: //seg
+ if(chkSegResp.getSelected() != null)
+ {
+ if(chkSegResp.getSelected().equals(new Boolean(true)))
+ {
+ u.setResponsavel_loja("y");
+ }
+ }
+ break;
+ case 2: //rh
+ if(chkRhResp.getSelected() != null)
+ {
+ if(chkRhResp.getSelected().equals(new Boolean(true)))
+ {
+ u.setResponsavel_loja("y");
+ }
+ }
+ break;
+ case 6: //gestor
+ if(chkGestaoGeral.getSelected() != null)
+ {
+ if(chkGestaoGeral.getSelected().equals(new Boolean(true)))
+ {
+ u.setGestor_geral("y");
+ }
+ }
+
+ break;
+ }
+ u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id());
+
+ }
+
+ public String lnkNewUser_action() {
+ // TODO: Replace with your code
+
+
+ return "gestao_utilizadores";
+ }
+
+ public String lnkAnalisesAcidente_action() {
+ // TODO: Replace with your code
+ Integer tipo_utilizador = getSessionBean1().getCurrentUser().getTipo();
+ if(tipo_utilizador.intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP)
+ {
+ return "form_dir_siprp";
+ }
+ else if(tipo_utilizador.intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_GERAL_RH)
+ {
+ return "form_dir_ger_rh";
+ }
+
+ return null;
+ }
+
+ public void rbCatRh_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+ }
+
+ public void rbCatHs_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+
+ }
+
+ public String lnkAjuda_action() {
+ // TODO: Replace with your code
+// ServletContext theApplicationsServletContext =
+// (ServletContext) this.getExternalContext().getContext();
+// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL);
+// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf";
+//
+// Global global = new Global();
+// try
+// {
+// global.showPdf(pdfFilePath);
+// }
+// catch(Exception ex)
+// {
+// ex.printStackTrace();
+// }
+ return null;
+ }
+
+ public String lnkPlanosActuacao_action() {
+ // TODO: Replace with your code
+ Utilizador u = getSessionBean1().getCurrentUser();
+// String curUser = "?user=" + u.getId().toString();
+ FacesContext fc = getFacesContext().getCurrentInstance();
+ Global.redirectToPlanos(fc, u);
+ return null;
+ }
+}
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Permissao.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Permissao.java
new file mode 100644
index 00000000..31b0be5b
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Permissao.java
@@ -0,0 +1,49 @@
+/*
+ * Permissao.java
+ *
+ * Created on October 25, 2007, 4:40 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package analiseacidentestrabalho;
+
+/**
+ *
+ * @author lluis
+ */
+public class Permissao {
+ private Integer id;
+ private Integer user_id;
+ private Integer codigo_permissao;
+
+ /** Creates a new instance of Permissao */
+ public Permissao() {
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public Integer getUser_id() {
+ return user_id;
+ }
+
+ public void setUser_id(Integer user_id) {
+ this.user_id = user_id;
+ }
+
+ public Integer getCodigo_permissao() {
+ return codigo_permissao;
+ }
+
+ public void setCodigo_permissao(Integer codigo_permissao) {
+ this.codigo_permissao = codigo_permissao;
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Recomendacao.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Recomendacao.java
new file mode 100644
index 00000000..85aea13e
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Recomendacao.java
@@ -0,0 +1,49 @@
+/*
+ * Recomendacao.java
+ *
+ * Created on October 16, 2007, 3:13 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package analiseacidentestrabalho;
+
+/**
+ *
+ * @author lluis
+ */
+public class Recomendacao {
+ private Integer id;
+ private Integer analise_id;
+ private String recomendacao;
+
+ /** Creates a new instance of Recomendacao */
+ public Recomendacao() {
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public Integer getAnalise_id() {
+ return analise_id;
+ }
+
+ public void setAnalise_id(Integer analise_id) {
+ this.analise_id = analise_id;
+ }
+
+ public String getRecomendacao() {
+ return recomendacao;
+ }
+
+ public void setRecomendacao(String recomendacao) {
+ this.recomendacao = recomendacao;
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/RecuperarPassword.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/RecuperarPassword.java
new file mode 100644
index 00000000..9bd25837
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/RecuperarPassword.java
@@ -0,0 +1,527 @@
+/*
+ * RecuperarPassword.java
+ *
+ * Created on September 19, 2007, 9:57 AM
+ * Copyright lluis
+ */
+package analiseacidentestrabalho;
+
+import com.sun.rave.web.ui.appbase.AbstractPageBean;
+import com.sun.rave.web.ui.component.Body;
+import com.sun.rave.web.ui.component.Button;
+import com.sun.rave.web.ui.component.Form;
+import com.sun.rave.web.ui.component.Head;
+import com.sun.rave.web.ui.component.Html;
+import com.sun.rave.web.ui.component.Link;
+import com.sun.rave.web.ui.component.Page;
+import com.sun.rave.web.ui.component.PanelGroup;
+import com.sun.rave.web.ui.component.StaticText;
+import com.sun.rave.web.ui.component.TextField;
+import db.UtilizadoresDataProvider;
+import global.Global;
+import java.util.Date;
+import java.util.Properties;
+import javax.faces.FacesException;
+import javax.faces.component.html.HtmlPanelGrid;
+import javax.mail.BodyPart;
+import javax.mail.Message;
+import javax.mail.Multipart;
+import javax.mail.Session;
+import javax.mail.Transport;
+import javax.mail.internet.InternetAddress;
+import javax.mail.internet.MimeBodyPart;
+import javax.mail.internet.MimeMessage;
+import javax.mail.internet.MimeMultipart;
+import utils.Utils;
+
+/**
+ * Page bean that corresponds to a similarly named JSP page. This
+ * class contains component definitions (and initialization code) for
+ * all components that you have defined on this page, as well as
+ * lifecycle methods and event handlers where you may add behavior
+ * to respond to incoming events.
+ */
+public class RecuperarPassword extends AbstractPageBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+
+ private Page page1 = new Page();
+
+ public Page getPage1() {
+ return page1;
+ }
+
+ public void setPage1(Page p) {
+ this.page1 = p;
+ }
+
+ private Html html1 = new Html();
+
+ public Html getHtml1() {
+ return html1;
+ }
+
+ public void setHtml1(Html h) {
+ this.html1 = h;
+ }
+
+ private Head head1 = new Head();
+
+ public Head getHead1() {
+ return head1;
+ }
+
+ public void setHead1(Head h) {
+ this.head1 = h;
+ }
+
+ private Link link1 = new Link();
+
+ public Link getLink1() {
+ return link1;
+ }
+
+ public void setLink1(Link l) {
+ this.link1 = l;
+ }
+
+ private Body body1 = new Body();
+
+ public Body getBody1() {
+ return body1;
+ }
+
+ public void setBody1(Body b) {
+ this.body1 = b;
+ }
+
+ private Form form1 = new Form();
+
+ public Form getForm1() {
+ return form1;
+ }
+
+ public void setForm1(Form f) {
+ this.form1 = f;
+ }
+
+ private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel1() {
+ return gridPanel1;
+ }
+
+ public void setGridPanel1(HtmlPanelGrid hpg) {
+ this.gridPanel1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel2() {
+ return gridPanel2;
+ }
+
+ public void setGridPanel2(HtmlPanelGrid hpg) {
+ this.gridPanel2 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel3() {
+ return gridPanel3;
+ }
+
+ public void setGridPanel3(HtmlPanelGrid hpg) {
+ this.gridPanel3 = hpg;
+ }
+
+ private StaticText txtMsg = new StaticText();
+
+ public StaticText getTxtMsg() {
+ return txtMsg;
+ }
+
+ public void setTxtMsg(StaticText st) {
+ this.txtMsg = st;
+ }
+
+ private StaticText staticText3 = new StaticText();
+
+ public StaticText getStaticText3() {
+ return staticText3;
+ }
+
+ public void setStaticText3(StaticText st) {
+ this.staticText3 = st;
+ }
+
+ private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel4() {
+ return gridPanel4;
+ }
+
+ public void setGridPanel4(HtmlPanelGrid hpg) {
+ this.gridPanel4 = hpg;
+ }
+
+ private StaticText staticText1 = new StaticText();
+
+ public StaticText getStaticText1() {
+ return staticText1;
+ }
+
+ public void setStaticText1(StaticText st) {
+ this.staticText1 = st;
+ }
+
+ private TextField txtUtilizador = new TextField();
+
+ public TextField getTxtUtilizador() {
+ return txtUtilizador;
+ }
+
+ public void setTxtUtilizador(TextField tf) {
+ this.txtUtilizador = tf;
+ }
+
+ private StaticText staticText2 = new StaticText();
+
+ public StaticText getStaticText2() {
+ return staticText2;
+ }
+
+ public void setStaticText2(StaticText st) {
+ this.staticText2 = st;
+ }
+
+ private TextField txtEmail = new TextField();
+
+ public TextField getTxtEmail() {
+ return txtEmail;
+ }
+
+ public void setTxtEmail(TextField tf) {
+ this.txtEmail = tf;
+ }
+
+ private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel5() {
+ return gridPanel5;
+ }
+
+ public void setGridPanel5(HtmlPanelGrid hpg) {
+ this.gridPanel5 = hpg;
+ }
+
+ private PanelGroup groupPanel1 = new PanelGroup();
+
+ public PanelGroup getGroupPanel1() {
+ return groupPanel1;
+ }
+
+ public void setGroupPanel1(PanelGroup pg) {
+ this.groupPanel1 = pg;
+ }
+
+ private Button butCancelar = new Button();
+
+ public Button getButCancelar() {
+ return butCancelar;
+ }
+
+ public void setButCancelar(Button b) {
+ this.butCancelar = b;
+ }
+
+ private Button butOk = new Button();
+
+ public Button getButOk() {
+ return butOk;
+ }
+
+ public void setButOk(Button b) {
+ this.butOk = b;
+ }
+
+ //
+
+ /**
+ * Construct a new Page bean instance.
+ */
+ public RecuperarPassword() {
+ }
+
+ /**
+ * Callback method that is called whenever a page is navigated to,
+ * either directly via a URL, or indirectly via page navigation.
+ * Customize this method to acquire resources that will be needed
+ * for event handlers and lifecycle methods, whether or not this
+ * page is performing post back processing.
+ *
+ * Note that, if the current request is a postback, the property
+ * values of the components do not represent any
+ * values submitted with this request. Instead, they represent the
+ * property values that were saved for this view when it was rendered.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("RecuperarPassword Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+// if (!getSessionBean1().isLoggedIn()) {
+// try {
+// getExternalContext().redirect("Login.jsp");
+// } catch(Exception e) {
+// // . . . handle exception . . .
+// }
+// }
+ }
+
+ /**
+ * Callback method that is called after the component tree has been
+ * restored, but before any event processing takes place. This method
+ * will only be called on a postback request that
+ * is processing a form submit. Customize this method to allocate
+ * resources that will be required in your event handlers.
+ */
+ public void preprocess() {
+ }
+
+ /**
+ * Callback method that is called just before rendering takes place.
+ * This method will only be called for the page that
+ * will actually be rendered (and not, for example, on a page that
+ * handled a postback and then navigated to a different page). Customize
+ * this method to allocate resources that will be required for rendering
+ * this page.
+ */
+ public void prerender() {
+ txtMsg.setText(getSessionBean1().getMsg());
+ getSessionBean1().setMsg("");
+ }
+
+ /**
+ * Callback method that is called after rendering is completed for
+ * this request, if init() was called (regardless of whether
+ * or not this was the page that was actually rendered). Customize this
+ * method to release resources acquired in the init(),
+ * preprocess(), or prerender() methods (or
+ * acquired during execution of an event handler).
+ */
+ public void destroy() {
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected RequestBean1 getRequestBean1() {
+ return (RequestBean1)getBean("RequestBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected SessionBean1 getSessionBean1() {
+ return (SessionBean1)getBean("SessionBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+
+ public String butLogin_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ return null;
+ }
+
+ public String butCancelar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+ return "login";
+ }
+
+ public String butOk_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+
+
+ if(fieldsValidationOk())
+ {
+ UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
+ try
+ {
+ String utilizador = (String) txtUtilizador.getText();
+ Utilizador u = udp.getUtilizador(utilizador);
+ String email = (String) txtEmail.getText();
+ if(u.getEmail().equals(email))
+ {
+ //send mail :
+ try
+ {
+ sendEmail(u.getEmail(), u.getLogin(), u.getPassword(), Global.ENDERECO_ENVIO);
+ getSessionBean1().setMsg("A sua password foi enviada para o seu email");
+ return "login";
+ }
+ catch(Exception ex)
+ {
+ getSessionBean1().setMsg("Erro no envio da password !");
+ ex.printStackTrace();
+ }
+
+ }
+ else
+ {
+ getSessionBean1().setMsg("Os dados não coincidem com os registos !");
+ }
+ }
+ catch(Exception ex)
+ {
+ getSessionBean1().setMsg("Utilizador inválido !");
+ }
+ }
+
+
+ return null;
+ }
+
+ private void sendEmail(String emailTo, String login, String password, String admin_email) throws Exception
+ {
+ Properties props = new Properties();
+ //props.put("mail.transport.protocol", "smtp");
+ props.put("mail.smtp.host", "mail2.evolute.pt");
+ props.put("mail.from", admin_email);
+ Session session1 = Session.getInstance(props);
+ Message msg = new MimeMessage(session1);
+
+// try
+// {
+ //Address Email_TO = new InternetAddress("myemail@bol.com.br");
+ msg.setFrom(new InternetAddress(admin_email));
+ InternetAddress[] address = {new InternetAddress(emailTo)};
+ msg.setRecipients(Message.RecipientType.TO, address);
+ msg.setSubject("Envio da password");
+ msg.setSentDate(new Date());
+ Multipart multipart = new MimeMultipart();
+ BodyPart msgBodyPart = new MimeBodyPart();
+ String html;
+ html=" ";
+ html+="";
+ html+="Envio da password de " + login + " : ";
+ html+="Password: " + password + "
";
+ html+="";
+ msgBodyPart.setContent(html, "text/html");
+ multipart.addBodyPart(msgBodyPart);
+ msg.setContent(multipart);
+ Transport.send(msg);
+ System.out.println("Email Enviado !!!! " + emailTo + ", " + login);
+// }
+// catch (Exception ex)
+// {
+// System.out.println("MAIL ERROR : " + ex.getMessage());
+// ex.printStackTrace();
+// }
+
+ }
+
+ private boolean fieldsValidationOk()
+ {
+ if(txtUtilizador.getText() != null)
+ {
+ String utilizador = (String) txtUtilizador.getText();
+ if(utilizador.trim().length() == 0)
+ {
+ getSessionBean1().setMsg("Falta utilizador !");
+ return false;
+ }
+ }
+ else
+ {
+ getSessionBean1().setMsg("Falta utilizador !");
+ return false;
+ }
+
+ if(txtEmail.getText() != null)
+ {
+ String email = (String) txtEmail.getText();
+ if(email.trim().length() == 0)
+ {
+ getSessionBean1().setMsg("Falta email !");
+ return false;
+ }
+ else
+ {
+ if(! Utils.isValidEmail(email))
+ {
+ getSessionBean1().setMsg("Email inválido !");
+ return false;
+ }
+ }
+ }
+ else
+ {
+ getSessionBean1().setMsg("Falta email !");
+ return false;
+ }
+
+ return true;
+ }
+
+// private boolean isValidEmail(String email){
+// boolean res = true;
+//
+// int indexOfAtChar=email.indexOf("@");
+//
+// if(indexOfAtChar > 0)
+// {
+// int indexOfDotChar =
+// email.indexOf(".",indexOfAtChar);
+// if(indexOfDotChar > 0)
+// {
+// res = true;
+// }
+// else
+// {
+// res = false;
+// }
+// }
+// else{
+// res = false;
+// }
+// return res;
+// }
+
+
+}
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/RequestBean1.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/RequestBean1.java
new file mode 100644
index 00000000..66ece1e4
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/RequestBean1.java
@@ -0,0 +1,100 @@
+/*
+ * RequestBean1.java
+ *
+ * Created on September 18, 2007, 3:14 PM
+ * Copyright lluis
+ */
+package analiseacidentestrabalho;
+
+import com.sun.rave.web.ui.appbase.AbstractRequestBean;
+import javax.faces.FacesException;
+
+/**
+ * Request scope data bean for your application. Create properties
+ * here to represent data that should be made available across different
+ * pages in the same HTTP request, so that the page bean classes do not
+ * have to be directly linked to each other.
+ *
+ * An instance of this class will be created for you automatically,
+ * the first time your application evaluates a value binding expression
+ * or method binding expression that references a managed bean using
+ * this class.
+ */
+public class RequestBean1 extends AbstractRequestBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+ //
+
+ /**
+ * Construct a new request data bean instance.
+ */
+ public RequestBean1() {
+ }
+
+ /**
+ * This method is called when this bean is initially added to
+ * request scope. Typically, this occurs as a result of evaluating
+ * a value binding or method binding expression, which utilizes the
+ * managed bean facility to instantiate this bean and store it into
+ * request scope.
+ *
+ * You may customize this method to allocate resources that are required
+ * for the lifetime of the current request.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("RequestBean1 Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+ }
+
+ /**
+ * This method is called when this bean is removed from
+ * request scope. This occurs automatically when the corresponding
+ * HTTP response has been completed and sent to the client.
+ *
+ * You may customize this method to clean up resources allocated
+ * during the execution of the init() method, or
+ * at any later time during the lifetime of the request.
+ */
+ public void destroy() {
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected SessionBean1 getSessionBean1() {
+ return (SessionBean1)getBean("SessionBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Seccao.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Seccao.java
new file mode 100644
index 00000000..f096a6f6
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Seccao.java
@@ -0,0 +1,58 @@
+/*
+ * Seccao.java
+ *
+ * Created on December 28, 2007, 11:17 AM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package analiseacidentestrabalho;
+
+/**
+ *
+ * @author lluis
+ */
+public class Seccao {
+ private Integer id;
+ private String descricao;
+ private Integer departamento_id;
+ private String activo;
+
+ /** Creates a new instance of Seccao */
+ public Seccao() {
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getDescricao() {
+ return descricao;
+ }
+
+ public void setDescricao(String descricao) {
+ this.descricao = descricao;
+ }
+
+ public Integer getDepartamento_id() {
+ return departamento_id;
+ }
+
+ public void setDepartamento_id(Integer departamento_id) {
+ this.departamento_id = departamento_id;
+ }
+
+ public String getActivo() {
+ return activo;
+ }
+
+ public void setActivo(String activo) {
+ this.activo = activo;
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/SessionBean1.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/SessionBean1.java
new file mode 100644
index 00000000..5fe5c2fb
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/SessionBean1.java
@@ -0,0 +1,743 @@
+/*
+ * SessionBean1.java
+ *
+ * Created on September 18, 2007, 3:14 PM
+ * Copyright lluis
+ */
+package analiseacidentestrabalho;
+
+import com.sun.rave.web.ui.appbase.AbstractSessionBean;
+import javax.faces.FacesException;
+import pagestate.AnaliseAcidenteTrabalhoState;
+
+/**
+ * Session scope data bean for your application. Create properties
+ * here to represent cached data that should be made available across
+ * multiple HTTP requests for an individual user.
+ *
+ * An instance of this class will be created for you automatically,
+ * the first time your application evaluates a value binding expression
+ * or method binding expression that references a managed bean using
+ * this class.
+ */
+public class SessionBean1 extends AbstractSessionBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+ //
+ private String logoEmpresaUrl = "";
+ /**
+ * Construct a new session data bean instance.
+ */
+ public SessionBean1() {
+ msg = new String("");
+ currentUser = new Utilizador();
+ analisesActualDataProvider = new db.AnalisesActualDataProvider();
+ analisesSeguimentoDataProvider = new db.AnalisesSeguimentoDataProvider();
+ analisesConcluidasDataProvider = new db.AnalisesConcluidasDataProvider();
+ trabalhadoresListDataProvider = new db.TrabalhadoresListDataProvider();
+ setEstadosCorrecaoDataProvider(new db.EstadosCorrecaoDataProvider());
+ utilizadoresActivosListDataProvider = new db.UtilizadoresActivosListDataProvider();
+ utilizadoresInactivosListDataProvider = new db.UtilizadoresInactivosListDataProvider();
+
+ setNavFrom("");
+ setAcidentado(null);
+ setCurrentAnalise(null);
+ setLoggedIn(false);
+
+ modoEdicaoUtilizador = "";
+ setIdSequence(1);
+ setNewUser(null);
+ setEditUser(null);
+ setUserDeleted(false);
+ setMudarPassword(false);
+ setFromAjuda(false);
+ setGravado(false);
+ setSubmetido(false);
+ setFromAnaliseDeletion(false);
+ setIeBug(false);
+ setCorrecao(null);
+ }
+
+ /**
+ * This method is called when this bean is initially added to
+ * session scope. Typically, this occurs as a result of evaluating
+ * a value binding or method binding expression, which utilizes the
+ * managed bean facility to instantiate this bean and store it into
+ * session scope.
+ *
+ * You may customize this method to initialize and cache data values
+ * or resources that are required for the lifetime of a particular
+ * user session.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("SessionBean1 Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+ }
+
+ /**
+ * This method is called when the session containing it is about to be
+ * passivated. Typically, this occurs in a distributed servlet container
+ * when the session is about to be transferred to a different
+ * container instance, after which the activate() method
+ * will be called to indicate that the transfer is complete.
+ *
+ * You may customize this method to release references to session data
+ * or resources that can not be serialized with the session itself.
+ */
+ public void passivate() {
+ }
+
+ /**
+ * This method is called when the session containing it was
+ * reactivated.
+ *
+ * You may customize this method to reacquire references to session
+ * data or resources that could not be serialized with the
+ * session itself.
+ */
+ public void activate() {
+ }
+
+ /**
+ * This method is called when this bean is removed from
+ * session scope. Typically, this occurs as a result of
+ * the session timing out or being terminated by the application.
+ *
+ * You may customize this method to clean up resources allocated
+ * during the execution of the init() method, or
+ * at any later time during the lifetime of the application.
+ */
+ public void destroy() {
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+
+ private String msg;
+
+ public String getMsg() {
+ return msg;
+ }
+
+ public void setMsg(String msg) {
+ this.msg = msg;
+ }
+
+ private Utilizador currentUser;
+
+ public Utilizador getCurrentUser() {
+ return currentUser;
+ }
+
+ public void setCurrentUser(Utilizador currentUser) {
+ this.currentUser = currentUser;
+ }
+
+ private db.AnalisesActualDataProvider analisesActualDataProvider;
+ private db.AnalisesSeguimentoDataProvider analisesSeguimentoDataProvider;
+ private db.AnalisesConcluidasDataProvider analisesConcluidasDataProvider;
+ private db.TrabalhadoresListDataProvider trabalhadoresListDataProvider;
+ private db.EstadosCorrecaoDataProvider estadosCorrecaoDataProvider;
+ private db.UtilizadoresActivosListDataProvider utilizadoresActivosListDataProvider;
+ private db.UtilizadoresInactivosListDataProvider utilizadoresInactivosListDataProvider;
+
+ public db.AnalisesActualDataProvider getAnalisesActualDataProvider() {
+ return analisesActualDataProvider;
+ }
+
+ public void setAnalisesActualDataProvider(db.AnalisesActualDataProvider analisesActualDataProvider) {
+ this.analisesActualDataProvider = analisesActualDataProvider;
+ }
+
+ public db.AnalisesSeguimentoDataProvider getAnalisesSeguimentoDataProvider() {
+ return analisesSeguimentoDataProvider;
+ }
+
+ public void setAnalisesSeguimentoDataProvider(db.AnalisesSeguimentoDataProvider analisesSeguimentoDataProvider) {
+ this.analisesSeguimentoDataProvider = analisesSeguimentoDataProvider;
+ }
+
+ public db.AnalisesConcluidasDataProvider getAnalisesConcluidasDataProvider() {
+ return analisesConcluidasDataProvider;
+ }
+
+ public void setAnalisesConcluidasDataProvider(db.AnalisesConcluidasDataProvider analisesConcluidasDataProvider) {
+ this.analisesConcluidasDataProvider = analisesConcluidasDataProvider;
+ }
+
+ public db.TrabalhadoresListDataProvider getTrabalhadoresListDataProvider() {
+ return trabalhadoresListDataProvider;
+ }
+
+ public void setTrabalhadoresListDataProvider(db.TrabalhadoresListDataProvider trabalhadoresListDataProvider) {
+ this.trabalhadoresListDataProvider = trabalhadoresListDataProvider;
+ }
+
+ public db.EstadosCorrecaoDataProvider getEstadosCorrecaoDataProvider() {
+ return estadosCorrecaoDataProvider;
+ }
+
+ public void setEstadosCorrecaoDataProvider(db.EstadosCorrecaoDataProvider estadosCorrecaoDataProvider) {
+ this.estadosCorrecaoDataProvider = estadosCorrecaoDataProvider;
+ }
+
+ public db.UtilizadoresActivosListDataProvider getUtilizadoresActivosListDataProvider() {
+ return utilizadoresActivosListDataProvider;
+ }
+
+ public void setUtilizadoresActivosListDataProvider(db.UtilizadoresActivosListDataProvider utilizadoresActivosListDataProvider) {
+ this.utilizadoresActivosListDataProvider = utilizadoresActivosListDataProvider;
+ }
+
+ public db.UtilizadoresInactivosListDataProvider getUtilizadoresInactivosListDataProvider() {
+ return utilizadoresInactivosListDataProvider;
+ }
+
+ public void setUtilizadoresInactivosListDataProvider(db.UtilizadoresInactivosListDataProvider utilizadoresInactivosListDataProvider) {
+ this.utilizadoresInactivosListDataProvider = utilizadoresInactivosListDataProvider;
+ }
+
+ private com.sun.rave.web.ui.model.Option[] anoOptions;
+
+ private Integer anoChoice;
+
+ public Integer getAnoChoice() {
+ return anoChoice;
+ }
+
+ public void setAnoChoice(Integer anoChoice) {
+ this.anoChoice = anoChoice;
+ }
+
+ public com.sun.rave.web.ui.model.Option[] getAnoOptions() {
+ return anoOptions;
+ }
+
+ public void setAnoOptions(com.sun.rave.web.ui.model.Option[] anoOptions) {
+ this.anoOptions = anoOptions;
+ }
+
+ private com.sun.rave.web.ui.model.Option[] mesOptions;
+
+ private Integer mesChoice;
+
+ public Integer getMesChoice() {
+ return mesChoice;
+ }
+
+ public void setMesChoice(Integer mesChoice) {
+ this.mesChoice = mesChoice;
+ }
+
+ public com.sun.rave.web.ui.model.Option[] getMesOptions() {
+ return mesOptions;
+ }
+
+ public void setMesOptions(com.sun.rave.web.ui.model.Option[] mesOptions) {
+ this.mesOptions = mesOptions;
+ }
+
+ private com.sun.rave.web.ui.model.Option[] diaOptions;
+
+ private Integer diaChoice;
+
+ public Integer getDiaChoice() {
+ return diaChoice;
+ }
+
+ public void setDiaChoice(Integer diaChoice) {
+ this.diaChoice = diaChoice;
+ }
+
+ public com.sun.rave.web.ui.model.Option[] getDiaOptions() {
+ return diaOptions;
+ }
+
+ public void setDiaOptions(com.sun.rave.web.ui.model.Option[] diaOptions) {
+ this.diaOptions = diaOptions;
+ }
+
+ private com.sun.rave.web.ui.model.Option[] departamentoOptions;
+
+ private Integer departamentoChoice;
+
+ public Integer getDepartamentoChoice() {
+ return departamentoChoice;
+ }
+
+ public void setDepartamentoChoice(Integer departamentoChoice) {
+ this.departamentoChoice = departamentoChoice;
+ }
+
+ public com.sun.rave.web.ui.model.Option[] getDepartamentoOptions() {
+ return departamentoOptions;
+ }
+
+ public void setDepartamentoOptions(com.sun.rave.web.ui.model.Option[] departamentoOptions) {
+ this.departamentoOptions = departamentoOptions;
+ }
+
+ private com.sun.rave.web.ui.model.Option[] seccaoOptions;
+
+ private Integer seccaoChoice;
+
+ public Integer getSeccaoChoice() {
+ return seccaoChoice;
+ }
+
+ public void setSeccaoChoice(Integer seccaoChoice) {
+ this.seccaoChoice = seccaoChoice;
+ }
+
+ public com.sun.rave.web.ui.model.Option[] getSeccaoOptions() {
+ return seccaoOptions;
+ }
+
+ public void setSeccaoOptions(com.sun.rave.web.ui.model.Option[] seccaoOptions) {
+ this.seccaoOptions = seccaoOptions;
+ }
+
+ private String imageName;
+
+ public String getImageName() {
+ return imageName;
+ }
+
+ public void setImageName(String imageName) {
+ this.imageName = imageName;
+ }
+
+ private String navFrom;
+
+ public String getNavFrom() {
+ return navFrom;
+ }
+
+ public void setNavFrom(String navFrom) {
+ this.navFrom = navFrom;
+ }
+
+ private Acidentado acidentado;
+
+ public Acidentado getAcidentado() {
+ return acidentado;
+ }
+
+ public void setAcidentado(Acidentado acidentado) {
+ this.acidentado = acidentado;
+ }
+
+ private AnaliseAcidenteTrabalhoState analise_acidente_trabalho_state;
+
+ public AnaliseAcidenteTrabalhoState getAnalise_acidente_trabalho_state() {
+ return analise_acidente_trabalho_state;
+ }
+
+ public void setAnalise_acidente_trabalho_state(AnaliseAcidenteTrabalhoState analise_acidente_trabalho_state) {
+ this.analise_acidente_trabalho_state = analise_acidente_trabalho_state;
+ }
+
+ private AnaliseAcidente currentAnalise;
+
+ public AnaliseAcidente getCurrentAnalise() {
+ return currentAnalise;
+ }
+
+ public void setCurrentAnalise(AnaliseAcidente currentAnalise) {
+ this.currentAnalise = currentAnalise;
+ }
+
+ private boolean loggedIn;
+
+ public boolean isLoggedIn()
+ {
+ return loggedIn;
+ }
+
+ public void setLoggedIn(boolean loggedIn)
+ {
+ this.loggedIn = loggedIn;
+ }
+
+ private String modoEdicaoUtilizador;
+
+ public String getModoEdicaoUtilizador() {
+ return modoEdicaoUtilizador;
+ }
+
+ public void setModoEdicaoUtilizador(String modoEdicaoUtilizador) {
+ this.modoEdicaoUtilizador = modoEdicaoUtilizador;
+ }
+
+ private Integer tipoChoice;
+
+ public Integer getTipoChoice() {
+ return tipoChoice;
+ }
+
+ public void setTipoChoice(Integer tipoChoice) {
+ this.tipoChoice = tipoChoice;
+ }
+
+ private com.sun.rave.web.ui.model.Option[] tiposOptions;
+
+ public com.sun.rave.web.ui.model.Option[] getTiposOptions() {
+ return tiposOptions;
+ }
+
+ public void setTiposOptions(com.sun.rave.web.ui.model.Option[] tiposOptions) {
+ this.tiposOptions = tiposOptions;
+ }
+
+
+ private Integer estabelecimentoChoice;
+
+ public Integer getEstabelecimentoChoice() {
+ return estabelecimentoChoice;
+ }
+
+ public void setEstabelecimentoChoice(Integer estabelecimentoChoice) {
+ this.estabelecimentoChoice = estabelecimentoChoice;
+ }
+
+ private com.sun.rave.web.ui.model.Option[] estabelecimentosOptions;
+
+ public com.sun.rave.web.ui.model.Option[] getEstabelecimentosOptions() {
+ return estabelecimentosOptions;
+ }
+
+ public void setEstabelecimentosOptions(com.sun.rave.web.ui.model.Option[] estabelecimentosOptions) {
+ this.estabelecimentosOptions = estabelecimentosOptions;
+ }
+
+ private Integer estabelecimentoGestorChoice;
+
+ public Integer getEstabelecimentoGestorChoice() {
+ return estabelecimentoGestorChoice;
+ }
+
+ public void setEstabelecimentoGestorChoice(Integer estabelecimentoGestorChoice) {
+ this.estabelecimentoGestorChoice = estabelecimentoGestorChoice;
+ }
+
+ private com.sun.rave.web.ui.model.Option[] estabelecimentosGestorOptions;
+
+ public com.sun.rave.web.ui.model.Option[] getEstabelecimentosGestorOptions() {
+ return estabelecimentosGestorOptions;
+ }
+
+ public void setEstabelecimentosGestorOptions(com.sun.rave.web.ui.model.Option[] estabelecimentosGestorOptions) {
+ this.estabelecimentosGestorOptions = estabelecimentosGestorOptions;
+ }
+
+
+
+ //
+ private Integer estabelecimentoOutroChoice;
+
+ public Integer getEstabelecimentoOutroChoice() {
+ return estabelecimentoOutroChoice;
+ }
+
+ public void setEstabelecimentoOutroChoice(Integer estabelecimentoOutroChoice) {
+ this.estabelecimentoOutroChoice = estabelecimentoOutroChoice;
+ }
+
+
+
+ private com.sun.rave.web.ui.model.Option[] estabelecimentosOutroOptions;
+
+ public com.sun.rave.web.ui.model.Option[] getEstabelecimentosOutroOptions() {
+ return estabelecimentosOutroOptions;
+ }
+
+ public void setEstabelecimentosOutroOptions(com.sun.rave.web.ui.model.Option[] estabelecimentosOutroOptions) {
+ this.estabelecimentosOutroOptions = estabelecimentosOutroOptions;
+ }
+
+
+ private Integer estabelecimentoMedChoice;
+
+ public Integer getEstabelecimentoMedChoice() {
+ return estabelecimentoMedChoice;
+ }
+
+ public void setEstabelecimentoMedChoice(Integer estabelecimentoMedChoice) {
+ this.estabelecimentoMedChoice = estabelecimentoMedChoice;
+ }
+
+ private com.sun.rave.web.ui.model.Option[] estabelecimentosMedOptions;
+
+ public com.sun.rave.web.ui.model.Option[] getEstabelecimentosMedOptions() {
+ return estabelecimentosMedOptions;
+ }
+
+ public void setEstabelecimentosMedOptions(com.sun.rave.web.ui.model.Option[] estabelecimentosMedOptions) {
+ this.estabelecimentosMedOptions = estabelecimentosMedOptions;
+ }
+
+ private Integer tecnicoChoice;
+
+ public Integer getTecnicoChoice() {
+ return tecnicoChoice;
+ }
+
+ public void setTecnicoChoice(Integer tecnicoChoice) {
+ this.tecnicoChoice = tecnicoChoice;
+ }
+
+ private com.sun.rave.web.ui.model.Option[] tecnicosOptions;
+
+ public com.sun.rave.web.ui.model.Option[] getTecnicosOptions() {
+ return tecnicosOptions;
+ }
+
+ public void setTecnicosOptions(com.sun.rave.web.ui.model.Option[] tecnicosOptions) {
+ this.tecnicosOptions = tecnicosOptions;
+ }
+
+
+ private Integer medicoChoice;
+
+ public Integer getMedicoChoice() {
+ return medicoChoice;
+ }
+
+ public void setMedicoChoice(Integer medicoChoice) {
+ this.medicoChoice = medicoChoice;
+ }
+
+ private com.sun.rave.web.ui.model.Option[] medicosOptions;
+
+ public com.sun.rave.web.ui.model.Option[] getMedicosOptions() {
+ return medicosOptions;
+ }
+
+ public void setMedicosOptions(com.sun.rave.web.ui.model.Option[] medicosOptions) {
+ this.medicosOptions = medicosOptions;
+ }
+
+
+ // Clock :
+ private Integer horaChoice;
+
+ public Integer getHoraChoice() {
+ return horaChoice;
+ }
+
+ public void setHoraChoice(Integer horaChoice) {
+ this.horaChoice = horaChoice;
+ }
+
+ private com.sun.rave.web.ui.model.Option[] horasOptions;
+
+ public com.sun.rave.web.ui.model.Option[] getHorasOptions() {
+ return horasOptions;
+ }
+
+ public void setHorasOptions(com.sun.rave.web.ui.model.Option[] horasOptions) {
+ this.horasOptions = horasOptions;
+ }
+
+
+ private Integer minutoChoice;
+
+ public Integer getMinutoChoice() {
+ return minutoChoice;
+ }
+
+ public void setMinutoChoice(Integer minutoChoice) {
+ this.minutoChoice = minutoChoice;
+ }
+
+ private com.sun.rave.web.ui.model.Option[] minutosOptions;
+
+ public com.sun.rave.web.ui.model.Option[] getMinutosOptions() {
+ return minutosOptions;
+ }
+
+ public void setMinutosOptions(com.sun.rave.web.ui.model.Option[] minutosOptions) {
+ this.minutosOptions = minutosOptions;
+ }
+
+
+ private Integer causaChoice;
+
+ public Integer getCausaChoice() {
+ return causaChoice;
+ }
+
+ public void setCausaChoice(Integer causaChoice) {
+ this.causaChoice = causaChoice;
+ }
+
+ private com.sun.rave.web.ui.model.Option[] causasOptions;
+
+ public com.sun.rave.web.ui.model.Option[] getCausasOptions() {
+ return causasOptions;
+ }
+
+ public void setCausasOptions(com.sun.rave.web.ui.model.Option[] causasOptions) {
+ this.causasOptions = causasOptions;
+ }
+
+ private int idSequence;
+
+ public int getIdSequence() {
+ return idSequence;
+ }
+
+ public void setIdSequence(int idSequence) {
+ this.idSequence = idSequence;
+ }
+
+ private NewUser newUser;
+
+ public NewUser getNewUser() {
+ return newUser;
+ }
+
+ public void setNewUser(NewUser newUser) {
+ this.newUser = newUser;
+ }
+
+ private Utilizador editUser;
+
+ public Utilizador getEditUser() {
+ return editUser;
+ }
+
+ public void setEditUser(Utilizador editUser) {
+ this.editUser = editUser;
+ }
+
+ private boolean userDeleted;
+
+ public boolean isUserDeleted() {
+ return userDeleted;
+ }
+
+ public void setUserDeleted(boolean userDeleted) {
+ this.userDeleted = userDeleted;
+ }
+
+ private boolean mudarPassword;
+
+ public boolean isMudarPassword() {
+ return mudarPassword;
+ }
+
+ public void setMudarPassword(boolean mudarPassword) {
+ this.mudarPassword = mudarPassword;
+ }
+
+ private Medico medico;
+
+ public Medico getMedico() {
+ return medico;
+ }
+
+ public void setMedico(Medico medico) {
+ this.medico = medico;
+ }
+
+ private boolean fromAjuda;
+
+ public boolean isFromAjuda() {
+ return fromAjuda;
+ }
+
+ public void setFromAjuda(boolean fromAjuda) {
+ this.fromAjuda = fromAjuda;
+ }
+
+ private boolean submetido;
+
+ private boolean gravado;
+
+ public boolean isSubmetido() {
+ return submetido;
+ }
+
+ public void setSubmetido(boolean submetido) {
+ this.submetido = submetido;
+ }
+
+ public boolean isGravado() {
+ return gravado;
+ }
+
+ public void setGravado(boolean gravado) {
+ this.gravado = gravado;
+ }
+
+ private boolean fromAnaliseDeletion;
+
+ public boolean isFromAnaliseDeletion() {
+ return fromAnaliseDeletion;
+ }
+
+ public void setFromAnaliseDeletion(boolean fromAnaliseDeletion) {
+ this.fromAnaliseDeletion = fromAnaliseDeletion;
+ }
+
+ private boolean ieBug;
+
+ public boolean isIeBug() {
+ return ieBug;
+ }
+
+ public void setIeBug(boolean ieBug) {
+ this.ieBug = ieBug;
+ }
+
+ private analiseacidentestrabalho.Correcao correcao;
+
+ public analiseacidentestrabalho.Correcao getCorrecao() {
+ return correcao;
+ }
+
+ public void setCorrecao(analiseacidentestrabalho.Correcao correcao) {
+ this.correcao = correcao;
+ }
+
+ public String getLogoEmpresaUrl() {
+ return logoEmpresaUrl;
+ }
+
+ public void setLogoEmpresaUrl(String logoEmpresaUrl) {
+ this.logoEmpresaUrl = logoEmpresaUrl;
+
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/TecnicoSaude.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/TecnicoSaude.java
new file mode 100644
index 00000000..7980ae83
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/TecnicoSaude.java
@@ -0,0 +1,44 @@
+/*
+ * TecnicoSaude.java
+ *
+ * Created on October 12, 2007, 11:00 AM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package analiseacidentestrabalho;
+
+/**
+ *
+ * @author lluis
+ */
+public class TecnicoSaude {
+ private Integer id;
+ private String nome;
+
+ /** Creates a new instance of TecnicoSaude */
+ public TecnicoSaude() {
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getNome() {
+ return nome;
+ }
+
+ public void setNome(String nome) {
+ this.nome = nome;
+ }
+
+ public String toString() {
+ return utils.Utils.unicodeToHTML(nome);
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/TipoUtilizador.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/TipoUtilizador.java
new file mode 100644
index 00000000..749160c9
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/TipoUtilizador.java
@@ -0,0 +1,67 @@
+/*
+ * TipoUtilizador.java
+ *
+ * Created on October 11, 2007, 4:32 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package analiseacidentestrabalho;
+
+/**
+ *
+ * @author lluis
+ */
+public class TipoUtilizador {
+ private Integer id;
+ private Integer tipo;
+ private String descricao;
+ private String activo;
+ private Integer ordem;
+
+ /** Creates a new instance of TipoUtilizador */
+ public TipoUtilizador() {
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public Integer getTipo() {
+ return tipo;
+ }
+
+ public void setTipo(Integer tipo) {
+ this.tipo = tipo;
+ }
+
+ public String getDescricao() {
+ return descricao;
+ }
+
+ public void setDescricao(String descricao) {
+ this.descricao = descricao;
+ }
+
+ public String getActivo() {
+ return activo;
+ }
+
+ public void setActivo(String activo) {
+ this.activo = activo;
+ }
+
+ public Integer getOrdem() {
+ return ordem;
+ }
+
+ public void setOrdem(Integer ordem) {
+ this.ordem = ordem;
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Top.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Top.java
new file mode 100644
index 00000000..d183ddf6
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Top.java
@@ -0,0 +1,203 @@
+/*
+ * Top.java
+ *
+ * Created on September 20, 2007, 11:04 AM
+ * Copyright lluis
+ */
+package analiseacidentestrabalho;
+
+import com.sun.rave.web.ui.appbase.AbstractFragmentBean;
+import com.sun.rave.web.ui.component.Hyperlink;
+import com.sun.rave.web.ui.component.ImageComponent;
+import com.sun.rave.web.ui.component.PanelGroup;
+import com.sun.rave.web.ui.component.StaticText;
+import javax.faces.FacesException;
+import javax.faces.component.html.HtmlPanelGrid;
+
+/**
+ * Fragment bean that corresponds to a similarly named JSP page
+ * fragment. This class contains component definitions (and initialization
+ * code) for all components that you have defined on this fragment, as well as
+ * lifecycle methods and event handlers where you may add behavior
+ * to respond to incoming events.
+ */
+public class Top extends AbstractFragmentBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+
+ private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel1() {
+ return gridPanel1;
+ }
+
+ public void setGridPanel1(HtmlPanelGrid hpg) {
+ this.gridPanel1 = hpg;
+ }
+
+ private PanelGroup groupPanel1 = new PanelGroup();
+
+ public PanelGroup getGroupPanel1() {
+ return groupPanel1;
+ }
+
+ public void setGroupPanel1(PanelGroup pg) {
+ this.groupPanel1 = pg;
+ }
+
+ private ImageComponent image1 = new ImageComponent();
+
+ public ImageComponent getImage1() {
+ return image1;
+ }
+
+ public void setImage1(ImageComponent ic) {
+ this.image1 = ic;
+ }
+
+ private ImageComponent image2 = new ImageComponent();
+
+ public ImageComponent getImage2() {
+ return image2;
+ }
+
+ public void setImage2(ImageComponent ic) {
+ this.image2 = ic;
+ }
+
+ private PanelGroup groupPanel2 = new PanelGroup();
+
+ public PanelGroup getGroupPanel2() {
+ return groupPanel2;
+ }
+
+ public void setGroupPanel2(PanelGroup pg) {
+ this.groupPanel2 = pg;
+ }
+
+ private StaticText lblUser = new StaticText();
+
+ public StaticText getLblUser() {
+ return lblUser;
+ }
+
+ public void setLblUser(StaticText st) {
+ this.lblUser = st;
+ }
+
+ private StaticText staticText2 = new StaticText();
+
+ public StaticText getStaticText2() {
+ return staticText2;
+ }
+
+ public void setStaticText2(StaticText st) {
+ this.staticText2 = st;
+ }
+
+ private Hyperlink lnkChangePassword = new Hyperlink();
+
+ public Hyperlink getLnkChangePassword() {
+ return lnkChangePassword;
+ }
+
+ public void setLnkChangePassword(Hyperlink h) {
+ this.lnkChangePassword = h;
+ }
+
+ private StaticText staticText3 = new StaticText();
+
+ public StaticText getStaticText3() {
+ return staticText3;
+ }
+
+ public void setStaticText3(StaticText st) {
+ this.staticText3 = st;
+ }
+
+ private Hyperlink lnkLogout = new Hyperlink();
+
+ public Hyperlink getLnkLogout() {
+ return lnkLogout;
+ }
+
+ public void setLnkLogout(Hyperlink h) {
+ this.lnkLogout = h;
+ }
+ //
+
+ public Top() {
+ }
+
+ /**
+ * Callback method that is called whenever a page containing
+ * this page fragment is navigated to, either directly via a URL,
+ * or indirectly via page navigation. Override this method to acquire
+ * resources that will be needed for event handlers and lifecycle methods.
+ *
+ * The default implementation does nothing.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("Page1 Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+ }
+
+ /**
+ * Callback method that is called after rendering is completed for
+ * this request, if init() was called. Override this
+ * method to release resources acquired in the init()
+ * resources that will be needed for event handlers and lifecycle methods.
+ *
+ * The default implementation does nothing.
+ */
+ public void destroy() {
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected RequestBean1 getRequestBean1() {
+ return (RequestBean1)getBean("RequestBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected SessionBean1 getSessionBean1() {
+ return (SessionBean1)getBean("SessionBean1");
+ }
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Trabalhador.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Trabalhador.java
new file mode 100644
index 00000000..446c026e
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Trabalhador.java
@@ -0,0 +1,95 @@
+/*
+ * Trabalhador.java
+ *
+ * Created on September 26, 2007, 4:23 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package analiseacidentestrabalho;
+
+/**
+ *
+ * @author lluis
+ */
+public class Trabalhador {
+ private Integer id;
+ private String nome;
+ private java.sql.Date data_nascimento;
+ private String funcao;
+ private java.sql.Date data_admissao;
+ private String numero_mecanografico;
+ private Integer estabelecimento_id;
+ private String estabelecimento;
+
+
+ /** Creates a new instance of Trabalhador */
+ public Trabalhador() {
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getNome() {
+ return nome;
+ }
+
+ public void setNome(String nome) {
+ this.nome = nome;
+ }
+
+ public java.sql.Date getData_nascimento() {
+ return data_nascimento;
+ }
+
+ public void setData_nascimento(java.sql.Date data_nascimento) {
+ this.data_nascimento = data_nascimento;
+ }
+
+ public String getFuncao() {
+ return funcao;
+ }
+
+ public void setFuncao(String funcao) {
+ this.funcao = funcao;
+ }
+
+ public java.sql.Date getData_admissao() {
+ return data_admissao;
+ }
+
+ public void setData_admissao(java.sql.Date data_admissao) {
+ this.data_admissao = data_admissao;
+ }
+
+ public String getNumero_mecanografico() {
+ return numero_mecanografico;
+ }
+
+ public void setNumero_mecanografico(String numero_mecanografico) {
+ this.numero_mecanografico = numero_mecanografico;
+ }
+
+ public String getEstabelecimento() {
+ return estabelecimento;
+ }
+
+ public void setEstabelecimento(String estabelecimento) {
+ this.estabelecimento = estabelecimento;
+ }
+
+ public Integer getEstabelecimento_id() {
+ return estabelecimento_id;
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_id) {
+ this.estabelecimento_id = estabelecimento_id;
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Utilizador.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Utilizador.java
new file mode 100644
index 00000000..e0f723b8
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Utilizador.java
@@ -0,0 +1,265 @@
+/*
+ * Utilizador.java
+ *
+ * Created on September 20, 2007, 9:58 AM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package analiseacidentestrabalho;
+
+import java.sql.Date;
+
+/**
+ *
+ * @author lluis
+ */
+public class Utilizador {
+ private Integer id;
+ private String login;
+ private String password;
+ private String email;
+ private Integer empresa_id;
+ private Integer estabelecimento_id;
+ private String administrador;
+ private Integer tipo;
+ private String numero_cedula;
+ private String cap;
+
+ private Integer codigo_permissao;
+
+ private String nome;
+
+ private Integer medico_id;
+ private Integer funcionario_hst_id;
+
+ private String activo;
+
+ private Integer acesso;
+ private String responsavel_loja;
+ private String gestor_geral;
+
+ private String numero_mecanografico;
+ private String categoria; //descricao do 'tipo''
+ private String nome_estabelecimento;
+
+ private String primeiro_login;
+
+ private String apagado;
+
+ private Date data_password;
+
+ private Integer estabelecimento_gestor = null;
+
+ /** Creates a new instance of Utilizador */
+ public Utilizador() {
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getLogin() {
+ return login;
+ }
+
+ public void setLogin(String login) {
+ this.login = login;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public Integer getEmpresa_id() {
+ return empresa_id;
+ }
+
+ public void setEmpresa_id(Integer empresa_id) {
+ this.empresa_id = empresa_id;
+ }
+
+ public Integer getEstabelecimento_id() {
+ return estabelecimento_id;
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_id) {
+ this.estabelecimento_id = estabelecimento_id;
+ }
+
+ public String getAdministrador() {
+ return administrador;
+ }
+
+ public void setAdministrador(String administrador) {
+ this.administrador = administrador;
+ }
+
+ public Integer getCodigo_permissao() {
+ return codigo_permissao;
+ }
+
+ public void setCodigo_permissao(Integer codigo_permissao) {
+ this.codigo_permissao = codigo_permissao;
+ }
+
+ public Integer getTipo() {
+ return tipo;
+ }
+
+ public void setTipo(Integer tipo) {
+ this.tipo = tipo;
+ }
+
+ public String getNumero_cedula() {
+ return numero_cedula;
+ }
+
+ public void setNumero_cedula(String numero_cedula) {
+ this.numero_cedula = numero_cedula;
+ }
+
+ public String getCap() {
+ return cap;
+ }
+
+ public void setCap(String cap) {
+ this.cap = cap;
+ }
+
+ public String getNome() {
+ return nome;
+ }
+
+ public void setNome(String nome) {
+ this.nome = nome;
+ }
+
+ public Integer getMedico_id() {
+ return medico_id;
+ }
+
+ public void setMedico_id(Integer medico_id) {
+ this.medico_id = medico_id;
+ }
+
+ public Integer getFuncionario_hst_id() {
+ return funcionario_hst_id;
+ }
+
+ public void setFuncionario_hst_id(Integer funcionario_hst_id) {
+ this.funcionario_hst_id = funcionario_hst_id;
+ }
+
+ public String getActivo() {
+ return activo;
+ }
+
+ public void setActivo(String activo) {
+ this.activo = activo;
+ }
+
+ public Integer getAcesso() {
+ return acesso;
+ }
+
+ public void setAcesso(Integer acesso) {
+ this.acesso = acesso;
+ }
+
+ public String getResponsavel_loja() {
+ return responsavel_loja;
+ }
+
+ public void setResponsavel_loja(String responsavel_loja) {
+ this.responsavel_loja = responsavel_loja;
+ }
+
+ public String getNumero_mecanografico() {
+ return numero_mecanografico;
+ }
+
+ public void setNumero_mecanografico(String numero_mecanografico) {
+ this.numero_mecanografico = numero_mecanografico;
+ }
+
+ public String getCategoria() {
+ return categoria;
+ }
+
+ public void setCategoria(String categoria) {
+ this.categoria = categoria;
+ }
+
+ public String getNome_estabelecimento() {
+ return nome_estabelecimento;
+ }
+
+ public void setNome_estabelecimento(String nome_estabelecimento) {
+ this.nome_estabelecimento = nome_estabelecimento;
+ }
+
+ public String getGestor_geral() {
+ return gestor_geral;
+ }
+
+ public void setGestor_geral(String gestor_geral) {
+ this.gestor_geral = gestor_geral;
+ }
+
+ public String getPrimeiro_login() {
+ return primeiro_login;
+ }
+
+ public void setPrimeiro_login(String primeiro_login) {
+ this.primeiro_login = primeiro_login;
+ }
+
+ public String getApagado() {
+ return apagado;
+ }
+
+ public void setApagado(String apagado) {
+ this.apagado = apagado;
+ }
+
+ public Date getData_password() {
+ return data_password;
+ }
+
+ public void setData_password(Date data_password) {
+ this.data_password = data_password;
+ }
+
+ /**
+ * @return the estabelecimento_gestor
+ */
+ public Integer getEstabelecimento_gestor() {
+ return estabelecimento_gestor;
+ }
+
+ /**
+ * @param estabelecimento_gestor the estabelecimento_gestor to set
+ */
+ public void setEstabelecimento_gestor(Integer estabelecimento_gestor) {
+ this.estabelecimento_gestor = estabelecimento_gestor;
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/UtilizadorFields.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/UtilizadorFields.java
new file mode 100644
index 00000000..726dd689
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/UtilizadorFields.java
@@ -0,0 +1,1643 @@
+/*
+ * UtilizadorFields.java
+ *
+ * Created on December 4, 2007, 3:27 PM
+ * Copyright lluis
+ */
+package analiseacidentestrabalho;
+
+import com.sun.rave.web.ui.appbase.AbstractPageBean;
+import com.sun.rave.web.ui.component.Body;
+import com.sun.rave.web.ui.component.Button;
+import com.sun.rave.web.ui.component.Checkbox;
+import com.sun.rave.web.ui.component.DropDown;
+import com.sun.rave.web.ui.component.Form;
+import com.sun.rave.web.ui.component.Head;
+import com.sun.rave.web.ui.component.HiddenField;
+import com.sun.rave.web.ui.component.Html;
+import com.sun.rave.web.ui.component.Hyperlink;
+import com.sun.rave.web.ui.component.ImageComponent;
+import com.sun.rave.web.ui.component.Link;
+import com.sun.rave.web.ui.component.Page;
+import com.sun.rave.web.ui.component.PanelGroup;
+import com.sun.rave.web.ui.component.PasswordField;
+import com.sun.rave.web.ui.component.StaticText;
+import com.sun.rave.web.ui.component.TextField;
+import db.AnalisesDataProvider;
+import db.UtilizadoresDataProvider;
+import global.Global;
+import javax.faces.FacesException;
+import javax.faces.component.html.HtmlPanelGrid;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ValueChangeEvent;
+import javax.servlet.http.HttpServletRequest;
+import utils.Utils;
+
+/**
+ * Page bean that corresponds to a similarly named JSP page. This
+ * class contains component definitions (and initialization code) for
+ * all components that you have defined on this page, as well as
+ * lifecycle methods and event handlers where you may add behavior
+ * to respond to incoming events.
+ */
+public class UtilizadorFields extends AbstractPageBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+
+ private Page page1 = new Page();
+
+ public Page getPage1() {
+ return page1;
+ }
+
+ public void setPage1(Page p) {
+ this.page1 = p;
+ }
+
+ private Html html1 = new Html();
+
+ public Html getHtml1() {
+ return html1;
+ }
+
+ public void setHtml1(Html h) {
+ this.html1 = h;
+ }
+
+ private Head head1 = new Head();
+
+ public Head getHead1() {
+ return head1;
+ }
+
+ public void setHead1(Head h) {
+ this.head1 = h;
+ }
+
+ private Link link1 = new Link();
+
+ public Link getLink1() {
+ return link1;
+ }
+
+ public void setLink1(Link l) {
+ this.link1 = l;
+ }
+
+ private Body body1 = new Body();
+
+ public Body getBody1() {
+ return body1;
+ }
+
+ public void setBody1(Body b) {
+ this.body1 = b;
+ }
+
+ private Form form1 = new Form();
+
+ public Form getForm1() {
+ return form1;
+ }
+
+ public void setForm1(Form f) {
+ this.form1 = f;
+ }
+
+ private HtmlPanelGrid gridBase1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridBase1() {
+ return gridBase1;
+ }
+
+ public void setGridBase1(HtmlPanelGrid hpg) {
+ this.gridBase1 = hpg;
+ }
+
+ private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLayout1() {
+ return gridLayout1;
+ }
+
+ public void setGridLayout1(HtmlPanelGrid hpg) {
+ this.gridLayout1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel1() {
+ return gridPanel1;
+ }
+
+ public void setGridPanel1(HtmlPanelGrid hpg) {
+ this.gridPanel1 = hpg;
+ }
+
+ private PanelGroup groupPanel1 = new PanelGroup();
+
+ public PanelGroup getGroupPanel1() {
+ return groupPanel1;
+ }
+
+ public void setGroupPanel1(PanelGroup pg) {
+ this.groupPanel1 = pg;
+ }
+
+ private ImageComponent image1 = new ImageComponent();
+
+ public ImageComponent getImage1() {
+ return image1;
+ }
+
+ public void setImage1(ImageComponent ic) {
+ this.image1 = ic;
+ }
+
+ private ImageComponent image2 = new ImageComponent();
+
+ public ImageComponent getImage2() {
+ return image2;
+ }
+
+ public void setImage2(ImageComponent ic) {
+ this.image2 = ic;
+ }
+
+ private HtmlPanelGrid gridMsg1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridMsg1() {
+ return gridMsg1;
+ }
+
+ public void setGridMsg1(HtmlPanelGrid hpg) {
+ this.gridMsg1 = hpg;
+ }
+
+ private StaticText txtMsg = new StaticText();
+
+ public StaticText getTxtMsg() {
+ return txtMsg;
+ }
+
+ public void setTxtMsg(StaticText st) {
+ this.txtMsg = st;
+ }
+
+ private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel2() {
+ return gridPanel2;
+ }
+
+ public void setGridPanel2(HtmlPanelGrid hpg) {
+ this.gridPanel2 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel3() {
+ return gridPanel3;
+ }
+
+ public void setGridPanel3(HtmlPanelGrid hpg) {
+ this.gridPanel3 = hpg;
+ }
+
+ private PanelGroup groupPanel3 = new PanelGroup();
+
+ public PanelGroup getGroupPanel3() {
+ return groupPanel3;
+ }
+
+ public void setGroupPanel3(PanelGroup pg) {
+ this.groupPanel3 = pg;
+ }
+
+ private StaticText stCriarEditar = new StaticText();
+
+ public StaticText getStCriarEditar() {
+ return stCriarEditar;
+ }
+
+ public void setStCriarEditar(StaticText st) {
+ this.stCriarEditar = st;
+ }
+
+ private StaticText staticText3 = new StaticText();
+
+ public StaticText getStaticText3() {
+ return staticText3;
+ }
+
+ public void setStaticText3(StaticText st) {
+ this.staticText3 = st;
+ }
+
+ private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel6() {
+ return gridPanel6;
+ }
+
+ public void setGridPanel6(HtmlPanelGrid hpg) {
+ this.gridPanel6 = hpg;
+ }
+
+ private PanelGroup groupPanel4 = new PanelGroup();
+
+ public PanelGroup getGroupPanel4() {
+ return groupPanel4;
+ }
+
+ public void setGroupPanel4(PanelGroup pg) {
+ this.groupPanel4 = pg;
+ }
+
+ private StaticText staticText10 = new StaticText();
+
+ public StaticText getStaticText10() {
+ return staticText10;
+ }
+
+ public void setStaticText10(StaticText st) {
+ this.staticText10 = st;
+ }
+
+ private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel7() {
+ return gridPanel7;
+ }
+
+ public void setGridPanel7(HtmlPanelGrid hpg) {
+ this.gridPanel7 = hpg;
+ }
+
+ private Button butCancelar = new Button();
+
+ public Button getButCancelar() {
+ return butCancelar;
+ }
+
+ public void setButCancelar(Button b) {
+ this.butCancelar = b;
+ }
+
+ private PanelGroup groupPanel5 = new PanelGroup();
+
+ public PanelGroup getGroupPanel5() {
+ return groupPanel5;
+ }
+
+ public void setGroupPanel5(PanelGroup pg) {
+ this.groupPanel5 = pg;
+ }
+
+ private Button butGravar = new Button();
+
+ public Button getButGravar() {
+ return butGravar;
+ }
+
+ public void setButGravar(Button b) {
+ this.butGravar = b;
+ }
+
+ private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel4() {
+ return gridPanel4;
+ }
+
+ public void setGridPanel4(HtmlPanelGrid hpg) {
+ this.gridPanel4 = hpg;
+ }
+
+ private StaticText staticText4 = new StaticText();
+
+ public StaticText getStaticText4() {
+ return staticText4;
+ }
+
+ public void setStaticText4(StaticText st) {
+ this.staticText4 = st;
+ }
+
+ private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel5() {
+ return gridPanel5;
+ }
+
+ public void setGridPanel5(HtmlPanelGrid hpg) {
+ this.gridPanel5 = hpg;
+ }
+
+ private PanelGroup groupPanel6 = new PanelGroup();
+
+ public PanelGroup getGroupPanel6() {
+ return groupPanel6;
+ }
+
+ public void setGroupPanel6(PanelGroup pg) {
+ this.groupPanel6 = pg;
+ }
+
+ private PanelGroup groupPanel7 = new PanelGroup();
+
+ public PanelGroup getGroupPanel7() {
+ return groupPanel7;
+ }
+
+ public void setGroupPanel7(PanelGroup pg) {
+ this.groupPanel7 = pg;
+ }
+
+ private StaticText staticText5 = new StaticText();
+
+ public StaticText getStaticText5() {
+ return staticText5;
+ }
+
+ public void setStaticText5(StaticText st) {
+ this.staticText5 = st;
+ }
+
+ private StaticText staticText8 = new StaticText();
+
+ public StaticText getStaticText8() {
+ return staticText8;
+ }
+
+ public void setStaticText8(StaticText st) {
+ this.staticText8 = st;
+ }
+
+ private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel8() {
+ return gridPanel8;
+ }
+
+ public void setGridPanel8(HtmlPanelGrid hpg) {
+ this.gridPanel8 = hpg;
+ }
+
+ private DropDown drpEstabelecimentos = new DropDown();
+
+ public DropDown getDrpEstabelecimentos() {
+ return drpEstabelecimentos;
+ }
+
+ public void setDrpEstabelecimentos(DropDown dd) {
+ this.drpEstabelecimentos = dd;
+ }
+
+ private StaticText stEstabelecimento = new StaticText();
+
+ public StaticText getStEstabelecimento() {
+ return stEstabelecimento;
+ }
+
+ public void setStEstabelecimento(StaticText st) {
+ this.stEstabelecimento = st;
+ }
+
+ private StaticText staticText11 = new StaticText();
+
+ public StaticText getStaticText11() {
+ return staticText11;
+ }
+
+ public void setStaticText11(StaticText st) {
+ this.staticText11 = st;
+ }
+
+ private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel9() {
+ return gridPanel9;
+ }
+
+ public void setGridPanel9(HtmlPanelGrid hpg) {
+ this.gridPanel9 = hpg;
+ }
+
+ private DropDown drpNome = new DropDown();
+
+ public DropDown getDrpNome() {
+ return drpNome;
+ }
+
+ public void setDrpNome(DropDown dd) {
+ this.drpNome = dd;
+ }
+
+ private TextField txtNome = new TextField();
+
+ public TextField getTxtNome() {
+ return txtNome;
+ }
+
+ public void setTxtNome(TextField tf) {
+ this.txtNome = tf;
+ }
+
+ private StaticText stNome = new StaticText();
+
+ public StaticText getStNome() {
+ return stNome;
+ }
+
+ public void setStNome(StaticText st) {
+ this.stNome = st;
+ }
+
+ private StaticText staticText13 = new StaticText();
+
+ public StaticText getStaticText13() {
+ return staticText13;
+ }
+
+ public void setStaticText13(StaticText st) {
+ this.staticText13 = st;
+ }
+
+ private TextField txtLogin = new TextField();
+
+ public TextField getTxtLogin() {
+ return txtLogin;
+ }
+
+ public void setTxtLogin(TextField tf) {
+ this.txtLogin = tf;
+ }
+
+ private StaticText staticText14 = new StaticText();
+
+ public StaticText getStaticText14() {
+ return staticText14;
+ }
+
+ public void setStaticText14(StaticText st) {
+ this.staticText14 = st;
+ }
+
+ private PasswordField txtPassword = new PasswordField();
+
+ public PasswordField getTxtPassword() {
+ return txtPassword;
+ }
+
+ public void setTxtPassword(PasswordField pf) {
+ this.txtPassword = pf;
+ }
+
+ private StaticText staticText15 = new StaticText();
+
+ public StaticText getStaticText15() {
+ return staticText15;
+ }
+
+ public void setStaticText15(StaticText st) {
+ this.staticText15 = st;
+ }
+
+ private TextField txtEmail = new TextField();
+
+ public TextField getTxtEmail() {
+ return txtEmail;
+ }
+
+ public void setTxtEmail(TextField tf) {
+ this.txtEmail = tf;
+ }
+
+ //
+ boolean isPostback = false;
+
+ private HiddenField hidConfDelUser = new HiddenField();
+
+ public HiddenField getHidConfDelUser() {
+ return hidConfDelUser;
+ }
+
+ public void setHidConfDelUser(HiddenField hf) {
+ this.hidConfDelUser = hf;
+ }
+
+ private StaticText staticText7 = new StaticText();
+
+ public StaticText getStaticText7() {
+ return staticText7;
+ }
+
+ public void setStaticText7(StaticText st) {
+ this.staticText7 = st;
+ }
+
+ private PasswordField txtConfPassword = new PasswordField();
+
+ public PasswordField getTxtConfPassword() {
+ return txtConfPassword;
+ }
+
+ public void setTxtConfPassword(PasswordField pf) {
+ this.txtConfPassword = pf;
+ }
+
+ private StaticText stTipo = new StaticText();
+
+ public StaticText getStTipo() {
+ return stTipo;
+ }
+
+ public void setStTipo(StaticText st) {
+ this.stTipo = st;
+ }
+
+ private HtmlPanelGrid gridPanel10 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel10() {
+ return gridPanel10;
+ }
+
+ public void setGridPanel10(HtmlPanelGrid hpg) {
+ this.gridPanel10 = hpg;
+ }
+
+ private PanelGroup groupPanel8 = new PanelGroup();
+
+ public PanelGroup getGroupPanel8() {
+ return groupPanel8;
+ }
+
+ public void setGroupPanel8(PanelGroup pg) {
+ this.groupPanel8 = pg;
+ }
+
+ private Checkbox chkActivo = new Checkbox();
+
+ public Checkbox getChkActivo() {
+ return chkActivo;
+ }
+
+ public void setChkActivo(Checkbox c) {
+ this.chkActivo = c;
+ }
+
+ private StaticText staticText6 = new StaticText();
+
+ public StaticText getStaticText6() {
+ return staticText6;
+ }
+
+ public void setStaticText6(StaticText st) {
+ this.staticText6 = st;
+ }
+
+ private StaticText staticText9 = new StaticText();
+
+ public StaticText getStaticText9() {
+ return staticText9;
+ }
+
+ public void setStaticText9(StaticText st) {
+ this.staticText9 = st;
+ }
+
+ private StaticText lblRespLoja = new StaticText();
+
+ public StaticText getLblRespLoja() {
+ return lblRespLoja;
+ }
+
+ public void setLblRespLoja(StaticText st) {
+ this.lblRespLoja = st;
+ }
+
+ private Checkbox chkRespLoja = new Checkbox();
+
+ public Checkbox getChkRespLoja() {
+ return chkRespLoja;
+ }
+
+ public void setChkRespLoja(Checkbox c) {
+ this.chkRespLoja = c;
+ }
+
+ private StaticText lblGeral = new StaticText();
+
+ public StaticText getLblGeral() {
+ return lblGeral;
+ }
+
+ public void setLblGeral(StaticText st) {
+ this.lblGeral = st;
+ }
+
+ private Checkbox chkGeral = new Checkbox();
+
+ public Checkbox getChkGeral() {
+ return chkGeral;
+ }
+
+ public void setChkGeral(Checkbox c) {
+ this.chkGeral = c;
+ }
+
+ private HtmlPanelGrid gridPanel11 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel11() {
+ return gridPanel11;
+ }
+
+ public void setGridPanel11(HtmlPanelGrid hpg) {
+ this.gridPanel11 = hpg;
+ }
+
+ private PanelGroup groupPanel9 = new PanelGroup();
+
+ public PanelGroup getGroupPanel9() {
+ return groupPanel9;
+ }
+
+ public void setGroupPanel9(PanelGroup pg) {
+ this.groupPanel9 = pg;
+ }
+
+ private StaticText staticText12 = new StaticText();
+
+ public StaticText getStaticText12() {
+ return staticText12;
+ }
+
+ public void setStaticText12(StaticText st) {
+ this.staticText12 = st;
+ }
+
+ private ImageComponent image3 = new ImageComponent();
+
+ public ImageComponent getImage3() {
+ return image3;
+ }
+
+ public void setImage3(ImageComponent ic) {
+ this.image3 = ic;
+ }
+
+ private StaticText staticText16 = new StaticText();
+
+ public StaticText getStaticText16() {
+ return staticText16;
+ }
+
+ public void setStaticText16(StaticText st) {
+ this.staticText16 = st;
+ }
+ private StaticText lblUser = new StaticText();
+
+ public StaticText getLblUser() {
+ return lblUser;
+ }
+
+ public void setLblUser(StaticText st) {
+ this.lblUser = st;
+ }
+ private Hyperlink lnkPlanosActuacao = new Hyperlink();
+
+ public Hyperlink getLnkPlanosActuacao() {
+ return lnkPlanosActuacao;
+ }
+
+ public void setLnkPlanosActuacao(Hyperlink h) {
+ this.lnkPlanosActuacao = h;
+ }
+ /**
+ * Construct a new Page bean instance.
+ */
+ public UtilizadorFields() {
+ }
+
+ /**
+ * Callback method that is called whenever a page is navigated to,
+ * either directly via a URL, or indirectly via page navigation.
+ * Customize this method to acquire resources that will be needed
+ * for event handlers and lifecycle methods, whether or not this
+ * page is performing post back processing.
+ *
+ * Note that, if the current request is a postback, the property
+ * values of the components do not represent any
+ * values submitted with this request. Instead, they represent the
+ * property values that were saved for this view when it was rendered.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("UtilizadorFields Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+ if (!getSessionBean1().isLoggedIn()) {
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {
+ // . . . handle exception . . .
+ }
+ }
+ else
+ {
+
+ lblUser.setText( getSessionBean1().getCurrentUser().getLogin() );
+ HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest();
+ String referer = request.getRequestURI();
+ String pageFrom = Utils.getPageFrom(referer);
+ if(!pageFrom.matches("UtilizadorFields.jsp"))
+ {
+ isPostback = false;
+ }
+ else
+ {
+ isPostback = true;
+ }
+
+ }
+
+ }
+
+ /**
+ * Callback method that is called after the component tree has been
+ * restored, but before any event processing takes place. This method
+ * will only be called on a postback request that
+ * is processing a form submit. Customize this method to allocate
+ * resources that will be required in your event handlers.
+ */
+ public void preprocess() {
+ }
+
+ /**
+ * Callback method that is called just before rendering takes place.
+ * This method will only be called for the page that
+ * will actually be rendered (and not, for example, on a page that
+ * handled a postback and then navigated to a different page). Customize
+ * this method to allocate resources that will be required for rendering
+ * this page.
+ */
+ public void prerender() {
+ if(!isPostback)
+ {
+ if(getSessionBean1().getModoEdicaoUtilizador().matches("new"))
+ {
+ stCriarEditar.setText("CRIAR");
+ initializeNew();
+ }
+ else if( getSessionBean1().getModoEdicaoUtilizador().matches("edit"))
+ {
+ stCriarEditar.setText("EDITAR");
+ fillPage();
+ }
+ }
+ else //postback
+ {
+ String del_user = (String)getExternalContext().getRequestParameterMap().get("del_user");
+ if(del_user != null)
+ {
+ if(del_user.matches("yes"))
+ {
+ hidConfDelUser.setValue("");
+ try
+ {
+ deleteUser();
+ getSessionBean1().setMsg("Utilizador eliminado!");
+ //return "gestao_utilizadores";
+ getSessionBean1().setUserDeleted(true);
+ try {
+ getExternalContext().redirect("GestaoUtilizadores.jsp");
+ } catch(Exception e) {
+ }
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ getSessionBean1().setMsg("Erro na eliminação do utilizador!");
+ }
+ }
+ else if(del_user.matches("no"))
+ {
+ hidConfDelUser.setValue("");
+ fillPage();
+ }
+ }
+
+ }
+
+ txtMsg.setText(getSessionBean1().getMsg());
+ getSessionBean1().setMsg("");
+
+ }
+
+ /**
+ * Callback method that is called after rendering is completed for
+ * this request, if init() was called (regardless of whether
+ * or not this was the page that was actually rendered). Customize this
+ * method to release resources acquired in the init(),
+ * preprocess(), or prerender() methods (or
+ * acquired during execution of an event handler).
+ */
+ public void destroy() {
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected SessionBean1 getSessionBean1() {
+ return (SessionBean1)getBean("SessionBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected RequestBean1 getRequestBean1() {
+ return (RequestBean1)getBean("RequestBean1");
+ }
+
+ public String lnkEditUser_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkLogout_action() {
+ // TODO: Replace with your code
+
+ try
+ {
+ javax.servlet.http.HttpSession session =
+ (javax.servlet.http.HttpSession) getExternalContext().getSession(true);
+ session.invalidate();
+ }
+ catch(Exception ex){}
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {}
+ return null;
+
+ }
+
+ public void drpTipo_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+
+ }
+
+ public void drpNome_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+
+ }
+
+ public String butCancelar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+ String nav_from = getSessionBean1().getNavFrom();
+ if(nav_from.matches("GestaoUtilizadores"))
+ {
+ return "gestao_utilizadores";
+ }
+ else if(nav_from.matches("NovoUtilizador"))
+ {
+ return "novo_utilizador";
+ }
+ return null;
+ }
+
+ public String butApagar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+ hidConfDelUser.setValue("apagar");
+ return null;
+ }
+
+ public String butGravar_action() {
+ // TODO: Process the button click action. Return value is a navigation
+ // case name where null will return to the same page.
+ if(validationOk( getSessionBean1().getModoEdicaoUtilizador() ))
+ {
+ if(getSessionBean1().getModoEdicaoUtilizador().matches("new"))
+ {
+ try
+ {
+ Utilizador u = addUser();
+ addPermissao(u);
+ getSessionBean1().setMsg("Utilizador criado");
+ getSessionBean1().setNewUser(null);
+ return "gestao_utilizadores";
+ }
+ catch(Exception ex)
+ {
+ getSessionBean1().setMsg("Erro na criação do utilizador!");
+ ex.printStackTrace();
+ }
+ }
+ else if( getSessionBean1().getModoEdicaoUtilizador().matches("edit") )
+ {
+ try
+ {
+ updateUser();
+ getSessionBean1().setMsg("Utilizador actualizado");
+ return "gestao_utilizadores";
+ }
+ catch(Exception ex)
+ {
+ getSessionBean1().setMsg("Erro na actualização do utilizador");
+ ex.printStackTrace();
+ }
+ }
+ }
+ return null;
+ }
+
+ private void initializeNew()
+ {
+ //drpTipo.setStyleClass("hidden");
+ //drpEstabelecimentos.setStyleClass("hidden");
+ NewUser u = getSessionBean1().getNewUser();
+ getSessionBean1().setEstabelecimentosOptions(getSessionBean1().getEstabelecimentosOutroOptions());
+ if(u.getEstabelecimento() == null)
+ {
+ drpEstabelecimentos.setDisabled(true);
+ }
+ else
+ {
+ drpEstabelecimentos.setSelected(u.getEstabelecimento());
+ }
+
+ drpNome.setStyleClass("hidden");
+ txtNome.setStyleClass("hidden");
+
+
+ stTipo.setText(u.getTipo_descricao());
+ //stEstabelecimento.setText(u.getEstabelecimento_descricao());
+ stEstabelecimento.setStyleClass("hidden");
+ stNome.setText(Utils.unicodeToHTML(u.getNome()));
+
+ txtLogin.setText("");
+ txtPassword.setText("");
+ txtConfPassword.setText("");
+ txtEmail.setText("");
+
+
+ chkActivo.setSelected(new Boolean(true));
+ lblGeral.setRendered(false);
+ chkGeral.setRendered(false);
+ lblRespLoja.setRendered(false);
+ chkRespLoja.setRendered(false);
+ }
+
+ private void fillPage()
+ {
+ UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ //Integer permissao = udp.getPermissionCode( getSessionBean1().getCurrentUser().getId() );
+ //getSessionBean1().setTiposOptions(adp.getTiposList(permissao));
+ getSessionBean1().setTiposOptions(adp.getTiposList());
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ Utilizador u = getSessionBean1().getEditUser();
+ //stTipo.setStyleClass("hidden");
+ stEstabelecimento.setStyleClass("hidden");
+ stNome.setStyleClass("hidden");
+
+ System.out.println("ACTIVO = " + u.getActivo());
+ if(u.getActivo().matches("y"))
+ {
+ chkActivo.setSelected(new Boolean(true));
+ }
+ else
+ {
+ chkActivo.setSelected(new Boolean(false));
+ }
+ //drpTipo.setSelected(u.getTipo());
+ try
+ {
+ stTipo.setText(adp.getTipoDescricao(u.getTipo()));
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ drpEstabelecimentos.setSelected(u.getEstabelecimento_id());
+
+ if(u.getTipo().intValue() == 3) //hs
+ {
+ drpNome.setStyleClass("hidden");
+ txtNome.setText(Utils.unicodeToHTML(u.getNome()));
+ }
+ else if(u.getTipo().intValue() == 5) //medico
+ {
+ drpNome.setStyleClass("hidden");
+ System.out.println("MEDICA : " + Utils.unicodeToHTML(u.getNome()));
+ txtNome.setText(Utils.unicodeToHTML(u.getNome()));
+ }
+ else
+ {
+ drpNome.setStyleClass("hidden");
+ txtNome.setText(Utils.unicodeToHTML(u.getNome()));
+ }
+
+ if(u.getTipo().intValue() == 6) // gestor
+ {
+ chkGeral.setSelected(new Boolean(false));
+ if(u.getGestor_geral().matches("y"))
+ {
+ chkGeral.setSelected(new Boolean(true));
+ }
+ }
+ else
+ {
+ lblGeral.setRendered(false);
+ chkGeral.setRendered(false);
+ }
+
+
+ if(u.getTipo().intValue() == 1 || u.getTipo().intValue() == 2)
+ {
+ chkRespLoja.setSelected(new Boolean(false));
+ if(u.getResponsavel_loja().matches("y"))
+ {
+ chkRespLoja.setSelected(new Boolean(true));
+ }
+ }
+ else
+ {
+ lblRespLoja.setRendered(false);
+ chkRespLoja.setRendered(false);
+ }
+
+ txtLogin.setText(u.getLogin());
+ //txtPassword.setText(u.getPassword());
+ txtEmail.setText(u.getEmail());
+
+ }
+
+ private boolean validationOk(String modo)
+ {
+ if(modo.matches("new"))
+ {
+ if(txtLogin.getText() == null)
+ {
+ getSessionBean1().setMsg("Tem de indicar o login!");
+ return false;
+ }
+ else
+ {
+ String login = (String) txtLogin.getText();
+ if(login.trim().length() == 0)
+ {
+ getSessionBean1().setMsg("Tem de indicar o login!");
+ return false;
+ }
+ else
+ {
+ UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
+ try
+ {
+ Utilizador u = udp.getUtilizador(login);
+ if(u.getLogin().equals(login))
+ {
+ getSessionBean1().setMsg("O utilizador " + login + " já existe!");
+ return false;
+ }
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+ }
+
+ if(txtPassword.getText() == null)
+ {
+ getSessionBean1().setMsg("Tem de indicar a password!");
+ return false;
+ }
+ else
+ {
+ String password = (String) txtPassword.getText();
+ if(password.trim().length() == 0)
+ {
+ getSessionBean1().setMsg("Tem de indicar a password!");
+ return false;
+ }
+ else
+ {
+ if(txtConfPassword.getText() == null)
+ {
+ getSessionBean1().setMsg("Tem de confirmar a password!");
+ return false;
+ }
+ else
+ {
+ String conf_password = (String) txtConfPassword.getText();
+ if(conf_password.trim().length() == 0)
+ {
+ getSessionBean1().setMsg("Tem de confirmar a password!");
+ return false;
+ }
+ else
+ {
+ if(!password.equals(conf_password))
+ {
+ getSessionBean1().setMsg("A confirmação tem de ser igual à a password!");
+ return false;
+ }
+ }
+ }
+ } //
+ }
+
+ if(txtEmail.getText() != null)
+ {
+ String email = (String) txtEmail.getText();
+ if(email.trim().length() > 0)
+ {
+ if(! Utils.isValidEmail(email))
+ {
+ getSessionBean1().setMsg("Email inválido!");
+ return false;
+ }
+
+ }
+ else
+ {
+ getSessionBean1().setMsg("Tem de indicar o email!");
+ return false;
+ }
+ }
+ else
+ {
+ getSessionBean1().setMsg("Tem de indicar o email!");
+ return false;
+ }
+
+ }
+ else if(modo.matches("edit"))
+ {
+ Utilizador u = getSessionBean1().getEditUser();
+
+// Integer iTipo = (Integer) drpTipo.getSelected();
+// if(iTipo.intValue() == 0)
+// {
+// getSessionBean1().setMsg("Falta tipo !");
+// return false;
+// }
+
+ int tipo = u.getTipo().intValue();
+
+ if(tipo != 3)
+ {
+ Integer estabelecimento = (Integer) drpEstabelecimentos.getSelected();
+ if(estabelecimento.intValue() == -1)
+ {
+ getSessionBean1().setMsg("Falta estabelecimento!");
+ return false;
+ }
+ }
+
+// if(tipo == 3 || tipo == 5)
+// {
+// Integer nome = (Integer) drpNome.getSelected();
+// if(nome.intValue() == 0)
+// {
+// getSessionBean1().setMsg("Falta nome !");
+// return false;
+// }
+// }
+// else
+// {
+ if(txtNome.getText() == null)
+ {
+ getSessionBean1().setMsg("Falta nome!");
+
+ return false;
+ }
+ else
+ {
+ String nome = (String) txtNome.getText();
+ if(nome.trim().length() == 0)
+ {
+ getSessionBean1().setMsg("Falta nome!");
+ return false;
+ }
+ }
+// }
+
+
+ if(txtLogin.getText() == null)
+ {
+ getSessionBean1().setMsg("Tem de indicar o login!");
+ return false;
+ }
+ else
+ {
+ String login = (String) txtLogin.getText();
+ if(login.trim().length() == 0)
+ {
+ getSessionBean1().setMsg("Tem de indicar o login!");
+ return false;
+ }
+ else
+ {
+ if(!login.equals(u.getLogin()))
+ {
+ UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
+ try
+ {
+ Utilizador ut = udp.getUtilizador(login);
+ if(ut.getLogin().equals(login))
+ {
+ getSessionBean1().setMsg("O utilizador " + login + " já existe!");
+ return false;
+ }
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+
+ }
+ }
+// if(txtPassword.getText() == null)
+// {
+// getSessionBean1().setMsg("Falta password!");
+// return false;
+// }
+// else
+ if(txtPassword.getText() != null)
+ {
+ String password = (String) txtPassword.getText();
+ if(password.trim().length() > 0)
+ {
+ if(! password.equals(u.getPassword()))
+ {
+ if(txtConfPassword.getText() == null)
+ {
+ getSessionBean1().setMsg("Tem de confirmar a password!");
+ return false;
+ }
+ else
+ {
+ String conf_password = (String) txtConfPassword.getText();
+ if(conf_password.trim().length() == 0)
+ {
+ getSessionBean1().setMsg("Tem de confirmar a password!");
+ return false;
+ }
+ else
+ {
+ if(!password.equals(conf_password))
+ {
+ getSessionBean1().setMsg("A confirmação tem de ser igual à password!");
+ return false;
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ if(txtConfPassword.getText() != null)
+ {
+ String conf = (String) txtConfPassword.getText();
+ if(conf.trim().length() > 0)
+ {
+ getSessionBean1().setMsg("Falta password!");
+ return false;
+ }
+ }
+ }
+ }
+ else
+ {
+ if(txtConfPassword.getText() != null)
+ {
+ String conf = (String) txtConfPassword.getText();
+ if(conf.trim().length() > 0)
+ {
+ getSessionBean1().setMsg("Falta password!");
+ return false;
+ }
+ }
+ }
+
+ if(txtEmail.getText() != null)
+ {
+ String email = (String) txtEmail.getText();
+ if(email.trim().length() > 0)
+ {
+ if(! Utils.isValidEmail(email))
+ {
+ getSessionBean1().setMsg("Email inválido!");
+ return false;
+ }
+
+ }
+ }
+ else
+ {
+ getSessionBean1().setMsg("Tem de indicar o email!");
+ return false;
+ }
+
+ }
+ return true;
+ }
+
+ private Utilizador addUser() throws Exception
+ {
+ Utilizador u = fillUser();
+ UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
+ Integer id = udp.createNewUtilizador(u);
+ u.setId(id);
+ return u;
+ }
+
+ private void addPermissao(Utilizador u) throws Exception
+ {
+ Permissao p = new Permissao();
+ p.setUser_id(u.getId());
+ p.setCodigo_permissao(u.getTipo());
+ UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
+ udp.createPermissao(p);
+ }
+
+ private void updateUser() throws Exception
+ {
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ //Utilizador u = fillUser();
+ Utilizador u = getSessionBean1().getEditUser();
+
+
+ //u.setTipo((Integer) drpTipo.getSelected());
+ u.setEstabelecimento_id( (Integer) drpEstabelecimentos.getSelected() );
+
+ int tipo = u.getTipo().intValue();
+// if(tipo == 3)
+// {
+// u.setFuncionario_hst_id((Integer) drpNome.getSelected());
+// u.setNome( adp.getTecnicoSaudeNome( u.getFuncionario_hst_id() ) );
+// }
+// else if(tipo == 5)
+// {
+// u.setMedico_id( (Integer) drpNome.getSelected() );
+// u.setNome( adp.getMedicoNome(u.getMedico_id()) );
+// }
+ u.setActivo("n");
+ if(chkActivo.getSelected() != null)
+ {
+ if(chkActivo.getSelected().equals(new Boolean(true)))
+ {
+ u.setActivo("y");
+ }
+ }
+ u.setNome((String) txtNome.getText());
+ u.setLogin((String) txtLogin.getText());
+ if(txtPassword.getText() != null)
+ {
+ String password = (String) txtPassword.getText();
+ if(password.trim().length() > 0)
+ {
+ u.setPassword(password);
+ }
+ }
+
+ u.setEmail((String) txtEmail.getText());
+
+ u.setGestor_geral("n");
+ try
+ {
+ if(chkGeral.getSelected() != null)
+ {
+ if(chkGeral.getSelected().equals(new Boolean(true)) )
+ {
+ u.setGestor_geral("y");
+ }
+ }
+ }
+ catch(Exception ex){}
+
+ u.setResponsavel_loja("n");
+ try
+ {
+ if(chkRespLoja.getSelected() != null)
+ {
+ if(chkRespLoja.getSelected().equals(new Boolean(true)) )
+ {
+ u.setResponsavel_loja("y");
+ }
+ }
+ }
+ catch(Exception ex){}
+ u.setPrimeiro_login("n");
+ UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
+ udp.updateUtilizador(u);
+ }
+
+
+ private Utilizador fillUser()
+ {
+ NewUser nu = getSessionBean1().getNewUser();
+ Utilizador u = new Utilizador();
+ u.setActivo("n");
+ if(chkActivo.getSelected() != null)
+ {
+ if(chkActivo.getSelected().equals(new Boolean(true)))
+ {
+ u.setActivo("y");
+ }
+ }
+ u.setAdministrador("n");
+ u.setTipo(nu.getTipo());
+ u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id());
+ //u.setEstabelecimento_id( nu.getEstabelecimento() );
+ if(nu.getEstabelecimento() != null)
+ {
+ u.setEstabelecimento_id((Integer) drpEstabelecimentos.getSelected());
+ }
+ u.setNome(Utils.unicodeToHTML(nu.getNome()));
+ u.setLogin( (String) txtLogin.getText() );
+ u.setPassword( (String) txtPassword.getText() );
+ java.util.Date today =
+ new java.util.Date();
+ java.sql.Date sqlToday =
+ new java.sql.Date(today.getTime());
+ u.setData_password(sqlToday);
+ u.setEmail("");
+ u.setNumero_mecanografico(nu.getNumero_mecanografico());
+ if(txtEmail.getText() != null)
+ {
+ u.setEmail( (String) txtEmail.getText() );
+ }
+
+ Integer tipo = (Integer) nu.getTipo();
+
+ u.setNumero_cedula("");
+ u.setCap("");
+ if(tipo.intValue() == 3 || tipo.intValue() == 5)
+ {
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ if(tipo.intValue() == 3)
+ {
+ try
+ {
+ //Integer tecnico_id = (Integer) drpNome.getSelected();
+ //u.setFuncionario_hst_id(tecnico_id);
+ //u.setNome( adp.getTecnicoSaudeNome(tecnico_id) );
+ u.setFuncionario_hst_id(nu.getFuncionario_hst_id());
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ u.setCap( nu.getCap());
+ }
+ else // medico
+ {
+ try
+ {
+ //Integer medico_id = (Integer) drpNome.getSelected();
+ //u.setMedico_id(medico_id);
+ //u.setNome( adp.getMedicoNome(medico_id) );
+ u.setMedico_id(nu.getMedico_id());
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ //u.setNumero_cedula( (String) stCedula.getText());
+ u.setNumero_cedula(nu.getNumero_cedula());
+ }
+ }
+// else
+// {
+// u.setNome( (String) txtNome.getText() );
+// }
+
+ u.setResponsavel_loja(nu.getResponsavel_loja());
+ if(nu.getGestor_geral() == null)
+ {
+ u.setGestor_geral("n");
+ }
+ else
+ {
+ u.setGestor_geral(nu.getGestor_geral());
+ }
+
+
+// u.setResponsavel_loja("n");
+// if(chkResponsavelLoja.getSelected() != null)
+// {
+// if(chkResponsavelLoja.getSelected().equals(new Boolean(true)))
+// {
+// u.setResponsavel_loja("y");
+// }
+// }
+ return u;
+ }
+
+ private void deleteUser() throws Exception
+ {
+ UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
+ udp.deleteUser(getSessionBean1().getEditUser().getId());
+ }
+
+ public String lnkNewUser_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkAnalisesAcidente_action() {
+ // TODO: Replace with your code
+ Integer tipo_utilizador = getSessionBean1().getCurrentUser().getTipo();
+ if(tipo_utilizador.intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP)
+ {
+ return "form_dir_siprp";
+ }
+ else if(tipo_utilizador.intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_GERAL_RH)
+ {
+ return "form_dir_ger_rh";
+ }
+
+ return null;
+ }
+
+ public void drpEstabelecimentos_processValueChange(ValueChangeEvent event) {
+ // TODO: Replace with your code
+
+ }
+
+ public String lnkAjuda_action() {
+ // TODO: Replace with your code
+// ServletContext theApplicationsServletContext =
+// (ServletContext) this.getExternalContext().getContext();
+// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL);
+// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf";
+//
+// Global global = new Global();
+// try
+// {
+// global.showPdf(pdfFilePath);
+// }
+// catch(Exception ex)
+// {
+// ex.printStackTrace();
+// }
+ return null;
+ }
+
+ public String lnkPlanosActuacao_action() {
+ // TODO: Replace with your code
+ Utilizador u = getSessionBean1().getCurrentUser();
+// String curUser = "?user=" + u.getId().toString();
+ FacesContext fc = getFacesContext().getCurrentInstance();
+ Global.redirectToPlanos(fc, u);
+ return null;
+ }
+}
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/ViewAnaliseAcidenteTrabalho.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/ViewAnaliseAcidenteTrabalho.java
new file mode 100644
index 00000000..c50f30eb
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/ViewAnaliseAcidenteTrabalho.java
@@ -0,0 +1,4554 @@
+/*
+ * ViewAnaliseAcidenteTrabalho.java
+ *
+ * Created on October 1, 2007, 10:48 AM
+ * Copyright lluis
+ */
+package analiseacidentestrabalho;
+
+import com.sun.rave.web.ui.appbase.AbstractPageBean;
+import com.sun.rave.web.ui.component.Body;
+import com.sun.rave.web.ui.component.Button;
+import com.sun.rave.web.ui.component.Form;
+import com.sun.rave.web.ui.component.Head;
+import com.sun.rave.web.ui.component.HiddenField;
+import com.sun.rave.web.ui.component.Html;
+import com.sun.rave.web.ui.component.Hyperlink;
+import com.sun.rave.web.ui.component.ImageComponent;
+import com.sun.rave.web.ui.component.Link;
+import com.sun.rave.web.ui.component.Page;
+import com.sun.rave.web.ui.component.PanelGroup;
+import com.sun.rave.web.ui.component.StaticText;
+import db.AnalisesDataProvider;
+import db.UtilizadoresDataProvider;
+import global.Global;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.ListIterator;
+import javax.faces.FacesException;
+import javax.faces.component.html.HtmlPanelGrid;
+import javax.servlet.ServletContext;
+import utils.Utils;
+
+/**
+ * Page bean that corresponds to a similarly named JSP page. This
+ * class contains component definitions (and initialization code) for
+ * all components that you have defined on this page, as well as
+ * lifecycle methods and event handlers where you may add behavior
+ * to respond to incoming events.
+ */
+public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
+ //
+ private int __placeholder;
+
+ /**
+ * Automatically managed component initialization. WARNING:
+ * This method is automatically generated, so any user-specified code inserted
+ * here is subject to being replaced.
+ */
+ private void _init() throws Exception {
+ }
+
+ private Page page1 = new Page();
+
+ public Page getPage1() {
+ return page1;
+ }
+
+ public void setPage1(Page p) {
+ this.page1 = p;
+ }
+
+ private Html html1 = new Html();
+
+ public Html getHtml1() {
+ return html1;
+ }
+
+ public void setHtml1(Html h) {
+ this.html1 = h;
+ }
+
+ private Head head1 = new Head();
+
+ public Head getHead1() {
+ return head1;
+ }
+
+ public void setHead1(Head h) {
+ this.head1 = h;
+ }
+
+ private Link link1 = new Link();
+
+ public Link getLink1() {
+ return link1;
+ }
+
+ public void setLink1(Link l) {
+ this.link1 = l;
+ }
+
+ private Body body1 = new Body();
+
+ public Body getBody1() {
+ return body1;
+ }
+
+ public void setBody1(Body b) {
+ this.body1 = b;
+ }
+
+ private Form form1 = new Form();
+
+ public Form getForm1() {
+ return form1;
+ }
+
+ public void setForm1(Form f) {
+ this.form1 = f;
+ }
+
+ private HtmlPanelGrid gridBase1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridBase1() {
+ return gridBase1;
+ }
+
+ public void setGridBase1(HtmlPanelGrid hpg) {
+ this.gridBase1 = hpg;
+ }
+
+ private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLayout1() {
+ return gridLayout1;
+ }
+
+ public void setGridLayout1(HtmlPanelGrid hpg) {
+ this.gridLayout1 = hpg;
+ }
+
+ private HtmlPanelGrid gridMsg1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridMsg1() {
+ return gridMsg1;
+ }
+
+ public void setGridMsg1(HtmlPanelGrid hpg) {
+ this.gridMsg1 = hpg;
+ }
+
+ private StaticText txtMsg1 = new StaticText();
+
+ public StaticText getTxtMsg1() {
+ return txtMsg1;
+ }
+
+ public void setTxtMsg1(StaticText st) {
+ this.txtMsg1 = st;
+ }
+
+ private HtmlPanelGrid gridCabecalho1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridCabecalho1() {
+ return gridCabecalho1;
+ }
+
+ public void setGridCabecalho1(HtmlPanelGrid hpg) {
+ this.gridCabecalho1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel2() {
+ return gridPanel2;
+ }
+
+ public void setGridPanel2(HtmlPanelGrid hpg) {
+ this.gridPanel2 = hpg;
+ }
+
+ private StaticText lblEmpresa1 = new StaticText();
+
+ public StaticText getLblEmpresa1() {
+ return lblEmpresa1;
+ }
+
+ public void setLblEmpresa1(StaticText st) {
+ this.lblEmpresa1 = st;
+ }
+
+ private StaticText txtEmpresa = new StaticText();
+
+ public StaticText getTxtEmpresa() {
+ return txtEmpresa;
+ }
+
+ public void setTxtEmpresa(StaticText st) {
+ this.txtEmpresa = st;
+ }
+
+ private StaticText staticText4 = new StaticText();
+
+ public StaticText getStaticText4() {
+ return staticText4;
+ }
+
+ public void setStaticText4(StaticText st) {
+ this.staticText4 = st;
+ }
+
+ private StaticText txtEstabelecimento = new StaticText();
+
+ public StaticText getTxtEstabelecimento() {
+ return txtEstabelecimento;
+ }
+
+ public void setTxtEstabelecimento(StaticText st) {
+ this.txtEstabelecimento = st;
+ }
+
+ private StaticText lblTrabalhador1 = new StaticText();
+
+ public StaticText getLblTrabalhador1() {
+ return lblTrabalhador1;
+ }
+
+ public void setLblTrabalhador1(StaticText st) {
+ this.lblTrabalhador1 = st;
+ }
+
+ private StaticText txtTrabalhador = new StaticText();
+
+ public StaticText getTxtTrabalhador() {
+ return txtTrabalhador;
+ }
+
+ public void setTxtTrabalhador(StaticText st) {
+ this.txtTrabalhador = st;
+ }
+
+ private HtmlPanelGrid gridDadosAcidenteSegView = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridDadosAcidenteSegView() {
+ return gridDadosAcidenteSegView;
+ }
+
+ public void setGridDadosAcidenteSegView(HtmlPanelGrid hpg) {
+ this.gridDadosAcidenteSegView = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel8() {
+ return gridPanel8;
+ }
+
+ public void setGridPanel8(HtmlPanelGrid hpg) {
+ this.gridPanel8 = hpg;
+ }
+
+ private StaticText staticText13 = new StaticText();
+
+ public StaticText getStaticText13() {
+ return staticText13;
+ }
+
+ public void setStaticText13(StaticText st) {
+ this.staticText13 = st;
+ }
+
+ private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel9() {
+ return gridPanel9;
+ }
+
+ public void setGridPanel9(HtmlPanelGrid hpg) {
+ this.gridPanel9 = hpg;
+ }
+
+ private HtmlPanelGrid gridTurnoSeccaoLocal = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridTurnoSeccaoLocal() {
+ return gridTurnoSeccaoLocal;
+ }
+
+ public void setGridTurnoSeccaoLocal(HtmlPanelGrid hpg) {
+ this.gridTurnoSeccaoLocal = hpg;
+ }
+
+ private HtmlPanelGrid gridTarefa = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridTarefa() {
+ return gridTarefa;
+ }
+
+ public void setGridTarefa(HtmlPanelGrid hpg) {
+ this.gridTarefa = hpg;
+ }
+
+ private StaticText lblTarefa = new StaticText();
+
+ public StaticText getLblTarefa() {
+ return lblTarefa;
+ }
+
+ public void setLblTarefa(StaticText st) {
+ this.lblTarefa = st;
+ }
+
+ private HtmlPanelGrid gridSubstancias = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridSubstancias() {
+ return gridSubstancias;
+ }
+
+ public void setGridSubstancias(HtmlPanelGrid hpg) {
+ this.gridSubstancias = hpg;
+ }
+
+ private StaticText lblSubstancias = new StaticText();
+
+ public StaticText getLblSubstancias() {
+ return lblSubstancias;
+ }
+
+ public void setLblSubstancias(StaticText st) {
+ this.lblSubstancias = st;
+ }
+
+ private HtmlPanelGrid gridCondicoes = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridCondicoes() {
+ return gridCondicoes;
+ }
+
+ public void setGridCondicoes(HtmlPanelGrid hpg) {
+ this.gridCondicoes = hpg;
+ }
+
+ private StaticText lblCondicoes = new StaticText();
+
+ public StaticText getLblCondicoes() {
+ return lblCondicoes;
+ }
+
+ public void setLblCondicoes(StaticText st) {
+ this.lblCondicoes = st;
+ }
+
+ private HtmlPanelGrid gridTestemunhas = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridTestemunhas() {
+ return gridTestemunhas;
+ }
+
+ public void setGridTestemunhas(HtmlPanelGrid hpg) {
+ this.gridTestemunhas = hpg;
+ }
+
+ private StaticText lblTestemunhas = new StaticText();
+
+ public StaticText getLblTestemunhas() {
+ return lblTestemunhas;
+ }
+
+ public void setLblTestemunhas(StaticText st) {
+ this.lblTestemunhas = st;
+ }
+
+ private HtmlPanelGrid gridCausas = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridCausas() {
+ return gridCausas;
+ }
+
+ public void setGridCausas(HtmlPanelGrid hpg) {
+ this.gridCausas = hpg;
+ }
+
+ private StaticText lblCausas = new StaticText();
+
+ public StaticText getLblCausas() {
+ return lblCausas;
+ }
+
+ public void setLblCausas(StaticText st) {
+ this.lblCausas = st;
+ }
+
+ private HtmlPanelGrid gridDescricao = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridDescricao() {
+ return gridDescricao;
+ }
+
+ public void setGridDescricao(HtmlPanelGrid hpg) {
+ this.gridDescricao = hpg;
+ }
+
+ private StaticText lblDescricao = new StaticText();
+
+ public StaticText getLblDescricao() {
+ return lblDescricao;
+ }
+
+ public void setLblDescricao(StaticText st) {
+ this.lblDescricao = st;
+ }
+
+ private HtmlPanelGrid gridFotografias = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridFotografias() {
+ return gridFotografias;
+ }
+
+ public void setGridFotografias(HtmlPanelGrid hpg) {
+ this.gridFotografias = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel19 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel19() {
+ return gridPanel19;
+ }
+
+ public void setGridPanel19(HtmlPanelGrid hpg) {
+ this.gridPanel19 = hpg;
+ }
+
+ private StaticText lblFotografias = new StaticText();
+
+ public StaticText getLblFotografias() {
+ return lblFotografias;
+ }
+
+ public void setLblFotografias(StaticText st) {
+ this.lblFotografias = st;
+ }
+
+ private HtmlPanelGrid gridImages = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridImages() {
+ return gridImages;
+ }
+
+ public void setGridImages(HtmlPanelGrid hpg) {
+ this.gridImages = hpg;
+ }
+
+ private HtmlPanelGrid gridConclusoes = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridConclusoes() {
+ return gridConclusoes;
+ }
+
+ public void setGridConclusoes(HtmlPanelGrid hpg) {
+ this.gridConclusoes = hpg;
+ }
+
+ private StaticText lblConclusoes = new StaticText();
+
+ public StaticText getLblConclusoes() {
+ return lblConclusoes;
+ }
+
+ public void setLblConclusoes(StaticText st) {
+ this.lblConclusoes = st;
+ }
+
+ private HtmlPanelGrid gridAccoes = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridAccoes() {
+ return gridAccoes;
+ }
+
+ public void setGridAccoes(HtmlPanelGrid hpg) {
+ this.gridAccoes = hpg;
+ }
+
+ private StaticText lblAccoes = new StaticText();
+
+ public StaticText getLblAccoes() {
+ return lblAccoes;
+ }
+
+ public void setLblAccoes(StaticText st) {
+ this.lblAccoes = st;
+ }
+
+ private StaticText txtAccoes = new StaticText();
+
+ public StaticText getTxtAccoes() {
+ return txtAccoes;
+ }
+
+ public void setTxtAccoes(StaticText st) {
+ this.txtAccoes = st;
+ }
+
+ private StaticText txtConclusoes = new StaticText();
+
+ public StaticText getTxtConclusoes() {
+ return txtConclusoes;
+ }
+
+ public void setTxtConclusoes(StaticText st) {
+ this.txtConclusoes = st;
+ }
+
+ private StaticText txtDescricao = new StaticText();
+
+ public StaticText getTxtDescricao() {
+ return txtDescricao;
+ }
+
+ public void setTxtDescricao(StaticText st) {
+ this.txtDescricao = st;
+ }
+
+ private StaticText txtCausas = new StaticText();
+
+ public StaticText getTxtCausas() {
+ return txtCausas;
+ }
+
+ public void setTxtCausas(StaticText st) {
+ this.txtCausas = st;
+ }
+
+ private StaticText txtTestemunhas = new StaticText();
+
+ public StaticText getTxtTestemunhas() {
+ return txtTestemunhas;
+ }
+
+ public void setTxtTestemunhas(StaticText st) {
+ this.txtTestemunhas = st;
+ }
+
+ private StaticText txtCondicoes = new StaticText();
+
+ public StaticText getTxtCondicoes() {
+ return txtCondicoes;
+ }
+
+ public void setTxtCondicoes(StaticText st) {
+ this.txtCondicoes = st;
+ }
+
+ private StaticText txtSubstancias = new StaticText();
+
+ public StaticText getTxtSubstancias() {
+ return txtSubstancias;
+ }
+
+ public void setTxtSubstancias(StaticText st) {
+ this.txtSubstancias = st;
+ }
+
+ private StaticText txtTarefa = new StaticText();
+
+ public StaticText getTxtTarefa() {
+ return txtTarefa;
+ }
+
+ public void setTxtTarefa(StaticText st) {
+ this.txtTarefa = st;
+ }
+
+ //
+ //private String IMAGE_URL = "/resources/images";
+
+ private final static int IMAGE_WIDTH = 48;
+ private final static int IMAGE_HEIGHT = 48;
+
+
+ private HtmlPanelGrid gridDadosAcidenteRhView = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridDadosAcidenteRhView() {
+ return gridDadosAcidenteRhView;
+ }
+
+ public void setGridDadosAcidenteRhView(HtmlPanelGrid hpg) {
+ this.gridDadosAcidenteRhView = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel3() {
+ return gridPanel3;
+ }
+
+ public void setGridPanel3(HtmlPanelGrid hpg) {
+ this.gridPanel3 = hpg;
+ }
+
+ private StaticText staticText5 = new StaticText();
+
+ public StaticText getStaticText5() {
+ return staticText5;
+ }
+
+ public void setStaticText5(StaticText st) {
+ this.staticText5 = st;
+ }
+
+ private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel4() {
+ return gridPanel4;
+ }
+
+ public void setGridPanel4(HtmlPanelGrid hpg) {
+ this.gridPanel4 = hpg;
+ }
+
+ private HtmlPanelGrid gridSHST = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridSHST() {
+ return gridSHST;
+ }
+
+ public void setGridSHST(HtmlPanelGrid hpg) {
+ this.gridSHST = hpg;
+ }
+
+ private HtmlPanelGrid gridColaborador = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridColaborador() {
+ return gridColaborador;
+ }
+
+ public void setGridColaborador(HtmlPanelGrid hpg) {
+ this.gridColaborador = hpg;
+ }
+
+ private HtmlPanelGrid gridColaboradores = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridColaboradores() {
+ return gridColaboradores;
+ }
+
+ public void setGridColaboradores(HtmlPanelGrid hpg) {
+ this.gridColaboradores = hpg;
+ }
+
+ private HtmlPanelGrid gridRecomendacoesViewHS = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridRecomendacoesViewHS() {
+ return gridRecomendacoesViewHS;
+ }
+
+ public void setGridRecomendacoesViewHS(HtmlPanelGrid hpg) {
+ this.gridRecomendacoesViewHS = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel23 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel23() {
+ return gridPanel23;
+ }
+
+ public void setGridPanel23(HtmlPanelGrid hpg) {
+ this.gridPanel23 = hpg;
+ }
+
+ private StaticText staticText29 = new StaticText();
+
+ public StaticText getStaticText29() {
+ return staticText29;
+ }
+
+ public void setStaticText29(StaticText st) {
+ this.staticText29 = st;
+ }
+
+ private HtmlPanelGrid gridRecomendacoesView = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridRecomendacoesView() {
+ return gridRecomendacoesView;
+ }
+
+ public void setGridRecomendacoesView(HtmlPanelGrid hpg) {
+ this.gridRecomendacoesView = hpg;
+ }
+
+ private HtmlPanelGrid gridMedidasViewRH = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridMedidasViewRH() {
+ return gridMedidasViewRH;
+ }
+
+ public void setGridMedidasViewRH(HtmlPanelGrid hpg) {
+ this.gridMedidasViewRH = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel24 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel24() {
+ return gridPanel24;
+ }
+
+ public void setGridPanel24(HtmlPanelGrid hpg) {
+ this.gridPanel24 = hpg;
+ }
+
+ private StaticText staticText30 = new StaticText();
+
+ public StaticText getStaticText30() {
+ return staticText30;
+ }
+
+ public void setStaticText30(StaticText st) {
+ this.staticText30 = st;
+ }
+
+ private HtmlPanelGrid gridMedidasView = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridMedidasView() {
+ return gridMedidasView;
+ }
+
+ public void setGridMedidasView(HtmlPanelGrid hpg) {
+ this.gridMedidasView = hpg;
+ }
+
+ private HtmlPanelGrid gridMedicoView = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridMedicoView() {
+ return gridMedicoView;
+ }
+
+ public void setGridMedicoView(HtmlPanelGrid hpg) {
+ this.gridMedicoView = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel25 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel25() {
+ return gridPanel25;
+ }
+
+ public void setGridPanel25(HtmlPanelGrid hpg) {
+ this.gridPanel25 = hpg;
+ }
+
+ private StaticText staticText31 = new StaticText();
+
+ public StaticText getStaticText31() {
+ return staticText31;
+ }
+
+ public void setStaticText31(StaticText st) {
+ this.staticText31 = st;
+ }
+
+ private HtmlPanelGrid gridLesao = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridLesao() {
+ return gridLesao;
+ }
+
+ public void setGridLesao(HtmlPanelGrid hpg) {
+ this.gridLesao = hpg;
+ }
+
+ private StaticText lblAreasCorporais = new StaticText();
+
+ public StaticText getLblAreasCorporais() {
+ return lblAreasCorporais;
+ }
+
+ public void setLblAreasCorporais(StaticText st) {
+ this.lblAreasCorporais = st;
+ }
+
+ private HtmlPanelGrid gridPanel26 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel26() {
+ return gridPanel26;
+ }
+
+ public void setGridPanel26(HtmlPanelGrid hpg) {
+ this.gridPanel26 = hpg;
+ }
+
+ private StaticText staticText33 = new StaticText();
+
+ public StaticText getStaticText33() {
+ return staticText33;
+ }
+
+ public void setStaticText33(StaticText st) {
+ this.staticText33 = st;
+ }
+
+ private HtmlPanelGrid gridIncapacidade = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridIncapacidade() {
+ return gridIncapacidade;
+ }
+
+ public void setGridIncapacidade(HtmlPanelGrid hpg) {
+ this.gridIncapacidade = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel27 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel27() {
+ return gridPanel27;
+ }
+
+ public void setGridPanel27(HtmlPanelGrid hpg) {
+ this.gridPanel27 = hpg;
+ }
+
+ private StaticText staticText34 = new StaticText();
+
+ public StaticText getStaticText34() {
+ return staticText34;
+ }
+
+ public void setStaticText34(StaticText st) {
+ this.staticText34 = st;
+ }
+
+ private HtmlPanelGrid gridRestricoes = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridRestricoes() {
+ return gridRestricoes;
+ }
+
+ public void setGridRestricoes(HtmlPanelGrid hpg) {
+ this.gridRestricoes = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel28 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel28() {
+ return gridPanel28;
+ }
+
+ public void setGridPanel28(HtmlPanelGrid hpg) {
+ this.gridPanel28 = hpg;
+ }
+
+ private HtmlPanelGrid gridImagesRestricoes = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridImagesRestricoes() {
+ return gridImagesRestricoes;
+ }
+
+ public void setGridImagesRestricoes(HtmlPanelGrid hpg) {
+ this.gridImagesRestricoes = hpg;
+ }
+
+ private HtmlPanelGrid gridOutrasRestricoes = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridOutrasRestricoes() {
+ return gridOutrasRestricoes;
+ }
+
+ public void setGridOutrasRestricoes(HtmlPanelGrid hpg) {
+ this.gridOutrasRestricoes = hpg;
+ }
+
+ private StaticText staticText35 = new StaticText();
+
+ public StaticText getStaticText35() {
+ return staticText35;
+ }
+
+ public void setStaticText35(StaticText st) {
+ this.staticText35 = st;
+ }
+
+ private HtmlPanelGrid gridPanel29 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel29() {
+ return gridPanel29;
+ }
+
+ public void setGridPanel29(HtmlPanelGrid hpg) {
+ this.gridPanel29 = hpg;
+ }
+
+ private StaticText staticText36 = new StaticText();
+
+ public StaticText getStaticText36() {
+ return staticText36;
+ }
+
+ public void setStaticText36(StaticText st) {
+ this.staticText36 = st;
+ }
+
+ private StaticText stObservacoes = new StaticText();
+
+ public StaticText getStObservacoes() {
+ return stObservacoes;
+ }
+
+ public void setStObservacoes(StaticText st) {
+ this.stObservacoes = st;
+ }
+
+ private HtmlPanelGrid gridAcidentadoView = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridAcidentadoView() {
+ return gridAcidentadoView;
+ }
+
+ public void setGridAcidentadoView(HtmlPanelGrid hpg) {
+ this.gridAcidentadoView = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel30 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel30() {
+ return gridPanel30;
+ }
+
+ public void setGridPanel30(HtmlPanelGrid hpg) {
+ this.gridPanel30 = hpg;
+ }
+
+ private StaticText staticText37 = new StaticText();
+
+ public StaticText getStaticText37() {
+ return staticText37;
+ }
+
+ public void setStaticText37(StaticText st) {
+ this.staticText37 = st;
+ }
+
+ private HtmlPanelGrid gridPanel31 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel31() {
+ return gridPanel31;
+ }
+
+ public void setGridPanel31(HtmlPanelGrid hpg) {
+ this.gridPanel31 = hpg;
+ }
+
+ private HtmlPanelGrid gridDataHora = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridDataHora() {
+ return gridDataHora;
+ }
+
+ public void setGridDataHora(HtmlPanelGrid hpg) {
+ this.gridDataHora = hpg;
+ }
+
+ private PanelGroup groupPanel6 = new PanelGroup();
+
+ public PanelGroup getGroupPanel6() {
+ return groupPanel6;
+ }
+
+ public void setGroupPanel6(PanelGroup pg) {
+ this.groupPanel6 = pg;
+ }
+
+ private StaticText lblDataAcidente = new StaticText();
+
+ public StaticText getLblDataAcidente() {
+ return lblDataAcidente;
+ }
+
+ public void setLblDataAcidente(StaticText st) {
+ this.lblDataAcidente = st;
+ }
+
+ private StaticText stDataAcidente1 = new StaticText();
+
+ public StaticText getStDataAcidente1() {
+ return stDataAcidente1;
+ }
+
+ public void setStDataAcidente1(StaticText st) {
+ this.stDataAcidente1 = st;
+ }
+
+ private PanelGroup groupPanel7 = new PanelGroup();
+
+ public PanelGroup getGroupPanel7() {
+ return groupPanel7;
+ }
+
+ public void setGroupPanel7(PanelGroup pg) {
+ this.groupPanel7 = pg;
+ }
+
+ private StaticText lblHoraAcidente = new StaticText();
+
+ public StaticText getLblHoraAcidente() {
+ return lblHoraAcidente;
+ }
+
+ public void setLblHoraAcidente(StaticText st) {
+ this.lblHoraAcidente = st;
+ }
+
+ private StaticText stHoraAcidente1 = new StaticText();
+
+ public StaticText getStHoraAcidente1() {
+ return stHoraAcidente1;
+ }
+
+ public void setStHoraAcidente1(StaticText st) {
+ this.stHoraAcidente1 = st;
+ }
+
+ private HtmlPanelGrid gridVerificacaoView = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridVerificacaoView() {
+ return gridVerificacaoView;
+ }
+
+ public void setGridVerificacaoView(HtmlPanelGrid hpg) {
+ this.gridVerificacaoView = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel34 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel34() {
+ return gridPanel34;
+ }
+
+ public void setGridPanel34(HtmlPanelGrid hpg) {
+ this.gridPanel34 = hpg;
+ }
+
+ private StaticText staticText15 = new StaticText();
+
+ public StaticText getStaticText15() {
+ return staticText15;
+ }
+
+ public void setStaticText15(StaticText st) {
+ this.staticText15 = st;
+ }
+
+ private HtmlPanelGrid gridPanel35 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel35() {
+ return gridPanel35;
+ }
+
+ public void setGridPanel35(HtmlPanelGrid hpg) {
+ this.gridPanel35 = hpg;
+ }
+
+ private HtmlPanelGrid gridAssinaturasView = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridAssinaturasView() {
+ return gridAssinaturasView;
+ }
+
+ public void setGridAssinaturasView(HtmlPanelGrid hpg) {
+ this.gridAssinaturasView = hpg;
+ }
+
+ private HtmlPanelGrid gridImpressaoView = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridImpressaoView() {
+ return gridImpressaoView;
+ }
+
+ public void setGridImpressaoView(HtmlPanelGrid hpg) {
+ this.gridImpressaoView = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel10 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel10() {
+ return gridPanel10;
+ }
+
+ public void setGridPanel10(HtmlPanelGrid hpg) {
+ this.gridPanel10 = hpg;
+ }
+
+ private StaticText staticText3 = new StaticText();
+
+ public StaticText getStaticText3() {
+ return staticText3;
+ }
+
+ public void setStaticText3(StaticText st) {
+ this.staticText3 = st;
+ }
+
+ private HtmlPanelGrid gridPanel11 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel11() {
+ return gridPanel11;
+ }
+
+ public void setGridPanel11(HtmlPanelGrid hpg) {
+ this.gridPanel11 = hpg;
+ }
+
+ private HtmlPanelGrid gridAssSupView = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridAssSupView() {
+ return gridAssSupView;
+ }
+
+ public void setGridAssSupView(HtmlPanelGrid hpg) {
+ this.gridAssSupView = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel12 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel12() {
+ return gridPanel12;
+ }
+
+ public void setGridPanel12(HtmlPanelGrid hpg) {
+ this.gridPanel12 = hpg;
+ }
+
+ private PanelGroup groupPanel5 = new PanelGroup();
+
+ public PanelGroup getGroupPanel5() {
+ return groupPanel5;
+ }
+
+ public void setGroupPanel5(PanelGroup pg) {
+ this.groupPanel5 = pg;
+ }
+
+ private HtmlPanelGrid gridPanel13 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel13() {
+ return gridPanel13;
+ }
+
+ public void setGridPanel13(HtmlPanelGrid hpg) {
+ this.gridPanel13 = hpg;
+ }
+
+ private PanelGroup groupPanel8 = new PanelGroup();
+
+ public PanelGroup getGroupPanel8() {
+ return groupPanel8;
+ }
+
+ public void setGroupPanel8(PanelGroup pg) {
+ this.groupPanel8 = pg;
+ }
+
+ private StaticText staticText14 = new StaticText();
+
+ public StaticText getStaticText14() {
+ return staticText14;
+ }
+
+ public void setStaticText14(StaticText st) {
+ this.staticText14 = st;
+ }
+
+ private StaticText stAveriguador = new StaticText();
+
+ public StaticText getStAveriguador() {
+ return stAveriguador;
+ }
+
+ public void setStAveriguador(StaticText st) {
+ this.stAveriguador = st;
+ }
+
+ private HtmlPanelGrid gridPanel14 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel14() {
+ return gridPanel14;
+ }
+
+ public void setGridPanel14(HtmlPanelGrid hpg) {
+ this.gridPanel14 = hpg;
+ }
+
+ private PanelGroup groupPanel9 = new PanelGroup();
+
+ public PanelGroup getGroupPanel9() {
+ return groupPanel9;
+ }
+
+ public void setGroupPanel9(PanelGroup pg) {
+ this.groupPanel9 = pg;
+ }
+
+ private StaticText staticText16 = new StaticText();
+
+ public StaticText getStaticText16() {
+ return staticText16;
+ }
+
+ public void setStaticText16(StaticText st) {
+ this.staticText16 = st;
+ }
+
+ private ImageComponent image3 = new ImageComponent();
+
+ public ImageComponent getImage3() {
+ return image3;
+ }
+
+ public void setImage3(ImageComponent ic) {
+ this.image3 = ic;
+ }
+
+ private StaticText staticText17 = new StaticText();
+
+ public StaticText getStaticText17() {
+ return staticText17;
+ }
+
+ public void setStaticText17(StaticText st) {
+ this.staticText17 = st;
+ }
+
+ private HtmlPanelGrid gridAveriguacaoPosterior = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridAveriguacaoPosterior() {
+ return gridAveriguacaoPosterior;
+ }
+
+ public void setGridAveriguacaoPosterior(HtmlPanelGrid hpg) {
+ this.gridAveriguacaoPosterior = hpg;
+ }
+
+ private StaticText lblAveriguacaoPosterior1 = new StaticText();
+
+ public StaticText getLblAveriguacaoPosterior1() {
+ return lblAveriguacaoPosterior1;
+ }
+
+ public void setLblAveriguacaoPosterior1(StaticText st) {
+ this.lblAveriguacaoPosterior1 = st;
+ }
+
+ private StaticText txtAveriguacaoPosterior = new StaticText();
+
+ public StaticText getTxtAveriguacaoPosterior() {
+ return txtAveriguacaoPosterior;
+ }
+
+ public void setTxtAveriguacaoPosterior(StaticText st) {
+ this.txtAveriguacaoPosterior = st;
+ }
+
+ private HtmlPanelGrid gridPanel15 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel15() {
+ return gridPanel15;
+ }
+
+ public void setGridPanel15(HtmlPanelGrid hpg) {
+ this.gridPanel15 = hpg;
+ }
+
+ private StaticText staticText18 = new StaticText();
+
+ public StaticText getStaticText18() {
+ return staticText18;
+ }
+
+ public void setStaticText18(StaticText st) {
+ this.staticText18 = st;
+ }
+
+ private HtmlPanelGrid gridPanel16 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel16() {
+ return gridPanel16;
+ }
+
+ public void setGridPanel16(HtmlPanelGrid hpg) {
+ this.gridPanel16 = hpg;
+ }
+
+ private PanelGroup groupPanel10 = new PanelGroup();
+
+ public PanelGroup getGroupPanel10() {
+ return groupPanel10;
+ }
+
+ public void setGroupPanel10(PanelGroup pg) {
+ this.groupPanel10 = pg;
+ }
+
+ private StaticText staticText19 = new StaticText();
+
+ public StaticText getStaticText19() {
+ return staticText19;
+ }
+
+ public void setStaticText19(StaticText st) {
+ this.staticText19 = st;
+ }
+
+ private StaticText stNomeSuperior = new StaticText();
+
+ public StaticText getStNomeSuperior() {
+ return stNomeSuperior;
+ }
+
+ public void setStNomeSuperior(StaticText st) {
+ this.stNomeSuperior = st;
+ }
+
+ private PanelGroup groupPanel11 = new PanelGroup();
+
+ public PanelGroup getGroupPanel11() {
+ return groupPanel11;
+ }
+
+ public void setGroupPanel11(PanelGroup pg) {
+ this.groupPanel11 = pg;
+ }
+
+ private StaticText staticText20 = new StaticText();
+
+ public StaticText getStaticText20() {
+ return staticText20;
+ }
+
+ public void setStaticText20(StaticText st) {
+ this.staticText20 = st;
+ }
+
+ private StaticText stEmailSuperior = new StaticText();
+
+ public StaticText getStEmailSuperior() {
+ return stEmailSuperior;
+ }
+
+ public void setStEmailSuperior(StaticText st) {
+ this.stEmailSuperior = st;
+ }
+
+ private HtmlPanelGrid gridSiprp = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridSiprp() {
+ return gridSiprp;
+ }
+
+ public void setGridSiprp(HtmlPanelGrid hpg) {
+ this.gridSiprp = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel17 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel17() {
+ return gridPanel17;
+ }
+
+ public void setGridPanel17(HtmlPanelGrid hpg) {
+ this.gridPanel17 = hpg;
+ }
+
+ private StaticText staticText24 = new StaticText();
+
+ public StaticText getStaticText24() {
+ return staticText24;
+ }
+
+ public void setStaticText24(StaticText st) {
+ this.staticText24 = st;
+ }
+
+ private HtmlPanelGrid gridPanel18 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel18() {
+ return gridPanel18;
+ }
+
+ public void setGridPanel18(HtmlPanelGrid hpg) {
+ this.gridPanel18 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel20 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel20() {
+ return gridPanel20;
+ }
+
+ public void setGridPanel20(HtmlPanelGrid hpg) {
+ this.gridPanel20 = hpg;
+ }
+
+ private PanelGroup groupPanel12 = new PanelGroup();
+
+ public PanelGroup getGroupPanel12() {
+ return groupPanel12;
+ }
+
+ public void setGroupPanel12(PanelGroup pg) {
+ this.groupPanel12 = pg;
+ }
+
+ private StaticText staticText25 = new StaticText();
+
+ public StaticText getStaticText25() {
+ return staticText25;
+ }
+
+ public void setStaticText25(StaticText st) {
+ this.staticText25 = st;
+ }
+
+ private StaticText staticText26 = new StaticText();
+
+ public StaticText getStaticText26() {
+ return staticText26;
+ }
+
+ public void setStaticText26(StaticText st) {
+ this.staticText26 = st;
+ }
+
+ private PanelGroup groupPanel13 = new PanelGroup();
+
+ public PanelGroup getGroupPanel13() {
+ return groupPanel13;
+ }
+
+ public void setGroupPanel13(PanelGroup pg) {
+ this.groupPanel13 = pg;
+ }
+
+ private StaticText staticText27 = new StaticText();
+
+ public StaticText getStaticText27() {
+ return staticText27;
+ }
+
+ public void setStaticText27(StaticText st) {
+ this.staticText27 = st;
+ }
+
+ private StaticText txtTecnicoSuperior = new StaticText();
+
+ public StaticText getTxtTecnicoSuperior() {
+ return txtTecnicoSuperior;
+ }
+
+ public void setTxtTecnicoSuperior(StaticText st) {
+ this.txtTecnicoSuperior = st;
+ }
+
+ private StaticText staticText28 = new StaticText();
+
+ public StaticText getStaticText28() {
+ return staticText28;
+ }
+
+ public void setStaticText28(StaticText st) {
+ this.staticText28 = st;
+ }
+
+ private StaticText staticText47 = new StaticText();
+
+ public StaticText getStaticText47() {
+ return staticText47;
+ }
+
+ public void setStaticText47(StaticText st) {
+ this.staticText47 = st;
+ }
+
+ private StaticText txtCap1 = new StaticText();
+
+ public StaticText getTxtCap1() {
+ return txtCap1;
+ }
+
+ public void setTxtCap1(StaticText st) {
+ this.txtCap1 = st;
+ }
+
+ private PanelGroup groupPanel14 = new PanelGroup();
+
+ public PanelGroup getGroupPanel14() {
+ return groupPanel14;
+ }
+
+ public void setGroupPanel14(PanelGroup pg) {
+ this.groupPanel14 = pg;
+ }
+
+ private StaticText staticText48 = new StaticText();
+
+ public StaticText getStaticText48() {
+ return staticText48;
+ }
+
+ public void setStaticText48(StaticText st) {
+ this.staticText48 = st;
+ }
+
+ private StaticText txtMedicoTrabalho = new StaticText();
+
+ public StaticText getTxtMedicoTrabalho() {
+ return txtMedicoTrabalho;
+ }
+
+ public void setTxtMedicoTrabalho(StaticText st) {
+ this.txtMedicoTrabalho = st;
+ }
+
+ private StaticText staticText49 = new StaticText();
+
+ public StaticText getStaticText49() {
+ return staticText49;
+ }
+
+ public void setStaticText49(StaticText st) {
+ this.staticText49 = st;
+ }
+
+ private StaticText staticText50 = new StaticText();
+
+ public StaticText getStaticText50() {
+ return staticText50;
+ }
+
+ public void setStaticText50(StaticText st) {
+ this.staticText50 = st;
+ }
+
+ private StaticText txtCedula1 = new StaticText();
+
+ public StaticText getTxtCedula1() {
+ return txtCedula1;
+ }
+
+ public void setTxtCedula1(StaticText st) {
+ this.txtCedula1 = st;
+ }
+
+ private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel5() {
+ return gridPanel5;
+ }
+
+ public void setGridPanel5(HtmlPanelGrid hpg) {
+ this.gridPanel5 = hpg;
+ }
+
+ private PanelGroup groupPanel3 = new PanelGroup();
+
+ public PanelGroup getGroupPanel3() {
+ return groupPanel3;
+ }
+
+ public void setGroupPanel3(PanelGroup pg) {
+ this.groupPanel3 = pg;
+ }
+
+ private StaticText staticText6 = new StaticText();
+
+ public StaticText getStaticText6() {
+ return staticText6;
+ }
+
+ public void setStaticText6(StaticText st) {
+ this.staticText6 = st;
+ }
+
+ private StaticText stNomeAcidentado = new StaticText();
+
+ public StaticText getStNomeAcidentado() {
+ return stNomeAcidentado;
+ }
+
+ public void setStNomeAcidentado(StaticText st) {
+ this.stNomeAcidentado = st;
+ }
+
+ private PanelGroup groupPanel4 = new PanelGroup();
+
+ public PanelGroup getGroupPanel4() {
+ return groupPanel4;
+ }
+
+ public void setGroupPanel4(PanelGroup pg) {
+ this.groupPanel4 = pg;
+ }
+
+ private StaticText staticText7 = new StaticText();
+
+ public StaticText getStaticText7() {
+ return staticText7;
+ }
+
+ public void setStaticText7(StaticText st) {
+ this.staticText7 = st;
+ }
+
+ private StaticText stEstabelecimentoOrigem = new StaticText();
+
+ public StaticText getStEstabelecimentoOrigem() {
+ return stEstabelecimentoOrigem;
+ }
+
+ public void setStEstabelecimentoOrigem(StaticText st) {
+ this.stEstabelecimentoOrigem = st;
+ }
+
+ private PanelGroup groupPanel15 = new PanelGroup();
+
+ public PanelGroup getGroupPanel15() {
+ return groupPanel15;
+ }
+
+ public void setGroupPanel15(PanelGroup pg) {
+ this.groupPanel15 = pg;
+ }
+
+ private StaticText staticText8 = new StaticText();
+
+ public StaticText getStaticText8() {
+ return staticText8;
+ }
+
+ public void setStaticText8(StaticText st) {
+ this.staticText8 = st;
+ }
+
+ private StaticText stDataNascimento = new StaticText();
+
+ public StaticText getStDataNascimento() {
+ return stDataNascimento;
+ }
+
+ public void setStDataNascimento(StaticText st) {
+ this.stDataNascimento = st;
+ }
+
+ private PanelGroup groupPanel16 = new PanelGroup();
+
+ public PanelGroup getGroupPanel16() {
+ return groupPanel16;
+ }
+
+ public void setGroupPanel16(PanelGroup pg) {
+ this.groupPanel16 = pg;
+ }
+
+ private StaticText staticText9 = new StaticText();
+
+ public StaticText getStaticText9() {
+ return staticText9;
+ }
+
+ public void setStaticText9(StaticText st) {
+ this.staticText9 = st;
+ }
+
+ private StaticText stBI = new StaticText();
+
+ public StaticText getStBI() {
+ return stBI;
+ }
+
+ public void setStBI(StaticText st) {
+ this.stBI = st;
+ }
+
+ private PanelGroup groupPanel17 = new PanelGroup();
+
+ public PanelGroup getGroupPanel17() {
+ return groupPanel17;
+ }
+
+ public void setGroupPanel17(PanelGroup pg) {
+ this.groupPanel17 = pg;
+ }
+
+ private StaticText staticText10 = new StaticText();
+
+ public StaticText getStaticText10() {
+ return staticText10;
+ }
+
+ public void setStaticText10(StaticText st) {
+ this.staticText10 = st;
+ }
+
+ private StaticText stMorada = new StaticText();
+
+ public StaticText getStMorada() {
+ return stMorada;
+ }
+
+ public void setStMorada(StaticText st) {
+ this.stMorada = st;
+ }
+
+ private StaticText staticText11 = new StaticText();
+
+ public StaticText getStaticText11() {
+ return staticText11;
+ }
+
+ public void setStaticText11(StaticText st) {
+ this.staticText11 = st;
+ }
+
+ private StaticText stCodPostal = new StaticText();
+
+ public StaticText getStCodPostal() {
+ return stCodPostal;
+ }
+
+ public void setStCodPostal(StaticText st) {
+ this.stCodPostal = st;
+ }
+
+ private PanelGroup groupPanel18 = new PanelGroup();
+
+ public PanelGroup getGroupPanel18() {
+ return groupPanel18;
+ }
+
+ public void setGroupPanel18(PanelGroup pg) {
+ this.groupPanel18 = pg;
+ }
+
+ private StaticText staticText12 = new StaticText();
+
+ public StaticText getStaticText12() {
+ return staticText12;
+ }
+
+ public void setStaticText12(StaticText st) {
+ this.staticText12 = st;
+ }
+
+ private StaticText stContactoTelefonico = new StaticText();
+
+ public StaticText getStContactoTelefonico() {
+ return stContactoTelefonico;
+ }
+
+ public void setStContactoTelefonico(StaticText st) {
+ this.stContactoTelefonico = st;
+ }
+
+ private PanelGroup groupPanel19 = new PanelGroup();
+
+ public PanelGroup getGroupPanel19() {
+ return groupPanel19;
+ }
+
+ public void setGroupPanel19(PanelGroup pg) {
+ this.groupPanel19 = pg;
+ }
+
+ private StaticText staticText51 = new StaticText();
+
+ public StaticText getStaticText51() {
+ return staticText51;
+ }
+
+ public void setStaticText51(StaticText st) {
+ this.staticText51 = st;
+ }
+
+ private StaticText stDataAdmissao = new StaticText();
+
+ public StaticText getStDataAdmissao() {
+ return stDataAdmissao;
+ }
+
+ public void setStDataAdmissao(StaticText st) {
+ this.stDataAdmissao = st;
+ }
+
+ private PanelGroup groupPanel20 = new PanelGroup();
+
+ public PanelGroup getGroupPanel20() {
+ return groupPanel20;
+ }
+
+ public void setGroupPanel20(PanelGroup pg) {
+ this.groupPanel20 = pg;
+ }
+
+ private StaticText staticText52 = new StaticText();
+
+ public StaticText getStaticText52() {
+ return staticText52;
+ }
+
+ public void setStaticText52(StaticText st) {
+ this.staticText52 = st;
+ }
+
+ private StaticText stFuncao = new StaticText();
+
+ public StaticText getStFuncao() {
+ return stFuncao;
+ }
+
+ public void setStFuncao(StaticText st) {
+ this.stFuncao = st;
+ }
+
+ private PanelGroup groupPanel21 = new PanelGroup();
+
+ public PanelGroup getGroupPanel21() {
+ return groupPanel21;
+ }
+
+ public void setGroupPanel21(PanelGroup pg) {
+ this.groupPanel21 = pg;
+ }
+
+ private StaticText staticText53 = new StaticText();
+
+ public StaticText getStaticText53() {
+ return staticText53;
+ }
+
+ public void setStaticText53(StaticText st) {
+ this.staticText53 = st;
+ }
+
+ private StaticText stTurno = new StaticText();
+
+ public StaticText getStTurno() {
+ return stTurno;
+ }
+
+ public void setStTurno(StaticText st) {
+ this.stTurno = st;
+ }
+
+ private PanelGroup groupPanel22 = new PanelGroup();
+
+ public PanelGroup getGroupPanel22() {
+ return groupPanel22;
+ }
+
+ public void setGroupPanel22(PanelGroup pg) {
+ this.groupPanel22 = pg;
+ }
+
+ private StaticText lblHorasTurno = new StaticText();
+
+ public StaticText getLblHorasTurno() {
+ return lblHorasTurno;
+ }
+
+ public void setLblHorasTurno(StaticText st) {
+ this.lblHorasTurno = st;
+ }
+
+ private StaticText txtHorasTurno = new StaticText();
+
+ public StaticText getTxtHorasTurno() {
+ return txtHorasTurno;
+ }
+
+ public void setTxtHorasTurno(StaticText st) {
+ this.txtHorasTurno = st;
+ }
+
+ private PanelGroup groupPanel23 = new PanelGroup();
+
+ public PanelGroup getGroupPanel23() {
+ return groupPanel23;
+ }
+
+ public void setGroupPanel23(PanelGroup pg) {
+ this.groupPanel23 = pg;
+ }
+
+ private StaticText lblSeccao = new StaticText();
+
+ public StaticText getLblSeccao() {
+ return lblSeccao;
+ }
+
+ public void setLblSeccao(StaticText st) {
+ this.lblSeccao = st;
+ }
+
+ private StaticText txtSeccao = new StaticText();
+
+ public StaticText getTxtSeccao() {
+ return txtSeccao;
+ }
+
+ public void setTxtSeccao(StaticText st) {
+ this.txtSeccao = st;
+ }
+
+ private PanelGroup groupPanel24 = new PanelGroup();
+
+ public PanelGroup getGroupPanel24() {
+ return groupPanel24;
+ }
+
+ public void setGroupPanel24(PanelGroup pg) {
+ this.groupPanel24 = pg;
+ }
+
+ private StaticText lblLocal = new StaticText();
+
+ public StaticText getLblLocal() {
+ return lblLocal;
+ }
+
+ public void setLblLocal(StaticText st) {
+ this.lblLocal = st;
+ }
+
+ private StaticText txtLocal = new StaticText();
+
+ public StaticText getTxtLocal() {
+ return txtLocal;
+ }
+
+ public void setTxtLocal(StaticText st) {
+ this.txtLocal = st;
+ }
+
+ private HtmlPanelGrid gridHeader1 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridHeader1() {
+ return gridHeader1;
+ }
+
+ public void setGridHeader1(HtmlPanelGrid hpg) {
+ this.gridHeader1 = hpg;
+ }
+
+ private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel6() {
+ return gridPanel6;
+ }
+
+ public void setGridPanel6(HtmlPanelGrid hpg) {
+ this.gridPanel6 = hpg;
+ }
+
+ private PanelGroup groupPanel26 = new PanelGroup();
+
+ public PanelGroup getGroupPanel26() {
+ return groupPanel26;
+ }
+
+ public void setGroupPanel26(PanelGroup pg) {
+ this.groupPanel26 = pg;
+ }
+
+ private ImageComponent image4 = new ImageComponent();
+
+ public ImageComponent getImage4() {
+ return image4;
+ }
+
+ public void setImage4(ImageComponent ic) {
+ this.image4 = ic;
+ }
+
+ private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel7() {
+ return gridPanel7;
+ }
+
+ public void setGridPanel7(HtmlPanelGrid hpg) {
+ this.gridPanel7 = hpg;
+ }
+
+ private StaticText staticText41 = new StaticText();
+
+ public StaticText getStaticText41() {
+ return staticText41;
+ }
+
+ public void setStaticText41(StaticText st) {
+ this.staticText41 = st;
+ }
+
+ private HtmlPanelGrid gridPanel21 = new HtmlPanelGrid();
+
+ public HtmlPanelGrid getGridPanel21() {
+ return gridPanel21;
+ }
+
+ public void setGridPanel21(HtmlPanelGrid hpg) {
+ this.gridPanel21 = hpg;
+ }
+
+ private PanelGroup groupPanel27 = new PanelGroup();
+
+ public PanelGroup getGroupPanel27() {
+ return groupPanel27;
+ }
+
+ public void setGroupPanel27(PanelGroup pg) {
+ this.groupPanel27 = pg;
+ }
+
+ private StaticText staticText42 = new StaticText();
+
+ public StaticText getStaticText42() {
+ return staticText42;
+ }
+
+ public void setStaticText42(StaticText st) {
+ this.staticText42 = st;
+ }
+
+ private StaticText stHeaderNr = new StaticText();
+
+ public StaticText getStHeaderNr() {
+ return stHeaderNr;
+ }
+
+ public void setStHeaderNr(StaticText st) {
+ this.stHeaderNr = st;
+ }
+
+ private PanelGroup groupPanel28 = new PanelGroup();
+
+ public PanelGroup getGroupPanel28() {
+ return groupPanel28;
+ }
+
+ public void setGroupPanel28(PanelGroup pg) {
+ this.groupPanel28 = pg;
+ }
+
+ private StaticText staticText43 = new StaticText();
+
+ public StaticText getStaticText43() {
+ return staticText43;
+ }
+
+ public void setStaticText43(StaticText st) {
+ this.staticText43 = st;
+ }
+
+ private StaticText stHeaderDate = new StaticText();
+
+ public StaticText getStHeaderDate() {
+ return stHeaderDate;
+ }
+
+ public void setStHeaderDate(StaticText st) {
+ this.stHeaderDate = st;
+ }
+
+ private ImageComponent image5 = new ImageComponent();
+
+ public ImageComponent getImage5() {
+ return image5;
+ }
+
+ public void setImage5(ImageComponent ic) {
+ this.image5 = ic;
+ }
+
+ private HiddenField hidConfDelete = new HiddenField();
+
+ public HiddenField getHidConfDelete() {
+ return hidConfDelete;
+ }
+
+ public void setHidConfDelete(HiddenField hf) {
+ this.hidConfDelete = hf;
+ }
+
+ private PanelGroup groupPanel1 = new PanelGroup();
+
+ public PanelGroup getGroupPanel1() {
+ return groupPanel1;
+ }
+
+ public void setGroupPanel1(PanelGroup pg) {
+ this.groupPanel1 = pg;
+ }
+
+ private Button butVoltar = new Button();
+
+ public Button getButVoltar() {
+ return butVoltar;
+ }
+
+ public void setButVoltar(Button b) {
+ this.butVoltar = b;
+ }
+
+ private Button butEliminar = new Button();
+
+ public Button getButEliminar() {
+ return butEliminar;
+ }
+
+ public void setButEliminar(Button b) {
+ this.butEliminar = b;
+ }
+ private StaticText lblUser = new StaticText();
+
+ public StaticText getLblUser() {
+ return lblUser;
+ }
+
+ public void setLblUser(StaticText st) {
+ this.lblUser = st;
+ }
+ /**
+ * Construct a new Page bean instance.
+ */
+ public ViewAnaliseAcidenteTrabalho() {
+ }
+
+ /**
+ * Callback method that is called whenever a page is navigated to,
+ * either directly via a URL, or indirectly via page navigation.
+ * Customize this method to acquire resources that will be needed
+ * for event handlers and lifecycle methods, whether or not this
+ * page is performing post back processing.
+ *
+ * Note that, if the current request is a postback, the property
+ * values of the components do not represent any
+ * values submitted with this request. Instead, they represent the
+ * property values that were saved for this view when it was rendered.
+ */
+ public void init() {
+ // Perform initializations inherited from our superclasssuperclass
+ super.init();
+ // Perform application initialization that must complete
+ // *before* managed components are initialized
+ // TODO - add your own initialiation code here
+
+ //
+ // Initialize automatically managed components
+ // *Note* - this logic should NOT be modified
+ try {
+ _init();
+ } catch (Exception e) {
+ log("ViewAnaliseAcidenteTrabalho Initialization Failure", e);
+ throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
+ }
+
+ //
+ // Perform application initialization that must complete
+ // *after* managed components are initialized
+ // TODO - add your own initialization code here
+ if (!getSessionBean1().isLoggedIn()) {
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {
+ // . . . handle exception . . .
+ System.out.println("LOGGED IN = " + e.getMessage());
+ }
+ }
+ else
+ {
+ lblUser.setText( getSessionBean1().getCurrentUser().getLogin() );
+ initializePage();
+ }
+
+ }
+
+ /**
+ * Callback method that is called after the component tree has been
+ * restored, but before any event processing takes place. This method
+ * will only be called on a postback request that
+ * is processing a form submit. Customize this method to allocate
+ * resources that will be required in your event handlers.
+ */
+ public void preprocess() {
+ }
+
+ /**
+ * Callback method that is called just before rendering takes place.
+ * This method will only be called for the page that
+ * will actually be rendered (and not, for example, on a page that
+ * handled a postback and then navigated to a different page). Customize
+ * this method to allocate resources that will be required for rendering
+ * this page.
+ */
+ public void prerender() {
+ getSessionBean1().setFromAnaliseDeletion(false);
+ String confirmacao_analise = (String)getExternalContext().getRequestParameterMap().get("confirmacao_analise");
+ if(confirmacao_analise != null)
+ {
+ if(confirmacao_analise.matches("yes"))
+ {
+ hidConfDelete.setValue("");
+ try
+ {
+ deleteAnalise();
+ //booMsgQuizDeleted = true;
+ getSessionBean1().setFromAnaliseDeletion(true);
+ getSessionBean1().setMsg("Análise eliminada !");
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ Utilizador u = getSessionBean1().getCurrentUser();
+ if(u.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP)
+ {
+
+ try
+ {
+ getExternalContext().redirect("FormDirSiprp.jsp");
+ }
+ catch(Exception ex1)
+ {
+ ex1.printStackTrace();
+ }
+ }
+ else if(u.getTipo().intValue() == Global.TIPO_UTILIZADOR_HS)
+ {
+
+ try
+ {
+ getExternalContext().redirect("FormHS.jsp");
+ }
+ catch(Exception ex1)
+ {
+ ex1.printStackTrace();
+ }
+ }
+
+ }
+ catch(Exception ex)
+ {
+ getSessionBean1().setMsg("Erro na eliminação da análise");
+ ex.printStackTrace();
+// try
+// {
+// getExternalContext().redirect("EditarQuestionario.jsp");
+// }
+// catch(Exception ex1)
+// {
+// ex1.printStackTrace();
+// }
+ }
+ }
+ else if(confirmacao_analise.matches("no"))
+ {
+ hidConfDelete.setValue("");
+ }
+ }
+ }
+
+ /**
+ * Callback method that is called after rendering is completed for
+ * this request, if init() was called (regardless of whether
+ * or not this was the page that was actually rendered). Customize this
+ * method to release resources acquired in the init(),
+ * preprocess(), or prerender() methods (or
+ * acquired during execution of an event handler).
+ */
+
+ public void destroy() {
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected SessionBean1 getSessionBean1() {
+ return (SessionBean1)getBean("SessionBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected RequestBean1 getRequestBean1() {
+ return (RequestBean1)getBean("RequestBean1");
+ }
+
+ /**
+ * Return a reference to the scoped data bean.
+ */
+ protected ApplicationBean1 getApplicationBean1() {
+ return (ApplicationBean1)getBean("ApplicationBean1");
+ }
+
+ public String lnkLogout_action() {
+ // TODO: Replace with your code
+
+ if (getSessionBean1().isLoggedIn()) {
+// try {
+// getExternalContext().redirect("Login.jsp");
+// } catch(Exception e) {}
+
+ try
+ {
+ javax.servlet.http.HttpSession session =
+ (javax.servlet.http.HttpSession) getExternalContext().getSession(true);
+ session.invalidate();
+ }
+ catch(Exception ex){}
+
+ }
+
+ try {
+ getExternalContext().redirect("Login.jsp");
+ } catch(Exception e) {}
+ //return "login";
+ return null;
+ }
+
+ public String lnkNome_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ public String lnkDataNascimento_action() {
+ // TODO: Replace with your code
+
+ return null;
+ }
+
+ private void initializePage()
+ {
+ Utilizador u = getSessionBean1().getCurrentUser();
+ if(! (u.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP || u.getTipo().intValue() == Global.TIPO_UTILIZADOR_HS))
+ {
+ butEliminar.setRendered(false);
+ }
+ else
+ {
+ AnaliseAcidente a = getSessionBean1().getCurrentAnalise();
+ if(a.getEstado().intValue() == Global.ESTADO_CONCLUIDO)
+ {
+ butEliminar.setRendered(false);
+ }
+ }
+ fillPage();
+ //fillImages();
+ }
+
+ private void fillPage()
+ {
+ AnaliseAcidente a = getSessionBean1().getCurrentAnalise();
+ fillHeader(a);
+ fillSIPRP(a);
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ Acidentado ac = null;
+ try
+ {
+ ac = adp.getAcidentado(a.getAcidentado_id());
+ //txtTrabalhador.setText(ac.getNome());
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+
+ int estado = a.getEstado().intValue();
+ switch(estado)
+ {
+ case Global.ESTADO_SEG:
+ gridDadosAcidenteRhView.setRendered(false);
+ gridRecomendacoesViewHS.setRendered(false);
+ gridMedidasViewRH.setRendered(false);
+ gridMedicoView.setRendered(false);
+ gridVerificacaoView.setRendered(false);
+ gridImpressaoView.setRendered(false);
+
+ fillAcidentado(ac);
+ fillDadosAcidenteSeg(a);
+ break;
+ case Global.ESTADO_RH1:
+ gridDadosAcidenteRhView.setRendered(false);
+ gridRecomendacoesViewHS.setRendered(false);
+ gridMedidasViewRH.setRendered(false);
+ gridMedicoView.setRendered(false);
+ gridVerificacaoView.setRendered(false);
+ gridImpressaoView.setRendered(false);
+
+ fillAcidentado(ac);
+ fillDadosAcidenteSeg(a);
+ break;
+ case Global.ESTADO_HS:
+ gridRecomendacoesViewHS.setRendered(false);
+ gridMedidasViewRH.setRendered(false);
+ gridMedicoView.setRendered(false);
+ gridVerificacaoView.setRendered(false);
+ gridImpressaoView.setRendered(false);
+
+ fillAcidentado(ac);
+ fillDadosAcidenteSeg(a);
+ fillDadosAcidenteRh(a);
+ break;
+ case Global.ESTADO_RH2: //medidas
+ gridMedidasViewRH.setRendered(false);
+ gridMedicoView.setRendered(false);
+ gridVerificacaoView.setRendered(false);
+ gridImpressaoView.setRendered(false);
+
+ fillAcidentado(ac);
+ fillDadosAcidenteSeg(a);
+ fillDadosAcidenteRh(a);
+ fillRecomendacoesHs(a);
+
+ break;
+// case Global.ESTADO_MEDICINA:
+// gridMedicoView.setRendered(false);
+// gridVerificacaoView.setRendered(false);
+// gridImpressaoView.setRendered(false);
+//
+// fillAcidentado(ac);
+// fillDadosAcidenteSeg(a);
+// fillDadosAcidenteRh(a);
+// fillRecomendacoesHs(a);
+// fillMedidasRh(a);
+// break;
+ case Global.ESTADO_CONSOLIDACAO:
+ gridVerificacaoView.setRendered(false);
+ gridImpressaoView.setRendered(false);
+
+ fillAcidentado(ac);
+ fillDadosAcidenteSeg(a);
+ fillDadosAcidenteRh(a);
+ fillRecomendacoesHs(a);
+ fillMedidasRh(a);
+ fillMedico(a);
+ break;
+ case Global.ESTADO_ASSINATURA_SEG:
+ //gridMedidasViewRH.setRendered(false);
+ //gridMedicoView.setRendered(false);
+ //gridVerificacaoView.setRendered(false);
+ gridImpressaoView.setRendered(false);
+
+ fillAcidentado(ac);
+ fillDadosAcidenteSeg(a);
+ fillDadosAcidenteRh(a);
+ fillRecomendacoesHs(a);
+ fillMedidasRh(a);
+ fillMedico(a);
+ fillVerificacao(a);
+ break;
+
+ case Global.ESTADO_ASSINATURA_RH:
+ //gridMedidasViewRH.setRendered(false);
+ //gridMedicoView.setRendered(false);
+ //gridVerificacaoView.setRendered(false);
+ gridImpressaoView.setRendered(false);
+
+ fillAcidentado(ac);
+ fillDadosAcidenteSeg(a);
+ fillDadosAcidenteRh(a);
+ fillRecomendacoesHs(a);
+ fillMedidasRh(a);
+ fillMedico(a);
+ fillVerificacao(a);
+ break;
+
+
+// case Global.ESTADO_IMPRESSAO:
+// gridImpressaoView.setRendered(false);
+//
+// fillAcidentado(ac);
+// fillDadosAcidenteSeg(a);
+// fillDadosAcidenteRh(a);
+// fillRecomendacoesHs(a);
+// fillMedidasRh(a);
+// fillMedico(a);
+// fillVerificacao(a);
+// break;
+
+ case Global.ESTADO_FECHAR:
+ gridImpressaoView.setRendered(false);
+
+ fillAcidentado(ac);
+ fillDadosAcidenteSeg(a);
+ fillDadosAcidenteRh(a);
+ fillRecomendacoesHs(a);
+ fillMedidasRh(a);
+ fillMedico(a);
+ fillVerificacao(a);
+ //fillImpressao(a);
+ break;
+ case Global.ESTADO_CONCLUIDO:
+ gridImpressaoView.setRendered(false);
+
+ fillAcidentado(ac);
+ fillDadosAcidenteSeg(a);
+ fillDadosAcidenteRh(a);
+ fillRecomendacoesHs(a);
+ fillMedidasRh(a);
+ fillMedico(a);
+ fillVerificacao(a);
+
+ break;
+ }
+ }
+
+ private void fillHeader(AnaliseAcidente a)
+ {
+ stHeaderNr.setText(a.getAnalise_nr());
+ try
+ {
+ java.util.Date ddate = new java.util.Date(a.getData_acidente().getTime());
+ stHeaderDate.setText(utils.Utils.dateToYYYYMMDD(ddate));
+ }
+ catch(Exception ex){};
+ }
+
+ private void fillSIPRP(AnaliseAcidente a)
+ {
+ UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
+ try
+ {
+ Utilizador u = udp.getUtilizador(a.getTecnico_saude_id());
+ txtTecnicoSuperior.setText(Utils.unicodeToHTML(u.getNome()));
+ txtCap1.setText(u.getCap());
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ try
+ {
+ Utilizador u = udp.getUtilizador(a.getMedico_id());
+ txtMedicoTrabalho.setText(Utils.unicodeToHTML(u.getNome()));
+ txtCedula1.setText(u.getNumero_cedula());
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+
+ private void fillAcidentado(Acidentado a)
+ {
+ stNomeAcidentado.setText(a.getNome());
+ //stDataNascimento.setText(a.getData_nascimento());
+ try
+ {
+ java.util.Date ddate = new java.util.Date(a.getData_nascimento().getTime());
+ stDataNascimento.setText(utils.Utils.dateToYYYYMMDD(ddate));
+ }
+ catch(Exception ex){};
+ stBI.setText(a.getBilhete_identidade());
+ stMorada.setText(a.getMorada());
+ String cod_postal1 = "";
+ String cod_postal2 = "";
+ try
+ {
+ cod_postal1 = a.getCod_postal().substring(0, 4);
+ }
+ catch(Exception ex){}
+ try
+ {
+ cod_postal2 = a.getCod_postal().substring(5, 8);
+ }
+ catch(Exception ex){}
+
+ //String cod_postal1 = a.getCod_postal().substring(0, 4);
+ //String cod_postal2 = a.getCod_postal().substring(5, 8);
+ String cod_postal = cod_postal1 + "-" + cod_postal2 + " " + a.getLocalidade();
+ stCodPostal.setText(cod_postal);
+ stContactoTelefonico.setText(a.getContacto_telefonico());
+ //stDataAdmissao1.setText(a.getData_admissao());
+ try
+ {
+ java.util.Date ddate = new java.util.Date(a.getData_admissao().getTime());
+ stDataAdmissao.setText(utils.Utils.dateToYYYYMMDD(ddate));
+ }
+ catch(Exception ex){};
+ stFuncao.setText(a.getFuncao());
+ String turno_str = "";
+ if(a.getTurno().matches("m"))
+ {
+ turno_str = "manhã";
+ }
+ else if(a.getTurno().matches("t"))
+ {
+ turno_str += "tarde ";
+ }
+ if(a.getTurno().matches("n"))
+ {
+ turno_str += "noite";
+ }
+ stTurno.setText(turno_str);
+ stNomeSuperior.setText(a.getNome_superior_hierarquico());
+ stEmailSuperior.setText(a.getEmail_superior_hierarquico());
+ stEstabelecimentoOrigem.setText(a.getEstabelecimento_origem());
+ }
+
+ private void fillDadosAcidenteSeg(AnaliseAcidente a)
+ {
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ String nome_empresa = adp.getEmpresaNome(a.getEmpresa_id());
+ txtEmpresa.setText(utils.Utils.unicodeToHTML(nome_empresa));
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ try
+ {
+ txtEstabelecimento.setText(adp.getEstabelecimentoNome(a.getEstabelecimento_id()));
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+// try
+// {
+// //Trabalhador t = adp.getTrabalhador(a.getTrabalhador_id());
+// Acidentado ac = adp.getAcidentado(a.getAcidentado_id());
+// //txtDataNascimento.setText(ac.getData_nascimento());
+// try
+// {
+// java.util.Date ddate = new java.util.Date(ac.getData_nascimento().getTime());
+// txtDataNascimento.setText(utils.Utils.dateToYYYYMMDD(ddate));
+// }
+// catch(Exception ex){};
+// getSessionBean1().setAcidentado(ac);
+// }
+// catch(Exception ex)
+// {
+// ex.printStackTrace();
+// }
+
+ txtTrabalhador.setText(a.getNome_acidentado());
+// txtNomeAcidentado.setText(a.getNome_acidentado());
+
+ stAveriguador.setText(a.getAveriguador());
+
+ if(a.getData_acidente() == null)
+ {
+ lblDataAcidente.setRendered(false);
+ stDataAcidente1.setRendered(false);
+ }
+ else
+ {
+ try
+ {
+ java.util.Date ddate = new java.util.Date(a.getData_acidente().getTime());
+ stDataAcidente1.setText(utils.Utils.dateToYYYYMMDD(ddate));
+ }
+ catch(Exception ex){};
+ }
+
+ if(a.getHora_acidente() == null)
+ {
+ lblHoraAcidente.setRendered(false);
+ stHoraAcidente1.setRendered(false);
+ }
+ else
+ {
+ Calendar cal = Calendar.getInstance();
+
+ // set the calendar to have your time
+ cal.setTimeInMillis(a.getHora_acidente().getTime());
+
+ int hour = cal.get(Calendar.HOUR_OF_DAY);
+ int minutes = cal.get(Calendar.MINUTE);
+ try
+ {
+ stHoraAcidente1.setText(utils.Utils.timeToHHMM(hour + ":" + minutes));
+ }
+ catch(Exception ex){}
+ }
+
+ boolean booTurnoSeccaoLocal = false;
+ if(a.getHoras_turno() == null)
+ {
+ lblHorasTurno.setRendered(false);
+ txtHorasTurno.setRendered(false);
+ }
+ else if(a.getHoras_turno().intValue() == 0)
+ {
+ lblHorasTurno.setRendered(false);
+ txtHorasTurno.setRendered(false);
+ }
+ else
+ {
+ txtHorasTurno.setText(a.getHoras_turno().toString());
+ booTurnoSeccaoLocal = true;
+ }
+
+// if(a.getSeccao() == null)
+// {
+// lblSeccao.setRendered(false);
+// txtSeccao.setRendered(false);
+// }
+// else if(a.getSeccao().trim().length() == 0)
+// {
+// lblSeccao.setRendered(false);
+// txtSeccao.setRendered(false);
+// }
+// else
+// {
+// txtSeccao.setText(a.getSeccao());
+// booTurnoSeccaoLocal = true;
+// }
+
+ try
+ {
+ Seccao s = adp.getSeccao(a.getSeccao_id());
+ txtSeccao.setText(s.getDescricao());
+ booTurnoSeccaoLocal = true;
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ lblSeccao.setRendered(false);
+ txtSeccao.setRendered(false);
+ }
+
+
+ if(a.getLocal_trabalho() == null)
+ {
+ lblLocal.setRendered(false);
+ txtLocal.setRendered(false);
+ }
+ else if(a.getLocal_trabalho().trim().length() == 0)
+ {
+ lblLocal.setRendered(false);
+ txtLocal.setRendered(false);
+ }
+ else
+ {
+ txtLocal.setText(a.getLocal_trabalho());
+ booTurnoSeccaoLocal = true;
+ }
+
+ if(!booTurnoSeccaoLocal)
+ {
+ gridTurnoSeccaoLocal.setRendered(false);
+ }
+
+ if(a.getTarefa() == null)
+ {
+ gridTarefa.setRendered(false);
+ lblTarefa.setRendered(false);
+ txtTarefa.setRendered(false);
+ }
+ else if(a.getTarefa().trim().length() == 0)
+ {
+ gridTarefa.setRendered(false);
+ lblTarefa.setRendered(false);
+ txtTarefa.setRendered(false);
+ }
+ else
+ {
+ txtTarefa.setText(a.getTarefa());
+ }
+
+ if(a.getSubstancias() == null)
+ {
+ gridSubstancias.setRendered(false);
+ lblSubstancias.setRendered(false);
+ txtSubstancias.setRendered(false);
+ }
+ else if(a.getSubstancias().trim().length() == 0)
+ {
+ gridSubstancias.setRendered(false);
+ lblSubstancias.setRendered(false);
+ txtSubstancias.setRendered(false);
+ }
+ else
+ {
+ txtSubstancias.setText(a.getSubstancias());
+ }
+
+// if(a.getSuperior_hierarquico() == null)
+// {
+// gridSuperior.setRendered(false);
+// lblSuperior.setRendered(false);
+// txtSuperior.setRendered(false);
+// }
+// else if(a.getSuperior_hierarquico().trim().length() == 0)
+// {
+// gridSuperior.setRendered(false);
+// lblSuperior.setRendered(false);
+// txtSuperior.setRendered(false);
+// }
+// else
+// {
+// txtSuperior.setText(a.getSuperior_hierarquico());
+// }
+
+ if(a.getCondicoes() == null)
+ {
+ gridCondicoes.setRendered(false);
+ lblCondicoes.setRendered(false);
+ txtCondicoes.setRendered(false);
+ }
+ else if(a.getCondicoes().trim().length() == 0)
+ {
+ gridCondicoes.setRendered(false);
+ lblCondicoes.setRendered(false);
+ txtCondicoes.setRendered(false);
+ }
+ else
+ {
+ txtCondicoes.setText(a.getCondicoes());
+ }
+
+
+ if(a.getTestemunhas() == null)
+ {
+ gridTestemunhas.setRendered(false);
+ lblTestemunhas.setRendered(false);
+ txtTestemunhas.setRendered(false);
+ }
+ else if(a.getTestemunhas().trim().length() == 0)
+ {
+ gridTestemunhas.setRendered(false);
+ lblTestemunhas.setRendered(false);
+ txtTestemunhas.setRendered(false);
+
+ }
+ else
+ {
+ txtTestemunhas.setText(a.getTestemunhas());
+ }
+
+// txtCausas.setText(a.getCausas());
+ try
+ {
+ Causa c = adp.getCausa(a.getCausas());
+ txtCausas.setText(c.getCausa());
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ gridCausas.setRendered(false);
+ }
+
+ if(a.getDescricao() == null)
+ {
+ gridDescricao.setRendered(false);
+ lblDescricao.setRendered(false);
+ txtDescricao.setRendered(false);
+ }
+ else if(a.getTestemunhas().trim().length() == 0)
+ {
+ gridDescricao.setRendered(false);
+ lblDescricao.setRendered(false);
+ txtDescricao.setRendered(false);
+ }
+ else
+ {
+ txtDescricao.setText(a.getDescricao());
+ }
+
+ if(a.getConclusoes() == null)
+ {
+ gridConclusoes.setRendered(false);
+ lblConclusoes.setRendered(false);
+ txtConclusoes.setRendered(false);
+ }
+ else if(a.getConclusoes().trim().length() == 0)
+ {
+ gridConclusoes.setRendered(false);
+ lblConclusoes.setRendered(false);
+ txtConclusoes.setRendered(false);
+ }
+ else
+ {
+ txtConclusoes.setText(a.getConclusoes());
+ }
+
+ if(a.getAccoes() == null)
+ {
+ gridAccoes.setRendered(false);
+ lblAccoes.setRendered(false);
+ txtAccoes.setRendered(false);
+ }
+ else if(a.getAccoes().trim().length() == 0)
+ {
+ gridAccoes.setRendered(false);
+ lblAccoes.setRendered(false);
+ txtAccoes.setRendered(false);
+ }
+ else
+ {
+ txtAccoes.setText(a.getAccoes());
+ }
+
+ if(a.getAveriguacao_posterior().matches("n"))
+ {
+ gridAveriguacaoPosterior.setRendered(false);
+ }
+ else
+ {
+ if(a.getAveriguacao_obs().trim().length() > 0)
+ {
+ txtAveriguacaoPosterior.setText("Averiguação posterior: " + a.getAveriguacao_obs());
+ }
+ }
+
+
+
+ //fill images
+ String folderName = a.getAnalise_nr().substring(0,2) + a.getAnalise_nr().substring(3);
+ System.out.println("FOLDER NAME : " + folderName);
+ ServletContext theApplicationsServletContext =
+ (ServletContext) this.getExternalContext().getContext();
+// String imageFileFolder = theApplicationsServletContext.getRealPath(Global.IMAGE_FOLDER + "/" + folderName);
+
+
+ File apacheAnaliseFolder = new File(theApplicationsServletContext.getRealPath( Global.RESOURCES_IMAGE_FOLDER ) + "/analises/" + folderName);
+ if(apacheAnaliseFolder.exists())
+ {
+ Global global = new Global();
+ global.deleteFolderFiles(apacheAnaliseFolder);
+ }
+ else
+ {
+ apacheAnaliseFolder.mkdir();
+ }
+
+
+ String imageFileFolder = Global.IMAGE_FOLDER + "/" + folderName;
+ try
+ {
+ File f = new File(imageFileFolder);
+
+ if(f.exists())
+ {
+ File images[] = f.listFiles();
+ Arrays.sort(images);
+ for(int i=0;i 0)
+ {
+ s = new StaticText();
+ s.setId("s103");
+ s.setEscape(false);
+ s.setText(a.getNr_relatorio_acidente_colaborador1());
+ pg.getChildren().add(s);
+ }
+ }
+ if(a.getNr_relatorio_acidente_colaborador2() != null)
+ {
+ if(a.getNr_relatorio_acidente_colaborador2().intValue() > 0)
+ {
+ s = new StaticText();
+ s.setId("s104");
+ s.setEscape(false);
+ s.setText(" " + a.getNr_relatorio_acidente_colaborador2());
+ pg.getChildren().add(s);
+ }
+
+ }
+ if(a.getNr_relatorio_acidente_colaborador3() != null)
+ {
+ if(a.getNr_relatorio_acidente_colaborador3().intValue() > 0)
+ {
+ s = new StaticText();
+ s.setId("s105");
+ s.setEscape(false);
+ s.setText(" " + a.getNr_relatorio_acidente_colaborador3());
+ pg.getChildren().add(s);
+ }
+ }
+ if(a.getNr_relatorio_acidente_colaborador4() != null)
+ {
+ if(a.getNr_relatorio_acidente_colaborador4().intValue() > 0)
+ {
+ s = new StaticText();
+ s.setId("s106");
+ s.setEscape(false);
+ s.setText(" " + a.getNr_relatorio_acidente_colaborador4());
+ pg.getChildren().add(s);
+ }
+ }
+ grd.getChildren().add(pg);
+ }
+ gridColaborador.getChildren().add(grd);
+ }
+
+ }
+ else if( a.getOutros_acidentes_com_colaborador().matches("n") )
+ {
+ st1.setText("Não se verificaram outras ocorrências/incidências no mesmo posto de trabalho com o colaborador acidentado.");
+ gridColaborador.getChildren().add(st1);
+ }
+ else //t
+ {
+ gridColaborador.setRendered(false);
+ }
+
+ if(a.getAcidentes_outros_colaboradores().matches("y"))
+ {
+ st2.setText("Verificaram-se ocorrências/incidentes semelhantes com outros colaboradores.");
+ gridColaboradores.getChildren().add(st2);
+ boolean booShow = false;
+ boolean booShow1 = false;
+ boolean booShow2 = false;
+ if(a.getNr_acidentes_outros_colaboradores() != null)
+ {
+ booShow = true;
+ booShow1 = true;
+ }
+ if(a.getNr_relatorio_acidente_outros_colaboradores1() != null || a.getNr_relatorio_acidente_outros_colaboradores2() != null || a.getNr_relatorio_acidente_outros_colaboradores3() != null || a.getNr_relatorio_acidente_outros_colaboradores4() != null)
+ {
+ booShow = true;
+ booShow2 = true;
+ }
+
+ if(booShow)
+ {
+ HtmlPanelGrid grd = new HtmlPanelGrid();
+ grd.setId("grdColaboradoresS");
+ grd.setColumns(2);
+ grd.setColumnClasses("gridColLeft15, gridColLeft85");
+ if(booShow1)
+ {
+ PanelGroup pg = new PanelGroup();
+ StaticText s = new StaticText();
+ s.setId("s200");
+ s.setEscape(false);
+ s.setText("Total: ");
+ pg.getChildren().add(s);
+ s = new StaticText();
+ s.setId("s201");
+ s.setEscape(false);
+ s.setText(a.getNr_acidentes_outros_colaboradores());
+ pg.getChildren().add(s);
+ grd.getChildren().add(pg);
+ }
+ if(booShow2)
+ {
+ PanelGroup pg = new PanelGroup();
+ StaticText s = new StaticText();
+ s.setId("s202");
+ s.setEscape(false);
+ s.setText(" Relatórios de acidente nº: ");
+ pg.getChildren().add(s);
+ if(a.getNr_relatorio_acidente_outros_colaboradores1() != null)
+ {
+ if(a.getNr_relatorio_acidente_outros_colaboradores1().intValue() > 0)
+ {
+ s = new StaticText();
+ s.setId("s203");
+ s.setEscape(false);
+ s.setText(a.getNr_relatorio_acidente_outros_colaboradores1());
+ pg.getChildren().add(s);
+ }
+ }
+ if(a.getNr_relatorio_acidente_outros_colaboradores2() != null)
+ {
+ if(a.getNr_relatorio_acidente_outros_colaboradores2().intValue() > 0)
+ {
+ s = new StaticText();
+ s.setId("s204");
+ s.setEscape(false);
+ s.setText(" " + a.getNr_relatorio_acidente_outros_colaboradores2());
+ pg.getChildren().add(s);
+ }
+ }
+ if(a.getNr_relatorio_acidente_outros_colaboradores3() != null)
+ {
+ if(a.getNr_relatorio_acidente_outros_colaboradores3().intValue() > 0)
+ {
+ s = new StaticText();
+ s.setId("s205");
+ s.setEscape(false);
+ s.setText(" " + a.getNr_relatorio_acidente_outros_colaboradores3());
+ pg.getChildren().add(s);
+ }
+ }
+ if(a.getNr_relatorio_acidente_outros_colaboradores4() != null)
+ {
+ if(a.getNr_relatorio_acidente_outros_colaboradores4().intValue() > 0)
+ {
+ s = new StaticText();
+ s.setId("s206");
+ s.setEscape(false);
+ s.setText(" " + a.getNr_relatorio_acidente_outros_colaboradores4());
+ pg.getChildren().add(s);
+ }
+ }
+ grd.getChildren().add(pg);
+ }
+ gridColaboradores.getChildren().add(grd);
+ }
+ }
+ else if( a.getAcidentes_outros_colaboradores().matches("n") )
+ {
+ st2.setText("Não se verificaram ocorrências/incidentes com outros colaboradores.");
+ gridColaboradores.getChildren().add(st2);
+ }
+ else //t
+ {
+ gridColaboradores.setRendered(false);
+ }
+ }
+
+ private void fillRecomendacoesHs(AnaliseAcidente a)
+ {
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ ArrayList list = adp.getRecomendacoesByAnalise(a.getId());
+ ListIterator iter = list.listIterator();
+ int seq = 1;
+ while(iter.hasNext())
+ {
+ Recomendacao r = (Recomendacao) iter.next();
+ HtmlPanelGrid grd = new HtmlPanelGrid();
+ grd.setId("grdRecomendacaoView" + seq);
+ grd.setColumns(2);
+ grd.setColumnClasses("gridColLeft5, gridColLeft95");
+ grd.setStyle("width: 100%");
+
+ StaticText st = new StaticText();
+ st.setId("stNrRecomendacaoView" + seq);
+ st.setText(seq + " .");
+ st.setStyle("width: 24px");
+ grd.getChildren().add(st);
+
+ st = new StaticText();
+ st.setId("stRecomendacaoView" + seq);
+ st.setText(r.getRecomendacao());
+ //st.setStyle("width: 24px");
+ grd.getChildren().add(st);
+
+ gridRecomendacoesView.getChildren().add(grd);
+ seq++;
+ }
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+
+ private void fillMedidasRh(AnaliseAcidente a)
+ {
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ ArrayList list = adp.getMedidasByAnalise(a.getId());
+ ListIterator iter = list.listIterator();
+ int seq = 1;
+ while(iter.hasNext())
+ {
+ Medida m = (Medida) iter.next();
+ HtmlPanelGrid grd = new HtmlPanelGrid();
+ grd.setId("grdMedidaView" + seq);
+ grd.setColumns(2);
+ grd.setColumnClasses("gridColLeft5, gridColLeft95");
+ grd.setStyle("width: 100%");
+
+ StaticText st = new StaticText();
+ st.setId("stNrMedidaView" + seq);
+ st.setText(seq + " .");
+ st.setStyle("width: 24px");
+ grd.getChildren().add(st);
+
+ st = new StaticText();
+ st.setId("stMedidaView" + seq);
+ st.setText(m.getMedida());
+ //st.setStyle("width: 24px");
+ grd.getChildren().add(st);
+
+ gridMedidasView.getChildren().add(grd);
+ seq++;
+ }
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+
+ private void fillMedico(AnaliseAcidente a)
+ {
+
+ PanelGroup pg = null;
+ StaticText st = null;
+ HtmlPanelGrid grd = null;
+ ImageComponent img = null;
+ //LESAO :
+
+ if(a.getLesao_cabeca().matches("y"))
+ {
+ st = new StaticText();
+ st.setId("stLesaoCabeca");
+ st.setEscape(false);
+ st.setText("Cabeça");
+ gridLesao.getChildren().add(st);
+ }
+
+ if(a.getLesao_pescoco().matches("y"))
+ {
+ st = new StaticText();
+ st.setId("stLesaoPescoco");
+ st.setEscape(false);
+ st.setText("Pescoço");
+ gridLesao.getChildren().add(st);
+ }
+
+ if(a.getLesao_tronco().matches("y"))
+ {
+ st = new StaticText();
+ st.setId("stLesaoTronco");
+ st.setEscape(false);
+ st.setText("Tronco");
+ gridLesao.getChildren().add(st);
+ }
+
+ grd = new HtmlPanelGrid();
+ grd.setId("gridLesaoMembros");
+ grd.setColumns(2);
+ grd.setColumnClasses("gridColLeft");
+ if(a.getLesao_membro_sup_dir().matches("y"))
+ {
+ st = new StaticText();
+ st.setId("stLesaoMembroSupDir");
+ st.setEscape(false);
+ st.setText("Membro Superior Direito");
+ grd.getChildren().add(st);
+ if(a.getEspecif1() != null)
+ {
+ if(a.getEspecif1().trim().length() > 0)
+ {
+ st = new StaticText();
+ st.setId("stEspecif1");
+ st.setEscape(false);
+ st.setText(a.getEspecif1());
+ grd.getChildren().add(st);
+ }
+ }
+ }
+
+ if(a.getLesao_membro_sup_esq().matches("y"))
+ {
+ st = new StaticText();
+ st.setId("stLesaoMembroSupEsq");
+ st.setEscape(false);
+ st.setText("Membro Superior Esquerdo");
+ grd.getChildren().add(st);
+ if(a.getEspecif2() != null)
+ {
+ if(a.getEspecif2().trim().length() > 0)
+ {
+ st = new StaticText();
+ st.setId("stEspecif2");
+ st.setEscape(false);
+ st.setText(a.getEspecif2());
+ grd.getChildren().add(st);
+ }
+ }
+ }
+
+ if(a.getLesao_membro_inf_dir().matches("y"))
+ {
+ st = new StaticText();
+ st.setId("stLesaoMembroInfDir");
+ st.setEscape(false);
+ st.setText("Membro Inferior Direito");
+ grd.getChildren().add(st);
+ if(a.getEspecif3() != null)
+ {
+ if(a.getEspecif3().trim().length() > 0)
+ {
+ st = new StaticText();
+ st.setId("stEspecif3");
+ st.setEscape(false);
+ st.setText(a.getEspecif3());
+ grd.getChildren().add(st);
+ }
+ }
+
+ }
+
+ if(a.getLesao_membro_inf_esq().matches("y"))
+ {
+ st = new StaticText();
+ st.setId("stLesaoMembroInfEsq");
+ st.setEscape(false);
+ st.setText("Membro Inferior Esquerdo");
+ grd.getChildren().add(st);
+ if(a.getEspecif4() != null)
+ {
+ if(a.getEspecif4().trim().length() > 0)
+ {
+ st = new StaticText();
+ st.setId("stEspecif4");
+ st.setEscape(false);
+ st.setText(a.getEspecif4());
+ grd.getChildren().add(st);
+ }
+ }
+ }
+ if(grd.getChildren().size() > 0)
+ {
+ gridLesao.getChildren().add(grd);
+ }
+
+ if(a.getTipo_lesao().trim().length() > 0 )
+ {
+ pg = new PanelGroup();
+ pg.setId("pgTipoLesao");
+ st = new StaticText();
+ st.setId("stTipoLesaoLbl");
+ st.setEscape(false);
+ st.setText("Tipo de lesão: ");
+ pg.getChildren().add(st);
+ st = new StaticText();
+ st.setId("stTipoLesao");
+ st.setEscape(false);
+ st.setText(a.getTipo_lesao());
+ pg.getChildren().add(st);
+ gridLesao.getChildren().add(pg);
+ }
+
+ System.out.println("GRID LESAO : " + gridLesao.getChildren().size());
+ if(gridLesao.getChildren().size() == 0)
+ {
+ lblAreasCorporais.setRendered(false);
+ }
+
+ //INCAPACIDADE :
+ pg = new PanelGroup();
+ pg.setId("pgTipoIncapacidade");
+ st = new StaticText();
+ st.setId("stTipoIncapacidadeLbl1");
+ st.setEscape(false);
+ st.setStyle("font-weight: bold");
+ st.setText("Tipo de incapacidade: ");
+ if(a.getTipo_incapacidade().matches("t"))
+ {
+ pg.getChildren().add(st);
+ st = new StaticText();
+ st.setId("stTipoIncapacidade");
+ st.setEscape(false);
+ st.setText("Temporária ");
+ pg.getChildren().add(st);
+ st = new StaticText();
+ st.setId("stTipoIncapacidadeLbl2");
+ st.setStyle("font-weight: bold");
+ st.setEscape(false);
+ st.setText(" Coeficiente de incapacidade: ");
+ pg.getChildren().add(st);
+ st = new StaticText();
+ st.setId("stCoefIncapacidade");
+ st.setEscape(false);
+ st.setText(a.getCoef_incapacidade().toString() + "%");
+ pg.getChildren().add(st);
+ }
+ else if(a.getTipo_incapacidade().matches("p"))
+ {
+ pg.getChildren().add(st);
+ st = new StaticText();
+ st.setId("stTipoIncapacidade");
+ st.setEscape(false);
+ st.setText("Permanente ");
+ pg.getChildren().add(st);
+ st = new StaticText();
+ st.setId("stTipoIncapacidadeLbl2");
+ st.setStyle("font-weight: bold");
+ st.setEscape(false);
+ st.setText(" Coeficiente de incapacidade: ");
+ pg.getChildren().add(st);
+ st = new StaticText();
+ st.setId("stCoefIncapacidade");
+ st.setEscape(false);
+ st.setText(a.getCoef_incapacidade().toString() + "%");
+ pg.getChildren().add(st);
+ }
+
+ if(pg.getChildren().size() > 0)
+ {
+ gridIncapacidade.getChildren().add(pg);
+
+ }
+
+ pg = new PanelGroup();
+ pg.setId("pgAvaliacaoIncapacidade");
+ if(a.getData_aval_incapacidade() != null)
+ {
+ st = new StaticText();
+ st.setId("stDataAvalIncapacidadeLbl1");
+ st.setStyle("font-weight: bold");
+ st.setEscape(false);
+ st.setText("Avaliação de incapacidade realizada em ");
+ pg.getChildren().add(st);
+ st = new StaticText();
+ st.setId("stDataAvalIncapacidade");
+ st.setEscape(false);
+ //st.setText(a.getData_aval_incapacidade());
+ try
+ {
+ java.util.Date ddate = new java.util.Date(a.getData_aval_incapacidade().getTime());
+ st.setText(utils.Utils.dateToYYYYMMDD(ddate));
+ }
+ catch(Exception ex){};
+ pg.getChildren().add(st);
+ }
+
+
+ if(a.getData_rev_incapacidade() != null)
+ {
+ st = new StaticText();
+ st.setId("stDataRevIncapacidadeLbl1");
+ st.setStyle("font-weight: bold");
+ st.setEscape(false);
+ st.setText("Revisão de incapacidade em ");
+ pg.getChildren().add(st);
+ st = new StaticText();
+ st.setId("stDataRevIncapacidade");
+ st.setEscape(false);
+ //st.setText(a.getData_rev_incapacidade());
+ try
+ {
+ java.util.Date ddate = new java.util.Date(a.getData_rev_incapacidade().getTime());
+ st.setText(utils.Utils.dateToYYYYMMDD(ddate));
+ }
+ catch(Exception ex){};
+ pg.getChildren().add(st);
+ }
+
+ if(pg.getChildren().size() > 0)
+ {
+ gridIncapacidade.getChildren().add(pg);
+ }
+
+ if(a.getPeriodo_incapacidade_a() != null || a.getPeriodo_incapacidade_de() != null)
+ {
+ pg = new PanelGroup();
+ pg.setId("pgPeriodoIncapacidade");
+ st = new StaticText();
+ st.setId("stPeriodoIncapacidadeLbl1");
+ st.setStyle("font-weight: bold");
+ st.setEscape(false);
+ st.setText("Período de incapacidade temporária de ");
+ pg.getChildren().add(st);
+ st = new StaticText();
+ st.setId("stPeriodoIncapacidadeDe");
+ st.setEscape(false);
+ //st.setText(a.getPeriodo_incapacidade_de());
+ try
+ {
+ java.util.Date ddate = new java.util.Date(a.getPeriodo_incapacidade_de().getTime());
+ st.setText(utils.Utils.dateToYYYYMMDD(ddate));
+ }
+ catch(Exception ex){};
+ pg.getChildren().add(st);
+ st = new StaticText();
+ st.setId("stPeriodoIncapacidadeLbl2");
+ st.setStyle("font-weight: bold");
+ st.setEscape(false);
+ st.setText(" a ");
+ pg.getChildren().add(st);
+ st = new StaticText();
+ st.setId("stPeriodoIncapacidadeA");
+ st.setEscape(false);
+ //st.setText(a.getPeriodo_incapacidade_a());
+ try
+ {
+ java.util.Date ddate = new java.util.Date(a.getPeriodo_incapacidade_a().getTime());
+ st.setText(utils.Utils.dateToYYYYMMDD(ddate));
+ }
+ catch(Exception ex){};
+ pg.getChildren().add(st);
+ gridIncapacidade.getChildren().add(pg);
+ }
+
+
+
+// //RESTRICOES
+//
+// if(a.getImg_flexao().matches("y"))
+// {
+// grd = new HtmlPanelGrid();
+// grd.setId("grdImgFlexao");
+// grd.setColumns(1);
+// grd.setColumnClasses("gridColCenter");
+// grd.setStyleClass("centerBlock");
+//
+// pg = new PanelGroup();
+// pg.setId("pgImgFlexao");
+// img = new ImageComponent();
+// img.setId("imgRestricoes1000");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/fle1.gif");
+// pg.getChildren().add(img);
+// img = new ImageComponent();
+// img.setId("imgRestricoes1001");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/fle2.gif");
+// pg.getChildren().add(img);
+// img = new ImageComponent();
+// img.setId("imgRestricoes1002");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/fle3.gif");
+// pg.getChildren().add(img);
+// img = new ImageComponent();
+// img.setId("imgRestricoes1003");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/fle4.gif");
+// pg.getChildren().add(img);
+// grd.getChildren().add(pg);
+// st = new StaticText();
+// st.setId("stImgRestricaoLbl1");
+// st.setEscape(false);
+// st.setText("Flexão");
+// grd.getChildren().add(st);
+// gridImagesRestricoes.getChildren().add(grd);
+// }
+//
+// if(a.getImg_rot1().matches("y"))
+// {
+// grd = new HtmlPanelGrid();
+// grd.setId("grdImgRot1");
+// grd.setColumns(1);
+// grd.setColumnClasses("gridColCenter");
+// grd.setStyleClass("centerBlock");
+//
+// img = new ImageComponent();
+// img.setId("imgRestricoes1005");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/rot1.gif");
+// grd.getChildren().add(img);
+// st = new StaticText();
+// st.setId("stImgRestricaoLbl2");
+// st.setEscape(false);
+// st.setText("Flexão Lateral");
+// grd.getChildren().add(st);
+// gridImagesRestricoes.getChildren().add(grd);
+// }
+//
+// if(a.getImg_rot2().matches("y"))
+// {
+// grd = new HtmlPanelGrid();
+// grd.setId("grdImgRot2");
+// grd.setColumns(1);
+// grd.setColumnClasses("gridColCenter");
+// grd.setStyleClass("centerBlock");
+//
+// img = new ImageComponent();
+// img.setId("imgRestricoes1006");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/rot2.gif");
+// grd.getChildren().add(img);
+// st = new StaticText();
+// st.setId("stImgRestricaoLbl3");
+// st.setEscape(false);
+// st.setText("Rotação");
+// grd.getChildren().add(st);
+// gridImagesRestricoes.getChildren().add(grd);
+// }
+//
+// if(a.getImg_ext1().matches("y"))
+// {
+// grd = new HtmlPanelGrid();
+// grd.setId("grdImgExt1");
+// grd.setColumns(1);
+// grd.setColumnClasses("gridColCenter");
+// grd.setStyleClass("centerBlock");
+//
+// img = new ImageComponent();
+// img.setId("imgRestricoes1007");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/ext1.gif");
+// grd.getChildren().add(img);
+// st = new StaticText();
+// st.setId("stImgRestricaoLbl4");
+// st.setEscape(false);
+// st.setText("Extensão");
+// grd.getChildren().add(st);
+// gridImagesRestricoes.getChildren().add(grd);
+// }
+//
+// if(a.getImg_ext2().matches("y"))
+// {
+// grd = new HtmlPanelGrid();
+// grd.setId("grdImgExt2");
+// grd.setColumns(1);
+// grd.setColumnClasses("gridColCenter");
+// grd.setStyleClass("centerBlock");
+//
+// pg = new PanelGroup();
+// pg.setId("pgImgExt2");
+// img = new ImageComponent();
+// img.setId("imgRestricoes1008");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/ext2.gif");
+// pg.getChildren().add(img);
+// img = new ImageComponent();
+// img.setId("imgRestricoes1009");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/ext3.gif");
+// pg.getChildren().add(img);
+// img = new ImageComponent();
+// img.setId("imgRestricoes1010");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/ext4.gif");
+// pg.getChildren().add(img);
+// grd.getChildren().add(pg);
+// st = new StaticText();
+// st.setId("stImgRestricaoLbl5");
+// st.setEscape(false);
+// st.setText("Flexão/Extensão Lateral + Rotação");
+// grd.getChildren().add(st);
+// gridImagesRestricoes.getChildren().add(grd);
+// }
+//
+// if(a.getImg_cab1().matches("y"))
+// {
+// grd = new HtmlPanelGrid();
+// grd.setId("grdImgCab1");
+// grd.setColumns(1);
+// grd.setColumnClasses("gridColCenter");
+// grd.setStyleClass("centerBlock");
+//
+// img = new ImageComponent();
+// img.setId("imgRestricoes10011");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/ca1.gif");
+// grd.getChildren().add(img);
+// st = new StaticText();
+// st.setId("stImgRestricaoLbl6");
+// st.setEscape(false);
+// st.setText("Flexão");
+// grd.getChildren().add(st);
+// gridImagesRestricoes.getChildren().add(grd);
+// }
+//
+// if(a.getImg_cab2().matches("y"))
+// {
+// grd = new HtmlPanelGrid();
+// grd.setId("grdImgCab2");
+// grd.setColumns(1);
+// grd.setColumnClasses("gridColCenter");
+// grd.setStyleClass("centerBlock");
+//
+// img = new ImageComponent();
+// img.setId("imgRestricoes10012");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/ca2.gif");
+// grd.getChildren().add(img);
+// st = new StaticText();
+// st.setId("stImgRestricaoLbl7");
+// st.setEscape(false);
+// st.setText("Extensão");
+// grd.getChildren().add(st);
+// gridImagesRestricoes.getChildren().add(grd);
+// }
+//
+// if(a.getImg_cab3().matches("y"))
+// {
+// grd = new HtmlPanelGrid();
+// grd.setId("grdImgCab3");
+// grd.setColumns(1);
+// grd.setColumnClasses("gridColCenter");
+// grd.setStyleClass("centerBlock");
+//
+// img = new ImageComponent();
+// img.setId("imgRestricoes10013");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/ca3.gif");
+// grd.getChildren().add(img);
+// st = new StaticText();
+// st.setId("stImgRestricaoLbl8");
+// st.setEscape(false);
+// st.setText("Flexão Lateral");
+// grd.getChildren().add(st);
+// gridImagesRestricoes.getChildren().add(grd);
+// }
+//
+// if(a.getImg_cab4().matches("y"))
+// {
+// grd = new HtmlPanelGrid();
+// grd.setId("grdImgCab4");
+// grd.setColumns(1);
+// grd.setColumnClasses("gridColCenter");
+// grd.setStyleClass("centerBlock");
+//
+// img = new ImageComponent();
+// img.setId("imgRestricoes10014");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/ca4.gif");
+// grd.getChildren().add(img);
+// st = new StaticText();
+// st.setId("stImgRestricaoLbl9");
+// st.setEscape(false);
+// st.setText("Rotação");
+// grd.getChildren().add(st);
+// gridImagesRestricoes.getChildren().add(grd);
+// }
+//
+// if(a.getImg_ma1().matches("y"))
+// {
+// grd = new HtmlPanelGrid();
+// grd.setId("grdImgMa1");
+// grd.setColumns(1);
+// grd.setColumnClasses("gridColCenter");
+// grd.setStyleClass("centerBlock");
+//
+// img = new ImageComponent();
+// img.setId("imgRestricoes10015");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/ma1.gif");
+// grd.getChildren().add(img);
+// st = new StaticText();
+// st.setId("stImgRestricaoLbl10");
+// st.setEscape(false);
+// st.setText("Poronação");
+// grd.getChildren().add(st);
+// gridImagesRestricoes.getChildren().add(grd);
+// }
+//
+// if(a.getImg_ma2().matches("y"))
+// {
+// grd = new HtmlPanelGrid();
+// grd.setId("grdImgMa2");
+// grd.setColumns(1);
+// grd.setColumnClasses("gridColCenter");
+// grd.setStyleClass("centerBlock");
+//
+// img = new ImageComponent();
+// img.setId("imgRestricoes10016");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/ma2.gif");
+// grd.getChildren().add(img);
+// st = new StaticText();
+// st.setId("stImgRestricaoLbl11");
+// st.setEscape(false);
+// st.setText("Supinação");
+// grd.getChildren().add(st);
+// gridImagesRestricoes.getChildren().add(grd);
+// }
+//
+// if(a.getImg_ma3().matches("y"))
+// {
+// grd = new HtmlPanelGrid();
+// grd.setId("grdImgMa3");
+// grd.setColumns(1);
+// grd.setColumnClasses("gridColCenter");
+// grd.setStyleClass("centerBlock");
+//
+// img = new ImageComponent();
+// img.setId("imgRestricoes10017");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/ma3.gif");
+// grd.getChildren().add(img);
+// st = new StaticText();
+// st.setId("stImgRestricaoLbl12");
+// st.setEscape(false);
+// st.setText("Flexão");
+// grd.getChildren().add(st);
+// gridImagesRestricoes.getChildren().add(grd);
+// }
+//
+// if(a.getImg_ma4().matches("y"))
+// {
+// grd = new HtmlPanelGrid();
+// grd.setId("grdImgMa4");
+// grd.setColumns(1);
+// grd.setColumnClasses("gridColCenter");
+// grd.setStyleClass("centerBlock");
+//
+// img = new ImageComponent();
+// img.setId("imgRestricoes10018");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/ma4.gif");
+// grd.getChildren().add(img);
+// st = new StaticText();
+// st.setId("stImgRestricaoLbl13");
+// st.setEscape(false);
+// st.setText("Extensão");
+// grd.getChildren().add(st);
+// gridImagesRestricoes.getChildren().add(grd);
+// }
+//
+// if(a.getImg_ma5().matches("y"))
+// {
+// grd = new HtmlPanelGrid();
+// grd.setId("grdImgMa5");
+// grd.setColumns(1);
+// grd.setColumnClasses("gridColCenter");
+// grd.setStyleClass("centerBlock");
+//
+// img = new ImageComponent();
+// img.setId("imgRestricoes10019");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/ma5.gif");
+// grd.getChildren().add(img);
+// st = new StaticText();
+// st.setId("stImgRestricaoLbl14");
+// st.setEscape(false);
+// st.setText("Desvio Ulnar");
+// grd.getChildren().add(st);
+// gridImagesRestricoes.getChildren().add(grd);
+// }
+//
+// if(a.getImg_ma6().matches("y"))
+// {
+// grd = new HtmlPanelGrid();
+// grd.setId("grdImgMa6");
+// grd.setColumns(1);
+// grd.setColumnClasses("gridColCenter");
+// grd.setStyleClass("centerBlock");
+//
+// img = new ImageComponent();
+// img.setId("imgRestricoes10020");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/ma6.gif");
+// grd.getChildren().add(img);
+// st = new StaticText();
+// st.setId("stImgRestricaoLbl15");
+// st.setEscape(false);
+// st.setText("Desvio Radial");
+// grd.getChildren().add(st);
+// gridImagesRestricoes.getChildren().add(grd);
+// }
+//
+// if(a.getImg_ma7().matches("y"))
+// {
+// grd = new HtmlPanelGrid();
+// grd.setId("grdImgMa7");
+// grd.setColumns(1);
+// grd.setColumnClasses("gridColCenter");
+// grd.setStyleClass("centerBlock");
+//
+// img = new ImageComponent();
+// img.setId("imgRestricoes10021");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/ma7.gif");
+// grd.getChildren().add(img);
+// st = new StaticText();
+// st.setId("stImgRestricaoLbl16");
+// st.setEscape(false);
+// st.setText("Pinça Digital");
+// grd.getChildren().add(st);
+// gridImagesRestricoes.getChildren().add(grd);
+// }
+//
+// if(a.getImg_ma8().matches("y"))
+// {
+// grd = new HtmlPanelGrid();
+// grd.setId("grdImgMa8");
+// grd.setColumns(1);
+// grd.setColumnClasses("gridColCenter");
+// grd.setStyleClass("centerBlock");
+//
+// img = new ImageComponent();
+// img.setId("imgRestricoes10022");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/ma8.gif");
+// grd.getChildren().add(img);
+// st = new StaticText();
+// st.setId("stImgRestricaoLbl17");
+// st.setEscape(false);
+// st.setText("Segurar objectos entre os dedos");
+// grd.getChildren().add(st);
+// gridImagesRestricoes.getChildren().add(grd);
+// }
+//
+// if(a.getImg_ma9().matches("y"))
+// {
+// grd = new HtmlPanelGrid();
+// grd.setId("grdImgMa9");
+// grd.setColumns(1);
+// grd.setColumnClasses("gridColCenter");
+// grd.setStyleClass("centerBlock");
+//
+// img = new ImageComponent();
+// img.setId("imgRestricoes10023");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/ma9.gif");
+// grd.getChildren().add(img);
+// st = new StaticText();
+// st.setId("stImgRestricaoLbl18");
+// st.setEscape(false);
+// st.setText("Dedos em extensão");
+// grd.getChildren().add(st);
+// gridImagesRestricoes.getChildren().add(grd);
+// }
+//
+// if(a.getImg_ma10().matches("y"))
+// {
+// grd = new HtmlPanelGrid();
+// grd.setId("grdImgMa10");
+// grd.setColumns(1);
+// grd.setColumnClasses("gridColCenter");
+// grd.setStyleClass("centerBlock");
+//
+// img = new ImageComponent();
+// img.setId("imgRestricoes10024");
+// img.setWidth(IMAGE_WIDTH);
+// img.setHeight(IMAGE_HEIGHT);
+// img.setUrl("/resources/images/medico/ma10.gif");
+// grd.getChildren().add(img);
+// st = new StaticText();
+// st.setId("stImgRestricaoLbl19");
+// st.setEscape(false);
+// st.setText("Pega palmar");
+// grd.getChildren().add(st);
+// gridImagesRestricoes.getChildren().add(grd);
+// }
+//
+// if(a.getRestricao_carga() != null)
+// {
+// if(a.getRestricao_carga().intValue() > 0)
+// {
+// pg = new PanelGroup();
+// st = new StaticText();
+// st.setId("stRestricaoCargaLbl");
+// st.setEscape(false);
+// st.setText("Movimentação e manipulação de cargas com mais de ");
+// pg.getChildren().add(st);
+// st = new StaticText();
+// st.setId("stRestricaoCargaKgs");
+// st.setEscape(false);
+// st.setText(a.getRestricao_carga().toString());
+// pg.getChildren().add(st);
+// st = new StaticText();
+// st.setId("stRestricaoCargaLbl1");
+// st.setEscape(false);
+// st.setText("Kg");
+// pg.getChildren().add(st);
+// gridOutrasRestricoes.getChildren().add(pg);
+// }
+//
+// if(a.getRestricao_motricidade().matches("y"))
+// {
+// st = new StaticText();
+// st.setId("stRestricaoMotricidadeLbl");
+// st.setEscape(false);
+// st.setText("Operações que requeiram motricidade fina.");
+// gridOutrasRestricoes.getChildren().add(st);
+// }
+//
+// if(a.getRestricao_conducao().matches("y"))
+// {
+// st = new StaticText();
+// st.setId("stRestricaoConducaoLbl");
+// st.setEscape(false);
+// st.setText("Condução/interacção com veículos ou outros equipamentos.");
+// gridOutrasRestricoes.getChildren().add(st);
+// }
+//
+// if(a.getRestricao_vibracoes().matches("y"))
+// {
+// st = new StaticText();
+// st.setId("stRestricaoVibracoesLbl");
+// st.setEscape(false);
+// st.setText("Utilizaçõo de equipamentos/ferramentas que impliquem exposição a vibrações ou impactos.");
+// gridOutrasRestricoes.getChildren().add(st);
+// }
+//
+// if(a.getRestricao_outras().trim().length() > 0)
+// {
+// st = new StaticText();
+// st.setId("stRestricaoOutras");
+// st.setEscape(false);
+// st.setText(a.getRestricao_outras());
+// gridOutrasRestricoes.getChildren().add(st);
+// }
+//
+// if(a.getMed_observ().trim().length() > 0)
+// {
+// stObservacoes.setText(a.getMed_observ());
+// }
+// }
+
+ }
+
+ private void fillVerificacao(AnaliseAcidente a)
+ {
+// StaticText st = new StaticText();
+// st.setId("stVerificacao1");
+// st.setEscape(false);
+// String txtVer = "Verificado por " + a.getNome_resp_seg() + " a ";
+// //txtVer += a.getData_assinatura_seg();
+//
+// try
+// {
+// java.util.Date ddate = new java.util.Date(a.getData_assinatura_seg().getTime());
+// txtVer += utils.Utils.dateToYYYYMMDD(ddate);
+// }
+// catch(Exception ex){};
+// st.setText(txtVer);
+// gridAssinaturasView.getChildren().add(st);
+//
+// st = new StaticText();
+// st.setId("stVerificacao2");
+// st.setEscape(false);
+// txtVer = "Verificado por " + a.getNome_resp_rh() + " a ";
+// //txtVer += a.getData_assinatura_rh();
+// try
+// {
+// java.util.Date ddate = new java.util.Date(a.getData_assinatura_rh().getTime());
+// txtVer += utils.Utils.dateToYYYYMMDD(ddate);
+// }
+// catch(Exception ex){};
+// st.setText(txtVer);
+// gridAssinaturasView.getChildren().add(st);
+
+ StaticText st = null;
+ String txtVer = null;
+ if(a.getAveriguador() != null)
+ {
+ if(a.getAveriguador().trim().length() > 0)
+ {
+ st = new StaticText();
+ st.setId("stVerificacao1");
+ st.setEscape(false);
+ txtVer = "Averiguado por " + a.getAveriguador() + " (Departamento de Segurança) a ";
+ //txtVer += a.getData_assinatura_seg();
+
+ try
+ {
+ java.util.Date ddate = new java.util.Date(a.getData_inicio_processo().getTime());
+ txtVer += utils.Utils.dateToYYYYMMDD(ddate) + ".";
+ }
+ catch(Exception ex){};
+ st.setText(txtVer);
+ gridAssinaturasView.getChildren().add(st);
+ }
+ }
+
+ if(a.getAss_consolidacao().matches("y"))
+ {
+ st = new StaticText();
+ st.setId("stVerificacao2");
+ st.setEscape(false);
+ txtVer = "Verificado por " + a.getNome_resp_consolidacao() + " (Técnico de SHST) a ";
+ //txtVer += a.getData_assinatura_rh();
+ try
+ {
+ java.util.Date ddate = new java.util.Date(a.getData_consolidacao().getTime());
+ txtVer += utils.Utils.dateToYYYYMMDD(ddate) + ".";
+ }
+ catch(Exception ex){};
+ st.setText(txtVer);
+ gridAssinaturasView.getChildren().add(st);
+ }
+
+ if(a.getAss_resp_seg().matches("y"))
+ {
+ st = new StaticText();
+ st.setId("stVerificacao3");
+ st.setEscape(false);
+ txtVer = "Verificado por " + a.getNome_resp_seg() + " (Responsável de Segurança) a ";
+ //txtVer += a.getData_assinatura_rh();
+ try
+ {
+ java.util.Date ddate = new java.util.Date(a.getData_assinatura_seg().getTime());
+ txtVer += utils.Utils.dateToYYYYMMDD(ddate) + ".";
+ }
+ catch(Exception ex){};
+ st.setText(txtVer);
+ gridAssinaturasView.getChildren().add(st);
+ }
+
+ if(a.getAss_resp_rh().matches("y"))
+ {
+ st = new StaticText();
+ st.setId("stVerificacao4");
+ st.setEscape(false);
+ txtVer = "Verificado por " + a.getNome_resp_rh() + " (Responsável de RH) a ";
+ //txtVer += a.getData_assinatura_rh();
+ try
+ {
+ java.util.Date ddate = new java.util.Date(a.getData_assinatura_rh().getTime());
+ txtVer += utils.Utils.dateToYYYYMMDD(ddate) + ".";
+ }
+ catch(Exception ex){};
+ st.setText(txtVer);
+ gridAssinaturasView.getChildren().add(st);
+ }
+
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ Acidentado ac = adp.getAcidentado(a.getAcidentado_id());
+ if(ac.getNome_superior_hierarquico() != null)
+ {
+ if(ac.getNome_superior_hierarquico().trim().length() > 0)
+ {
+ st = new StaticText();
+ st.setId("stVerificacao5");
+ st.setEscape(false);
+ txtVer = "Com conhecimento de " + ac.getNome_superior_hierarquico() + " (Responsável hierárquico)";
+
+ if(ac.getEmail_superior_hierarquico() != null)
+ {
+ if(ac.getEmail_superior_hierarquico().trim().length() > 0)
+ {
+ try
+ {
+ java.util.Date ddate = new java.util.Date(ac.getData_email_superior_hierarquico().getTime());
+ txtVer += " a " + utils.Utils.dateToYYYYMMDD(ddate);
+ }
+ catch(Exception ex){};
+ }
+ }
+ txtVer += ".";
+ st.setText(txtVer);
+ gridAssinaturasView.getChildren().add(st);
+ }
+ }
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ HtmlPanelGrid grid = new HtmlPanelGrid();
+ grid.setId("rodape1");
+ grid.setColumns(1);
+ grid.setStyle("width: 100%");
+ grid.setColumnClasses("gridColCenter");
+ st = new StaticText();
+ st.setId("stRodape1");
+ st.setEscape(false);
+ st.setText("- processamento informático - acesso autenticado -");
+ grid.getChildren().add(st);
+ gridAssinaturasView.getChildren().add(grid);
+ }
+
+ private void fillImpressao(AnaliseAcidente a)
+ {
+ StaticText st = new StaticText();
+ st.setId("stImpressaoView1");
+ st.setEscape(false);
+ String stData = "";
+ try
+ {
+ java.util.Date ddate = new java.util.Date(a.getData_assinatura_superior().getTime());
+ stData += utils.Utils.dateToYYYYMMDD(ddate);
+ }
+ catch(Exception ex){};
+
+ String txt = "Assinado na Ficha de Análise de Acidente em papel por " + a.getNome_superior() + ", superior hierárquico / superior de ";
+ txt += getSessionBean1().getAcidentado().getNome() + ", a " + stData;
+ gridAssSupView.getChildren().add(st);
+ }
+
+ private void fillImages()
+ {
+ ServletContext theApplicationsServletContext =
+ (ServletContext) this.getExternalContext().getContext();
+ try
+ {
+// String imageFileFolder = theApplicationsServletContext.getRealPath(Global.IMAGE_FOLDER + "/" + getSessionBean1().getCurrentAnalise().getId());
+ String imageFileFolder = Global.IMAGE_FOLDER + "/" + getSessionBean1().getCurrentAnalise().getId();
+ File f = new File(imageFileFolder);
+ if( f.exists() )
+ {
+ File files[] = f.listFiles();
+
+ for(int i=0;i " + Global.ESTADO_SEG + " AND estado < " + Global.ESTADO_ASSINATURA_SEG + " AND (" +
+ "averiguacao_posterior = 'n' OR (averiguacao_posterior = 'y' AND averiguacao_obs <> '')" +
+ ") " +
+ "OR (estado > " + Global.ESTADO_ASSINATURA_SEG + " AND estado < " + Global.ESTADO_CONCLUIDO + ")" +
+ ")" + " ORDER BY analise_nr";
+ }
+ else
+ {
+ sql += "AND estabelecimento_id = " + estabelecimento_id + " AND (" +
+ "(estado > " + Global.ESTADO_SEG + " AND estado < " + Global.ESTADO_FECHAR + " AND (" +
+ "averiguacao_posterior = 'n' OR (averiguacao_posterior = 'y' AND averiguacao_obs <> '')" +
+ ")) OR estado = " + Global.ESTADO_FECHAR +
+ ")" + " ORDER BY analise_nr";
+ }
+ System.out.println( "SQL: " + sql );
+ ResultSet rs = st.executeQuery( sql );
+ ArrayList list = fillAnaliseFields( rs );
+ return list;
+ }
+
+ public ArrayList getAnalisesSeguimentoSegList( Integer estabelecimento_id, String responsavel_loja )
+ throws Exception
+ {
+ Statement st = createStatement();
+ String sql = null;
+
+ if ( responsavel_loja.matches( "y" ) )
+ {
+ sql ="SELECT * FROM analises_acidentes WHERE " +
+ "estabelecimento_id = " + estabelecimento_id + " AND (" +
+ "estado > " + Global.ESTADO_SEG + " AND estado < " + Global.ESTADO_ASSINATURA_SEG + " AND (" +
+ "averiguacao_posterior = 'n' OR (averiguacao_posterior = 'y' AND averiguacao_obs <> '')" +
+ ") " +
+ "OR (estado > " + Global.ESTADO_ASSINATURA_SEG + " AND estado < " + Global.ESTADO_CONCLUIDO + ")" +
+ ")" + " AND apagada = 'n' " +
+ "ORDER BY analise_nr";
+// sql ="SELECT * FROM analises_acidentes WHERE estabelecimento_id = " + estabelecimento_id + " AND ((estado = 7 and ass_resp_seg = 'y') OR (estado > 1 AND estado < 7 AND (averiguacao_posterior = 'n' OR (averiguacao_posterior = 'y' AND averiguacao_obs <> ''))) OR (estado > 7 AND estado < 10))";
+ }
+ else
+ {
+// sql ="SELECT * FROM analises_acidentes WHERE estabelecimento_id = " + estabelecimento_id + " AND ((estado > " + Global.ESTADO_SEG + " AND estado < 8 AND (averiguacao_posterior = 'n' OR (averiguacao_posterior = 'y' AND averiguacao_obs <> ''))) OR (estado > 7 AND estado < 10))";
+ sql ="SELECT * FROM analises_acidentes WHERE " +
+ "estabelecimento_id = " + estabelecimento_id + " AND (" +
+ "(estado > " + Global.ESTADO_SEG + " AND estado < " + Global.ESTADO_FECHAR + " AND (" +
+ "averiguacao_posterior = 'n' OR (averiguacao_posterior = 'y' AND averiguacao_obs <> '')" +
+ ")) OR estado = " + Global.ESTADO_FECHAR +
+ ")" + " AND apagada = 'n' " +
+ "ORDER BY analise_nr";
+ }
+
+ ResultSet rs = st.executeQuery( sql );
+ ArrayList list = fillAnaliseFields( rs );
+ return list;
+ }
+
+ public ArrayList searchAnalisesSeguimentoHS( Integer estabelecimento_id,
+ String nome, String estabelecimento, String visitaDate, String POR )
+ throws Exception
+ {
+ if ( nome == null && estabelecimento == null && visitaDate == null && POR == null )
+ {
+ return getAnalisesSeguimentoHsList( estabelecimento_id );
+ }
+
+ Statement st = createStatement();
+ String sql = getExpression( nome, estabelecimento, visitaDate, POR );
+
+ sql += "AND (" +
+ "estado < " + Global.ESTADO_HS + " OR (estado > " + Global.ESTADO_HS + " AND estado < " + Global.ESTADO_CONSOLIDACAO + ") " +
+ "OR (estado > " + Global.ESTADO_CONSOLIDACAO + " AND estado < " + Global.ESTADO_FECHAR + ")" +
+ ")" + " ORDER BY analise_nr";
+
+ ResultSet rs = st.executeQuery( sql );
+ ArrayList list = fillAnaliseFields( rs );
+ return list;
+ }
+
+ public ArrayList getAnalisesSeguimentoHsList( Integer estabelecimento_id )
+ throws Exception
+ {
+ Statement st = createStatement();
+ String sql = null;
+
+ sql = "SELECT * FROM analises_acidentes WHERE (" +
+ "estado < " + Global.ESTADO_HS + " OR (estado > " + Global.ESTADO_HS + " AND estado < " + Global.ESTADO_CONSOLIDACAO + ") " +
+ "OR (estado > " + Global.ESTADO_CONSOLIDACAO + " AND estado < " + Global.ESTADO_FECHAR + ")" +
+ ")" + " AND apagada = 'n' " +
+ "ORDER BY analise_nr"; // AND estabelecimento_id = " + estabelecimento_id;
+
+ ResultSet rs = st.executeQuery(sql);
+ System.out.println("SEGUIMENTO HS SQL : " + sql);
+ ArrayList list = fillAnaliseFields(rs);
+ return list;
+ }
+
+
+ public ArrayList searchAnalisesSeguimentoRH( Integer estabelecimento_id,
+ String nome, String visitaDate, String POR, String responsavel_loja )
+ throws Exception
+ {
+ if ( nome == null && visitaDate == null && POR == null )
+ {
+ return getAnalisesSeguimentoRhList( estabelecimento_id, responsavel_loja );
+ }
+
+ Statement st = createStatement();
+ String sql = getExpression( nome, null, visitaDate, POR );
+
+ if ( responsavel_loja.matches( "y" ) )
+ {
+ sql += "AND (estado = " + Global.ESTADO_SEG + " OR estado = " + Global.ESTADO_HS +
+ " OR estado = " + Global.ESTADO_CONSOLIDACAO + " OR estado = " + Global.ESTADO_ASSINATURA_SEG +
+ " OR estado = " + Global.ESTADO_FECHAR + ") AND estabelecimento_id = " + estabelecimento_id +
+ " ORDER BY analise_nr";
+ }
+ else
+ {
+ sql += "AND ( estado = " + Global.ESTADO_SEG + " OR estado = " + Global.ESTADO_HS +
+ " OR estado = " + Global.ESTADO_CONSOLIDACAO + " OR estado = " + Global.ESTADO_ASSINATURA_SEG +
+ " OR estado = " + Global.ESTADO_ASSINATURA_RH + " OR estado = " + Global.ESTADO_FECHAR +
+ ") AND estabelecimento_id = " + estabelecimento_id +
+ " ORDER BY analise_nr";
+ }
+ ResultSet rs = st.executeQuery( sql );
+ ArrayList list = fillAnaliseFields( rs );
+ return list;
+ }
+
+ public ArrayList getAnalisesSeguimentoRhList( Integer estabelecimento_id, String responsavel_loja )
+ throws Exception
+ {
+ Statement st = createStatement();
+ String sql = null;
+
+ if ( responsavel_loja.matches( "y" ) )
+ {
+// sql ="SELECT * FROM analises_acidentes WHERE (estado = 1 OR estado = 3 OR estado = 6 OR (estado = 7 AND estado_assinatura < 2) OR estado = 9) AND estabelecimento_id = " + estabelecimento_id;
+// sql ="SELECT * FROM analises_acidentes WHERE (estado = 1 OR estado = 3 OR estado = 6 OR (estado = 7 AND estado_assinatura < 2) OR (estado = 7 and ass_resp_rh = 'y') OR estado = 9) AND estabelecimento_id = " + estabelecimento_id;
+ sql ="SELECT * FROM analises_acidentes WHERE (" +
+ "estado = " + Global.ESTADO_SEG + " OR estado = " + Global.ESTADO_HS + " OR estado = " + Global.ESTADO_CONSOLIDACAO +
+ " OR estado = " + Global.ESTADO_ASSINATURA_SEG + " OR estado = " + Global.ESTADO_FECHAR +
+ ") AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' " +
+ "ORDER BY analise_nr";
+ }
+ else
+ {
+ sql ="SELECT * FROM analises_acidentes WHERE (" +
+ "estado = " + Global.ESTADO_SEG + " OR estado = " + Global.ESTADO_HS + " OR estado = " + Global.ESTADO_CONSOLIDACAO +
+ " OR estado = " + Global.ESTADO_ASSINATURA_SEG + " OR estado = " + Global.ESTADO_ASSINATURA_RH + " OR estado = " + Global.ESTADO_FECHAR +
+ ") AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' " +
+ "ORDER BY analise_nr";
+ }
+
+ ResultSet rs = st.executeQuery(sql);
+ ArrayList list = fillAnaliseFields(rs);
+ return list;
+ }
+
+
+ public ArrayList searchAnalisesSeguimentoMedico( Integer estabelecimento_id,
+ String nome, String visitaDate, String POR )
+ throws Exception
+ {
+ if ( nome == null && visitaDate == null && POR == null )
+ {
+ return getAnalisesSeguimentoMedList( estabelecimento_id );
+ }
+
+ Statement st = createStatement();
+ String sql = getExpression( nome, null, visitaDate, POR );
+
+ sql += "AND estado < 5 OR (estado = 6 AND estado_assinatura <> 2) OR (estado = 6 AND estado_assinatura = 2 AND ass_med = 'y') " +
+ "OR (estado > 6 AND estado < 9) " +
+ "AND estabelecimento_id = " + estabelecimento_id +
+ " ORDER BY analise_nr";
+
+ ResultSet rs = st.executeQuery(sql);
+ ArrayList list = fillAnaliseFields(rs);
+ return list;
+ }
+
+ public ArrayList getAnalisesSeguimentoMedList( Integer estabelecimento_id )
+ throws Exception
+ {
+ Statement st = createStatement();
+ String sql = null;
+
+ sql = "SELECT * FROM analises_acidentes WHERE " +
+ "estado < 5 OR (estado = 6 AND estado_assinatura <> 2) OR (estado = 6 AND estado_assinatura = 2 AND ass_med = 'y') " +
+ "OR (estado > 6 AND estado < 9) " +
+ "AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' " +
+ "ORDER BY analise_nr";
+
+ ResultSet rs = st.executeQuery(sql);
+ ArrayList list = fillAnaliseFields(rs);
+ return list;
+ }
+
+
+ public ArrayList searchAnalisesSeguimentoDirSiprp(
+ String nome, String estabelecimento, String visitaDate, String POR )
+ throws Exception
+ {
+ if ( nome == null && estabelecimento == null && visitaDate == null && POR == null )
+ {
+ return getAnalisesSeguimentoDirSiprpList();
+ }
+
+ Statement st = createStatement();
+ String sql = getExpression( nome, estabelecimento, visitaDate, POR );
+ sql += " AND estado < " + Global.ESTADO_CONCLUIDO + " ORDER BY analise_nr";
+
+ ResultSet rs = st.executeQuery(sql);
+ ArrayList list = fillAnaliseFields(rs);
+ return list;
+ }
+
+ public ArrayList getAnalisesSeguimentoDirSiprpList() throws Exception
+ {
+ Statement st = createStatement();
+ String sql = null;
+
+ sql = "SELECT * FROM analises_acidentes WHERE estado < " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr";
+
+ ResultSet rs = st.executeQuery(sql);
+ ArrayList list = fillAnaliseFields(rs);
+ return list;
+ }
+
+ public ArrayList searchAnalisesSeguimentoDirGerRh(
+ String nome, String estabelecimento, String visitaDate, String POR )
+ throws Exception
+ {
+ return searchAnalisesSeguimentoDirSiprp( nome, estabelecimento, visitaDate, POR );
+ }
+
+ public ArrayList getAnalisesSeguimentoDirGerRhList() throws Exception
+ {
+ return getAnalisesSeguimentoDirSiprpList();
+// Statement st = createStatement();
+// String sql = null;
+//
+// sql ="SELECT * FROM analises_acidentes WHERE estado < " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr";
+//
+// ResultSet rs = st.executeQuery(sql);
+// ArrayList list = fillAnaliseFields(rs);
+// return list;
+ }
+
+ public ArrayList searchAnalisesSeguimentoGestor( Integer estabelecimento_id,
+ String nome, String estabelecimento, String visitaDate, String POR )
+ throws Exception
+ {
+ if ( nome == null && estabelecimento == null && visitaDate == null && POR == null )
+ {
+ return getAnalisesSeguimentoGestorList( estabelecimento_id );
+ }
+
+ Statement st = createStatement();
+ String sql = getExpression( nome, estabelecimento, visitaDate, POR );
+
+ if ( estabelecimento_id == null )
+ {
+ sql += "AND estado < " + Global.ESTADO_CONCLUIDO +
+ " ORDER BY analise_nr";
+ }
+ else
+ {
+ sql += "AND estado < " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id +
+ " ORDER BY analise_nr";
+ }
+
+ ResultSet rs = st.executeQuery(sql);
+ ArrayList list = fillAnaliseFields(rs);
+ return list;
+ }
+
+ public ArrayList getAnalisesSeguimentoGestorList( Integer estabelecimento_id )
+ throws Exception
+ {
+ Statement st = createStatement();
+ String sql = null;
+
+ if ( estabelecimento_id == null )
+ {
+ sql = "SELECT * FROM analises_acidentes WHERE " +
+ "estado < " + Global.ESTADO_CONCLUIDO +
+ " AND apagada = 'n' " +
+ "ORDER BY analise_nr";
+ }
+ else
+ {
+ sql = "SELECT * FROM analises_acidentes WHERE " +
+ "estado < " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id +
+ " AND apagada = 'n' " +
+ "ORDER BY analise_nr";
+ }
+
+
+ ResultSet rs = st.executeQuery(sql);
+ ArrayList list = fillAnaliseFields(rs);
+ return list;
+ }
+
+
+
+
+
+ /*************************************************************************/
+ /****************************** CONCLUIDOS *******************************/
+ /*************************************************************************/
+
+ public ArrayList getAnalisesConcluidasList(Integer estabelecimento_id) throws Exception
+ {
+ Statement st = createStatement();
+ String sql = "";
+ if(estabelecimento_id == null)
+ {
+ sql ="SELECT * FROM analises_acidentes WHERE estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr";
+ }
+ else
+ {
+ sql ="SELECT * FROM analises_acidentes WHERE estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' ORDER BY analise_nr";
+ }
+
+ ResultSet rs = st.executeQuery(sql);
+ ArrayList list = fillAnaliseFields(rs);
+
+ return list;
+ }
+
+ public ArrayList getAnalisesConcluidasHsList() throws Exception
+ {
+ Statement st = createStatement();
+ String sql ="SELECT * FROM analises_acidentes WHERE estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr";
+ ResultSet rs = st.executeQuery(sql);
+ ArrayList list = fillAnaliseFields(rs);
+
+ return list;
+ }
+
+ public ArrayList searchAanalisesConcluidasList( Integer estabelecimento_id,
+ Integer ano, Integer mes, Integer dia, String POR, String nome, String estabelecimento )
+ throws Exception
+ {
+ String sql = null;
+
+ sql = getExpression( nome, estabelecimento, null, POR );
+
+ if ( estabelecimento_id != null && estabelecimento_id.intValue() > 0 )
+ {
+ sql += "AND analises_acidentes.estabelecimento_id = " + estabelecimento_id + " ";
+ }
+
+ if ( ano != null )
+ {
+ final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" );
+ Calendar calendar_from = Calendar.getInstance();
+ Calendar calendar_to = Calendar.getInstance();
+
+ calendar_from.set( Calendar.YEAR, ano.intValue() );
+ calendar_from.set( Calendar.MONTH, 0 );
+ calendar_from.set( Calendar.DATE, 1 );
+
+ calendar_to.set( Calendar.YEAR, ano.intValue() );
+ calendar_to.set( Calendar.MONTH, 11 );
+ calendar_to.set( Calendar.DATE, 31 );
+
+ if ( mes != null )
+ {
+ calendar_from.set( Calendar.MONTH, mes.intValue() - 1 );
+ calendar_to.set( Calendar.MONTH, mes.intValue() - 1 );
+
+ if ( dia != null )
+ {
+ calendar_from.set( Calendar.DATE, dia.intValue() );
+ calendar_to.set( Calendar.DATE, dia.intValue() );
+ }
+ else
+ {
+ calendar_from.set( Calendar.DATE, 1 );
+ calendar_to.set( Calendar.DATE, 31 );
+ }
+ }
+ else
+ {
+ calendar_from.set( Calendar.MONTH, 0 );
+ calendar_to.set( Calendar.MONTH, 11 );
+ }
+
+ Date dateStart = calendar_from.getTime();
+ Date dateEnd = calendar_to.getTime();
+
+ if ( dateStart.compareTo( dateEnd ) == 0 )
+ {
+ sql += "AND analises_acidentes.data_acidente = '" + D_F.format( dateStart ) + "' ";
+ }
+ else
+ {
+ sql += "AND ( analises_acidentes.data_acidente >= '" + D_F.format( dateStart ) + "' AND analises_acidentes.data_acidente <= '" + D_F.format( dateEnd ) + "' ) ";
+ }
+ }
+
+ sql += "AND estado = " + Global.ESTADO_CONCLUIDO + " ORDER BY analises_acidentes.analise_nr ASC";
+
+ System.out.println( "CONCLUIDAS SQL: " + sql );
+
+ Statement st = createStatement();
+ ResultSet rs = st.executeQuery( sql );
+ ArrayList list = fillAnaliseFields( rs );
+ return list;
+ }
+
+
+ //by lino
+// public ArrayList searchAanalisesConcluidasList( Integer estabelecimento_id,
+// Integer ano, Integer mes, Integer dia, String por, String nome, String estabelecimento )
+// throws Exception
+// {
+// Calendar cal = Calendar.getInstance();
+// Statement st = createStatement();
+// String sql = "";
+// if(por != null)
+// {
+// por = por.toUpperCase();
+// }
+// if(nome != null)
+// {
+// nome = nome.toUpperCase();
+// }
+//
+// if( ano != null)
+// {
+// if( mes != null)
+// {
+// if( dia != null)
+// {
+// cal.set( cal.YEAR, ano.intValue() );
+// cal.set( cal.MONTH, mes.intValue() -1 );
+// cal.set( cal.DATE, dia.intValue() );
+// java.sql.Date data_acidente = new java.sql.Date( cal.getTime().getTime() );
+// if(por != null && nome != null)
+// {
+// if(estabelecimento_id == null)
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND data_acidente = '" + data_acidente +
+// "' AND (numero_mecanografico LIKE '%" + por + "%' OR nome LIKE '%" + nome + "%') " +
+// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// else
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND data_acidente = '" + data_acidente +
+// "' AND (numero_mecanografico LIKE '%" + por + "%' OR nome LIKE '%" + nome + "%') " +
+// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id +
+// " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// }
+// else if(por != null)
+// {
+// if(estabelecimento_id == null)
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND data_acidente = '" + data_acidente +
+// "' AND numero_mecanografico LIKE '%" + por + "%' AND estado = " + Global.ESTADO_CONCLUIDO +
+// " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// else
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND data_acidente = '" + data_acidente +
+// "' AND numero_mecanografico LIKE '%" + por + "%' AND estado = " + Global.ESTADO_CONCLUIDO +
+// " AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' ORDER BY analise_nr";
+// }
+//
+// }
+// else if( nome != null)
+// {
+// if(estabelecimento_id == null)
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND data_acidente = '" + data_acidente +
+// "' AND nome LIKE '%" + nome + "%' AND estado = " + Global.ESTADO_CONCLUIDO +
+// " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// else
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND data_acidente = '" + data_acidente +
+// "' AND nome LIKE '%" + nome + "%' AND estado = " + Global.ESTADO_CONCLUIDO +
+// " AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// }
+// else
+// {
+// if(estabelecimento_id == null)
+// {
+// sql = "SELECT * FROM analises_acidentes " +
+// "WHERE data_acidente = '" + data_acidente + "' AND estado = " + Global.ESTADO_CONCLUIDO +
+// " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// else
+// {
+// sql = "SELECT * FROM analises_acidentes " +
+// "WHERE data_acidente = '" + data_acidente + "' AND estado = " + Global.ESTADO_CONCLUIDO +
+// " AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// }
+// }
+// else
+// {
+// cal.set( cal.YEAR, ano.intValue() );
+// cal.set( cal.MONTH, mes.intValue() -1 );
+// cal.set( cal.DATE, 1 );
+// java.sql.Date data_acidente_from = new java.sql.Date( cal.getTime().getTime() );
+// cal.set( cal.DATE, 31 );
+// java.sql.Date data_acidente_to = new java.sql.Date( cal.getTime().getTime() );
+// if(por != null && nome != null)
+// {
+// if(estabelecimento_id == null)
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from +
+// "' AND data_acidente <= '" + data_acidente_to +
+// "' AND (numero_mecanografico LIKE '%" + por + "%' OR nome LIKE '%" + nome + "%') " +
+// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// else
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from +
+// "' AND data_acidente <= '" + data_acidente_to +
+// "' AND (numero_mecanografico LIKE '%" + por + "%' OR nome LIKE '%" + nome + "%') " +
+// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id +
+// " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// }
+// else if(por != null)
+// {
+// if(estabelecimento_id == null)
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from +
+// "' AND data_acidente <= '" + data_acidente_to + "' AND numero_mecanografico LIKE '%" + por + "%' " +
+// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// else
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from +
+// "' AND data_acidente <= '" + data_acidente_to + "' AND numero_mecanografico LIKE '%" + por + "%' " +
+// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id +
+// " AND apagada = 'n' ORDER BY analise_nr";
+// }
+//
+// }
+// else if( nome != null)
+// {
+// if(estabelecimento_id == null)
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from +
+// "' AND data_acidente <= '" + data_acidente_to + "' AND nome LIKE '%" + nome + "%' " +
+// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// else
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados" +
+// " WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from +
+// "' AND data_acidente <= '" + data_acidente_to + "' AND nome LIKE '%" + nome + "%' " +
+// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id +
+// " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// }
+// else
+// {
+// if(estabelecimento_id == null)
+// {
+// sql = "SELECT * FROM analises_acidentes " +
+// "WHERE data_acidente >= '" + data_acidente_from + "' AND data_acidente <= '" + data_acidente_to +
+// "' AND estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// else
+// {
+// sql = "SELECT * FROM analises_acidentes " +
+// "WHERE data_acidente >= '" + data_acidente_from + "' AND data_acidente <= '" + data_acidente_to +
+// "' AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id +
+// " AND apagada = 'n' ORDER BY analise_nr";
+// }
+//
+// }
+// } // dia
+// } // mes
+// else
+// {
+// cal.set( cal.YEAR, ano.intValue() );
+// cal.set( cal.MONTH, 0 );
+// cal.set( cal.DATE, 1 );
+// java.sql.Date data_acidente_from = new java.sql.Date( cal.getTime().getTime() );
+// cal.set( cal.MONTH, 11 );
+// cal.set( cal.DATE, 31 );
+// java.sql.Date data_acidente_to = new java.sql.Date( cal.getTime().getTime() );
+// if(por != null && nome != null)
+// {
+// if(estabelecimento_id == null)
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from +
+// "' AND data_acidente <= '" + data_acidente_to +
+// "' AND (numero_mecanografico LIKE '%" + por + "%' OR nome LIKE '%" + nome + "%') " +
+// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// else
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from +
+// "' AND data_acidente <= '" + data_acidente_to +
+// "' AND (numero_mecanografico LIKE '%" + por + "%' OR nome LIKE '%" + nome + "%') " +
+// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id +
+// " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// }
+// else if(por != null)
+// {
+// if(estabelecimento_id == null)
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from +
+// "' AND data_acidente <= '" + data_acidente_to +
+// "' AND numero_mecanografico LIKE '%" + por + "%' AND estado = " + Global.ESTADO_CONCLUIDO +
+// " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// else
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from +
+// "' AND data_acidente <= '" + data_acidente_to + "' AND numero_mecanografico LIKE '%" + por + "%' " +
+// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id +
+// " AND apagada = 'n' ORDER BY analise_nr";
+// }
+//
+// }
+// else if( nome != null)
+// {
+// if(estabelecimento_id == null)
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from +
+// "' AND data_acidente <= '" + data_acidente_to + "' AND nome LIKE '%" + nome + "%' " +
+// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// else
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from +
+// "' AND data_acidente <= '" + data_acidente_to + "' AND nome LIKE '%" + nome + "%' " +
+// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id +
+// " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// }
+// else
+// {
+// if(estabelecimento_id == null)
+// {
+// sql = "SELECT * FROM analises_acidentes " +
+// "WHERE data_acidente >= '" + data_acidente_from + "' AND data_acidente <= '" + data_acidente_to +
+// "' AND estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// else
+// {
+// sql = "SELECT * FROM analises_acidentes " +
+// "WHERE data_acidente >= '" + data_acidente_from + "' AND data_acidente <= '" + data_acidente_to +
+// "' AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id +
+// " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// }
+// }
+// } // ano
+// else
+// {
+// if(por != null && nome != null)
+// {
+// if(estabelecimento_id == null)
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND (numero_mecanografico LIKE '%" + por + "%' OR nome LIKE '%" + nome + "%') " +
+// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// else
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND (numero_mecanografico LIKE '%" + por + "%' OR nome LIKE '%" + nome + "%') " +
+// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id +
+// " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// }
+// else if(por != null)
+// {
+// if(estabelecimento_id == null)
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND numero_mecanografico LIKE '%" + por + "%' " +
+// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// else
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND numero_mecanografico LIKE '%" + por + "%' " +
+// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id +
+// " AND apagada = 'n' ORDER BY analise_nr";
+// }
+//
+// }
+// else if( nome != null )
+// {
+// if(estabelecimento_id == null)
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND nome LIKE '%" + nome + "%' " +
+// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// else
+// {
+// sql = "SELECT * FROM analises_acidentes, acidentados " +
+// "WHERE acidentado_id = acidentados.id AND nome LIKE '%" + nome + "%' " +
+// "AND estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id +
+// " AND apagada = 'n' ORDER BY analise_nr";
+// }
+//
+// }
+// else
+// {
+// if(estabelecimento_id == null)
+// {
+// sql = "SELECT * FROM analises_acidentes " +
+// "WHERE estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr";
+// }
+// else
+// {
+// sql = "SELECT * FROM analises_acidentes " +
+// "WHERE estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id +
+// " AND apagada = 'n' ORDER BY analise_nr";
+// }
+//
+// }
+// }
+// ResultSet rs = st.executeQuery(sql);
+// ArrayList list = fillAnaliseFields(rs);
+//
+// return list;
+// }
+
+ private ArrayList fillAnaliseFields(ResultSet rs) throws Exception
+ {
+ Dblocal dblocal = new Dblocal();
+ dblocal.connect();
+ Statement stlocal = dblocal.createStatement();
+ Statement stlocal1 = dblocal.createStatement();
+
+ ArrayList list = new ArrayList();
+ if(!rs.isBeforeFirst()) //rs empty
+ {
+ dblocal.close();
+ return list;
+ }
+ rs.first();
+ int nr = 0;
+ do
+ {
+ AnaliseAcidente a = new AnaliseAcidente();
+ a.setId(new Integer(rs.getInt("id")));
+
+ nr++;
+ a.setNr(new Integer(nr));
+ a.setData_acidente(rs.getDate("data_acidente"));
+ a.setEmpresa_id(new Integer(rs.getInt("empresa_id")));
+ a.setEstabelecimento_id(new Integer(rs.getInt("estabelecimento_id")));
+ String sqllocal1 = "SELECT nome FROM estabelecimentos WHERE id = " + a.getEstabelecimento_id();
+ ResultSet rslocal1 = stlocal1.executeQuery(sqllocal1);
+ rslocal1.first();
+ a.setNome_estabelecimento( utils.Utils.unicodeToHTML( rslocal1.getString("nome") ) );
+
+ a.setEstado(new Integer(rs.getInt("estado")));
+ a.setEstado_assinatura(new Integer(rs.getInt("estado_assinatura")));
+ a.setFase(getFase(a.getEstado().intValue()));
+ a.setAcidentado_id(new Integer( rs.getInt("acidentado_id")));
+ Acidentado ac = getAcidentado(a.getAcidentado_id());
+ String sqllocal = "SELECT nome, numero_mecanografico FROM trabalhadores WHERE id = " + ac.getTrabalhador_id();
+ ResultSet rslocal = stlocal.executeQuery(sqllocal);
+ String nome_acidentado = "";
+ String numero_mecanografico = "";
+ if ( rslocal.first() )
+ {
+ nome_acidentado = rslocal.getString("nome");
+ numero_mecanografico = rslocal.getString( "numero_mecanografico" );
+ }
+ a.setNome_acidentado(utils.Utils.unicodeToHTML(nome_acidentado));
+ a.setNumero_mecanografico( numero_mecanografico );
+ Object horas_turno = rs.getObject("horas_turno");
+ if(horas_turno == null)
+ {
+ a.setHoras_turno(null);
+ }
+ else
+ {
+ a.setHoras_turno(new Integer(rs.getInt("horas_turno")));
+ }
+
+ a.setAveriguador(rs.getString("averiguador"));
+ //a.setSeccao(rs.getString("seccao"));
+ a.setDepartamento_id( new Integer(rs.getInt("departamento_id")) );
+ a.setSeccao_id( new Integer(rs.getInt("seccao_id")) );
+ a.setLocal_trabalho(rs.getString("local_trabalho"));
+ a.setTarefa(rs.getString("tarefa"));
+ a.setSubstancias(rs.getString("substancias"));
+// a.setSuperior_hierarquico(rs.getString("superior_hierarquico"));
+ a.setCondicoes(rs.getString("condicoes"));
+ a.setTestemunhas(rs.getString("testemunhas"));
+ a.setCausas( new Integer(rs.getInt("causas")) );
+ a.setDescricao(rs.getString("descricao"));
+ a.setConclusoes(rs.getString("conclusoes"));
+ a.setAccoes(rs.getString("accoes"));
+ a.setAveriguacao_posterior(rs.getString("averiguacao_posterior"));
+ a.setAveriguacao_obs(rs.getString("averiguacao_obs"));
+
+ a.setHora_acidente(rs.getTime("hora_acidente"));
+ a.setFormacao_shst(rs.getString("formacao_shst"));
+ Object o = rs.getString("formacao_shst_nao_porque");
+ if(o == null)
+ {
+ a.setFormacao_shst_nao_porque("");
+ }
+ else
+ {
+ a.setFormacao_shst_nao_porque(rs.getString("formacao_shst_nao_porque"));
+ }
+ a.setOutros_acidentes_com_colaborador(rs.getString("outros_acidentes_com_colaborador"));
+ a.setNr_acidentes_com_colaborador(new Integer(rs.getInt("nr_acidentes_com_colaborador")));
+ a.setNr_relatorio_acidente_colaborador1(new Integer(rs.getInt("nr_relatorio_acidente_colaborador1")));
+ a.setNr_relatorio_acidente_colaborador2(new Integer(rs.getInt("nr_relatorio_acidente_colaborador2")));
+ a.setNr_relatorio_acidente_colaborador3(new Integer(rs.getInt("nr_relatorio_acidente_colaborador3")));
+ a.setNr_relatorio_acidente_colaborador4(new Integer(rs.getInt("nr_relatorio_acidente_colaborador4")));
+ a.setAcidentes_outros_colaboradores(rs.getString("acidentes_outros_colaboradores"));
+ a.setNr_acidentes_outros_colaboradores(new Integer(rs.getInt("nr_acidentes_outros_colaboradores")));
+ a.setNr_relatorio_acidente_outros_colaboradores1(new Integer(rs.getInt("nr_relatorio_acidente_outros_colaboradores1")));
+ a.setNr_relatorio_acidente_outros_colaboradores2(new Integer(rs.getInt("nr_relatorio_acidente_outros_colaboradores2")));
+ a.setNr_relatorio_acidente_outros_colaboradores3(new Integer(rs.getInt("nr_relatorio_acidente_outros_colaboradores3")));
+ a.setNr_relatorio_acidente_outros_colaboradores4(new Integer(rs.getInt("nr_relatorio_acidente_outros_colaboradores4")));
+
+ a.setLesao_cabeca(rs.getString("lesao_cabeca"));
+ a.setLesao_pescoco(rs.getString("lesao_pescoco"));
+ a.setLesao_tronco(rs.getString("lesao_tronco"));
+ a.setLesao_membro_sup_dir(rs.getString("lesao_membro_sup_dir"));
+ a.setLesao_membro_sup_esq(rs.getString("lesao_membro_sup_esq"));
+ a.setLesao_membro_inf_dir(rs.getString("lesao_membro_inf_dir"));
+ a.setLesao_membro_inf_esq(rs.getString("lesao_membro_inf_esq"));
+ Object ob = rs.getString("especif1");
+ if(ob == null)
+ {
+ a.setEspecif1("");
+ }
+ else
+ {
+ a.setEspecif1(rs.getString("especif1"));
+ }
+ ob = rs.getString("especif2");
+ if(ob == null)
+ {
+ a.setEspecif2("");
+ }
+ else
+ {
+ a.setEspecif2(rs.getString("especif2"));
+ }
+ ob = rs.getString("especif3");
+ if(ob == null)
+ {
+ a.setEspecif3("");
+ }
+ else
+ {
+ a.setEspecif3(rs.getString("especif3"));
+ }
+ ob = rs.getString("especif4");
+ if(ob == null)
+ {
+ a.setEspecif4("");
+ }
+ else
+ {
+ a.setEspecif4(rs.getString("especif4"));
+ }
+ ob = rs.getString("tipo_lesao");
+ if(ob == null)
+ {
+ a.setTipo_lesao("");
+ }
+ else
+ {
+ a.setTipo_lesao(rs.getString("tipo_lesao"));
+ }
+ a.setTipo_incapacidade(rs.getString("tipo_incapacidade"));
+ //a.setCoef_incapacidade(new Integer(( rs.getInt("coef_incapacidade") )));
+ a.setCoef_incapacidade((Integer) rs.getObject("coef_incapacidade"));
+ a.setData_aval_incapacidade(rs.getDate("data_aval_incapacidade"));
+ a.setData_rev_incapacidade(rs.getDate("data_rev_incapacidade"));
+ a.setPeriodo_incapacidade_de(rs.getDate("periodo_incapacidade_de"));
+ a.setPeriodo_incapacidade_a(rs.getDate("periodo_incapacidade_a"));
+ a.setImg_flexao(rs.getString("img_flexao"));
+ a.setImg_ext1(rs.getString("img_ext1"));
+ a.setImg_ext2(rs.getString("img_ext2"));
+ a.setImg_cab2(rs.getString("img_cab2"));
+ a.setImg_cab3(rs.getString("img_cab3"));
+ a.setImg_ma2(rs.getString("img_ma2"));
+ a.setImg_ma3(rs.getString("img_ma3"));
+ a.setImg_ma5(rs.getString("img_ma5"));
+ a.setImg_ma6(rs.getString("img_ma6"));
+ a.setImg_ma8(rs.getString("img_ma8"));
+ a.setImg_ma10(rs.getString("img_ma10"));
+ a.setImg_rot1(rs.getString("img_rot1"));
+ a.setImg_rot2(rs.getString("img_rot2"));
+ a.setImg_cab1(rs.getString("img_cab1"));
+ a.setImg_cab4(rs.getString("img_cab4"));
+ a.setImg_ma1(rs.getString("img_ma1"));
+ a.setImg_ma4(rs.getString("img_ma4"));
+ a.setImg_ma7(rs.getString("img_ma7"));
+ a.setImg_ma9(rs.getString("img_ma9"));
+ a.setRestricao_carga(new Integer( rs.getInt("restricao_carga") ));
+ a.setRestricao_motricidade(rs.getString("restricao_motricidade"));
+ a.setRestricao_conducao(rs.getString("restricao_conducao"));
+ a.setRestricao_vibracoes(rs.getString("restricao_vibracoes"));
+ ob = rs.getString("restricao_outras");
+ if(ob == null)
+ {
+ a.setRestricao_outras("");
+ }
+ else
+ {
+ a.setRestricao_outras(rs.getString("restricao_outras"));
+ }
+ ob = rs.getString("med_observ");
+ if(ob == null)
+ {
+ a.setMed_observ("");
+ }
+ else
+ {
+ a.setMed_observ(rs.getString("med_observ"));
+ }
+ a.setAnalise_nr(rs.getString("analise_nr"));
+ a.setMedico_id(new Integer(rs.getInt("medico_id")));
+ a.setTecnico_saude_id(new Integer(rs.getInt("tecnico_saude_id")));
+
+ //a.setAss_hs(rs.getString("ass_hs"));
+ //a.setAss_seg(rs.getString("ass_seg"));
+ a.setAss_resp_seg(rs.getString("ass_resp_seg"));
+ //a.setAss_med(rs.getString("ass_med"));
+ a.setAss_resp_rh(rs.getString("ass_resp_rh"));
+ a.setAss_consolidacao(rs.getString("ass_consolidacao"));
+ a.setData_consolidacao(rs.getDate("data_consolidacao"));
+ a.setData_assinatura_seg(rs.getDate("data_assinatura_seg"));
+ a.setData_assinatura_rh(rs.getDate("data_assinatura_rh"));
+ a.setNome_resp_seg(rs.getString("nome_resp_seg"));
+ a.setNome_resp_rh(rs.getString("nome_resp_rh"));
+ a.setCorrecao(rs.getString("correcao"));
+ a.setObservacoes_correcao(rs.getString("observacoes_correcao"));
+ a.setEstado_antes_correcao( new Integer(rs.getInt("estado_antes_correcao")));
+ a.setAss_superior(rs.getString("ass_superior"));
+ a.setNome_superior(rs.getString("nome_superior"));
+ a.setData_assinatura_superior(rs.getDate("data_assinatura_superior"));
+ a.setData_inicio_processo(rs.getDate("data_inicio_processo"));
+ a.setNome_resp_consolidacao(rs.getString("nome_resp_consolidacao"));
+ //System.out.println("ANALISE NR : " + a.getAnalise_nr());
+ a.setRh_fase4(new Integer( rs.getInt("rh_fase4") ));
+ list.add(a);
+ }while(rs.next());
+ dblocal.close();
+
+
+ return list;
+ }
+
+ public ArrayList searchTrabalhador(Integer empresa_id, Integer estabelecimento_id, String nrMecanografico, String nome) throws Exception
+ {
+ ArrayList list = new ArrayList();
+ Dblocal dblocal = new Dblocal();
+ dblocal.connect();
+ Statement stlocal = dblocal.createStatement();
+ String sql = "";
+
+
+ // trabalhadores do estabelecimento
+ if(nrMecanografico != null)
+ {
+ if(nome != null)
+ {
+ sql = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.id, estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND estabelecimento_id = " + estabelecimento_id + " AND (trabalhadores.nome LIKE '%" + nome + "%' OR LOWER(numero_mecanografico) LIKE '%" + nrMecanografico.toLowerCase() + "%') AND estabelecimentos.empresa_id = " + empresa_id + " AND trabalhadores.inactivo = 'n'";
+ }
+ else
+ {
+ sql = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.id, estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND estabelecimento_id = " + estabelecimento_id + " AND LOWER(numero_mecanografico) LIKE '%" + nrMecanografico.toLowerCase() + "%' AND estabelecimentos.empresa_id = " + empresa_id + " AND trabalhadores.inactivo = 'n'";
+ }
+ }
+ else
+ {
+ if(nome != null)
+ {
+ sql = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.id, estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND estabelecimento_id = " + estabelecimento_id + " AND trabalhadores.nome LIKE '%" + nome + "%' AND estabelecimentos.empresa_id = " + empresa_id + " AND trabalhadores.inactivo = 'n'";
+ }
+ }
+
+ System.out.println("TRABALHADORES SQL B : " + sql);
+ ResultSet rslocal = stlocal.executeQuery(sql);
+ if(rslocal.isBeforeFirst())
+ {
+ rslocal.first();
+ do
+ {
+ Trabalhador t = new Trabalhador();
+ t.setId(new Integer(rslocal.getInt(1))); //id
+ String nome_trab = rslocal.getString(2);
+ t.setNome(utils.Utils.unicodeToHTML(nome_trab));
+ t.setData_nascimento(rslocal.getDate("data_nascimento"));
+ t.setFuncao(rslocal.getString("funcao_proposta"));
+ t.setData_admissao(rslocal.getDate("data_admissao"));
+ t.setNumero_mecanografico(rslocal.getString("numero_mecanografico"));
+ t.setEstabelecimento_id(new Integer( rslocal.getInt(7) ));
+ //if(nome != null)
+ //{
+ t.setEstabelecimento(utils.Utils.unicodeToHTML(rslocal.getString(8)));
+ //}
+
+ list.add(t);
+ }while(rslocal.next());
+ }
+
+
+ //restantes trabalhadores
+ if(nrMecanografico != null)
+ {
+ if(nome != null)
+ {
+ sql = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.id, estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND estabelecimento_id <> " + estabelecimento_id + " AND (trabalhadores.nome LIKE '%" + nome + "%' OR LOWER(numero_mecanografico) LIKE '%" + nrMecanografico.toLowerCase() + "%') AND estabelecimentos.empresa_id = " + empresa_id + " AND trabalhadores.inactivo = 'n'";
+ }
+ else
+ {
+ sql = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.id, estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND estabelecimento_id <> " + estabelecimento_id + " AND LOWER(numero_mecanografico) LIKE '%" + nrMecanografico.toLowerCase() + "%' AND estabelecimentos.empresa_id = " + empresa_id + " AND trabalhadores.inactivo = 'n'";
+ }
+ }
+ else
+ {
+ if(nome != null)
+ {
+ sql = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.id, estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND estabelecimento_id <> " + estabelecimento_id + " AND trabalhadores.nome LIKE '%" + nome + "%' AND estabelecimentos.empresa_id = " + empresa_id + " AND trabalhadores.inactivo = 'n'";
+ }
+ }
+
+
+// if(nrMecanografico != null)
+// {
+// sql = "SELECT * FROM trabalhadores WHERE LOWER(numero_mecanografico) = '" + nrMecanografico.toLowerCase() + "'";
+// }
+// else if(nome != null)
+// {
+// sql = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND trabalhadores.nome LIKE '%" + nome + "%'";
+// }
+ System.out.println("TRABALHADORES SQL : " + sql);
+ rslocal = stlocal.executeQuery(sql);
+ if(rslocal.isBeforeFirst())
+ {
+ rslocal.first();
+ do
+ {
+ Trabalhador t = new Trabalhador();
+ t.setId(new Integer(rslocal.getInt(1))); //id
+ String nome_trab = rslocal.getString(2);
+ t.setNome(utils.Utils.unicodeToHTML(nome_trab));
+ t.setData_nascimento(rslocal.getDate("data_nascimento"));
+ t.setFuncao(rslocal.getString("funcao_proposta"));
+ t.setData_admissao(rslocal.getDate("data_admissao"));
+ t.setNumero_mecanografico(rslocal.getString("numero_mecanografico"));
+ t.setEstabelecimento_id(new Integer( rslocal.getInt(7) ));
+ //if(nome != null)
+ //{
+ t.setEstabelecimento(utils.Utils.unicodeToHTML(rslocal.getString(8)));
+ //}
+
+ list.add(t);
+ }while(rslocal.next());
+ }
+ dblocal.close();
+ return list;
+ }
+
+ public ArrayList searchTrabalhador(Integer empresa_id, String nrMecanografico, String nome) throws Exception
+ {
+ ArrayList list = new ArrayList();
+ Dblocal dblocal = new Dblocal();
+ dblocal.connect();
+ Statement stlocal = dblocal.createStatement();
+ String sql = "";
+
+ StringTokenizer st = null;
+
+ if(nrMecanografico != null)
+ {
+ if(nome != null)
+ {
+ String sql1 = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.id, estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND (";
+ String sql2 = "";
+ String sql3 = ") AND LOWER(numero_mecanografico) LIKE '%" + nrMecanografico.toLowerCase() + "%' AND estabelecimentos.empresa_id = " + empresa_id + " AND trabalhadores.inactivo = 'n'";
+ st = new StringTokenizer (nome);
+ int n = 0;
+ while (st.hasMoreTokens ()) {
+ if(n > 0)
+ {
+ sql2 += "AND ";
+ }
+ sql2 += "trabalhadores.nome LIKE '%" + st.nextToken () + "%' ";
+ n++;
+ }
+ sql = sql1 + sql2 + sql3;
+ //sql = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.id, estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND (trabalhadores.nome LIKE '%" + nome + "%' AND LOWER(numero_mecanografico) LIKE '%" + nrMecanografico.toLowerCase() + "%') AND estabelecimentos.empresa_id = " + empresa_id;
+ }
+ else
+ {
+ sql = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.id, estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND LOWER(numero_mecanografico) LIKE '%" + nrMecanografico.toLowerCase() + "%' AND estabelecimentos.empresa_id = " + empresa_id + " AND trabalhadores.inactivo = 'n'";
+ }
+ }
+ else
+ {
+ if(nome != null)
+ {
+ //sql = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.id, estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND trabalhadores.nome LIKE '%" + nome + "%' AND estabelecimentos.empresa_id = " + empresa_id;
+ String sql1 = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.id, estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND (";
+ String sql2 = "";
+ String sql3 = ") AND estabelecimentos.empresa_id = " + empresa_id + " AND trabalhadores.inactivo = 'n'";
+ st = new StringTokenizer (nome);
+ int n = 0;
+ while (st.hasMoreTokens ()) {
+ if(n > 0)
+ {
+ sql2 += "AND ";
+ }
+ sql2 += "trabalhadores.nome LIKE '%" + st.nextToken () + "%' ";
+ n++;
+ }
+ sql = sql1 + sql2 + sql3;
+
+ }
+ }
+
+ System.out.println("TRABALHADORES SQL A : " + sql);
+// if(nrMecanografico != null)
+// {
+// sql = "SELECT * FROM trabalhadores WHERE LOWER(numero_mecanografico) = '" + nrMecanografico.toLowerCase() + "'";
+// }
+// else if(nome != null)
+// {
+// sql = "SELECT trabalhadores.id, trabalhadores.nome, data_nascimento, funcao_proposta, data_admissao, numero_mecanografico , estabelecimentos.nome FROM trabalhadores, estabelecimentos WHERE estabelecimento_id = estabelecimentos.id AND trabalhadores.nome LIKE '%" + nome + "%'";
+// }
+ ResultSet rslocal = stlocal.executeQuery(sql);
+ rslocal.first();
+ do
+ {
+ Trabalhador t = new Trabalhador();
+ t.setId(new Integer(rslocal.getInt(1))); //id
+ String nome_trab = rslocal.getString(2);
+ t.setNome(utils.Utils.unicodeToHTML(nome_trab));
+ t.setData_nascimento(rslocal.getDate("data_nascimento"));
+ t.setFuncao(rslocal.getString("funcao_proposta"));
+ t.setData_admissao(rslocal.getDate("data_admissao"));
+ t.setNumero_mecanografico(rslocal.getString("numero_mecanografico"));
+ t.setEstabelecimento_id(new Integer( rslocal.getInt(7) ));
+ //if(nome != null)
+ //{
+ t.setEstabelecimento(utils.Utils.unicodeToHTML(rslocal.getString(8)));
+ //}
+
+ list.add(t);
+ }while(rslocal.next());
+ dblocal.close();
+ return list;
+ }
+
+ public ArrayList getTrabalhadoresListByEstabelecimento(Integer estabelecimento_id) throws Exception
+ {
+ Utils utils = new Utils();
+ ArrayList list = new ArrayList();
+ Dblocal dblocal = new Dblocal();
+ dblocal.connect();
+ Statement stlocal = dblocal.createStatement();
+ String sql ="SELECT * FROM trabalhadores WHERE estabelecimento_id = " + estabelecimento_id;
+ ResultSet rslocal = stlocal.executeQuery(sql);
+ rslocal.first();
+ int nr = 0;
+ do
+ {
+ Trabalhador t = new Trabalhador();
+ t.setId(new Integer(rslocal.getInt("id")));
+ String nome = rslocal.getString("nome");
+ t.setNome(utils.unicodeToHTML(nome));
+ t.setData_nascimento(rslocal.getDate("data_nascimento"));
+ t.setFuncao(rslocal.getString("funcao_proposta"));
+ t.setData_admissao(rslocal.getDate("data_admissao"));
+ list.add(t);
+ }while(rslocal.next());
+ dblocal.close();
+
+ return list;
+ }
+
+ public Trabalhador getTrabalhador(Integer id) throws Exception
+ {
+ Dblocal dblocal = new Dblocal();
+ dblocal.connect();
+ Statement stlocal = dblocal.createStatement();
+ String sql ="SELECT * FROM trabalhadores WHERE id = " + id;
+ ResultSet rslocal = stlocal.executeQuery(sql);
+ rslocal.first();
+ Trabalhador t = new Trabalhador();
+ t.setId(new Integer(rslocal.getInt("id")));
+ t.setNome(rslocal.getString("nome"));
+ t.setData_nascimento(rslocal.getDate("data_nascimento"));
+ t.setFuncao(rslocal.getString("funcao_proposta"));
+ t.setData_admissao(rslocal.getDate("data_admissao"));
+ dblocal.close();
+ return t;
+ }
+
+ public Acidentado getAcidentado(Integer acidentado_id) throws Exception
+ {
+ Strings strings = new Strings();
+ Acidentado a = new Acidentado();
+ Statement st = createStatement();
+ String sql ="SELECT * FROM acidentados WHERE id = " + acidentado_id;
+ ResultSet rs = st.executeQuery(sql);
+ rs.first();
+ a.setId(new Integer(rs.getInt("id")));
+ a.setNome(rs.getString("nome"));
+ a.setData_nascimento(rs.getDate("data_nascimento"));
+ a.setBilhete_identidade(rs.getString("bilhete_identidade"));
+ a.setMorada(rs.getString("morada"));
+ a.setCod_postal(rs.getString("cod_postal"));
+ a.setLocalidade(rs.getString("localidade"));
+ a.setContacto_telefonico(rs.getString("contacto_telefonico"));
+ a.setData_admissao(rs.getDate("data_admissao"));
+ a.setTurno(rs.getString("turno"));
+ String funcao = rs.getString("funcao");
+ a.setFuncao(utils.Utils.unicodeToHTML(funcao));
+ a.setTrabalhador_id(new Integer(rs.getInt("trabalhador_id")));
+ a.setNumero_mecanografico(rs.getString("numero_mecanografico"));
+ a.setNome_superior_hierarquico(rs.getString("nome_superior_hierarquico"));
+ a.setEmail_superior_hierarquico(rs.getString("email_superior_hierarquico"));
+ a.setEstabelecimento_origem(rs.getString("estabelecimento_origem"));
+ a.setData_email_superior_hierarquico(rs.getDate("data_email_superior_hierarquico"));
+ //a.setAnalise_acidente_id(new Integer("analise_acidente_id"));
+ return a;
+ }
+
+ public String getEmpresaNome(Integer empresa_id) throws Exception
+ {
+ Dblocal dblocal = new Dblocal();
+ dblocal.connect();
+ Statement stlocal = dblocal.createStatement();
+ String sql ="SELECT designacao_social FROM empresas WHERE id = " + empresa_id;
+ ResultSet rslocal = stlocal.executeQuery(sql);
+ rslocal.first();
+ String nome = rslocal.getString("designacao_social");
+ dblocal.close();
+ return nome;
+ }
+
+
+
+ public String getEstabelecimentoNome(Integer estabelecimento_id) throws Exception
+ {
+ Dblocal dblocal = new Dblocal();
+ dblocal.connect();
+ Statement stlocal = dblocal.createStatement();
+ String sql ="SELECT nome FROM estabelecimentos WHERE id = " + estabelecimento_id;
+ ResultSet rslocal = stlocal.executeQuery(sql);
+ rslocal.first();
+ String nome = rslocal.getString("nome");
+ dblocal.close();
+ return Utils.unicodeToHTML(nome);
+ }
+
+ public String getMedicoNome(Integer medico_id) throws Exception
+ {
+ Dblocal dblocal = new Dblocal();
+ dblocal.connect();
+ Statement stlocal = dblocal.createStatement();
+ String sql ="SELECT nome FROM medicos WHERE id = " + medico_id;
+ ResultSet rslocal = stlocal.executeQuery(sql);
+ rslocal.first();
+ String nome = rslocal.getString("nome");
+ dblocal.close();
+ return Utils.unicodeToHTML(nome);
+ }
+
+ public Medico getMedico(Integer id) throws Exception
+ {
+ Dblocal dblocal = new Dblocal();
+ dblocal.connect();
+ Statement stlocal = dblocal.createStatement();
+ String sql ="SELECT * FROM medicos WHERE id = " + id;
+ ResultSet rslocal = stlocal.executeQuery(sql);
+ rslocal.first();
+ Medico m = new Medico();
+ m.setId(new Integer( rslocal.getInt("id") ));
+ m.setNome(rslocal.getString("nome"));
+ m.setNumero_cedula(rslocal.getString("numero_cedula"));
+ dblocal.close();
+ return m;
+ }
+
+ public String getTecnicoSaudeNome(Integer tecnico_id) throws Exception
+ {
+ Dblocal dblocal = new Dblocal();
+ dblocal.connect();
+ Statement stlocal = dblocal.createStatement();
+ String sql ="SELECT nome FROM marcacoes_tecnicos_hst WHERE id = " + tecnico_id;
+ ResultSet rslocal = stlocal.executeQuery(sql);
+ rslocal.first();
+ String nome = rslocal.getString("nome");
+ dblocal.close();
+ return nome;
+ }
+
+
+ public Integer getMaxAcidentadoId()
+ {
+ Statement st = createStatement();
+ String sql = "SELECT max(acidentados.id)+1 AS MAXACIDENTADOID FROM acidentados";
+ try
+ {
+ ResultSet rs = st.executeQuery(sql);
+ rs.first();
+ Integer newId = new Integer(rs.getInt("MAXACIDENTADOID"));
+ if(newId.intValue() == 0)
+ {
+ newId = new Integer(1);
+ }
+ return newId;
+ }
+ catch(Exception ex)
+ {
+ return new Integer(1);
+ }
+ }
+
+ public Integer createAcidentado(Acidentado a) throws Exception
+ {
+ Statement st = createStatement();
+ Integer newId = getMaxAcidentadoId();
+ String sql = "INSERT INTO acidentados (id, nome, data_nascimento, bilhete_identidade, morada, cod_postal, localidade, contacto_telefonico, data_admissao, turno, funcao, trabalhador_id, numero_mecanografico, nome_superior_hierarquico, email_superior_hierarquico, estabelecimento_origem, data_email_superior_hierarquico) VALUES (";
+ sql += newId + ", '";
+ sql += a.getNome() + "', ";
+ if(a.getData_nascimento() == null)
+ {
+ sql += null + ", '";
+ }
+ else
+ {
+ sql += "'" + a.getData_nascimento() + "', '";
+ }
+ //sql += a.getData_nascimento() + "', '";
+ sql += a.getBilhete_identidade() + "', '";
+ sql += a.getMorada() + "', '";
+ sql += a.getCod_postal() + "', '";
+ sql += a.getLocalidade() + "', '";
+ sql += a.getContacto_telefonico() + "', ";
+ if(a.getData_admissao() == null)
+ {
+ sql += null + ", '";
+ }
+ else
+ {
+ sql += "'" + a.getData_admissao() + "', '";
+ }
+// sql += a.getData_admissao() + "', '";
+ sql += a.getTurno() + "', '";
+ sql += a.getFuncao() + "', ";
+ sql += a.getTrabalhador_id() + ", '";
+ sql += a.getNumero_mecanografico() + "', '";
+ sql += a.getNome_superior_hierarquico() + "', '";
+ sql += a.getEmail_superior_hierarquico() + "', '";
+ sql += a.getEstabelecimento_origem() + "', ";
+ if(a.getData_email_superior_hierarquico() == null)
+ {
+ sql += null + ")";
+ }
+ else
+ {
+ sql += "'" + a.getData_email_superior_hierarquico() + "')";
+ }
+ //sql += a.getAnalise_acidente_id() + ")";
+ System.out.println("SQL ACIDENTADO : " + sql);
+ st.execute(sql);
+
+ return newId;
+ }
+
+ public void updateAcidentado(Acidentado a) throws Exception
+ {
+ Statement st = createStatement();
+ String sql = "UPDATE acidentados SET nome = '" + a.getNome() + "', ";
+ if(a.getData_nascimento() == null)
+ {
+ sql += "data_nascimento = " + null + ", ";
+ }
+ else
+ {
+ sql += "data_nascimento = '" + a.getData_nascimento() + "', ";
+ }
+// sql += "data_nascimento = '" + a.getData_nascimento() + "', ";
+ sql += "bilhete_identidade = '" + a.getBilhete_identidade() + "', ";
+ sql += "morada = '" + a.getMorada() + "', ";
+ sql += "cod_postal = '" + a.getCod_postal() + "', ";
+ sql += "localidade = '" + a.getLocalidade() + "', ";
+ sql += "contacto_telefonico = '" + a.getContacto_telefonico() + "', ";
+ if(a.getData_admissao() == null)
+ {
+ sql += "data_admissao = " + null + ", ";
+ }
+ else
+ {
+ sql += "data_admissao = '" + a.getData_admissao() + "', ";
+ }
+// sql += "data_admissao = '" + a.getData_admissao() + "', ";
+ sql += "turno = '" + a.getTurno() + "', ";
+ sql += "funcao = '" + a.getFuncao() + "', ";
+ sql += "trabalhador_id = " + a.getTrabalhador_id() + ", ";
+ sql += "numero_mecanografico = '" + a.getNumero_mecanografico() + "', ";
+ sql += "nome_superior_hierarquico = '" + a.getNome_superior_hierarquico() + "', ";
+ sql += "email_superior_hierarquico = '" + a.getEmail_superior_hierarquico() + "', ";
+ sql += "estabelecimento_origem = '" + a.getEstabelecimento_origem() + "', ";
+ if(a.getData_email_superior_hierarquico() == null)
+ {
+ sql += "data_email_superior_hierarquico = " + null + " ";
+ }
+ else
+ {
+ sql += "data_email_superior_hierarquico = '" + a.getData_email_superior_hierarquico() + "' ";
+ }
+ //sql += "analise_acidente_id = '" + a.getAnalise_acidente_id() + " ";
+ sql += "WHERE id = " + a.getId();
+ System.out.println("SQL UPDATE ACIDENTADO : " + sql);
+ st.execute(sql);
+ }
+
+ public Integer getMaxControleId()
+ {
+ Statement st = createStatement();
+ String sql = "SELECT max(controle.id)+1 AS MAXCONTROLEID FROM controle";
+ try
+ {
+ ResultSet rs = st.executeQuery(sql);
+ rs.first();
+ Integer newId = new Integer(rs.getInt("MAXCONTROLEID"));
+ if(newId.intValue() == 0 )
+ {
+ newId = new Integer(1);
+ }
+ return newId;
+ }
+ catch(Exception ex)
+ {
+ return new Integer(1);
+ }
+ }
+
+ public Integer getMaxAnaliseId()
+ {
+ Statement st = createStatement();
+ String sql = "SELECT max(analises_acidentes.id)+1 AS MAXANALISEID FROM analises_acidentes";
+ try
+ {
+ ResultSet rs = st.executeQuery(sql);
+ rs.first();
+ Integer newId = new Integer(rs.getInt("MAXANALISEID"));
+ if(newId.intValue() == 0 )
+ {
+ newId = new Integer(1);
+ }
+ return newId;
+ }
+ catch(Exception ex)
+ {
+ return new Integer(1);
+ }
+ }
+
+
+ public AnaliseAcidente createAnalise(AnaliseAcidente a) throws Exception
+ {
+ //Controle c = getControle();
+ Statement st = createStatement();
+ Integer newId = getMaxAnaliseId();
+
+ //calc analise_nr
+ java.util.Date data_acidente = new java.util.Date(a.getData_acidente().getTime());
+ //java.util.Date now = new java.util.Date();
+ Calendar cal = new GregorianCalendar();
+ //cal.setTime(now);
+ cal.setTime(data_acidente);
+ int ano = cal.get(Calendar.YEAR);
+ Controle c = getControloByAno(new Integer(ano));
+ if(c == null)
+ {
+ c = createAnoNumeracao(new Integer(ano));
+ }
+// if(c.getAnalise_year().intValue() != ano)
+// {
+// c.setAnalise_year(new Integer(ano));
+// c.setLast_analise_nr(new Integer(0));
+// }
+ //String seq_str = new Integer(10000 + newId.intValue()).toString();
+ int i_analise_nr = c.getLast_analise_nr().intValue() + 1;
+ c.setLast_analise_nr(new Integer(i_analise_nr));
+ //updateControle(c);
+ String seq_str = new Integer(10000 + i_analise_nr).toString();
+ String ano_str = new Integer(ano).toString();
+ String analise_nr = ano_str.substring(2) + "/" + seq_str.substring(1);
+ a.setAnalise_nr(analise_nr);
+ a.setId(newId);
+
+ String sql = "INSERT INTO analises_acidentes (id, averiguador, data_acidente, acidentado_id, estado, empresa_id, estabelecimento_id, horas_turno, departamento_id, seccao_id, local_trabalho, tarefa, substancias, condicoes, testemunhas, causas, descricao, conclusoes, accoes, hora_acidente, medico_id, tecnico_saude_id, averiguacao_posterior, averiguacao_obs, data_inicio_processo, analise_nr, coef_incapacidade) VALUES (";
+ sql += newId + ", '";
+ sql += a.getAveriguador() + "', '";
+ sql += a.getData_acidente() + "', ";
+ sql += a.getAcidentado_id() + ", ";
+ sql += a.getEstado() + ", ";
+ sql += a.getEmpresa_id() + ", ";
+ sql += a.getEstabelecimento_id() + ", ";
+ sql += a.getHoras_turno() + ", ";
+ sql += a.getDepartamento_id() + ", ";
+ sql += a.getSeccao_id() + ", '";
+ sql += a.getLocal_trabalho() + "', '";
+ sql += a.getTarefa() + "', '";
+ sql += a.getSubstancias() + "', '";
+// sql += a.getSuperior_hierarquico() + "', '";
+ sql += a.getCondicoes() + "', '";
+ sql += a.getTestemunhas() + "', ";
+ sql += a.getCausas() + ", '";
+ sql += a.getDescricao() + "', '";
+ sql += a.getConclusoes() + "', '";
+ sql += a.getAccoes() + "', ";
+ if(a.getHora_acidente() == null)
+ {
+ sql += null + ", ";
+ }
+ else
+ {
+ sql += "'" + a.getHora_acidente() + "', ";
+ }
+
+ sql += a.getMedico_id() + ", ";
+ sql += a.getTecnico_saude_id() + ", '";
+ sql += a.getAveriguacao_posterior() + "', '";
+ sql += a.getAveriguacao_obs() + "', ";
+ if(a.getData_inicio_processo() == null)
+ {
+ sql += null + ", ";
+ }
+ else
+ {
+ sql += "'" + a.getData_inicio_processo() + "', '";
+ }
+
+ sql += analise_nr + "', ";
+ sql += null + ")";
+// sql += a.getFormacao_shst() + "', '";
+// sql += a.getFormacao_shst_nao_porque() + "', '";
+// sql += a.getOutros_acidentes_com_colaborador() + "', ";
+// sql += a.getNr_acidentes_com_colaborador() + ", ";
+// sql += a.getNr_relatorio_acidente_colaborador1() + ", ";
+// sql += a.getNr_relatorio_acidente_colaborador2() + ", ";
+// sql += a.getNr_relatorio_acidente_colaborador3() + ", ";
+// sql += a.getNr_relatorio_acidente_colaborador4() + ", '";
+// sql += a.getAcidentes_outros_colaboradores()+ "', ";
+// sql += a.getNr_acidentes_outros_colaboradores()+ ", ";
+// sql += a.getNr_relatorio_acidente_outros_colaboradores1() + ", ";
+// sql += a.getNr_relatorio_acidente_outros_colaboradores2() + ", ";
+// sql += a.getNr_relatorio_acidente_outros_colaboradores3() + ", ";
+// sql += a.getNr_relatorio_acidente_outros_colaboradores4() + ")";
+ System.out.println("SQL : " + sql);
+ st.execute(sql);
+ updateControle(c);
+ return a;
+ }
+
+ public void updateAnalise(AnaliseAcidente a) throws Exception
+ {
+ if(a.getEspecif1().matches("null"))
+ {
+ a.setEspecif1("");
+ }
+ if(a.getEspecif2().matches("null"))
+ {
+ a.setEspecif2("");
+ }
+ if(a.getEspecif3().matches("null"))
+ {
+ a.setEspecif3("");
+ }
+ if(a.getEspecif4().matches("null"))
+ {
+ a.setEspecif4("");
+ }
+ if(a.getRestricao_outras().matches("null"))
+ {
+ a.setRestricao_outras("");
+ }
+ if(a.getTipo_lesao().matches("null"))
+ {
+ a.setTipo_lesao("");
+ }
+ if(a.getMed_observ().matches("null"))
+ {
+ a.setMed_observ("");
+ }
+ if(a.getFormacao_shst_nao_porque().matches("null"))
+ {
+ a.setFormacao_shst_nao_porque("");
+ }
+ Statement st = createStatement();
+ String sql = "UPDATE analises_acidentes SET data_acidente = '" + a.getData_acidente() + "', ";
+ sql += "acidentado_id = " + a.getAcidentado_id() + ", ";
+ sql += "estado = " + a.getEstado() + ", ";
+ sql += "empresa_id = " + a.getEmpresa_id() + ", ";
+ sql += "estabelecimento_id = " + a.getEstabelecimento_id() + ", ";
+ sql += "horas_turno = " + a.getHoras_turno() + ", ";
+ sql += "departamento_id = " + a.getDepartamento_id() + ", ";
+ sql += "seccao_id = " + a.getSeccao_id() + ", ";
+ sql += "local_trabalho = '" + a.getLocal_trabalho() + "', ";
+ sql += "tarefa = '" + a.getTarefa() + "', ";
+ sql += "substancias = '" + a.getSubstancias() + "', ";
+// sql += "superior_hierarquico = '" + a.getSuperior_hierarquico() + "', ";
+ sql += "condicoes = '" + a.getCondicoes() + "', ";
+ sql += "testemunhas = '" + a.getTestemunhas() + "', ";
+ sql += "causas = " + a.getCausas() + ", ";
+ sql += "descricao = '" + a.getDescricao() + "', ";
+ sql += "conclusoes = '" + a.getConclusoes() + "', ";
+ sql += "accoes = '" + a.getAccoes() + "', ";
+ sql += "averiguador = '" + a.getAveriguador() + "', ";
+ if(a.getHora_acidente() == null)
+ {
+ sql += "hora_acidente = " + null + ", ";
+ }
+ else
+ {
+ sql += "hora_acidente = '" + a.getHora_acidente() + "', ";
+ }
+
+ sql += "formacao_shst = '" + a.getFormacao_shst() + "', ";
+ sql += "formacao_shst_nao_porque = '" + a.getFormacao_shst_nao_porque() + "', ";
+ sql += "outros_acidentes_com_colaborador = '" + a.getOutros_acidentes_com_colaborador() + "', ";
+ sql += "nr_acidentes_com_colaborador = " + a.getNr_acidentes_com_colaborador() + ", ";
+ sql += "nr_relatorio_acidente_colaborador1 = " + a.getNr_relatorio_acidente_colaborador1() + ", ";
+ sql += "nr_relatorio_acidente_colaborador2 = " + a.getNr_relatorio_acidente_colaborador2() + ", ";
+ sql += "nr_relatorio_acidente_colaborador3 = " + a.getNr_relatorio_acidente_colaborador3() + ", ";
+ sql += "nr_relatorio_acidente_colaborador4 = " + a.getNr_relatorio_acidente_colaborador4() + ", ";
+ sql += "acidentes_outros_colaboradores = '" + a.getAcidentes_outros_colaboradores() + "', ";
+ sql += "nr_acidentes_outros_colaboradores = " + a.getNr_acidentes_outros_colaboradores() + ", ";
+ sql += "nr_relatorio_acidente_outros_colaboradores1 = " + a.getNr_relatorio_acidente_outros_colaboradores1() + ", ";
+ sql += "nr_relatorio_acidente_outros_colaboradores2 = " + a.getNr_relatorio_acidente_outros_colaboradores2() + ", ";
+ sql += "nr_relatorio_acidente_outros_colaboradores3 = " + a.getNr_relatorio_acidente_outros_colaboradores3() + ", ";
+ sql += "nr_relatorio_acidente_outros_colaboradores4 = " + a.getNr_relatorio_acidente_outros_colaboradores4() + ", ";
+ sql += "lesao_cabeca = '" + a.getLesao_cabeca() + "', ";
+ sql += "lesao_pescoco = '" + a.getLesao_pescoco() + "', ";
+ sql += "lesao_tronco = '" + a.getLesao_tronco() + "', ";
+ sql += "lesao_membro_sup_dir = '" + a.getLesao_membro_sup_dir() + "', ";
+ sql += "lesao_membro_sup_esq = '" + a.getLesao_membro_sup_esq() + "', ";
+ sql += "lesao_membro_inf_dir = '" + a.getLesao_membro_inf_dir() + "', ";
+ sql += "lesao_membro_inf_esq = '" + a.getLesao_membro_inf_esq() + "', ";
+ sql += "especif1 = '" + a.getEspecif1() + "', ";
+ sql += "especif2 = '" + a.getEspecif2() + "', ";
+ sql += "especif3 = '" + a.getEspecif3() + "', ";
+ sql += "especif4 = '" + a.getEspecif4() + "', ";
+ sql += "tipo_lesao = '" + a.getTipo_lesao() + "', ";
+ sql += "tipo_incapacidade = '" + a.getTipo_incapacidade() + "', ";
+ sql += "coef_incapacidade = " + a.getCoef_incapacidade() + ", ";
+ if(a.getData_aval_incapacidade() == null)
+ {
+ sql += "data_aval_incapacidade = " + null + ", ";
+ }
+ else
+ {
+ sql += "data_aval_incapacidade = '" + a.getData_aval_incapacidade() + "', ";
+ }
+ if(a.getData_rev_incapacidade() == null)
+ {
+ sql += "data_rev_incapacidade = " + null + ", ";
+ }
+ else
+ {
+ sql += "data_rev_incapacidade = '" + a.getData_rev_incapacidade() + "', ";
+ }
+ if(a.getPeriodo_incapacidade_de() == null)
+ {
+ sql += "periodo_incapacidade_de = " + null + ", ";
+ }
+ else
+ {
+ sql += "periodo_incapacidade_de = '" + a.getPeriodo_incapacidade_de() + "', ";
+ }
+ if(a.getPeriodo_incapacidade_a() == null)
+ {
+ sql += "periodo_incapacidade_a = " + null + ", ";
+ }
+ else
+ {
+ sql += "periodo_incapacidade_a = '" + a.getPeriodo_incapacidade_a() + "', ";
+ }
+ sql += "img_flexao = '" + a.getImg_flexao() + "', ";
+ sql += "img_ext1 = '" + a.getImg_ext1() + "', ";
+ sql += "img_ext2 = '" + a.getImg_ext2() + "', ";
+ sql += "img_cab2 = '" + a.getImg_cab2() + "', ";
+ sql += "img_cab3 = '" + a.getImg_cab3() + "', ";
+ sql += "img_ma2 = '" + a.getImg_ma2() + "', ";
+ sql += "img_ma3 = '" + a.getImg_ma3() + "', ";
+ sql += "img_ma5 = '" + a.getImg_ma5() + "', ";
+ sql += "img_ma6 = '" + a.getImg_ma6() + "', ";
+ sql += "img_ma8 = '" + a.getImg_ma8() + "', ";
+ sql += "img_ma10 = '" + a.getImg_ma10() + "', ";
+ sql += "img_rot1 = '" + a.getImg_rot1() + "', ";
+ sql += "img_rot2 = '" + a.getImg_rot2() + "', ";
+ sql += "img_cab1 = '" + a.getImg_cab1() + "', ";
+ sql += "img_cab4 = '" + a.getImg_cab4() + "', ";
+ sql += "img_ma1 = '" + a.getImg_ma1() + "', ";
+ sql += "img_ma4 = '" + a.getImg_ma4() + "', ";
+ sql += "img_ma7 = '" + a.getImg_ma7() + "', ";
+ sql += "img_ma9 = '" + a.getImg_ma9() + "', ";
+ sql += "restricao_carga = " + a.getRestricao_carga() + ", ";
+ sql += "restricao_motricidade = '" + a.getRestricao_motricidade() + "', ";
+ sql += "restricao_conducao = '" + a.getRestricao_conducao() + "', ";
+ sql += "restricao_vibracoes = '" + a.getRestricao_vibracoes() + "', ";
+ sql += "restricao_outras = '" + a.getRestricao_outras() + "', ";
+ sql += "med_observ = '" + a.getMed_observ() + "', ";
+ sql += "estado_assinatura = " + a.getEstado_assinatura() + ", ";
+ sql += "tecnico_saude_id = " + a.getTecnico_saude_id() + ", ";
+ sql += "medico_id = " + a.getMedico_id() + ", ";
+ sql += "ass_consolidacao = '" + a.getAss_consolidacao() + "', ";
+ sql += "ass_resp_seg = '" + a.getAss_resp_seg() + "', ";
+ sql += "ass_resp_rh = '" + a.getAss_resp_rh() + "', ";
+ if(a.getData_consolidacao() == null)
+ {
+ sql += "data_consolidacao = " + null + ", ";
+ }
+ else
+ {
+ sql += "data_consolidacao = '" + a.getData_consolidacao() + "', ";
+ }
+ if(a.getData_assinatura_seg() == null)
+ {
+ sql += "data_assinatura_seg = " + null + ", ";
+ }
+ else
+ {
+ sql += "data_assinatura_seg = '" + a.getData_consolidacao() + "', ";
+ }
+ if(a.getData_assinatura_rh() == null)
+ {
+ sql += "data_assinatura_rh = " + null + ", ";
+ }
+ else
+ {
+ sql += "data_assinatura_rh = '" + a.getData_consolidacao() + "', ";
+ }
+ sql += "nome_resp_seg = '" + a.getNome_resp_seg() + "', ";
+ sql += "nome_resp_rh = '" + a.getNome_resp_rh() + "', ";
+ sql += "correcao = '" + a.getCorrecao() + "', ";
+ sql += "observacoes_correcao = '" + a.getObservacoes_correcao() + "', ";
+ sql += "estado_antes_correcao = " + a.getEstado_antes_correcao() + ", ";
+ sql += "ass_superior = '" + a.getAss_superior() + "', ";
+ sql += "nome_superior = '" + a.getNome_superior() + "', ";
+ sql += "averiguacao_posterior = '" + a.getAveriguacao_posterior() + "', ";
+ sql += "averiguacao_obs = '" + a.getAveriguacao_obs() + "', ";
+ sql += "nome_resp_consolidacao = '" + a.getNome_resp_consolidacao() + "', ";
+ if(a.getData_assinatura_superior() == null)
+ {
+ sql += "data_assinatura_superior = " + null + ", ";
+ }
+ else
+ {
+ sql += "data_assinatura_superior = '" + a.getData_assinatura_superior() + "', ";
+ }
+ sql += "rh_fase4 = " + a.getRh_fase4() + " ";
+ sql += "WHERE id = " + a.getId();
+ System.out.println("SQL UPDATE : " + sql);
+ st.execute(sql);
+ }
+
+ public void changeEstado(Correcao c) throws Exception
+ {
+ Statement st = createStatement();
+ String sql = "UPDATE analises_acidentes SET correcao = '" + c.getCorrecao() + "', estado = " + c.getEstado_corr() + ", estado_antes_correcao = " + c.getEstado_actual() + ", observacoes_correcao = '" + c.getObservacoes() + "' WHERE id = " + c.getAnalise_id();
+ st.execute(sql);
+ }
+
+ public Integer getMaxRecomendacaoId()
+ {
+ Statement st = createStatement();
+ String sql = "SELECT max(recomendacoes.id)+1 AS MAXRECOMENDACAOID FROM recomendacoes";
+ try
+ {
+ ResultSet rs = st.executeQuery(sql);
+ rs.first();
+ Integer newId = new Integer(rs.getInt("MAXRECOMENDACAOID"));
+ if(newId.intValue() == 0)
+ {
+ newId = new Integer(1);
+ }
+ return newId;
+ }
+ catch(Exception ex)
+ {
+ return new Integer(1);
+ }
+ }
+
+ public Integer createRecomendacao(Recomendacao r) throws Exception
+ {
+ Statement st = createStatement();
+ Integer newId = getMaxRecomendacaoId();
+ String sql = "INSERT INTO recomendacoes (id, analise_id, recomendacao) VALUES (";
+ sql += newId + ", ";
+ sql += r.getAnalise_id() + ", '";
+ sql += r.getRecomendacao() + "')";
+ st.execute(sql);
+
+ return newId;
+ }
+
+ public void updateRecomendacao(Recomendacao r) throws Exception
+ {
+ Statement st = createStatement();
+ String sql = "UPDATE recomendacoes SET analise_id = " + r.getAnalise_id() + ", ";
+ sql += "recomendacao = '" + r.getRecomendacao() + "' ";
+ sql += "WHERE id = " + r.getId();
+ //System.out.println("SQL : " + sql);
+ st.execute(sql);
+ }
+
+ public void deleteRecomendacoesByAnalise(Integer analise_id) throws Exception
+ {
+ System.out.println("DELETE RECOMENDACOES");
+ Statement st = createStatement();
+ String sql = "DELETE FROM recomendacoes WHERE analise_id = " + analise_id;
+ st.execute(sql);
+ }
+
+ public void deleteAnaliseAcidente(Integer analise_id) throws Exception
+ {
+ Statement st = createStatement();
+ //String sql = "DELETE FROM analises_acidentes WHERE id = " + analise_id;
+ String sql = "UPDATE analises_acidentes SET apagada = 'y' WHERE id = " + analise_id;
+ st.execute(sql);
+ }
+
+ public void deleteAcidentado(Integer acidentado_id) throws Exception
+ {
+ Statement st = createStatement();
+ String sql = "DELETE FROM acidentados WHERE id = " + acidentado_id;
+ st.execute(sql);
+ }
+
+ public ArrayList getRecomendacoesByAnalise(Integer analiseId) throws Exception
+ {
+ ArrayList list = new ArrayList();
+ Statement st = createStatement();
+ String sql = "SELECT * FROM recomendacoes WHERE analise_id = " + analiseId;
+ //System.out.println("SQL : " + sql);
+ ResultSet rs = st.executeQuery(sql);
+ if(rs.isBeforeFirst())
+ {
+ rs.first();
+ do
+ {
+ Recomendacao r = new Recomendacao();
+ r.setId(new Integer(rs.getInt("id")));
+ r.setAnalise_id(new Integer(rs.getInt("analise_id")));
+ r.setRecomendacao(rs.getString("recomendacao"));
+ list.add(r);
+ }while(rs.next());
+ }
+
+ return list;
+ }
+
+ public Integer getMaxMedidaId()
+ {
+ Statement st = createStatement();
+ String sql = "SELECT max(medidas.id)+1 AS MAXMEDIDAID FROM medidas";
+ try
+ {
+ ResultSet rs = st.executeQuery(sql);
+ rs.first();
+ Integer newId = new Integer(rs.getInt("MAXMEDIDAID"));
+ if(newId.intValue() == 0)
+ {
+ newId = new Integer(1);
+ }
+ return newId;
+ }
+ catch(Exception ex)
+ {
+ return new Integer(1);
+ }
+ }
+
+ public Integer createMedida(Medida m) throws Exception
+ {
+ Statement st = createStatement();
+ Integer newId = getMaxMedidaId();
+ String sql = "INSERT INTO medidas (id, analise_id, medida) VALUES (";
+ sql += newId + ", ";
+ sql += m.getAnalise_id() + ", '";
+ sql += m.getMedida() + "')";
+ st.execute(sql);
+
+ return newId;
+ }
+
+
+
+ public void updateMedida(Medida m) throws Exception
+ {
+ Statement st = createStatement();
+ String sql = "UPDATE medidas SET analise_id = " + m.getAnalise_id() + ", ";
+ sql += "medida = '" + m.getMedida() + "' ";
+ sql += "WHERE id = " + m.getId();
+ //System.out.println("SQL : " + sql);
+ st.execute(sql);
+ }
+
+ public void deleteMedidasByAnalise(Integer analise_id) throws Exception
+ {
+ Statement st = createStatement();
+ String sql = "DELETE FROM medidas WHERE analise_id = " + analise_id;
+ st.execute(sql);
+ }
+
+ public ArrayList getMedidasByAnalise(Integer analiseId) throws Exception
+ {
+ ArrayList list = new ArrayList();
+ Statement st = createStatement();
+ String sql = "SELECT * FROM medidas WHERE analise_id = " + analiseId;
+ //System.out.println("SQL : " + sql);
+ ResultSet rs = st.executeQuery(sql);
+ if(rs.isBeforeFirst())
+ {
+ rs.first();
+ do
+ {
+ Medida m = new Medida();
+ m.setId(new Integer(rs.getInt("id")));
+ m.setAnalise_id(new Integer(rs.getInt("analise_id")));
+ m.setMedida(rs.getString("medida"));
+ list.add(m);
+ }while(rs.next());
+ }
+
+ return list;
+ }
+
+
+
+ public String getNumeroCedula(Integer medico_id) throws Exception
+ {
+ Dblocal dblocal = new Dblocal();
+ dblocal.connect();
+ Statement stlocal = dblocal.createStatement();
+ String sql ="SELECT numero_cedula FROM medicos WHERE id = " + medico_id;
+ ResultSet rslocal = stlocal.executeQuery(sql);
+ rslocal.first();
+ String numero_cedula = rslocal.getString("numero_cedula");
+ dblocal.close();
+ return numero_cedula;
+ }
+
+ public String getTipoDescricao(Integer tipo) throws Exception
+ {
+ Statement st = createStatement();
+ String sql = "SELECT descricao FROM tipos_utilizadores WHERE tipo = " + tipo;
+ ResultSet rs = st.executeQuery(sql);
+ rs.first();
+ String descricao = rs.getString("descricao");
+ return descricao;
+ }
+
+ public com.sun.rave.web.ui.model.Option[] getTiposList() throws Exception
+ {
+ ArrayList list = new ArrayList();
+ TipoUtilizador t = new TipoUtilizador();
+ t.setId(new Integer(0));
+ t.setTipo(new Integer(0));
+ t.setDescricao("");
+ list.add(t);
+ Statement st = createStatement();
+ String sql ="SELECT * FROM tipos_utilizadores WHERE activo = 'y' ORDER BY ordem";
+ ResultSet rs = st.executeQuery(sql);
+ if(rs.isBeforeFirst())
+ {
+ rs.first();
+ do
+ {
+ t = new TipoUtilizador();
+ t.setId(new Integer(rs.getInt("id")));
+ t.setTipo(new Integer(rs.getInt("tipo")));
+ t.setDescricao(rs.getString("descricao"));
+ //t.setActivo(rs.getString("activo"));
+ //t.setOrdem(new Integer(rs.getInt("ordem")));
+ list.add(t);
+ }while(rs.next());
+ }
+
+ com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()];
+ ListIterator iter = list.listIterator();
+ int i = 0;
+ while(iter.hasNext())
+ {
+ t = (TipoUtilizador) iter.next();
+
+ listOptions[i] = new Option(t.getTipo(), t.getDescricao());
+ i++;
+ }
+ return listOptions;
+ }
+
+ public com.sun.rave.web.ui.model.Option[] getTiposList(Integer permissao) throws Exception
+ {
+ ArrayList list = new ArrayList();
+ TipoUtilizador t = new TipoUtilizador();
+ t.setId(new Integer(0));
+ t.setTipo(new Integer(0));
+ t.setDescricao("");
+ list.add(t);
+ Statement st = createStatement();
+ String sql ="SELECT * FROM tipos_utilizadores WHERE activo = 'y' ORDER BY ordem";
+ ResultSet rs = st.executeQuery(sql);
+ if(rs.isBeforeFirst())
+ {
+ rs.first();
+ do
+ {
+ t = new TipoUtilizador();
+ if(permissao.intValue() == 7) //director rh
+ {
+ t.setTipo(new Integer(rs.getInt("tipo")));
+ if(t.getTipo().intValue() == 1 || t.getTipo().intValue() == 2 || t.getTipo().intValue() == 6) // seguranca || rh || gestor
+ {
+ t.setId(new Integer(rs.getInt("id")));
+ t.setDescricao(rs.getString("descricao"));
+ //t.setActivo(rs.getString("activo"));
+ //t.setOrdem(new Integer(rs.getInt("ordem")));
+ list.add(t);
+ }
+ }
+ else
+ {
+ t.setId(new Integer(rs.getInt("id")));
+ t.setTipo(new Integer(rs.getInt("tipo")));
+ t.setDescricao(rs.getString("descricao"));
+ //t.setActivo(rs.getString("activo"));
+ //t.setOrdem(new Integer(rs.getInt("ordem")));
+ list.add(t);
+ }
+
+ }while(rs.next());
+ }
+
+ com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()];
+ ListIterator iter = list.listIterator();
+ int i = 0;
+ while(iter.hasNext())
+ {
+ t = (TipoUtilizador) iter.next();
+
+ listOptions[i] = new Option(t.getTipo(), t.getDescricao());
+ i++;
+ }
+ return listOptions;
+ }
+
+ public com.sun.rave.web.ui.model.Option[] getEstabelecimentosList(Integer empresa_id, Boolean booGestor) throws Exception
+ {
+ Dblocal dblocal = new Dblocal();
+ dblocal.connect();
+ Statement stlocal = dblocal.createStatement();
+ ArrayList list = new ArrayList();
+ Estabelecimento e = new Estabelecimento();
+ e.setId(new Integer(-1));
+
+ e.setNome("-Seleccionar-");
+
+ list.add(e);
+ if(booGestor.equals(new Boolean(true)))
+ {
+ e = new Estabelecimento();
+ e.setId(new Integer(0));
+ e.setNome("-Todos os estabelecimentos-");
+
+ list.add(e);
+ }
+ String sql ="SELECT * FROM estabelecimentos WHERE empresa_id = " + empresa_id + " AND inactivo = 'n' ORDER BY nome_plain";
+
+ ResultSet rslocal = stlocal.executeQuery(sql);
+ if(rslocal.isBeforeFirst())
+ {
+ rslocal.first();
+ do
+ {
+ e = new Estabelecimento();
+ e.setId(new Integer(rslocal.getInt("id")));
+ //e.setNome_plain(rslocal.getString("nome_plain"));
+ e.setNome(rslocal.getString("nome"));
+ System.out.println("ESTABELECIMENTOAA : " + e.getId().toString() + " - " + e.getNome());
+ //t.setActivo(rs.getString("activo"));
+ //t.setOrdem(new Integer(rs.getInt("ordem")));
+ list.add(e);
+ }while(rslocal.next());
+ }
+
+ com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()];
+ ListIterator iter = list.listIterator();
+ int i = 0;
+ while(iter.hasNext())
+ {
+ e = (Estabelecimento) iter.next();
+ System.out.println("ESTABELECIMENTOL : " + e.getId().toString() + " - " + e.getNome());
+ listOptions[i] = new Option(e.getId(), Utils.unicodeToHTML(e.getNome()));
+ i++;
+ }
+ dblocal.close();
+ return listOptions;
+ }
+
+ public com.sun.rave.web.ui.model.Option[] getEstabelecimentosGestorList(Integer empresa_id, Boolean booGestor) throws Exception
+ {
+ Dblocal dblocal = new Dblocal();
+ dblocal.connect();
+ Statement stlocal = dblocal.createStatement();
+ ArrayList list = new ArrayList();
+ Estabelecimento e = null;
+ //Estabelecimento e = new Estabelecimento();
+ //e.setId(new Integer(-1));
+
+ //e.setNome("-Seleccionar-");
+
+ //list.add(e);
+ if(booGestor.equals(new Boolean(true)))
+ {
+ e = new Estabelecimento();
+ e.setId(new Integer(0));
+ e.setNome("-Todos os estabelecimentos-");
+
+ list.add(e);
+ }
+ String sql ="SELECT * FROM estabelecimentos WHERE empresa_id = " + empresa_id + " AND inactivo = 'n' ORDER BY nome_plain";
+
+ ResultSet rslocal = stlocal.executeQuery(sql);
+ if(rslocal.isBeforeFirst())
+ {
+ rslocal.first();
+ do
+ {
+ e = new Estabelecimento();
+ e.setId(new Integer(rslocal.getInt("id")));
+ //e.setNome_plain(rslocal.getString("nome_plain"));
+ e.setNome(rslocal.getString("nome"));
+ System.out.println("ESTABELECIMENTOAA : " + e.getId().toString() + " - " + e.getNome());
+ //t.setActivo(rs.getString("activo"));
+ //t.setOrdem(new Integer(rs.getInt("ordem")));
+ list.add(e);
+ }while(rslocal.next());
+ }
+
+ com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()];
+ ListIterator iter = list.listIterator();
+ int i = 0;
+ while(iter.hasNext())
+ {
+ e = (Estabelecimento) iter.next();
+ System.out.println("ESTABELECIMENTOL : " + e.getId().toString() + " - " + e.getNome());
+ listOptions[i] = new Option(e.getId(), Utils.unicodeToHTML(e.getNome()));
+ i++;
+ }
+ dblocal.close();
+ return listOptions;
+ }
+
+ public com.sun.rave.web.ui.model.Option[] getMedicosList() throws Exception
+ {
+ Dblocal dblocal = new Dblocal();
+ dblocal.connect();
+ Statement stlocal = dblocal.createStatement();
+ ArrayList list = new ArrayList();
+ Medico m = new Medico();
+ m.setId(new Integer(0));
+ m.setNome("-Seleccionar-");
+ list.add(m);
+ String sql ="SELECT * FROM medicos WHERE inactivo = 'n'";
+ ResultSet rslocal = stlocal.executeQuery(sql);
+ if(rslocal.isBeforeFirst())
+ {
+ rslocal.first();
+ do
+ {
+ m = new Medico();
+ m.setId(new Integer(rslocal.getInt("id")));
+ m.setNome(rslocal.getString("nome"));
+ list.add(m);
+ }while(rslocal.next());
+ }
+
+ com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()];
+ ListIterator iter = list.listIterator();
+ int i = 0;
+ while(iter.hasNext())
+ {
+ m = (Medico) iter.next();
+
+ listOptions[i] = new Option(m.getId(), Utils.unicodeToHTML(m.getNome()));
+ i++;
+ }
+ dblocal.close();
+ return listOptions;
+ }
+
+ public com.sun.rave.web.ui.model.Option[] getTecnicosSaudeList() throws Exception
+ {
+ Dblocal dblocal = new Dblocal();
+ dblocal.connect();
+ Statement stlocal = dblocal.createStatement();
+ ArrayList list = new ArrayList();
+ TecnicoSaude t = new TecnicoSaude();
+ t.setId(new Integer(0));
+ t.setNome("-Seleccionar-");
+ list.add(t);
+ String sql ="SELECT * FROM marcacoes_tecnicos_hst WHERE inactivo = 'n'";
+ ResultSet rslocal = stlocal.executeQuery(sql);
+ if(rslocal.isBeforeFirst())
+ {
+ rslocal.first();
+ do
+ {
+ t = new TecnicoSaude();
+ t.setId(new Integer(rslocal.getInt("id")));
+ t.setNome(rslocal.getString("nome"));
+ list.add(t);
+ }while(rslocal.next());
+ }
+
+ com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()];
+ ListIterator iter = list.listIterator();
+ int i = 0;
+ while(iter.hasNext())
+ {
+ t = (TecnicoSaude) iter.next();
+
+ listOptions[i] = new Option(t.getId(), Utils.unicodeToHTML(t.getNome()));
+ i++;
+ }
+ dblocal.close();
+ return listOptions;
+ }
+
+ public com.sun.rave.web.ui.model.Option[] getCausasList() throws Exception
+ {
+ ArrayList list = new ArrayList();
+ Causa c = new Causa();
+ c.setId(new Integer(0));
+ c.setCausa("-Seleccionar-");
+ list.add(c);
+ Statement st = createStatement();
+ String sql = "SELECT * FROM causas WHERE activa = 'y'";
+ ResultSet rs = st.executeQuery(sql);
+ if(rs.isBeforeFirst())
+ {
+ rs.first();
+ do
+ {
+ c = new Causa();
+ c.setId( new Integer(rs.getInt("id")) );
+ c.setCausa(rs.getString("causa"));
+ list.add(c);
+ }while(rs.next());
+ }
+
+ com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()];
+ ListIterator iter = list.listIterator();
+ int i = 0;
+ while(iter.hasNext())
+ {
+ c = (Causa) iter.next();
+
+ listOptions[i] = new Option(c.getId(), c.getCausa());
+ i++;
+ }
+ return listOptions;
+ }
+
+ public com.sun.rave.web.ui.model.Option[] getDepartamentosList() throws Exception
+ {
+ ArrayList list = new ArrayList();
+ Departamento d = new Departamento();
+
+ d.setId(new Integer(0));
+ d.setDescricao("-Todos-");
+ list.add(d);
+ Statement st = createStatement();
+ String sql = "SELECT * FROM departamentos WHERE activo = 'y'";
+ ResultSet rs = st.executeQuery(sql);
+ if(rs.isBeforeFirst())
+ {
+ rs.first();
+ do
+ {
+ d = new Departamento();
+ d.setId( new Integer(rs.getInt("id")) );
+ d.setDescricao(rs.getString("descricao"));
+ list.add(d);
+ }while(rs.next());
+ }
+
+ com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()];
+ ListIterator iter = list.listIterator();
+ int i = 0;
+ while(iter.hasNext())
+ {
+ d = (Departamento) iter.next();
+
+ listOptions[i] = new Option(d.getId(), d.getDescricao());
+ i++;
+ }
+ return listOptions;
+ }
+
+ public com.sun.rave.web.ui.model.Option[] getSeccoesList(Integer departamento_id) throws Exception
+ {
+ ArrayList list = new ArrayList();
+ Seccao s = new Seccao();
+
+ s.setId(new Integer(0));
+ s.setDescricao("-Seleccionar-");
+ list.add(s);
+ Statement st = createStatement();
+ String sql = "";
+ if(departamento_id == null) // todos
+ {
+ sql = "SELECT * FROM seccoes WHERE activo = 'y'";
+ }
+ else
+ {
+ sql = "SELECT * FROM seccoes WHERE activo = 'y' AND departamento_id = " + departamento_id;
+ }
+
+ ResultSet rs = st.executeQuery(sql);
+ if(rs.isBeforeFirst())
+ {
+ rs.first();
+ do
+ {
+ s = new Seccao();
+ s.setId( new Integer(rs.getInt("id")) );
+ s.setDescricao(rs.getString("descricao"));
+ s.setDepartamento_id( new Integer(rs.getInt("departamento_id")) );
+ list.add(s);
+ }while(rs.next());
+ }
+
+ com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()];
+ ListIterator iter = list.listIterator();
+ int i = 0;
+ while(iter.hasNext())
+ {
+ s = (Seccao) iter.next();
+
+ listOptions[i] = new Option(s.getId(), s.getDescricao());
+ i++;
+ }
+ return listOptions;
+ }
+
+
+
+ public Causa getCausa(Integer id) throws Exception
+ {
+ Statement st = createStatement();
+ String sql = null;
+
+ sql ="SELECT * FROM causas WHERE id = " + id;
+
+ ResultSet rs = st.executeQuery(sql);
+ rs.first();
+ Causa c = new Causa();
+ c.setId( new Integer(rs.getInt("id")) );
+ c.setCausa(rs.getString("causa"));
+ return c;
+ }
+
+ public Seccao getSeccao(Integer id) throws Exception
+ {
+ Statement st = createStatement();
+ String sql = null;
+
+ sql ="SELECT * FROM seccoes WHERE id = " + id + " AND activo = 'y'";
+
+ ResultSet rs = st.executeQuery(sql);
+ rs.first();
+ Seccao s = new Seccao();
+ s.setId( new Integer(rs.getInt("id")) );
+ s.setDescricao(rs.getString("descricao"));
+ return s;
+ }
+
+ public ArrayList getAnosListFromAnalises() throws Exception
+ {
+ ArrayList list = new ArrayList();
+ Statement st = createStatement();
+ String sql = null;
+
+ sql ="select distinct extract(year from data_acidente) as ano from analises_acidentes where estado = " + Global.ESTADO_CONCLUIDO + " order by ano";
+
+ ResultSet rs = st.executeQuery(sql);
+ if(rs.isBeforeFirst())
+ {
+ rs.first();
+ do
+ {
+ Double dAno = new Double(rs.getDouble("ano"));
+ Integer iAno = new Integer(dAno.intValue());
+ list.add(iAno);
+ }while(rs.next());
+ }
+
+ return list;
+ }
+
+
+
+ private String getFase(int estado)
+ {
+ if(estado == Global.ESTADO_SEG)
+ {
+ return "FASE 1 - SEG - ABERTURA";
+ }
+ else if(estado == Global.ESTADO_RH1)
+ {
+ return "FASE 2 - RH - ACOMPANHAMENTO";
+ }
+ else if(estado == Global.ESTADO_HS)
+ {
+ return "FASE 3 - SIPRP - RECOMENDAÇÕES";
+ }
+ else if(estado == Global.ESTADO_RH2)
+ {
+ return "FASE 4 - RH - MEDIDAS + LESÃO";
+ }
+// else if(estado == Global.ESTADO_MEDICINA)
+// {
+// return "Medicina";
+// }
+ else if(estado == Global.ESTADO_CONSOLIDACAO)
+ {
+ return "FASE 5 - SIPRP - CONSOLIDAÇÃO";
+ }
+// else if(estado == Global.ESTADO_ASSINATURAS)
+// {
+// return "Verificação";
+// }
+// else if(estado == Global.ESTADO_IMPRESSAO)
+// {
+// return "Impressão";
+// }
+ else if(estado == Global.ESTADO_ASSINATURA_SEG)
+ {
+ return "FASE 6 - SEG - VERIFICAÇÃO SEG.";
+ }
+ else if(estado == Global.ESTADO_ASSINATURA_RH)
+ {
+ return "FASE 7 - RH - VERIFICAÇÃO RH";
+ }
+ else if(estado == Global.ESTADO_FECHAR)
+ {
+ return "FASE 8 - SIPRP - CONCLUSÃO";
+ }
+ return null;
+ }
+
+ public HashMap getMetaData(String table) throws Exception
+ {
+ Statement st = createStatement();
+ String sql = "select * from " + table;
+
+ ResultSet rs = st.executeQuery(sql);
+ ResultSetMetaData rsmd = rs.getMetaData();
+
+ HashMap hash = new HashMap();
+ int cols = rsmd.getColumnCount();
+
+ for(int i=0; i < cols; i++)
+ {
+ String field = rsmd.getColumnName(i + 1);
+ int len = rsmd.getPrecision(i+1);
+ hash.put(field, new Integer(len));
+ }
+ return hash;
+ }
+
+ public byte[] getLogoByEmpresa(Integer empresaId) throws Exception
+ {
+ Dblocal dblocal = new Dblocal();
+ dblocal.connect();
+ Statement st = dblocal.createStatement();
+ String sql = "select empresa_logo_id from empresas where id = " + empresaId;
+ ResultSet rslocal = st.executeQuery(sql);
+ if(rslocal.isBeforeFirst())
+ {
+ rslocal.first();
+ Integer logoId = new Integer(rslocal.getInt("empresa_logo_id"));
+ byte[] logo = getLogo(logoId);
+ return logo;
+ }
+
+ return null;
+ }
+
+ public byte[] getLogo(Integer logoId) throws Exception
+ {
+ Dblocal dblocal = new Dblocal();
+ dblocal.connect();
+ Statement st = dblocal.createStatement();
+ String sql = "select image_data from image where id = " + logoId;
+ ResultSet rslocal = st.executeQuery(sql);
+ rslocal.first();
+ byte[] logo = rslocal.getBytes("image_data");
+ System.out.println("LOGO SIZE : " + logo.length);
+ return logo;
+ }
+
+ private Statement createStatement()
+ {
+ Db db = new Db();
+ return db.createStatement();
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/AnalisesSeguimentoDataProvider.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/AnalisesSeguimentoDataProvider.java
new file mode 100644
index 00000000..a5f9052a
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/AnalisesSeguimentoDataProvider.java
@@ -0,0 +1,24 @@
+/*
+ * AnalisesSeguimentoDataProvider.java
+ *
+ * Created on September 20, 2007, 1:42 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package db;
+
+import com.sun.data.provider.impl.ObjectListDataProvider;
+
+/**
+ *
+ * @author lluis
+ */
+public class AnalisesSeguimentoDataProvider extends ObjectListDataProvider {
+
+ /** Creates a new instance of AnalisesSeguimentoDataProvider */
+ public AnalisesSeguimentoDataProvider() {
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/Db.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/Db.java
new file mode 100644
index 00000000..167a1ca0
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/Db.java
@@ -0,0 +1,60 @@
+/*
+ * Db.java
+ *
+ * Created on September 19, 2007, 5:10 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package db;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.Statement;
+import javax.faces.context.FacesContext;
+import javax.servlet.http.HttpSession;
+
+/**
+ *
+ * @author lluis
+ */
+public class Db {
+// String connectionURL = "jdbc:postgresql://storage:5432/siprp_20100629"; //testes
+ String connectionURL = "jdbc:postgresql://localhost:5436/siprp"; //real
+
+ String User = "postgres";
+ String Pass = null;
+ Connection connection = null;
+
+ /** Creates a new instance of Db */
+ public Db() {
+ }
+
+ public Connection connect() throws Exception
+ {
+ Class.forName("org.postgresql.Driver").newInstance();
+ connection = DriverManager.getConnection(connectionURL, User, Pass);
+ HttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(true);
+ session.setAttribute("connection", connection);
+ return connection;
+ }
+
+ public Statement createStatement()
+ {
+ HttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(false);
+ connection = (Connection) session.getAttribute("connection");
+ Statement st;
+ try
+ {
+ st = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
+ return st;
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ return null;
+ }
+ }
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/Dblocal.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/Dblocal.java
new file mode 100644
index 00000000..a1813572
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/Dblocal.java
@@ -0,0 +1,66 @@
+/*
+ * Dblocal.java
+ *
+ * Created on September 20, 2007, 2:07 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package db;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.Statement;
+import javax.faces.context.FacesContext;
+import javax.servlet.http.HttpSession;
+
+/**
+ *
+ * @author lluis
+ */
+public class Dblocal {
+// String connectionURL = "jdbc:postgresql://storage:5432/siprp_local_3"; //testes
+ String connectionURL = "jdbc:postgresql://localhost:5436/siprp_local_3";
+ String User = "postgres";
+ String Pass = null;
+ Connection connection = null;
+
+ /** Creates a new instance of Dblocal */
+ public Dblocal() {
+ }
+
+ public Connection connect() throws Exception
+ {
+ Class.forName("org.postgresql.Driver").newInstance();
+ connection = DriverManager.getConnection(connectionURL, User, Pass);
+ HttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(true);
+ session.setAttribute("connection_local", connection);
+ return connection;
+ }
+
+ public Statement createStatement()
+ {
+ HttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(false);
+ connection = (Connection) session.getAttribute("connection_local");
+ Statement st;
+ try
+ {
+ st = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
+ return st;
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ return null;
+ }
+ }
+
+
+ public void close() throws Exception
+ {
+ connection.close();
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/EstadosCorrecaoDataProvider.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/EstadosCorrecaoDataProvider.java
new file mode 100644
index 00000000..4a1ac627
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/EstadosCorrecaoDataProvider.java
@@ -0,0 +1,24 @@
+/*
+ * EstadosCorrecaoDataProvider.java
+ *
+ * Created on November 29, 2007, 9:50 AM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package db;
+
+import com.sun.data.provider.impl.ObjectListDataProvider;
+
+/**
+ *
+ * @author lluis
+ */
+public class EstadosCorrecaoDataProvider extends ObjectListDataProvider {
+
+ /** Creates a new instance of EstadosCorrecaoDataProvider */
+ public EstadosCorrecaoDataProvider() {
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/TrabalhadoresListDataProvider.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/TrabalhadoresListDataProvider.java
new file mode 100644
index 00000000..0edc8ae4
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/TrabalhadoresListDataProvider.java
@@ -0,0 +1,24 @@
+/*
+ * TrabalhadoresListDataProvider.java
+ *
+ * Created on September 26, 2007, 4:25 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package db;
+
+import com.sun.data.provider.impl.ObjectListDataProvider;
+
+/**
+ *
+ * @author lluis
+ */
+public class TrabalhadoresListDataProvider extends ObjectListDataProvider {
+
+ /** Creates a new instance of TrabalhadoresListDataProvider */
+ public TrabalhadoresListDataProvider() {
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/UtilizadoresActivosListDataProvider.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/UtilizadoresActivosListDataProvider.java
new file mode 100644
index 00000000..62c8f48a
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/UtilizadoresActivosListDataProvider.java
@@ -0,0 +1,24 @@
+/*
+ * UtilizadoresListDataProvider.java
+ *
+ * Created on November 30, 2007, 2:51 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package db;
+
+import com.sun.data.provider.impl.ObjectListDataProvider;
+
+/**
+ *
+ * @author lluis
+ */
+public class UtilizadoresActivosListDataProvider extends ObjectListDataProvider {
+
+ /** Creates a new instance of UtilizadoresListDataProvider */
+ public UtilizadoresActivosListDataProvider() {
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/UtilizadoresDataProvider.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/UtilizadoresDataProvider.java
new file mode 100644
index 00000000..df6ae183
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/UtilizadoresDataProvider.java
@@ -0,0 +1,533 @@
+/*
+ * UtilizadoresDataProvider.java
+ *
+ * Created on September 20, 2007, 10:03 AM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package db;
+
+import analiseacidentestrabalho.Medico;
+import analiseacidentestrabalho.Permissao;
+import analiseacidentestrabalho.TecnicoSaude;
+import analiseacidentestrabalho.Utilizador;
+import com.sun.rave.web.ui.model.Option;
+import global.Global;
+import java.sql.ResultSet;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.ListIterator;
+import java.util.StringTokenizer;
+import utils.Utils;
+
+/**
+ *
+ * @author lluis
+ */
+public class UtilizadoresDataProvider {
+
+ /** Creates a new instance of UtilizadoresDataProvider */
+ public UtilizadoresDataProvider() {
+ }
+
+ public Integer getMaxUserId()
+ {
+ Statement st = createStatement();
+ String sql = "SELECT max(utilizadores.id)+1 AS MAXUSERID FROM utilizadores";
+ try
+ {
+ ResultSet rs = st.executeQuery(sql);
+ rs.first();
+ Integer newId = new Integer(rs.getInt("MAXUSERID"));
+ if(newId.intValue() == 0)
+ {
+ newId = new Integer(1);
+ }
+ return newId;
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ return new Integer(1);
+ }
+ }
+
+ public Integer createNewUtilizador(Utilizador u) throws Exception
+ {
+ Statement st = createStatement();
+ Integer newUserId = getMaxUserId();
+
+ String sql = "INSERT INTO utilizadores (id, login, password, data_password, email, empresa_id, estabelecimento_id, administrador, tipo, numero_cedula, cap, nome, medico_id, funcionario_hst_id, activo, responsavel_loja, gestor_geral, numero_mecanografico) VALUES (";
+ sql += newUserId + ", '";
+ sql += u.getLogin() + "', '";
+ sql += u.getPassword() + "', ";
+ if(u.getData_password() == null)
+ {
+ sql += null + ", '";
+ }
+ else
+ {
+ sql += "'" + u.getData_password() + "', '";
+ }
+ sql += u.getEmail() + "', ";
+ sql += u.getEmpresa_id() + ", ";
+ sql += u.getEstabelecimento_id() + ", '";
+ sql += u.getAdministrador() + "', ";
+ sql += u.getTipo() + ", '";
+ sql += u.getNumero_cedula() + "', '";
+ sql += u.getCap() + "', '";
+ sql += u.getNome() + "', ";
+ sql += u.getMedico_id() + ", ";
+ sql += u.getFuncionario_hst_id() + ", '";
+ sql += u.getActivo() + "', '";
+ sql += u.getResponsavel_loja() + "', '";
+ sql += u.getGestor_geral() + "', '";
+ sql += u.getNumero_mecanografico() + "')";
+ System.out.println("USER SQL : " + sql);
+ st.execute(sql);
+ return newUserId;
+ }
+
+ public void updateUtilizador(Utilizador u) throws Exception
+ {
+ Statement st = createStatement();
+ String sql = "";
+ if(u.getData_password() == null)
+ {
+ sql = "UPDATE utilizadores SET login = '" + u.getLogin() + "', password = '" + u.getPassword() + "', data_password = " + null + ", email = '" + u.getEmail() + "', empresa_id = " + u.getEmpresa_id() + ", estabelecimento_id = " + u.getEstabelecimento_id() + ", administrador = '" + u.getAdministrador() + "', tipo = " + u.getTipo() + ", numero_cedula = '" + u.getNumero_cedula() + "', cap = '" + u.getCap() + "', nome = '" + u.getNome() + "', medico_id = " + u.getMedico_id() + ", funcionario_hst_id = " + u.getFuncionario_hst_id() + ", activo = '" + u.getActivo() + "', responsavel_loja = '" + u.getResponsavel_loja() + "', gestor_geral = '" + u.getGestor_geral() + "', primeiro_login = '" + u.getPrimeiro_login() + "' WHERE id = " + u.getId();
+ }
+ else
+ {
+ sql = "UPDATE utilizadores SET login = '" + u.getLogin() + "', password = '" + u.getPassword() + "', data_password = '" + u.getData_password() + "', email = '" + u.getEmail() + "', empresa_id = " + u.getEmpresa_id() + ", estabelecimento_id = " + u.getEstabelecimento_id() + ", administrador = '" + u.getAdministrador() + "', tipo = " + u.getTipo() + ", numero_cedula = '" + u.getNumero_cedula() + "', cap = '" + u.getCap() + "', nome = '" + u.getNome() + "', medico_id = " + u.getMedico_id() + ", funcionario_hst_id = " + u.getFuncionario_hst_id() + ", activo = '" + u.getActivo() + "', responsavel_loja = '" + u.getResponsavel_loja() + "', gestor_geral = '" + u.getGestor_geral() + "', primeiro_login = '" + u.getPrimeiro_login() + "' WHERE id = " + u.getId();
+ }
+
+ System.out.println("SQL UPDATE USER : " + sql);
+ st.execute(sql);
+ }
+
+ public void deleteUser(Integer userId) throws Exception
+ {
+ Statement st = createStatement();
+ String sql = "UPDATE utilizadores SET apagado = 'y', activo = 'n' WHERE id = " + userId;
+ st.execute(sql);
+ }
+
+ public Utilizador getUtilizador(String login) throws Exception
+ {
+ Utilizador u = new Utilizador();
+ Statement st = createStatement();
+ String sql = "SELECT * FROM utilizadores WHERE LOWER(login) = '" + login.toLowerCase() + "' AND apagado = 'n'";
+ ResultSet rs = st.executeQuery(sql);
+ rs.first();
+ u.setId(new Integer(rs.getInt("id")));
+ u.setLogin(rs.getString("login"));
+ u.setPassword(rs.getString("password"));
+ u.setData_password(rs.getDate("data_password"));
+ u.setEmail(rs.getString("email"));
+ u.setEmpresa_id(new Integer(rs.getInt("empresa_id")));
+ u.setEstabelecimento_id(new Integer(rs.getInt("estabelecimento_id")));
+ u.setAdministrador(rs.getString("administrador"));
+ u.setTipo(new Integer(rs.getInt("tipo")));
+ u.setNumero_cedula(rs.getString("numero_cedula"));
+ u.setCap(rs.getString("cap"));
+ u.setNome(rs.getString("nome"));
+ u.setMedico_id(new Integer(rs.getInt("medico_id")));
+ u.setFuncionario_hst_id(new Integer(rs.getInt("funcionario_hst_id")));
+ u.setActivo(rs.getString("activo"));
+ u.setResponsavel_loja(rs.getString("responsavel_loja"));
+ u.setGestor_geral(rs.getString("gestor_geral"));
+ u.setPrimeiro_login(rs.getString("primeiro_login"));
+ u.setApagado(rs.getString("apagado"));
+ return u;
+ }
+
+ public Utilizador getUtilizador(Integer id) throws Exception
+ {
+ Utilizador u = new Utilizador();
+ Statement st = createStatement();
+ String sql = "SELECT * FROM utilizadores WHERE id = " + id;
+ ResultSet rs = st.executeQuery(sql);
+ rs.first();
+ u.setId(new Integer(rs.getInt("id")));
+ u.setLogin(rs.getString("login"));
+ u.setPassword(rs.getString("password"));
+ u.setData_password(rs.getDate("data_password"));
+ u.setEmail(rs.getString("email"));
+ u.setEmpresa_id(new Integer(rs.getInt("empresa_id")));
+ u.setEstabelecimento_id(new Integer(rs.getInt("estabelecimento_id")));
+ u.setAdministrador(rs.getString("administrador"));
+ u.setTipo(new Integer(rs.getInt("tipo")));
+ u.setNumero_cedula(rs.getString("numero_cedula"));
+ u.setCap(rs.getString("cap"));
+ u.setNome(rs.getString("nome"));
+ u.setMedico_id(new Integer(rs.getInt("medico_id")));
+ u.setFuncionario_hst_id(new Integer(rs.getInt("funcionario_hst_id")));
+ u.setActivo(rs.getString("activo"));
+ u.setResponsavel_loja(rs.getString("responsavel_loja"));
+ u.setGestor_geral(rs.getString("gestor_geral"));
+ u.setApagado(rs.getString("apagado"));
+ return u;
+ }
+
+ public ArrayList getUtilizadoresListByTipo(Integer tipo, String responsavel_loja, Integer estabelecimento_id) throws Exception
+ {
+ ArrayList list = new ArrayList();
+ Statement st = createStatement();
+ String sql = "";
+ String estabelecimento_constraint = "";
+ if(tipo.intValue() == Global.TIPO_UTILIZADOR_RH || tipo.intValue() == Global.TIPO_UTILIZADOR_SEGURANCA)
+ {
+ estabelecimento_constraint = " AND estabelecimento_id = " + estabelecimento_id;
+ }
+ if(responsavel_loja.matches("y"))
+ {
+ sql = "SELECT * FROM utilizadores WHERE activo = 'y' AND apagado = 'n' AND responsavel_loja = 'y' AND tipo = " + tipo + estabelecimento_constraint;
+ }
+ else
+ {
+ sql = "SELECT * FROM utilizadores WHERE activo = 'y' AND apagado = 'n' AND tipo = " + tipo + estabelecimento_constraint;
+ }
+
+ ResultSet rs = st.executeQuery(sql);
+ rs.first();
+ do
+ {
+ Utilizador u = new Utilizador();
+ u.setId(new Integer(rs.getInt("id")));
+ u.setLogin(rs.getString("login"));
+ u.setPassword(rs.getString("password"));
+ u.setData_password(rs.getDate("data_password"));
+ u.setEmail(rs.getString("email"));
+ u.setEmpresa_id(new Integer(rs.getInt("empresa_id")));
+ u.setEstabelecimento_id(new Integer(rs.getInt("estabelecimento_id")));
+ u.setAdministrador(rs.getString("administrador"));
+ u.setTipo(new Integer(rs.getInt("tipo")));
+ u.setNumero_cedula(rs.getString("numero_cedula"));
+ u.setCap(rs.getString("cap"));
+ u.setNome(rs.getString("nome"));
+ u.setMedico_id(new Integer(rs.getInt("medico_id")));
+ u.setFuncionario_hst_id(new Integer(rs.getInt("funcionario_hst_id")));
+ u.setActivo(rs.getString("activo"));
+ u.setResponsavel_loja(rs.getString("responsavel_loja"));
+ list.add(u);
+ }while(rs.next());
+ return list;
+ }
+
+ public ArrayList getUtilizadoresList(String por, String nome, Integer estabelecimento_id, String activo, String booDirRh) throws Exception
+ {
+ StringTokenizer stk = null;
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ ArrayList list = new ArrayList();
+ Statement st = createStatement();
+
+ String sql = "";
+ String sql1 = "";
+ String sql2 = "";
+ String sql3 = "";
+ if(por != null && nome != null && estabelecimento_id != null)
+ {
+ sql1 = "SELECT * FROM utilizadores, tipos_utilizadores WHERE utilizadores.tipo = tipos_utilizadores.tipo AND LOWER(numero_mecanografico) LIKE '%" + por + "%' AND (";
+ sql3 = ") AND estabelecimento_id = " + estabelecimento_id + " AND utilizadores.activo ='" + activo + "' AND apagado = 'n' AND utilizadores.tipo <> " + Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP + " ORDER BY numero_mecanografico";
+ stk = new StringTokenizer (nome);
+ int n = 0;
+ while (stk.hasMoreTokens ()) {
+ if(n > 0)
+ {
+ sql2 += "AND ";
+ }
+ sql2 += "LOWER(nome) LIKE '%" + stk.nextToken () + "%' ";
+ n++;
+ }
+ sql = sql1 + sql2 + sql3;
+ //sql = "SELECT * FROM utilizadores, tipos_utilizadores WHERE utilizadores.tipo = tipos_utilizadores.tipo AND LOWER(numero_mecanografico) LIKE '%" + por + "%' AND LOWER(nome) LIKE '%" + nome + "%' AND estabelecimento_id = " + estabelecimento_id + " AND utilizadores.activo ='" + activo + "' ORDER BY numero_mecanografico";
+ }
+ else if(por != null && nome != null)
+ {
+ sql1 = "SELECT * FROM utilizadores, tipos_utilizadores WHERE utilizadores.tipo = tipos_utilizadores.tipo AND LOWER(numero_mecanografico) LIKE '%" + por + "%' AND (";
+ sql3 = ") AND utilizadores.activo ='" + activo + "' AND apagado = 'n' AND utilizadores.tipo <> " + Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP + " ORDER BY numero_mecanografico";
+ stk = new StringTokenizer (nome);
+ int n = 0;
+ while (stk.hasMoreTokens ()) {
+ if(n > 0)
+ {
+ sql2 += "AND ";
+ }
+ sql2 += "LOWER(nome) LIKE '%" + stk.nextToken () + "%' ";
+ n++;
+ }
+ sql = sql1 + sql2 + sql3;
+ //sql = "SELECT * FROM utilizadores, tipos_utilizadores WHERE utilizadores.tipo = tipos_utilizadores.tipo AND LOWER(numero_mecanografico) LIKE '%" + por + "%' AND LOWER(nome) LIKE '%" + nome + "%' AND utilizadores.activo ='" + activo + "' ORDER BY numero_mecanografico";
+ }
+ else if(por != null && estabelecimento_id != null)
+ {
+ sql = "SELECT * FROM utilizadores, tipos_utilizadores WHERE utilizadores.tipo = tipos_utilizadores.tipo AND LOWER(numero_mecanografico) LIKE '%" + por + "%' AND estabelecimento_id = " + estabelecimento_id + " AND utilizadores.activo ='" + activo + "' AND apagado = 'n' AND utilizadores.tipo <> " + Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP + " ORDER BY numero_mecanografico";
+ }
+ else if(nome != null && estabelecimento_id != null)
+ {
+ sql1 = "SELECT * FROM utilizadores, tipos_utilizadores WHERE utilizadores.tipo = tipos_utilizadores.tipo AND (";
+ sql3 = ") AND estabelecimento_id = " + estabelecimento_id + " AND utilizadores.activo ='" + activo + "' AND apagado = 'n' AND utilizadores.tipo <> " + Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP + " ORDER BY numero_mecanografico";
+ stk = new StringTokenizer (nome);
+ int n = 0;
+ while (stk.hasMoreTokens ()) {
+ if(n > 0)
+ {
+ sql2 += "AND ";
+ }
+ sql2 += "LOWER(nome) LIKE '%" + stk.nextToken () + "%' ";
+ n++;
+ }
+ sql = sql1 + sql2 + sql3;
+ //sql = "SELECT * FROM utilizadores, tipos_utilizadores WHERE utilizadores.tipo = tipos_utilizadores.tipo AND LOWER(nome) LIKE '%" + nome + "%' AND estabelecimento_id = " + estabelecimento_id + " AND utilizadores.activo ='" + activo + "' ORDER BY numero_mecanografico";
+ }
+ else if(por != null)
+ {
+ sql = "SELECT * FROM utilizadores, tipos_utilizadores WHERE utilizadores.tipo = tipos_utilizadores.tipo AND LOWER(numero_mecanografico) LIKE '%" + por + "%' AND utilizadores.activo ='" + activo + "' AND apagado = 'n' AND utilizadores.tipo <> " + Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP + " ORDER BY numero_mecanografico";
+ }
+ else if(nome != null)
+ {
+ sql1 = "SELECT * FROM utilizadores, tipos_utilizadores WHERE utilizadores.tipo = tipos_utilizadores.tipo AND (";
+ sql3 = ") AND utilizadores.activo ='" + activo + "' AND apagado = 'n' AND utilizadores.tipo <> " + Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP + " ORDER BY numero_mecanografico";
+ stk = new StringTokenizer (nome);
+ int n = 0;
+ while (stk.hasMoreTokens ()) {
+ if(n > 0)
+ {
+ sql2 += "AND ";
+ }
+ sql2 += "LOWER(nome) LIKE '%" + stk.nextToken () + "%' ";
+ n++;
+ }
+ sql = sql1 + sql2 + sql3;
+ //sql = "SELECT * FROM utilizadores, tipos_utilizadores WHERE utilizadores.tipo = tipos_utilizadores.tipo AND LOWER(nome) LIKE '%" + nome + "%' AND utilizadores.activo ='" + activo + "' ORDER BY numero_mecanografico";
+ }
+ else if(estabelecimento_id != null)
+ {
+ sql = "SELECT * FROM utilizadores, tipos_utilizadores WHERE utilizadores.tipo = tipos_utilizadores.tipo AND estabelecimento_id = " + estabelecimento_id + " AND utilizadores.activo ='" + activo + "' AND apagado = 'n' AND utilizadores.tipo <> " + Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP + " ORDER BY numero_mecanografico";
+ }
+ else // all null
+ {
+ sql = "SELECT * FROM utilizadores, tipos_utilizadores WHERE utilizadores.tipo = tipos_utilizadores.tipo AND utilizadores.activo ='" + activo + "' AND apagado = 'n' AND utilizadores.tipo <> " + Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP + " ORDER BY numero_mecanografico";
+ }
+ System.out.println("UTILIZADORES SQL : " + sql);
+ ResultSet rs = st.executeQuery(sql);
+ rs.first();
+ do
+ {
+ Utilizador u = new Utilizador();
+ u.setId(new Integer(rs.getInt(1)));
+ u.setLogin(rs.getString("login"));
+ u.setPassword(rs.getString("password"));
+ u.setData_password(rs.getDate("data_password"));
+ u.setEmail(rs.getString("email"));
+ u.setEmpresa_id(new Integer(rs.getInt("empresa_id")));
+ u.setEstabelecimento_id(new Integer(rs.getInt("estabelecimento_id")));
+ u.setAdministrador(rs.getString("administrador"));
+ u.setTipo(new Integer(rs.getInt("tipo")));
+ u.setNumero_cedula(rs.getString("numero_cedula"));
+ u.setCap(rs.getString("cap"));
+ u.setNome(Utils.unicodeToHTML(rs.getString("nome")) );
+ u.setMedico_id(new Integer(rs.getInt("medico_id")));
+ u.setFuncionario_hst_id(new Integer(rs.getInt("funcionario_hst_id")));
+ u.setActivo(rs.getString(14));
+ u.setResponsavel_loja(rs.getString("responsavel_loja"));
+ u.setGestor_geral(rs.getString("gestor_geral"));
+ u.setNumero_mecanografico(rs.getString("numero_mecanografico"));
+ u.setCategoria(rs.getString("descricao"));
+ u.setApagado(rs.getString("apagado"));
+ try
+ {
+ u.setNome_estabelecimento( adp.getEstabelecimentoNome(u.getEstabelecimento_id()) );
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ }
+ if(booDirRh.matches("y"))
+ {
+ int uType = u.getTipo().intValue();
+ if ( uType == Global.TIPO_UTILIZADOR_SEGURANCA || uType == Global.TIPO_UTILIZADOR_RH || uType == Global.TIPO_UTILIZADOR_GESTOR
+ || uType == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA )
+ {
+ list.add( u );
+ }
+ }
+ else
+ {
+ list.add(u);
+ }
+
+ }while(rs.next());
+ return list;
+ }
+
+ public ArrayList getResponsavelRhList(Integer estabelecimento_id)
+ {
+ ArrayList list = new ArrayList();
+ Utilizador u = null;
+ Statement st = createStatement();
+ String sql ="SELECT * FROM utilizadores WHERE activo = 'y' AND tipo = " + Global.TIPO_UTILIZADOR_RH + " AND apagado = 'n' AND responsavel_loja = 'y' AND estabelecimento_id = " + estabelecimento_id;
+ try
+ {
+ ResultSet rs = st.executeQuery(sql);
+ rs.first();
+ do
+ {
+ u = new Utilizador();
+ u.setId(new Integer(rs.getInt("id")));
+ u.setNome(rs.getString("nome"));
+ u.setLogin(rs.getString("login"));
+ u.setEmail(rs.getString("email"));
+ list.add(u);
+ }while(rs.next());
+ return list;
+ }
+ catch(Exception ex)
+ {
+ return null;
+ }
+ }
+
+ public Medico getMedico(Integer estabelecimento_id)
+ {
+ Medico m = null;
+ Statement st = createStatement();
+ String sql ="SELECT * FROM utilizadores WHERE activo = 'y' AND tipo = " + Global.TIPO_UTILIZADOR_MEDICO + " AND apagado = 'n' AND estabelecimento_id = " + estabelecimento_id;
+ try
+ {
+ ResultSet rs = st.executeQuery(sql);
+ rs.first();
+ m = new Medico();
+ m.setId(new Integer(rs.getInt("id")));
+ m.setNome(rs.getString("nome"));
+ m.setNumero_cedula(rs.getString("numero_cedula"));
+ return m;
+ }
+ catch(Exception ex)
+ {
+ return null;
+ }
+ }
+
+
+ public com.sun.rave.web.ui.model.Option[] getMedicosList() throws Exception
+ {
+// Dblocal dblocal = new Dblocal();
+// dblocal.connect();
+// Statement stlocal = dblocal.createStatement();
+ Statement st = createStatement();
+ ArrayList list = new ArrayList();
+// Medico m = new Medico();
+// m.setId(new Integer(0));
+// m.setNome("-Seleccionar-");
+// list.add(m);
+ String sql ="SELECT * FROM utilizadores WHERE activo = 'y' AND tipo = 5 AND apagado = 'n' ";
+ ResultSet rs = st.executeQuery(sql);
+ rs.first();
+ do
+ {
+ Medico m = new Medico();
+ m.setId(new Integer(rs.getInt("id")));
+ m.setNome(Utils.unicodeToHTML(rs.getString("nome")));
+ list.add(m);
+ }while(rs.next());
+ com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()];
+ ListIterator iter = list.listIterator();
+ int i = 0;
+ while(iter.hasNext())
+ {
+ Medico m = (Medico) iter.next();
+
+ listOptions[i] = new Option(m.getId(), Utils.unicodeToHTML(m.getNome()));
+ i++;
+ }
+// dblocal.close();
+ return listOptions;
+ }
+
+ public com.sun.rave.web.ui.model.Option[] getTecnicosSaudeList() throws Exception
+ {
+// Dblocal dblocal = new Dblocal();
+// dblocal.connect();
+// Statement stlocal = dblocal.createStatement();
+ Statement st = createStatement();
+ ArrayList list = new ArrayList();
+ TecnicoSaude t = new TecnicoSaude();
+ t.setId(new Integer(0));
+ t.setNome("");
+ list.add(t);
+ String sql ="SELECT * FROM utilizadores WHERE activo = 'y' AND tipo = " + Global.TIPO_UTILIZADOR_HS;
+ ResultSet rs = st.executeQuery(sql);
+ rs.first();
+ do
+ {
+ t = new TecnicoSaude();
+ t.setId(new Integer(rs.getInt("id")));
+ t.setNome(Utils.unicodeToHTML(rs.getString("nome")));
+ list.add(t);
+ }while(rs.next());
+ com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()];
+ ListIterator iter = list.listIterator();
+ int i = 0;
+ while(iter.hasNext())
+ {
+ t = (TecnicoSaude) iter.next();
+
+ listOptions[i] = new Option(t.getId(), Utils.unicodeToHTML(t.getNome()));
+ i++;
+ }
+// dblocal.close();
+ return listOptions;
+ }
+
+ public Integer getMaxPermissaoId()
+ {
+ Statement st = createStatement();
+ String sql = "SELECT max(permissoes.id)+1 AS MAXPERMISSAOID FROM permissoes";
+ try
+ {
+ ResultSet rs = st.executeQuery(sql);
+ rs.first();
+ Integer newId = new Integer(rs.getInt("MAXPERMISSAOID"));
+ if(newId.intValue() == 0)
+ {
+ newId = new Integer(1);
+ }
+ return newId;
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ return new Integer(1);
+ }
+ }
+
+ public Integer createPermissao(Permissao p) throws Exception
+ {
+ Statement st = createStatement();
+ Integer newId = getMaxPermissaoId();
+
+ String sql = "INSERT INTO permissoes (id, user_id, codigo_permissao) VALUES (" + newId + ", " + p.getUser_id() + ", " + p.getCodigo_permissao() + ")";
+ st.execute(sql);
+ return newId;
+ }
+
+ public Integer getPermissionCode(Integer userId) throws Exception
+ {
+ Statement st = createStatement();
+ String sql = "SELECT * FROM permissoes WHERE user_id = " + userId;
+ ResultSet rs = st.executeQuery(sql);
+ rs.first();
+ Integer permission = new Integer(rs.getInt("codigo_permissao"));
+ return permission;
+ }
+
+ private Statement createStatement()
+ {
+ Db db = new Db();
+ return db.createStatement();
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/UtilizadoresInactivosListDataProvider.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/UtilizadoresInactivosListDataProvider.java
new file mode 100644
index 00000000..b0c374ff
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/db/UtilizadoresInactivosListDataProvider.java
@@ -0,0 +1,24 @@
+/*
+ * UtilizadoresInactivosListDataProvider.java
+ *
+ * Created on November 30, 2007, 4:48 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package db;
+
+import com.sun.data.provider.impl.ObjectListDataProvider;
+
+/**
+ *
+ * @author lluis
+ */
+public class UtilizadoresInactivosListDataProvider extends ObjectListDataProvider {
+
+ /** Creates a new instance of UtilizadoresInactivosListDataProvider */
+ public UtilizadoresInactivosListDataProvider() {
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/global/Global.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/global/Global.java
new file mode 100755
index 00000000..79bebc5b
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/global/Global.java
@@ -0,0 +1,168 @@
+/*
+ * Global.java
+ *
+ * Created on November 23, 2007, 10:08 AM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package global;
+
+import analiseacidentestrabalho.Utilizador;
+//import com.sun.org.apache.bcel.internal.generic.GETFIELD;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+import javax.faces.context.FacesContext;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletResponse;
+import utils.JSFUtils;
+
+/**
+ *
+ * @author lluis2
+ */
+public class Global {
+ public final static int ESTADO_SEG = 1;
+ public final static int ESTADO_RH1 = 2;
+ public final static int ESTADO_HS = 3;
+ public final static int ESTADO_RH2 = 4;
+ //public final static int ESTADO_MEDICINA = 5;
+ public final static int ESTADO_CONSOLIDACAO = 5;
+ //public final static int ESTADO_ASSINATURAS = 7;
+ public final static int ESTADO_ASSINATURA_SEG = 6;
+ public final static int ESTADO_ASSINATURA_RH = 7;
+ //public final static int ESTADO_IMPRESSAO = 8;
+ public final static int ESTADO_FECHAR = 8;
+ public final static int ESTADO_CONCLUIDO = 9;
+
+
+ public final static int ESTADO_ASSINATURA_1 = 1;
+ public final static int ESTADO_ASSINATURA_2 = 2;
+ public final static int ESTADO_ASSINATURA_3 = 3;
+
+ public final static int TIPO_UTILIZADOR_SEGURANCA = 1;
+ public final static int TIPO_UTILIZADOR_RH = 2;
+ public final static int TIPO_UTILIZADOR_HS = 3;
+ public final static int TIPO_UTILIZADOR_MEDICO = 5;
+ public final static int TIPO_UTILIZADOR_GESTOR = 6;
+ public final static int TIPO_UTILIZADOR_DIRECTOR_GERAL_RH = 7;
+ public final static int TIPO_UTILIZADOR_DIRECTOR_SIPRP = 8;
+ public final static int TIPO_UTILIZADOR_DIRECTOR_LOJA = 9;
+ public final static int TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA = 10;
+
+ public final static int AUCHAN = 32;
+
+
+ public final static String SERVIDOR_SMTP = "smtp.netcabo.pt";
+ public final static String SERVIDOR_SMTP_PASSWORD = "EVOLUTE";
+ public final static String ENDERECO_ENVIO = "acidentes.auchan@siprp.pt";
+ //public final static String ENDERECO_ENVIO = "lluis@evolute.pt"; //testes
+
+ public final static String IMAGE_FOLDER = "/home/siprp/imagens_acidentes";
+ //public final static String IMAGE_FOLDER = "/home/lluis/imagens_acidentes";
+ public final static String RESOURCES_IMAGE_FOLDER = "/resources/images";
+
+ public static final String PDF_FOLDER_URL = "/resources/pdf";
+
+
+ //public static final String PLANOS_ACTUACAO_URL = "http://localhost:8084/PlanosActuacao/faces/ListaPlanos.jsp"; //testes
+ //public static final String PLANOS_ACTUACAO_URL = "http://192.168.111.24:8084/PlanosActuacao/faces/ListaPlanos.jsp"; //testes portatil
+ public static final String PLANOS_ACTUACAO_URL = "https://www.siprp.pt/PlanosActuacao/faces/ListaPlanos.jsp"; //real
+
+ public static final String LOGOS_FOLDER = "/resources/images";
+
+ /** Creates a new instance of Global */
+ public Global() {
+ }
+
+ public void copyImage(File fSource, File fDest)
+ {
+ try
+ {
+ InputStream in = new FileInputStream(fSource);
+ OutputStream out = new FileOutputStream(fDest);
+
+ // Transfer bytes from in to out
+ byte[] buf = new byte[1024];
+ int len;
+ while ((len = in.read(buf)) > 0) {
+ out.write(buf, 0, len);
+ }
+ in.close();
+ out.close();
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+
+ public void deleteFolderFiles(File folder)
+ {
+ File files[] = folder.listFiles();
+ for(int i=0;i 0)
+ {
+ //fos.write(buf, 0, buf.length);
+ }
+ fis.close();
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ if (!ctx.getResponseComplete())
+ {
+ HttpServletResponse response = (HttpServletResponse)ctx.getExternalContext().getResponse();
+ String contentType = "application/pdf";
+ response.setContentType(contentType);
+ response.setHeader("Content-Disposition","attachment;filename=\"" + "Ajuda.pdf" + "\"");
+
+ ServletOutputStream out = response.getOutputStream();
+
+ //out.write(model.getInfo().getBytes());
+ out.write(buf, 0, buf.length);
+ out.flush();
+ out.close();
+ ctx.responseComplete();
+ ctx.release();
+ }
+ }
+
+ public static void redirectToPlanos(FacesContext fc, Utilizador currentUser)
+ {
+ String curUser = "?user=" + currentUser.getId().toString();
+ String estab = "";
+ if(currentUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_GESTOR)
+ {
+ //obtem estabelecimento da lista de estabelecimentos
+ estab = "&estab_gestor=" + currentUser.getEstabelecimento_gestor().intValue();
+ }
+ fc = fc.getCurrentInstance();
+ try
+ {
+ JSFUtils.redirect(fc, Global.PLANOS_ACTUACAO_URL + curUser + estab);
+ //JSFUtils.dispatch(fc, Global.PLANOS_ACTUACAO_URL + curUser);
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pagestate/AnaliseAcidenteTrabalhoState.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pagestate/AnaliseAcidenteTrabalhoState.java
new file mode 100644
index 00000000..7be51517
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pagestate/AnaliseAcidenteTrabalhoState.java
@@ -0,0 +1,464 @@
+/*
+ * AnaliseAcidenteTrabalhoState.java
+ *
+ * Created on September 27, 2007, 5:18 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package pagestate;
+
+/**
+ *
+ * @author lluis
+ */
+public class AnaliseAcidenteTrabalhoState {
+ private Object header_nr;
+ private Object header_date;
+ private int estado;
+ private Object empresa;
+ private Object estabelecimento;
+ private Object trabalhador;
+ private Object data_nascimento;
+ private Object data_admissao;
+ private Object funcao;
+
+ private Object bi;
+ private Object morada;
+ private Object cod_postal1;
+ private Object cod_postal2;
+ private Object localidade;
+ private Object contacto_telefonico;
+ private Object turno;
+
+ private Object data_acidente;
+ private Object horas_turno;
+ private Object seccao;
+ private Object local_trabalho;
+ private Integer hours;
+ private Integer minutes;
+ private Object tarefa;
+ private Object substancias;
+
+ private Object superior_hierarquico;
+ private Object condicoes;
+ private Object testemunhas;
+ private Object causas;
+ private Object descricao;
+ private Object conclusoes;
+ private Object accoes;
+
+
+ private String formacao_shst;
+ private Object formacao_shsht_n_why;
+ private String acidentes_colaborador;
+ private Object nr_acidentes_colaborador;
+ private String acidentes_colaboradores;
+ private Object nr_acidentes_colaboradores;
+
+ private Object nr_relatorio_acidentes_colaborador_1;
+ private Object nr_relatorio_acidentes_colaborador_2;
+ private Object nr_relatorio_acidentes_colaborador_3;
+ private Object nr_relatorio_acidentes_colaborador_4;
+
+ private Object nr_relatorio_acidentes_colaboradores_1;
+ private Object nr_relatorio_acidentes_colaboradores_2;
+ private Object nr_relatorio_acidentes_colaboradores_3;
+ private Object nr_relatorio_acidentes_colaboradores_4;
+
+ private Object averiguador;
+ private String averiguacao_posterior;
+ private Object averiguacao_obs;
+
+ /** Creates a new instance of AnaliseAcidenteTrabalhoState */
+ public AnaliseAcidenteTrabalhoState() {
+ }
+
+ public Object getEstabelecimento() {
+ return estabelecimento;
+ }
+
+ public void setEstabelecimento(Object estabelecimento) {
+ this.estabelecimento = estabelecimento;
+ }
+
+ public Object getTrabalhador() {
+ return trabalhador;
+ }
+
+ public void setTrabalhador(Object trabalhador) {
+ this.trabalhador = trabalhador;
+ }
+
+ public Object getData_nascimento() {
+ return data_nascimento;
+ }
+
+ public void setData_nascimento(Object data_nascimento) {
+ this.data_nascimento = data_nascimento;
+ }
+
+ public Object getHoras_turno() {
+ return horas_turno;
+ }
+
+ public void setHoras_turno(Object horas_turno) {
+ this.horas_turno = horas_turno;
+ }
+
+ public Object getSeccao() {
+ return seccao;
+ }
+
+ public void setSeccao(Object seccao) {
+ this.seccao = seccao;
+ }
+
+ public Object getLocal_trabalho() {
+ return local_trabalho;
+ }
+
+ public void setLocal_trabalho(Object local_trabalho) {
+ this.local_trabalho = local_trabalho;
+ }
+
+ public Object getTarefa() {
+ return tarefa;
+ }
+
+ public void setTarefa(Object tarefa) {
+ this.tarefa = tarefa;
+ }
+
+ public Object getSubstancias() {
+ return substancias;
+ }
+
+ public void setSubstancias(Object substancias) {
+ this.substancias = substancias;
+ }
+
+ public Object getSuperior_hierarquico() {
+ return superior_hierarquico;
+ }
+
+ public void setSuperior_hierarquico(Object superior_hierarquico) {
+ this.superior_hierarquico = superior_hierarquico;
+ }
+
+ public Object getCondicoes() {
+ return condicoes;
+ }
+
+ public void setCondicoes(Object condicoes) {
+ this.condicoes = condicoes;
+ }
+
+ public Object getTestemunhas() {
+ return testemunhas;
+ }
+
+ public void setTestemunhas(Object testemunhas) {
+ this.testemunhas = testemunhas;
+ }
+
+ public Object getCausas() {
+ return causas;
+ }
+
+ public void setCausas(Object causas) {
+ this.causas = causas;
+ }
+
+ public Object getDescricao() {
+ return descricao;
+ }
+
+ public void setDescricao(Object descricao) {
+ this.descricao = descricao;
+ }
+
+ public Object getAccoes() {
+ return accoes;
+ }
+
+ public void setAccoes(Object accoes) {
+ this.accoes = accoes;
+ }
+
+ public Object getConclusoes() {
+ return conclusoes;
+ }
+
+ public void setConclusoes(Object conclusoes) {
+ this.conclusoes = conclusoes;
+ }
+
+ public Object getEmpresa() {
+ return empresa;
+ }
+
+ public void setEmpresa(Object empresa) {
+ this.empresa = empresa;
+ }
+
+ public int getEstado() {
+ return estado;
+ }
+
+ public void setEstado(int estado) {
+ this.estado = estado;
+ }
+
+ public Object getBi() {
+ return bi;
+ }
+
+ public void setBi(Object bi) {
+ this.bi = bi;
+ }
+
+ public Object getMorada() {
+ return morada;
+ }
+
+ public void setMorada(Object morada) {
+ this.morada = morada;
+ }
+
+ public Object getCod_postal1() {
+ return cod_postal1;
+ }
+
+ public void setCod_postal1(Object cod_postal1) {
+ this.cod_postal1 = cod_postal1;
+ }
+
+ public Object getCod_postal2() {
+ return cod_postal2;
+ }
+
+ public void setCod_postal2(Object cod_postal2) {
+ this.cod_postal2 = cod_postal2;
+ }
+
+ public Object getLocalidade() {
+ return localidade;
+ }
+
+ public void setLocalidade(Object localidade) {
+ this.localidade = localidade;
+ }
+
+ public Object getContacto_telefonico() {
+ return contacto_telefonico;
+ }
+
+ public void setContacto_telefonico(Object contacto_telefonico) {
+ this.contacto_telefonico = contacto_telefonico;
+ }
+
+ public Object getTurno() {
+ return turno;
+ }
+
+ public void setTurno(Object turno) {
+ this.turno = turno;
+ }
+
+ public Integer getHours() {
+ return hours;
+ }
+
+ public void setHours(Integer hours) {
+ this.hours = hours;
+ }
+
+ public Integer getMinutes() {
+ return minutes;
+ }
+
+ public void setMinutes(Integer minutes) {
+ this.minutes = minutes;
+ }
+
+ public String getFormacao_shst() {
+ return formacao_shst;
+ }
+
+ public void setFormacao_shst(String formacao_shst) {
+ this.formacao_shst = formacao_shst;
+ }
+
+ public Object getFormacao_shsht_n_why() {
+ return formacao_shsht_n_why;
+ }
+
+ public void setFormacao_shsht_n_why(Object formacao_shsht_n_why) {
+ this.formacao_shsht_n_why = formacao_shsht_n_why;
+ }
+
+ public String getAcidentes_colaborador() {
+ return acidentes_colaborador;
+ }
+
+ public void setAcidentes_colaborador(String acidentes_colaborador) {
+ this.acidentes_colaborador = acidentes_colaborador;
+ }
+
+ public Object getNr_acidentes_colaborador() {
+ return nr_acidentes_colaborador;
+ }
+
+ public void setNr_acidentes_colaborador(Object nr_acidentes_colaborador) {
+ this.nr_acidentes_colaborador = nr_acidentes_colaborador;
+ }
+
+ public String getAcidentes_colaboradores() {
+ return acidentes_colaboradores;
+ }
+
+ public void setAcidentes_colaboradores(String acidentes_colaboradores) {
+ this.acidentes_colaboradores = acidentes_colaboradores;
+ }
+
+ public Object getNr_acidentes_colaboradores() {
+ return nr_acidentes_colaboradores;
+ }
+
+ public void setNr_acidentes_colaboradores(Object nr_acidentes_colaboradores) {
+ this.nr_acidentes_colaboradores = nr_acidentes_colaboradores;
+ }
+
+ public Object getNr_relatorio_acidentes_colaborador_1() {
+ return nr_relatorio_acidentes_colaborador_1;
+ }
+
+ public void setNr_relatorio_acidentes_colaborador_1(Object nr_relatorio_acidentes_colaborador_1) {
+ this.nr_relatorio_acidentes_colaborador_1 = nr_relatorio_acidentes_colaborador_1;
+ }
+
+ public Object getNr_relatorio_acidentes_colaborador_2() {
+ return nr_relatorio_acidentes_colaborador_2;
+ }
+
+ public void setNr_relatorio_acidentes_colaborador_2(Object nr_relatorio_acidentes_colaborador_2) {
+ this.nr_relatorio_acidentes_colaborador_2 = nr_relatorio_acidentes_colaborador_2;
+ }
+
+ public Object getNr_relatorio_acidentes_colaborador_3() {
+ return nr_relatorio_acidentes_colaborador_3;
+ }
+
+ public void setNr_relatorio_acidentes_colaborador_3(Object nr_relatorio_acidentes_colaborador_3) {
+ this.nr_relatorio_acidentes_colaborador_3 = nr_relatorio_acidentes_colaborador_3;
+ }
+
+ public Object getNr_relatorio_acidentes_colaborador_4() {
+ return nr_relatorio_acidentes_colaborador_4;
+ }
+
+ public void setNr_relatorio_acidentes_colaborador_4(Object nr_relatorio_acidentes_colaborador_4) {
+ this.nr_relatorio_acidentes_colaborador_4 = nr_relatorio_acidentes_colaborador_4;
+ }
+
+ public Object getNr_relatorio_acidentes_colaboradores_1() {
+ return nr_relatorio_acidentes_colaboradores_1;
+ }
+
+ public void setNr_relatorio_acidentes_colaboradores_1(Object nr_relatorio_acidentes_colaboradores_1) {
+ this.nr_relatorio_acidentes_colaboradores_1 = nr_relatorio_acidentes_colaboradores_1;
+ }
+
+ public Object getNr_relatorio_acidentes_colaboradores_2() {
+ return nr_relatorio_acidentes_colaboradores_2;
+ }
+
+ public void setNr_relatorio_acidentes_colaboradores_2(Object nr_relatorio_acidentes_colaboradores_2) {
+ this.nr_relatorio_acidentes_colaboradores_2 = nr_relatorio_acidentes_colaboradores_2;
+ }
+
+ public Object getNr_relatorio_acidentes_colaboradores_3() {
+ return nr_relatorio_acidentes_colaboradores_3;
+ }
+
+ public void setNr_relatorio_acidentes_colaboradores_3(Object nr_relatorio_acidentes_colaboradores_3) {
+ this.nr_relatorio_acidentes_colaboradores_3 = nr_relatorio_acidentes_colaboradores_3;
+ }
+
+ public Object getNr_relatorio_acidentes_colaboradores_4() {
+ return nr_relatorio_acidentes_colaboradores_4;
+ }
+
+ public void setNr_relatorio_acidentes_colaboradores_4(Object nr_relatorio_acidentes_colaboradores_4) {
+ this.nr_relatorio_acidentes_colaboradores_4 = nr_relatorio_acidentes_colaboradores_4;
+ }
+
+ public Object getHeader_nr() {
+ return header_nr;
+ }
+
+ public void setHeader_nr(Object header_nr) {
+ this.header_nr = header_nr;
+ }
+
+ public Object getHeader_date() {
+ return header_date;
+ }
+
+ public void setHeader_date(Object header_date) {
+ this.header_date = header_date;
+ }
+
+ public Object getFuncao() {
+ return funcao;
+ }
+
+ public void setFuncao(Object funcao) {
+ this.funcao = funcao;
+ }
+
+ public Object getData_acidente() {
+ return data_acidente;
+ }
+
+ public void setData_acidente(Object data_acidente) {
+ this.data_acidente = data_acidente;
+ }
+
+ public Object getData_admissao() {
+ return data_admissao;
+ }
+
+ public void setData_admissao(Object data_admissao) {
+ this.data_admissao = data_admissao;
+ }
+
+ public Object getAveriguador() {
+ return averiguador;
+ }
+
+ public void setAveriguador(Object averiguador) {
+ this.averiguador = averiguador;
+ }
+
+ public String getAveriguacao_posterior() {
+ return averiguacao_posterior;
+ }
+
+ public void setAveriguacao_posterior(String averiguacao_posterior) {
+ this.averiguacao_posterior = averiguacao_posterior;
+ }
+
+ public Object getAveriguacao_obs() {
+ return averiguacao_obs;
+ }
+
+ public void setAveriguacao_obs(Object averiguacao_obs) {
+ this.averiguacao_obs = averiguacao_obs;
+ }
+
+
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pdf/Logotipos.eml b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pdf/Logotipos.eml
new file mode 100644
index 00000000..4510d78f
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pdf/Logotipos.eml
@@ -0,0 +1,330 @@
+X-Account-Key: account2
+X-Mozilla-Keys:
+Return-Path:
+Delivered-To: 4-malves@evolute.pt
+Received: (qmail 19936 invoked from network); 26 Dec 2007 15:28:46 +0000
+Received: from localhost (127.0.0.1)
+ by localhost with SMTP; 26 Dec 2007 15:28:46 +0000
+Received: from a213-22-140-174.cpe.netcabo.pt
+ (a213-22-140-174.cpe.netcabo.pt [213.22.140.174]) by webmail.evolute.pt
+ (Horde MIME library) with HTTP; Wed, 26 Dec 2007 15:28:45 +0000
+Message-ID: <20071226152845.ecq9t84xcswo4wow@webmail.evolute.pt>
+Date: Wed, 26 Dec 2007 15:28:45 +0000
+From: lluis@evolute.pt
+To: malves@evolute.pt
+Subject: Logotipos
+MIME-Version: 1.0
+Content-Type: multipart/mixed;
+ boundary="=_6xaiexiy7y80"
+Content-Transfer-Encoding: 7bit
+User-Agent: Internet Messaging Program (IMP) H3 (4.1.1)
+X-Spam-Checker-Version: SpamAssassin 3.0.6 (2005-12-07) on plesk.evolute.pt
+X-Spam-Level:
+X-Spam-Status: No, score=1.0 required=7.0 tests=AWL,HELO_DYNAMIC_HCC,
+ HELO_DYNAMIC_IPADDR,NO_REAL_NAME,RCVD_IN_SORBS_DUL autolearn=no
+ version=3.0.6
+
+This message is in MIME format.
+
+--=_6xaiexiy7y80
+Content-Type: text/plain;
+ charset=ISO-8859-1;
+ DelSp="Yes";
+ format="flowed"
+Content-Disposition: inline
+Content-Transfer-Encoding: 7bit
+
+
+
+--=_6xaiexiy7y80
+Content-Type: image/gif;
+ name="auchan_logo.gif"
+Content-Disposition: attachment;
+ filename="auchan_logo.gif"
+Content-Transfer-Encoding: base64
+
+R0lGODlhJwHRAPAAAAAA/wD//yH5BAEAAP0ALAAAAAAnAdEAhx2YWxulWRayazaYWSuaZjyIYzmb
+aDqcciinXj2iTjimWzeobzjBa0mXWkiOYUebZ0ibc1OMZlOPclWaZlObckWjW1alWkamaUepdUi0
+akeyeFSlaFSpdVeybFW0eGSeXW+Ba2mZZ3eTaWylXmSnaGerdmq1aWi2d3WpaHKpdHmza3a1eDmw
+iEerhUmqkEmzhUq4lFWsg1a1hVe3mFi3o2ari2OskmW1hGe1mHW3hnW0lW+8rVDDi1vCq2fDhmnC
+m3fEjnvHlXHIsHTSy5R9XJh6Zq16Wa97Y/g1T/lIOs5zVNlmVthwXMJ2Y9xpadd/Zu1HWexWWvtJ
+SfpLWfxWS/tYWulVZPtMY/xaZf5bculoXP5kS/xjW/1yXOZqZuhzY/1lZ/5oc/50af51df5pgftu
+kP54hv17lpCIWoGLYY+OcoiQa5aGaZmJcIWqZ4qqdoWya4a3d5W7eK2AXrWDaaGneIfCd6PJfcCK
+XMSKaN2Ib92FddqQfuWLe+SSfP2Fav6Gd/+Qb/6SfP+jeoa5g5avlZa7iJm8k4+ytZuqpa2ZlKq2
+i4jCh4bHl4PRn5nEiJjImJ3VmYjIqofIt4nTu5nFpJnOtJjXqJXUuqbFi6nImKrZi6rRnLXJlrDR
+jrrWmarMpqvPs6vTpKrYuLfMprfPubjUqbfXtbfisZHTyp/jxp/i4qLPyqjVyaXc2LfZxrnd0avc
+5Ljl0bLn6teQgNqtp+OUh+yXkv6Hhv6Ilv6Vh/6Xlv6Kpv6Xpv6atf+kjP6ll/+zmv+npv6ouP+3
+p/+3t9euwP+rxP6r1f63xv+508nZs8vjrcXjudLhuOPJt//Dq//Gt//Uvcbcw87f1Nvdws7f4cTk
+xcfp2Mfx3NXmxtfo1Nry2sTq6cXr98X06cn0+dPq6dTs9tbz69n3/OjLw+XUx//Gxv/H1//WyP/X
+1v7J5f7Y6P/a9Obrxefq1e/4zenz2v/kzP7m2PX02ufs5eLu8ev15uf8/f7n5//o+Pj26f7+/vwD
++wAAAP///wj/APsJHEiwoMGDCBMqXMiwocOHECNKnEixosWLGDNq3Mixo8ePIEOKHEmypMmTKFOq
+XMmypcuXMGPKnEmzps2bOHPq3Mmzp8+fQIMKHUq0qNGjSJMqXcq0qdOnUKNKnUq1qtWrWLNq3cq1
+q9evYMOKHUu2rNmzaNOqXcu2rdu3cOPKnUu3rt27ePOWTFasGN9kf88lOycYneDBgAkP1qe38cV0
+VKpInlyFCpcqWKJ0qdIljGQqWKpskXzMsemJwLqAAcOl9Wouq1nHBiNmdRjaXKiMOc37YaAqrT1H
+AY5lim0wqrlk2YK8dhUwWBj3no5QnWQsoUNXsYLZOXQsrrFj/4fOZRj18wV/ZVmNGbOVLuuxgGkP
+xvP65/Vv774KTdAuYMAIg8suuhAoHXof8SMGbNg9F992YcQnX3tYWFFffZetc5V6l2WhGhjrhXEg
+gh1Fs5p88tUXGmtZUJHML6FNEcUVKI6BnxTmWfWLarWFAdt8YLBD4ke6dKFdFWGgKB507cxzHYUn
+gtGLOiNOFQyStV0YRmf5DNkRP0aiCAZ32XExBRS4CPRHFuNhZwUWxPDTTzitIJKIIsYkUyVTv6w2
+RooXViGklxup4xl0mH1HI3vKCATNddqBgU4/0+iQRhNLwOYFFmPkoqFTujw33noX7kloRX2e2CBm
+8Y0xhnT7eP82oRXt9GPIAEWIQQaQxuVWRS5OARPGFBLKt96gp160z4LQzaedsVVAUQZB6k1oniYU
+sHFhlidu+WtTutwWxm3KySdishhF4yODm2qnxWo4EnQOkqvpM00CIWjxnBa3sSbGc89xkeZSunCx
+5RjQORcGsuhSpEuzXDw75neCFvQvF6W94QAdFIN4SyH2zEtxaUoBk99qpEJnasMO7WNjF8qZeUUU
+IM7HhRkGBSMFFuy4s8EGTLgGxhVjqDCDQIJg1sUUVZgDyyvY4GMUMMaJcUUWZkIhWZcsT5QOkBOW
+yRppBs2zCzv8aDJBCV80CN0eJOBgSSV50DgcLjlsYAEFG3D/0Ag5Q8GYhY9hV3HFyl0vBGNsmNEs
+6n0ME3RPDhMYIIKz+mLXxgAOOKAEFlfM54UIG1wQxCWQtELUw1yM0W92YCCeOEIuX6b0FRGPJxkZ
+CJUyAQUh0KFFdpJNgYUWRhTRBGZtmhEPT/rIqZAgIFaRBcKIZhH57AtFk2iUoA/NGhW+GLSNBwpE
+YMS7xV83HxTEQ7cpGAal0xdffqHTV44LoYOOOupgxzn+B8CIqKMXuCCDjTi1i2KYChdhqA3oUGQ8
+2RWFH/pQxzCSwY58WPAnBWNTzWTFqvkwbB+iMMEE2MAEyUSMadyJAnayMBklTWFSBQHEZcyEHM5g
+gQrbK0g0/yyzJdmQC4cLUQcwAIGw20hmNmDAhTrSo6oVVSgLXBMIP84hjF3g4ou7EMY5PniQeZyj
+GMQQRi+A8R9hCKMYVGrIPtjYCzfqwo1uHNEBs9QFMURQDLvQk1EU9L0kVVEyWSDINnxwgRAwYWzs
+iQISmBYhZ4lnV2Agw55w4UfYWO91QSQIMRjEOMlI4VMJSQcEkdMvMWzhQ7Tp1y4OpAu3YYdGz0FW
+MLYkBqxFzFsCI2M/iCEGhHGBOWAATRcWFRkxmOEcC5mHwUZDG/xwYVD5AIQP+yWbbiJRKNH4kXiw
+V7jy9WMflvBACJpgs+G0pwpMe2JmVsQ4/hHkD8/xjO0EVv8FC6bjObBUzWZQeRBigMc5PvwQbPzY
+mX8hK2nGilgNhaQOQBznQxHEGoqSoRB9CINbpEQZcGITsdX0IpT9mEcTxdBJ23RJHf+60IdYyjjW
+8EJ6QQkEFZAzBSpAQQoAi4wUzCCnUsTAAWlYgqgkSsMqSIFpFNQa7EJjKkFMyHbYuQUVaqUQaABK
+NuL5JkH0EdMVIZIKlRyXGJh2mTHgtJZKihhsRHQOH9FGNbcxkidlQwVeJEQaWGJQbcQwHG4aDFBG
+sidB2KEa19GGpVtqRzg746cf0WZXflwN+YaiD314sLOfzUc+2tFZfbzDEB9owPJeUwUyjGs+NMvd
+downKhn/VuEMCMGFmOaDnylwNSHRMBd4LgQdgg5EHn/gJsBo6CEajqdZYMDZQARxKPFEqhibAWvA
+UoQd1/qRCoo9bmcsGxt6OhZIx+ECR8vWUOi+thi1CZEfk8StbRUTC+u9iShQoQlRvAIVnBjFKQYs
+YFSEYsDNaMYrTtGMU2jCAhD4QBPCgygUGY5NxakCEpY0hS14xpwGCUSS2DSZ0PWze7285XxukwXj
+9oMeP+oX076TIqwhyVybHUjB2DNcwpUXC4MDsiHBYBzbiMFIppLHE5NUHCxESIROrg0ZuCvBLA5k
+HoMLQxNjI65ucvnLrInQH3FKE36o4AIe2EADLkCBDlyA/wMbeIADNoCBCWzAARDQQAcwYIELXAAN
+TliSm9pjHMwwaDgUkyF0QlkbmKVIVFNAqaN2StxmTcG4+7Aoa1oDu/JWspc1qwKI+0G9sKXIM0ga
+g2yVZK5m9YsLvTiINPLDIOzEE4qsXE9tVA2sgszjQ9hjD6lgeWrbdNnJrxGrTPZhAg184AES8DMF
+LjABDgzgARCIwAIgcIEGKGDbDxgAEcaEH+x4gbfgYdrgNGq9y0B1CtI9iCAkWtJPSuG3CPGelpRr
+3FChjDXyKSkJKfPo/PYj2K+DbpvABr/YXC+Tod7TrJ2cYTD84ozC0EVMQUS0XferCmLFsqtpU59i
+NpHEWP8w0ri6fNcT+fUm7zDBAjhwAQzQ3AMcwIABHoCBBhgAAxtYwMwn0AAjKPoyFDMc7Nhku/Y4
+FzM5PgggiLWuZknGggYlrqjmQ9B0HLm8zoVOysywCwS6jjgM0zR7mjVcUbk9O5F6TWyooOx0+KgK
+z7SyvCQYISeL61sEmUdssoTsFWuZ8CCqLhayRKrWkZkm3DABtTFwAZ7H+QERwMACNkCBBdR8AwNo
+A/MQRaOIufMK8lSO0hcPHKZBAXELUtJ6Xoj1cm8hNDS6Qtrxg2oKXiEJZFjH4/MhjPXgW4ehY3uK
+5IoFKIQhgcPicYOyIMIqhDcdGWqIGKBQ4XxGl8yCf63/+/rlxLN19oAOUtX86lOxmzyDAw/wMwda
+cAEDLIAFFziABgSwgAdo4AIVwAaTAQZRkCRcIFXagXoNojtLgiijZhCAcBtugygnphDE4HayMRnI
+gn1bNx+kEgVWgAwdJQwjkjTpZ0WbgQVlgA4Hog/psEAgAmScBh27YBDScAbCFFzlRR6wwTCCRy8o
+UkwAcwbbkw+48CPf0yaNYhPaYAGlA23U9gBS+AALgAEEwH/ftgEgoGhgUz2hcR/bwSbOdSbz8SaZ
+0X4IYVUVdhkpYkGP0jpAxmNVgEq/UG42hjtXMAVLCBGA0Ca4dyJTQAZ6JxDqgB3MwWRmNS0FsQ8Q
+wQ+z/2E9F6JegadWEcRymfR4V0YGsKEciYco4QUT+9BnUwgBUkh5VSh0D6AAcmYAIeAFz8EdWWAh
+k0Fbo7eJ2vFu0ZIEvNBZCXEx70QxtVczVgRPqKRNYlBjFPSJDIFPKUNcoYFSV4I1ziI+0YURCNN4
+6DZqhoJ4EugZyigQdehe7GF9NkEPGVABPgcAA5AABjAA/bcAGoABCoABpJgAaiBVTMM0V/BTE8Q8
+U4CHinKGeWg4/QAMD0gQ1zhOzlIF+FZQE8I84CEZgzIPErQtvDUFwlQQY+BL1NdDt9FrCOEk9bEe
+VmA80BFvEsGImeYhSBJB2MEFuDUQ6kBZSbJ1z6gQwv8wU652jMJwE6pACalACZiACZRgCZIwCZPg
+CDFwAS3gAJ73ACFAC7awB3xgC37AB35gC7rAB33QB3uwKYgkUdwlUTc0k2GAiQJhUWHzJ9qBdRaW
+Ox44KF7nOs+lHTEpEWrnSeMiGXuIEIMljMSCJLJjRsQwIEykZa7iKv+2dtCxH4RoPX8yHyaJBSh5
+EHYHdxYCBn8SazuRRmn0C0ICBwZwARGAAANgANNWc262ZyXwMxxAAg6ABt+hNe7UHsPBBUgggguC
+hhoZgwwyBUtzOAsRDNx1KK0xhwJhIqKygGQzEWtyIrsTlwsBV6txjIlyLgcRDLvZdNXkLCX1XK4D
+G5r/dGVVMAZ+JFxeAGvR9HZcBng5oQ4SVYD6sAwRsGZUeAGeJ20PMG1AJ2cP0ABHoDXwNI5TICMC
+WgWlESqhoYzOsYDZgZELQQzGYS7MQwXaIxAXSCphsCjzoWwOMQbwIRu0GAaDmB6j0ns01JD9AF8A
+N428R1J1KYHSiFPwqWU7SEPfKBCCB0WhkyQDkxPEQAUWQgXKsA8qsAAGoAAZoAB+hgCjKYULUAED
+4I46dwB4YDzZRThfOKBCEgih4VNmYCphsAVNBTC2hpYEcSWh8XdA1n67BEUL6GIOMXXlhTDAgZ0J
+AQy9ZV3wxDD58CGbUQV/8CcJx4b50ZGPKJwC8U/l/3WeC7oQy3JIqzEFIIkTxjQ06JAPz/AM5lAO
+5mAOnCoO9mAP4zCq4XCq01BzBrAGJ2IhlTSOu6gOgjCZkuGhx6h8ZkJVC6Gnn8QFNCIeg/Io+CFS
+2OGhDeEqFWmmrzKcNPIghsQzV8ZSMcYq9IJ6FxKHYMVq0SGTuUN+vEUyCRErtgEonlGZNSEPyfGS
+AEcckYk4cSCFHNAuxRFPSHBbtQINW6CAFXqQ/TB1xCFoEKoQv2BibHgfWPApXhVwBisFWWBwfPhd
+oVMc0HGW00kh4dNkB0JdFOhuD2k48ARPO/NEtoEZG3kgX/Na1CcekqgQyzI4USKB5koTBvUsDQJV
+8v9BqQrhDApAARiAB/GjmcPADvtwDrjwHUsDIjtFsRbjY8zDsFMwRdMDJJhhrRKZnOIhjWsqBS8X
+EZm2nFnwj6AzngoBDIhXXgy5qNCRgk6GH0+UC8WQDv+TD+pAfKuBSbpzIDAVQRsJJEnisAYRKykY
+G1pAQzE7E9qEGUwmmZpVtQlBDyRQc3UQQYBQC7VQBzoADv0QDNEFMGRQoGsrBdsTCEQWITUUGsYq
+ELFCBqO3GlcwLHIZMyAiUZJxBWi6EJnVTQGntAmhueRHQpGWlqSynPUxBQuTEOfAKSCCNeOSBTiV
+Dn5HQ8ZWBX5bEPlwHDSGNT9qE1/Dp5JhJN+xBYL/uBCQwHMxoAr98A4lgHkOQAn94LziQSFPwpnU
+Ah4R87VfKAX8OhDeYz0Y+LGD4jLyRDhQB64QEZlxtSIWBAzPtZDzUSuOuJwUSgXyixDQUGnPcYx4
+KxuZ1XZ9eRB/2pLsEUFgUKk18QtTILswdB9nQgW5ULsCYQo0V3NS4wYN4HM1wA/L8os/JB6BaBB6
+SiPAaVbwphC1wYbEgyK/VTALSEPdmJEDYSS/2FTMuxC74Gk/1iUfPFXs4cL9IAwkdzIgYrISVR+q
+gSKnq6OthDIpkr004TJiZ12wUwVRIAUdfBCOewF3Fgv9QAoD0G0QIA79sAvG8auSMccRKVZXkijw
+/xSR8NSTBRUZ4UNkuIcZyCINxkN9ZjohuFCii4iQo+dkkZlIu2qHjwYGtbK909ggJCx1KiKB2BEG
+jLioq4thNDS9BFG9rWZZ7lkT6ZBd22G0KRIZVkBGcgB/BoAD51Q6GPAAquO84gRPxiMfVKCI+ttU
+9rFpTIMEu2Bl8zAIYwMtNnShqBsijAMF0BsaxJAQ3VypztFUUhsGDBEM6+E6zeostUIMqsJbILLK
+BSENoEFjJ0IGNLpi0EVkYGDLV7amCLNbd1kTeiomEBkt2CEFDa0Qz7ABLTABf9wPhHAAbTYD/KAg
+tgRPKswFI/Jr78SG8TQZggAMvzBvhhbNzRKxjP+bnAWtO+UmBrgQDMQQDdFADMQgCDBDzf1wjIMD
+KfKxrGObanT5JKcsgbMRGrzTuNoEZVoiBibrXE40zyC3ELicyuLCzzDBD3/wzSLFHRJ9Sg5hDyVQ
+AZUnC/2wDA2AARSgAN4wTFIgVVOLGQIqVlbDJgUKKZzxGVDHv8BhITRiGRXWkP/CxNxFrbwlGUJo
+GT2MusEWJdAx1QqxCymCV/cxxfAJGpoIhlPgyAYBDY1daw+ZBWLMiQssBWfcD9U7sUkSbIX7EtJg
+OydCMygioFmgognBCDX3ADaAD+/weQ2ACSlVkzJkznBXBRMcyADjPtTKPJRxGQpokt41H7rna57/
+sSujYt2PSHKo5piElCgKK5jDqXDOyDWR+RrMNR+7kA75sA/7oA7QECr4EToiNC6wYbKQCL3Bi9A6
+OrG0QSrywcYyQT3KYSFsWAWuKM01+BCk8KQGIDU5wAEL4AAhYA/9EAgGQx60VWEnLdjQu5zPYTwz
+Bh20ZRyHEgagMYjncFjyNCFr96J3p6hFja24Jx+3PRDC8M/DFTZcU0ux+1WR3XTAodoUOpKx3L6Y
+MTyj2x6xnQ8LtYOqtrUzESuc+D1i90lTQOAGgb4XwG2s0A86u58U0A0rKt4SEk8drGkSq1asAhpP
+FB9XULSf7ERIANxD9LNxiHRAGDasbdkDyl0r/8YQuzCsFHIbXKUOk3rUKyZXJMcFx3h3ARfV9TIQ
+54Acg2OSkhnb8+Aj8ZEke6ngMDGTizJDtoZsVxcRcYCfG4AD/HAPJECFEzAJKQV1URDhq9Ja1IuE
+bLK3kzF7GAZvhoIogfgdeCpEyuEZnvEnGPYdtvOsSHSr2DEGZhBjFvQLIjxDS4MZB+Kl7VFS6EbO
+cmcGRVsf7x0hJuu9CB67VQ5LhhZBuywTffJVFVKXVUDUDuEMBsABOQfIkOAAGOAAR9MP644FUgAG
+WiMr2FEl/+Q+iJ5uLVIcuPWn2PrFphyuSYNeP1ZCNOJESKQapGIGrgPtDGHC17pqB7IPuYDuMf+o
+oVonIl71Wp0IBs2bSViSVl2tELNt4Ckj1i2xDwt5ta0hoFsABWJ+EPuAAvBoAbo+DRswAZxz19HQ
+8AQY2MQjBX7b6UAVGr5qSU80BS8Hnz9kiduqEMOwVuxBBmUVhylTBUsorpP6agbDELpw1CiierFj
+MRhyXnW7dgWqIcRANNV5ciZLcaA8HlxQx77WI8fGGkTPEumwC5iP+blAILuQC7qAC7nwRU48EIZQ
+AQ9gAC6AD/HwuH6GzC4zBhGo7b2EMAjDz/sgDDYCMB2idLuASvIwjo+IBcBdEPxQDFaVhCNXM7OE
+umFCHJ5EvBakoMZhsNihosRg6jFovdBBggL/cSWu5mTK0byFt3joBfm3rBpk0Blddu9UcQ/hEA/b
+kA1Scw/YwA3bsA3EjxCyo0RmQHJjcEcAka/fQIL68h3cZ5DdQYINHTbMl05XmC5YuIDBAkaMmGLs
+HBI7VyxZsWjJzoU89/DhuV/CiAkLtkvYr13A9KnsF0xMFZ5YrlDBUmWXR4LnxpjZhUsQLkBmAPEj
+qK4LoDFUzYipygUdToL0wIA5OubrVy65uJ5Fm1btWrZt3b6FGxdhXLps86k7p06dwLp9/f4FHFjw
+YMKFDR9GnFjxYsaNHT+GHFnyZMqVLV/GnFnzZs6HoXYGHVr0aNKlTZ9GnVr1atatXb+GHVv2/2za
+tW3fxp1b927evX3/Bh5c+HDixY0fR55c+XLmzZ0/hx5d+nTq1a1fx55d+3bu3b1/Bx9e/Hjy5c2f
+R59e/Xr27d2/hx9f/nz69e3fx59f/37+/f3/BzBAAQcksEADD0QwQQUXZLBBBx+EMEIJJ6SwQgsv
+xDBDDTfksEMPPwQxRBFHJLFEE09EMUUVV2RRtHgm4CCGbgiyZwUGfACnRd64qWEDDSrAAJ9++Clh
+gxc0wGBG/6xpJRYhySMhBh8w8GEBewZaAQMZbujAA2/44wcSEijYoIQvY6vnlVmujIyfFUiAwYMM
+NHiAnH72KYGDGD3goIYn8xOlggs24KCBFv/sfO2UBhwI4YIcIWvGAQ40iDGGOodslAMMbrjgglT0
+u+cECDTtgAMHPnXtGkIv4OCCBc50bBkMONgAAx8xEGcgFDTQIIZWJ5hEP3c4WIBYGTxQQIjXDHkA
+AgoemOCCHT5rLB4LLvCVh07tvMeEAySglQMFZNGPnlI56MDWDYZ4LcsOWNWgAT8h6+SBDijAgAII
+7NznBA08wFZa/t4ggAMDHjCAgFhc2yeOfDHw9QIX/nTskQEMAHIAblMwAIMGLsCBYvzeMWGAGBo4
+gBXYUsAXAw02wFbkxqDCZ5+G9rGHHzb920cTHIJQkuERGlggTxc2mEHmxciRRZZvwvnmyW//sJkl
+m1mUJoifc4ABBCxcxhBjF4fyIUYXXHCpSReZaMqLrxD3SeGBGFld4AasEYtnhQ3kzmDffu4ptQIO
+LLgB0bGBAYOLKhL/qgpfBtrnnK4VByMMLrjAIoyxxEi8CjOKcbvDfUJ4AAMMOl4g6cfgfhkCDB7Q
+wE57TDDd42JFTqciMcjooguNuOhloHkwX7zyxDH/qgvNsVqep+Cj20YUR745S5trXsF6H21GCQct
+fri5RpZmXiHflFGw2flvbrSR5ZppZNnmFWru4eoeEkq3dQGI7zZsGVpjwIAHNHABIeEpBum6AAYW
+QC6CzMN3YqmIRsIQhpvMI3GaA4PyKDIW/7IsrngYBAMuoLOMBrRKAUNQGiQs8LEYwIog8eDABD4m
+BKyB4gQfu0C0GhAtC7iOhvdAQQcc8IAGuKwBCfjYBmSkkn3kQH8xuIACWGCDb5wiCCfwQQm4lANW
+3I0f4WuaLLAhC2tg4xtlxIbhGiIKJbrqAh5YwMZcRikMVCBYBOnaV8LgQTBIIRkDAURGFheGoBhP
+LBjJCBcqsriNAKIKz2NOPFKQwA1UwAGueIgmMDABKHaABRSDmwUUkMAHYPIhp3jAsyxAJwMYwAIP
+gGUlexQDBuhJbr4aYKc2sIBZPKRfL5ABBw5gOg3kwAHYsiWtGhCDXj4kFCegFaEqUAEKsP+KAu8a
+1Axy1RBndKxUpnuBkO4RQAC+SwGm7Mc5LqKRsWSEgv2IBgYXd5GMGK+eVcACFrKQkcyFAStgIMpy
+MnEBIWqqAjNwyD5M0ClixWthBPlEBw6wgE5VIAbUGgg8RjApmC1glApYAAAGkAADtEoDDBAAAxZg
+AAUogE7/ukAGlKjGO/mAkiy4wAAPUIFiYcBVmoKYoxyCCluZrlP6m6aejLoBktLUDhxggQdekEAh
+1YMElNLfAl7QkF980HiYM0s/dtGFxQWFn/gMQxbQWoUrVGGdFhlLFYTRHDm4agG8kpgaq5FD0+3S
+Uw2JAwUykEDTsYCmzsDWAF/n0Ul84xr/bvTpBSAgAAGwYBbXgATsfMUBCVDUhXciATEXALuVCgEI
+ncopujDwLpURZB9cwpYHAggwXnUAZv/yAJmU1RB+ECK1VL3TCTaggACGrCFiqCc/wYBPsfWja/hM
+Lj57krnGYdC6WVguGZqzAmKNtmMaeNRAtPG6GGpAhrsdSBzgBQFYGuCzpvDp6xQAgQuorh/LUEDp
+Sqc/AZhyHyOYFTFjUAFUEYQbRYLAAjxpAAgoiRnN0tQLXncBGzTEHelqFQemegFX1IwQCHhArSQc
+gxiIjB5AIO4DPsmPUM2qAhqgmDrAgF3N6TOfUhjGQDgHhitgpKxqDcpFqjDBr2SBkJMr/+tNlqMC
+nj5gtA7wG0G0kdPXmc4AdxwIHCBAJ9TG0SGa6CEGWPCAixU4HhugwDGrLAPDaUJ/e+vVX28WgmEq
+sAUNoERDMgHLKrdqYgRpBsxYtVoM7IAg9yAEkviEAQtQgKZDMgUhRoGPe8igZqJgRCgeQozizVhx
++axCjvfRzrcWEtT51ONYNEfkfAY0OSqAgAM69gAHGLYhey1Bp9irgAL3wxAVMAAF9PcAAoR3IJp4
+QJdf18zgaoAFCDCilweC3yFeQAIXMAA6IRcCDWSVWKtoyCkcwKsYIGlShmNGtFxVTQW4MBJ3vcEL
+anUA/v2tA/zTBefGoLkxYGEMVZjCMf/uFAYpEHKeUwhKW+u5kyGToXL+RC5YuNAO5qAAlixogJMx
+YOxllA5mTr5yQ1ZwAWCz13TG7kcmOrBSKC5gAeCGHAkWUE0kqfhPy2ilAg7gKgO09oVwfMCRPGCA
+oPXDFBVowcpnlVeC+I9UD2gBBlxoCgfw4AZ6itGjHRIPD2D0IYCoMVi+EpRQ3wm5Vdhn5dCekX1a
+FwtTaJzxwjCGiyhZOSowt0ddbuxqAGmlLg85QbK0cwD41NYN0aSrODXah4JWfyyQLwz+dHTXYXsB
+Dej1nT5gAIn961XhppMCHYABBfx5IM0AGLEwIAAOUI8gnFjACZDOp9ihZR8ewPcgKQL/1yxs4XH7
+2GMiB1mRffuOnWPJQsSxKxYs2D05bmAp5AWwgMMPpBpy24AB9JcAdhEEBZxfwDCdTNNFwM50lycA
+zO80ApdT9AJQn7xdxayAAWT+HhuAvAJaPvUJQADyLjedm3OVDGiBAXKvNYIYDciADAhA25MBr3OI
+X1A7QEAHdUCcPfqjfKA7DtqdVfMxIxMLyxk7jNCjd1KOfTAYwPOYA1CjKWuBBUAAArgAB8CyflgB
+ncMAAjCAFjgAlNMkDJioASIAZlMoBcO2BJO8pvuR0SIAn8o8hcI2DGgBbGO2fjiFTtG4jjG9fmAG
+nrqrfDlAgiCFcdOAF2ABBay3e+AA/3x7uzBoCEG4iD8CPrIwst/BAjIAiqAgJD06pAmSrjFoDplz
+OSRRII67AApggbtyue5Lr6MaLTFDuYFyFRVrhAFQP8BJoPa7gE8iCFPQH847HQN4wiLRn/MrOlTo
+AO1TPaabNrvKABbIPheqBJ7iE2zhxLOIB7sRhlzIhT9yCFxYrrAaiGAAuAzsAuxCpJ4YO+kqJOMZ
+wXqCpORQKJAqxQt4ATVCrAF4FwVigF4zgbvCNgToGJrKhIOBgAF4gB6ogMaDhxPQHy6jvj+5QsNz
+FQTQtjvhGGezMheSFQmoJZzSgCQciFNggKkygI9hwYbghFlhgRZIAQ4QgDQsFT1QnP8nyAAfMBxH
+ukO3GYMpCIMcywfk0pwsmAKFaxx8Wi5CyicRRDXF8cXlyBLqY0CtwkbtS7a7CoA8I4gUcJmVUiAX
+iEQ3mqi7Qqd9GK7zc7ktNIUOKB1eUQADUL+BuL+OoZskaQhScJkYuKtugzGC6ITzSyCecr2BEAXi
+ygAoer966wdssIY/WK5bYMs3BDUzyAtgGDIwAMnliivo2sNCwpyRpCcg45ytGIjQKY4RcJXKMxI1
+ugai2bJaQQCdbEQF6hSXoalIuIAmXIAtw4Ci7AAk2UyPUkpqxKkY4LWtO4GDMSpeaghPbJVBtDmC
+YAaAUTEF2riGUKEFQMs0U8uB0IX/xHkch9CFIeOCK/gJxpECgduHCLqCfHJOiiADlAwDMhADLvDI
+LEi+GZsxJfuFHEMO2gFAn1oAinGGClCxo3qAXrtBBRoz/aGpQ6imrFop9TNKu3IjFqAWrAQ8/am/
+rUMg0FSAKgSFBALNiymxpmuVZHu/zyMISMipAZI3A9A6lcCFKqAC72wIYNRLLvBALMhL6VKrtIKu
+dgoK7Lon5MGC5soHgEKOfVCBnnS/6rsvBFgABoSAA3AA9OqHb4SdBhgA10G5RzAAnNI+D1jHrhCX
+0RKAXWKB1qzM8JMsnxuId/AAGUASXhGAoiOFnDpDlxsAF2iIadCw1XqAAuhBhXzH/3zRn97sh43A
+gpfEo7TbMb2cguBZUbgLvrKqpyzoN7M6NVWrAsIcAxFCDn6gHQUCv2u8NQIFwgUgAIQaiHgoAT5z
+uQs4FIdwUAVyHdJjtngggQRige6yL6MjJpfhgP5siHg4AZc5Eg1QACnVBGfrFMjbxD/xBFPdzER0
+IUMwnQcAIJ9iU1zQHDgdCLpzTujSp7IAJJTkJ1DrU+qqiGYcSSwwg4EghjCAQOIYAUIkgBcAKYrZ
+hgEAR62yAAB4KFAYgNOZqMy0NId4BFI6gFgzgMYzyjK0AEW8xX7ohIzDgAxov1FEkhZggZUzrn7A
+B4sjLuoboB8ghycxhRg5vwo4p/+GyAELyBcIkAHSY1PEKTuHcCS9rCegqAJcgIpcKKvo5Im/fEaF
+o7Ea04p+yIcqSAlpXNV3ZMAWAKV7jToByEGk24EdeL/7JD0dHQhPcLJiITkMUKMV0E0CqDkddYag
+04AWoAANMIAqxJL4chnT6YFYcIUbcLJWrccadAagcpXaWQVy8IZGmKMmpBT8XAtglIJieAhdWEkf
+c858ugliIB7nBDJUU0ayc8a5GwhhAITl4If7MTwWeEWauoO9OR3qG60NWKVuA8c6eoWHcIdrwQCV
+MgAccAhPwDYBYoEE0LZ3IIHXBMKudIhO6JgMeIEMEKCWOsoFqBXqcxVsaAh6gBn/MdvGa0HazlMg
+CTCARmALQeAcgXOIMcgCykHGuFqHfkgHjODQKogCtcIn5ClB5uNQ7LKZfggDVzuOfkFLl0KAfCUI
+Q/DJBTimSvU/+xwAyXQIT4QdJ+uemxEu0BQCr0MFV6mVC8BayHkEqCs3XgmgTCREl7mA/R0qirpS
+Z+OAZOsVl4IjJWLTfgDGN/265NrTGnseQVAunng4PRQDDFrJPWJRftgFLnC+8V0o02mBElgAnFUJ
+ZiCBqVIABGAABciABLgAAQApD2AgnOgED2iAF/gsyMmBTiFagtCEKIoBVTgLR+iABhgg4uq2BCAA
+AniAhKUhldiEKOI8BECSAOhX/4qSon7dpritgi1Q3oZwpCsw4crppyrwiHkACoyYAp7gHLRbJ2TE
+Luuc2V1AOPE1jm2gFUJcgC+9m33Yh3uwmXxw5Elmi+/likc+i3yIh/TBCe25Bve5BmeYhmmgBm04
+hVLm5ITSBmcIhVM4BWcgBVc2BVE4hVLYhrcQhD3CUII4u8xxTh9zK++0yxFFtX6aMYpQKyoYA3UY
+iHNQuxbeDUqAARYYgkdzhlopLGwTSPXAhRKORpitiL7cJygQg3Sw5IEQBGX0giHjnJVUnCqQAmIo
+CizgnC6gON+ohEGxFRqgKfyCIn6tgC1MDwnsgjNwCGd+xihY5obQB3b4jGgQA/+4ozEfYxxciAa+
+0Idd8LfGuefeUIG9+UwP+GKCOIQAIwAWAKBtTo9gECQ4FQR7AgMqgKR5EIbf5IIxCChi2DcqIMEw
+wIVhcL5zQC4OFQPsgubc0LLZyoAGEIKo4QdnYMrucr8eaI95gK4sOAd9UIcVHkEqMIPPEIaxsy5m
+Zuh80IdzvpNzgMOHYxws6GjeWAQFeAEBciMO4BMWkFj6+kICyDz04AfjK+GyWq6MiIIrULI9YsYs
+IKspMAOgxol8GIZcQOy2SrWgOGrcQCwqi6wBShe/OoBETCCUSw9oMLISvgh/WkaiwAUh6+k55YJq
+fQgLWp64u5y0a77f2AcSaAD/CIiBXXKZOWkoCCAAuXa2C/4OfvgDDu0C6qyc6+1YPCZBLCArEQWL
+KjDo2B7qEWSrVKuCy8YNd8iAZBuzM+QV+dSfFkAARqzqPKqnsXjjYjg+5wSbPQQD2HaIebAcIiOL
+h2M+72YNekALULir/03ALrNclXaPX1CrPZ6CMgidX4ggMHC4ytmnPuYFlVCHOU21Cdo3HsvW3WAG
+BPKpSfGpblMgIDDu8tiHeZgHlQAGfVI7zXErRKKCC4/t5Am7Qcogyx4OeJADBfDRBfAACUaAAXCE
+ALHLY1S1fcscxbFxh5jeY9Ycj+SCOswI/94N8HmEG/AADwgCR8CEcRAQxFGrgxF0RowQxoZIh/bW
+77GjMSzXEcuwy4fDoOTzwG8WHs6Z7a+YcNSG8zinDGhwJw6dOxBaLmItzAkCIeviN/sG9M4YtSqI
+zrGDu7MzbJxwJOQ5bRLd5UfnDHXQiY3Yt6oY1KG4ZGE4pM7Ry5/2dOFA61aH9ViX9Vmn9Vq39VvH
+9VxnjoAAACH/C1NUQVJESVYgNS4wCQGiDgAAXgoAAAA7
+
+--=_6xaiexiy7y80
+Content-Type: image/gif;
+ name="siprp_logo.gif"
+Content-Disposition: attachment;
+ filename="siprp_logo.gif"
+Content-Transfer-Encoding: base64
+
+R0lGODlhUgHeAPAAAAAA/wD//yH5BAEAACAALAAAAABSAd4Ah8IxPcVMVMpiZ850eIF/g4yKjZWU
+l5+eoKmnqrGwsrm4utODh9eRlNqeod6qreK1t8LBw8nIytHQ0dfX2N/e3+bAwunKy+3U1fHd3ubm
+5uzs7PXm5/ju7/Pz8/v3+P39/fwD+wAAAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE
+wDy22L88tqy/PLaAvzy2VL88tii/PLb8vjy20L48tqS+PLZ4vjy2TL48tiC+PLb0vTy2yL08tpy9
+PLZwvTy2RL08thi9PLbsvDy2wLw8tpS8PLZovDy2PLw8thC8PLbkuzy2uLs8toy7PLZguzy2NLs8
+tgi7PLbcujy2sLo8toS6PLZYujy2LLo8tgC6PLbUuTy2qLk8tny5PLZQuTy2JLk8tvi4PLbMuDy2
+oLg8tnS4PLZIuDy2HLg8tvC3PLbEtzy2mLc8tmy3PLZAtzy2FLc8tui2PLa8tjy2kLY8tmS2PLY4
+tjy2DLY8tuC1PLa0tTy2iLU8tly1PLYwtTy2BLU8tti0PLastDy2gLQ8tlS0PLYotDy2/LM8ttCz
+PLakszy2eAj/AEEIHEiwoMGDCBMqXMiwocOHECNKnEixosWLGDNq3Mixo8ePIEOKHEmypMmTKFOq
+XMmypcuXMGPKnEmzps2bOHPq3Mmzp8+fQIMKHUq0qNGjSJMqXcq0qdOnUKNKnUq1qtWrWLNq3cq1
+q9evYMOKHUu2rNmzaNOqXcu2rdu3cOPKnUu3rt27ePPq3cu3r9+/gAMLHkw4LYYLDx40WMCYsYPE
+GDgUnjzTQwUGAgBo3sy5s+YBDSxIpkzapIcLDDyrXs15gIMNpWN35NAgAOvbuAEIqCC7d0ULC3IL
+z91gtO/jCi1kHs4cdwPk0AtiCN68+m0BGKJDd2C9O+4F2bXH/8aw3Lv51QzEk+Z+vv3qAOHVCx7g
+vv7qB/IBbyhvv//m5/nxtYFt/hW42QAB6jWggQx+luBdCzbYIIIPzhWhhBNWGBcHBGIoIYAatkVf
+gQIs0EBiKDJAXYEOhMhWavYx8EB8CXFwWYfuXeBiWhXUF0BxEwHno3E7jsVhewHgdxFt7i1QZFkr
+eqfkRg20x9uTYVlw3gCweVQBjtUFQCSWXPFXXYshcTBidyCSuRUG5l05UpXe0egmVms2F0CXJdFp
+nZN3ZvVAd3um5Gd1dgYqFQfe6ajSocwBqihVg1onp0p5MjfmpE+ZKVx6LoEpHJqcQnWBdQHAdGp1
+ApQaFYzNOf/6Eqy5MXCpq01ZR+pLjOI2QAWjcSArrkqt2hxNlXomgAPGWZCapMQmBWmtNXX2I58X
+1MZZtEt5iluiL9HJgKwbOCAqAOByG1SvzLVak40DcfCAt/+pe5Sxw+1akwWZvmevUckOxydN+Aq3
+6b8+0ZqbuzchivBQ/d4GasPNTfnwT9VZXFPErGl8MU8O4zTtbdB+vNMG1R0sU8C5lWxyTnAem1OP
+kb7cU8zM6YSzcC7bbNPOwulcnc87AZ2b0DITjZPRuCE9XM9Ky8T0bTqx/F3UOYV8k9UkY41TdcPW
+pDBuE3tN07kd50TvfWbbFGXLWTd3a9swjcwahTYVnFu6dLP/xPVtKoc7dN8zTb0adjehfTjhNAkX
+wGs4adlc2YwL/l4DsmKAeU1v5zZ35SwxbWu8DizHcEyGszYw6C61JqeN/Vowk92snc66Swss2+zY
+m9ne0pHN6Xs7S8ZlK5zHK3F82+rDs1Su4qoxnxJ7zfnefPLW4b1S6qx9fn1KklfXJkrA6/l9TNCz
+Nr5Jyt+2/vkq/Z2b7Ci1z5qY8MOUPmvCh2R/9/mDCc3YRJL9eIdyAWTJ2nLDpZBYYH+qSyBMuIeb
+AHjvIryrmQRhQr0DBk4iD4Dgbfi2QZQscDgMIGFDQuie/pVQJSirz24+eBDNidBXL5TJAGXoAAtI
+TyAYeIAD//7HHPzlMCa0Q1JjFkDERh1xJk30kHcu+ETsSdFALqxiS6J4ReG8T4sv4WIX1QfGm4hx
+jJ1BXhmRiMbuUHGNL5FfGz1TKDjC7IZdRKAdb5LBOVpwjz6Zzhw7wwAaAvJdnbsi4g4plC+NcTeM
+BNgJmxS2SBIFNQbSnSWbUgFtmWdZKtwkUjZQAQckUjUlekAlRVkVDLiyAii6gCsNycpa2vKWuMyl
+LnfJy1768pfADKYwh0nMYhrzmGTKgAQigAAEGIAA0IwmAQ7QzAhEIAMdQKZPKKCAZ0rzm+D8ZgEQ
+EAEKYCSc6AQnQyKQzna6M5zjRAAEJKABjWjgnfjEZzMVcP/Nj+Tzn+lsZgLKmU2eZCABAM0nAuhJ
+kYRKc50OjWg4E2BOi2RAohiN5kILmpGMZtQAEKjnTSjgTY+2E6QcdQhGIWrSjCogAxS5aEsxmgCY
+nnOmEjVARWVCUpzi8wA7ZchKF8JOn0oUASl1iEyN6lAE2LQiTI1oASYAkw4gIKr5VIBIFTJUhRQV
+qwmNQESWCtZ/QsAiZU3oAbaqkgwUIK34lMBCupqQr8L1pxAh613daQC2QmSv+SxAUE8iAcC6U6xc
+lShLDevOAvg1IXplLDwHq1LJulMBKVGAZdGJ2ITQFSF23Sw4HduQyIpWmnKNyGnTiVmTUGC13+ws
+Qj57kND/whaapF2IaW/71Mre9ptnJcluRRtczyqWqL8F5wEYMtzVFiCpc03uN1MrkrdKV7YHoa1B
+bJvc1kJWut9c7kPAK83nigQC5MWuQbRbEO4mt7cGaS5s1Wtc8kITASHpgH2LO9vjetW+0TSAQuTr
+XOj2F8AEoOpHNJve6EZ0sQCmbnwRDE3vOhjAAv6IdTFqAAVQwMAZoAAEELBhfNKXIOwliHuTm+GD
+EBi2vkWwhDVSWIw6FSIaYCY++Ztd/9Y1oiceSIh1bFL4Cjmi+F1IBzIQgQOYdMYHTuhCNMDkbpo0
+yRxhMJAtIgGEpjPIAknxQFbcTjAbZAIljaiFCfJicGK5/7RXxah4LwxQHHsZowa2SJoBauaHSMDJ
+4DSzmAVC5i9LRMsOLQBC2vzNNzsE0Q5tiI8dooESJxTKF8lpRzSQgBLzeL2Tru2WD43Rx4KA0dJ0
+9KMxamRQR1oilZZoAjiCaml+msbeFHSotztqiez5n5iu9X0pYul/9nnXDSl0OlucEWFD89YbOaiu
+H4xch/YZITW2touRTBH0qlmo1J5IsfNJa4mueSWDBoGyw3ntg9yT2xNuakyPCu5XTyTODjX1vKUK
+k3SvO9BQhXdBnK3q8Qq8vlKmyL/B2ep9HxzdyFZxryVC73gntOAxBijGURxuiSz8mw2fiLOjeW6U
++Hviqv99uEAIHnB50/mfFfm4NEMuEf1mdK0sObm2G6ryU/e8ITZ3eWLt7XGJ0pziJlVAnkWi87BS
+5N0OnbXFNU6RCUgU2hwnekTunFB9UwTfHlW6ySM+ZpT7WaL0ZflEuA5QBQ894eIm+0S8PVMEUBYk
+TeczRX6dz2D/fMqlrjfcI/LaiDI7I4X3aQG0OpK8G3si2c73toUOEUA79PBRrvNE+I5PqXNk3C01
+gASWnmm5q9vsDEn85Rf9d4R0wPIOxXrWB/8Q2F/aI3THqt094vh8tlsgHYB0Qj0/8NZvF/T59Prs
+Nf8QNGeU9BQJelkLAAHo/9X0MofmtTVAAbZHtOHOPkD/BsZP/vKTPwLep/zbma9bCHD+nxu/SO7T
+euObdhy0hm+m/vffTOSvnvUUZn1hhmT8V4A+hWka4X9MpVOld3+iRmEI6HMIJnsFQWEEgHkcoXp7
+ZQBHt37sh38IhoFHBmBzJmkQOBLzt1dINRG9J113N4LkJYIIR14lGBLpd1e/NxAt+FvxJ4HglVsG
+B2DKl2Wb1YOupnUPSF6Kpls0yIIARoEdIXx7BYSCR3tJKF1UCIDJRXzXR15cWBKRZ1iClXEfeIXJ
+FYFsllxjyHPgVYMnoQG2B1gdCAI7KFoFgIZpeFtfmHLSZYQoqIBRlYU95oC8poZDmIendQAC+HKr
+VXIr/3GDZSWDOoh9yeWHiHhaUFiFp7WGMhF8jLWHy1eGhbhaDDhWv4VzLbdaoFhVEACIOEVzdbiB
+ePhdvyWIQShaCbCILiEBYAdW8ReLkVhTFoWFuliBRTiLNdEB7pdWIQeMPmUA8hQBh1haUlWAvShn
+bHhX1TSHOnFQrvh3zshuMaF2BtF9JpWJRyiKW0EB19hSM6iOErdzL0GO7haHCcWNoUhuZBEB7xdR
+LxiOAAcT9IgQkIhPkph5MGcWGdCO3zaISDiKeieQxicQBflOOUiHhCgWC3llCJmQ/yWPLjGQCWGP
+gcWHVlgWFPCN6LSE6QiPZQeSLSGSCBFr5taFJ1kWcP+YUR2pjx/pdBKpfj0ZUbpoemKhkurkkDcZ
+jz45jxNJEAyJT46IlB5ZFMI4EmGojgAZW+PYlDAolGTIk0VxVbk4Ev3YTjuJTxD2eD95cREhhVn1
+lWh5FHF2hyLxlO50lu+Ulr63lUCpZBjFkowYl0YBduIHEnZpllI5lSC4lCHJlQThliZmgg8ZFNco
+dh1BknyFl3dZbYwZk445ENKXUID5jmBJFAyJjg4RmvCnmYgZlGrJlH3JEJD5TrNIlDvxlAUQAcWY
+EBWZTtCWldJ0kSAhkwwBdf/ngaU5FIdJAIxXERoIUA0HnNEknB9BnAyxnOmEh7apE9h5gaMXER3Q
+m+n/NJr5mJwQ+ZqNGZuph43IKZhhmVAdRgFDyE0etYrSqX18yZZ7x2rtmZdy+VH6pwD6Z5TttHT3
+SQDU6RHWyRBWV3GsiU5I0Z2S9YuUCJMssaAMQaDSZKAZCRQSyljKd6AJ2hEYuhAp+E9RuZ058aGA
+RYEimp9UVxGqCVB5pqI4waJ35YYtqZhmuJdrGaMVMZuH9aDhFKE/aH0v+qOrOYwSRZ4DOJkeioXT
+mKSwqZ8WgZkWmZjuSRTZB1a2qKVb2qORqaQKhRFX+U8YaKM44YmrhYqSCaUv2ZkX+pkJUZbtBGVq
+mhNsallRSaRFypkRWaVAymUctqNhehR7uleFaZJJmBmngZqeVnoRGhpNbvekjWoU/AhXopeNl3p6
+FroSJeoQXTps5emfUOGNUbV7qdipXTqi5aaeEjGp0NRbeSoUGTBiJjVOyKiJPHqePiqoS5oRo0oA
+b1arRcFkI4alAYYACsBQG5FuS2Z+0jqtuxkS03qt5TeND0EB48etIdat4Pqt4tpb2Fqu+CgV16pN
+6rqu7Nqu7vquHxMQACH/C1NUQVJESVYgNS4wCQE+DwAAAwoAAAA7
+
+--=_6xaiexiy7y80--
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pdf/Pdf.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pdf/Pdf.java
new file mode 100644
index 00000000..e02f8c17
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pdf/Pdf.java
@@ -0,0 +1,168 @@
+/*
+ * Pdf.java
+ *
+ * Created on November 13, 2007, 11:33 AM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package pdf;
+
+import analiseacidentestrabalho.Acidentado;
+import analiseacidentestrabalho.AnaliseAcidente;
+import com.lowagie.text.Chunk;
+import com.lowagie.text.Document;
+import com.lowagie.text.Font;
+import com.lowagie.text.FontFactory;
+import com.lowagie.text.Paragraph;
+import com.lowagie.text.Rectangle;
+import com.lowagie.text.pdf.BaseFont;
+import com.lowagie.text.pdf.PdfAction;
+import com.lowagie.text.pdf.PdfPCell;
+import com.lowagie.text.pdf.PdfPTable;
+import com.lowagie.text.pdf.PdfWriter;
+import db.AnalisesDataProvider;
+import java.awt.Color;
+import java.io.FileOutputStream;
+import javax.faces.context.FacesContext;
+
+/**
+ *
+ * @author lluis
+ */
+public class Pdf {
+
+ PdfPCell cell = null;
+ Paragraph p = null;
+ private final static int FONT_SIZE = 5;
+ /** Creates a new instance of Pdf */
+ public Pdf() {
+ }
+
+ public void generatePdf(String folder, AnaliseAcidente a)
+ {
+ PdfPTable table = null;
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ ////HttpServletResponse response = (HttpServletResponse)ctx.getExternalContext().getResponse();
+ Document document = new Document();
+ ////response.setContentType("application/pdf");
+
+ try
+ {
+ ////PdfWriter writer = PdfWriter.getInstance(document, response.getOutputStream());
+ PdfWriter.getInstance(document, new FileOutputStream(folder + "/" + a.getId().toString() + ".pdf"));
+ document.open();
+ //document.add(new Paragraph("Hello World"));
+ //document.add(new Paragraph(new Date().toString()));
+
+ table = createTableEmpresa(a);
+ document.add(table);
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ document.close();
+ }
+
+ private PdfPTable createTableHeader(AnaliseAcidente a)
+ {
+ PdfPTable table = new PdfPTable(3);
+ return table;
+ }
+
+ private PdfPTable createTableEmpresa(AnaliseAcidente a)
+ {
+ String empresa_str = "";
+ String estabelecimento_str = "";
+ String trabalhador_str = "";
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ try
+ {
+ String nome_empresa = adp.getEmpresaNome(a.getEmpresa_id());
+ empresa_str = utils.Utils.unicodeToHTML(nome_empresa);
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ try
+ {
+ estabelecimento_str = adp.getEstabelecimentoNome(a.getEstabelecimento_id());
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ Acidentado ac = null;
+ try
+ {
+ ac = adp.getAcidentado(a.getAcidentado_id());
+ trabalhador_str = ac.getNome();
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ //TableEvents event = new TableEvents();
+
+ float[] widths = { 1f, 4f };
+ PdfPTable table = new PdfPTable(widths);
+ table.getDefaultCell().setBorder(Rectangle.LEFT | Rectangle.RIGHT | Rectangle.TOP | Rectangle.BOTTOM);
+ //PdfPCell cell = new PdfPCell(new Paragraph("header with colspan 3"));
+ //cell.setColspan(3);
+ //table.addCell(cell);
+
+
+
+
+ cell = new PdfPCell(new Paragraph("Empresa:", FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE)));
+ cell.setBorder(Rectangle.NO_BORDER);
+ cell.setBackgroundColor(new Color(102, 133, 151));
+ table.addCell(cell);
+
+ cell = new PdfPCell(new Paragraph(empresa_str, FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE, Font.NORMAL, new Color(255, 255, 255)) ));
+ cell.setBorder(Rectangle.NO_BORDER);
+ cell.setBackgroundColor(new Color(102, 133, 151));
+ table.addCell(cell);
+
+ cell = new PdfPCell(new Paragraph("Estabelecimento:", FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE)));
+ cell.setBorder(Rectangle.NO_BORDER);
+ cell.setBackgroundColor(new Color(102, 133, 151));
+ table.addCell(cell);
+
+ cell = new PdfPCell(new Paragraph(estabelecimento_str, FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE, Font.NORMAL, new Color(255, 255, 255))));
+ cell.setBorder(Rectangle.NO_BORDER);
+ cell.setBackgroundColor(new Color(102, 133, 151));
+ table.addCell(cell);
+
+ cell = new PdfPCell(new Paragraph("Trabalhador:", FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE)));
+ cell.setBorder(Rectangle.NO_BORDER);
+ cell.setBackgroundColor(new Color(102, 133, 151));
+
+ table.addCell(cell);
+
+ cell = new PdfPCell(new Paragraph(trabalhador_str, FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE, Font.NORMAL, new Color(255, 255, 255))));
+ cell.setBorder(Rectangle.NO_BORDER);
+ cell.setBackgroundColor(new Color(102, 133, 151));
+ table.addCell(cell);
+ table.getDefaultCell().setBackgroundColor(new Color(102, 133, 151));
+ table.getDefaultCell().setPadding(0f);
+ table.setSpacingAfter(0f);
+ table.setSpacingBefore(0f);
+ return table;
+ }
+
+ private PdfPTable createTableEmpresaHs(AnaliseAcidente a)
+ {
+ PdfPTable table = new PdfPTable(3);
+ return table;
+ }
+
+
+
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pdf/PdfGenerator.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pdf/PdfGenerator.java
new file mode 100644
index 00000000..cb993b0f
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pdf/PdfGenerator.java
@@ -0,0 +1,592 @@
+package pdf;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.net.URL;
+import java.sql.Time;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Vector;
+
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.output.XMLOutputter;
+
+import analiseacidentestrabalho.Acidentado;
+import analiseacidentestrabalho.AnaliseAcidente;
+import analiseacidentestrabalho.Causa;
+import analiseacidentestrabalho.Estabelecimento;
+import analiseacidentestrabalho.Medida;
+import analiseacidentestrabalho.Recomendacao;
+import analiseacidentestrabalho.Seccao;
+import analiseacidentestrabalho.Utilizador;
+
+import com.evolute.utils.fop.FOPCreator;
+import com.evolute.utils.fop.PDFCreator;
+
+public class PdfGenerator
+{
+ protected final String imagePath;
+ protected final Estabelecimento estabelecimento;
+ protected final Utilizador tecnicoSuperior;
+ protected final Utilizador medico;
+ protected final AnaliseAcidente analiseAcidente;
+ protected final Acidentado acidentado;
+ protected final Seccao seccao;
+ protected final Recomendacao recomendacoes[];
+ protected final Medida medidas[];
+ protected final Causa causa;
+ protected final URL urlSiprp;
+ protected final URL urlAuchan;
+ //protected Vector imagens = new Vector();
+ protected Vector imagens = new Vector();
+
+ public static void main( String args[] )
+ throws Exception
+ {
+ AnaliseAcidente analise = new AnaliseAcidente();
+ analise.setAnalise_nr( "12/3" );
+ byte[] pdf =
+ new PdfGenerator( "/home/fpalma/Desktop",
+ new Estabelecimento(),
+ new Utilizador(),
+ new Utilizador(),
+ analise,
+ new Acidentado(),
+ new Seccao(),
+ new Recomendacao[ 0 ],
+ new Medida[ 0 ],
+ new Causa() ).generatePdf();
+ File pdfFile = new File( "/home/fpalma/Desktop/siprp.pdf" );
+ pdfFile.createNewFile();
+ FileOutputStream fos = new FileOutputStream( pdfFile );
+ fos.write( pdf );
+ fos.close();
+ System.out.println( "DONE" );
+ }
+
+ public PdfGenerator(
+ String imagePath,
+ Estabelecimento estabelecimento,
+ Utilizador tecnicoSuperior,
+ Utilizador medico,
+ AnaliseAcidente analiseAcidente,
+ Acidentado acidentado,
+ Seccao seccao,
+ Recomendacao recomendacoes[],
+ Medida medidas[],
+ Causa causa )
+ {
+ this.imagePath = imagePath;
+ this.estabelecimento = estabelecimento;
+ this.tecnicoSuperior = tecnicoSuperior;
+ this.medico = medico;
+ this.analiseAcidente = analiseAcidente;
+ this.acidentado = acidentado;
+ this.seccao = seccao;
+ this.recomendacoes = recomendacoes;
+ this.medidas = medidas;
+ this.causa = causa;
+ this.urlSiprp = getClass().getResource( "siprp_logo.gif" );
+ this.urlAuchan = getClass().getResource( "auchan_logo.gif" );
+ carregarURLs();
+ }
+
+ protected void carregarURLs()
+ {
+ String fullPath =
+ imagePath + "/" +
+ analiseAcidente.getAnalise_nr().substring(0,2) +
+ analiseAcidente.getAnalise_nr().substring(3);
+ File dir = null;
+ try
+ {
+ dir = new File( fullPath );
+
+ if( dir == null || !dir.exists() || !dir.isDirectory() )
+ {
+
+ return;
+ }
+ File files[] = dir.listFiles();
+ for( int f = 0; f < files.length; f++ )
+ {
+ imagens.add( files[ f ].toURI().toURL() );
+ }
+ }
+ catch( Exception ex )
+ {
+ return;
+ }
+ }
+
+ public byte[] generatePdf()
+ throws Exception
+ {
+ Document doc = new Document( createXml() );
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ new XMLOutputter().output( doc, baos );
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ InputStream xmlIn = new ByteArrayInputStream( baos.toByteArray() );
+ InputStream xslStream = getClass().getClassLoader().getResourceAsStream( "pdf/analise_acidentes_trabalho.xsl" );
+ FOPCreator.getFOPCreator().createFOfromXML( xmlIn, xslStream, out );
+ return PDFCreator.getPDFCreator().createPdfFromFo( out.toByteArray() );
+ }
+
+ protected Element createXml()
+ {
+ Element rootElement = new Element( "AnaliseAcidente" );
+ Element logoTipoSIPRPElement = new Element( "LogotipoSIPRP" );
+ logoTipoSIPRPElement.setText( urlSiprp.toString() );
+ rootElement.addContent( logoTipoSIPRPElement );
+ Element logoTipoAuchanElement = new Element( "LogotipoAuchan" );
+ logoTipoAuchanElement.setText( urlAuchan.toString() );
+ rootElement.addContent( logoTipoAuchanElement );
+ Element numeroElement = new Element( "Numero" );
+ numeroElement.setText( analiseAcidente.getAnalise_nr() );
+ rootElement.addContent( numeroElement );
+ Date data = analiseAcidente.getData_acidente();
+ rootElement.addContent( createDataElement( "Data", data ) );
+ rootElement.addContent( createEntidadeEmpregadoraElement() );
+ rootElement.addContent( createSeguroElement() );
+ rootElement.addContent( createEmpresaSHSTElement() );
+ rootElement.addContent( createAcidentadoElement() );
+ rootElement.addContent( createAcidenteElement() );
+ rootElement.addContent( createRecomendacoesSIPRPElement() );
+ rootElement.addContent( createMedidasElement() );
+ rootElement.addContent( createTomadaConhecimentoElement() );
+ return rootElement;
+ }
+
+ protected Element createEntidadeEmpregadoraElement()
+ {
+ Element entidadeEmpregadoraElement = new Element( "EntidadeEmpregadora" );
+ Element identificacaoElement = new Element( "IdentificacaoCompleta" );
+ identificacaoElement.setText( "Companhia Portuguesa de Hipermercados, S.A., com sede na Travessa Teixeira J\u00fanior, 1 - 1300-553 Lisboa" );
+ entidadeEmpregadoraElement.addContent( identificacaoElement );
+ Element actividadeElement = new Element( "Actividade" );
+ actividadeElement.setText( "Com\u00e9rcio a Retalho em Supermercados e Hipermercados" );
+ entidadeEmpregadoraElement.addContent( actividadeElement );
+ Element lojaElement = new Element( "Loja" );
+ lojaElement.setText( estabelecimento.getNome() );
+ entidadeEmpregadoraElement.addContent( lojaElement );
+ return entidadeEmpregadoraElement;
+ }
+
+ protected Element createSeguroElement()
+ {
+ Element seguroElement = new Element( "Seguro" );
+ Element empresaElement = new Element( "Empresa" );
+ empresaElement.setText( "Mapfre Seguros Gerais, S.A." );
+ seguroElement.addContent( empresaElement );
+ Element apoliceElement = new Element( "Apolice" );
+ apoliceElement.setText( "1500591100500" );
+ seguroElement.addContent( apoliceElement );
+ return seguroElement;
+ }
+
+ protected Element createEmpresaSHSTElement()
+ {
+ Element empresaSHSTElement = new Element( "EmpresaSHST" );
+ Element identificacaoElement = new Element( "IdentificacaoCompleta" );
+ identificacaoElement.setText(
+ "SIPRP - Sociedade Ib\u00e9rica de Preven\u00e7\u00e3o de Riscos Profissionais Lda., "
+ + "com sede no Edif\u00edcio Atrium Saldanha, Pra\u00e7a Duque de Saldanha, 1 - 9\u00ba G"
+ + " - 1050-094 Lisboa " );
+ empresaSHSTElement.addContent( identificacaoElement );
+ Element tecnicoSuperiorHSTElement = new Element( "TecnicoSuperiorHST" );
+
+ Element nomeTecnicoSuperiorHSTElement = new Element( "Nome" );
+ nomeTecnicoSuperiorHSTElement.setText( tecnicoSuperior.getNome() );
+ tecnicoSuperiorHSTElement.addContent( nomeTecnicoSuperiorHSTElement );
+ Element capElement = new Element( "CAP" );
+ capElement.setText( tecnicoSuperior.getCap() );
+ tecnicoSuperiorHSTElement.addContent( capElement );
+ empresaSHSTElement.addContent( tecnicoSuperiorHSTElement );
+ Element medicoTrabalhoElement = new Element( "MedicoTrabalho" );
+ Element nomeMedicoTrabalhoElement = new Element( "Nome" );
+ nomeMedicoTrabalhoElement.setText( medico.getNome() );
+ medicoTrabalhoElement.addContent( nomeMedicoTrabalhoElement );
+ Element cedulaElement = new Element( "Cedula" );
+ cedulaElement.setText( medico.getNumero_cedula() );
+ medicoTrabalhoElement.addContent( cedulaElement );
+ empresaSHSTElement.addContent( medicoTrabalhoElement );
+ return empresaSHSTElement;
+ }
+
+ protected Element createAcidentadoElement()
+ {
+ Element acidentadoElement = new Element( "Acidentado" );
+ Element nomeElement = new Element( "Nome" );
+ nomeElement.setText( acidentado.getNome() );
+ acidentadoElement.addContent( nomeElement );
+ Element estabelecimentoOrigemElement = new Element( "EstabelecimentoOrigem" );
+ Element nomeEstabelecimentoOrigemElement = new Element( "Nome" );
+ nomeEstabelecimentoOrigemElement.setText( acidentado.getEstabelecimento_origem() );
+ estabelecimentoOrigemElement.addContent( nomeEstabelecimentoOrigemElement );
+ acidentadoElement.addContent( estabelecimentoOrigemElement );
+ Date dataNascimento = acidentado.getData_nascimento();
+ acidentadoElement.addContent( createDataElement( "DataNascimento", dataNascimento ) );
+ Element biElement = new Element( "BilheteIdentidade" );
+ Element numeroBiElement = new Element( "Numero" );
+ numeroBiElement.setText( acidentado.getBilhete_identidade() );
+ biElement.addContent( numeroBiElement );
+ acidentadoElement.addContent( biElement );
+ Element moradaElement = new Element( "Morada" );
+ moradaElement.setText( acidentado.getMorada() + ", " + acidentado.getCod_postal() + " " + acidentado.getLocalidade() );
+ acidentadoElement.addContent( moradaElement );
+ Element telefoneElement = new Element( "Telefone" );
+ telefoneElement.setText( acidentado.getContacto_telefonico() );
+ acidentadoElement.addContent( telefoneElement );
+ Date dataAdmissao = acidentado.getData_admissao();
+ acidentadoElement.addContent( createDataElement( "DataAdmissao", dataAdmissao ) );
+ Element funcaoElement = new Element( "Funcao" );
+ funcaoElement.setText( acidentado.getFuncao() );
+ acidentadoElement.addContent( funcaoElement );
+ Element turnoElement = new Element( "Turno" );
+ String turno = acidentado.getTurno();
+ if( "m".equals( turno ) )
+ {
+ turno = "Manh\u00e3";
+ }
+ else if( "t".equals( turno ) )
+ {
+ turno = "Tarde";
+ }
+ else if( "n".equals( turno ) )
+ {
+ turno = "Noite";
+ }
+ turnoElement.setText( turno );
+ acidentadoElement.addContent( turnoElement );
+ Element superiorElement = new Element( "Superior" );
+ Element nomeSuperiorElement = new Element( "Nome" );
+ nomeSuperiorElement.setText( acidentado.getNome_superior_hierarquico() );
+ superiorElement.addContent( nomeSuperiorElement );
+ Element emailSuperiorElement = new Element( "Email" );
+ emailSuperiorElement.setText( acidentado.getEmail_superior_hierarquico() );
+ superiorElement.addContent( emailSuperiorElement );
+ acidentadoElement.addContent( superiorElement );
+ return acidentadoElement;
+ }
+
+ protected Element createAcidenteElement()
+ {
+ Element acidenteElement = new Element( "Acidente" );
+ Element averiguadorElement = new Element( "Averiguador" );
+ Element nomeAveriguadorElement = new Element( "Nome" );
+ nomeAveriguadorElement.setText( analiseAcidente.getAveriguador() );
+ averiguadorElement.addContent( nomeAveriguadorElement );
+ acidenteElement.addContent( averiguadorElement );
+ Date dataOcorrencia = analiseAcidente.getData_acidente();
+ acidenteElement.addContent( createDataElement( "DataOcorrencia", dataOcorrencia ) );
+ Time horaOcorrencia = analiseAcidente.getHora_acidente();
+ acidenteElement.addContent( createHoraElement( "HoraOcorrencia", horaOcorrencia ) );
+ Element horasTrabalhadasElement = new Element( "HorasTrabalhadas" );
+ horasTrabalhadasElement.setText( "" + analiseAcidente.getHoras_turno() );
+ acidenteElement.addContent( horasTrabalhadasElement );
+ Element localElement = new Element( "Local" );
+ Element seccaoElement = new Element( "Seccao" );
+ seccaoElement.setText( seccao.getDescricao() );
+ localElement.addContent( seccaoElement );
+ Element localEspecificoElement = new Element( "LocalEspecifico" );
+ localEspecificoElement.setText( analiseAcidente.getLocal_trabalho() );
+ localElement.addContent( localEspecificoElement );
+ acidenteElement.addContent( localElement );
+ Element actividadeElement = new Element( "Actividade" );
+ Element descricaoActividadeElement = new Element( "Descricao" );
+ descricaoActividadeElement.setText( analiseAcidente.getTarefa() );
+ actividadeElement.addContent( descricaoActividadeElement );
+ Element objectosActividadeElement = new Element( "Objectos" );
+ objectosActividadeElement.setText( analiseAcidente.getSubstancias() );
+ actividadeElement.addContent( objectosActividadeElement );
+ Element condicoesActividadeElement = new Element( "Condicoes" );
+ condicoesActividadeElement.setText( analiseAcidente.getCondicoes() );
+ actividadeElement.addContent( condicoesActividadeElement );
+ acidenteElement.addContent( actividadeElement );
+ Element testemunhasElement = new Element( "Testemunhas" );
+ testemunhasElement.setText( analiseAcidente.getTestemunhas() );
+ acidenteElement.addContent( testemunhasElement );
+ Element causasElement = new Element( "Causas" );
+ causasElement.setText( causa.getCausa() );
+ acidenteElement.addContent( causasElement );
+ Element descricaoElement = new Element( "Descricao" );
+ descricaoElement.setText( analiseAcidente.getDescricao() );
+ acidenteElement.addContent( descricaoElement );
+ Element imagensElement = new Element( "Imagens" );
+ if( imagens.size() > 0 )
+ {
+ Element temImagensElement = new Element( "TemImagens" );
+ temImagensElement.setText( "y" );
+ imagensElement.addContent( temImagensElement );
+ for( int i = 0; i < imagens.size(); i++ )
+ {
+ String imagem = imagens.get( i ).toString();
+ Element imagemElement = new Element( "Imagem" );
+ imagemElement.setText( imagem );
+ imagensElement.addContent( imagemElement );
+ }
+ }
+ acidenteElement.addContent( imagensElement );
+ Element conclusoesElement = new Element( "Conclusoes" );
+ conclusoesElement.setText( analiseAcidente.getConclusoes() );
+ acidenteElement.addContent( conclusoesElement );
+ Element accoesTomadasElement = new Element( "AccoesTomadas" );
+ accoesTomadasElement.setText( analiseAcidente.getAccoes() );
+ acidenteElement.addContent( accoesTomadasElement );
+ Element formacaoSHSTElement = new Element( "FormacaoSHST" );
+ Element teveFormacaoSHSTElement = new Element( "TeveFormacao" );
+ teveFormacaoSHSTElement.setText( analiseAcidente.getFormacao_shst() );
+ formacaoSHSTElement.addContent( teveFormacaoSHSTElement );
+ Element motivoFormacaoSHSTElement = new Element( "Motivo" );
+ motivoFormacaoSHSTElement.setText( analiseAcidente.getFormacao_shst_nao_porque() );
+ formacaoSHSTElement.addContent( motivoFormacaoSHSTElement );
+ acidenteElement.addContent( formacaoSHSTElement );
+ Element outrasOcorrenciasMesmoPostoElement = new Element( "OutrasOcorrenciasMesmoPosto" );
+ Element quantidadeOutrasOcorrenciasMesmoPostoElement = new Element( "Quantidade" );
+ boolean outrasOcorrenciasMesmoPosto = "y".equals( analiseAcidente.getOutros_acidentes_com_colaborador() );
+ quantidadeOutrasOcorrenciasMesmoPostoElement.setText(
+ outrasOcorrenciasMesmoPosto ? "" + analiseAcidente.getNr_acidentes_com_colaborador() : "0" );
+ outrasOcorrenciasMesmoPostoElement.addContent( quantidadeOutrasOcorrenciasMesmoPostoElement );
+ Element relatoriosOutrasOcorrenciasMesmoPostoElement = new Element( "Relatorios" );
+ Integer relatorioMesmoPosto1 = analiseAcidente.getNr_relatorio_acidente_colaborador1();
+ Integer relatorioMesmoPosto2 = analiseAcidente.getNr_relatorio_acidente_colaborador2();
+ Integer relatorioMesmoPosto3 = analiseAcidente.getNr_relatorio_acidente_colaborador3();
+ Integer relatorioMesmoPosto4 = analiseAcidente.getNr_relatorio_acidente_colaborador4();
+ String numerosRelatoriosOutrasOcorrenciasMesmoPosto[] =
+ new String[]{
+ relatorioMesmoPosto1 != null ? "" + relatorioMesmoPosto1 : null,
+ relatorioMesmoPosto2 != null ? "" + relatorioMesmoPosto2 : null,
+ relatorioMesmoPosto3 != null ? "" + relatorioMesmoPosto3 : null,
+ relatorioMesmoPosto4 != null ? "" + relatorioMesmoPosto4 : null
+ };
+ for( int r = 0; r < numerosRelatoriosOutrasOcorrenciasMesmoPosto.length; r++ )
+ {
+ if( numerosRelatoriosOutrasOcorrenciasMesmoPosto[ r ] == null )
+ {
+ continue;
+ }
+ String numeroRelatorio = numerosRelatoriosOutrasOcorrenciasMesmoPosto[ r ];
+ Element relatorioElement = new Element( "Relatorio" );
+ relatorioElement.setText( numeroRelatorio );
+ relatoriosOutrasOcorrenciasMesmoPostoElement.addContent( relatorioElement );
+ }
+ outrasOcorrenciasMesmoPostoElement.addContent( relatoriosOutrasOcorrenciasMesmoPostoElement );
+ acidenteElement.addContent( outrasOcorrenciasMesmoPostoElement );
+ Element outrasOcorrenciasOutrosTrabalhadoresElement = new Element( "OutrasOcorrenciasOutrosTrabalhadores" );
+ Element quantidadeOutrasOcorrenciasOutrosTrabalhadoresElement = new Element( "Quantidade" );
+ boolean outrasOcorrenciasOutrosTrabalhadores = "y".equals( analiseAcidente.getAcidentes_outros_colaboradores() );
+ quantidadeOutrasOcorrenciasOutrosTrabalhadoresElement.setText(
+ outrasOcorrenciasOutrosTrabalhadores ? "" + analiseAcidente.getNr_acidentes_outros_colaboradores() : "0" );
+ outrasOcorrenciasOutrosTrabalhadoresElement.addContent( quantidadeOutrasOcorrenciasOutrosTrabalhadoresElement );
+ Element relatoriosOutrasOcorrenciasOutrosTrabalhadoresElement = new Element( "Relatorios" );
+ Integer relatorioOtrosTrabalhadores1 = analiseAcidente.getNr_relatorio_acidente_outros_colaboradores1();
+ Integer relatorioOtrosTrabalhadores2 = analiseAcidente.getNr_relatorio_acidente_outros_colaboradores2();
+ Integer relatorioOtrosTrabalhadores3 = analiseAcidente.getNr_relatorio_acidente_outros_colaboradores3();
+ Integer relatorioOtrosTrabalhadores4 = analiseAcidente.getNr_relatorio_acidente_outros_colaboradores4();
+ String numerosRelatoriosOutrasOcorrenciasOutrosTrabalhadores[] =
+ new String[]{
+ relatorioOtrosTrabalhadores1 != null ? "" + relatorioOtrosTrabalhadores1 : null,
+ relatorioOtrosTrabalhadores2 != null ? "" + relatorioOtrosTrabalhadores2 : null,
+ relatorioOtrosTrabalhadores3 != null ? "" + relatorioOtrosTrabalhadores3 : null,
+ relatorioOtrosTrabalhadores4 != null ? "" + relatorioOtrosTrabalhadores4 : null
+ };
+ for( int r = 0; r < numerosRelatoriosOutrasOcorrenciasOutrosTrabalhadores.length; r++ )
+ {
+ if( numerosRelatoriosOutrasOcorrenciasOutrosTrabalhadores[ r ] == null )
+ {
+ continue;
+ }
+ String numeroRelatorio = numerosRelatoriosOutrasOcorrenciasOutrosTrabalhadores[ r ];
+ Element relatorioElement = new Element( "Relatorio" );
+ relatorioElement.setText( numeroRelatorio );
+ relatoriosOutrasOcorrenciasOutrosTrabalhadoresElement.addContent( relatorioElement );
+ }
+ outrasOcorrenciasOutrosTrabalhadoresElement.addContent( relatoriosOutrasOcorrenciasOutrosTrabalhadoresElement );
+ acidenteElement.addContent( outrasOcorrenciasOutrosTrabalhadoresElement );
+ Element lesaoElement = new Element( "Lesao" );
+ Element areasLesaoElement = new Element( "Areas" );
+ boolean cabeca = "y".equals( analiseAcidente.getLesao_cabeca() );
+ boolean pescoco = "y".equals( analiseAcidente.getLesao_pescoco() );
+ boolean tronco = "y".equals( analiseAcidente.getLesao_tronco() );
+ boolean superiorDireito = "y".equals( analiseAcidente.getLesao_membro_sup_dir() );
+ String detalheSuperiorDireito = analiseAcidente.getEspecif1();
+ boolean superiorEsquerdo = "y".equals( analiseAcidente.getLesao_membro_sup_esq() );
+ String detalheSuperiorEsquerdo = analiseAcidente.getEspecif2();
+ boolean inferiorDireito = "y".equals( analiseAcidente.getLesao_membro_inf_dir() );
+ String detalheInferiorDireito = analiseAcidente.getEspecif3();
+ boolean inferiorEsquerdo = "y".equals( analiseAcidente.getLesao_membro_inf_esq() );
+ String detalheInferiorEsquerdo = analiseAcidente.getEspecif4();
+ String areasLesao[][] =
+ new String[][]{
+ cabeca ? new String[] { "Cabe\u00e7a", "" } : null,
+ pescoco ? new String[] { "Pesco\u00e7o", "" } : null,
+ tronco ? new String[] { "Tronco", "" } : null,
+ superiorDireito ? new String[] { "Membro Superior Direito", detalheSuperiorDireito } : null,
+ superiorEsquerdo ? new String[] { "Membro Superior Esquerdo", detalheSuperiorEsquerdo } : null,
+ inferiorDireito ? new String[] { "Membro Inferior Direito", detalheInferiorDireito } : null,
+ inferiorEsquerdo ? new String[] { "Membro Inferior Esquerdo", detalheInferiorEsquerdo } : null,
+ };
+ for( int a = 0; a < areasLesao.length; a++ )
+ {
+ if( areasLesao[ a ] == null )
+ {
+ continue;
+ }
+ String area[] = areasLesao[ a ];
+ Element areaLesaoElement = new Element( "Area" );
+ Element nomeAreaLesaoElement = new Element( "Nome" );
+ nomeAreaLesaoElement.setText( area[ 0 ] );
+ areaLesaoElement.addContent( nomeAreaLesaoElement );
+ Element detalheAreaLesaoElement = new Element( "Detalhe" );
+ detalheAreaLesaoElement.setText( area[ 1 ] );
+ areaLesaoElement.addContent( detalheAreaLesaoElement );
+ areasLesaoElement.addContent( areaLesaoElement );
+ }
+ lesaoElement.addContent( areasLesaoElement );
+ Element tipoLesaoElement = new Element( "Tipo" );
+ tipoLesaoElement.setText( analiseAcidente.getTipo_lesao() );
+ lesaoElement.addContent( tipoLesaoElement );
+ acidenteElement.addContent( lesaoElement );
+ Element incapacidadeElement = new Element( "Incapacidade" );
+ Element tipoIncapacidadeElement = new Element( "Tipo" );
+ String tipoIncapacidade = analiseAcidente.getTipo_incapacidade();
+ if( "n".equals( tipoIncapacidade ) )
+ {
+ tipoIncapacidade = "Nenhuma";
+ }
+ else if( "t".equals( tipoIncapacidade ) )
+ {
+ tipoIncapacidade = "Tempor\u00e1ria";
+ }
+ else if( "p".equals( tipoIncapacidade ) )
+ {
+ tipoIncapacidade = "Permanente";
+ }
+ tipoIncapacidadeElement.setText( tipoIncapacidade );
+ incapacidadeElement.addContent( tipoIncapacidadeElement );
+ Element coeficienteIncapacidadeElement = new Element( "Coeficiente" );
+ coeficienteIncapacidadeElement.setText( "" + analiseAcidente.getCoef_incapacidade() );
+ incapacidadeElement.addContent( coeficienteIncapacidadeElement );
+ Date dataAvaliacao = analiseAcidente.getData_aval_incapacidade();
+ incapacidadeElement.addContent( createDataElement( "DataAvaliacao", dataAvaliacao ) );
+ Date dataRevisao = analiseAcidente.getData_rev_incapacidade();
+ incapacidadeElement.addContent( createDataElement( "DataRevisao", dataRevisao ) );
+ Element periodoIncapacidadeElement = new Element( "PeriodoIncapacidade" );
+ Date inicioIncapacidade = analiseAcidente.getPeriodo_incapacidade_de();
+ periodoIncapacidadeElement.addContent( createDataElement( "Inicio", inicioIncapacidade ) );
+ Date fimIncapacidade = analiseAcidente.getPeriodo_incapacidade_a();
+ periodoIncapacidadeElement.addContent( createDataElement( "Fim", fimIncapacidade ) );
+ incapacidadeElement.addContent( periodoIncapacidadeElement );
+ acidenteElement.addContent( incapacidadeElement );
+ return acidenteElement;
+ }
+
+ protected Element createRecomendacoesSIPRPElement()
+ {
+ Element recomendacoesSIPRPElement = new Element( "RecomendacoesSIPRP" );
+ for( int r = 0; r < recomendacoes.length; r++ )
+ {
+ Element recomendacaoElement = new Element( "Recomendacao" );
+ recomendacaoElement.setText( recomendacoes[ r ].getRecomendacao() );
+ recomendacoesSIPRPElement.addContent( recomendacaoElement );
+ }
+
+ return recomendacoesSIPRPElement;
+ }
+
+ protected Element createMedidasElement()
+ {
+ Element medidasElement = new Element( "MedidasAdoptar" );
+ for( int m = 0; m < medidas.length; m++ )
+ {
+ Element medidaElement = new Element( "Medida" );
+ medidaElement.setText( medidas[ m ].getMedida() );
+ medidasElement.addContent( medidaElement );
+ }
+ return medidasElement;
+ }
+
+ protected Element createTomadaConhecimentoElement()
+ {
+ Element tomadaConhecimentoElement = new Element( "TomadaConhecimento" );
+ tomadaConhecimentoElement.addContent(
+ createAssinaturaElement( "DepartamentoSeguranca",
+ analiseAcidente.getAveriguador(),
+ analiseAcidente.getData_inicio_processo() ) );
+ tomadaConhecimentoElement.addContent(
+ createAssinaturaElement( "TecnicoHST",
+ analiseAcidente.getNome_resp_consolidacao(),
+ analiseAcidente.getData_consolidacao() ) );
+ tomadaConhecimentoElement.addContent(
+ createAssinaturaElement( "ResponsavelSeguranca",
+ analiseAcidente.getNome_resp_seg(),
+ analiseAcidente.getData_assinatura_seg() ) );
+ tomadaConhecimentoElement.addContent(
+ createAssinaturaElement( "ResponsavelRH",
+ analiseAcidente.getNome_resp_rh(),
+ analiseAcidente.getData_assinatura_rh() ) );
+ tomadaConhecimentoElement.addContent(
+ createAssinaturaElement( "SuperiorHierarquico",
+ acidentado.getNome_superior_hierarquico(),
+ acidentado.getData_email_superior_hierarquico() ) );
+ return tomadaConhecimentoElement;
+ }
+
+ protected Element createAssinaturaElement( String nome, String nomeStr, Date data )
+ {
+ Element assinaturaElement = new Element( nome );
+ Element nomeElement = new Element( "Nome" );
+ nomeElement.setText( nomeStr );
+ assinaturaElement.addContent( nomeElement );
+ assinaturaElement.addContent( createDataElement( "Data", data ) );
+ return assinaturaElement;
+ }
+
+ protected Element createDataElement( String nome, Date data )
+ {
+ Element dataElement = new Element( nome );
+
+ Element anoElement = new Element( "Ano" );
+ dataElement.addContent( anoElement );
+ Element mesElement = new Element( "Mes" );
+ dataElement.addContent( mesElement );
+ Element diaElement = new Element( "Dia" );
+ dataElement.addContent( diaElement );
+
+ if( data != null )
+ {
+ Calendar cal = Calendar.getInstance();
+ cal.setTime( data );
+ anoElement.setText( "" + cal.get( Calendar.YEAR ) );
+ int mes = cal.get( Calendar.MONTH ) + 1;
+ mesElement.setText( mes > 9 ? ( "" + mes ) : ( "0" + mes ) );
+ int dia = cal.get( Calendar.DAY_OF_MONTH );
+ diaElement.setText( dia > 9 ? ( "" + dia ) : ( "0" + dia ) );
+ }
+
+ return dataElement;
+ }
+
+ protected Element createHoraElement( String nome, Date hora )
+ {
+ Element horaElement = new Element( nome );
+ Element horasElement = new Element( "Horas" );
+ horaElement.addContent( horasElement );
+ Element minutosElement = new Element( "Minutos" );
+ horaElement.addContent( minutosElement );
+ if( hora != null )
+ {
+ Calendar cal = Calendar.getInstance();
+ cal.setTime( hora );
+ int horas = cal.get( Calendar.HOUR_OF_DAY );
+ horasElement.setText( horas > 9 ? ( "" + horas ) : ( "0" + horas ) );
+ int minutos = cal.get( Calendar.MINUTE );
+ minutosElement.setText( minutos > 9 ? ( "" + minutos ) : ( "0" + minutos ) );
+ }
+ return horaElement;
+ }
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pdf/analise_acidentes_trabalho.xsl b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pdf/analise_acidentes_trabalho.xsl
new file mode 100644
index 00000000..49436f02
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pdf/analise_acidentes_trabalho.xsl
@@ -0,0 +1,841 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Página
+
+
+
+ de
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ANÃLISE DE ACIDENTE DE TRABALHO
+
+
+
+
+
+
+
+
+ N.º
+
+
+
+
+
+ DATA:
+
+ /
+
+ /
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ IDENTIFICAÇÃO DA
+ ENTIDADE EMPREGADORA
+
+
+
+
+
+ Identificação
+ completa:
+
+
+
+
+
+
+
+ Actividade desenvolvida:
+
+
+
+
+
+
+
+ Loja:
+
+
+
+
+
+
+
+
+
+
+
+
+ EMPRESA SEGURADORA
+
+
+
+
+
+ Identificação
+ completa:
+
+
+
+
+
+
+
+ Nº de Apólice:
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EMPRESA PRESTADORA DE
+ SERVIÇOS DE
+ SEGURANÇA, HIGIENE E
+ SAÚDE DO TRABALHO
+
+
+
+
+
+ Identificação
+ completa:
+
+
+
+
+
+
+
+ Técnico(a) Superior
+ de HST:
+
+
+
+
+
+ C.A.P. nº:
+
+
+
+
+
+
+
+ Médico(a) do
+ Trabalho:
+
+
+
+
+
+ Cédula Prof. nº:
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ACIDENTADO (A)
+
+
+
+
+
+ Nome:
+
+
+
+
+
+
+
+ Estabelecimento de
+ origem:
+
+
+
+
+
+
+
+ Data Nascimento:
+
+ /
+
+ /
+
+
+
+
+
+
+
+ Bilhete de Identidade
+ N°:
+
+
+
+
+
+
+
+ Morada:
+
+
+
+
+
+
+
+ Contacto
+ telefónico:
+
+
+
+
+
+
+
+ Data admissão:
+
+ /
+
+ /
+
+
+
+
+
+
+
+ Função:
+
+
+
+
+
+
+
+ Turno de Trabalho:
+
+
+
+
+
+
+ Identificação do superior
+ hierárquico/Responsável do
+ posto de trabalho
+
+
+
+
+
+ Nome:
+
+
+
+
+
+ E-mail:
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DADOS DO ACIDENTE DE
+ TRABALHO
+
+
+
+
+
+ Averiguador:
+
+
+
+
+
+
+
+ Data da ocorrência:
+
+ /
+
+ /
+
+
+
+
+
+ Hora do acidente:
+
+ h
+
+ m
+
+
+
+
+
+
+ Nº horas trabalhadas no
+ turno:
+
+
+
+
+
+
+
+ Secção:
+
+
+
+
+
+ Local especÃfico:
+
+
+
+
+
+
+
+ Tarefa/Actividade que se
+ encontrava a realizar:
+
+
+
+
+
+
+
+ Substâncias,
+ equipamentos,
+ ferramentas e objectos
+ utilizados:
+
+
+
+
+
+
+
+ Condições que
+ contribuÃram para o
+ acidente e respectiva
+ explicação da
+ sua existência:
+
+
+
+
+
+
+
+ Testemunhas:
+
+
+
+
+
+
+
+ Causas do acidente:
+
+
+
+
+
+
+
+ Descrição do
+ acidente:
+
+
+
+
+
+
+
+ Fotografia(s) e/ou
+ croqui(s) do local do
+ acidente:
+
+
+ Ver Anexo
+
+
+ Nenhum
+
+
+
+
+
+
+
+
+
+
+
+ Conclusões:
+
+
+
+
+
+
+
+ Acções Imediatas
+ tomadas:
+
+
+
+
+
+
+
+
+
+ O colaborador
+ teve formação em SHST
+
+
+ O colaborador não
+ teve formação em SHST
+
+
+
+
+
+
+ Motivo:
+
+
+
+
+
+
+
+
+
+
+
+ Verificaram-se outras
+ ocorrências/incidências
+ no mesmo posto de
+ trabalho com o
+ colaborador acidentado.
+
+
+ Não se verificaram outras
+ ocorrências/incidências
+ no mesmo posto de
+ trabalho com o
+ colaborador acidentado.
+
+
+
+
+
+
+ Quantidade:
+
+ Relatórios de acidente nº:
+
+
+ ;
+
+
+
+
+
+
+
+
+
+
+
+ Verificaram-se
+ ocorrências/incidentes
+ semelhantes com outros
+ colaboradores.
+
+
+ Não se verificaram
+ ocorrências/incidentes
+ semelhantes com outros
+ colaboradores.
+
+
+
+
+
+
+ Quantidade:
+
+ Relatórios de acidente nº:
+
+
+ ;
+
+
+
+
+
+
+
+
+
+ LESÃO
+
+
+
+
+
+
+ Ãreas corporais
+ especÃficas
+ lesionadas:
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+ Tipo de Lesão:
+
+
+
+
+
+
+
+
+ INCAPACIDADE
+
+
+
+
+
+
+ Tipo de Incapacidade:
+
+
+
+
+
+ Coeficiente de
+ Incapacidade
+
+ %
+
+
+
+
+
+
+ Avaliação de
+ Incapacidade realizada
+ em
+
+ /
+
+ /
+
+
+
+
+
+ Revisão de
+ Incapacidade
+
+ /
+
+ /
+
+
+
+
+
+
+
+ PerÃodo da Incapacidade
+ Temporária: de
+
+ /
+
+ /
+
+ a
+
+ /
+
+ /
+
+
+
+
+
+
+
+
+
+
+
+
+
+ RECOMENDAÇÕES PROPOSTAS
+ pela SIPRP
+
+
+
+
+
+
+
+
+
+ .
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MEDIDAS A ADOPTAR PELA
+ ENTIDADE EMPREGADORA
+
+
+
+
+
+
+
+
+
+
+
+ .
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TOMADA DE CONHECIMENTO /
+ TERMO DE
+ RESPONSABILIDADE
+
+
+
+
+
+
+
+
+ Averiguado por
+
+ (Departamento de Segurança)
+ a
+
+ /
+
+ /
+
+ .
+
+
+ Verificado por
+
+ (Técnico
+ de HST) a
+
+ /
+
+ /
+
+ .
+
+
+ Verificado por
+
+ (Responsável de Segurança) a
+
+ /
+
+ /
+
+ .
+
+
+ Verificado por
+
+ (Responsável de RH) a
+
+ /
+
+ /
+
+ .
+
+
+ Com conhecimento de
+
+ (Superior hierárquico) a
+
+ /
+
+ /
+
+ .
+
+ - processamento informático
+ - acesso autenticado -
+
+
+
+
+
+
+
+
+
+
+
+
+ ANEXO - Imagens
+
+
+
+ Página
+
+
+
+ de
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pdf/auchan_logo.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pdf/auchan_logo.gif
new file mode 100644
index 00000000..92ef1c5b
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pdf/auchan_logo.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pdf/siprp_logo.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pdf/siprp_logo.gif
new file mode 100644
index 00000000..073ad184
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pdf/siprp_logo.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pdf/teste.xml b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pdf/teste.xml
new file mode 100644
index 00000000..de26bcab
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/pdf/teste.xml
@@ -0,0 +1,384 @@
+
+
+
+ 1
+
+
+
+ 2008
+
+
+ 01
+
+
+ 01
+
+
+
+
+ Companhia Portuguesa de Hipermercados, S.A., com sede na Travessa Teixeira
+ Júnior, 1 - 1300-553 Lisboa
+
+
+ Comércio a Retalho em Supermercados e Hipermercados
+
+
+ Jumbo Alfragide
+
+
+
+
+ Mapfre Seguros Gerais, S.A.
+
+
+ 1500591100500
+
+
+
+
+ SIPRP - Sociedade Ibérica de Prevenção de Riscos Profissionais Lda.,
+ com sede no Edifício Atrium Saldanha, Praça Duque de Saldanha, 1 - 9º G
+ - 1050-094 Lisboa
+
+
+
+ Tecnico HST teste
+
+
+ C1A2P3
+
+
+
+
+ Medico Trabalho teste
+
+
+ C123
+
+
+
+
+
+ Trablhador acidentado
+
+
+
+ Jumbo de Alfragide
+
+
+
+
+ 1980
+
+
+ 11
+
+
+ 08
+
+
+
+
+ 1112225585
+
+
+
+ Rua de Cima, 3º dto
+
+
+ 215465981
+
+
+
+ 2004
+
+
+ 10
+
+
+ 01
+
+
+
+ Varredor
+
+
+ Tarde
+
+
+
+ António Pedro
+
+
+ apedro@hotmail.com
+
+
+
+
+
+
+ João António
+
+
+
+
+ 2007
+
+
+ 12
+
+
+ 23
+
+
+
+
+ 12
+
+
+ 35
+
+
+
+ 4
+
+
+
+ Congelados
+
+
+ Corredor Esquerdo
+
+
+
+
+ A varrer
+
+
+ Vassoura
+
+
+ Chão molhado
+
+
+
+ Pedro Silva, Marco Pedro
+
+
+ Sono
+
+
+ Escorregou e caiu
+
+
+
+
+
+
+
+
+ Conclusao sem indicios nenhuns q a suportem
+
+
+ gritar. correr as voltas em panico
+
+
+
+ y
+
+
+
+
+
+
+ 3
+
+
+
+ 3487
+
+
+ 23424
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+ Cabeça
+
+
+
+
+ Tronco
+
+
+
+
+ Membro Superior Direito
+
+
+ Mão
+
+
+
+
+ Grave
+
+
+
+
+ Permanente
+
+
+ 10
+
+
+
+ 2005
+
+
+ 01
+
+
+ 01
+
+
+
+
+ 2007
+
+
+ 01
+
+
+ 01
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ beber mta agua
+
+
+ fazer aerobica
+
+
+
+
+ despedir o trabalhador
+
+
+ lamber sabao
+
+
+
+
+
+ Joao
+
+
+
+ 2007
+
+
+ 01
+
+
+ 01
+
+
+
+
+
+ Pedro
+
+
+
+ 2007
+
+
+ 01
+
+
+ 02
+
+
+
+
+
+ Simao
+
+
+
+ 2007
+
+
+ 01
+
+
+ 03
+
+
+
+
+
+ Rafael
+
+
+
+ 2007
+
+
+ 01
+
+
+ 04
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/phaselistener/MainPhaseListener.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/phaselistener/MainPhaseListener.java
new file mode 100644
index 00000000..9f021f4e
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/phaselistener/MainPhaseListener.java
@@ -0,0 +1,59 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package phaselistener;
+
+import analiseacidentestrabalho.Utilizador;
+import global.Global;
+import javax.faces.application.NavigationHandler;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+import javax.servlet.http.HttpServletRequest;
+import analiseacidentestrabalho.SessionBean1;
+import utils.JSFUtils;
+import utils.Logos;
+
+/**
+ *
+ * @author lluis
+ */
+public class MainPhaseListener implements PhaseListener{
+ private boolean firstEntry = true;
+
+ public void afterPhase(PhaseEvent pe) {
+
+
+ }
+
+ public void beforePhase(PhaseEvent pe) {
+ if(pe.getPhaseId() == PhaseId.RENDER_RESPONSE)
+ {
+ FacesContext fc = pe.getFacesContext();
+ SessionBean1 session = JSFUtils.getSessionBean(fc);
+
+
+ Utilizador u = session.getCurrentUser();
+
+
+ //insert logos
+
+ //Integer empresaId = u.getEmpresa_id();
+ Integer empresaId = new Integer(32);
+ //System.out.println("LOGO EMPRESA ID : " + empresaId.toString());
+ Logos logos = new Logos();
+ String logourl = logos.getLogo(fc, empresaId);
+ //System.out.println("LOGO URL : " + logourl);
+ session.setLogoEmpresaUrl(logourl);
+ }
+ }
+
+ public PhaseId getPhaseId() {
+ return PhaseId.ANY_PHASE;
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/utils/JSFUtils.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/utils/JSFUtils.java
new file mode 100644
index 00000000..a10d6ad0
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/utils/JSFUtils.java
@@ -0,0 +1,138 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package utils;
+
+import analiseacidentestrabalho.SessionBean1;
+import java.util.Iterator;
+import java.util.Map;
+import javax.faces.application.Application;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+/**
+ *
+ * @author lluis
+ */
+public class JSFUtils {
+
+
+// public static SessionBean1 getSessionBean(FacesContext fc)
+// {
+// FacesContext context = fc.getCurrentInstance();
+// SessionBean1 session = (SessionBean1) context.getApplication().getELResolver().getValue(context.getELContext(), null, "SessionBean1");
+// return session;
+// }
+
+ //
+ // isPostBack - JSF 1.1 implementation
+ //
+// public static boolean isPostBack(FacesContext fc)
+// {
+// Map parameterMap = fc.getExternalContext().getRequestParameterMap();
+// if(parameterMap.size() > 0)
+// {
+// return true;
+// }
+// return false;
+// }
+
+ public static SessionBean1 getSessionBean(FacesContext fc)
+ {
+ FacesContext context = fc.getCurrentInstance();
+ //HttpSession session = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(true);
+ //SessionBean1 session = (SessionBean1) context.getApplication().getELResolver().getValue(context.getELContext(), null, "SessionBean1");
+ //SessionBean1 session = (SessionBean1) context.getApplication().;
+
+ final StringBuffer valueBinding = new StringBuffer();
+ valueBinding.append('#');
+ valueBinding.append('{');
+ valueBinding.append("SessionBean1");
+ valueBinding.append('}');
+ SessionBean1 session = (SessionBean1) fc.getApplication().
+ createValueBinding(valueBinding.toString()).getValue(fc);
+ return session;
+ }
+
+ public static boolean isPostBack(FacesContext fc)
+ {
+ Map parameterMap = fc.getExternalContext().getRequestParameterMap();
+
+ if(parameterMap.size() > 0)
+ {
+ Iterator iter = parameterMap.keySet().iterator();
+ while(iter.hasNext())
+ {
+ String par = (String) iter.next();
+ }
+ return true;
+ }
+ return false;
+ }
+
+ //
+ // isPostBack - JSF 1.2 implementation
+ //
+// public static boolean isPostBack12(FacesContext fc)
+// {
+// ResponseStateManager rsm = fc.getRenderKit().getResponseStateManager();
+// if(rsm.isPostback(fc))
+// {
+// return true;
+// }
+// return false;
+// }
+
+ public static void logout(FacesContext fc) throws Exception
+ {
+ ExternalContext ectx = fc.getCurrentInstance().getExternalContext();
+ HttpSession session = (HttpSession) ectx.getSession(false);
+ session.invalidate();
+ }
+
+ public static void navigateTo(FacesContext fc, String outcome)
+ {
+ FacesContext context = fc.getCurrentInstance();
+ Application app = context.getApplication();
+ app.getNavigationHandler().handleNavigation(context, null, outcome);
+ }
+
+ public static void redirect(FacesContext context, String url) throws Exception
+ {
+ HttpServletResponse response = (HttpServletResponse) context.getCurrentInstance().getExternalContext().getResponse();
+ response.sendRedirect(url);
+ context.responseComplete();
+ }
+
+ public static void dispatch(FacesContext context, String url) throws Exception
+ {
+ HttpServletResponse response = (HttpServletResponse) context.getCurrentInstance().getExternalContext().getResponse();
+ HttpServletRequest request = (HttpServletRequest) context.getExternalContext().getRequest();
+ RequestDispatcher rd = request.getRequestDispatcher(url);
+ rd.forward(request, response);
+ }
+
+ public static String getRequestParameter(FacesContext fc, String parameter)
+ {
+ Map parameters = fc.getCurrentInstance().getExternalContext().getRequestParameterMap();
+ return (String) parameters.get(parameter);
+ }
+
+ public static boolean requestHasParameters(FacesContext fc)
+ {
+ int size = fc.getCurrentInstance().getExternalContext().getRequestParameterMap().size();
+ if(size > 0)
+ {
+ return true;
+ }
+ return false;
+ }
+
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/utils/Logos.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/utils/Logos.java
new file mode 100644
index 00000000..ff459e24
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/utils/Logos.java
@@ -0,0 +1,55 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package utils;
+
+import db.AnalisesDataProvider;
+import global.Global;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.OutputStream;
+import javax.faces.context.FacesContext;
+import javax.servlet.ServletContext;
+
+/**
+ *
+ * @author lluis
+ */
+public class Logos {
+
+ public String getLogo(Integer empresaId)
+ {
+ return null;
+ }
+
+ public String getLogo(FacesContext fc, Integer empresaId)
+ {
+ try
+ {
+ //get image from db :
+ AnalisesDataProvider adp = new AnalisesDataProvider();
+ byte[] logo = adp.getLogoByEmpresa(empresaId);
+ int len = logo.length;
+
+ ServletContext context = (ServletContext) fc.getExternalContext().getContext();
+ File logoFolder = new File(context.getRealPath(Global.LOGOS_FOLDER));
+
+ String logoFilename = logoFolder + "/logo_empresa" + empresaId.toString() + ".jpg";
+
+ OutputStream outImej = new FileOutputStream(logoFilename);
+ outImej.write(logo, 0, len);
+ System.out.println("LOGO PATH : " + logoFilename);
+ outImej.close();
+ return Global.LOGOS_FOLDER + "/logo_empresa" + empresaId.toString() + ".jpg";
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ return null;
+ }
+
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/utils/Strings.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/utils/Strings.java
new file mode 100644
index 00000000..1fbfc2d0
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/utils/Strings.java
@@ -0,0 +1,151 @@
+/*
+ * Strings.java
+ *
+ * Created on October 8, 2007, 9:17 AM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package utils;
+
+/**
+ *
+ * @author lluis
+ */
+public class Strings {
+ public static String unicodeToHTML( String text )
+ {
+ if( text == null || text.length() < 6 )
+ {
+ return text;
+ }
+
+ String output = text;
+ output = output.replace( "\\u0009", " " );
+ output = output.replace( "\\u000a", " " );
+
+ output = output.replace( "\\u00a0", " " );
+ output = output.replace( "\\u00aa", "ª" );
+ output = output.replace( "\\u00ba", "º" );
+
+ output = output.replace( "\\u00c0", "À" );
+ output = output.replace( "\\u00c1", "Ã" );
+ output = output.replace( "\\u00c2", "Â" );
+ output = output.replace( "\\u00c3", "Ã" );
+ output = output.replace( "\\u00c7", "Ç" );
+ output = output.replace( "\\u00c8", "È" );
+ output = output.replace( "\\u00c9", "É" );
+
+ output = output.replace( "\\u00ca", "Ê" );
+ output = output.replace( "\\u00cc", "Ì" );
+ output = output.replace( "\\u00cd", "Ã" );
+ output = output.replace( "\\u00ce", "ÃŽ" );
+ output = output.replace( "\\u00d2", "ò" );
+ output = output.replace( "\\u00d3", "ó" );
+ output = output.replace( "\\u00d4", "ô" );
+ output = output.replace( "\\u00d5", "õ" );
+ output = output.replace( "\\u00d9", "Ù" );
+ output = output.replace( "\\u00da", "Ú" );
+ output = output.replace( "\\u00db", "Û" );
+
+ output = output.replace( "\\u00e0", "Ã " );
+ output = output.replace( "\\u00e1", "á" );
+ output = output.replace( "\\u00e2", "â" );
+ output = output.replace( "\\u00e3", "ã" );
+ output = output.replace( "\\u00e7", "ç" );
+ output = output.replace( "\\u00e8", "è" );
+ output = output.replace( "\\u00e9", "é" );
+ output = output.replace( "\\u00ea", "ê" );
+ output = output.replace( "\\u00ec", "ì" );
+ output = output.replace( "\\u00ed", "Ã" );
+ output = output.replace( "\\u00ee", "î" );
+ output = output.replace( "\\u00f2", "ò" );
+ output = output.replace( "\\u00f3", "ó" );
+ output = output.replace( "\\u00f4", "ô" );
+ output = output.replace( "\\u00f5", "õ" );
+ output = output.replace( "\\u00f9", "ù" );
+ output = output.replace( "\\u00fa", "ú" );
+ output = output.replace( "\\u00fb", "û" );
+
+ output = output.replace( "\\u0153", "" );
+
+ output = output.replace( "\\u2013", "-" );
+ output = output.replace( "\\u2014", "-" );
+ output = output.replace( "\\u2018|\\u2019", "'" );
+ output = output.replace( "\\u201c|\\u201d", "\"" );
+
+ output = output.replace( "\\u2022", "*" );
+ output = output.replace( "\\u2026", "..." );
+
+ return output;
+ }
+
+ public static String textToUnicode( String text )
+ {
+ String output = text;
+ output = output.replace( "À", "\\u00c0" );
+ output = output.replace( "Ã", "\\u00c1" );
+ output = output.replace( "Â", "\\u00c2" );
+ output = output.replace( "Ã", "\\u00c3" );
+ output = output.replace( "Ç", "\\u00c7" );
+ output = output.replace( "È", "\\u00c8" );
+ output = output.replace( "É", "\\u00c9" );
+
+ output = output.replace( "Ê", "\\u00ca" );
+ output = output.replace( "Ì", "\\u00cc" );
+ output = output.replace( "Ã", "\\u00cd" );
+ output = output.replace( "ÃŽ", "\\u00ce" );
+ output = output.replace( "ò", "\\u00d2" );
+ output = output.replace( "ó", "\\u00d3" );
+ output = output.replace( "ô", "\\u00d4" );
+ output = output.replace( "õ", "\\u00d5" );
+ output = output.replace( "Ù", "\\u00d9" );
+ output = output.replace( "Ú", "\\u00da" );
+ output = output.replace( "Û", "\\u00db" );
+
+ output = output.replace( "Ã ", "\\u00e0" );
+ output = output.replace( "á", "\\u00e1" );
+ output = output.replace( "â", "\\u00e2" );
+ output = output.replace( "ã", "\\u00e3" );
+ output = output.replace( "ç", "\\u00e7" );
+ output = output.replace( "è", "\\u00e8" );
+ output = output.replace( "é", "\\u00e9" );
+ output = output.replace( "ê", "\\u00ea" );
+ output = output.replace( "ì", "\\u00ec" );
+ output = output.replace( "Ã", "\\u00ed" );
+ output = output.replace( "î", "\\u00ee" );
+ output = output.replace( "ò", "\\u00f2" );
+ output = output.replace( "ó", "\\u00f3" );
+ output = output.replace( "ô", "\\u00f4" );
+ output = output.replace( "õ", "\\u00f5" );
+ output = output.replace( "ù", "\\u00f9" );
+ output = output.replace( "ú", "\\u00fa" );
+ output = output.replace( "û", "\\u00fb" );
+
+ return output;
+ }
+
+ public static String RTFToUnicode( String text )
+ {
+ if( text == null || text.length() < 4 )
+ {
+ return text;
+ }
+ String output = text;
+ output = output.replaceAll( "\\'", "\\u00" );
+ return output;
+ }
+
+ public static String unicodeToRTF( String text )
+ {
+ if( text == null || text.length() < 6 )
+ {
+ return text;
+ }
+ String output = text;
+ output = output.replaceAll( "\\\\u00", "\\\\'" );
+ return output;
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/utils/Utils.java b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/utils/Utils.java
new file mode 100644
index 00000000..6ff0fdb7
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/src/java/utils/Utils.java
@@ -0,0 +1,385 @@
+/*
+ * Utils.java
+ *
+ * Created on October 12, 2007, 9:39 AM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package utils;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+
+/**
+ *
+ * @author lluis
+ */
+public class Utils {
+
+ /** Creates a new instance of Utils */
+ public Utils() {
+ }
+
+ public static String unicodeToHTML( String text )
+ {
+ if( text == null || text.length() < 6 )
+ {
+ return text;
+ }
+
+ String output = text;
+ output = output.replaceAll( "\\\\u0009", " " );
+ output = output.replaceAll( "\\\\u000a", " " );
+
+ output = output.replaceAll( "\\\\u00a0", " " );
+ output = output.replaceAll( "\\\\u00aa", "ª" );
+ output = output.replaceAll( "\\\\u00ba", "º" );
+
+ output = output.replaceAll( "\\\\u00c0", "À" );
+ output = output.replaceAll( "\\\\u00c1", "Ã" );
+ output = output.replaceAll( "\\\\u00c2", "Â" );
+ output = output.replaceAll( "\\\\u00c3", "Ã" );
+ output = output.replaceAll( "\\\\u00c7", "Ç" );
+ output = output.replaceAll( "\\\\u00c8", "È" );
+ output = output.replaceAll( "\\\\u00c9", "É" );
+ output = output.replaceAll( "\\\\u00d3", "Ó" );
+ output = output.replaceAll( "\\\\u00d2", "Ã’" );
+
+ output = output.replaceAll( "\\\\u00ca", "Ê" );
+ output = output.replaceAll( "\\\\u00cc", "Ì" );
+ output = output.replaceAll( "\\\\u00cd", "Ã" );
+ output = output.replaceAll( "\\\\u00ce", "ÃŽ" );
+ output = output.replaceAll( "\\\\u00d2", "ò" );
+ output = output.replaceAll( "\\\\u00d3", "ó" );
+ output = output.replaceAll( "\\\\u00d4", "ô" );
+ output = output.replaceAll( "\\\\u00d5", "õ" );
+ output = output.replaceAll( "\\\\u00d9", "Ù" );
+ output = output.replaceAll( "\\\\u00da", "Ú" );
+ output = output.replaceAll( "\\\\u00db", "Û" );
+
+ output = output.replaceAll( "\\\\u00e0", "Ã " );
+ output = output.replaceAll( "\\\\u00e1", "á" );
+ output = output.replaceAll( "\\\\u00e2", "â" );
+ output = output.replaceAll( "\\\\u00e3", "ã" );
+ output = output.replaceAll( "\\\\u00e7", "ç" );
+ output = output.replaceAll( "\\\\u00e8", "è" );
+ output = output.replaceAll( "\\\\u00e9", "é" );
+ output = output.replaceAll( "\\\\u00ea", "ê" );
+ output = output.replaceAll( "\\\\u00ec", "ì" );
+ output = output.replaceAll( "\\\\u00ed", "Ã" );
+ output = output.replaceAll( "\\\\u00ee", "î" );
+ output = output.replaceAll( "\\\\u00f2", "ò" );
+ output = output.replaceAll( "\\\\u00f3", "ó" );
+ output = output.replaceAll( "\\\\u00f4", "ô" );
+ output = output.replaceAll( "\\\\u00f5", "õ" );
+ output = output.replaceAll( "\\\\u00f9", "ù" );
+ output = output.replaceAll( "\\\\u00fa", "ú" );
+ output = output.replaceAll( "\\\\u00fb", "û" );
+
+ output = output.replaceAll( "\\\\u0153", "" );
+
+ output = output.replaceAll( "\\\\u2013", "-" );
+ output = output.replaceAll( "\\\\u2014", "-" );
+ output = output.replaceAll( "\\\\u2018|\\\\u2019", "'" );
+ output = output.replaceAll( "\\\\u201c|\\\\u201d", "\"" );
+
+ output = output.replaceAll( "\\\\u2022", "*" );
+ output = output.replaceAll( "\\\\u2026", "..." );
+
+ return output;
+ }
+
+ public static String textToUnicode( String text )
+ {
+ String output = text;
+
+ output = output.replaceAll( "À", "\\\\\\\\\\\\\\\\u00c0" );
+ output = output.replaceAll( "Ã", "\\\\\\\\\\\\\\\\u00c1" );
+ output = output.replaceAll( "Â", "\\\\\\\\\\\\\\\\u00c2" );
+ output = output.replaceAll( "Ã", "\\\\\\\\\\\\\\\\u00c3" );
+ output = output.replaceAll( "Ç", "\\\\\\\\\\\\\\\\u00c7" );
+ output = output.replaceAll( "È", "\\\\\\\\\\\\\\\\u00c8" );
+ output = output.replaceAll( "É", "\\\\\\\\\\\\\\\\u00c9" );
+ output = output.replaceAll( "Ó", "\\\\\\\\\\\\\\\\u00d3" );
+ output = output.replaceAll( "Ã’", "\\\\\\\\\\\\\\\\u00d2" );
+
+ output = output.replaceAll( "Ê", "\\\\\\\\\\\\\\\\u00ca" );
+ output = output.replaceAll( "Ì", "\\\\\\\\\\\\\\\\u00cc" );
+ output = output.replaceAll( "Ã", "\\\\\\\\\\\\\\\\u00cd" );
+ output = output.replaceAll( "ÃŽ", "\\\\\\\\\\\\\\\\u00ce" );
+ output = output.replaceAll( "ò", "\\\\\\\\\\\\\\\\u00d2" );
+ output = output.replaceAll( "ó", "\\\\\\\\\\\\\\\\u00d3" );
+ output = output.replaceAll( "ô", "\\\\\\\\\\\\\\\\u00d4" );
+ output = output.replaceAll( "õ", "\\\\\\\\\\\\\\\\u00d5" );
+ output = output.replaceAll( "Ù", "\\\\\\\\\\\\\\\\u00d9" );
+ output = output.replaceAll( "Ú", "\\\\\\\\\\\\\\\\u00da" );
+ output = output.replaceAll( "Û", "\\\\\\\\\\\\\\\\u00db" );
+
+ output = output.replaceAll( "Ã ", "\\\\\\\\\\\\\\\\u00e0" );
+ output = output.replaceAll( "á", "\\\\\\\\\\\\\\\\u00e1" );
+ output = output.replaceAll( "â", "\\\\\\\\\\\\\\\\u00e2" );
+ output = output.replaceAll( "ã", "\\\\\\\\\\\\\\\\u00e3" );
+ output = output.replaceAll( "ç", "\\\\\\\\\\\\\\\\u00e7" );
+ output = output.replaceAll( "è", "\\\\\\\\\\\\\\\\u00e8" );
+ output = output.replaceAll( "é", "\\\\\\\\\\\\\\\\u00e9" );
+ output = output.replaceAll( "ê", "\\\\\\\\\\\\\\\\u00ea" );
+ output = output.replaceAll( "ì", "\\\\\\\\\\\\\\\\u00ec" );
+ output = output.replaceAll( "Ã", "\\\\\\\\\\\\\\\\u00ed" );
+ output = output.replaceAll( "î", "\\\\\\\\\\\\\\\\u00ee" );
+ output = output.replaceAll( "ò", "\\\\\\\\\\\\\\\\u00f2" );
+ output = output.replaceAll( "ó", "\\\\\\\\\\\\\\\\u00f3" );
+ output = output.replaceAll( "ô", "\\\\\\\\\\\\\\\\u00f4" );
+ output = output.replaceAll( "õ", "\\\\\\\\\\\\\\\\u00f5" );
+ output = output.replaceAll( "ù", "\\\\\\\\\\\\\\\\u00f9" );
+ output = output.replaceAll( "ú", "\\\\\\\\\\\\\\\\u00fa" );
+ output = output.replaceAll( "û", "\\\\\\\\\\\\\\\\u00fb" );
+
+ return output;
+ }
+
+ public static String textToHtml( String text )
+ {
+ String output = text;
+
+ output = output.replaceAll( "À", "À" );
+ output = output.replaceAll( "Ã", "Á" );
+ output = output.replaceAll( "Â", "Â" );
+ output = output.replaceAll( "Ã", "Ã" );
+ output = output.replaceAll( "Ç", "Ç" );
+ output = output.replaceAll( "È", "È" );
+ output = output.replaceAll( "É", "É" );
+ output = output.replaceAll( "Ó", "Ó" );
+ output = output.replaceAll( "Ã’", "Ò" );
+
+ output = output.replaceAll( "Ê", "Ê" );
+ output = output.replaceAll( "ÃŒ", "Ì" );
+ output = output.replaceAll( "Ã", "Í" );
+ output = output.replaceAll( "ÃŽ", "Î" );
+ output = output.replaceAll( "ò", "ò" );
+ output = output.replaceAll( "ó", "ó" );
+ output = output.replaceAll( "ô", "ô" );
+ output = output.replaceAll( "õ", "õ" );
+ output = output.replaceAll( "Ù", "Ù" );
+ output = output.replaceAll( "Ú", "Ú" );
+ output = output.replaceAll( "Û", "Û" );
+
+ output = output.replaceAll( "Ã ", "à" );
+ output = output.replaceAll( "á", "á" );
+ output = output.replaceAll( "â", "â" );
+ output = output.replaceAll( "ã", "ã" );
+ output = output.replaceAll( "ç", "ç" );
+ output = output.replaceAll( "è", "è" );
+ output = output.replaceAll( "é", "é" );
+ output = output.replaceAll( "ê", "ê" );
+ output = output.replaceAll( "ì", "ì" );
+ output = output.replaceAll( "Ã", "í" );
+ output = output.replaceAll( "î", "î" );
+ output = output.replaceAll( "ò", "ò" );
+ output = output.replaceAll( "ó", "ó" );
+ output = output.replaceAll( "ô", "ô" );
+ output = output.replaceAll( "õ", "õ" );
+ output = output.replaceAll( "ù", "ù" );
+ output = output.replaceAll( "ú", "ú" );
+ output = output.replaceAll( "û", "û" );
+
+ return output;
+ }
+
+ public static String getPageFrom(String referer)
+ {
+ String pageFrom = referer.substring(referer.lastIndexOf("/")+1);
+ return pageFrom;
+ }
+
+ public static boolean isValidEmail(String email){
+ boolean res = true;
+ System.out.println("IS VALID EMAIL");
+ int indexOfAtChar=email.indexOf("@");
+
+ if(!isValidEmailCharacters(email))
+ {
+ return false;
+ }
+
+ if(indexOfAtChar > 0)
+ {
+ int indexOfDotChar =
+ email.indexOf(".",indexOfAtChar);
+ if(indexOfDotChar > 0)
+ {
+ res = true;
+ }
+ else
+ {
+ res = false;
+ }
+ }
+ else{
+ res = false;
+ }
+ return res;
+ }
+
+ private static boolean isValidEmailCharacters(String email)
+ {
+ if(email.indexOf("Ã ") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("á") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("ã") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("â") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("è") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("é") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("ê") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("ì") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("Ã") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("ò") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("ó") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("ô") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("õ") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("ù") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("ú") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("û") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("ç") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("À") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("Ã") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("Ã") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("Â") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("È") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("É") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("Ê") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("Ì") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("Ã") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("Ã’") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("Ó") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("Ô") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("Õ") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("Ù") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("Ú") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("Û") != -1)
+ {
+ return false;
+ }
+ else if(email.indexOf("Ç") != -1)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ public static String dateToYYYYMMDD(Date ddate)
+ {
+ Calendar cal = new GregorianCalendar();
+ cal.setTime(ddate);
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
+ String date_str = dateFormat.format(cal.getTime());
+ return date_str;
+ }
+
+ public static String timeToHHMM(String ttime) throws Exception
+ {
+ SimpleDateFormat formatter = new SimpleDateFormat("HH:mm");
+ //String s = formatter.format(date);
+ Date date = (Date)formatter.parse(ttime);
+ return formatter.format(date);
+ }
+
+}
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/Acesso.jsp b/branches/SIPRP/AnaliseAcidentesTrabalho/web/Acesso.jsp
new file mode 100644
index 00000000..e2a639ab
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/Acesso.jsp
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/AnaliseAcidenteTrabalho.jsp b/branches/SIPRP/AnaliseAcidentesTrabalho/web/AnaliseAcidenteTrabalho.jsp
new file mode 100644
index 00000000..63b58d41
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/AnaliseAcidenteTrabalho.jsp
@@ -0,0 +1,1490 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/Dummy.jsp b/branches/SIPRP/AnaliseAcidentesTrabalho/web/Dummy.jsp
new file mode 100644
index 00000000..d8921857
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/Dummy.jsp
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/EnviarCorrecao.jsp b/branches/SIPRP/AnaliseAcidentesTrabalho/web/EnviarCorrecao.jsp
new file mode 100644
index 00000000..a01067d1
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/EnviarCorrecao.jsp
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/Erro.jsp b/branches/SIPRP/AnaliseAcidentesTrabalho/web/Erro.jsp
new file mode 100644
index 00000000..de4505dd
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/Erro.jsp
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/FichaUtilizador.jsp b/branches/SIPRP/AnaliseAcidentesTrabalho/web/FichaUtilizador.jsp
new file mode 100644
index 00000000..1875c0c6
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/FichaUtilizador.jsp
@@ -0,0 +1,173 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/Footer.jspf b/branches/SIPRP/AnaliseAcidentesTrabalho/web/Footer.jspf
new file mode 100644
index 00000000..1bf9523a
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/Footer.jspf
@@ -0,0 +1,12 @@
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/FormDirGerRh.jsp b/branches/SIPRP/AnaliseAcidentesTrabalho/web/FormDirGerRh.jsp
new file mode 100644
index 00000000..f0374089
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/FormDirGerRh.jsp
@@ -0,0 +1,249 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/FormDirSiprp.jsp b/branches/SIPRP/AnaliseAcidentesTrabalho/web/FormDirSiprp.jsp
new file mode 100755
index 00000000..b1ffb955
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/FormDirSiprp.jsp
@@ -0,0 +1,254 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/FormGestor.jsp b/branches/SIPRP/AnaliseAcidentesTrabalho/web/FormGestor.jsp
new file mode 100644
index 00000000..6de105cd
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/FormGestor.jsp
@@ -0,0 +1,247 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/FormHS.jsp b/branches/SIPRP/AnaliseAcidentesTrabalho/web/FormHS.jsp
new file mode 100644
index 00000000..cbfdfaeb
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/FormHS.jsp
@@ -0,0 +1,322 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/FormMedico.jsp b/branches/SIPRP/AnaliseAcidentesTrabalho/web/FormMedico.jsp
new file mode 100644
index 00000000..d5bb4e45
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/FormMedico.jsp
@@ -0,0 +1,263 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/FormRH.jsp b/branches/SIPRP/AnaliseAcidentesTrabalho/web/FormRH.jsp
new file mode 100644
index 00000000..18894590
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/FormRH.jsp
@@ -0,0 +1,313 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/FormSeguranca.jsp b/branches/SIPRP/AnaliseAcidentesTrabalho/web/FormSeguranca.jsp
new file mode 100644
index 00000000..12d2db0e
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/FormSeguranca.jsp
@@ -0,0 +1,326 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/GestaoUtilizadores.jsp b/branches/SIPRP/AnaliseAcidentesTrabalho/web/GestaoUtilizadores.jsp
new file mode 100644
index 00000000..df6321c4
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/GestaoUtilizadores.jsp
@@ -0,0 +1,196 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/Header.jspf b/branches/SIPRP/AnaliseAcidentesTrabalho/web/Header.jspf
new file mode 100644
index 00000000..633668bb
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/Header.jspf
@@ -0,0 +1,30 @@
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/LoadImage.jsp b/branches/SIPRP/AnaliseAcidentesTrabalho/web/LoadImage.jsp
new file mode 100644
index 00000000..56ad8634
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/LoadImage.jsp
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/Login.jsp b/branches/SIPRP/AnaliseAcidentesTrabalho/web/Login.jsp
new file mode 100644
index 00000000..b4469c49
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/Login.jsp
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/META-INF/context.xml b/branches/SIPRP/AnaliseAcidentesTrabalho/web/META-INF/context.xml
new file mode 100644
index 00000000..e3929bc2
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/META-INF/context.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/NovoUtilizador.jsp b/branches/SIPRP/AnaliseAcidentesTrabalho/web/NovoUtilizador.jsp
new file mode 100644
index 00000000..d7b19f2d
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/NovoUtilizador.jsp
@@ -0,0 +1,310 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/RecuperarPassword.jsp b/branches/SIPRP/AnaliseAcidentesTrabalho/web/RecuperarPassword.jsp
new file mode 100644
index 00000000..639b924b
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/RecuperarPassword.jsp
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/Top.jspf b/branches/SIPRP/AnaliseAcidentesTrabalho/web/Top.jspf
new file mode 100644
index 00000000..a35f7542
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/Top.jspf
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/UtilizadorFields.jsp b/branches/SIPRP/AnaliseAcidentesTrabalho/web/UtilizadorFields.jsp
new file mode 100644
index 00000000..33783e37
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/UtilizadorFields.jsp
@@ -0,0 +1,185 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/ViewAnaliseAcidenteTrabalho.jsp b/branches/SIPRP/AnaliseAcidentesTrabalho/web/ViewAnaliseAcidenteTrabalho.jsp
new file mode 100644
index 00000000..3baf64e0
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/ViewAnaliseAcidenteTrabalho.jsp
@@ -0,0 +1,485 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/WEB-INF/faces-config.xml b/branches/SIPRP/AnaliseAcidentesTrabalho/web/WEB-INF/faces-config.xml
new file mode 100644
index 00000000..e4348f99
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/WEB-INF/faces-config.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+ phaselistener.MainPhaseListener
+
+
+ Acesso
+ analiseacidentestrabalho.Acesso
+ request
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/WEB-INF/managed-beans.xml b/branches/SIPRP/AnaliseAcidentesTrabalho/web/WEB-INF/managed-beans.xml
new file mode 100644
index 00000000..beec62ad
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/WEB-INF/managed-beans.xml
@@ -0,0 +1,130 @@
+
+
+
+
+ SessionBean1
+ analiseacidentestrabalho.SessionBean1
+ session
+
+
+ Login
+ analiseacidentestrabalho.Login
+ request
+
+
+ ApplicationBean1
+ analiseacidentestrabalho.ApplicationBean1
+ application
+
+
+ RequestBean1
+ analiseacidentestrabalho.RequestBean1
+ request
+
+
+ RecuperarPassword
+ analiseacidentestrabalho.RecuperarPassword
+ request
+
+
+ Header
+ analiseacidentestrabalho.Header
+ request
+
+
+ Dummy
+ analiseacidentestrabalho.Dummy
+ request
+
+
+ Footer
+ analiseacidentestrabalho.Footer
+ request
+
+
+ FormSeguranca
+ analiseacidentestrabalho.FormSeguranca
+ request
+
+
+ Erro
+ analiseacidentestrabalho.Erro
+ request
+
+
+ Top
+ analiseacidentestrabalho.Top
+ request
+
+
+ LoadImage
+ analiseacidentestrabalho.LoadImage
+ request
+
+
+ AnaliseAcidenteTrabalho
+ analiseacidentestrabalho.AnaliseAcidenteTrabalho
+ request
+
+
+ ViewAnaliseAcidenteTrabalho
+ analiseacidentestrabalho.ViewAnaliseAcidenteTrabalho
+ request
+
+
+ FormRH
+ analiseacidentestrabalho.FormRH
+ request
+
+
+ FormHS
+ analiseacidentestrabalho.FormHS
+ request
+
+
+ FichaUtilizador
+ analiseacidentestrabalho.FichaUtilizador
+ request
+
+
+ FormMedico
+ analiseacidentestrabalho.FormMedico
+ request
+
+
+ FormDirSiprp
+ analiseacidentestrabalho.FormDirSiprp
+ request
+
+
+ EnviarCorrecao
+ analiseacidentestrabalho.EnviarCorrecao
+ request
+
+
+ GestaoUtilizadores
+ analiseacidentestrabalho.GestaoUtilizadores
+ request
+
+
+ NovoUtilizador
+ analiseacidentestrabalho.NovoUtilizador
+ request
+
+
+ UtilizadorFields
+ analiseacidentestrabalho.UtilizadorFields
+ request
+
+
+ FormDirGerRh
+ analiseacidentestrabalho.FormDirGerRh
+ request
+
+
+ FormGestor
+ analiseacidentestrabalho.FormGestor
+ request
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/WEB-INF/navigation.xml b/branches/SIPRP/AnaliseAcidentesTrabalho/web/WEB-INF/navigation.xml
new file mode 100644
index 00000000..5e0f02a0
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/WEB-INF/navigation.xml
@@ -0,0 +1,455 @@
+
+
+
+
+ /Login.jsp
+
+ recuperar_password
+ /RecuperarPassword.jsp
+
+
+ erro
+ /Erro.jsp
+
+
+ acesso
+ /Acesso.jsp
+
+
+ form_seguranca
+ /FormSeguranca.jsp
+
+
+ form_rh
+ /FormRH.jsp
+
+
+ form_hs
+ /FormHS.jsp
+
+
+ form_medico
+ /FormMedico.jsp
+
+
+ form_dir_ger_rh
+ /FormDirGerRh.jsp
+
+
+ form_dir_siprp
+ /FormDirSiprp.jsp
+
+
+ create_user
+ /FichaUtilizador.jsp
+
+
+ user
+ /FichaUtilizador.jsp
+
+
+ form_gestor
+ /FormGestor.jsp
+
+
+
+ /RecuperarPassword.jsp
+
+ login
+ /Login.jsp
+
+
+
+ /FormSeguranca.jsp
+
+ login
+ /Login.jsp
+
+
+ analise_acidente
+ /AnaliseAcidenteTrabalho.jsp
+
+
+ view_analise
+ /ViewAnaliseAcidenteTrabalho.jsp
+
+
+ user
+ /FichaUtilizador.jsp
+
+
+
+ /FormRH.jsp
+
+ login
+ /Login.jsp
+
+
+ analise_acidente
+ /AnaliseAcidenteTrabalho.jsp
+
+
+ view_analise
+ /ViewAnaliseAcidenteTrabalho.jsp
+
+
+ user
+ /FichaUtilizador.jsp
+
+
+
+ /FormHS.jsp
+
+ login
+ /Login.jsp
+
+
+ analise_acidente
+ /AnaliseAcidenteTrabalho.jsp
+
+
+ view_analise
+ /ViewAnaliseAcidenteTrabalho.jsp
+
+
+ user
+ /FichaUtilizador.jsp
+
+
+
+ /FormMedico.jsp
+
+ login
+ /Login.jsp
+
+
+ analise_acidente
+ /AnaliseAcidenteTrabalho.jsp
+
+
+ view_analise
+ /ViewAnaliseAcidenteTrabalho.jsp
+
+
+ user
+ /FichaUtilizador.jsp
+
+
+
+ /FormGestor.jsp
+
+ login
+ /Login.jsp
+
+
+ view_analise
+ /ViewAnaliseAcidenteTrabalho.jsp
+
+
+ user
+ /FichaUtilizador.jsp
+
+
+
+ /FormDirGerRh.jsp
+
+ view_analise
+ /ViewAnaliseAcidenteTrabalho.jsp
+
+
+ gestao_utilizadores
+ /GestaoUtilizadores.jsp
+
+
+ user
+ /FichaUtilizador.jsp
+
+
+ login
+ /Login.jsp
+
+
+
+ /FormDirSiprp.jsp
+
+ login
+ /Login.jsp
+
+
+ analise_acidente
+ /AnaliseAcidenteTrabalho.jsp
+
+
+ view_analise
+ /ViewAnaliseAcidenteTrabalho.jsp
+
+
+ user
+ /FichaUtilizador.jsp
+
+
+ gestao_utilizadores
+ /GestaoUtilizadores.jsp
+
+
+
+ /AnaliseAcidenteTrabalho.jsp
+
+ load_image
+ /LoadImage.jsp
+
+
+ form_seguranca
+ /FormSeguranca.jsp
+
+
+ form_rh
+ /FormRH.jsp
+
+
+ form_hs
+ /FormHS.jsp
+
+
+ form_medico
+ /FormMedico.jsp
+
+
+ correcao
+ /EnviarCorrecao.jsp
+
+
+ user
+ /FichaUtilizador.jsp
+
+
+ login
+ /Login.jsp
+
+
+
+ /LoadImage.jsp
+
+ analise_acidente
+ /AnaliseAcidenteTrabalho.jsp
+
+
+
+ /FichaUtilizador.jsp
+
+ form_seguranca
+ /FormSeguranca.jsp
+
+
+ form_rh
+ /FormRH.jsp
+
+
+ form_hs
+ /FormHS.jsp
+
+
+ form_medico
+ /FormMedico.jsp
+
+
+ form_gestor
+ /FormGestor.jsp
+
+
+ form_dir_ger_rh
+ /FormDirGerRh.jsp
+
+
+ form_dir_siprp
+ /FormDirSiprp.jsp
+
+
+ analise_acidente
+ /AnaliseAcidenteTrabalho.jsp
+
+
+ view_analise
+ /ViewAnaliseAcidenteTrabalho.jsp
+
+
+ gestao_utilizadores
+ /GestaoUtilizadores.jsp
+
+
+ novo_utilizador
+ /NovoUtilizador.jsp
+
+
+ login
+ /Login.jsp
+
+
+
+ /ViewAnaliseAcidenteTrabalho.jsp
+
+ login
+ /Login.jsp
+
+
+ user
+ /FichaUtilizador.jsp
+
+
+ form_seguranca
+ /FormSeguranca.jsp
+
+
+ form_rh
+ /FormRH.jsp
+
+
+ form_hs
+ /FormHS.jsp
+
+
+ form_medico
+ /FormMedico.jsp
+
+
+ form_gestor
+ /FormGestor.jsp
+
+
+ form_dir_ger_rh
+ /FormDirGerRh.jsp
+
+
+ form_dir_siprp
+ /FormDirSiprp.jsp
+
+
+
+ /EnviarCorrecao.jsp
+
+ analise_acidente
+ /AnaliseAcidenteTrabalho.jsp
+
+
+ form_hs
+ /FormHS.jsp
+
+
+ login
+ /Login.jsp
+
+
+
+ /GestaoUtilizadores.jsp
+
+ novo_utilizador
+ /NovoUtilizador.jsp
+
+
+ user_fields
+ /UtilizadorFields.jsp
+
+
+ user
+ /FichaUtilizador.jsp
+
+
+ form_dir_ger_rh
+ /FormDirGerRh.jsp
+
+
+ form_dir_siprp
+ /FormDirSiprp.jsp
+
+
+ login
+ /Login.jsp
+
+
+
+ /NovoUtilizador.jsp
+
+ new_user_fields
+ /UtilizadorFields.jsp
+
+
+ gestao_utilizadores
+ /GestaoUtilizadores.jsp
+
+
+ user
+ /FichaUtilizador.jsp
+
+
+ form_dir_ger_rh
+ /FormDirGerRh.jsp
+
+
+ form_dir_siprp
+ /FormDirSiprp.jsp
+
+
+ login
+ /Login.jsp
+
+
+
+ /UtilizadorFields.jsp
+
+ novo_utilizador
+ /NovoUtilizador.jsp
+
+
+ gestao_utilizadores
+ /GestaoUtilizadores.jsp
+
+
+ form_dir_ger_rh
+ /FormDirGerRh.jsp
+
+
+ form_dir_siprp
+ /FormDirSiprp.jsp
+
+
+ login
+ /Login.jsp
+
+
+
+ /Acesso.jsp
+
+ gestor
+ /FormGestor.jsp
+
+
+ form_rh
+ /FormRH.jsp
+
+
+ form_dir_ger_rh
+ /FormDirGerRh.jsp
+
+
+ form_hs
+ /FormHS.jsp
+
+
+ form_seguranca
+ /FormSeguranca.jsp
+
+
+ form_dir_siprp
+ /FormDirSiprp.jsp
+
+
+ form_gestor
+ /FormGestor.jsp
+
+
+ login
+ /Login.jsp
+
+
+
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/WEB-INF/web.xml b/branches/SIPRP/AnaliseAcidentesTrabalho/web/WEB-INF/web.xml
new file mode 100644
index 00000000..cd61087f
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/WEB-INF/web.xml
@@ -0,0 +1,15 @@
+
+javax.faces.STATE_SAVING_METHOD server javax.faces.CONFIG_FILES /WEB-INF/navigation.xml,/WEB-INF/managed-beans.xml com.sun.faces.validateXml true com.sun.faces.verifyObjects false UploadFilter com.sun.rave.web.ui.util.UploadFilter
+ The maximum allowed upload size in bytes. If this is set
+ to a negative value, there is no maximum. The default
+ value is 1000000.
+ maxSize 1000000
+ The size (in bytes) of an uploaded file which, if it is
+ exceeded, will cause the file to be written directly to
+ disk instead of stored in memory. Files smaller than or
+ equal to this size will be stored in memory. The default
+ value is 4096.
+ sizeThreshold 4096 UploadFilter Faces Servlet Faces Servlet javax.faces.webapp.FacesServlet 1 ExceptionHandlerServlet com.sun.errorhandler.ExceptionHandler errorHost localhost errorPort 24444 ThemeServlet com.sun.rave.web.ui.theme.ThemeServlet Faces Servlet /faces/* ExceptionHandlerServlet /error/ExceptionHandler ThemeServlet /theme/*
+
+ faces/Login.jsp
+ javax.servlet.ServletException /error/ExceptionHandler java.io.IOException /error/ExceptionHandler javax.faces.FacesException /error/ExceptionHandler com.sun.rave.web.ui.appbase.ApplicationException /error/ExceptionHandler *.jspf true
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/1 b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/1
new file mode 100644
index 00000000..4720ac5e
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/1 differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/Logo_Auchan_novo.jpg b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/Logo_Auchan_novo.jpg
new file mode 100644
index 00000000..1b79d4cb
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/Logo_Auchan_novo.jpg differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/SIPRP_logo_small.jpg b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/SIPRP_logo_small.jpg
new file mode 100644
index 00000000..240f2358
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/SIPRP_logo_small.jpg differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/auchan_logo.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/auchan_logo.gif
new file mode 100644
index 00000000..8fa06785
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/auchan_logo.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/auchan_logo_mini.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/auchan_logo_mini.gif
new file mode 100644
index 00000000..c77c826c
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/auchan_logo_mini.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/black_spacer.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/black_spacer.gif
new file mode 100644
index 00000000..d370e341
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/black_spacer.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/logo_auchan_small.jpg b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/logo_auchan_small.jpg
new file mode 100644
index 00000000..376eee0e
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/logo_auchan_small.jpg differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/logo_auchan_small1.jpg b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/logo_auchan_small1.jpg
new file mode 100644
index 00000000..f9e50690
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/logo_auchan_small1.jpg differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/logo_evolute_small.png b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/logo_evolute_small.png
new file mode 100644
index 00000000..0198da2b
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/logo_evolute_small.png differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/ma1.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/ma1.gif
new file mode 100755
index 00000000..6141cfcd
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/ma1.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ca1.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ca1.gif
new file mode 100755
index 00000000..76ca9ac0
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ca1.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ca2.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ca2.gif
new file mode 100644
index 00000000..97c08970
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ca2.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ca3.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ca3.gif
new file mode 100644
index 00000000..07b00dc5
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ca3.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ca4.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ca4.gif
new file mode 100755
index 00000000..baf6f2bd
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ca4.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ext1.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ext1.gif
new file mode 100644
index 00000000..6278e9de
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ext1.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ext2.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ext2.gif
new file mode 100644
index 00000000..d50ab9f5
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ext2.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ext3.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ext3.gif
new file mode 100644
index 00000000..cb2a14e3
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ext3.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ext4.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ext4.gif
new file mode 100755
index 00000000..fa96b7d5
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ext4.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/fle1.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/fle1.gif
new file mode 100755
index 00000000..7ea7b35e
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/fle1.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/fle2.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/fle2.gif
new file mode 100644
index 00000000..dbf9cb41
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/fle2.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/fle3.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/fle3.gif
new file mode 100644
index 00000000..5406a2be
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/fle3.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/fle4.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/fle4.gif
new file mode 100644
index 00000000..7342e330
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/fle4.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma1.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma1.gif
new file mode 100755
index 00000000..6141cfcd
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma1.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma10.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma10.gif
new file mode 100644
index 00000000..94748d7b
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma10.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma2.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma2.gif
new file mode 100644
index 00000000..a1f65bf0
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma2.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma3.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma3.gif
new file mode 100644
index 00000000..3ec7862b
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma3.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma4.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma4.gif
new file mode 100755
index 00000000..9deb31a7
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma4.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma5.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma5.gif
new file mode 100644
index 00000000..c6719c98
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma5.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma6.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma6.gif
new file mode 100644
index 00000000..f1b5170b
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma6.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma7.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma7.gif
new file mode 100755
index 00000000..98aa5304
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma7.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma8.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma8.gif
new file mode 100644
index 00000000..b98a9b2a
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma8.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma9.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma9.gif
new file mode 100755
index 00000000..ced4fc27
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/ma9.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/rot1.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/rot1.gif
new file mode 100755
index 00000000..938aa4f5
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/rot1.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/rot2.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/rot2.gif
new file mode 100755
index 00000000..eb785c9c
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/medico/rot2.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/plus_more.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/plus_more.gif
new file mode 100644
index 00000000..f10da648
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/plus_more.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/siprp_logo.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/siprp_logo.gif
new file mode 100644
index 00000000..9c64e995
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/siprp_logo.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/siprp_logo_mini.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/siprp_logo_mini.gif
new file mode 100644
index 00000000..f24aa23f
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/images/siprp_logo_mini.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/pdfs/Ajuda.pdf b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/pdfs/Ajuda.pdf
new file mode 100644
index 00000000..3adf0eee
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/pdfs/Ajuda.pdf differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/plus_more.gif b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/plus_more.gif
new file mode 100644
index 00000000..f10da648
Binary files /dev/null and b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/plus_more.gif differ
diff --git a/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/stylesheet.css b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/stylesheet.css
new file mode 100644
index 00000000..e8a45dde
--- /dev/null
+++ b/branches/SIPRP/AnaliseAcidentesTrabalho/web/resources/stylesheet.css
@@ -0,0 +1,204 @@
+/* Style rules to make data tables look better */
+body {background-color: #bbd400}
+.list-header {
+ background-color: #eeeeee;
+ font-size: larger;
+ font-weight: bold;
+}
+
+.list-paging-header {
+ background-color: white;
+}
+
+.gridColLeft {
+ text-align : left;
+}
+
+.gridColCenter {
+ text-align: center;
+}
+
+.gridColRight {
+ text-align: right;
+}
+
+.gridColRightBottom {
+ text-align: right;
+ vertical-align: bottom;
+}
+
+.gridColLeft5{
+ text-align: left;
+ width: 5%;
+}
+
+.gridColLeft10{
+ text-align: left;
+ width: 10%;
+}
+
+.gridColLeft15{
+ text-align: left;
+ width: 15%;
+}
+
+.gridColLeft20{
+ text-align: left;
+ width: 20%;
+}
+
+.gridColLeft25{
+ text-align: left;
+ width: 25%;
+}
+
+.gridColLeft30{
+ text-align: left;
+ width: 30%;
+}
+
+.gridColLeft50{
+ text-align: left;
+ width: 50%;
+}
+
+.gridColLeft70{
+ text-align: left;
+ width: 70%;
+}
+
+.gridColLeft75{
+ text-align: left;
+ width: 75%;
+}
+
+.gridColLeft85{
+ text-align: left;
+ width: 85%;
+}
+
+.gridColLeft90{
+ text-align: left;
+ width: 90%;
+}
+
+.gridColLeft95{
+ text-align: left;
+ width: 95%;
+}
+
+.gridColRight85{
+ text-align: right;
+ width: 85%;
+}
+
+.gridBlockHeader{
+ background-color : #668597;
+ text-align: left;
+}
+
+.restricoes{
+ border-spacing: 0;
+ padding: 0px;
+}
+
+.assinaturas{
+ border-spacing: 0;
+ padding: 0px;
+}
+.gridColRestricoes{
+ border_bottom: solid 1px #000000;
+}
+
+.gridLayoutTopCols {
+ vertical-align : top;
+ width : 50%;
+ border : solid 1px #000000;
+ background-color: #f6f4e8;
+}
+
+.gridCellBordered {
+ border-bottom : solid 1px #000000;
+}
+
+.footer {
+ bottom: 0;
+ height: 10%;
+ position: fixed;
+ right: 0;
+ top: 95%;
+ width: 100%
+}
+
+.centerBlock{
+ text-align: center;
+ left: 0;
+ right: 0;
+ margin-left: auto;
+ margin-right: auto;}
+
+.labelBold{
+ font-weight : bold;
+}
+
+.labelMsg{
+ font-weight : bold;
+ color: #cc0033;
+ font-size :14px ;
+}
+.list-row-even {
+}
+
+.list-row-odd {
+ background-color: #eeeeee;
+}
+
+/* Style rules for message severity levels */
+
+.infoMessage {
+ color: black;
+}
+
+.warnMessage {
+ color: orange;
+ font-weight: bold;
+}
+
+.errorMessage {
+ color: red;
+ font-weight: bold;
+}
+
+.fatalMessage {
+ color: red;
+ font-style: italic;
+ font-weight: bold;
+}
+
+
+.labelTrabalhador {
+ color: #000000;
+}
+
+.labelTrabalhador:hover {
+ font-weight: bold;
+ text-decoration : none;
+}
+
+.labelCSS{
+ font-weight : bold;
+}
+
+
+
+.show{
+ display : inline;
+}
+
+.hide{
+ display : none ;
+}
+
+.lnkRed{
+ color : #990000 ;
+}
diff --git a/branches/SIPRP/GestaoSHST/.classpath b/branches/SIPRP/GestaoSHST/.classpath
new file mode 100644
index 00000000..73ab0ad6
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/.classpath
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/GestaoSHST/.project b/branches/SIPRP/GestaoSHST/.project
new file mode 100644
index 00000000..4d26bbe6
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/.project
@@ -0,0 +1,29 @@
+
+
+ GestaoSHST
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ com.google.gwt.eclipse.core.gwtProjectValidator
+
+
+
+
+ com.google.gdt.eclipse.core.webAppProjectValidator
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ com.google.gwt.eclipse.core.gwtNature
+ com.google.gdt.eclipse.core.webAppNature
+
+
diff --git a/branches/SIPRP/GestaoSHST/.settings/com.google.gwt.eclipse.core.prefs b/branches/SIPRP/GestaoSHST/.settings/com.google.gwt.eclipse.core.prefs
new file mode 100644
index 00000000..310e537d
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/.settings/com.google.gwt.eclipse.core.prefs
@@ -0,0 +1,3 @@
+#Fri Dec 11 10:46:39 WET 2009
+eclipse.preferences.version=1
+filesCopiedToWebInfLib=gwt-servlet.jar
diff --git a/branches/SIPRP/GestaoSHST/lib/evolute.jar b/branches/SIPRP/GestaoSHST/lib/evolute.jar
new file mode 100644
index 00000000..52b2c276
Binary files /dev/null and b/branches/SIPRP/GestaoSHST/lib/evolute.jar differ
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/GestaoSHST.gwt.xml b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/GestaoSHST.gwt.xml
new file mode 100644
index 00000000..10faca4b
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/GestaoSHST.gwt.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/GestaoSHST.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/GestaoSHST.java
new file mode 100644
index 00000000..8cee9e5c
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/GestaoSHST.java
@@ -0,0 +1,51 @@
+package com.evolute.siprp.client;
+
+import com.evolute.siprp.client.panels.footer.FooterPanel;
+import com.evolute.siprp.client.panels.utils.navigation.NavigationConstants;
+import com.evolute.siprp.client.panels.utils.navigation.PageNavigation;
+import com.google.gwt.core.client.EntryPoint;
+import com.google.gwt.event.logical.shared.ValueChangeEvent;
+import com.google.gwt.event.logical.shared.ValueChangeHandler;
+import com.google.gwt.user.client.History;
+import com.google.gwt.user.client.ui.RootPanel;
+
+
+
+public class GestaoSHST implements EntryPoint, ValueChangeHandler< String >
+{
+
+ private String oldEvent = null;
+
+ public void onModuleLoad()
+ {
+ PageNavigation.goPage( NavigationConstants.LOGIN_PANEL );
+
+ RootPanel.get( "footer" ).add( new FooterPanel() );
+
+ History.addValueChangeHandler( this );
+ History.fireCurrentHistoryState();
+ }
+
+ @Override
+ public void onValueChange( ValueChangeEvent< String > newEvent )
+ {
+ if ( oldEvent != null && newEvent.getValue().equals( oldEvent ) )
+ {
+ return ;
+ }
+
+ oldEvent = newEvent.getValue();
+ Integer panelID = null;
+ try
+ {
+ panelID = Integer.parseInt( oldEvent );
+ }
+ catch ( Exception e )
+ {
+ return ;
+ }
+
+ PageNavigation.goPage( panelID );
+ }
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoPanel.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoPanel.java
new file mode 100644
index 00000000..c5bd0fe2
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoPanel.java
@@ -0,0 +1,109 @@
+package com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho;
+
+import com.evolute.siprp.client.panels.apps.AnchorSair;
+import com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.actual.ActualPanel;
+import com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.concluido.ConcluidoPanel;
+import com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.seguimento.SeguimentoPanel;
+import com.evolute.siprp.client.panels.utils.AppConstants;
+import com.evolute.siprp.client.panels.utils.navigation.PageNavigation;
+import com.evolute.siprp.client.panels.utils.permissoes.AccessConstants;
+import com.evolute.siprp.client.panels.utils.permissoes.PermissionsController;
+import com.evolute.siprp.client.vo.Utilizador;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.uibinder.client.UiHandler;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.ui.Anchor;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.InlineLabel;
+import com.google.gwt.user.client.ui.Widget;
+
+public class AnaliseAcidentesTrabalhoPanel extends Composite
+{
+
+ private static AnaliseAcidentesTrabalhoPanelUiBinder uiBinder = GWT.create( AnaliseAcidentesTrabalhoPanelUiBinder.class );
+ interface AnaliseAcidentesTrabalhoPanelUiBinder extends UiBinder< Widget, AnaliseAcidentesTrabalhoPanel > { }
+
+
+ @UiField protected Image imgSiprp;
+ @UiField protected Image imgAuchan;
+ @UiField protected AnchorSair lnkSair;
+ @UiField protected Anchor lnkPlanosActuacao;
+ @UiField protected InlineLabel lblUsername;
+
+ @UiField protected Anchor lnkGerirUtilizadores;
+ @UiField protected Anchor lnkAlterarDados;
+ @UiField protected Anchor lnkAjuda;
+
+ @UiField protected ActualPanel panelActual;
+ @UiField protected SeguimentoPanel panelSeguimento;
+ @UiField protected ConcluidoPanel panelConcluido;
+
+
+ private Utilizador userLogged;
+ private PermissionsController permsController;
+
+
+ public AnaliseAcidentesTrabalhoPanel()
+ {
+ initWidget( uiBinder.createAndBindUi( this ) );
+ permsController = PermissionsController.getController();
+
+ if ( ! permsController.hasPermissionTo( AccessConstants.VIEW_ACTUAL_PANEL ) )
+ {
+ this.panelActual.setVisible( false );
+ }
+ if ( ! permsController.hasPermissionTo( AccessConstants.VIEW_SEGUIMENTO_PANEL ) )
+ {
+ this.panelSeguimento.setVisible( false );
+ }
+ if ( ! permsController.hasPermissionTo( AccessConstants.VIEW_CONCLUIDO_PANEL ) )
+ {
+ this.panelConcluido.setVisible( false );
+ }
+
+ initComponents();
+ }
+
+ private void initComponents()
+ {
+ userLogged = PageNavigation.getProvider().getUserLogged();
+ lblUsername.setText( userLogged.getUsername() );
+
+ imgSiprp.setTitle( "SIPRP" );
+ imgSiprp.setUrl( AppConstants.IMAGES_FOLDER + "SIPRP_logo_small.jpg" );
+ imgAuchan.setTitle( "Auchan" );
+ imgAuchan.setUrl( AppConstants.IMAGES_FOLDER + "logo_empresa32.jpg" );
+ imgAuchan.setHeight( "40" );
+
+ lnkPlanosActuacao.setText( "planos actua\u00E7\u00E3o>>" );
+ lnkGerirUtilizadores.setText( "gerir utilizadores" );
+ lnkAlterarDados.setText( "alterar dados utilizador" );
+ lnkAjuda.setText( "ajuda" );
+ }
+
+ @UiHandler( { "lnkPlanosActuacao", "lnkGerirUtilizadores", "lnkAlterarDados", "lnkAjuda" } )
+ protected void onClick( ClickEvent e )
+ {
+ if ( e.getSource().equals( lnkPlanosActuacao ) )
+ {
+ Window.alert( "planos actuacao..." );
+ }
+ else if ( e.getSource().equals( lnkGerirUtilizadores ) )
+ {
+ Window.alert( "gerir utilizadores" );
+ }
+ else if ( e.getSource().equals( lnkAlterarDados ) )
+ {
+ Window.alert( "alterar dados" );
+ }
+ else if ( e.getSource().equals( lnkAjuda ) )
+ {
+ Window.alert( "ajuda" );
+ }
+ }
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoPanel.ui.xml b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoPanel.ui.xml
new file mode 100644
index 00000000..eef8203c
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoPanel.ui.xml
@@ -0,0 +1,70 @@
+
+
+
+
+.headerDiv {
+ width: 100%;
+ margin-top: 75px;
+}
+
+.headerTable {
+ width: 100%;
+ border-bottom: 1px solid #000000;
+}
+
+.bodyDiv {
+ margin-top: 10px;
+
+ width: 100%;
+ border: 1px solid black;
+ background-color: rgb( 238, 238, 238 );
+}
+.verticalSpacer {
+ margin-top: 20px;
+}
+
+.lblUsername {
+ margin-right: 30px;
+}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoService.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoService.java
new file mode 100644
index 00000000..67ea4531
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoService.java
@@ -0,0 +1,16 @@
+package com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho;
+
+import java.util.Vector;
+
+import com.evolute.siprp.client.vo.ActualTableRow;
+import com.evolute.siprp.client.vo.Utilizador;
+import com.google.gwt.user.client.rpc.RemoteService;
+
+public interface AnaliseAcidentesTrabalhoService extends RemoteService
+{
+
+ public Vector< ActualTableRow > getActualTableData( Utilizador userLogged );
+
+ public Vector< ActualTableRow > getSeguimentoTableData( Utilizador userLogged );
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoServiceAsync.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoServiceAsync.java
new file mode 100644
index 00000000..fb8094d2
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalhoServiceAsync.java
@@ -0,0 +1,16 @@
+package com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho;
+
+import java.util.Vector;
+
+import com.evolute.siprp.client.vo.ActualTableRow;
+import com.evolute.siprp.client.vo.Utilizador;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+
+public interface AnaliseAcidentesTrabalhoServiceAsync
+{
+
+ public void getActualTableData( Utilizador userLogged, AsyncCallback< Vector< ActualTableRow > > callback );
+
+ public void getSeguimentoTableData( Utilizador userLogged, AsyncCallback< Vector< ActualTableRow > > callback );
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/actual/ActualPanel.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/actual/ActualPanel.java
new file mode 100644
index 00000000..318fa53a
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/actual/ActualPanel.java
@@ -0,0 +1,65 @@
+package com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.actual;
+
+import com.evolute.siprp.client.panels.utils.permissoes.AccessConstants;
+import com.evolute.siprp.client.panels.utils.permissoes.PermissionsController;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.uibinder.client.UiHandler;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.SimplePanel;
+import com.google.gwt.user.client.ui.Widget;
+
+public class ActualPanel extends Composite
+{
+
+ private static ActualPanelUiBinder uiBinder = GWT.create( ActualPanelUiBinder.class );
+ interface ActualPanelUiBinder extends UiBinder< Widget, ActualPanel > { }
+
+ private PermissionsController permsController;
+
+
+ @UiField protected Button btnNewAnalysis;
+ @UiField protected ActualTable tableActual;
+
+
+ public ActualPanel()
+ {
+ permsController = PermissionsController.getController();
+ if ( permsController.hasPermissionTo( AccessConstants.VIEW_ACTUAL_PANEL ) )
+ {
+ setupComponents();
+ }
+ else
+ {
+ initWidget( new SimplePanel() );
+ }
+ }
+
+
+ private void setupComponents()
+ {
+ initWidget( uiBinder.createAndBindUi( this ) );
+
+ btnNewAnalysis.setText( "Criar nova an\u00E1lise de acidentes de trabalho" );
+ if ( ! permsController.hasPermissionTo( AccessConstants.VIEW_ACTUAL_PANEL_NOVA_ANALISE_BUTTON ) )
+ {
+ btnNewAnalysis.setVisible( false );
+ }
+ }
+
+
+ @UiHandler( { "btnNewAnalysis" } )
+ protected void onClick( ClickEvent e )
+ {
+ if ( e.getSource().equals( btnNewAnalysis ) )
+ {
+ Window.alert( "new analysis" );
+ }
+
+ }
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/actual/ActualPanel.ui.xml b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/actual/ActualPanel.ui.xml
new file mode 100644
index 00000000..8f9c3b1b
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/actual/ActualPanel.ui.xml
@@ -0,0 +1,50 @@
+
+
+
+
+.bodyDiv {
+ margin-top: 20px;
+
+ width: 100%;
+ border: 1px solid black;
+ background-color: rgb( 238, 238, 238 );
+}
+
+.divActual {
+ margin-top: 15px;
+}
+
+.btnNewAnalysis {
+ width: 80%;
+ height: 30px;
+}
+
+.actualTable {
+ width: 816px;
+ margin-top: 10px;
+ margin-bottom: 15px;
+ background-color: #FFFFFF;
+ border: 1px solid #000000;
+}
+
+
+
+
+
+
Actual
+
+
+
+
+
+
+
Processos com dados pendentes
+
+
+
+
+
+
\ No newline at end of file
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/actual/ActualTable.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/actual/ActualTable.java
new file mode 100644
index 00000000..b91e6b62
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/actual/ActualTable.java
@@ -0,0 +1,88 @@
+package com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.actual;
+
+import java.util.Vector;
+
+import com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.AnaliseAcidentesTrabalhoService;
+import com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.AnaliseAcidentesTrabalhoServiceAsync;
+import com.evolute.siprp.client.panels.utils.navigation.PageNavigation;
+import com.evolute.siprp.client.vo.ActualTableRow;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.i18n.client.DateTimeFormat;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
+import com.google.gwt.user.client.ui.FlexTable;
+
+public class ActualTable extends FlexTable
+{
+ private final DateTimeFormat D_F = DateTimeFormat.getFormat( "yyyy-MM-dd" );
+
+ private AnaliseAcidentesTrabalhoServiceAsync aatService;
+
+ public ActualTable()
+ {
+ super();
+
+ this.aatService = ( AnaliseAcidentesTrabalhoServiceAsync ) GWT.create( AnaliseAcidentesTrabalhoService.class );
+ ServiceDefTarget serviceDef = ( ServiceDefTarget ) this.aatService;
+ serviceDef.setServiceEntryPoint( GWT.getModuleBaseURL() + "aatService" );
+
+
+ this.setText( 0, 0, "Data do acidente" );
+ this.setText( 0, 1, "Data da abertura" );
+ this.setText( 0, 2, "Nº acidente" );
+ this.setText( 0, 3, "POR" );
+ this.setText( 0, 4, "Nome do acidentado" );
+ this.setText( 0, 5, "Fase" );
+
+ CellFormatter cellFormatter = this.getCellFormatter();
+ cellFormatter.setStyleName( 0, 0, "lblBold" );
+ cellFormatter.setStyleName( 0, 1, "lblBold" );
+ cellFormatter.setStyleName( 0, 2, "lblBold" );
+ cellFormatter.setStyleName( 0, 3, "lblBold" );
+ cellFormatter.setStyleName( 0, 4, "lblBold" );
+ cellFormatter.setStyleName( 0, 5, "lblBold" );
+
+ this.setText( 1, 0, "loading ..." );
+ this.getFlexCellFormatter().setColSpan( 1, 0, 6 );
+
+ this.aatService.getActualTableData( PageNavigation.getProvider().getUserLogged(), new AsyncCallback< Vector< ActualTableRow > >() {
+ @Override
+ public void onFailure( Throwable caught )
+ {
+ Window.alert( "Oops ! unable to fetch 'Actual' table data." );
+ }
+
+ @Override
+ public void onSuccess( Vector< ActualTableRow > result )
+ {
+ showTableData( result );
+ }
+ });
+ }
+
+ private void showTableData( Vector< ActualTableRow > tableRows )
+ {
+ if ( tableRows == null || tableRows.size() == 0 )
+ {
+ this.setText( 1, 0, "No items found." );
+ }
+ else
+ {
+ this.getFlexCellFormatter().setColSpan( 1, 0, 0 );
+
+ for ( int rowNumber = 0, columnNumber = 0; rowNumber < tableRows.size(); rowNumber++, columnNumber = 0 )
+ {
+ ActualTableRow row = tableRows.get( rowNumber );
+
+ this.setText( (rowNumber+1), columnNumber++, D_F.format( row.getDataAcidente() ) );
+ this.setText( (rowNumber+1), columnNumber++, D_F.format( row.getDataAbertura() ) );
+ this.setText( (rowNumber+1), columnNumber++, row.getNrAcidente() );
+ this.setText( (rowNumber+1), columnNumber++, row.getPOR() );
+ this.setText( (rowNumber+1), columnNumber++, row.getNomeAcidentado() );
+ this.setText( (rowNumber+1), columnNumber++, String.valueOf( row.getFase() ) );
+ }
+ }
+ }
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/concluido/ConcluidoPanel.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/concluido/ConcluidoPanel.java
new file mode 100644
index 00000000..bd0e1b13
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/concluido/ConcluidoPanel.java
@@ -0,0 +1,38 @@
+package com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.concluido;
+
+import com.evolute.siprp.client.panels.utils.permissoes.AccessConstants;
+import com.evolute.siprp.client.panels.utils.permissoes.PermissionsController;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.SimplePanel;
+import com.google.gwt.user.client.ui.Widget;
+
+public class ConcluidoPanel extends Composite {
+
+ private static ConcluidoPanelUiBinder uiBinder = GWT.create( ConcluidoPanelUiBinder.class );
+ interface ConcluidoPanelUiBinder extends UiBinder< Widget, ConcluidoPanel > { }
+
+ private PermissionsController permsController;
+
+
+ public ConcluidoPanel()
+ {
+ permsController = PermissionsController.getController();
+ if ( permsController.hasPermissionTo( AccessConstants.VIEW_CONCLUIDO_PANEL ) )
+ {
+ setupComponents();
+ }
+ else
+ {
+ initWidget( new SimplePanel() );
+ }
+ }
+
+ private void setupComponents()
+ {
+ initWidget( uiBinder.createAndBindUi( this ) );
+
+ }
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/concluido/ConcluidoPanel.ui.xml b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/concluido/ConcluidoPanel.ui.xml
new file mode 100644
index 00000000..e0194ce6
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/concluido/ConcluidoPanel.ui.xml
@@ -0,0 +1,28 @@
+
+
+
+
+.bodyDiv {
+ margin-top: 10px;
+
+ width: 100%;
+ border: 1px solid black;
+ background-color: rgb( 238, 238, 238 );
+}
+
+.divConcluido {
+ margin-top: 15px;
+}
+
+
+
+
+
+
Conclu\u00EDdos
+
+ table
+
+
+
+
\ No newline at end of file
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/seguimento/SeguimentoPanel.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/seguimento/SeguimentoPanel.java
new file mode 100644
index 00000000..536cf4ae
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/seguimento/SeguimentoPanel.java
@@ -0,0 +1,42 @@
+package com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.seguimento;
+
+import com.evolute.siprp.client.panels.utils.permissoes.AccessConstants;
+import com.evolute.siprp.client.panels.utils.permissoes.PermissionsController;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.SimplePanel;
+import com.google.gwt.user.client.ui.Widget;
+
+public class SeguimentoPanel extends Composite {
+
+ private static SeguimentoPanelUiBinder uiBinder = GWT.create( SeguimentoPanelUiBinder.class );
+ interface SeguimentoPanelUiBinder extends UiBinder< Widget, SeguimentoPanel > { }
+
+ private PermissionsController permsController;
+
+ @UiField protected SeguimentoTable tableSeguimento;
+
+
+ public SeguimentoPanel()
+ {
+ permsController = PermissionsController.getController();
+ if ( permsController.hasPermissionTo( AccessConstants.VIEW_SEGUIMENTO_PANEL ) )
+ {
+ setupComponents();
+ }
+ else
+ {
+ initWidget( new SimplePanel() );
+ }
+ }
+
+ private void setupComponents()
+ {
+ initWidget( uiBinder.createAndBindUi( this ) );
+
+
+ }
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/seguimento/SeguimentoPanel.ui.xml b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/seguimento/SeguimentoPanel.ui.xml
new file mode 100644
index 00000000..69a7ffdf
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/seguimento/SeguimentoPanel.ui.xml
@@ -0,0 +1,39 @@
+
+
+
+
+.bodyDiv {
+ margin-top: 20px;
+
+ width: 100%;
+ border: 1px solid black;
+ background-color: rgb( 238, 238, 238 );
+}
+
+.divSeguimento {
+ margin-top: 15px;
+}
+
+.seguimentoTable {
+ width: 816px;
+ margin-top: 10px;
+ margin-bottom: 15px;
+}
+
+
+
+
+
+
Em seguimento
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/seguimento/SeguimentoTable.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/seguimento/SeguimentoTable.java
new file mode 100644
index 00000000..7627d845
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnaliseAcidentesTrabalho/seguimento/SeguimentoTable.java
@@ -0,0 +1,88 @@
+package com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.seguimento;
+
+import java.util.Vector;
+
+import com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.AnaliseAcidentesTrabalhoService;
+import com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.AnaliseAcidentesTrabalhoServiceAsync;
+import com.evolute.siprp.client.panels.utils.navigation.PageNavigation;
+import com.evolute.siprp.client.vo.ActualTableRow;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.i18n.client.DateTimeFormat;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
+import com.google.gwt.user.client.ui.FlexTable;
+
+public class SeguimentoTable extends FlexTable
+{
+ private final DateTimeFormat D_F = DateTimeFormat.getFormat( "yyyy-MM-dd" );
+
+ private AnaliseAcidentesTrabalhoServiceAsync aatService;
+
+ public SeguimentoTable()
+ {
+ super();
+
+ this.aatService = ( AnaliseAcidentesTrabalhoServiceAsync ) GWT.create( AnaliseAcidentesTrabalhoService.class );
+ ServiceDefTarget serviceDef = ( ServiceDefTarget ) this.aatService;
+ serviceDef.setServiceEntryPoint( GWT.getModuleBaseURL() + "aatService" );
+
+ this.setText( 0, 0, "Data do acidente" );
+ this.setText( 0, 1, "Data da abertura" );
+ this.setText( 0, 2, "Nº acidente" );
+ this.setText( 0, 3, "POR" );
+ this.setText( 0, 4, "Nome do acidentado" );
+ this.setText( 0, 5, "Fase" );
+
+ CellFormatter cellFormatter = this.getCellFormatter();
+ cellFormatter.setStyleName( 0, 0, "lblBold" );
+ cellFormatter.setStyleName( 0, 1, "lblBold" );
+ cellFormatter.setStyleName( 0, 2, "lblBold" );
+ cellFormatter.setStyleName( 0, 3, "lblBold" );
+ cellFormatter.setStyleName( 0, 4, "lblBold" );
+ cellFormatter.setStyleName( 0, 5, "lblBold" );
+
+ this.setText( 1, 0, "loading ..." );
+ this.getFlexCellFormatter().setColSpan( 1, 0, 6 );
+
+ this.aatService.getSeguimentoTableData( PageNavigation.getProvider().getUserLogged(), new AsyncCallback< Vector< ActualTableRow > >() {
+ @Override
+ public void onFailure( Throwable caught )
+ {
+ Window.alert( "Oops ! unable to fetch 'Actual' table data." );
+ }
+
+ @Override
+ public void onSuccess( Vector< ActualTableRow > result )
+ {
+ showTableData( result );
+ }
+ });
+ }
+
+
+ private void showTableData( Vector< ActualTableRow > tableRows )
+ {
+ if ( tableRows == null || tableRows.size() == 0 )
+ {
+ this.setText( 1, 0, "No items found." );
+ }
+ else
+ {
+ this.getFlexCellFormatter().setColSpan( 1, 0, 0 );
+
+ for ( int rowNumber = 0, columnNumber = 0; rowNumber < tableRows.size(); rowNumber++, columnNumber = 0 )
+ {
+ ActualTableRow row = tableRows.get( rowNumber );
+
+ this.setText( (rowNumber+1), columnNumber++, D_F.format( row.getDataAcidente() ) );
+ this.setText( (rowNumber+1), columnNumber++, D_F.format( row.getDataAbertura() ) );
+ this.setText( (rowNumber+1), columnNumber++, row.getNrAcidente() );
+ this.setText( (rowNumber+1), columnNumber++, row.getPOR() );
+ this.setText( (rowNumber+1), columnNumber++, row.getNomeAcidentado() );
+ this.setText( (rowNumber+1), columnNumber++, String.valueOf( row.getFase() ) );
+ }
+ }
+ }
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnchorSair.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnchorSair.java
new file mode 100644
index 00000000..46afd9f4
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/AnchorSair.java
@@ -0,0 +1,28 @@
+package com.evolute.siprp.client.panels.apps;
+
+import com.evolute.siprp.client.panels.utils.navigation.NavigationConstants;
+import com.evolute.siprp.client.panels.utils.navigation.PageNavigation;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.user.client.ui.Anchor;
+
+public class AnchorSair extends Anchor implements ClickHandler
+{
+
+ public AnchorSair()
+ {
+ super();
+
+ this.setText( "sair>>" );
+ this.addClickHandler( this );
+ }
+
+ @Override
+ public void onClick( ClickEvent event )
+ {
+ PageNavigation.getProvider().setUserLogged( null );
+ PageNavigation.getProvider().clearCache();
+ PageNavigation.goPage( NavigationConstants.LOGIN_PANEL );
+ }
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/MainPanel.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/MainPanel.java
new file mode 100644
index 00000000..7bd28577
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/MainPanel.java
@@ -0,0 +1,69 @@
+package com.evolute.siprp.client.panels.apps;
+
+import com.evolute.siprp.client.panels.utils.AppConstants;
+import com.evolute.siprp.client.panels.utils.navigation.NavigationConstants;
+import com.evolute.siprp.client.panels.utils.navigation.PageNavigation;
+import com.evolute.siprp.client.vo.Utilizador;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.uibinder.client.UiHandler;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.ui.Anchor;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.InlineLabel;
+import com.google.gwt.user.client.ui.Widget;
+
+public class MainPanel extends Composite
+{
+
+ private static MainPanelUiBinder uiBinder = GWT.create( MainPanelUiBinder.class );
+ interface MainPanelUiBinder extends UiBinder< Widget, MainPanel > { }
+
+ @UiField protected InlineLabel lblUsername;
+ @UiField protected InlineLabel lblName;
+ @UiField protected AnchorSair lnkSair;
+ @UiField protected Anchor lnkAnaliseAcidentesTrabalho;
+ @UiField protected Anchor lnkPlanosActuacao;
+ @UiField protected Image imgSiprp;
+ @UiField protected Image imgAuchan;
+
+ private Utilizador userLogged;
+
+ public MainPanel()
+ {
+ initWidget( uiBinder.createAndBindUi( this ) );
+
+ userLogged = PageNavigation.getProvider().getUserLogged();
+
+ lblUsername.setText( userLogged.getUsername() );
+
+ imgSiprp.setTitle( "SIPRP" );
+ imgSiprp.setUrl( AppConstants.IMAGES_FOLDER + "SIPRP_logo_small.jpg" );
+ imgAuchan.setTitle( "Auchan" );
+ imgAuchan.setUrl( AppConstants.IMAGES_FOLDER + "logo_empresa32.jpg" );
+ imgAuchan.setHeight( "40" );
+
+ lblName.setText( userLogged.getNome() );
+ lnkAnaliseAcidentesTrabalho.setText( "An\u00E1lise de Acidentes de Trabalho" );
+ lnkPlanosActuacao.setText( "Planos de Actua\u00E7\u00E3o" );
+ }
+
+
+ @UiHandler( { "lnkAnaliseAcidentesTrabalho", "lnkPlanosActuacao" } )
+ protected void onClick( ClickEvent e )
+ {
+ if ( e.getSource().equals( lnkAnaliseAcidentesTrabalho ) )
+ {
+ PageNavigation.goPage( NavigationConstants.ANALISE_ACIDENTES_TRABALHO_PANEL );
+ }
+ else if ( e.getSource().equals( lnkPlanosActuacao ) )
+ {
+ //TODO:
+ Window.alert( "TODO" );
+ }
+ }
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/MainPanel.ui.xml b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/MainPanel.ui.xml
new file mode 100644
index 00000000..244330b8
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/apps/MainPanel.ui.xml
@@ -0,0 +1,71 @@
+
+
+
+
+.headerDiv {
+ width: 100%;
+ text-align: right;
+ margin-top: 75px;
+}
+
+.bodyDiv {
+ margin-top: 75px;
+
+ width: 100%;
+ border: 1px solid black;
+ background-color: rgb( 238, 238, 238 );
+}
+
+.logosDiv {
+ margin-top: 10px;
+}
+
+.welcomeDiv {
+ margin-bottom: 50px;
+}
+
+.linksDiv {
+ margin-top: 50px;
+ margin-bottom: 30px;
+}
+
+.lblUsername {
+ margin-right: 30px;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Bem vindo(a)
+
+
+ aceder a
+
+
+
+ |
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/footer/FooterPanel.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/footer/FooterPanel.java
new file mode 100644
index 00000000..1efff397
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/footer/FooterPanel.java
@@ -0,0 +1,35 @@
+package com.evolute.siprp.client.panels.footer;
+
+import com.evolute.siprp.client.panels.utils.AppConstants;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.uibinder.client.UiHandler;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.Widget;
+
+public class FooterPanel extends Composite {
+
+ private static FooterPanelUiBinder uiBinder = GWT.create( FooterPanelUiBinder.class );
+ interface FooterPanelUiBinder extends UiBinder< Widget, FooterPanel > { }
+
+ @UiField protected Image image;
+
+ public FooterPanel()
+ {
+ initWidget( uiBinder.createAndBindUi( this ) );
+ image.setUrl( AppConstants.IMAGES_FOLDER + "logo_evolute_small.png" );
+ image.setTitle( "Evolute" );
+ }
+
+
+ @UiHandler( "image" )
+ protected void onClick( ClickEvent e )
+ {
+ Window.Location.assign( "http://www.evolute.pt" );
+ }
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/footer/FooterPanel.ui.xml b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/footer/FooterPanel.ui.xml
new file mode 100644
index 00000000..2d623252
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/footer/FooterPanel.ui.xml
@@ -0,0 +1,20 @@
+
+
+
+ .footer {
+ margin-top: 50px;
+ text-align: center;
+ }
+ .borderBottom {
+ border-bottom: 1px solid #FFFFFF;
+ }
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginPanel.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginPanel.java
new file mode 100644
index 00000000..49933ca3
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginPanel.java
@@ -0,0 +1,123 @@
+package com.evolute.siprp.client.panels.index.login;
+
+import com.evolute.siprp.client.panels.utils.dialog.CDialogBox;
+import com.evolute.siprp.client.panels.utils.navigation.NavigationConstants;
+import com.evolute.siprp.client.panels.utils.navigation.PageNavigation;
+import com.evolute.siprp.client.vo.Utilizador;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.KeyCodes;
+import com.google.gwt.event.dom.client.KeyUpEvent;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.uibinder.client.UiHandler;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
+import com.google.gwt.user.client.ui.Anchor;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.PasswordTextBox;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.Widget;
+
+public class LoginPanel extends Composite
+{
+
+ private static LoginPanelUiBinder uiBinder = GWT.create( LoginPanelUiBinder.class );
+ interface LoginPanelUiBinder extends UiBinder< Widget, LoginPanel > { }
+
+ @UiField protected TextBox txtUsername;
+ @UiField protected PasswordTextBox txtPassword;
+ @UiField protected Anchor lnkRecoverPwd;
+ @UiField protected Button btnLogin;
+
+ private LoginServiceAsync loginService;
+
+
+ public LoginPanel()
+ {
+ initWidget( uiBinder.createAndBindUi( this ) );
+
+ this.loginService = ( LoginServiceAsync ) GWT.create( LoginService.class );
+ ServiceDefTarget serviceDef = ( ServiceDefTarget ) this.loginService;
+ serviceDef.setServiceEntryPoint( GWT.getModuleBaseURL() + "loginService" );
+
+ lnkRecoverPwd.setText( "Recuperar palavra-chave" );
+ btnLogin.setText( "Entrar" );
+ }
+
+ @UiHandler( {"btnLogin", "lnkRecoverPwd"} )
+ protected void onClick( ClickEvent e )
+ {
+ if ( e.getSource().equals( btnLogin ) )
+ {
+ doLogin();
+ }
+ else if ( e.getSource().equals( lnkRecoverPwd ) )
+ {
+ gotoRecoverPwd();
+ }
+ }
+
+ @UiHandler( {"txtPassword", "txtUsername"} )
+ protected void onKeyUp( KeyUpEvent e )
+ {
+ if ( e.getNativeKeyCode() == KeyCodes.KEY_ENTER )
+ {
+ doLogin();
+ }
+ }
+
+ private void doLogin()
+ {
+ String userName = txtUsername.getText().trim();
+ String passwd = txtPassword.getText().trim();
+
+ if ( ! userName.equals( "" ) )
+ {
+ if ( ! passwd.equals( "" ) )
+ {
+ loginService.doLogin( txtUsername.getText(), txtPassword.getText(), new AsyncCallback< Utilizador >() {
+ @Override
+ public void onFailure( Throwable caught )
+ {
+ Window.alert( "Oops ! Unable to perform login." );
+ }
+
+ @Override
+ public void onSuccess( Utilizador result )
+ {
+ if ( result == null )
+ {
+ CDialogBox box = new CDialogBox( "Dados inv\u00E1lidos", new String[] { "Utilizador e/ou palavra-chave incorrectos." } );
+ box.center();
+ }
+ else
+ {
+ PageNavigation.getProvider().setUserLogged( result );
+ PageNavigation.goPage( NavigationConstants.APP_MAIN_PANEL );
+ }
+ }
+ });
+ }
+ else
+ {
+ CDialogBox box = new CDialogBox( "Erro ...", new String[] { "Tem de introduzir uma palavra-chave." } );
+ box.center();
+ }
+ }
+ else
+ {
+ CDialogBox box = new CDialogBox( "Erro ...", new String[] { "Tem de introduzir um nome de utilizador." } );
+ box.center();
+ }
+ }
+
+
+ private void gotoRecoverPwd()
+ {
+ PageNavigation.goPage( NavigationConstants.RECOVER_PWD_PANEL );
+ }
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginPanel.ui.xml b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginPanel.ui.xml
new file mode 100644
index 00000000..a55a0fbb
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginPanel.ui.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+.loginBox {
+ height: 34px;
+}
+
+
+
+
+
+
+
+
+ Utilizador:
+
+
+
+ Palavra-chave:
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginService.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginService.java
new file mode 100644
index 00000000..22dc10a0
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginService.java
@@ -0,0 +1,9 @@
+package com.evolute.siprp.client.panels.index.login;
+
+import com.evolute.siprp.client.vo.Utilizador;
+import com.google.gwt.user.client.rpc.RemoteService;
+
+public interface LoginService extends RemoteService
+{
+ public Utilizador doLogin( String username, String password );
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginServiceAsync.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginServiceAsync.java
new file mode 100644
index 00000000..25458646
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/login/LoginServiceAsync.java
@@ -0,0 +1,9 @@
+package com.evolute.siprp.client.panels.index.login;
+
+import com.evolute.siprp.client.vo.Utilizador;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+
+public interface LoginServiceAsync
+{
+ public void doLogin( String username, String password, AsyncCallback< Utilizador > callback );
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverPwdPanel.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverPwdPanel.java
new file mode 100644
index 00000000..f9553154
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverPwdPanel.java
@@ -0,0 +1,72 @@
+package com.evolute.siprp.client.panels.index.recover_pwd;
+
+import com.evolute.siprp.client.panels.utils.navigation.NavigationConstants;
+import com.evolute.siprp.client.panels.utils.navigation.PageNavigation;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.uibinder.client.UiHandler;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.Widget;
+
+public class RecoverPwdPanel extends Composite
+{
+
+ private static RecoverPwdPanelUiBinder uiBinder = GWT.create( RecoverPwdPanelUiBinder.class );
+ interface RecoverPwdPanelUiBinder extends UiBinder< Widget, RecoverPwdPanel > { }
+
+ private RecoverServiceAsync recoverService;
+
+ @UiField protected Button btnOK;
+ @UiField protected Button btnCancel;
+ @UiField protected TextBox txtUsername;
+ @UiField protected TextBox txtEmail;
+
+
+ public RecoverPwdPanel()
+ {
+ initWidget( uiBinder.createAndBindUi( this ) );
+
+ this.recoverService = ( RecoverServiceAsync ) GWT.create( RecoverService.class );
+ ServiceDefTarget serviceDef = ( ServiceDefTarget ) this.recoverService;
+ serviceDef.setServiceEntryPoint( GWT.getModuleBaseURL() + "recoverService" );
+
+ btnOK.setText( "OK" );
+ btnCancel.setText( "Cancelar" );
+ }
+
+ @UiHandler( {"btnOK", "btnCancel"} )
+ protected void onClick( ClickEvent e )
+ {
+ if ( e.getSource().equals( btnOK ) )
+ {
+ String userName = txtUsername.getText().trim();
+ String eMail = txtEmail.getText().trim();
+
+ this.recoverService.recoverPWD( userName, eMail, new AsyncCallback< String >() {
+ @Override
+ public void onFailure( Throwable caught )
+ {
+ Window.alert( "Oops !" );
+ }
+
+ @Override
+ public void onSuccess( String result )
+ {
+ Window.alert( result );
+ }
+ });
+ }
+ else if ( e.getSource().equals( btnCancel ) )
+ {
+ PageNavigation.goPage( NavigationConstants.LOGIN_PANEL );
+ }
+ }
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverPwdPanel.ui.xml b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverPwdPanel.ui.xml
new file mode 100644
index 00000000..4346be9d
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverPwdPanel.ui.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Preencha os seguintes dados pessoais
+
+
+ Utilizador:
+
+
+
+ E-mail:
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverService.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverService.java
new file mode 100644
index 00000000..c82136b4
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverService.java
@@ -0,0 +1,8 @@
+package com.evolute.siprp.client.panels.index.recover_pwd;
+
+import com.google.gwt.user.client.rpc.RemoteService;
+
+public interface RecoverService extends RemoteService
+{
+ public String recoverPWD( String username, String email );
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverServiceAsync.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverServiceAsync.java
new file mode 100644
index 00000000..30a8e897
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/index/recover_pwd/RecoverServiceAsync.java
@@ -0,0 +1,8 @@
+package com.evolute.siprp.client.panels.index.recover_pwd;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+
+public interface RecoverServiceAsync
+{
+ public void recoverPWD( String username, String email, AsyncCallback< String > callback );
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/AppConstants.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/AppConstants.java
new file mode 100644
index 00000000..fd3f40d7
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/AppConstants.java
@@ -0,0 +1,24 @@
+package com.evolute.siprp.client.panels.utils;
+
+public interface AppConstants
+{
+
+ public final String IMAGES_FOLDER = "gestaoshst/images/";
+
+ public final String MAIN_DIV = "main";
+
+
+ public final static int ESTADO_SEG = 1;
+ public final static int ESTADO_RH1 = 2;
+ public final static int ESTADO_HS = 3;
+ public final static int ESTADO_RH2 = 4;
+ //public final static int ESTADO_MEDICINA = 5;
+ public final static int ESTADO_CONSOLIDACAO = 5;
+ //public final static int ESTADO_ASSINATURAS = 7;
+ public final static int ESTADO_ASSINATURA_SEG = 6;
+ public final static int ESTADO_ASSINATURA_RH = 7;
+ //public final static int ESTADO_IMPRESSAO = 8;
+ public final static int ESTADO_FECHAR = 8;
+ public final static int ESTADO_CONCLUIDO = 9;
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/dialog/CDialogBox.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/dialog/CDialogBox.java
new file mode 100644
index 00000000..0e392fbd
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/dialog/CDialogBox.java
@@ -0,0 +1,55 @@
+package com.evolute.siprp.client.panels.utils.dialog;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiFactory;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.uibinder.client.UiHandler;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.DialogBox;
+import com.google.gwt.user.client.ui.Widget;
+
+public class CDialogBox extends DialogBox
+{
+
+ private static CDialogBoxUiBinder uiBinder = GWT.create( CDialogBoxUiBinder.class );
+ interface CDialogBoxUiBinder extends UiBinder< Widget, CDialogBox > { }
+
+ @UiField Button btnClose;
+ @UiField ErrorMsgs msgs;
+
+ private String[] errorMsgs;
+
+ public CDialogBox( String[] errorMsg )
+ {
+ this( "Erro ...", errorMsg );
+ }
+
+ public CDialogBox( String title, String[] errorMsg )
+ {
+ this.errorMsgs = errorMsg;
+ setWidget( uiBinder.createAndBindUi( this ) );
+
+ this.setText( title );
+ btnClose.setText( "Fechar" );
+
+ this.setAnimationEnabled( true );
+ this.setGlassEnabled( true );
+
+ this.setAutoHideEnabled( true );
+ btnClose.setFocus( true );
+ }
+
+ @UiFactory ErrorMsgs makeErrorMsgs()
+ {
+ return new ErrorMsgs( errorMsgs );
+ }
+
+ @UiHandler( "btnClose" )
+ void onClick( ClickEvent e )
+ {
+ this.hide();
+ }
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/dialog/CDialogBox.ui.xml b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/dialog/CDialogBox.ui.xml
new file mode 100644
index 00000000..7e99279e
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/dialog/CDialogBox.ui.xml
@@ -0,0 +1,28 @@
+
+
+
+
+ .lblError {
+ text-align: center;
+ margin-top: 30px;
+ margin-bottom: 30px;
+ }
+
+ .btnClose {
+ float: right;
+ }
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/dialog/ErrorMsgs.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/dialog/ErrorMsgs.java
new file mode 100644
index 00000000..cb49a82d
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/dialog/ErrorMsgs.java
@@ -0,0 +1,29 @@
+package com.evolute.siprp.client.panels.utils.dialog;
+
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HasHorizontalAlignment;
+import com.google.gwt.user.client.ui.VerticalPanel;
+
+public class ErrorMsgs extends Composite
+{
+ private VerticalPanel panel;
+ private HTML[] msgElems;
+
+ public ErrorMsgs( String[] msgs )
+ {
+ super();
+
+ this.panel = new VerticalPanel();
+ this.msgElems = new HTML[ msgs.length ];
+ for ( int i = 0; i < msgs.length; i++ )
+ {
+ this.msgElems[ i ] = new HTML( msgs[ i ] );
+ this.panel.add( this.msgElems[ i ] );
+ this.panel.setCellHorizontalAlignment( this.msgElems[ i ], HasHorizontalAlignment.ALIGN_LEFT );
+ }
+
+ this.initWidget( this.panel );
+ }
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/navigation/NavigationConstants.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/navigation/NavigationConstants.java
new file mode 100644
index 00000000..574d9248
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/navigation/NavigationConstants.java
@@ -0,0 +1,11 @@
+package com.evolute.siprp.client.panels.utils.navigation;
+
+public interface NavigationConstants
+{
+
+ public final int LOGIN_PANEL = 1;
+ public final int RECOVER_PWD_PANEL = 2;
+ public final int APP_MAIN_PANEL = 3;
+ public final int ANALISE_ACIDENTES_TRABALHO_PANEL = 4;
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/navigation/PageNavigation.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/navigation/PageNavigation.java
new file mode 100644
index 00000000..27e18750
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/navigation/PageNavigation.java
@@ -0,0 +1,164 @@
+package com.evolute.siprp.client.panels.utils.navigation;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.evolute.siprp.client.panels.apps.MainPanel;
+import com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.AnaliseAcidentesTrabalhoPanel;
+import com.evolute.siprp.client.panels.index.login.LoginPanel;
+import com.evolute.siprp.client.panels.index.recover_pwd.RecoverPwdPanel;
+import com.evolute.siprp.client.panels.utils.AppConstants;
+import com.evolute.siprp.client.vo.Utilizador;
+import com.google.gwt.user.client.History;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.RootPanel;
+
+public class PageNavigation
+{
+ private static PageNavigation instance = null;
+
+ private RootPanel mainPanel;
+ private String containerID;
+
+ private Map< Integer, Object > panelsCache;
+
+ private Utilizador userLogged = null;
+
+
+ private PageNavigation()
+ {
+ this.containerID = AppConstants.MAIN_DIV;
+
+ mainPanel = RootPanel.get( this.containerID );
+ panelsCache = new HashMap< Integer, Object >();
+ }
+
+
+ public static PageNavigation getProvider()
+ {
+ if ( instance == null )
+ {
+ instance = new PageNavigation();
+ }
+ return instance;
+ }
+
+
+ public static void goPage( Integer pageID )
+ {
+ PageNavigation.getProvider().gotoPage( pageID );
+ }
+
+
+ /**
+ * usado quando se faz logout ...
+ * manter login panel e recover se existir ...
+ */
+ public void clearCache()
+ {
+ Map< Integer, Object > newCache = new HashMap< Integer, Object >();
+
+ if ( panelsCache.containsKey( NavigationConstants.LOGIN_PANEL ) )
+ {
+ newCache.put( NavigationConstants.LOGIN_PANEL, panelsCache.get( NavigationConstants.LOGIN_PANEL ) );
+ }
+// if ( panelsCache.containsKey( NavigationConstants.RECOVER_PWD_PANEL ) )
+// {
+// newCache.put( NavigationConstants.RECOVER_PWD_PANEL, panelsCache.get( NavigationConstants.RECOVER_PWD_PANEL ) );
+// }
+
+ panelsCache = newCache;
+ }
+
+
+ public void gotoPage( Composite newWindow )
+ {
+ if ( newWindow != null )
+ {
+ mainPanel.clear();
+ mainPanel.add( newWindow );
+ }
+ }
+
+
+ public void gotoPage( Integer pageID )
+ {
+ switch ( pageID.intValue() )
+ {
+ case NavigationConstants.LOGIN_PANEL:
+ {
+ if ( ! panelsCache.containsKey( NavigationConstants.LOGIN_PANEL ) )
+ {
+ panelsCache.put( NavigationConstants.LOGIN_PANEL, new LoginPanel() );
+ }
+ gotoPage( ( LoginPanel ) panelsCache.get( NavigationConstants.LOGIN_PANEL ) );
+ History.newItem( String.valueOf( NavigationConstants.LOGIN_PANEL ) );
+ break;
+ }
+ case NavigationConstants.RECOVER_PWD_PANEL:
+ {
+ if ( ! panelsCache.containsKey( NavigationConstants.RECOVER_PWD_PANEL ) )
+ {
+ panelsCache.put( NavigationConstants.RECOVER_PWD_PANEL, new RecoverPwdPanel() );
+ }
+ gotoPage( ( RecoverPwdPanel ) panelsCache.get( NavigationConstants.RECOVER_PWD_PANEL ) );
+ History.newItem( String.valueOf( NavigationConstants.RECOVER_PWD_PANEL ) );
+ break;
+ }
+ case NavigationConstants.APP_MAIN_PANEL:
+ {
+ if ( ! isLoggedIn() )
+ {
+ gotoPage( NavigationConstants.LOGIN_PANEL );
+ break;
+ }
+
+ if ( ! panelsCache.containsKey( NavigationConstants.APP_MAIN_PANEL ) )
+ {
+ panelsCache.put( NavigationConstants.APP_MAIN_PANEL, new MainPanel() );
+ }
+ gotoPage( ( MainPanel ) panelsCache.get( NavigationConstants.APP_MAIN_PANEL) );
+ History.newItem( String.valueOf( NavigationConstants.APP_MAIN_PANEL ) );
+ break;
+ }
+ case NavigationConstants.ANALISE_ACIDENTES_TRABALHO_PANEL:
+ {
+ if ( ! isLoggedIn() )
+ {
+ gotoPage( NavigationConstants.LOGIN_PANEL );
+ break;
+ }
+
+ if ( ! panelsCache.containsKey( NavigationConstants.ANALISE_ACIDENTES_TRABALHO_PANEL ) )
+ {
+ panelsCache.put( NavigationConstants.ANALISE_ACIDENTES_TRABALHO_PANEL, new AnaliseAcidentesTrabalhoPanel() );
+ }
+ gotoPage( ( AnaliseAcidentesTrabalhoPanel ) panelsCache.get( NavigationConstants.ANALISE_ACIDENTES_TRABALHO_PANEL ) );
+ History.newItem( String.valueOf( NavigationConstants.ANALISE_ACIDENTES_TRABALHO_PANEL ) );
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+ }
+
+
+ //TODO: find a better place for this stuff ...
+ public boolean isLoggedIn()
+ {
+ return getUserLogged() != null;
+ }
+
+ public Utilizador getUserLogged()
+ {
+ return this.userLogged;
+ }
+
+ public void setUserLogged( Utilizador user )
+ {
+ this.userLogged = user;
+ }
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/permissoes/AccessConstants.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/permissoes/AccessConstants.java
new file mode 100644
index 00000000..b7f37ed2
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/permissoes/AccessConstants.java
@@ -0,0 +1,12 @@
+package com.evolute.siprp.client.panels.utils.permissoes;
+
+public interface AccessConstants
+{
+
+ public static final int VIEW_ACTUAL_PANEL = 1;
+ public static final int VIEW_ACTUAL_PANEL_NOVA_ANALISE_BUTTON = 2;
+
+ public static final int VIEW_SEGUIMENTO_PANEL = 3;
+
+ public static final int VIEW_CONCLUIDO_PANEL = 4;
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/permissoes/PermissionsController.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/permissoes/PermissionsController.java
new file mode 100644
index 00000000..0a564494
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/permissoes/PermissionsController.java
@@ -0,0 +1,76 @@
+package com.evolute.siprp.client.panels.utils.permissoes;
+
+import com.evolute.siprp.client.panels.utils.navigation.PageNavigation;
+import com.evolute.siprp.client.vo.Utilizador;
+
+public class PermissionsController
+{
+ private static PermissionsController instance;
+
+ private Utilizador userLogged = null;
+ private int userType;
+
+ private PermissionsController()
+ {
+
+ }
+
+ public static PermissionsController getController()
+ {
+ if ( instance == null )
+ {
+ instance = new PermissionsController();
+ }
+ return instance;
+ }
+
+
+ public boolean hasPermissionTo( Integer accessConstant )
+ {
+ userLogged = PageNavigation.getProvider().getUserLogged();
+ userType = userLogged.getTipo_utilizador().intValue();
+
+ Boolean canAccess = false;
+
+ switch ( accessConstant.intValue() )
+ {
+ case AccessConstants.VIEW_ACTUAL_PANEL:
+ {
+
+ if ( userType == RolesConstants.TIPO_SEGURANCA
+ || userType == RolesConstants.TIPO_RECURSOS_HUMANOS
+ || userType == RolesConstants.TIPO_HIGIENE_SEGURANCA )
+ {
+ canAccess = true;
+ }
+ break;
+ }
+ case AccessConstants.VIEW_ACTUAL_PANEL_NOVA_ANALISE_BUTTON:
+ {
+ if ( userType == RolesConstants.TIPO_SEGURANCA )
+ {
+ canAccess = true;
+ }
+
+ break;
+ }
+ case AccessConstants.VIEW_SEGUIMENTO_PANEL:
+ {
+ canAccess = true;
+ break;
+ }
+ case AccessConstants.VIEW_CONCLUIDO_PANEL:
+ {
+ canAccess = true;
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+
+ return canAccess;
+ }
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/permissoes/RolesConstants.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/permissoes/RolesConstants.java
new file mode 100644
index 00000000..fecf5386
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/panels/utils/permissoes/RolesConstants.java
@@ -0,0 +1,29 @@
+package com.evolute.siprp.client.panels.utils.permissoes;
+
+public interface RolesConstants
+{
+ /*
+ 1 - "Segurança"
+ 2 - "Recursos Humanos"
+ 3 - "Higiene e Segurança"
+ 5 - "Médico"
+ 6 - "Gestão"
+ 7 - "Direcção-Geral RH"
+ 8 - "Director Siprp"
+ 9 - "Director de Loja"
+ 10 - "Director Nacional de Segurança"
+ */
+
+ //campo 'tipo' em 'tipos_utilizadores'
+
+ public static final Integer TIPO_SEGURANCA = 1;
+ public static final Integer TIPO_RECURSOS_HUMANOS = 2;
+ public static final Integer TIPO_HIGIENE_SEGURANCA = 3;
+ public static final Integer TIPO_MEDICO = 5;
+ public static final Integer TIPO_GESTOR = 6;
+ public static final Integer TIPO_DIRECTOR_GERAL_RECURSOS_HUMANOS = 7;
+ public static final Integer TIPO_DIRECTOR_SIPRP = 8;
+ public static final Integer TIPO_DIRECTOR_LOJA = 9;
+ public static final Integer TIPO_DIRECTOR_NACIONAL_SEGURANCA = 10;
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/vo/ActualTableRow.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/vo/ActualTableRow.java
new file mode 100644
index 00000000..220da872
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/vo/ActualTableRow.java
@@ -0,0 +1,90 @@
+package com.evolute.siprp.client.vo;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class ActualTableRow implements Serializable
+{
+ private static final long serialVersionUID = -6271564752485792179L;
+
+ private Integer id;
+ private Date dataAcidente;
+ private Date dataAbertura;
+ private String nrAcidente;
+ private String POR;
+ private String nomeAcidentado;
+ private Integer estado;
+ private String fase;
+
+
+ public ActualTableRow()
+ {
+
+ }
+
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public Date getDataAcidente() {
+ return dataAcidente;
+ }
+
+ public void setDataAcidente(Date dataAcidente) {
+ this.dataAcidente = dataAcidente;
+ }
+
+ public Date getDataAbertura() {
+ return dataAbertura;
+ }
+
+ public void setDataAbertura(Date dataAbertura) {
+ this.dataAbertura = dataAbertura;
+ }
+
+ public String getNrAcidente() {
+ return nrAcidente;
+ }
+
+ public void setNrAcidente(String nrAcidente) {
+ this.nrAcidente = nrAcidente;
+ }
+
+ public String getPOR() {
+ return POR;
+ }
+
+ public void setPOR(String por) {
+ POR = por;
+ }
+
+ public String getNomeAcidentado() {
+ return nomeAcidentado;
+ }
+
+ public void setNomeAcidentado(String nomeAcidentado) {
+ this.nomeAcidentado = nomeAcidentado;
+ }
+
+ public Integer getEstado() {
+ return estado;
+ }
+
+ public void setEstado(Integer estado) {
+ this.estado = estado;
+ }
+
+ public String getFase() {
+ return fase;
+ }
+
+ public void setFase(String fase) {
+ this.fase = fase;
+ }
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/vo/Utilizador.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/vo/Utilizador.java
new file mode 100644
index 00000000..a4e9282b
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/client/vo/Utilizador.java
@@ -0,0 +1,99 @@
+package com.evolute.siprp.client.vo;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Utilizador implements Serializable
+{
+ private static final long serialVersionUID = -5152657979121031157L;
+
+ private Integer userID = null;
+ private String username = null;
+ private String nome = null;
+ private String email = null;
+
+ private Integer tipo_utilizador = null;
+ private Boolean primeiro_login = null;
+ private Date data_password = null;
+
+ private Integer estabelecimento_id = null;
+ private Boolean responsavel_loja = null;
+
+ public Utilizador()
+ {
+
+ }
+
+ public Integer getUserID() {
+ return userID;
+ }
+
+ public void setUserID(Integer userID) {
+ this.userID = userID;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getNome() {
+ return nome;
+ }
+
+ public void setNome(String nome) {
+ this.nome = nome;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public Integer getTipo_utilizador() {
+ return tipo_utilizador;
+ }
+
+ public void setTipo_utilizador(Integer tipo_utilizador) {
+ this.tipo_utilizador = tipo_utilizador;
+ }
+
+ public Boolean getPrimeiro_login() {
+ return primeiro_login;
+ }
+
+ public void setPrimeiro_login(Boolean primeiro_login) {
+ this.primeiro_login = primeiro_login;
+ }
+
+ public Date getData_password() {
+ return data_password;
+ }
+
+ public void setData_password(Date data_password) {
+ this.data_password = data_password;
+ }
+
+ public Boolean getResponsavel_loja() {
+ return responsavel_loja;
+ }
+
+ public void setResponsavel_loja(Boolean responsavel_loja) {
+ this.responsavel_loja = responsavel_loja;
+ }
+
+ public Integer getEstabelecimento_id() {
+ return estabelecimento_id;
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_id) {
+ this.estabelecimento_id = estabelecimento_id;
+ }
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/public/GestaoSHST.css b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/public/GestaoSHST.css
new file mode 100644
index 00000000..5838e564
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/public/GestaoSHST.css
@@ -0,0 +1,89 @@
+/** Add css rules here for your application. */
+
+body {
+ color: #000;
+ background-color: #BBD400;
+ margin: 0px;
+}
+
+body, th, td, p, div, span, input, button, select, textarea, form, b, strong, i, u, h1, h2, h3, h4, h5, h6, dl, dd, dt, ul, li, ol, option, optgroup, a {
+ font-family: sans-serif;
+ font-size: 12px;
+}
+
+a, a:visited {
+ color: #035899;
+ text-decoration: none;
+}
+
+a:hover {
+ color: #035899;
+ text-decoration: underline;
+ cursor: pointer;
+}
+
+.alignCenterText {
+ text-align: center;
+}
+
+.alignCenter {
+ margin-left: auto;
+ margin-right: auto;
+}
+.alignLeft {
+ float: left;
+}
+.alignRight {
+ float: right;
+}
+
+.font12 {
+ font-size: 12px;
+}
+.font14 {
+ font-size: 14px;
+}
+.font16 {
+ font-size: 16px;
+}
+.font18 {
+ font-size: 18px;
+}
+
+.indexTable {
+ border: 1px solid #000000;
+ width: 432px;
+ padding: 5px;
+}
+
+.lblBold {
+ font-weight: bold;
+}
+
+.inputBox {
+ width: 220px;
+ height: 24px;
+}
+
+.inputBoxRec {
+ width: 432px;
+ height: 24px;
+}
+
+.button {
+ width: 120px;
+ height: 24px;
+ cursor: pointer;
+}
+
+.indexDiv {
+ width: 100%;
+ margin-top: 300px;
+}
+
+.mainDiv {
+ width: 80%;
+ margin-left: auto;
+ margin-right: auto;
+}
+
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/public/images/SIPRP_logo_small.jpg b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/public/images/SIPRP_logo_small.jpg
new file mode 100644
index 00000000..240f2358
Binary files /dev/null and b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/public/images/SIPRP_logo_small.jpg differ
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/public/images/logo_empresa32.jpg b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/public/images/logo_empresa32.jpg
new file mode 100644
index 00000000..2c5be6df
Binary files /dev/null and b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/public/images/logo_empresa32.jpg differ
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/public/images/logo_evolute_small.png b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/public/images/logo_evolute_small.png
new file mode 100644
index 00000000..0198da2b
Binary files /dev/null and b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/public/images/logo_evolute_small.png differ
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/InitDB.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/InitDB.java
new file mode 100644
index 00000000..e2d32803
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/InitDB.java
@@ -0,0 +1,46 @@
+package com.evolute.siprp.server.db;
+
+import com.evolute.utils.Singleton;
+import com.evolute.utils.db.DBManager;
+import com.evolute.utils.db.JDBCManager;
+import com.evolute.utils.db.keyretrievers.PostgresqlAutoKeyRetriever;
+import com.evolute.utils.jdbc.DBStatementExecuter;
+import com.evolute.utils.jdbc.StatementExecuterFactory;
+import com.evolute.utils.jdo.JDOProvider;
+import com.evolute.utils.sql.Insert;
+import com.evolute.utils.sql.SQLQuery;
+import com.evolute.utils.strings.UnicodeChecker;
+
+
+public class InitDB
+{
+ private static DBManager manager;
+ private static JDOProvider jdoProvider;
+
+ private static String dbUsername = "postgres";
+ private static String dbPassword = "Typein";
+ private static String URL = "jdbc:postgresql://storage:5432/siprp_20091203";
+
+ public static void init() throws Exception
+ {
+ if ( manager == null && jdoProvider == null )
+ {
+ System.out.println( "Initializing db manager ..." );
+
+ DBManager manager = new JDBCManager( URL, dbUsername, dbPassword, 100, 80, 80, new SQLQuery[]{} );
+ Singleton.setInstance( Singleton.DEFAULT_DBMANAGER, manager );
+ Insert.setDefaultKeyRetriever( PostgresqlAutoKeyRetriever.RETRIEVER );
+ StatementExecuterFactory.initialize( new DBStatementExecuter( manager.getSharedExecuter( InitDB.class ) ) );
+ UnicodeChecker.setUseDoubleSlash( true );
+
+ initJDOConnection( dbUsername, dbPassword );
+ }
+ }
+
+ private static void initJDOConnection( String username, String password )
+ {
+ jdoProvider = JDOProviderFactory.createInstance( URL, username, password );
+ Singleton.setInstance( Singleton.DEFAULT_JDO_PROVIDER, jdoProvider );
+ }
+
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/JDOProviderFactory.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/JDOProviderFactory.java
new file mode 100644
index 00000000..7f983f06
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/JDOProviderFactory.java
@@ -0,0 +1,65 @@
+package com.evolute.siprp.server.db;
+
+import java.util.Date;
+import java.util.Properties;
+
+import com.evolute.utils.jdo.JDOProvider;
+
+/**
+ *
+ * @author jneto
+ */
+public abstract class JDOProviderFactory
+{
+ public static JDOProvider createInstance(String url, String user, String password)
+ {
+ Date d = new Date();
+ System.out.println("INIT: " + d);
+
+ Properties jpoxProps;
+ jpoxProps = new Properties();
+ jpoxProps.setProperty("javax.jdo.PersistenceManagerFactoryClass", "org.datanucleus.jdo.JDOPersistenceManagerFactory");
+ jpoxProps.setProperty("javax.jdo.option.ConnectionDriverName", "org.postgresql.Driver");
+ jpoxProps.setProperty("datanucleus.identifier.fullyQualifiedNames", "false");
+ jpoxProps.setProperty("datanucleus.identifier.case", "PreserveCase");
+ jpoxProps.setProperty("javax.jdo.option.ConnectionURL", url );
+ jpoxProps.setProperty("javax.jdo.option.ConnectionUserName", user);
+ jpoxProps.setProperty("javax.jdo.option.ConnectionPassword", password);
+ jpoxProps.setProperty("javax.jdo.option.IgnoreCache", "false");
+ jpoxProps.setProperty("javax.jdo.option.NontransactionalRead", "true");
+ jpoxProps.setProperty("javax.jdo.option.RetainValues", "true");
+ jpoxProps.setProperty("datanucleus.autoCreateTables", "false");
+ jpoxProps.setProperty("datanucleus.autoCreateSchema", "false");
+ jpoxProps.setProperty("datanucleus.autoCreateConstraints", "false");
+ jpoxProps.setProperty("datanucleus.autoCreateColumns", "false");
+ jpoxProps.setProperty("datanucleus.validateTables", "false");
+ jpoxProps.setProperty("datanucleus.validateColumns", "false");
+ jpoxProps.setProperty("datanucleus.validateConstraints", "false");
+ jpoxProps.setProperty("datanucleus.rdbms.CheckExistTablesOrViews", "false");
+ jpoxProps.setProperty("datanucleus.rdbms.initializeColumnInfo", "None");
+// jpoxProps.setProperty("datanucleus.fixedDatastore", "true");
+ jpoxProps.setProperty("datanucleus.identifier.defaultSchemaName", "public");
+ jpoxProps.setProperty("datanucleus.autoStartMechanismMode", "Ignored");
+ jpoxProps.setProperty("datanucleus.autoStartMechanism", "None");
+ jpoxProps.setProperty("datanucleus.poid.transactionAttribute", "UsePM");
+ jpoxProps.setProperty("datanucleus.connectionPoolingType", "C3P0");
+ jpoxProps.setProperty("datanucleus.connectionPool.maxPoolSize", "5");
+ jpoxProps.setProperty("datanucleus.connectionPool.minPoolSize", "1");
+ jpoxProps.setProperty("datanucleus.connectionPool.initialPoolSize", "1");
+ jpoxProps.setProperty("datanucleus.catalogName", "siprp");
+
+ // System.setProperty( "datanucleus.schemaName", "public" );
+ // PersistenceManagerFactory pmf =
+ // JDOHelper.getPersistenceManagerFactory( jpoxProps );
+ // // pmf.setOptimistic( true );
+ // System.out.print( "Loading PM: " + new Date() );
+ // // ( ( PersistenceManagerFactoryImpl )pmf ).setTransactionIsolation(
+ // Connection.TRANSACTION_READ_UNCOMMITTED );
+ // // Retrieve a PersistenceManager from the PersistenceManagerFactory.
+ // PersistenceManager pm = pmf.getPersistenceManager();
+ // JDOObject.setPersistentManager( pm );
+ // System.out.println( "PM done " + new Date() );
+ JDOProvider defaultProvider = new JDOProvider( jpoxProps );
+ return defaultProvider;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Acidentados.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Acidentados.java
new file mode 100644
index 00000000..0b104fe6
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Acidentados.java
@@ -0,0 +1,507 @@
+/*
+* Acidentados.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+
+public final class Acidentados implements JDOInnerObject
+{
+ private Integer id;
+ private String nome;
+ private java.util.Date data_nascimento;
+ private String bilhete_identidade;
+ private String morada;
+ private String cod_postal;
+ private String localidade;
+ private String contacto_telefonico;
+ private java.util.Date data_admissao;
+ private String funcao;
+ private Integer trabalhador_id;
+ private String turno;
+ private String numero_mecanografico;
+ private String nome_superior_hierarquico;
+ private String email_superior_hierarquico;
+ private String estabelecimento_origem;
+ private java.util.Date data_email_superior_hierarquico;
+
+ public Acidentados()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == AcidentadosDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == AcidentadosDataAuto.NOME )
+ {
+ return nome;
+ }
+ else if( fieldName == AcidentadosDataAuto.DATA_NASCIMENTO )
+ {
+ return data_nascimento;
+ }
+ else if( fieldName == AcidentadosDataAuto.BILHETE_IDENTIDADE )
+ {
+ return bilhete_identidade;
+ }
+ else if( fieldName == AcidentadosDataAuto.MORADA )
+ {
+ return morada;
+ }
+ else if( fieldName == AcidentadosDataAuto.COD_POSTAL )
+ {
+ return cod_postal;
+ }
+ else if( fieldName == AcidentadosDataAuto.LOCALIDADE )
+ {
+ return localidade;
+ }
+ else if( fieldName == AcidentadosDataAuto.CONTACTO_TELEFONICO )
+ {
+ return contacto_telefonico;
+ }
+ else if( fieldName == AcidentadosDataAuto.DATA_ADMISSAO )
+ {
+ return data_admissao;
+ }
+ else if( fieldName == AcidentadosDataAuto.FUNCAO )
+ {
+ return funcao;
+ }
+ else if( fieldName == AcidentadosDataAuto.TRABALHADOR_ID )
+ {
+ return trabalhador_id;
+ }
+ else if( fieldName == AcidentadosDataAuto.TURNO )
+ {
+ return turno;
+ }
+ else if( fieldName == AcidentadosDataAuto.NUMERO_MECANOGRAFICO )
+ {
+ return numero_mecanografico;
+ }
+ else if( fieldName == AcidentadosDataAuto.NOME_SUPERIOR_HIERARQUICO )
+ {
+ return nome_superior_hierarquico;
+ }
+ else if( fieldName == AcidentadosDataAuto.EMAIL_SUPERIOR_HIERARQUICO )
+ {
+ return email_superior_hierarquico;
+ }
+ else if( fieldName == AcidentadosDataAuto.ESTABELECIMENTO_ORIGEM )
+ {
+ return estabelecimento_origem;
+ }
+ else if( fieldName == AcidentadosDataAuto.DATA_EMAIL_SUPERIOR_HIERARQUICO )
+ {
+ return data_email_superior_hierarquico;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.NOME ) )
+ {
+ return nome;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.DATA_NASCIMENTO ) )
+ {
+ return data_nascimento;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.BILHETE_IDENTIDADE ) )
+ {
+ return bilhete_identidade;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.MORADA ) )
+ {
+ return morada;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.COD_POSTAL ) )
+ {
+ return cod_postal;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.LOCALIDADE ) )
+ {
+ return localidade;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.CONTACTO_TELEFONICO ) )
+ {
+ return contacto_telefonico;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.DATA_ADMISSAO ) )
+ {
+ return data_admissao;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.FUNCAO ) )
+ {
+ return funcao;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.TRABALHADOR_ID ) )
+ {
+ return trabalhador_id;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.TURNO ) )
+ {
+ return turno;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.NUMERO_MECANOGRAFICO ) )
+ {
+ return numero_mecanografico;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.NOME_SUPERIOR_HIERARQUICO ) )
+ {
+ return nome_superior_hierarquico;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.EMAIL_SUPERIOR_HIERARQUICO ) )
+ {
+ return email_superior_hierarquico;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.ESTABELECIMENTO_ORIGEM ) )
+ {
+ return estabelecimento_origem;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.DATA_EMAIL_SUPERIOR_HIERARQUICO ) )
+ {
+ return data_email_superior_hierarquico;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == AcidentadosDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == AcidentadosDataAuto.NOME )
+ {
+ nome = ( String ) value;
+ }
+ else if( fieldName == AcidentadosDataAuto.DATA_NASCIMENTO )
+ {
+ data_nascimento = ( java.util.Date ) value;
+ }
+ else if( fieldName == AcidentadosDataAuto.BILHETE_IDENTIDADE )
+ {
+ bilhete_identidade = ( String ) value;
+ }
+ else if( fieldName == AcidentadosDataAuto.MORADA )
+ {
+ morada = ( String ) value;
+ }
+ else if( fieldName == AcidentadosDataAuto.COD_POSTAL )
+ {
+ cod_postal = ( String ) value;
+ }
+ else if( fieldName == AcidentadosDataAuto.LOCALIDADE )
+ {
+ localidade = ( String ) value;
+ }
+ else if( fieldName == AcidentadosDataAuto.CONTACTO_TELEFONICO )
+ {
+ contacto_telefonico = ( String ) value;
+ }
+ else if( fieldName == AcidentadosDataAuto.DATA_ADMISSAO )
+ {
+ data_admissao = ( java.util.Date ) value;
+ }
+ else if( fieldName == AcidentadosDataAuto.FUNCAO )
+ {
+ funcao = ( String ) value;
+ }
+ else if( fieldName == AcidentadosDataAuto.TRABALHADOR_ID )
+ {
+ trabalhador_id = ( Integer ) value;
+ }
+ else if( fieldName == AcidentadosDataAuto.TURNO )
+ {
+ turno = ( String ) value;
+ }
+ else if( fieldName == AcidentadosDataAuto.NUMERO_MECANOGRAFICO )
+ {
+ numero_mecanografico = ( String ) value;
+ }
+ else if( fieldName == AcidentadosDataAuto.NOME_SUPERIOR_HIERARQUICO )
+ {
+ nome_superior_hierarquico = ( String ) value;
+ }
+ else if( fieldName == AcidentadosDataAuto.EMAIL_SUPERIOR_HIERARQUICO )
+ {
+ email_superior_hierarquico = ( String ) value;
+ }
+ else if( fieldName == AcidentadosDataAuto.ESTABELECIMENTO_ORIGEM )
+ {
+ estabelecimento_origem = ( String ) value;
+ }
+ else if( fieldName == AcidentadosDataAuto.DATA_EMAIL_SUPERIOR_HIERARQUICO )
+ {
+ data_email_superior_hierarquico = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.NOME ) )
+ {
+ nome = ( String ) value;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.DATA_NASCIMENTO ) )
+ {
+ data_nascimento = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.BILHETE_IDENTIDADE ) )
+ {
+ bilhete_identidade = ( String ) value;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.MORADA ) )
+ {
+ morada = ( String ) value;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.COD_POSTAL ) )
+ {
+ cod_postal = ( String ) value;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.LOCALIDADE ) )
+ {
+ localidade = ( String ) value;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.CONTACTO_TELEFONICO ) )
+ {
+ contacto_telefonico = ( String ) value;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.DATA_ADMISSAO ) )
+ {
+ data_admissao = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.FUNCAO ) )
+ {
+ funcao = ( String ) value;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.TRABALHADOR_ID ) )
+ {
+ trabalhador_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.TURNO ) )
+ {
+ turno = ( String ) value;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.NUMERO_MECANOGRAFICO ) )
+ {
+ numero_mecanografico = ( String ) value;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.NOME_SUPERIOR_HIERARQUICO ) )
+ {
+ nome_superior_hierarquico = ( String ) value;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.EMAIL_SUPERIOR_HIERARQUICO ) )
+ {
+ email_superior_hierarquico = ( String ) value;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.ESTABELECIMENTO_ORIGEM ) )
+ {
+ estabelecimento_origem = ( String ) value;
+ }
+ else if( fieldName.equals( AcidentadosDataAuto.DATA_EMAIL_SUPERIOR_HIERARQUICO ) )
+ {
+ data_email_superior_hierarquico = ( java.util.Date ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getNome()
+ {
+ return nome;
+ }
+
+ public void setNome(String nomeValue )
+ {
+ this.nome = nomeValue;
+ }
+
+ public java.util.Date getData_nascimento()
+ {
+ return data_nascimento;
+ }
+
+ public void setData_nascimento(java.util.Date data_nascimentoValue )
+ {
+ this.data_nascimento = data_nascimentoValue;
+ }
+
+ public String getBilhete_identidade()
+ {
+ return bilhete_identidade;
+ }
+
+ public void setBilhete_identidade(String bilhete_identidadeValue )
+ {
+ this.bilhete_identidade = bilhete_identidadeValue;
+ }
+
+ public String getMorada()
+ {
+ return morada;
+ }
+
+ public void setMorada(String moradaValue )
+ {
+ this.morada = moradaValue;
+ }
+
+ public String getCod_postal()
+ {
+ return cod_postal;
+ }
+
+ public void setCod_postal(String cod_postalValue )
+ {
+ this.cod_postal = cod_postalValue;
+ }
+
+ public String getLocalidade()
+ {
+ return localidade;
+ }
+
+ public void setLocalidade(String localidadeValue )
+ {
+ this.localidade = localidadeValue;
+ }
+
+ public String getContacto_telefonico()
+ {
+ return contacto_telefonico;
+ }
+
+ public void setContacto_telefonico(String contacto_telefonicoValue )
+ {
+ this.contacto_telefonico = contacto_telefonicoValue;
+ }
+
+ public java.util.Date getData_admissao()
+ {
+ return data_admissao;
+ }
+
+ public void setData_admissao(java.util.Date data_admissaoValue )
+ {
+ this.data_admissao = data_admissaoValue;
+ }
+
+ public String getFuncao()
+ {
+ return funcao;
+ }
+
+ public void setFuncao(String funcaoValue )
+ {
+ this.funcao = funcaoValue;
+ }
+
+ public Integer getTrabalhador_id()
+ {
+ return trabalhador_id;
+ }
+
+ public void setTrabalhador_id(Integer trabalhador_idValue )
+ {
+ this.trabalhador_id = trabalhador_idValue;
+ }
+
+ public String getTurno()
+ {
+ return turno;
+ }
+
+ public void setTurno(String turnoValue )
+ {
+ this.turno = turnoValue;
+ }
+
+ public String getNumero_mecanografico()
+ {
+ return numero_mecanografico;
+ }
+
+ public void setNumero_mecanografico(String numero_mecanograficoValue )
+ {
+ this.numero_mecanografico = numero_mecanograficoValue;
+ }
+
+ public String getNome_superior_hierarquico()
+ {
+ return nome_superior_hierarquico;
+ }
+
+ public void setNome_superior_hierarquico(String nome_superior_hierarquicoValue )
+ {
+ this.nome_superior_hierarquico = nome_superior_hierarquicoValue;
+ }
+
+ public String getEmail_superior_hierarquico()
+ {
+ return email_superior_hierarquico;
+ }
+
+ public void setEmail_superior_hierarquico(String email_superior_hierarquicoValue )
+ {
+ this.email_superior_hierarquico = email_superior_hierarquicoValue;
+ }
+
+ public String getEstabelecimento_origem()
+ {
+ return estabelecimento_origem;
+ }
+
+ public void setEstabelecimento_origem(String estabelecimento_origemValue )
+ {
+ this.estabelecimento_origem = estabelecimento_origemValue;
+ }
+
+ public java.util.Date getData_email_superior_hierarquico()
+ {
+ return data_email_superior_hierarquico;
+ }
+
+ public void setData_email_superior_hierarquico(java.util.Date data_email_superior_hierarquicoValue )
+ {
+ this.data_email_superior_hierarquico = data_email_superior_hierarquicoValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return AcidentadosDataAuto.class;
+ }
+
+ public AcidentadosDataAuto getOuterClassInstance()
+ {
+ AcidentadosDataAuto outerObj = new AcidentadosDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AcidentadosData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AcidentadosData.java
new file mode 100644
index 00000000..1e0d1d88
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AcidentadosData.java
@@ -0,0 +1,18 @@
+/*
+* AcidentadosDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+
+public final class AcidentadosData extends com.evolute.siprp.server.db.data.siprp.AcidentadosDataAuto
+{
+
+ public AcidentadosData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AcidentadosDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AcidentadosDataAuto.java
new file mode 100644
index 00000000..fc195305
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AcidentadosDataAuto.java
@@ -0,0 +1,283 @@
+/*
+* AcidentadosDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class AcidentadosDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "acidentados";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "acidentados.id";
+ public static final String NOME = "nome";
+ public static final String NOME_FULL = "acidentados.nome";
+ public static final String DATA_NASCIMENTO = "data_nascimento";
+ public static final String DATA_NASCIMENTO_FULL = "acidentados.data_nascimento";
+ public static final String BILHETE_IDENTIDADE = "bilhete_identidade";
+ public static final String BILHETE_IDENTIDADE_FULL = "acidentados.bilhete_identidade";
+ public static final String MORADA = "morada";
+ public static final String MORADA_FULL = "acidentados.morada";
+ public static final String COD_POSTAL = "cod_postal";
+ public static final String COD_POSTAL_FULL = "acidentados.cod_postal";
+ public static final String LOCALIDADE = "localidade";
+ public static final String LOCALIDADE_FULL = "acidentados.localidade";
+ public static final String CONTACTO_TELEFONICO = "contacto_telefonico";
+ public static final String CONTACTO_TELEFONICO_FULL = "acidentados.contacto_telefonico";
+ public static final String DATA_ADMISSAO = "data_admissao";
+ public static final String DATA_ADMISSAO_FULL = "acidentados.data_admissao";
+ public static final String FUNCAO = "funcao";
+ public static final String FUNCAO_FULL = "acidentados.funcao";
+ public static final String TRABALHADOR_ID = "trabalhador_id";
+ public static final String TRABALHADOR_ID_FULL = "acidentados.trabalhador_id";
+ public static final String TURNO = "turno";
+ public static final String TURNO_FULL = "acidentados.turno";
+ public static final String NUMERO_MECANOGRAFICO = "numero_mecanografico";
+ public static final String NUMERO_MECANOGRAFICO_FULL = "acidentados.numero_mecanografico";
+ public static final String NOME_SUPERIOR_HIERARQUICO = "nome_superior_hierarquico";
+ public static final String NOME_SUPERIOR_HIERARQUICO_FULL = "acidentados.nome_superior_hierarquico";
+ public static final String EMAIL_SUPERIOR_HIERARQUICO = "email_superior_hierarquico";
+ public static final String EMAIL_SUPERIOR_HIERARQUICO_FULL = "acidentados.email_superior_hierarquico";
+ public static final String ESTABELECIMENTO_ORIGEM = "estabelecimento_origem";
+ public static final String ESTABELECIMENTO_ORIGEM_FULL = "acidentados.estabelecimento_origem";
+ public static final String DATA_EMAIL_SUPERIOR_HIERARQUICO = "data_email_superior_hierarquico";
+ public static final String DATA_EMAIL_SUPERIOR_HIERARQUICO_FULL = "acidentados.data_email_superior_hierarquico";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ NOME, DATA_NASCIMENTO, BILHETE_IDENTIDADE, MORADA, COD_POSTAL, LOCALIDADE,
+ CONTACTO_TELEFONICO, DATA_ADMISSAO, FUNCAO, TRABALHADOR_ID, TURNO,
+ NUMERO_MECANOGRAFICO, NOME_SUPERIOR_HIERARQUICO,
+ EMAIL_SUPERIOR_HIERARQUICO, ESTABELECIMENTO_ORIGEM,
+ DATA_EMAIL_SUPERIOR_HIERARQUICO, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, NOME, DATA_NASCIMENTO, BILHETE_IDENTIDADE, MORADA, COD_POSTAL, LOCALIDADE,
+ CONTACTO_TELEFONICO, DATA_ADMISSAO, FUNCAO, TRABALHADOR_ID, TURNO,
+ NUMERO_MECANOGRAFICO, NOME_SUPERIOR_HIERARQUICO,
+ EMAIL_SUPERIOR_HIERARQUICO, ESTABELECIMENTO_ORIGEM,
+ DATA_EMAIL_SUPERIOR_HIERARQUICO, };
+
+ private Map dataHash;
+
+ public AcidentadosDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getNome()
+ {
+ return (String) get(NOME);
+ }
+
+ public void setNome(String nomeValue )
+ {
+ this.set(NOME, nomeValue );
+ }
+
+ public java.util.Date getData_nascimento()
+ {
+ return (java.util.Date) get(DATA_NASCIMENTO);
+ }
+
+ public void setData_nascimento(java.util.Date data_nascimentoValue )
+ {
+ this.set(DATA_NASCIMENTO, data_nascimentoValue );
+ }
+
+ public String getBilhete_identidade()
+ {
+ return (String) get(BILHETE_IDENTIDADE);
+ }
+
+ public void setBilhete_identidade(String bilhete_identidadeValue )
+ {
+ this.set(BILHETE_IDENTIDADE, bilhete_identidadeValue );
+ }
+
+ public String getMorada()
+ {
+ return (String) get(MORADA);
+ }
+
+ public void setMorada(String moradaValue )
+ {
+ this.set(MORADA, moradaValue );
+ }
+
+ public String getCod_postal()
+ {
+ return (String) get(COD_POSTAL);
+ }
+
+ public void setCod_postal(String cod_postalValue )
+ {
+ this.set(COD_POSTAL, cod_postalValue );
+ }
+
+ public String getLocalidade()
+ {
+ return (String) get(LOCALIDADE);
+ }
+
+ public void setLocalidade(String localidadeValue )
+ {
+ this.set(LOCALIDADE, localidadeValue );
+ }
+
+ public String getContacto_telefonico()
+ {
+ return (String) get(CONTACTO_TELEFONICO);
+ }
+
+ public void setContacto_telefonico(String contacto_telefonicoValue )
+ {
+ this.set(CONTACTO_TELEFONICO, contacto_telefonicoValue );
+ }
+
+ public java.util.Date getData_admissao()
+ {
+ return (java.util.Date) get(DATA_ADMISSAO);
+ }
+
+ public void setData_admissao(java.util.Date data_admissaoValue )
+ {
+ this.set(DATA_ADMISSAO, data_admissaoValue );
+ }
+
+ public String getFuncao()
+ {
+ return (String) get(FUNCAO);
+ }
+
+ public void setFuncao(String funcaoValue )
+ {
+ this.set(FUNCAO, funcaoValue );
+ }
+
+ public Integer getTrabalhador_id()
+ {
+ return (Integer) get(TRABALHADOR_ID);
+ }
+
+ public void setTrabalhador_id(Integer trabalhador_idValue )
+ {
+ this.set(TRABALHADOR_ID, trabalhador_idValue );
+ }
+
+ public String getTurno()
+ {
+ return (String) get(TURNO);
+ }
+
+ public void setTurno(String turnoValue )
+ {
+ this.set(TURNO, turnoValue );
+ }
+
+ public String getNumero_mecanografico()
+ {
+ return (String) get(NUMERO_MECANOGRAFICO);
+ }
+
+ public void setNumero_mecanografico(String numero_mecanograficoValue )
+ {
+ this.set(NUMERO_MECANOGRAFICO, numero_mecanograficoValue );
+ }
+
+ public String getNome_superior_hierarquico()
+ {
+ return (String) get(NOME_SUPERIOR_HIERARQUICO);
+ }
+
+ public void setNome_superior_hierarquico(String nome_superior_hierarquicoValue )
+ {
+ this.set(NOME_SUPERIOR_HIERARQUICO, nome_superior_hierarquicoValue );
+ }
+
+ public String getEmail_superior_hierarquico()
+ {
+ return (String) get(EMAIL_SUPERIOR_HIERARQUICO);
+ }
+
+ public void setEmail_superior_hierarquico(String email_superior_hierarquicoValue )
+ {
+ this.set(EMAIL_SUPERIOR_HIERARQUICO, email_superior_hierarquicoValue );
+ }
+
+ public String getEstabelecimento_origem()
+ {
+ return (String) get(ESTABELECIMENTO_ORIGEM);
+ }
+
+ public void setEstabelecimento_origem(String estabelecimento_origemValue )
+ {
+ this.set(ESTABELECIMENTO_ORIGEM, estabelecimento_origemValue );
+ }
+
+ public java.util.Date getData_email_superior_hierarquico()
+ {
+ return (java.util.Date) get(DATA_EMAIL_SUPERIOR_HIERARQUICO);
+ }
+
+ public void setData_email_superior_hierarquico(java.util.Date data_email_superior_hierarquicoValue )
+ {
+ this.set(DATA_EMAIL_SUPERIOR_HIERARQUICO, data_email_superior_hierarquicoValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return Acidentados.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Actualizacao.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Actualizacao.java
new file mode 100644
index 00000000..9fd919c0
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Actualizacao.java
@@ -0,0 +1,44 @@
+/*
+* Actualizacao.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+
+public final class Actualizacao implements JDOInnerObject
+{
+
+ public Actualizacao()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ }
+
+ public Class getOuterClass()
+ {
+ return ActualizacaoDataAuto.class;
+ }
+
+ public ActualizacaoDataAuto getOuterClassInstance()
+ {
+ ActualizacaoDataAuto outerObj = new ActualizacaoDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Object getJDOPrimaryKey()
+ {
+ return null;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ActualizacaoData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ActualizacaoData.java
new file mode 100644
index 00000000..2cad0c37
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ActualizacaoData.java
@@ -0,0 +1,18 @@
+/*
+* ActualizacaoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+
+public final class ActualizacaoData extends com.evolute.siprp.server.db.data.siprp.ActualizacaoDataAuto
+{
+
+ public ActualizacaoData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ActualizacaoDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ActualizacaoDataAuto.java
new file mode 100644
index 00000000..acabffc2
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ActualizacaoDataAuto.java
@@ -0,0 +1,67 @@
+/*
+* ActualizacaoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class ActualizacaoDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "actualizacao";
+
+
+ public static final String FIELD_NAMES[] = new String[]{
+ };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ };
+
+ private Map dataHash;
+
+ public ActualizacaoDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return Actualizacao.class;
+ }
+
+ public Object getJDOPrimaryKey()
+ {
+ return null;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AnalisesAcidentes.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AnalisesAcidentes.java
new file mode 100644
index 00000000..f04bb8e8
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AnalisesAcidentes.java
@@ -0,0 +1,2775 @@
+/*
+* AnalisesAcidentes.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+
+public final class AnalisesAcidentes implements JDOInnerObject
+{
+ private Integer id;
+ private java.util.Date data_acidente;
+ private Integer acidentado_id;
+ private Integer estado;
+ private Integer estabelecimento_id;
+ private Integer horas_turno;
+ private String local_trabalho;
+ private String tarefa;
+ private String substancias;
+ private String condicoes;
+ private String testemunhas;
+ private String descricao;
+ private String conclusoes;
+ private String accoes;
+ private java.sql.Time hora_acidente;
+ private String formacao_shst;
+ private String formacao_shst_nao_porque;
+ private String outros_acidentes_com_colaborador;
+ private Integer nr_acidentes_com_colaborador;
+ private Integer nr_relatorio_acidente_colaborador1;
+ private Integer nr_relatorio_acidente_colaborador2;
+ private Integer nr_relatorio_acidente_colaborador3;
+ private Integer nr_relatorio_acidente_colaborador4;
+ private String acidentes_outros_colaboradores;
+ private Integer nr_acidentes_outros_colaboradores;
+ private Integer nr_relatorio_acidente_outros_colaboradores1;
+ private Integer nr_relatorio_acidente_outros_colaboradores2;
+ private Integer nr_relatorio_acidente_outros_colaboradores3;
+ private Integer nr_relatorio_acidente_outros_colaboradores4;
+ private String lesao_cabeca;
+ private String lesao_pescoco;
+ private String lesao_tronco;
+ private String lesao_membro_sup_dir;
+ private String lesao_membro_sup_esq;
+ private String lesao_membro_inf_dir;
+ private String lesao_membro_inf_esq;
+ private String especif1;
+ private String especif2;
+ private String especif3;
+ private String especif4;
+ private String tipo_incapacidade;
+ private Integer coef_incapacidade;
+ private java.util.Date data_aval_incapacidade;
+ private java.util.Date data_rev_incapacidade;
+ private java.util.Date periodo_incapacidade_de;
+ private java.util.Date periodo_incapacidade_a;
+ private String img_flexao;
+ private String img_ext1;
+ private String img_ext2;
+ private String img_cab2;
+ private String img_cab3;
+ private String img_ma2;
+ private String img_ma3;
+ private String img_ma5;
+ private String img_ma6;
+ private String img_ma8;
+ private String img_ma10;
+ private Integer restricao_carga;
+ private String restricao_motricidade;
+ private String restricao_conducao;
+ private String restricao_vibracoes;
+ private String restricao_outras;
+ private String med_observ;
+ private String tipo_lesao;
+ private String img_rot1;
+ private String img_rot2;
+ private String img_cab1;
+ private String img_cab4;
+ private String img_ma1;
+ private String img_ma4;
+ private String img_ma7;
+ private String img_ma9;
+ private Integer empresa_id;
+ private Integer medico_id;
+ private Integer tecnico_saude_id;
+ private String analise_nr;
+ private Integer estado_assinatura;
+ private String ass_resp_seg;
+ private String ass_resp_rh;
+ private java.util.Date data_consolidacao;
+ private java.util.Date data_assinatura_seg;
+ private java.util.Date data_assinatura_rh;
+ private String ass_consolidacao;
+ private String nome_resp_seg;
+ private String nome_resp_rh;
+ private Integer causas;
+ private Integer estado_antes_correcao;
+ private String observacoes_correcao;
+ private String correcao;
+ private String ass_superior;
+ private String nome_superior;
+ private java.util.Date data_assinatura_superior;
+ private String averiguador;
+ private String averiguacao_posterior;
+ private String averiguacao_obs;
+ private java.util.Date data_inicio_processo;
+ private String nome_resp_consolidacao;
+ private Integer seccao_id;
+ private Integer departamento_id;
+ private Integer rh_fase4;
+ private String apagada;
+
+ public AnalisesAcidentes()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == AnalisesAcidentesDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.DATA_ACIDENTE )
+ {
+ return data_acidente;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ACIDENTADO_ID )
+ {
+ return acidentado_id;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ESTADO )
+ {
+ return estado;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ESTABELECIMENTO_ID )
+ {
+ return estabelecimento_id;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.HORAS_TURNO )
+ {
+ return horas_turno;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.LOCAL_TRABALHO )
+ {
+ return local_trabalho;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.TAREFA )
+ {
+ return tarefa;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.SUBSTANCIAS )
+ {
+ return substancias;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.CONDICOES )
+ {
+ return condicoes;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.TESTEMUNHAS )
+ {
+ return testemunhas;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.DESCRICAO )
+ {
+ return descricao;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.CONCLUSOES )
+ {
+ return conclusoes;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ACCOES )
+ {
+ return accoes;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.HORA_ACIDENTE )
+ {
+ return hora_acidente;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.FORMACAO_SHST )
+ {
+ return formacao_shst;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.FORMACAO_SHST_NAO_PORQUE )
+ {
+ return formacao_shst_nao_porque;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.OUTROS_ACIDENTES_COM_COLABORADOR )
+ {
+ return outros_acidentes_com_colaborador;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NR_ACIDENTES_COM_COLABORADOR )
+ {
+ return nr_acidentes_com_colaborador;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR1 )
+ {
+ return nr_relatorio_acidente_colaborador1;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR2 )
+ {
+ return nr_relatorio_acidente_colaborador2;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR3 )
+ {
+ return nr_relatorio_acidente_colaborador3;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR4 )
+ {
+ return nr_relatorio_acidente_colaborador4;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ACIDENTES_OUTROS_COLABORADORES )
+ {
+ return acidentes_outros_colaboradores;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NR_ACIDENTES_OUTROS_COLABORADORES )
+ {
+ return nr_acidentes_outros_colaboradores;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1 )
+ {
+ return nr_relatorio_acidente_outros_colaboradores1;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2 )
+ {
+ return nr_relatorio_acidente_outros_colaboradores2;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3 )
+ {
+ return nr_relatorio_acidente_outros_colaboradores3;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4 )
+ {
+ return nr_relatorio_acidente_outros_colaboradores4;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.LESAO_CABECA )
+ {
+ return lesao_cabeca;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.LESAO_PESCOCO )
+ {
+ return lesao_pescoco;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.LESAO_TRONCO )
+ {
+ return lesao_tronco;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.LESAO_MEMBRO_SUP_DIR )
+ {
+ return lesao_membro_sup_dir;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.LESAO_MEMBRO_SUP_ESQ )
+ {
+ return lesao_membro_sup_esq;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.LESAO_MEMBRO_INF_DIR )
+ {
+ return lesao_membro_inf_dir;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.LESAO_MEMBRO_INF_ESQ )
+ {
+ return lesao_membro_inf_esq;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ESPECIF1 )
+ {
+ return especif1;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ESPECIF2 )
+ {
+ return especif2;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ESPECIF3 )
+ {
+ return especif3;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ESPECIF4 )
+ {
+ return especif4;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.TIPO_INCAPACIDADE )
+ {
+ return tipo_incapacidade;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.COEF_INCAPACIDADE )
+ {
+ return coef_incapacidade;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.DATA_AVAL_INCAPACIDADE )
+ {
+ return data_aval_incapacidade;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.DATA_REV_INCAPACIDADE )
+ {
+ return data_rev_incapacidade;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.PERIODO_INCAPACIDADE_DE )
+ {
+ return periodo_incapacidade_de;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.PERIODO_INCAPACIDADE_A )
+ {
+ return periodo_incapacidade_a;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_FLEXAO )
+ {
+ return img_flexao;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_EXT1 )
+ {
+ return img_ext1;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_EXT2 )
+ {
+ return img_ext2;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_CAB2 )
+ {
+ return img_cab2;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_CAB3 )
+ {
+ return img_cab3;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA2 )
+ {
+ return img_ma2;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA3 )
+ {
+ return img_ma3;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA5 )
+ {
+ return img_ma5;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA6 )
+ {
+ return img_ma6;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA8 )
+ {
+ return img_ma8;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA10 )
+ {
+ return img_ma10;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.RESTRICAO_CARGA )
+ {
+ return restricao_carga;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.RESTRICAO_MOTRICIDADE )
+ {
+ return restricao_motricidade;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.RESTRICAO_CONDUCAO )
+ {
+ return restricao_conducao;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.RESTRICAO_VIBRACOES )
+ {
+ return restricao_vibracoes;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.RESTRICAO_OUTRAS )
+ {
+ return restricao_outras;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.MED_OBSERV )
+ {
+ return med_observ;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.TIPO_LESAO )
+ {
+ return tipo_lesao;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_ROT1 )
+ {
+ return img_rot1;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_ROT2 )
+ {
+ return img_rot2;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_CAB1 )
+ {
+ return img_cab1;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_CAB4 )
+ {
+ return img_cab4;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA1 )
+ {
+ return img_ma1;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA4 )
+ {
+ return img_ma4;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA7 )
+ {
+ return img_ma7;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA9 )
+ {
+ return img_ma9;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.EMPRESA_ID )
+ {
+ return empresa_id;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.MEDICO_ID )
+ {
+ return medico_id;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.TECNICO_SAUDE_ID )
+ {
+ return tecnico_saude_id;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ANALISE_NR )
+ {
+ return analise_nr;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ESTADO_ASSINATURA )
+ {
+ return estado_assinatura;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ASS_RESP_SEG )
+ {
+ return ass_resp_seg;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ASS_RESP_RH )
+ {
+ return ass_resp_rh;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.DATA_CONSOLIDACAO )
+ {
+ return data_consolidacao;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.DATA_ASSINATURA_SEG )
+ {
+ return data_assinatura_seg;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.DATA_ASSINATURA_RH )
+ {
+ return data_assinatura_rh;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ASS_CONSOLIDACAO )
+ {
+ return ass_consolidacao;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NOME_RESP_SEG )
+ {
+ return nome_resp_seg;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NOME_RESP_RH )
+ {
+ return nome_resp_rh;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.CAUSAS )
+ {
+ return causas;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ESTADO_ANTES_CORRECAO )
+ {
+ return estado_antes_correcao;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.OBSERVACOES_CORRECAO )
+ {
+ return observacoes_correcao;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.CORRECAO )
+ {
+ return correcao;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ASS_SUPERIOR )
+ {
+ return ass_superior;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NOME_SUPERIOR )
+ {
+ return nome_superior;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.DATA_ASSINATURA_SUPERIOR )
+ {
+ return data_assinatura_superior;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.AVERIGUADOR )
+ {
+ return averiguador;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.AVERIGUACAO_POSTERIOR )
+ {
+ return averiguacao_posterior;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.AVERIGUACAO_OBS )
+ {
+ return averiguacao_obs;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.DATA_INICIO_PROCESSO )
+ {
+ return data_inicio_processo;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NOME_RESP_CONSOLIDACAO )
+ {
+ return nome_resp_consolidacao;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.SECCAO_ID )
+ {
+ return seccao_id;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.DEPARTAMENTO_ID )
+ {
+ return departamento_id;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.RH_FASE4 )
+ {
+ return rh_fase4;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.APAGADA )
+ {
+ return apagada;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_ACIDENTE ) )
+ {
+ return data_acidente;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ACIDENTADO_ID ) )
+ {
+ return acidentado_id;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ESTADO ) )
+ {
+ return estado;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ESTABELECIMENTO_ID ) )
+ {
+ return estabelecimento_id;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.HORAS_TURNO ) )
+ {
+ return horas_turno;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.LOCAL_TRABALHO ) )
+ {
+ return local_trabalho;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.TAREFA ) )
+ {
+ return tarefa;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.SUBSTANCIAS ) )
+ {
+ return substancias;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.CONDICOES ) )
+ {
+ return condicoes;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.TESTEMUNHAS ) )
+ {
+ return testemunhas;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.DESCRICAO ) )
+ {
+ return descricao;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.CONCLUSOES ) )
+ {
+ return conclusoes;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ACCOES ) )
+ {
+ return accoes;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.HORA_ACIDENTE ) )
+ {
+ return hora_acidente;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.FORMACAO_SHST ) )
+ {
+ return formacao_shst;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.FORMACAO_SHST_NAO_PORQUE ) )
+ {
+ return formacao_shst_nao_porque;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.OUTROS_ACIDENTES_COM_COLABORADOR ) )
+ {
+ return outros_acidentes_com_colaborador;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_ACIDENTES_COM_COLABORADOR ) )
+ {
+ return nr_acidentes_com_colaborador;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR1 ) )
+ {
+ return nr_relatorio_acidente_colaborador1;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR2 ) )
+ {
+ return nr_relatorio_acidente_colaborador2;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR3 ) )
+ {
+ return nr_relatorio_acidente_colaborador3;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR4 ) )
+ {
+ return nr_relatorio_acidente_colaborador4;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ACIDENTES_OUTROS_COLABORADORES ) )
+ {
+ return acidentes_outros_colaboradores;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_ACIDENTES_OUTROS_COLABORADORES ) )
+ {
+ return nr_acidentes_outros_colaboradores;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1 ) )
+ {
+ return nr_relatorio_acidente_outros_colaboradores1;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2 ) )
+ {
+ return nr_relatorio_acidente_outros_colaboradores2;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3 ) )
+ {
+ return nr_relatorio_acidente_outros_colaboradores3;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4 ) )
+ {
+ return nr_relatorio_acidente_outros_colaboradores4;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_CABECA ) )
+ {
+ return lesao_cabeca;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_PESCOCO ) )
+ {
+ return lesao_pescoco;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_TRONCO ) )
+ {
+ return lesao_tronco;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_MEMBRO_SUP_DIR ) )
+ {
+ return lesao_membro_sup_dir;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_MEMBRO_SUP_ESQ ) )
+ {
+ return lesao_membro_sup_esq;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_MEMBRO_INF_DIR ) )
+ {
+ return lesao_membro_inf_dir;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_MEMBRO_INF_ESQ ) )
+ {
+ return lesao_membro_inf_esq;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ESPECIF1 ) )
+ {
+ return especif1;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ESPECIF2 ) )
+ {
+ return especif2;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ESPECIF3 ) )
+ {
+ return especif3;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ESPECIF4 ) )
+ {
+ return especif4;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.TIPO_INCAPACIDADE ) )
+ {
+ return tipo_incapacidade;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.COEF_INCAPACIDADE ) )
+ {
+ return coef_incapacidade;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_AVAL_INCAPACIDADE ) )
+ {
+ return data_aval_incapacidade;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_REV_INCAPACIDADE ) )
+ {
+ return data_rev_incapacidade;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.PERIODO_INCAPACIDADE_DE ) )
+ {
+ return periodo_incapacidade_de;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.PERIODO_INCAPACIDADE_A ) )
+ {
+ return periodo_incapacidade_a;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_FLEXAO ) )
+ {
+ return img_flexao;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_EXT1 ) )
+ {
+ return img_ext1;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_EXT2 ) )
+ {
+ return img_ext2;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_CAB2 ) )
+ {
+ return img_cab2;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_CAB3 ) )
+ {
+ return img_cab3;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA2 ) )
+ {
+ return img_ma2;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA3 ) )
+ {
+ return img_ma3;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA5 ) )
+ {
+ return img_ma5;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA6 ) )
+ {
+ return img_ma6;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA8 ) )
+ {
+ return img_ma8;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA10 ) )
+ {
+ return img_ma10;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.RESTRICAO_CARGA ) )
+ {
+ return restricao_carga;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.RESTRICAO_MOTRICIDADE ) )
+ {
+ return restricao_motricidade;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.RESTRICAO_CONDUCAO ) )
+ {
+ return restricao_conducao;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.RESTRICAO_VIBRACOES ) )
+ {
+ return restricao_vibracoes;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.RESTRICAO_OUTRAS ) )
+ {
+ return restricao_outras;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.MED_OBSERV ) )
+ {
+ return med_observ;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.TIPO_LESAO ) )
+ {
+ return tipo_lesao;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_ROT1 ) )
+ {
+ return img_rot1;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_ROT2 ) )
+ {
+ return img_rot2;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_CAB1 ) )
+ {
+ return img_cab1;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_CAB4 ) )
+ {
+ return img_cab4;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA1 ) )
+ {
+ return img_ma1;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA4 ) )
+ {
+ return img_ma4;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA7 ) )
+ {
+ return img_ma7;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA9 ) )
+ {
+ return img_ma9;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.EMPRESA_ID ) )
+ {
+ return empresa_id;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.MEDICO_ID ) )
+ {
+ return medico_id;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.TECNICO_SAUDE_ID ) )
+ {
+ return tecnico_saude_id;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ANALISE_NR ) )
+ {
+ return analise_nr;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ESTADO_ASSINATURA ) )
+ {
+ return estado_assinatura;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ASS_RESP_SEG ) )
+ {
+ return ass_resp_seg;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ASS_RESP_RH ) )
+ {
+ return ass_resp_rh;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_CONSOLIDACAO ) )
+ {
+ return data_consolidacao;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_ASSINATURA_SEG ) )
+ {
+ return data_assinatura_seg;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_ASSINATURA_RH ) )
+ {
+ return data_assinatura_rh;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ASS_CONSOLIDACAO ) )
+ {
+ return ass_consolidacao;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NOME_RESP_SEG ) )
+ {
+ return nome_resp_seg;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NOME_RESP_RH ) )
+ {
+ return nome_resp_rh;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.CAUSAS ) )
+ {
+ return causas;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ESTADO_ANTES_CORRECAO ) )
+ {
+ return estado_antes_correcao;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.OBSERVACOES_CORRECAO ) )
+ {
+ return observacoes_correcao;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.CORRECAO ) )
+ {
+ return correcao;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ASS_SUPERIOR ) )
+ {
+ return ass_superior;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NOME_SUPERIOR ) )
+ {
+ return nome_superior;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_ASSINATURA_SUPERIOR ) )
+ {
+ return data_assinatura_superior;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.AVERIGUADOR ) )
+ {
+ return averiguador;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.AVERIGUACAO_POSTERIOR ) )
+ {
+ return averiguacao_posterior;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.AVERIGUACAO_OBS ) )
+ {
+ return averiguacao_obs;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_INICIO_PROCESSO ) )
+ {
+ return data_inicio_processo;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NOME_RESP_CONSOLIDACAO ) )
+ {
+ return nome_resp_consolidacao;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.SECCAO_ID ) )
+ {
+ return seccao_id;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.DEPARTAMENTO_ID ) )
+ {
+ return departamento_id;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.RH_FASE4 ) )
+ {
+ return rh_fase4;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.APAGADA ) )
+ {
+ return apagada;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == AnalisesAcidentesDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.DATA_ACIDENTE )
+ {
+ data_acidente = ( java.util.Date ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ACIDENTADO_ID )
+ {
+ acidentado_id = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ESTADO )
+ {
+ estado = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ESTABELECIMENTO_ID )
+ {
+ estabelecimento_id = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.HORAS_TURNO )
+ {
+ horas_turno = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.LOCAL_TRABALHO )
+ {
+ local_trabalho = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.TAREFA )
+ {
+ tarefa = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.SUBSTANCIAS )
+ {
+ substancias = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.CONDICOES )
+ {
+ condicoes = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.TESTEMUNHAS )
+ {
+ testemunhas = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.DESCRICAO )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.CONCLUSOES )
+ {
+ conclusoes = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ACCOES )
+ {
+ accoes = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.HORA_ACIDENTE )
+ {
+ hora_acidente = ( java.sql.Time ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.FORMACAO_SHST )
+ {
+ formacao_shst = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.FORMACAO_SHST_NAO_PORQUE )
+ {
+ formacao_shst_nao_porque = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.OUTROS_ACIDENTES_COM_COLABORADOR )
+ {
+ outros_acidentes_com_colaborador = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NR_ACIDENTES_COM_COLABORADOR )
+ {
+ nr_acidentes_com_colaborador = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR1 )
+ {
+ nr_relatorio_acidente_colaborador1 = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR2 )
+ {
+ nr_relatorio_acidente_colaborador2 = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR3 )
+ {
+ nr_relatorio_acidente_colaborador3 = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR4 )
+ {
+ nr_relatorio_acidente_colaborador4 = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ACIDENTES_OUTROS_COLABORADORES )
+ {
+ acidentes_outros_colaboradores = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NR_ACIDENTES_OUTROS_COLABORADORES )
+ {
+ nr_acidentes_outros_colaboradores = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1 )
+ {
+ nr_relatorio_acidente_outros_colaboradores1 = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2 )
+ {
+ nr_relatorio_acidente_outros_colaboradores2 = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3 )
+ {
+ nr_relatorio_acidente_outros_colaboradores3 = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4 )
+ {
+ nr_relatorio_acidente_outros_colaboradores4 = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.LESAO_CABECA )
+ {
+ lesao_cabeca = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.LESAO_PESCOCO )
+ {
+ lesao_pescoco = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.LESAO_TRONCO )
+ {
+ lesao_tronco = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.LESAO_MEMBRO_SUP_DIR )
+ {
+ lesao_membro_sup_dir = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.LESAO_MEMBRO_SUP_ESQ )
+ {
+ lesao_membro_sup_esq = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.LESAO_MEMBRO_INF_DIR )
+ {
+ lesao_membro_inf_dir = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.LESAO_MEMBRO_INF_ESQ )
+ {
+ lesao_membro_inf_esq = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ESPECIF1 )
+ {
+ especif1 = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ESPECIF2 )
+ {
+ especif2 = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ESPECIF3 )
+ {
+ especif3 = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ESPECIF4 )
+ {
+ especif4 = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.TIPO_INCAPACIDADE )
+ {
+ tipo_incapacidade = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.COEF_INCAPACIDADE )
+ {
+ coef_incapacidade = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.DATA_AVAL_INCAPACIDADE )
+ {
+ data_aval_incapacidade = ( java.util.Date ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.DATA_REV_INCAPACIDADE )
+ {
+ data_rev_incapacidade = ( java.util.Date ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.PERIODO_INCAPACIDADE_DE )
+ {
+ periodo_incapacidade_de = ( java.util.Date ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.PERIODO_INCAPACIDADE_A )
+ {
+ periodo_incapacidade_a = ( java.util.Date ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_FLEXAO )
+ {
+ img_flexao = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_EXT1 )
+ {
+ img_ext1 = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_EXT2 )
+ {
+ img_ext2 = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_CAB2 )
+ {
+ img_cab2 = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_CAB3 )
+ {
+ img_cab3 = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA2 )
+ {
+ img_ma2 = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA3 )
+ {
+ img_ma3 = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA5 )
+ {
+ img_ma5 = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA6 )
+ {
+ img_ma6 = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA8 )
+ {
+ img_ma8 = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA10 )
+ {
+ img_ma10 = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.RESTRICAO_CARGA )
+ {
+ restricao_carga = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.RESTRICAO_MOTRICIDADE )
+ {
+ restricao_motricidade = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.RESTRICAO_CONDUCAO )
+ {
+ restricao_conducao = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.RESTRICAO_VIBRACOES )
+ {
+ restricao_vibracoes = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.RESTRICAO_OUTRAS )
+ {
+ restricao_outras = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.MED_OBSERV )
+ {
+ med_observ = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.TIPO_LESAO )
+ {
+ tipo_lesao = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_ROT1 )
+ {
+ img_rot1 = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_ROT2 )
+ {
+ img_rot2 = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_CAB1 )
+ {
+ img_cab1 = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_CAB4 )
+ {
+ img_cab4 = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA1 )
+ {
+ img_ma1 = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA4 )
+ {
+ img_ma4 = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA7 )
+ {
+ img_ma7 = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.IMG_MA9 )
+ {
+ img_ma9 = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.EMPRESA_ID )
+ {
+ empresa_id = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.MEDICO_ID )
+ {
+ medico_id = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.TECNICO_SAUDE_ID )
+ {
+ tecnico_saude_id = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ANALISE_NR )
+ {
+ analise_nr = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ESTADO_ASSINATURA )
+ {
+ estado_assinatura = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ASS_RESP_SEG )
+ {
+ ass_resp_seg = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ASS_RESP_RH )
+ {
+ ass_resp_rh = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.DATA_CONSOLIDACAO )
+ {
+ data_consolidacao = ( java.util.Date ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.DATA_ASSINATURA_SEG )
+ {
+ data_assinatura_seg = ( java.util.Date ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.DATA_ASSINATURA_RH )
+ {
+ data_assinatura_rh = ( java.util.Date ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ASS_CONSOLIDACAO )
+ {
+ ass_consolidacao = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NOME_RESP_SEG )
+ {
+ nome_resp_seg = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NOME_RESP_RH )
+ {
+ nome_resp_rh = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.CAUSAS )
+ {
+ causas = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ESTADO_ANTES_CORRECAO )
+ {
+ estado_antes_correcao = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.OBSERVACOES_CORRECAO )
+ {
+ observacoes_correcao = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.CORRECAO )
+ {
+ correcao = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.ASS_SUPERIOR )
+ {
+ ass_superior = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NOME_SUPERIOR )
+ {
+ nome_superior = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.DATA_ASSINATURA_SUPERIOR )
+ {
+ data_assinatura_superior = ( java.util.Date ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.AVERIGUADOR )
+ {
+ averiguador = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.AVERIGUACAO_POSTERIOR )
+ {
+ averiguacao_posterior = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.AVERIGUACAO_OBS )
+ {
+ averiguacao_obs = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.DATA_INICIO_PROCESSO )
+ {
+ data_inicio_processo = ( java.util.Date ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.NOME_RESP_CONSOLIDACAO )
+ {
+ nome_resp_consolidacao = ( String ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.SECCAO_ID )
+ {
+ seccao_id = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.DEPARTAMENTO_ID )
+ {
+ departamento_id = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.RH_FASE4 )
+ {
+ rh_fase4 = ( Integer ) value;
+ }
+ else if( fieldName == AnalisesAcidentesDataAuto.APAGADA )
+ {
+ apagada = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_ACIDENTE ) )
+ {
+ data_acidente = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ACIDENTADO_ID ) )
+ {
+ acidentado_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ESTADO ) )
+ {
+ estado = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ESTABELECIMENTO_ID ) )
+ {
+ estabelecimento_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.HORAS_TURNO ) )
+ {
+ horas_turno = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.LOCAL_TRABALHO ) )
+ {
+ local_trabalho = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.TAREFA ) )
+ {
+ tarefa = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.SUBSTANCIAS ) )
+ {
+ substancias = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.CONDICOES ) )
+ {
+ condicoes = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.TESTEMUNHAS ) )
+ {
+ testemunhas = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.DESCRICAO ) )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.CONCLUSOES ) )
+ {
+ conclusoes = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ACCOES ) )
+ {
+ accoes = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.HORA_ACIDENTE ) )
+ {
+ hora_acidente = ( java.sql.Time ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.FORMACAO_SHST ) )
+ {
+ formacao_shst = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.FORMACAO_SHST_NAO_PORQUE ) )
+ {
+ formacao_shst_nao_porque = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.OUTROS_ACIDENTES_COM_COLABORADOR ) )
+ {
+ outros_acidentes_com_colaborador = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_ACIDENTES_COM_COLABORADOR ) )
+ {
+ nr_acidentes_com_colaborador = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR1 ) )
+ {
+ nr_relatorio_acidente_colaborador1 = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR2 ) )
+ {
+ nr_relatorio_acidente_colaborador2 = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR3 ) )
+ {
+ nr_relatorio_acidente_colaborador3 = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_COLABORADOR4 ) )
+ {
+ nr_relatorio_acidente_colaborador4 = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ACIDENTES_OUTROS_COLABORADORES ) )
+ {
+ acidentes_outros_colaboradores = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_ACIDENTES_OUTROS_COLABORADORES ) )
+ {
+ nr_acidentes_outros_colaboradores = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1 ) )
+ {
+ nr_relatorio_acidente_outros_colaboradores1 = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2 ) )
+ {
+ nr_relatorio_acidente_outros_colaboradores2 = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3 ) )
+ {
+ nr_relatorio_acidente_outros_colaboradores3 = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4 ) )
+ {
+ nr_relatorio_acidente_outros_colaboradores4 = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_CABECA ) )
+ {
+ lesao_cabeca = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_PESCOCO ) )
+ {
+ lesao_pescoco = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_TRONCO ) )
+ {
+ lesao_tronco = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_MEMBRO_SUP_DIR ) )
+ {
+ lesao_membro_sup_dir = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_MEMBRO_SUP_ESQ ) )
+ {
+ lesao_membro_sup_esq = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_MEMBRO_INF_DIR ) )
+ {
+ lesao_membro_inf_dir = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.LESAO_MEMBRO_INF_ESQ ) )
+ {
+ lesao_membro_inf_esq = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ESPECIF1 ) )
+ {
+ especif1 = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ESPECIF2 ) )
+ {
+ especif2 = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ESPECIF3 ) )
+ {
+ especif3 = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ESPECIF4 ) )
+ {
+ especif4 = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.TIPO_INCAPACIDADE ) )
+ {
+ tipo_incapacidade = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.COEF_INCAPACIDADE ) )
+ {
+ coef_incapacidade = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_AVAL_INCAPACIDADE ) )
+ {
+ data_aval_incapacidade = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_REV_INCAPACIDADE ) )
+ {
+ data_rev_incapacidade = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.PERIODO_INCAPACIDADE_DE ) )
+ {
+ periodo_incapacidade_de = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.PERIODO_INCAPACIDADE_A ) )
+ {
+ periodo_incapacidade_a = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_FLEXAO ) )
+ {
+ img_flexao = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_EXT1 ) )
+ {
+ img_ext1 = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_EXT2 ) )
+ {
+ img_ext2 = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_CAB2 ) )
+ {
+ img_cab2 = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_CAB3 ) )
+ {
+ img_cab3 = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA2 ) )
+ {
+ img_ma2 = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA3 ) )
+ {
+ img_ma3 = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA5 ) )
+ {
+ img_ma5 = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA6 ) )
+ {
+ img_ma6 = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA8 ) )
+ {
+ img_ma8 = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA10 ) )
+ {
+ img_ma10 = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.RESTRICAO_CARGA ) )
+ {
+ restricao_carga = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.RESTRICAO_MOTRICIDADE ) )
+ {
+ restricao_motricidade = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.RESTRICAO_CONDUCAO ) )
+ {
+ restricao_conducao = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.RESTRICAO_VIBRACOES ) )
+ {
+ restricao_vibracoes = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.RESTRICAO_OUTRAS ) )
+ {
+ restricao_outras = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.MED_OBSERV ) )
+ {
+ med_observ = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.TIPO_LESAO ) )
+ {
+ tipo_lesao = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_ROT1 ) )
+ {
+ img_rot1 = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_ROT2 ) )
+ {
+ img_rot2 = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_CAB1 ) )
+ {
+ img_cab1 = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_CAB4 ) )
+ {
+ img_cab4 = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA1 ) )
+ {
+ img_ma1 = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA4 ) )
+ {
+ img_ma4 = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA7 ) )
+ {
+ img_ma7 = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.IMG_MA9 ) )
+ {
+ img_ma9 = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.EMPRESA_ID ) )
+ {
+ empresa_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.MEDICO_ID ) )
+ {
+ medico_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.TECNICO_SAUDE_ID ) )
+ {
+ tecnico_saude_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ANALISE_NR ) )
+ {
+ analise_nr = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ESTADO_ASSINATURA ) )
+ {
+ estado_assinatura = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ASS_RESP_SEG ) )
+ {
+ ass_resp_seg = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ASS_RESP_RH ) )
+ {
+ ass_resp_rh = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_CONSOLIDACAO ) )
+ {
+ data_consolidacao = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_ASSINATURA_SEG ) )
+ {
+ data_assinatura_seg = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_ASSINATURA_RH ) )
+ {
+ data_assinatura_rh = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ASS_CONSOLIDACAO ) )
+ {
+ ass_consolidacao = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NOME_RESP_SEG ) )
+ {
+ nome_resp_seg = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NOME_RESP_RH ) )
+ {
+ nome_resp_rh = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.CAUSAS ) )
+ {
+ causas = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ESTADO_ANTES_CORRECAO ) )
+ {
+ estado_antes_correcao = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.OBSERVACOES_CORRECAO ) )
+ {
+ observacoes_correcao = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.CORRECAO ) )
+ {
+ correcao = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.ASS_SUPERIOR ) )
+ {
+ ass_superior = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NOME_SUPERIOR ) )
+ {
+ nome_superior = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_ASSINATURA_SUPERIOR ) )
+ {
+ data_assinatura_superior = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.AVERIGUADOR ) )
+ {
+ averiguador = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.AVERIGUACAO_POSTERIOR ) )
+ {
+ averiguacao_posterior = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.AVERIGUACAO_OBS ) )
+ {
+ averiguacao_obs = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.DATA_INICIO_PROCESSO ) )
+ {
+ data_inicio_processo = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.NOME_RESP_CONSOLIDACAO ) )
+ {
+ nome_resp_consolidacao = ( String ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.SECCAO_ID ) )
+ {
+ seccao_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.DEPARTAMENTO_ID ) )
+ {
+ departamento_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.RH_FASE4 ) )
+ {
+ rh_fase4 = ( Integer ) value;
+ }
+ else if( fieldName.equals( AnalisesAcidentesDataAuto.APAGADA ) )
+ {
+ apagada = ( String ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public java.util.Date getData_acidente()
+ {
+ return data_acidente;
+ }
+
+ public void setData_acidente(java.util.Date data_acidenteValue )
+ {
+ this.data_acidente = data_acidenteValue;
+ }
+
+ public Integer getAcidentado_id()
+ {
+ return acidentado_id;
+ }
+
+ public void setAcidentado_id(Integer acidentado_idValue )
+ {
+ this.acidentado_id = acidentado_idValue;
+ }
+
+ public Integer getEstado()
+ {
+ return estado;
+ }
+
+ public void setEstado(Integer estadoValue )
+ {
+ this.estado = estadoValue;
+ }
+
+ public Integer getEstabelecimento_id()
+ {
+ return estabelecimento_id;
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_idValue )
+ {
+ this.estabelecimento_id = estabelecimento_idValue;
+ }
+
+ public Integer getHoras_turno()
+ {
+ return horas_turno;
+ }
+
+ public void setHoras_turno(Integer horas_turnoValue )
+ {
+ this.horas_turno = horas_turnoValue;
+ }
+
+ public String getLocal_trabalho()
+ {
+ return local_trabalho;
+ }
+
+ public void setLocal_trabalho(String local_trabalhoValue )
+ {
+ this.local_trabalho = local_trabalhoValue;
+ }
+
+ public String getTarefa()
+ {
+ return tarefa;
+ }
+
+ public void setTarefa(String tarefaValue )
+ {
+ this.tarefa = tarefaValue;
+ }
+
+ public String getSubstancias()
+ {
+ return substancias;
+ }
+
+ public void setSubstancias(String substanciasValue )
+ {
+ this.substancias = substanciasValue;
+ }
+
+ public String getCondicoes()
+ {
+ return condicoes;
+ }
+
+ public void setCondicoes(String condicoesValue )
+ {
+ this.condicoes = condicoesValue;
+ }
+
+ public String getTestemunhas()
+ {
+ return testemunhas;
+ }
+
+ public void setTestemunhas(String testemunhasValue )
+ {
+ this.testemunhas = testemunhasValue;
+ }
+
+ public String getDescricao()
+ {
+ return descricao;
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.descricao = descricaoValue;
+ }
+
+ public String getConclusoes()
+ {
+ return conclusoes;
+ }
+
+ public void setConclusoes(String conclusoesValue )
+ {
+ this.conclusoes = conclusoesValue;
+ }
+
+ public String getAccoes()
+ {
+ return accoes;
+ }
+
+ public void setAccoes(String accoesValue )
+ {
+ this.accoes = accoesValue;
+ }
+
+ public java.sql.Time getHora_acidente()
+ {
+ return hora_acidente;
+ }
+
+ public void setHora_acidente(java.sql.Time hora_acidenteValue )
+ {
+ this.hora_acidente = hora_acidenteValue;
+ }
+
+ public String getFormacao_shst()
+ {
+ return formacao_shst;
+ }
+
+ public void setFormacao_shst(String formacao_shstValue )
+ {
+ this.formacao_shst = formacao_shstValue;
+ }
+
+ public String getFormacao_shst_nao_porque()
+ {
+ return formacao_shst_nao_porque;
+ }
+
+ public void setFormacao_shst_nao_porque(String formacao_shst_nao_porqueValue )
+ {
+ this.formacao_shst_nao_porque = formacao_shst_nao_porqueValue;
+ }
+
+ public String getOutros_acidentes_com_colaborador()
+ {
+ return outros_acidentes_com_colaborador;
+ }
+
+ public void setOutros_acidentes_com_colaborador(String outros_acidentes_com_colaboradorValue )
+ {
+ this.outros_acidentes_com_colaborador = outros_acidentes_com_colaboradorValue;
+ }
+
+ public Integer getNr_acidentes_com_colaborador()
+ {
+ return nr_acidentes_com_colaborador;
+ }
+
+ public void setNr_acidentes_com_colaborador(Integer nr_acidentes_com_colaboradorValue )
+ {
+ this.nr_acidentes_com_colaborador = nr_acidentes_com_colaboradorValue;
+ }
+
+ public Integer getNr_relatorio_acidente_colaborador1()
+ {
+ return nr_relatorio_acidente_colaborador1;
+ }
+
+ public void setNr_relatorio_acidente_colaborador1(Integer nr_relatorio_acidente_colaborador1Value )
+ {
+ this.nr_relatorio_acidente_colaborador1 = nr_relatorio_acidente_colaborador1Value;
+ }
+
+ public Integer getNr_relatorio_acidente_colaborador2()
+ {
+ return nr_relatorio_acidente_colaborador2;
+ }
+
+ public void setNr_relatorio_acidente_colaborador2(Integer nr_relatorio_acidente_colaborador2Value )
+ {
+ this.nr_relatorio_acidente_colaborador2 = nr_relatorio_acidente_colaborador2Value;
+ }
+
+ public Integer getNr_relatorio_acidente_colaborador3()
+ {
+ return nr_relatorio_acidente_colaborador3;
+ }
+
+ public void setNr_relatorio_acidente_colaborador3(Integer nr_relatorio_acidente_colaborador3Value )
+ {
+ this.nr_relatorio_acidente_colaborador3 = nr_relatorio_acidente_colaborador3Value;
+ }
+
+ public Integer getNr_relatorio_acidente_colaborador4()
+ {
+ return nr_relatorio_acidente_colaborador4;
+ }
+
+ public void setNr_relatorio_acidente_colaborador4(Integer nr_relatorio_acidente_colaborador4Value )
+ {
+ this.nr_relatorio_acidente_colaborador4 = nr_relatorio_acidente_colaborador4Value;
+ }
+
+ public String getAcidentes_outros_colaboradores()
+ {
+ return acidentes_outros_colaboradores;
+ }
+
+ public void setAcidentes_outros_colaboradores(String acidentes_outros_colaboradoresValue )
+ {
+ this.acidentes_outros_colaboradores = acidentes_outros_colaboradoresValue;
+ }
+
+ public Integer getNr_acidentes_outros_colaboradores()
+ {
+ return nr_acidentes_outros_colaboradores;
+ }
+
+ public void setNr_acidentes_outros_colaboradores(Integer nr_acidentes_outros_colaboradoresValue )
+ {
+ this.nr_acidentes_outros_colaboradores = nr_acidentes_outros_colaboradoresValue;
+ }
+
+ public Integer getNr_relatorio_acidente_outros_colaboradores1()
+ {
+ return nr_relatorio_acidente_outros_colaboradores1;
+ }
+
+ public void setNr_relatorio_acidente_outros_colaboradores1(Integer nr_relatorio_acidente_outros_colaboradores1Value )
+ {
+ this.nr_relatorio_acidente_outros_colaboradores1 = nr_relatorio_acidente_outros_colaboradores1Value;
+ }
+
+ public Integer getNr_relatorio_acidente_outros_colaboradores2()
+ {
+ return nr_relatorio_acidente_outros_colaboradores2;
+ }
+
+ public void setNr_relatorio_acidente_outros_colaboradores2(Integer nr_relatorio_acidente_outros_colaboradores2Value )
+ {
+ this.nr_relatorio_acidente_outros_colaboradores2 = nr_relatorio_acidente_outros_colaboradores2Value;
+ }
+
+ public Integer getNr_relatorio_acidente_outros_colaboradores3()
+ {
+ return nr_relatorio_acidente_outros_colaboradores3;
+ }
+
+ public void setNr_relatorio_acidente_outros_colaboradores3(Integer nr_relatorio_acidente_outros_colaboradores3Value )
+ {
+ this.nr_relatorio_acidente_outros_colaboradores3 = nr_relatorio_acidente_outros_colaboradores3Value;
+ }
+
+ public Integer getNr_relatorio_acidente_outros_colaboradores4()
+ {
+ return nr_relatorio_acidente_outros_colaboradores4;
+ }
+
+ public void setNr_relatorio_acidente_outros_colaboradores4(Integer nr_relatorio_acidente_outros_colaboradores4Value )
+ {
+ this.nr_relatorio_acidente_outros_colaboradores4 = nr_relatorio_acidente_outros_colaboradores4Value;
+ }
+
+ public String getLesao_cabeca()
+ {
+ return lesao_cabeca;
+ }
+
+ public void setLesao_cabeca(String lesao_cabecaValue )
+ {
+ this.lesao_cabeca = lesao_cabecaValue;
+ }
+
+ public String getLesao_pescoco()
+ {
+ return lesao_pescoco;
+ }
+
+ public void setLesao_pescoco(String lesao_pescocoValue )
+ {
+ this.lesao_pescoco = lesao_pescocoValue;
+ }
+
+ public String getLesao_tronco()
+ {
+ return lesao_tronco;
+ }
+
+ public void setLesao_tronco(String lesao_troncoValue )
+ {
+ this.lesao_tronco = lesao_troncoValue;
+ }
+
+ public String getLesao_membro_sup_dir()
+ {
+ return lesao_membro_sup_dir;
+ }
+
+ public void setLesao_membro_sup_dir(String lesao_membro_sup_dirValue )
+ {
+ this.lesao_membro_sup_dir = lesao_membro_sup_dirValue;
+ }
+
+ public String getLesao_membro_sup_esq()
+ {
+ return lesao_membro_sup_esq;
+ }
+
+ public void setLesao_membro_sup_esq(String lesao_membro_sup_esqValue )
+ {
+ this.lesao_membro_sup_esq = lesao_membro_sup_esqValue;
+ }
+
+ public String getLesao_membro_inf_dir()
+ {
+ return lesao_membro_inf_dir;
+ }
+
+ public void setLesao_membro_inf_dir(String lesao_membro_inf_dirValue )
+ {
+ this.lesao_membro_inf_dir = lesao_membro_inf_dirValue;
+ }
+
+ public String getLesao_membro_inf_esq()
+ {
+ return lesao_membro_inf_esq;
+ }
+
+ public void setLesao_membro_inf_esq(String lesao_membro_inf_esqValue )
+ {
+ this.lesao_membro_inf_esq = lesao_membro_inf_esqValue;
+ }
+
+ public String getEspecif1()
+ {
+ return especif1;
+ }
+
+ public void setEspecif1(String especif1Value )
+ {
+ this.especif1 = especif1Value;
+ }
+
+ public String getEspecif2()
+ {
+ return especif2;
+ }
+
+ public void setEspecif2(String especif2Value )
+ {
+ this.especif2 = especif2Value;
+ }
+
+ public String getEspecif3()
+ {
+ return especif3;
+ }
+
+ public void setEspecif3(String especif3Value )
+ {
+ this.especif3 = especif3Value;
+ }
+
+ public String getEspecif4()
+ {
+ return especif4;
+ }
+
+ public void setEspecif4(String especif4Value )
+ {
+ this.especif4 = especif4Value;
+ }
+
+ public String getTipo_incapacidade()
+ {
+ return tipo_incapacidade;
+ }
+
+ public void setTipo_incapacidade(String tipo_incapacidadeValue )
+ {
+ this.tipo_incapacidade = tipo_incapacidadeValue;
+ }
+
+ public Integer getCoef_incapacidade()
+ {
+ return coef_incapacidade;
+ }
+
+ public void setCoef_incapacidade(Integer coef_incapacidadeValue )
+ {
+ this.coef_incapacidade = coef_incapacidadeValue;
+ }
+
+ public java.util.Date getData_aval_incapacidade()
+ {
+ return data_aval_incapacidade;
+ }
+
+ public void setData_aval_incapacidade(java.util.Date data_aval_incapacidadeValue )
+ {
+ this.data_aval_incapacidade = data_aval_incapacidadeValue;
+ }
+
+ public java.util.Date getData_rev_incapacidade()
+ {
+ return data_rev_incapacidade;
+ }
+
+ public void setData_rev_incapacidade(java.util.Date data_rev_incapacidadeValue )
+ {
+ this.data_rev_incapacidade = data_rev_incapacidadeValue;
+ }
+
+ public java.util.Date getPeriodo_incapacidade_de()
+ {
+ return periodo_incapacidade_de;
+ }
+
+ public void setPeriodo_incapacidade_de(java.util.Date periodo_incapacidade_deValue )
+ {
+ this.periodo_incapacidade_de = periodo_incapacidade_deValue;
+ }
+
+ public java.util.Date getPeriodo_incapacidade_a()
+ {
+ return periodo_incapacidade_a;
+ }
+
+ public void setPeriodo_incapacidade_a(java.util.Date periodo_incapacidade_aValue )
+ {
+ this.periodo_incapacidade_a = periodo_incapacidade_aValue;
+ }
+
+ public String getImg_flexao()
+ {
+ return img_flexao;
+ }
+
+ public void setImg_flexao(String img_flexaoValue )
+ {
+ this.img_flexao = img_flexaoValue;
+ }
+
+ public String getImg_ext1()
+ {
+ return img_ext1;
+ }
+
+ public void setImg_ext1(String img_ext1Value )
+ {
+ this.img_ext1 = img_ext1Value;
+ }
+
+ public String getImg_ext2()
+ {
+ return img_ext2;
+ }
+
+ public void setImg_ext2(String img_ext2Value )
+ {
+ this.img_ext2 = img_ext2Value;
+ }
+
+ public String getImg_cab2()
+ {
+ return img_cab2;
+ }
+
+ public void setImg_cab2(String img_cab2Value )
+ {
+ this.img_cab2 = img_cab2Value;
+ }
+
+ public String getImg_cab3()
+ {
+ return img_cab3;
+ }
+
+ public void setImg_cab3(String img_cab3Value )
+ {
+ this.img_cab3 = img_cab3Value;
+ }
+
+ public String getImg_ma2()
+ {
+ return img_ma2;
+ }
+
+ public void setImg_ma2(String img_ma2Value )
+ {
+ this.img_ma2 = img_ma2Value;
+ }
+
+ public String getImg_ma3()
+ {
+ return img_ma3;
+ }
+
+ public void setImg_ma3(String img_ma3Value )
+ {
+ this.img_ma3 = img_ma3Value;
+ }
+
+ public String getImg_ma5()
+ {
+ return img_ma5;
+ }
+
+ public void setImg_ma5(String img_ma5Value )
+ {
+ this.img_ma5 = img_ma5Value;
+ }
+
+ public String getImg_ma6()
+ {
+ return img_ma6;
+ }
+
+ public void setImg_ma6(String img_ma6Value )
+ {
+ this.img_ma6 = img_ma6Value;
+ }
+
+ public String getImg_ma8()
+ {
+ return img_ma8;
+ }
+
+ public void setImg_ma8(String img_ma8Value )
+ {
+ this.img_ma8 = img_ma8Value;
+ }
+
+ public String getImg_ma10()
+ {
+ return img_ma10;
+ }
+
+ public void setImg_ma10(String img_ma10Value )
+ {
+ this.img_ma10 = img_ma10Value;
+ }
+
+ public Integer getRestricao_carga()
+ {
+ return restricao_carga;
+ }
+
+ public void setRestricao_carga(Integer restricao_cargaValue )
+ {
+ this.restricao_carga = restricao_cargaValue;
+ }
+
+ public String getRestricao_motricidade()
+ {
+ return restricao_motricidade;
+ }
+
+ public void setRestricao_motricidade(String restricao_motricidadeValue )
+ {
+ this.restricao_motricidade = restricao_motricidadeValue;
+ }
+
+ public String getRestricao_conducao()
+ {
+ return restricao_conducao;
+ }
+
+ public void setRestricao_conducao(String restricao_conducaoValue )
+ {
+ this.restricao_conducao = restricao_conducaoValue;
+ }
+
+ public String getRestricao_vibracoes()
+ {
+ return restricao_vibracoes;
+ }
+
+ public void setRestricao_vibracoes(String restricao_vibracoesValue )
+ {
+ this.restricao_vibracoes = restricao_vibracoesValue;
+ }
+
+ public String getRestricao_outras()
+ {
+ return restricao_outras;
+ }
+
+ public void setRestricao_outras(String restricao_outrasValue )
+ {
+ this.restricao_outras = restricao_outrasValue;
+ }
+
+ public String getMed_observ()
+ {
+ return med_observ;
+ }
+
+ public void setMed_observ(String med_observValue )
+ {
+ this.med_observ = med_observValue;
+ }
+
+ public String getTipo_lesao()
+ {
+ return tipo_lesao;
+ }
+
+ public void setTipo_lesao(String tipo_lesaoValue )
+ {
+ this.tipo_lesao = tipo_lesaoValue;
+ }
+
+ public String getImg_rot1()
+ {
+ return img_rot1;
+ }
+
+ public void setImg_rot1(String img_rot1Value )
+ {
+ this.img_rot1 = img_rot1Value;
+ }
+
+ public String getImg_rot2()
+ {
+ return img_rot2;
+ }
+
+ public void setImg_rot2(String img_rot2Value )
+ {
+ this.img_rot2 = img_rot2Value;
+ }
+
+ public String getImg_cab1()
+ {
+ return img_cab1;
+ }
+
+ public void setImg_cab1(String img_cab1Value )
+ {
+ this.img_cab1 = img_cab1Value;
+ }
+
+ public String getImg_cab4()
+ {
+ return img_cab4;
+ }
+
+ public void setImg_cab4(String img_cab4Value )
+ {
+ this.img_cab4 = img_cab4Value;
+ }
+
+ public String getImg_ma1()
+ {
+ return img_ma1;
+ }
+
+ public void setImg_ma1(String img_ma1Value )
+ {
+ this.img_ma1 = img_ma1Value;
+ }
+
+ public String getImg_ma4()
+ {
+ return img_ma4;
+ }
+
+ public void setImg_ma4(String img_ma4Value )
+ {
+ this.img_ma4 = img_ma4Value;
+ }
+
+ public String getImg_ma7()
+ {
+ return img_ma7;
+ }
+
+ public void setImg_ma7(String img_ma7Value )
+ {
+ this.img_ma7 = img_ma7Value;
+ }
+
+ public String getImg_ma9()
+ {
+ return img_ma9;
+ }
+
+ public void setImg_ma9(String img_ma9Value )
+ {
+ this.img_ma9 = img_ma9Value;
+ }
+
+ public Integer getEmpresa_id()
+ {
+ return empresa_id;
+ }
+
+ public void setEmpresa_id(Integer empresa_idValue )
+ {
+ this.empresa_id = empresa_idValue;
+ }
+
+ public Integer getMedico_id()
+ {
+ return medico_id;
+ }
+
+ public void setMedico_id(Integer medico_idValue )
+ {
+ this.medico_id = medico_idValue;
+ }
+
+ public Integer getTecnico_saude_id()
+ {
+ return tecnico_saude_id;
+ }
+
+ public void setTecnico_saude_id(Integer tecnico_saude_idValue )
+ {
+ this.tecnico_saude_id = tecnico_saude_idValue;
+ }
+
+ public String getAnalise_nr()
+ {
+ return analise_nr;
+ }
+
+ public void setAnalise_nr(String analise_nrValue )
+ {
+ this.analise_nr = analise_nrValue;
+ }
+
+ public Integer getEstado_assinatura()
+ {
+ return estado_assinatura;
+ }
+
+ public void setEstado_assinatura(Integer estado_assinaturaValue )
+ {
+ this.estado_assinatura = estado_assinaturaValue;
+ }
+
+ public String getAss_resp_seg()
+ {
+ return ass_resp_seg;
+ }
+
+ public void setAss_resp_seg(String ass_resp_segValue )
+ {
+ this.ass_resp_seg = ass_resp_segValue;
+ }
+
+ public String getAss_resp_rh()
+ {
+ return ass_resp_rh;
+ }
+
+ public void setAss_resp_rh(String ass_resp_rhValue )
+ {
+ this.ass_resp_rh = ass_resp_rhValue;
+ }
+
+ public java.util.Date getData_consolidacao()
+ {
+ return data_consolidacao;
+ }
+
+ public void setData_consolidacao(java.util.Date data_consolidacaoValue )
+ {
+ this.data_consolidacao = data_consolidacaoValue;
+ }
+
+ public java.util.Date getData_assinatura_seg()
+ {
+ return data_assinatura_seg;
+ }
+
+ public void setData_assinatura_seg(java.util.Date data_assinatura_segValue )
+ {
+ this.data_assinatura_seg = data_assinatura_segValue;
+ }
+
+ public java.util.Date getData_assinatura_rh()
+ {
+ return data_assinatura_rh;
+ }
+
+ public void setData_assinatura_rh(java.util.Date data_assinatura_rhValue )
+ {
+ this.data_assinatura_rh = data_assinatura_rhValue;
+ }
+
+ public String getAss_consolidacao()
+ {
+ return ass_consolidacao;
+ }
+
+ public void setAss_consolidacao(String ass_consolidacaoValue )
+ {
+ this.ass_consolidacao = ass_consolidacaoValue;
+ }
+
+ public String getNome_resp_seg()
+ {
+ return nome_resp_seg;
+ }
+
+ public void setNome_resp_seg(String nome_resp_segValue )
+ {
+ this.nome_resp_seg = nome_resp_segValue;
+ }
+
+ public String getNome_resp_rh()
+ {
+ return nome_resp_rh;
+ }
+
+ public void setNome_resp_rh(String nome_resp_rhValue )
+ {
+ this.nome_resp_rh = nome_resp_rhValue;
+ }
+
+ public Integer getCausas()
+ {
+ return causas;
+ }
+
+ public void setCausas(Integer causasValue )
+ {
+ this.causas = causasValue;
+ }
+
+ public Integer getEstado_antes_correcao()
+ {
+ return estado_antes_correcao;
+ }
+
+ public void setEstado_antes_correcao(Integer estado_antes_correcaoValue )
+ {
+ this.estado_antes_correcao = estado_antes_correcaoValue;
+ }
+
+ public String getObservacoes_correcao()
+ {
+ return observacoes_correcao;
+ }
+
+ public void setObservacoes_correcao(String observacoes_correcaoValue )
+ {
+ this.observacoes_correcao = observacoes_correcaoValue;
+ }
+
+ public String getCorrecao()
+ {
+ return correcao;
+ }
+
+ public void setCorrecao(String correcaoValue )
+ {
+ this.correcao = correcaoValue;
+ }
+
+ public String getAss_superior()
+ {
+ return ass_superior;
+ }
+
+ public void setAss_superior(String ass_superiorValue )
+ {
+ this.ass_superior = ass_superiorValue;
+ }
+
+ public String getNome_superior()
+ {
+ return nome_superior;
+ }
+
+ public void setNome_superior(String nome_superiorValue )
+ {
+ this.nome_superior = nome_superiorValue;
+ }
+
+ public java.util.Date getData_assinatura_superior()
+ {
+ return data_assinatura_superior;
+ }
+
+ public void setData_assinatura_superior(java.util.Date data_assinatura_superiorValue )
+ {
+ this.data_assinatura_superior = data_assinatura_superiorValue;
+ }
+
+ public String getAveriguador()
+ {
+ return averiguador;
+ }
+
+ public void setAveriguador(String averiguadorValue )
+ {
+ this.averiguador = averiguadorValue;
+ }
+
+ public String getAveriguacao_posterior()
+ {
+ return averiguacao_posterior;
+ }
+
+ public void setAveriguacao_posterior(String averiguacao_posteriorValue )
+ {
+ this.averiguacao_posterior = averiguacao_posteriorValue;
+ }
+
+ public String getAveriguacao_obs()
+ {
+ return averiguacao_obs;
+ }
+
+ public void setAveriguacao_obs(String averiguacao_obsValue )
+ {
+ this.averiguacao_obs = averiguacao_obsValue;
+ }
+
+ public java.util.Date getData_inicio_processo()
+ {
+ return data_inicio_processo;
+ }
+
+ public void setData_inicio_processo(java.util.Date data_inicio_processoValue )
+ {
+ this.data_inicio_processo = data_inicio_processoValue;
+ }
+
+ public String getNome_resp_consolidacao()
+ {
+ return nome_resp_consolidacao;
+ }
+
+ public void setNome_resp_consolidacao(String nome_resp_consolidacaoValue )
+ {
+ this.nome_resp_consolidacao = nome_resp_consolidacaoValue;
+ }
+
+ public Integer getSeccao_id()
+ {
+ return seccao_id;
+ }
+
+ public void setSeccao_id(Integer seccao_idValue )
+ {
+ this.seccao_id = seccao_idValue;
+ }
+
+ public Integer getDepartamento_id()
+ {
+ return departamento_id;
+ }
+
+ public void setDepartamento_id(Integer departamento_idValue )
+ {
+ this.departamento_id = departamento_idValue;
+ }
+
+ public Integer getRh_fase4()
+ {
+ return rh_fase4;
+ }
+
+ public void setRh_fase4(Integer rh_fase4Value )
+ {
+ this.rh_fase4 = rh_fase4Value;
+ }
+
+ public String getApagada()
+ {
+ return apagada;
+ }
+
+ public void setApagada(String apagadaValue )
+ {
+ this.apagada = apagadaValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return AnalisesAcidentesDataAuto.class;
+ }
+
+ public AnalisesAcidentesDataAuto getOuterClassInstance()
+ {
+ AnalisesAcidentesDataAuto outerObj = new AnalisesAcidentesDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AnalisesAcidentesData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AnalisesAcidentesData.java
new file mode 100644
index 00000000..71728d0d
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AnalisesAcidentesData.java
@@ -0,0 +1,18 @@
+/*
+* AnalisesAcidentesDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+
+public final class AnalisesAcidentesData extends com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesDataAuto
+{
+
+ public AnalisesAcidentesData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AnalisesAcidentesDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AnalisesAcidentesDataAuto.java
new file mode 100644
index 00000000..adc55a22
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/AnalisesAcidentesDataAuto.java
@@ -0,0 +1,1393 @@
+/*
+* AnalisesAcidentesDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class AnalisesAcidentesDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "analises_acidentes";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "analises_acidentes.id";
+ public static final String DATA_ACIDENTE = "data_acidente";
+ public static final String DATA_ACIDENTE_FULL = "analises_acidentes.data_acidente";
+ public static final String ACIDENTADO_ID = "acidentado_id";
+ public static final String ACIDENTADO_ID_FULL = "analises_acidentes.acidentado_id";
+ public static final String TO_ACIDENTADO_ID = "to acidentado_id";
+ public static final String ESTADO = "estado";
+ public static final String ESTADO_FULL = "analises_acidentes.estado";
+ public static final String ESTABELECIMENTO_ID = "estabelecimento_id";
+ public static final String ESTABELECIMENTO_ID_FULL = "analises_acidentes.estabelecimento_id";
+ public static final String HORAS_TURNO = "horas_turno";
+ public static final String HORAS_TURNO_FULL = "analises_acidentes.horas_turno";
+ public static final String LOCAL_TRABALHO = "local_trabalho";
+ public static final String LOCAL_TRABALHO_FULL = "analises_acidentes.local_trabalho";
+ public static final String TAREFA = "tarefa";
+ public static final String TAREFA_FULL = "analises_acidentes.tarefa";
+ public static final String SUBSTANCIAS = "substancias";
+ public static final String SUBSTANCIAS_FULL = "analises_acidentes.substancias";
+ public static final String CONDICOES = "condicoes";
+ public static final String CONDICOES_FULL = "analises_acidentes.condicoes";
+ public static final String TESTEMUNHAS = "testemunhas";
+ public static final String TESTEMUNHAS_FULL = "analises_acidentes.testemunhas";
+ public static final String DESCRICAO = "descricao";
+ public static final String DESCRICAO_FULL = "analises_acidentes.descricao";
+ public static final String CONCLUSOES = "conclusoes";
+ public static final String CONCLUSOES_FULL = "analises_acidentes.conclusoes";
+ public static final String ACCOES = "accoes";
+ public static final String ACCOES_FULL = "analises_acidentes.accoes";
+ public static final String HORA_ACIDENTE = "hora_acidente";
+ public static final String HORA_ACIDENTE_FULL = "analises_acidentes.hora_acidente";
+ public static final String FORMACAO_SHST = "formacao_shst";
+ public static final String FORMACAO_SHST_FULL = "analises_acidentes.formacao_shst";
+ public static final String FORMACAO_SHST_NAO_PORQUE = "formacao_shst_nao_porque";
+ public static final String FORMACAO_SHST_NAO_PORQUE_FULL = "analises_acidentes.formacao_shst_nao_porque";
+ public static final String OUTROS_ACIDENTES_COM_COLABORADOR = "outros_acidentes_com_colaborador";
+ public static final String OUTROS_ACIDENTES_COM_COLABORADOR_FULL = "analises_acidentes.outros_acidentes_com_colaborador";
+ public static final String NR_ACIDENTES_COM_COLABORADOR = "nr_acidentes_com_colaborador";
+ public static final String NR_ACIDENTES_COM_COLABORADOR_FULL = "analises_acidentes.nr_acidentes_com_colaborador";
+ public static final String NR_RELATORIO_ACIDENTE_COLABORADOR1 = "nr_relatorio_acidente_colaborador1";
+ public static final String NR_RELATORIO_ACIDENTE_COLABORADOR1_FULL = "analises_acidentes.nr_relatorio_acidente_colaborador1";
+ public static final String NR_RELATORIO_ACIDENTE_COLABORADOR2 = "nr_relatorio_acidente_colaborador2";
+ public static final String NR_RELATORIO_ACIDENTE_COLABORADOR2_FULL = "analises_acidentes.nr_relatorio_acidente_colaborador2";
+ public static final String NR_RELATORIO_ACIDENTE_COLABORADOR3 = "nr_relatorio_acidente_colaborador3";
+ public static final String NR_RELATORIO_ACIDENTE_COLABORADOR3_FULL = "analises_acidentes.nr_relatorio_acidente_colaborador3";
+ public static final String NR_RELATORIO_ACIDENTE_COLABORADOR4 = "nr_relatorio_acidente_colaborador4";
+ public static final String NR_RELATORIO_ACIDENTE_COLABORADOR4_FULL = "analises_acidentes.nr_relatorio_acidente_colaborador4";
+ public static final String ACIDENTES_OUTROS_COLABORADORES = "acidentes_outros_colaboradores";
+ public static final String ACIDENTES_OUTROS_COLABORADORES_FULL = "analises_acidentes.acidentes_outros_colaboradores";
+ public static final String NR_ACIDENTES_OUTROS_COLABORADORES = "nr_acidentes_outros_colaboradores";
+ public static final String NR_ACIDENTES_OUTROS_COLABORADORES_FULL = "analises_acidentes.nr_acidentes_outros_colaboradores";
+ public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1 = "nr_relatorio_acidente_outros_colaboradores1";
+ public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1_FULL = "analises_acidentes.nr_relatorio_acidente_outros_colaboradores1";
+ public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2 = "nr_relatorio_acidente_outros_colaboradores2";
+ public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2_FULL = "analises_acidentes.nr_relatorio_acidente_outros_colaboradores2";
+ public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3 = "nr_relatorio_acidente_outros_colaboradores3";
+ public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3_FULL = "analises_acidentes.nr_relatorio_acidente_outros_colaboradores3";
+ public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4 = "nr_relatorio_acidente_outros_colaboradores4";
+ public static final String NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4_FULL = "analises_acidentes.nr_relatorio_acidente_outros_colaboradores4";
+ public static final String LESAO_CABECA = "lesao_cabeca";
+ public static final String LESAO_CABECA_FULL = "analises_acidentes.lesao_cabeca";
+ public static final String LESAO_PESCOCO = "lesao_pescoco";
+ public static final String LESAO_PESCOCO_FULL = "analises_acidentes.lesao_pescoco";
+ public static final String LESAO_TRONCO = "lesao_tronco";
+ public static final String LESAO_TRONCO_FULL = "analises_acidentes.lesao_tronco";
+ public static final String LESAO_MEMBRO_SUP_DIR = "lesao_membro_sup_dir";
+ public static final String LESAO_MEMBRO_SUP_DIR_FULL = "analises_acidentes.lesao_membro_sup_dir";
+ public static final String LESAO_MEMBRO_SUP_ESQ = "lesao_membro_sup_esq";
+ public static final String LESAO_MEMBRO_SUP_ESQ_FULL = "analises_acidentes.lesao_membro_sup_esq";
+ public static final String LESAO_MEMBRO_INF_DIR = "lesao_membro_inf_dir";
+ public static final String LESAO_MEMBRO_INF_DIR_FULL = "analises_acidentes.lesao_membro_inf_dir";
+ public static final String LESAO_MEMBRO_INF_ESQ = "lesao_membro_inf_esq";
+ public static final String LESAO_MEMBRO_INF_ESQ_FULL = "analises_acidentes.lesao_membro_inf_esq";
+ public static final String ESPECIF1 = "especif1";
+ public static final String ESPECIF1_FULL = "analises_acidentes.especif1";
+ public static final String ESPECIF2 = "especif2";
+ public static final String ESPECIF2_FULL = "analises_acidentes.especif2";
+ public static final String ESPECIF3 = "especif3";
+ public static final String ESPECIF3_FULL = "analises_acidentes.especif3";
+ public static final String ESPECIF4 = "especif4";
+ public static final String ESPECIF4_FULL = "analises_acidentes.especif4";
+ public static final String TIPO_INCAPACIDADE = "tipo_incapacidade";
+ public static final String TIPO_INCAPACIDADE_FULL = "analises_acidentes.tipo_incapacidade";
+ public static final String COEF_INCAPACIDADE = "coef_incapacidade";
+ public static final String COEF_INCAPACIDADE_FULL = "analises_acidentes.coef_incapacidade";
+ public static final String DATA_AVAL_INCAPACIDADE = "data_aval_incapacidade";
+ public static final String DATA_AVAL_INCAPACIDADE_FULL = "analises_acidentes.data_aval_incapacidade";
+ public static final String DATA_REV_INCAPACIDADE = "data_rev_incapacidade";
+ public static final String DATA_REV_INCAPACIDADE_FULL = "analises_acidentes.data_rev_incapacidade";
+ public static final String PERIODO_INCAPACIDADE_DE = "periodo_incapacidade_de";
+ public static final String PERIODO_INCAPACIDADE_DE_FULL = "analises_acidentes.periodo_incapacidade_de";
+ public static final String PERIODO_INCAPACIDADE_A = "periodo_incapacidade_a";
+ public static final String PERIODO_INCAPACIDADE_A_FULL = "analises_acidentes.periodo_incapacidade_a";
+ public static final String IMG_FLEXAO = "img_flexao";
+ public static final String IMG_FLEXAO_FULL = "analises_acidentes.img_flexao";
+ public static final String IMG_EXT1 = "img_ext1";
+ public static final String IMG_EXT1_FULL = "analises_acidentes.img_ext1";
+ public static final String IMG_EXT2 = "img_ext2";
+ public static final String IMG_EXT2_FULL = "analises_acidentes.img_ext2";
+ public static final String IMG_CAB2 = "img_cab2";
+ public static final String IMG_CAB2_FULL = "analises_acidentes.img_cab2";
+ public static final String IMG_CAB3 = "img_cab3";
+ public static final String IMG_CAB3_FULL = "analises_acidentes.img_cab3";
+ public static final String IMG_MA2 = "img_ma2";
+ public static final String IMG_MA2_FULL = "analises_acidentes.img_ma2";
+ public static final String IMG_MA3 = "img_ma3";
+ public static final String IMG_MA3_FULL = "analises_acidentes.img_ma3";
+ public static final String IMG_MA5 = "img_ma5";
+ public static final String IMG_MA5_FULL = "analises_acidentes.img_ma5";
+ public static final String IMG_MA6 = "img_ma6";
+ public static final String IMG_MA6_FULL = "analises_acidentes.img_ma6";
+ public static final String IMG_MA8 = "img_ma8";
+ public static final String IMG_MA8_FULL = "analises_acidentes.img_ma8";
+ public static final String IMG_MA10 = "img_ma10";
+ public static final String IMG_MA10_FULL = "analises_acidentes.img_ma10";
+ public static final String RESTRICAO_CARGA = "restricao_carga";
+ public static final String RESTRICAO_CARGA_FULL = "analises_acidentes.restricao_carga";
+ public static final String RESTRICAO_MOTRICIDADE = "restricao_motricidade";
+ public static final String RESTRICAO_MOTRICIDADE_FULL = "analises_acidentes.restricao_motricidade";
+ public static final String RESTRICAO_CONDUCAO = "restricao_conducao";
+ public static final String RESTRICAO_CONDUCAO_FULL = "analises_acidentes.restricao_conducao";
+ public static final String RESTRICAO_VIBRACOES = "restricao_vibracoes";
+ public static final String RESTRICAO_VIBRACOES_FULL = "analises_acidentes.restricao_vibracoes";
+ public static final String RESTRICAO_OUTRAS = "restricao_outras";
+ public static final String RESTRICAO_OUTRAS_FULL = "analises_acidentes.restricao_outras";
+ public static final String MED_OBSERV = "med_observ";
+ public static final String MED_OBSERV_FULL = "analises_acidentes.med_observ";
+ public static final String TIPO_LESAO = "tipo_lesao";
+ public static final String TIPO_LESAO_FULL = "analises_acidentes.tipo_lesao";
+ public static final String IMG_ROT1 = "img_rot1";
+ public static final String IMG_ROT1_FULL = "analises_acidentes.img_rot1";
+ public static final String IMG_ROT2 = "img_rot2";
+ public static final String IMG_ROT2_FULL = "analises_acidentes.img_rot2";
+ public static final String IMG_CAB1 = "img_cab1";
+ public static final String IMG_CAB1_FULL = "analises_acidentes.img_cab1";
+ public static final String IMG_CAB4 = "img_cab4";
+ public static final String IMG_CAB4_FULL = "analises_acidentes.img_cab4";
+ public static final String IMG_MA1 = "img_ma1";
+ public static final String IMG_MA1_FULL = "analises_acidentes.img_ma1";
+ public static final String IMG_MA4 = "img_ma4";
+ public static final String IMG_MA4_FULL = "analises_acidentes.img_ma4";
+ public static final String IMG_MA7 = "img_ma7";
+ public static final String IMG_MA7_FULL = "analises_acidentes.img_ma7";
+ public static final String IMG_MA9 = "img_ma9";
+ public static final String IMG_MA9_FULL = "analises_acidentes.img_ma9";
+ public static final String EMPRESA_ID = "empresa_id";
+ public static final String EMPRESA_ID_FULL = "analises_acidentes.empresa_id";
+ public static final String MEDICO_ID = "medico_id";
+ public static final String MEDICO_ID_FULL = "analises_acidentes.medico_id";
+ public static final String TECNICO_SAUDE_ID = "tecnico_saude_id";
+ public static final String TECNICO_SAUDE_ID_FULL = "analises_acidentes.tecnico_saude_id";
+ public static final String ANALISE_NR = "analise_nr";
+ public static final String ANALISE_NR_FULL = "analises_acidentes.analise_nr";
+ public static final String ESTADO_ASSINATURA = "estado_assinatura";
+ public static final String ESTADO_ASSINATURA_FULL = "analises_acidentes.estado_assinatura";
+ public static final String ASS_RESP_SEG = "ass_resp_seg";
+ public static final String ASS_RESP_SEG_FULL = "analises_acidentes.ass_resp_seg";
+ public static final String ASS_RESP_RH = "ass_resp_rh";
+ public static final String ASS_RESP_RH_FULL = "analises_acidentes.ass_resp_rh";
+ public static final String DATA_CONSOLIDACAO = "data_consolidacao";
+ public static final String DATA_CONSOLIDACAO_FULL = "analises_acidentes.data_consolidacao";
+ public static final String DATA_ASSINATURA_SEG = "data_assinatura_seg";
+ public static final String DATA_ASSINATURA_SEG_FULL = "analises_acidentes.data_assinatura_seg";
+ public static final String DATA_ASSINATURA_RH = "data_assinatura_rh";
+ public static final String DATA_ASSINATURA_RH_FULL = "analises_acidentes.data_assinatura_rh";
+ public static final String ASS_CONSOLIDACAO = "ass_consolidacao";
+ public static final String ASS_CONSOLIDACAO_FULL = "analises_acidentes.ass_consolidacao";
+ public static final String NOME_RESP_SEG = "nome_resp_seg";
+ public static final String NOME_RESP_SEG_FULL = "analises_acidentes.nome_resp_seg";
+ public static final String NOME_RESP_RH = "nome_resp_rh";
+ public static final String NOME_RESP_RH_FULL = "analises_acidentes.nome_resp_rh";
+ public static final String CAUSAS = "causas";
+ public static final String CAUSAS_FULL = "analises_acidentes.causas";
+ public static final String ESTADO_ANTES_CORRECAO = "estado_antes_correcao";
+ public static final String ESTADO_ANTES_CORRECAO_FULL = "analises_acidentes.estado_antes_correcao";
+ public static final String OBSERVACOES_CORRECAO = "observacoes_correcao";
+ public static final String OBSERVACOES_CORRECAO_FULL = "analises_acidentes.observacoes_correcao";
+ public static final String CORRECAO = "correcao";
+ public static final String CORRECAO_FULL = "analises_acidentes.correcao";
+ public static final String ASS_SUPERIOR = "ass_superior";
+ public static final String ASS_SUPERIOR_FULL = "analises_acidentes.ass_superior";
+ public static final String NOME_SUPERIOR = "nome_superior";
+ public static final String NOME_SUPERIOR_FULL = "analises_acidentes.nome_superior";
+ public static final String DATA_ASSINATURA_SUPERIOR = "data_assinatura_superior";
+ public static final String DATA_ASSINATURA_SUPERIOR_FULL = "analises_acidentes.data_assinatura_superior";
+ public static final String AVERIGUADOR = "averiguador";
+ public static final String AVERIGUADOR_FULL = "analises_acidentes.averiguador";
+ public static final String AVERIGUACAO_POSTERIOR = "averiguacao_posterior";
+ public static final String AVERIGUACAO_POSTERIOR_FULL = "analises_acidentes.averiguacao_posterior";
+ public static final String AVERIGUACAO_OBS = "averiguacao_obs";
+ public static final String AVERIGUACAO_OBS_FULL = "analises_acidentes.averiguacao_obs";
+ public static final String DATA_INICIO_PROCESSO = "data_inicio_processo";
+ public static final String DATA_INICIO_PROCESSO_FULL = "analises_acidentes.data_inicio_processo";
+ public static final String NOME_RESP_CONSOLIDACAO = "nome_resp_consolidacao";
+ public static final String NOME_RESP_CONSOLIDACAO_FULL = "analises_acidentes.nome_resp_consolidacao";
+ public static final String SECCAO_ID = "seccao_id";
+ public static final String SECCAO_ID_FULL = "analises_acidentes.seccao_id";
+ public static final String DEPARTAMENTO_ID = "departamento_id";
+ public static final String DEPARTAMENTO_ID_FULL = "analises_acidentes.departamento_id";
+ public static final String RH_FASE4 = "rh_fase4";
+ public static final String RH_FASE4_FULL = "analises_acidentes.rh_fase4";
+ public static final String APAGADA = "apagada";
+ public static final String APAGADA_FULL = "analises_acidentes.apagada";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ DATA_ACIDENTE, ACIDENTADO_ID, TO_ACIDENTADO_ID, ESTADO, ESTABELECIMENTO_ID,
+ HORAS_TURNO, LOCAL_TRABALHO, TAREFA, SUBSTANCIAS, CONDICOES, TESTEMUNHAS,
+ DESCRICAO, CONCLUSOES, ACCOES, HORA_ACIDENTE, FORMACAO_SHST,
+ FORMACAO_SHST_NAO_PORQUE, OUTROS_ACIDENTES_COM_COLABORADOR,
+ NR_ACIDENTES_COM_COLABORADOR, NR_RELATORIO_ACIDENTE_COLABORADOR1,
+ NR_RELATORIO_ACIDENTE_COLABORADOR2, NR_RELATORIO_ACIDENTE_COLABORADOR3,
+ NR_RELATORIO_ACIDENTE_COLABORADOR4, ACIDENTES_OUTROS_COLABORADORES,
+ NR_ACIDENTES_OUTROS_COLABORADORES,
+ NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1,
+ NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2,
+ NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3,
+ NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4, LESAO_CABECA, LESAO_PESCOCO,
+ LESAO_TRONCO, LESAO_MEMBRO_SUP_DIR, LESAO_MEMBRO_SUP_ESQ,
+ LESAO_MEMBRO_INF_DIR, LESAO_MEMBRO_INF_ESQ, ESPECIF1, ESPECIF2, ESPECIF3,
+ ESPECIF4, TIPO_INCAPACIDADE, COEF_INCAPACIDADE, DATA_AVAL_INCAPACIDADE,
+ DATA_REV_INCAPACIDADE, PERIODO_INCAPACIDADE_DE, PERIODO_INCAPACIDADE_A,
+ IMG_FLEXAO, IMG_EXT1, IMG_EXT2, IMG_CAB2, IMG_CAB3, IMG_MA2, IMG_MA3, IMG_MA5, IMG_MA6,
+ IMG_MA8, IMG_MA10, RESTRICAO_CARGA, RESTRICAO_MOTRICIDADE, RESTRICAO_CONDUCAO,
+ RESTRICAO_VIBRACOES, RESTRICAO_OUTRAS, MED_OBSERV, TIPO_LESAO, IMG_ROT1,
+ IMG_ROT2, IMG_CAB1, IMG_CAB4, IMG_MA1, IMG_MA4, IMG_MA7, IMG_MA9, EMPRESA_ID,
+ MEDICO_ID, TECNICO_SAUDE_ID, ANALISE_NR, ESTADO_ASSINATURA, ASS_RESP_SEG,
+ ASS_RESP_RH, DATA_CONSOLIDACAO, DATA_ASSINATURA_SEG, DATA_ASSINATURA_RH,
+ ASS_CONSOLIDACAO, NOME_RESP_SEG, NOME_RESP_RH, CAUSAS, ESTADO_ANTES_CORRECAO,
+ OBSERVACOES_CORRECAO, CORRECAO, ASS_SUPERIOR, NOME_SUPERIOR,
+ DATA_ASSINATURA_SUPERIOR, AVERIGUADOR, AVERIGUACAO_POSTERIOR,
+ AVERIGUACAO_OBS, DATA_INICIO_PROCESSO, NOME_RESP_CONSOLIDACAO, SECCAO_ID,
+ DEPARTAMENTO_ID, RH_FASE4, APAGADA, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, DATA_ACIDENTE, ACIDENTADO_ID, ESTADO, ESTABELECIMENTO_ID, HORAS_TURNO,
+ LOCAL_TRABALHO, TAREFA, SUBSTANCIAS, CONDICOES, TESTEMUNHAS, DESCRICAO, CONCLUSOES,
+ ACCOES, HORA_ACIDENTE, FORMACAO_SHST, FORMACAO_SHST_NAO_PORQUE,
+ OUTROS_ACIDENTES_COM_COLABORADOR, NR_ACIDENTES_COM_COLABORADOR,
+ NR_RELATORIO_ACIDENTE_COLABORADOR1, NR_RELATORIO_ACIDENTE_COLABORADOR2,
+ NR_RELATORIO_ACIDENTE_COLABORADOR3, NR_RELATORIO_ACIDENTE_COLABORADOR4,
+ ACIDENTES_OUTROS_COLABORADORES, NR_ACIDENTES_OUTROS_COLABORADORES,
+ NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1,
+ NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2,
+ NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3,
+ NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4, LESAO_CABECA, LESAO_PESCOCO,
+ LESAO_TRONCO, LESAO_MEMBRO_SUP_DIR, LESAO_MEMBRO_SUP_ESQ,
+ LESAO_MEMBRO_INF_DIR, LESAO_MEMBRO_INF_ESQ, ESPECIF1, ESPECIF2, ESPECIF3,
+ ESPECIF4, TIPO_INCAPACIDADE, COEF_INCAPACIDADE, DATA_AVAL_INCAPACIDADE,
+ DATA_REV_INCAPACIDADE, PERIODO_INCAPACIDADE_DE, PERIODO_INCAPACIDADE_A,
+ IMG_FLEXAO, IMG_EXT1, IMG_EXT2, IMG_CAB2, IMG_CAB3, IMG_MA2, IMG_MA3, IMG_MA5, IMG_MA6,
+ IMG_MA8, IMG_MA10, RESTRICAO_CARGA, RESTRICAO_MOTRICIDADE, RESTRICAO_CONDUCAO,
+ RESTRICAO_VIBRACOES, RESTRICAO_OUTRAS, MED_OBSERV, TIPO_LESAO, IMG_ROT1,
+ IMG_ROT2, IMG_CAB1, IMG_CAB4, IMG_MA1, IMG_MA4, IMG_MA7, IMG_MA9, EMPRESA_ID,
+ MEDICO_ID, TECNICO_SAUDE_ID, ANALISE_NR, ESTADO_ASSINATURA, ASS_RESP_SEG,
+ ASS_RESP_RH, DATA_CONSOLIDACAO, DATA_ASSINATURA_SEG, DATA_ASSINATURA_RH,
+ ASS_CONSOLIDACAO, NOME_RESP_SEG, NOME_RESP_RH, CAUSAS, ESTADO_ANTES_CORRECAO,
+ OBSERVACOES_CORRECAO, CORRECAO, ASS_SUPERIOR, NOME_SUPERIOR,
+ DATA_ASSINATURA_SUPERIOR, AVERIGUADOR, AVERIGUACAO_POSTERIOR,
+ AVERIGUACAO_OBS, DATA_INICIO_PROCESSO, NOME_RESP_CONSOLIDACAO, SECCAO_ID,
+ DEPARTAMENTO_ID, RH_FASE4, APAGADA, };
+
+ private Map dataHash;
+
+ public AnalisesAcidentesDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public java.util.Date getData_acidente()
+ {
+ return (java.util.Date) get(DATA_ACIDENTE);
+ }
+
+ public void setData_acidente(java.util.Date data_acidenteValue )
+ {
+ this.set(DATA_ACIDENTE, data_acidenteValue );
+ }
+
+ public Integer getAcidentado_id()
+ {
+ return (Integer) dataHash.get(ACIDENTADO_ID);
+ }
+
+ public void setAcidentado_id(Integer acidentado_idValue )
+ {
+ dataHash.put(TO_ACIDENTADO_ID, null);
+ dataHash.put(ACIDENTADO_ID, acidentado_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp.AcidentadosData toAcidentado_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_ACIDENTADO_ID) == null && getAcidentado_id() != null )
+ {
+ dataHash.put(TO_ACIDENTADO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.AcidentadosData.class, new Object[]{ getAcidentado_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp.AcidentadosData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp.AcidentadosData) dataHash.get(TO_ACIDENTADO_ID);
+ }
+
+ public void setToAcidentado_id(com.evolute.siprp.server.db.data.siprp.AcidentadosData acidentado_idObject )
+ {
+ if( acidentado_idObject == null )
+ {
+ dataHash.put(ACIDENTADO_ID, null);
+ }
+ else
+ {
+ dataHash.put(ACIDENTADO_ID, acidentado_idObject.get( com.evolute.siprp.server.db.data.siprp.AcidentadosData.ID ));
+ }
+ dataHash.put(TO_ACIDENTADO_ID, acidentado_idObject);
+ }
+
+ public Integer getEstado()
+ {
+ return (Integer) get(ESTADO);
+ }
+
+ public void setEstado(Integer estadoValue )
+ {
+ this.set(ESTADO, estadoValue );
+ }
+
+ public Integer getEstabelecimento_id()
+ {
+ return (Integer) get(ESTABELECIMENTO_ID);
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_idValue )
+ {
+ this.set(ESTABELECIMENTO_ID, estabelecimento_idValue );
+ }
+
+ public Integer getHoras_turno()
+ {
+ return (Integer) get(HORAS_TURNO);
+ }
+
+ public void setHoras_turno(Integer horas_turnoValue )
+ {
+ this.set(HORAS_TURNO, horas_turnoValue );
+ }
+
+ public String getLocal_trabalho()
+ {
+ return (String) get(LOCAL_TRABALHO);
+ }
+
+ public void setLocal_trabalho(String local_trabalhoValue )
+ {
+ this.set(LOCAL_TRABALHO, local_trabalhoValue );
+ }
+
+ public String getTarefa()
+ {
+ return (String) get(TAREFA);
+ }
+
+ public void setTarefa(String tarefaValue )
+ {
+ this.set(TAREFA, tarefaValue );
+ }
+
+ public String getSubstancias()
+ {
+ return (String) get(SUBSTANCIAS);
+ }
+
+ public void setSubstancias(String substanciasValue )
+ {
+ this.set(SUBSTANCIAS, substanciasValue );
+ }
+
+ public String getCondicoes()
+ {
+ return (String) get(CONDICOES);
+ }
+
+ public void setCondicoes(String condicoesValue )
+ {
+ this.set(CONDICOES, condicoesValue );
+ }
+
+ public String getTestemunhas()
+ {
+ return (String) get(TESTEMUNHAS);
+ }
+
+ public void setTestemunhas(String testemunhasValue )
+ {
+ this.set(TESTEMUNHAS, testemunhasValue );
+ }
+
+ public String getDescricao()
+ {
+ return (String) get(DESCRICAO);
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.set(DESCRICAO, descricaoValue );
+ }
+
+ public String getConclusoes()
+ {
+ return (String) get(CONCLUSOES);
+ }
+
+ public void setConclusoes(String conclusoesValue )
+ {
+ this.set(CONCLUSOES, conclusoesValue );
+ }
+
+ public String getAccoes()
+ {
+ return (String) get(ACCOES);
+ }
+
+ public void setAccoes(String accoesValue )
+ {
+ this.set(ACCOES, accoesValue );
+ }
+
+ public java.sql.Time getHora_acidente()
+ {
+ return (java.sql.Time) get(HORA_ACIDENTE);
+ }
+
+ public void setHora_acidente(java.sql.Time hora_acidenteValue )
+ {
+ this.set(HORA_ACIDENTE, hora_acidenteValue );
+ }
+
+ public String getFormacao_shst()
+ {
+ return (String) get(FORMACAO_SHST);
+ }
+
+ public void setFormacao_shst(String formacao_shstValue )
+ {
+ this.set(FORMACAO_SHST, formacao_shstValue );
+ }
+
+ public String getFormacao_shst_nao_porque()
+ {
+ return (String) get(FORMACAO_SHST_NAO_PORQUE);
+ }
+
+ public void setFormacao_shst_nao_porque(String formacao_shst_nao_porqueValue )
+ {
+ this.set(FORMACAO_SHST_NAO_PORQUE, formacao_shst_nao_porqueValue );
+ }
+
+ public String getOutros_acidentes_com_colaborador()
+ {
+ return (String) get(OUTROS_ACIDENTES_COM_COLABORADOR);
+ }
+
+ public void setOutros_acidentes_com_colaborador(String outros_acidentes_com_colaboradorValue )
+ {
+ this.set(OUTROS_ACIDENTES_COM_COLABORADOR, outros_acidentes_com_colaboradorValue );
+ }
+
+ public Integer getNr_acidentes_com_colaborador()
+ {
+ return (Integer) get(NR_ACIDENTES_COM_COLABORADOR);
+ }
+
+ public void setNr_acidentes_com_colaborador(Integer nr_acidentes_com_colaboradorValue )
+ {
+ this.set(NR_ACIDENTES_COM_COLABORADOR, nr_acidentes_com_colaboradorValue );
+ }
+
+ public Integer getNr_relatorio_acidente_colaborador1()
+ {
+ return (Integer) get(NR_RELATORIO_ACIDENTE_COLABORADOR1);
+ }
+
+ public void setNr_relatorio_acidente_colaborador1(Integer nr_relatorio_acidente_colaborador1Value )
+ {
+ this.set(NR_RELATORIO_ACIDENTE_COLABORADOR1, nr_relatorio_acidente_colaborador1Value );
+ }
+
+ public Integer getNr_relatorio_acidente_colaborador2()
+ {
+ return (Integer) get(NR_RELATORIO_ACIDENTE_COLABORADOR2);
+ }
+
+ public void setNr_relatorio_acidente_colaborador2(Integer nr_relatorio_acidente_colaborador2Value )
+ {
+ this.set(NR_RELATORIO_ACIDENTE_COLABORADOR2, nr_relatorio_acidente_colaborador2Value );
+ }
+
+ public Integer getNr_relatorio_acidente_colaborador3()
+ {
+ return (Integer) get(NR_RELATORIO_ACIDENTE_COLABORADOR3);
+ }
+
+ public void setNr_relatorio_acidente_colaborador3(Integer nr_relatorio_acidente_colaborador3Value )
+ {
+ this.set(NR_RELATORIO_ACIDENTE_COLABORADOR3, nr_relatorio_acidente_colaborador3Value );
+ }
+
+ public Integer getNr_relatorio_acidente_colaborador4()
+ {
+ return (Integer) get(NR_RELATORIO_ACIDENTE_COLABORADOR4);
+ }
+
+ public void setNr_relatorio_acidente_colaborador4(Integer nr_relatorio_acidente_colaborador4Value )
+ {
+ this.set(NR_RELATORIO_ACIDENTE_COLABORADOR4, nr_relatorio_acidente_colaborador4Value );
+ }
+
+ public String getAcidentes_outros_colaboradores()
+ {
+ return (String) get(ACIDENTES_OUTROS_COLABORADORES);
+ }
+
+ public void setAcidentes_outros_colaboradores(String acidentes_outros_colaboradoresValue )
+ {
+ this.set(ACIDENTES_OUTROS_COLABORADORES, acidentes_outros_colaboradoresValue );
+ }
+
+ public Integer getNr_acidentes_outros_colaboradores()
+ {
+ return (Integer) get(NR_ACIDENTES_OUTROS_COLABORADORES);
+ }
+
+ public void setNr_acidentes_outros_colaboradores(Integer nr_acidentes_outros_colaboradoresValue )
+ {
+ this.set(NR_ACIDENTES_OUTROS_COLABORADORES, nr_acidentes_outros_colaboradoresValue );
+ }
+
+ public Integer getNr_relatorio_acidente_outros_colaboradores1()
+ {
+ return (Integer) get(NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1);
+ }
+
+ public void setNr_relatorio_acidente_outros_colaboradores1(Integer nr_relatorio_acidente_outros_colaboradores1Value )
+ {
+ this.set(NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES1, nr_relatorio_acidente_outros_colaboradores1Value );
+ }
+
+ public Integer getNr_relatorio_acidente_outros_colaboradores2()
+ {
+ return (Integer) get(NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2);
+ }
+
+ public void setNr_relatorio_acidente_outros_colaboradores2(Integer nr_relatorio_acidente_outros_colaboradores2Value )
+ {
+ this.set(NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES2, nr_relatorio_acidente_outros_colaboradores2Value );
+ }
+
+ public Integer getNr_relatorio_acidente_outros_colaboradores3()
+ {
+ return (Integer) get(NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3);
+ }
+
+ public void setNr_relatorio_acidente_outros_colaboradores3(Integer nr_relatorio_acidente_outros_colaboradores3Value )
+ {
+ this.set(NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES3, nr_relatorio_acidente_outros_colaboradores3Value );
+ }
+
+ public Integer getNr_relatorio_acidente_outros_colaboradores4()
+ {
+ return (Integer) get(NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4);
+ }
+
+ public void setNr_relatorio_acidente_outros_colaboradores4(Integer nr_relatorio_acidente_outros_colaboradores4Value )
+ {
+ this.set(NR_RELATORIO_ACIDENTE_OUTROS_COLABORADORES4, nr_relatorio_acidente_outros_colaboradores4Value );
+ }
+
+ public String getLesao_cabeca()
+ {
+ return (String) get(LESAO_CABECA);
+ }
+
+ public void setLesao_cabeca(String lesao_cabecaValue )
+ {
+ this.set(LESAO_CABECA, lesao_cabecaValue );
+ }
+
+ public String getLesao_pescoco()
+ {
+ return (String) get(LESAO_PESCOCO);
+ }
+
+ public void setLesao_pescoco(String lesao_pescocoValue )
+ {
+ this.set(LESAO_PESCOCO, lesao_pescocoValue );
+ }
+
+ public String getLesao_tronco()
+ {
+ return (String) get(LESAO_TRONCO);
+ }
+
+ public void setLesao_tronco(String lesao_troncoValue )
+ {
+ this.set(LESAO_TRONCO, lesao_troncoValue );
+ }
+
+ public String getLesao_membro_sup_dir()
+ {
+ return (String) get(LESAO_MEMBRO_SUP_DIR);
+ }
+
+ public void setLesao_membro_sup_dir(String lesao_membro_sup_dirValue )
+ {
+ this.set(LESAO_MEMBRO_SUP_DIR, lesao_membro_sup_dirValue );
+ }
+
+ public String getLesao_membro_sup_esq()
+ {
+ return (String) get(LESAO_MEMBRO_SUP_ESQ);
+ }
+
+ public void setLesao_membro_sup_esq(String lesao_membro_sup_esqValue )
+ {
+ this.set(LESAO_MEMBRO_SUP_ESQ, lesao_membro_sup_esqValue );
+ }
+
+ public String getLesao_membro_inf_dir()
+ {
+ return (String) get(LESAO_MEMBRO_INF_DIR);
+ }
+
+ public void setLesao_membro_inf_dir(String lesao_membro_inf_dirValue )
+ {
+ this.set(LESAO_MEMBRO_INF_DIR, lesao_membro_inf_dirValue );
+ }
+
+ public String getLesao_membro_inf_esq()
+ {
+ return (String) get(LESAO_MEMBRO_INF_ESQ);
+ }
+
+ public void setLesao_membro_inf_esq(String lesao_membro_inf_esqValue )
+ {
+ this.set(LESAO_MEMBRO_INF_ESQ, lesao_membro_inf_esqValue );
+ }
+
+ public String getEspecif1()
+ {
+ return (String) get(ESPECIF1);
+ }
+
+ public void setEspecif1(String especif1Value )
+ {
+ this.set(ESPECIF1, especif1Value );
+ }
+
+ public String getEspecif2()
+ {
+ return (String) get(ESPECIF2);
+ }
+
+ public void setEspecif2(String especif2Value )
+ {
+ this.set(ESPECIF2, especif2Value );
+ }
+
+ public String getEspecif3()
+ {
+ return (String) get(ESPECIF3);
+ }
+
+ public void setEspecif3(String especif3Value )
+ {
+ this.set(ESPECIF3, especif3Value );
+ }
+
+ public String getEspecif4()
+ {
+ return (String) get(ESPECIF4);
+ }
+
+ public void setEspecif4(String especif4Value )
+ {
+ this.set(ESPECIF4, especif4Value );
+ }
+
+ public String getTipo_incapacidade()
+ {
+ return (String) get(TIPO_INCAPACIDADE);
+ }
+
+ public void setTipo_incapacidade(String tipo_incapacidadeValue )
+ {
+ this.set(TIPO_INCAPACIDADE, tipo_incapacidadeValue );
+ }
+
+ public Integer getCoef_incapacidade()
+ {
+ return (Integer) get(COEF_INCAPACIDADE);
+ }
+
+ public void setCoef_incapacidade(Integer coef_incapacidadeValue )
+ {
+ this.set(COEF_INCAPACIDADE, coef_incapacidadeValue );
+ }
+
+ public java.util.Date getData_aval_incapacidade()
+ {
+ return (java.util.Date) get(DATA_AVAL_INCAPACIDADE);
+ }
+
+ public void setData_aval_incapacidade(java.util.Date data_aval_incapacidadeValue )
+ {
+ this.set(DATA_AVAL_INCAPACIDADE, data_aval_incapacidadeValue );
+ }
+
+ public java.util.Date getData_rev_incapacidade()
+ {
+ return (java.util.Date) get(DATA_REV_INCAPACIDADE);
+ }
+
+ public void setData_rev_incapacidade(java.util.Date data_rev_incapacidadeValue )
+ {
+ this.set(DATA_REV_INCAPACIDADE, data_rev_incapacidadeValue );
+ }
+
+ public java.util.Date getPeriodo_incapacidade_de()
+ {
+ return (java.util.Date) get(PERIODO_INCAPACIDADE_DE);
+ }
+
+ public void setPeriodo_incapacidade_de(java.util.Date periodo_incapacidade_deValue )
+ {
+ this.set(PERIODO_INCAPACIDADE_DE, periodo_incapacidade_deValue );
+ }
+
+ public java.util.Date getPeriodo_incapacidade_a()
+ {
+ return (java.util.Date) get(PERIODO_INCAPACIDADE_A);
+ }
+
+ public void setPeriodo_incapacidade_a(java.util.Date periodo_incapacidade_aValue )
+ {
+ this.set(PERIODO_INCAPACIDADE_A, periodo_incapacidade_aValue );
+ }
+
+ public String getImg_flexao()
+ {
+ return (String) get(IMG_FLEXAO);
+ }
+
+ public void setImg_flexao(String img_flexaoValue )
+ {
+ this.set(IMG_FLEXAO, img_flexaoValue );
+ }
+
+ public String getImg_ext1()
+ {
+ return (String) get(IMG_EXT1);
+ }
+
+ public void setImg_ext1(String img_ext1Value )
+ {
+ this.set(IMG_EXT1, img_ext1Value );
+ }
+
+ public String getImg_ext2()
+ {
+ return (String) get(IMG_EXT2);
+ }
+
+ public void setImg_ext2(String img_ext2Value )
+ {
+ this.set(IMG_EXT2, img_ext2Value );
+ }
+
+ public String getImg_cab2()
+ {
+ return (String) get(IMG_CAB2);
+ }
+
+ public void setImg_cab2(String img_cab2Value )
+ {
+ this.set(IMG_CAB2, img_cab2Value );
+ }
+
+ public String getImg_cab3()
+ {
+ return (String) get(IMG_CAB3);
+ }
+
+ public void setImg_cab3(String img_cab3Value )
+ {
+ this.set(IMG_CAB3, img_cab3Value );
+ }
+
+ public String getImg_ma2()
+ {
+ return (String) get(IMG_MA2);
+ }
+
+ public void setImg_ma2(String img_ma2Value )
+ {
+ this.set(IMG_MA2, img_ma2Value );
+ }
+
+ public String getImg_ma3()
+ {
+ return (String) get(IMG_MA3);
+ }
+
+ public void setImg_ma3(String img_ma3Value )
+ {
+ this.set(IMG_MA3, img_ma3Value );
+ }
+
+ public String getImg_ma5()
+ {
+ return (String) get(IMG_MA5);
+ }
+
+ public void setImg_ma5(String img_ma5Value )
+ {
+ this.set(IMG_MA5, img_ma5Value );
+ }
+
+ public String getImg_ma6()
+ {
+ return (String) get(IMG_MA6);
+ }
+
+ public void setImg_ma6(String img_ma6Value )
+ {
+ this.set(IMG_MA6, img_ma6Value );
+ }
+
+ public String getImg_ma8()
+ {
+ return (String) get(IMG_MA8);
+ }
+
+ public void setImg_ma8(String img_ma8Value )
+ {
+ this.set(IMG_MA8, img_ma8Value );
+ }
+
+ public String getImg_ma10()
+ {
+ return (String) get(IMG_MA10);
+ }
+
+ public void setImg_ma10(String img_ma10Value )
+ {
+ this.set(IMG_MA10, img_ma10Value );
+ }
+
+ public Integer getRestricao_carga()
+ {
+ return (Integer) get(RESTRICAO_CARGA);
+ }
+
+ public void setRestricao_carga(Integer restricao_cargaValue )
+ {
+ this.set(RESTRICAO_CARGA, restricao_cargaValue );
+ }
+
+ public String getRestricao_motricidade()
+ {
+ return (String) get(RESTRICAO_MOTRICIDADE);
+ }
+
+ public void setRestricao_motricidade(String restricao_motricidadeValue )
+ {
+ this.set(RESTRICAO_MOTRICIDADE, restricao_motricidadeValue );
+ }
+
+ public String getRestricao_conducao()
+ {
+ return (String) get(RESTRICAO_CONDUCAO);
+ }
+
+ public void setRestricao_conducao(String restricao_conducaoValue )
+ {
+ this.set(RESTRICAO_CONDUCAO, restricao_conducaoValue );
+ }
+
+ public String getRestricao_vibracoes()
+ {
+ return (String) get(RESTRICAO_VIBRACOES);
+ }
+
+ public void setRestricao_vibracoes(String restricao_vibracoesValue )
+ {
+ this.set(RESTRICAO_VIBRACOES, restricao_vibracoesValue );
+ }
+
+ public String getRestricao_outras()
+ {
+ return (String) get(RESTRICAO_OUTRAS);
+ }
+
+ public void setRestricao_outras(String restricao_outrasValue )
+ {
+ this.set(RESTRICAO_OUTRAS, restricao_outrasValue );
+ }
+
+ public String getMed_observ()
+ {
+ return (String) get(MED_OBSERV);
+ }
+
+ public void setMed_observ(String med_observValue )
+ {
+ this.set(MED_OBSERV, med_observValue );
+ }
+
+ public String getTipo_lesao()
+ {
+ return (String) get(TIPO_LESAO);
+ }
+
+ public void setTipo_lesao(String tipo_lesaoValue )
+ {
+ this.set(TIPO_LESAO, tipo_lesaoValue );
+ }
+
+ public String getImg_rot1()
+ {
+ return (String) get(IMG_ROT1);
+ }
+
+ public void setImg_rot1(String img_rot1Value )
+ {
+ this.set(IMG_ROT1, img_rot1Value );
+ }
+
+ public String getImg_rot2()
+ {
+ return (String) get(IMG_ROT2);
+ }
+
+ public void setImg_rot2(String img_rot2Value )
+ {
+ this.set(IMG_ROT2, img_rot2Value );
+ }
+
+ public String getImg_cab1()
+ {
+ return (String) get(IMG_CAB1);
+ }
+
+ public void setImg_cab1(String img_cab1Value )
+ {
+ this.set(IMG_CAB1, img_cab1Value );
+ }
+
+ public String getImg_cab4()
+ {
+ return (String) get(IMG_CAB4);
+ }
+
+ public void setImg_cab4(String img_cab4Value )
+ {
+ this.set(IMG_CAB4, img_cab4Value );
+ }
+
+ public String getImg_ma1()
+ {
+ return (String) get(IMG_MA1);
+ }
+
+ public void setImg_ma1(String img_ma1Value )
+ {
+ this.set(IMG_MA1, img_ma1Value );
+ }
+
+ public String getImg_ma4()
+ {
+ return (String) get(IMG_MA4);
+ }
+
+ public void setImg_ma4(String img_ma4Value )
+ {
+ this.set(IMG_MA4, img_ma4Value );
+ }
+
+ public String getImg_ma7()
+ {
+ return (String) get(IMG_MA7);
+ }
+
+ public void setImg_ma7(String img_ma7Value )
+ {
+ this.set(IMG_MA7, img_ma7Value );
+ }
+
+ public String getImg_ma9()
+ {
+ return (String) get(IMG_MA9);
+ }
+
+ public void setImg_ma9(String img_ma9Value )
+ {
+ this.set(IMG_MA9, img_ma9Value );
+ }
+
+ public Integer getEmpresa_id()
+ {
+ return (Integer) get(EMPRESA_ID);
+ }
+
+ public void setEmpresa_id(Integer empresa_idValue )
+ {
+ this.set(EMPRESA_ID, empresa_idValue );
+ }
+
+ public Integer getMedico_id()
+ {
+ return (Integer) get(MEDICO_ID);
+ }
+
+ public void setMedico_id(Integer medico_idValue )
+ {
+ this.set(MEDICO_ID, medico_idValue );
+ }
+
+ public Integer getTecnico_saude_id()
+ {
+ return (Integer) get(TECNICO_SAUDE_ID);
+ }
+
+ public void setTecnico_saude_id(Integer tecnico_saude_idValue )
+ {
+ this.set(TECNICO_SAUDE_ID, tecnico_saude_idValue );
+ }
+
+ public String getAnalise_nr()
+ {
+ return (String) get(ANALISE_NR);
+ }
+
+ public void setAnalise_nr(String analise_nrValue )
+ {
+ this.set(ANALISE_NR, analise_nrValue );
+ }
+
+ public Integer getEstado_assinatura()
+ {
+ return (Integer) get(ESTADO_ASSINATURA);
+ }
+
+ public void setEstado_assinatura(Integer estado_assinaturaValue )
+ {
+ this.set(ESTADO_ASSINATURA, estado_assinaturaValue );
+ }
+
+ public String getAss_resp_seg()
+ {
+ return (String) get(ASS_RESP_SEG);
+ }
+
+ public void setAss_resp_seg(String ass_resp_segValue )
+ {
+ this.set(ASS_RESP_SEG, ass_resp_segValue );
+ }
+
+ public String getAss_resp_rh()
+ {
+ return (String) get(ASS_RESP_RH);
+ }
+
+ public void setAss_resp_rh(String ass_resp_rhValue )
+ {
+ this.set(ASS_RESP_RH, ass_resp_rhValue );
+ }
+
+ public java.util.Date getData_consolidacao()
+ {
+ return (java.util.Date) get(DATA_CONSOLIDACAO);
+ }
+
+ public void setData_consolidacao(java.util.Date data_consolidacaoValue )
+ {
+ this.set(DATA_CONSOLIDACAO, data_consolidacaoValue );
+ }
+
+ public java.util.Date getData_assinatura_seg()
+ {
+ return (java.util.Date) get(DATA_ASSINATURA_SEG);
+ }
+
+ public void setData_assinatura_seg(java.util.Date data_assinatura_segValue )
+ {
+ this.set(DATA_ASSINATURA_SEG, data_assinatura_segValue );
+ }
+
+ public java.util.Date getData_assinatura_rh()
+ {
+ return (java.util.Date) get(DATA_ASSINATURA_RH);
+ }
+
+ public void setData_assinatura_rh(java.util.Date data_assinatura_rhValue )
+ {
+ this.set(DATA_ASSINATURA_RH, data_assinatura_rhValue );
+ }
+
+ public String getAss_consolidacao()
+ {
+ return (String) get(ASS_CONSOLIDACAO);
+ }
+
+ public void setAss_consolidacao(String ass_consolidacaoValue )
+ {
+ this.set(ASS_CONSOLIDACAO, ass_consolidacaoValue );
+ }
+
+ public String getNome_resp_seg()
+ {
+ return (String) get(NOME_RESP_SEG);
+ }
+
+ public void setNome_resp_seg(String nome_resp_segValue )
+ {
+ this.set(NOME_RESP_SEG, nome_resp_segValue );
+ }
+
+ public String getNome_resp_rh()
+ {
+ return (String) get(NOME_RESP_RH);
+ }
+
+ public void setNome_resp_rh(String nome_resp_rhValue )
+ {
+ this.set(NOME_RESP_RH, nome_resp_rhValue );
+ }
+
+ public Integer getCausas()
+ {
+ return (Integer) get(CAUSAS);
+ }
+
+ public void setCausas(Integer causasValue )
+ {
+ this.set(CAUSAS, causasValue );
+ }
+
+ public Integer getEstado_antes_correcao()
+ {
+ return (Integer) get(ESTADO_ANTES_CORRECAO);
+ }
+
+ public void setEstado_antes_correcao(Integer estado_antes_correcaoValue )
+ {
+ this.set(ESTADO_ANTES_CORRECAO, estado_antes_correcaoValue );
+ }
+
+ public String getObservacoes_correcao()
+ {
+ return (String) get(OBSERVACOES_CORRECAO);
+ }
+
+ public void setObservacoes_correcao(String observacoes_correcaoValue )
+ {
+ this.set(OBSERVACOES_CORRECAO, observacoes_correcaoValue );
+ }
+
+ public String getCorrecao()
+ {
+ return (String) get(CORRECAO);
+ }
+
+ public void setCorrecao(String correcaoValue )
+ {
+ this.set(CORRECAO, correcaoValue );
+ }
+
+ public String getAss_superior()
+ {
+ return (String) get(ASS_SUPERIOR);
+ }
+
+ public void setAss_superior(String ass_superiorValue )
+ {
+ this.set(ASS_SUPERIOR, ass_superiorValue );
+ }
+
+ public String getNome_superior()
+ {
+ return (String) get(NOME_SUPERIOR);
+ }
+
+ public void setNome_superior(String nome_superiorValue )
+ {
+ this.set(NOME_SUPERIOR, nome_superiorValue );
+ }
+
+ public java.util.Date getData_assinatura_superior()
+ {
+ return (java.util.Date) get(DATA_ASSINATURA_SUPERIOR);
+ }
+
+ public void setData_assinatura_superior(java.util.Date data_assinatura_superiorValue )
+ {
+ this.set(DATA_ASSINATURA_SUPERIOR, data_assinatura_superiorValue );
+ }
+
+ public String getAveriguador()
+ {
+ return (String) get(AVERIGUADOR);
+ }
+
+ public void setAveriguador(String averiguadorValue )
+ {
+ this.set(AVERIGUADOR, averiguadorValue );
+ }
+
+ public String getAveriguacao_posterior()
+ {
+ return (String) get(AVERIGUACAO_POSTERIOR);
+ }
+
+ public void setAveriguacao_posterior(String averiguacao_posteriorValue )
+ {
+ this.set(AVERIGUACAO_POSTERIOR, averiguacao_posteriorValue );
+ }
+
+ public String getAveriguacao_obs()
+ {
+ return (String) get(AVERIGUACAO_OBS);
+ }
+
+ public void setAveriguacao_obs(String averiguacao_obsValue )
+ {
+ this.set(AVERIGUACAO_OBS, averiguacao_obsValue );
+ }
+
+ public java.util.Date getData_inicio_processo()
+ {
+ return (java.util.Date) get(DATA_INICIO_PROCESSO);
+ }
+
+ public void setData_inicio_processo(java.util.Date data_inicio_processoValue )
+ {
+ this.set(DATA_INICIO_PROCESSO, data_inicio_processoValue );
+ }
+
+ public String getNome_resp_consolidacao()
+ {
+ return (String) get(NOME_RESP_CONSOLIDACAO);
+ }
+
+ public void setNome_resp_consolidacao(String nome_resp_consolidacaoValue )
+ {
+ this.set(NOME_RESP_CONSOLIDACAO, nome_resp_consolidacaoValue );
+ }
+
+ public Integer getSeccao_id()
+ {
+ return (Integer) get(SECCAO_ID);
+ }
+
+ public void setSeccao_id(Integer seccao_idValue )
+ {
+ this.set(SECCAO_ID, seccao_idValue );
+ }
+
+ public Integer getDepartamento_id()
+ {
+ return (Integer) get(DEPARTAMENTO_ID);
+ }
+
+ public void setDepartamento_id(Integer departamento_idValue )
+ {
+ this.set(DEPARTAMENTO_ID, departamento_idValue );
+ }
+
+ public Integer getRh_fase4()
+ {
+ return (Integer) get(RH_FASE4);
+ }
+
+ public void setRh_fase4(Integer rh_fase4Value )
+ {
+ this.set(RH_FASE4, rh_fase4Value );
+ }
+
+ public String getApagada()
+ {
+ return (String) get(APAGADA);
+ }
+
+ public void setApagada(String apagadaValue )
+ {
+ this.set(APAGADA, apagadaValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_ACIDENTADO_ID.equals( fieldName ) )
+ {
+ value = toAcidentado_id();
+ }
+ else if( ACIDENTADO_ID.equals( fieldName ) )
+ {
+ value = getAcidentado_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_ACIDENTADO_ID.equals( fieldName ) )
+ {
+ setToAcidentado_id( (com.evolute.siprp.server.db.data.siprp.AcidentadosData) value );
+ }
+ else if( ACIDENTADO_ID.equals( fieldName ) )
+ {
+ setAcidentado_id( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_ACIDENTADO_ID) != null )
+ {
+ toAcidentado_id().save();
+ dataHash.put(ACIDENTADO_ID, toAcidentado_id().get( com.evolute.siprp.server.db.data.siprp.AcidentadosData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return AnalisesAcidentes.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Causas.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Causas.java
new file mode 100644
index 00000000..6dbbc1c5
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Causas.java
@@ -0,0 +1,129 @@
+/*
+* Causas.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+
+public final class Causas implements JDOInnerObject
+{
+ private Integer id;
+ private String causa;
+ private String activa;
+
+ public Causas()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == CausasDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == CausasDataAuto.CAUSA )
+ {
+ return causa;
+ }
+ else if( fieldName == CausasDataAuto.ACTIVA )
+ {
+ return activa;
+ }
+ else if( fieldName.equals( CausasDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( CausasDataAuto.CAUSA ) )
+ {
+ return causa;
+ }
+ else if( fieldName.equals( CausasDataAuto.ACTIVA ) )
+ {
+ return activa;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == CausasDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == CausasDataAuto.CAUSA )
+ {
+ causa = ( String ) value;
+ }
+ else if( fieldName == CausasDataAuto.ACTIVA )
+ {
+ activa = ( String ) value;
+ }
+ else if( fieldName.equals( CausasDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( CausasDataAuto.CAUSA ) )
+ {
+ causa = ( String ) value;
+ }
+ else if( fieldName.equals( CausasDataAuto.ACTIVA ) )
+ {
+ activa = ( String ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getCausa()
+ {
+ return causa;
+ }
+
+ public void setCausa(String causaValue )
+ {
+ this.causa = causaValue;
+ }
+
+ public String getActiva()
+ {
+ return activa;
+ }
+
+ public void setActiva(String activaValue )
+ {
+ this.activa = activaValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return CausasDataAuto.class;
+ }
+
+ public CausasDataAuto getOuterClassInstance()
+ {
+ CausasDataAuto outerObj = new CausasDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/CausasData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/CausasData.java
new file mode 100644
index 00000000..c6bb0d37
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/CausasData.java
@@ -0,0 +1,18 @@
+/*
+* CausasDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+
+public final class CausasData extends com.evolute.siprp.server.db.data.siprp.CausasDataAuto
+{
+
+ public CausasData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/CausasDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/CausasDataAuto.java
new file mode 100644
index 00000000..7b8a0cf0
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/CausasDataAuto.java
@@ -0,0 +1,107 @@
+/*
+* CausasDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class CausasDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "causas";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "causas.id";
+ public static final String CAUSA = "causa";
+ public static final String CAUSA_FULL = "causas.causa";
+ public static final String ACTIVA = "activa";
+ public static final String ACTIVA_FULL = "causas.activa";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ CAUSA, ACTIVA, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, CAUSA, ACTIVA, };
+
+ private Map dataHash;
+
+ public CausasDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getCausa()
+ {
+ return (String) get(CAUSA);
+ }
+
+ public void setCausa(String causaValue )
+ {
+ this.set(CAUSA, causaValue );
+ }
+
+ public String getActiva()
+ {
+ return (String) get(ACTIVA);
+ }
+
+ public void setActiva(String activaValue )
+ {
+ this.set(ACTIVA, activaValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return Causas.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Controle.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Controle.java
new file mode 100644
index 00000000..94c1be14
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Controle.java
@@ -0,0 +1,129 @@
+/*
+* Controle.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+
+public final class Controle implements JDOInnerObject
+{
+ private Integer id;
+ private Integer analise_year;
+ private Integer last_analise_nr;
+
+ public Controle()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == ControleDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == ControleDataAuto.ANALISE_YEAR )
+ {
+ return analise_year;
+ }
+ else if( fieldName == ControleDataAuto.LAST_ANALISE_NR )
+ {
+ return last_analise_nr;
+ }
+ else if( fieldName.equals( ControleDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( ControleDataAuto.ANALISE_YEAR ) )
+ {
+ return analise_year;
+ }
+ else if( fieldName.equals( ControleDataAuto.LAST_ANALISE_NR ) )
+ {
+ return last_analise_nr;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == ControleDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == ControleDataAuto.ANALISE_YEAR )
+ {
+ analise_year = ( Integer ) value;
+ }
+ else if( fieldName == ControleDataAuto.LAST_ANALISE_NR )
+ {
+ last_analise_nr = ( Integer ) value;
+ }
+ else if( fieldName.equals( ControleDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( ControleDataAuto.ANALISE_YEAR ) )
+ {
+ analise_year = ( Integer ) value;
+ }
+ else if( fieldName.equals( ControleDataAuto.LAST_ANALISE_NR ) )
+ {
+ last_analise_nr = ( Integer ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public Integer getAnalise_year()
+ {
+ return analise_year;
+ }
+
+ public void setAnalise_year(Integer analise_yearValue )
+ {
+ this.analise_year = analise_yearValue;
+ }
+
+ public Integer getLast_analise_nr()
+ {
+ return last_analise_nr;
+ }
+
+ public void setLast_analise_nr(Integer last_analise_nrValue )
+ {
+ this.last_analise_nr = last_analise_nrValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return ControleDataAuto.class;
+ }
+
+ public ControleDataAuto getOuterClassInstance()
+ {
+ ControleDataAuto outerObj = new ControleDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ControleData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ControleData.java
new file mode 100644
index 00000000..9ebfa3e7
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ControleData.java
@@ -0,0 +1,18 @@
+/*
+* ControleDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+
+public final class ControleData extends com.evolute.siprp.server.db.data.siprp.ControleDataAuto
+{
+
+ public ControleData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ControleDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ControleDataAuto.java
new file mode 100644
index 00000000..187cc4df
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ControleDataAuto.java
@@ -0,0 +1,107 @@
+/*
+* ControleDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class ControleDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "controle";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "controle.id";
+ public static final String ANALISE_YEAR = "analise_year";
+ public static final String ANALISE_YEAR_FULL = "controle.analise_year";
+ public static final String LAST_ANALISE_NR = "last_analise_nr";
+ public static final String LAST_ANALISE_NR_FULL = "controle.last_analise_nr";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ ANALISE_YEAR, LAST_ANALISE_NR, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, ANALISE_YEAR, LAST_ANALISE_NR, };
+
+ private Map dataHash;
+
+ public ControleDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public Integer getAnalise_year()
+ {
+ return (Integer) get(ANALISE_YEAR);
+ }
+
+ public void setAnalise_year(Integer analise_yearValue )
+ {
+ this.set(ANALISE_YEAR, analise_yearValue );
+ }
+
+ public Integer getLast_analise_nr()
+ {
+ return (Integer) get(LAST_ANALISE_NR);
+ }
+
+ public void setLast_analise_nr(Integer last_analise_nrValue )
+ {
+ this.set(LAST_ANALISE_NR, last_analise_nrValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return Controle.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Departamentos.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Departamentos.java
new file mode 100644
index 00000000..4236cfb6
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Departamentos.java
@@ -0,0 +1,129 @@
+/*
+* Departamentos.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+
+public final class Departamentos implements JDOInnerObject
+{
+ private Integer id;
+ private String descricao;
+ private String activo;
+
+ public Departamentos()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == DepartamentosDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == DepartamentosDataAuto.DESCRICAO )
+ {
+ return descricao;
+ }
+ else if( fieldName == DepartamentosDataAuto.ACTIVO )
+ {
+ return activo;
+ }
+ else if( fieldName.equals( DepartamentosDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( DepartamentosDataAuto.DESCRICAO ) )
+ {
+ return descricao;
+ }
+ else if( fieldName.equals( DepartamentosDataAuto.ACTIVO ) )
+ {
+ return activo;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == DepartamentosDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == DepartamentosDataAuto.DESCRICAO )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName == DepartamentosDataAuto.ACTIVO )
+ {
+ activo = ( String ) value;
+ }
+ else if( fieldName.equals( DepartamentosDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( DepartamentosDataAuto.DESCRICAO ) )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName.equals( DepartamentosDataAuto.ACTIVO ) )
+ {
+ activo = ( String ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getDescricao()
+ {
+ return descricao;
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.descricao = descricaoValue;
+ }
+
+ public String getActivo()
+ {
+ return activo;
+ }
+
+ public void setActivo(String activoValue )
+ {
+ this.activo = activoValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return DepartamentosDataAuto.class;
+ }
+
+ public DepartamentosDataAuto getOuterClassInstance()
+ {
+ DepartamentosDataAuto outerObj = new DepartamentosDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/DepartamentosData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/DepartamentosData.java
new file mode 100644
index 00000000..33da6c5c
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/DepartamentosData.java
@@ -0,0 +1,18 @@
+/*
+* DepartamentosDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+
+public final class DepartamentosData extends com.evolute.siprp.server.db.data.siprp.DepartamentosDataAuto
+{
+
+ public DepartamentosData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/DepartamentosDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/DepartamentosDataAuto.java
new file mode 100644
index 00000000..5dc9787e
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/DepartamentosDataAuto.java
@@ -0,0 +1,107 @@
+/*
+* DepartamentosDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class DepartamentosDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "departamentos";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "departamentos.id";
+ public static final String DESCRICAO = "descricao";
+ public static final String DESCRICAO_FULL = "departamentos.descricao";
+ public static final String ACTIVO = "activo";
+ public static final String ACTIVO_FULL = "departamentos.activo";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ DESCRICAO, ACTIVO, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, DESCRICAO, ACTIVO, };
+
+ private Map dataHash;
+
+ public DepartamentosDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getDescricao()
+ {
+ return (String) get(DESCRICAO);
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.set(DESCRICAO, descricaoValue );
+ }
+
+ public String getActivo()
+ {
+ return (String) get(ACTIVO);
+ }
+
+ public void setActivo(String activoValue )
+ {
+ this.set(ACTIVO, activoValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return Departamentos.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Errors.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Errors.java
new file mode 100644
index 00000000..2dc748da
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Errors.java
@@ -0,0 +1,183 @@
+/*
+* Errors.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+
+public final class Errors implements JDOInnerObject
+{
+ private Integer id;
+ private java.sql.Timestamp date;
+ private String type;
+ private String environment;
+ private String description;
+
+ public Errors()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == ErrorsDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == ErrorsDataAuto.DATE )
+ {
+ return date;
+ }
+ else if( fieldName == ErrorsDataAuto.TYPE )
+ {
+ return type;
+ }
+ else if( fieldName == ErrorsDataAuto.ENVIRONMENT )
+ {
+ return environment;
+ }
+ else if( fieldName == ErrorsDataAuto.DESCRIPTION )
+ {
+ return description;
+ }
+ else if( fieldName.equals( ErrorsDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( ErrorsDataAuto.DATE ) )
+ {
+ return date;
+ }
+ else if( fieldName.equals( ErrorsDataAuto.TYPE ) )
+ {
+ return type;
+ }
+ else if( fieldName.equals( ErrorsDataAuto.ENVIRONMENT ) )
+ {
+ return environment;
+ }
+ else if( fieldName.equals( ErrorsDataAuto.DESCRIPTION ) )
+ {
+ return description;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == ErrorsDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == ErrorsDataAuto.DATE )
+ {
+ date = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName == ErrorsDataAuto.TYPE )
+ {
+ type = ( String ) value;
+ }
+ else if( fieldName == ErrorsDataAuto.ENVIRONMENT )
+ {
+ environment = ( String ) value;
+ }
+ else if( fieldName == ErrorsDataAuto.DESCRIPTION )
+ {
+ description = ( String ) value;
+ }
+ else if( fieldName.equals( ErrorsDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( ErrorsDataAuto.DATE ) )
+ {
+ date = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName.equals( ErrorsDataAuto.TYPE ) )
+ {
+ type = ( String ) value;
+ }
+ else if( fieldName.equals( ErrorsDataAuto.ENVIRONMENT ) )
+ {
+ environment = ( String ) value;
+ }
+ else if( fieldName.equals( ErrorsDataAuto.DESCRIPTION ) )
+ {
+ description = ( String ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public java.sql.Timestamp getDate()
+ {
+ return date;
+ }
+
+ public void setDate(java.sql.Timestamp dateValue )
+ {
+ this.date = dateValue;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+
+ public void setType(String typeValue )
+ {
+ this.type = typeValue;
+ }
+
+ public String getEnvironment()
+ {
+ return environment;
+ }
+
+ public void setEnvironment(String environmentValue )
+ {
+ this.environment = environmentValue;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String descriptionValue )
+ {
+ this.description = descriptionValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return ErrorsDataAuto.class;
+ }
+
+ public ErrorsDataAuto getOuterClassInstance()
+ {
+ ErrorsDataAuto outerObj = new ErrorsDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ErrorsData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ErrorsData.java
new file mode 100644
index 00000000..647327f4
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ErrorsData.java
@@ -0,0 +1,18 @@
+/*
+* ErrorsDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+
+public final class ErrorsData extends com.evolute.siprp.server.db.data.siprp.ErrorsDataAuto
+{
+
+ public ErrorsData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ErrorsDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ErrorsDataAuto.java
new file mode 100644
index 00000000..384d009d
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/ErrorsDataAuto.java
@@ -0,0 +1,131 @@
+/*
+* ErrorsDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class ErrorsDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "errors";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "errors.id";
+ public static final String DATE = "date";
+ public static final String DATE_FULL = "errors.date";
+ public static final String TYPE = "type";
+ public static final String TYPE_FULL = "errors.type";
+ public static final String ENVIRONMENT = "environment";
+ public static final String ENVIRONMENT_FULL = "errors.environment";
+ public static final String DESCRIPTION = "description";
+ public static final String DESCRIPTION_FULL = "errors.description";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ DATE, TYPE, ENVIRONMENT, DESCRIPTION, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, DATE, TYPE, ENVIRONMENT, DESCRIPTION, };
+
+ private Map dataHash;
+
+ public ErrorsDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public java.sql.Timestamp getDate()
+ {
+ return (java.sql.Timestamp) get(DATE);
+ }
+
+ public void setDate(java.sql.Timestamp dateValue )
+ {
+ this.set(DATE, dateValue );
+ }
+
+ public String getType()
+ {
+ return (String) get(TYPE);
+ }
+
+ public void setType(String typeValue )
+ {
+ this.set(TYPE, typeValue );
+ }
+
+ public String getEnvironment()
+ {
+ return (String) get(ENVIRONMENT);
+ }
+
+ public void setEnvironment(String environmentValue )
+ {
+ this.set(ENVIRONMENT, environmentValue );
+ }
+
+ public String getDescription()
+ {
+ return (String) get(DESCRIPTION);
+ }
+
+ public void setDescription(String descriptionValue )
+ {
+ this.set(DESCRIPTION, descriptionValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return Errors.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Medidas.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Medidas.java
new file mode 100644
index 00000000..484f6468
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Medidas.java
@@ -0,0 +1,129 @@
+/*
+* Medidas.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+
+public final class Medidas implements JDOInnerObject
+{
+ private Integer id;
+ private Integer analise_id;
+ private String medida;
+
+ public Medidas()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == MedidasDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == MedidasDataAuto.ANALISE_ID )
+ {
+ return analise_id;
+ }
+ else if( fieldName == MedidasDataAuto.MEDIDA )
+ {
+ return medida;
+ }
+ else if( fieldName.equals( MedidasDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( MedidasDataAuto.ANALISE_ID ) )
+ {
+ return analise_id;
+ }
+ else if( fieldName.equals( MedidasDataAuto.MEDIDA ) )
+ {
+ return medida;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == MedidasDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == MedidasDataAuto.ANALISE_ID )
+ {
+ analise_id = ( Integer ) value;
+ }
+ else if( fieldName == MedidasDataAuto.MEDIDA )
+ {
+ medida = ( String ) value;
+ }
+ else if( fieldName.equals( MedidasDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( MedidasDataAuto.ANALISE_ID ) )
+ {
+ analise_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( MedidasDataAuto.MEDIDA ) )
+ {
+ medida = ( String ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public Integer getAnalise_id()
+ {
+ return analise_id;
+ }
+
+ public void setAnalise_id(Integer analise_idValue )
+ {
+ this.analise_id = analise_idValue;
+ }
+
+ public String getMedida()
+ {
+ return medida;
+ }
+
+ public void setMedida(String medidaValue )
+ {
+ this.medida = medidaValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return MedidasDataAuto.class;
+ }
+
+ public MedidasDataAuto getOuterClassInstance()
+ {
+ MedidasDataAuto outerObj = new MedidasDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/MedidasData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/MedidasData.java
new file mode 100644
index 00000000..b1070ead
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/MedidasData.java
@@ -0,0 +1,18 @@
+/*
+* MedidasDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+
+public final class MedidasData extends com.evolute.siprp.server.db.data.siprp.MedidasDataAuto
+{
+
+ public MedidasData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/MedidasDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/MedidasDataAuto.java
new file mode 100644
index 00000000..af9681da
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/MedidasDataAuto.java
@@ -0,0 +1,166 @@
+/*
+* MedidasDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class MedidasDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "medidas";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "medidas.id";
+ public static final String ANALISE_ID = "analise_id";
+ public static final String ANALISE_ID_FULL = "medidas.analise_id";
+ public static final String TO_ANALISE_ID = "to analise_id";
+ public static final String MEDIDA = "medida";
+ public static final String MEDIDA_FULL = "medidas.medida";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ ANALISE_ID, TO_ANALISE_ID, MEDIDA, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, ANALISE_ID, MEDIDA, };
+
+ private Map dataHash;
+
+ public MedidasDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public Integer getAnalise_id()
+ {
+ return (Integer) dataHash.get(ANALISE_ID);
+ }
+
+ public void setAnalise_id(Integer analise_idValue )
+ {
+ dataHash.put(TO_ANALISE_ID, null);
+ dataHash.put(ANALISE_ID, analise_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData toAnalise_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_ANALISE_ID) == null && getAnalise_id() != null )
+ {
+ dataHash.put(TO_ANALISE_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData.class, new Object[]{ getAnalise_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData) dataHash.get(TO_ANALISE_ID);
+ }
+
+ public void setToAnalise_id(com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData analise_idObject )
+ {
+ if( analise_idObject == null )
+ {
+ dataHash.put(ANALISE_ID, null);
+ }
+ else
+ {
+ dataHash.put(ANALISE_ID, analise_idObject.get( com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData.ID ));
+ }
+ dataHash.put(TO_ANALISE_ID, analise_idObject);
+ }
+
+ public String getMedida()
+ {
+ return (String) get(MEDIDA);
+ }
+
+ public void setMedida(String medidaValue )
+ {
+ this.set(MEDIDA, medidaValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_ANALISE_ID.equals( fieldName ) )
+ {
+ value = toAnalise_id();
+ }
+ else if( ANALISE_ID.equals( fieldName ) )
+ {
+ value = getAnalise_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_ANALISE_ID.equals( fieldName ) )
+ {
+ setToAnalise_id( (com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData) value );
+ }
+ else if( ANALISE_ID.equals( fieldName ) )
+ {
+ setAnalise_id( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_ANALISE_ID) != null )
+ {
+ toAnalise_id().save();
+ dataHash.put(ANALISE_ID, toAnalise_id().get( com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return Medidas.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/NotNoticias.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/NotNoticias.java
new file mode 100644
index 00000000..021af86a
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/NotNoticias.java
@@ -0,0 +1,183 @@
+/*
+* NotNoticias.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+
+public final class NotNoticias implements JDOInnerObject
+{
+ private Integer id;
+ private java.util.Date data;
+ private java.sql.Timestamp stamp;
+ private String utilizador;
+ private String noticia;
+
+ public NotNoticias()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == NotNoticiasDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == NotNoticiasDataAuto.DATA )
+ {
+ return data;
+ }
+ else if( fieldName == NotNoticiasDataAuto.STAMP )
+ {
+ return stamp;
+ }
+ else if( fieldName == NotNoticiasDataAuto.UTILIZADOR )
+ {
+ return utilizador;
+ }
+ else if( fieldName == NotNoticiasDataAuto.NOTICIA )
+ {
+ return noticia;
+ }
+ else if( fieldName.equals( NotNoticiasDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( NotNoticiasDataAuto.DATA ) )
+ {
+ return data;
+ }
+ else if( fieldName.equals( NotNoticiasDataAuto.STAMP ) )
+ {
+ return stamp;
+ }
+ else if( fieldName.equals( NotNoticiasDataAuto.UTILIZADOR ) )
+ {
+ return utilizador;
+ }
+ else if( fieldName.equals( NotNoticiasDataAuto.NOTICIA ) )
+ {
+ return noticia;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == NotNoticiasDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == NotNoticiasDataAuto.DATA )
+ {
+ data = ( java.util.Date ) value;
+ }
+ else if( fieldName == NotNoticiasDataAuto.STAMP )
+ {
+ stamp = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName == NotNoticiasDataAuto.UTILIZADOR )
+ {
+ utilizador = ( String ) value;
+ }
+ else if( fieldName == NotNoticiasDataAuto.NOTICIA )
+ {
+ noticia = ( String ) value;
+ }
+ else if( fieldName.equals( NotNoticiasDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( NotNoticiasDataAuto.DATA ) )
+ {
+ data = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( NotNoticiasDataAuto.STAMP ) )
+ {
+ stamp = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName.equals( NotNoticiasDataAuto.UTILIZADOR ) )
+ {
+ utilizador = ( String ) value;
+ }
+ else if( fieldName.equals( NotNoticiasDataAuto.NOTICIA ) )
+ {
+ noticia = ( String ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public java.util.Date getData()
+ {
+ return data;
+ }
+
+ public void setData(java.util.Date dataValue )
+ {
+ this.data = dataValue;
+ }
+
+ public java.sql.Timestamp getStamp()
+ {
+ return stamp;
+ }
+
+ public void setStamp(java.sql.Timestamp stampValue )
+ {
+ this.stamp = stampValue;
+ }
+
+ public String getUtilizador()
+ {
+ return utilizador;
+ }
+
+ public void setUtilizador(String utilizadorValue )
+ {
+ this.utilizador = utilizadorValue;
+ }
+
+ public String getNoticia()
+ {
+ return noticia;
+ }
+
+ public void setNoticia(String noticiaValue )
+ {
+ this.noticia = noticiaValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return NotNoticiasDataAuto.class;
+ }
+
+ public NotNoticiasDataAuto getOuterClassInstance()
+ {
+ NotNoticiasDataAuto outerObj = new NotNoticiasDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/NotNoticiasData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/NotNoticiasData.java
new file mode 100644
index 00000000..42d07f7c
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/NotNoticiasData.java
@@ -0,0 +1,18 @@
+/*
+* NotNoticiasDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+
+public final class NotNoticiasData extends com.evolute.siprp.server.db.data.siprp.NotNoticiasDataAuto
+{
+
+ public NotNoticiasData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/NotNoticiasDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/NotNoticiasDataAuto.java
new file mode 100644
index 00000000..9ff5a4a3
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/NotNoticiasDataAuto.java
@@ -0,0 +1,131 @@
+/*
+* NotNoticiasDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class NotNoticiasDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "not_noticias";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "not_noticias.id";
+ public static final String DATA = "data";
+ public static final String DATA_FULL = "not_noticias.data";
+ public static final String STAMP = "stamp";
+ public static final String STAMP_FULL = "not_noticias.stamp";
+ public static final String UTILIZADOR = "utilizador";
+ public static final String UTILIZADOR_FULL = "not_noticias.utilizador";
+ public static final String NOTICIA = "noticia";
+ public static final String NOTICIA_FULL = "not_noticias.noticia";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ DATA, STAMP, UTILIZADOR, NOTICIA, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, DATA, STAMP, UTILIZADOR, NOTICIA, };
+
+ private Map dataHash;
+
+ public NotNoticiasDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public java.util.Date getData()
+ {
+ return (java.util.Date) get(DATA);
+ }
+
+ public void setData(java.util.Date dataValue )
+ {
+ this.set(DATA, dataValue );
+ }
+
+ public java.sql.Timestamp getStamp()
+ {
+ return (java.sql.Timestamp) get(STAMP);
+ }
+
+ public void setStamp(java.sql.Timestamp stampValue )
+ {
+ this.set(STAMP, stampValue );
+ }
+
+ public String getUtilizador()
+ {
+ return (String) get(UTILIZADOR);
+ }
+
+ public void setUtilizador(String utilizadorValue )
+ {
+ this.set(UTILIZADOR, utilizadorValue );
+ }
+
+ public String getNoticia()
+ {
+ return (String) get(NOTICIA);
+ }
+
+ public void setNoticia(String noticiaValue )
+ {
+ this.set(NOTICIA, noticiaValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return NotNoticias.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Permissoes.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Permissoes.java
new file mode 100644
index 00000000..c7fe43d0
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Permissoes.java
@@ -0,0 +1,129 @@
+/*
+* Permissoes.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+
+public final class Permissoes implements JDOInnerObject
+{
+ private Integer id;
+ private Integer user_id;
+ private Integer codigo_permissao;
+
+ public Permissoes()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == PermissoesDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == PermissoesDataAuto.USER_ID )
+ {
+ return user_id;
+ }
+ else if( fieldName == PermissoesDataAuto.CODIGO_PERMISSAO )
+ {
+ return codigo_permissao;
+ }
+ else if( fieldName.equals( PermissoesDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( PermissoesDataAuto.USER_ID ) )
+ {
+ return user_id;
+ }
+ else if( fieldName.equals( PermissoesDataAuto.CODIGO_PERMISSAO ) )
+ {
+ return codigo_permissao;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == PermissoesDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == PermissoesDataAuto.USER_ID )
+ {
+ user_id = ( Integer ) value;
+ }
+ else if( fieldName == PermissoesDataAuto.CODIGO_PERMISSAO )
+ {
+ codigo_permissao = ( Integer ) value;
+ }
+ else if( fieldName.equals( PermissoesDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( PermissoesDataAuto.USER_ID ) )
+ {
+ user_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( PermissoesDataAuto.CODIGO_PERMISSAO ) )
+ {
+ codigo_permissao = ( Integer ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public Integer getUser_id()
+ {
+ return user_id;
+ }
+
+ public void setUser_id(Integer user_idValue )
+ {
+ this.user_id = user_idValue;
+ }
+
+ public Integer getCodigo_permissao()
+ {
+ return codigo_permissao;
+ }
+
+ public void setCodigo_permissao(Integer codigo_permissaoValue )
+ {
+ this.codigo_permissao = codigo_permissaoValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return PermissoesDataAuto.class;
+ }
+
+ public PermissoesDataAuto getOuterClassInstance()
+ {
+ PermissoesDataAuto outerObj = new PermissoesDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PermissoesData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PermissoesData.java
new file mode 100644
index 00000000..dcf3524d
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PermissoesData.java
@@ -0,0 +1,18 @@
+/*
+* PermissoesDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+
+public final class PermissoesData extends com.evolute.siprp.server.db.data.siprp.PermissoesDataAuto
+{
+
+ public PermissoesData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PermissoesDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PermissoesDataAuto.java
new file mode 100644
index 00000000..df826391
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PermissoesDataAuto.java
@@ -0,0 +1,166 @@
+/*
+* PermissoesDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class PermissoesDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "permissoes";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "permissoes.id";
+ public static final String USER_ID = "user_id";
+ public static final String USER_ID_FULL = "permissoes.user_id";
+ public static final String TO_USER_ID = "to user_id";
+ public static final String CODIGO_PERMISSAO = "codigo_permissao";
+ public static final String CODIGO_PERMISSAO_FULL = "permissoes.codigo_permissao";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ USER_ID, TO_USER_ID, CODIGO_PERMISSAO, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, USER_ID, CODIGO_PERMISSAO, };
+
+ private Map dataHash;
+
+ public PermissoesDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public Integer getUser_id()
+ {
+ return (Integer) dataHash.get(USER_ID);
+ }
+
+ public void setUser_id(Integer user_idValue )
+ {
+ dataHash.put(TO_USER_ID, null);
+ dataHash.put(USER_ID, user_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp.UtilizadoresData toUser_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_USER_ID) == null && getUser_id() != null )
+ {
+ dataHash.put(TO_USER_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.UtilizadoresData.class, new Object[]{ getUser_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp.UtilizadoresData) dataHash.get(TO_USER_ID);
+ }
+
+ public void setToUser_id(com.evolute.siprp.server.db.data.siprp.UtilizadoresData user_idObject )
+ {
+ if( user_idObject == null )
+ {
+ dataHash.put(USER_ID, null);
+ }
+ else
+ {
+ dataHash.put(USER_ID, user_idObject.get( com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID ));
+ }
+ dataHash.put(TO_USER_ID, user_idObject);
+ }
+
+ public Integer getCodigo_permissao()
+ {
+ return (Integer) get(CODIGO_PERMISSAO);
+ }
+
+ public void setCodigo_permissao(Integer codigo_permissaoValue )
+ {
+ this.set(CODIGO_PERMISSAO, codigo_permissaoValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( USER_ID.equals( fieldName ) )
+ {
+ value = getUser_id();
+ }
+ else if( TO_USER_ID.equals( fieldName ) )
+ {
+ value = toUser_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( USER_ID.equals( fieldName ) )
+ {
+ setUser_id( (Integer) value );
+ }
+ else if( TO_USER_ID.equals( fieldName ) )
+ {
+ setToUser_id( (com.evolute.siprp.server.db.data.siprp.UtilizadoresData) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_USER_ID) != null )
+ {
+ toUser_id().save();
+ dataHash.put(USER_ID, toUser_id().get( com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return Permissoes.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoAreas.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoAreas.java
new file mode 100644
index 00000000..21a05fd7
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoAreas.java
@@ -0,0 +1,156 @@
+/*
+* PlanoAreas.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+
+public final class PlanoAreas implements JDOInnerObject
+{
+ private String descricao;
+ private Integer plano_id;
+ private Integer id;
+ private Integer area_id;
+
+ public PlanoAreas()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == PlanoAreasDataAuto.DESCRICAO )
+ {
+ return descricao;
+ }
+ else if( fieldName == PlanoAreasDataAuto.PLANO_ID )
+ {
+ return plano_id;
+ }
+ else if( fieldName == PlanoAreasDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == PlanoAreasDataAuto.AREA_ID )
+ {
+ return area_id;
+ }
+ else if( fieldName.equals( PlanoAreasDataAuto.DESCRICAO ) )
+ {
+ return descricao;
+ }
+ else if( fieldName.equals( PlanoAreasDataAuto.PLANO_ID ) )
+ {
+ return plano_id;
+ }
+ else if( fieldName.equals( PlanoAreasDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( PlanoAreasDataAuto.AREA_ID ) )
+ {
+ return area_id;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == PlanoAreasDataAuto.DESCRICAO )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName == PlanoAreasDataAuto.PLANO_ID )
+ {
+ plano_id = ( Integer ) value;
+ }
+ else if( fieldName == PlanoAreasDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == PlanoAreasDataAuto.AREA_ID )
+ {
+ area_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( PlanoAreasDataAuto.DESCRICAO ) )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName.equals( PlanoAreasDataAuto.PLANO_ID ) )
+ {
+ plano_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( PlanoAreasDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( PlanoAreasDataAuto.AREA_ID ) )
+ {
+ area_id = ( Integer ) value;
+ }
+ }
+
+ public String getDescricao()
+ {
+ return descricao;
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.descricao = descricaoValue;
+ }
+
+ public Integer getPlano_id()
+ {
+ return plano_id;
+ }
+
+ public void setPlano_id(Integer plano_idValue )
+ {
+ this.plano_id = plano_idValue;
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public Integer getArea_id()
+ {
+ return area_id;
+ }
+
+ public void setArea_id(Integer area_idValue )
+ {
+ this.area_id = area_idValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return PlanoAreasDataAuto.class;
+ }
+
+ public PlanoAreasDataAuto getOuterClassInstance()
+ {
+ PlanoAreasDataAuto outerObj = new PlanoAreasDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoAreasData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoAreasData.java
new file mode 100644
index 00000000..e91830bb
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoAreasData.java
@@ -0,0 +1,18 @@
+/*
+* PlanoAreasDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+
+public final class PlanoAreasData extends com.evolute.siprp.server.db.data.siprp.PlanoAreasDataAuto
+{
+
+ public PlanoAreasData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoAreasDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoAreasDataAuto.java
new file mode 100644
index 00000000..a9b1b6fd
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoAreasDataAuto.java
@@ -0,0 +1,178 @@
+/*
+* PlanoAreasDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class PlanoAreasDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "plano_areas";
+
+ public static final String DESCRICAO = "descricao";
+ public static final String DESCRICAO_FULL = "plano_areas.descricao";
+ public static final String PLANO_ID = "plano_id";
+ public static final String PLANO_ID_FULL = "plano_areas.plano_id";
+ public static final String TO_PLANO_ID = "to plano_id";
+ public static final String ID = "id";
+ public static final String ID_FULL = "plano_areas.id";
+ public static final String AREA_ID = "area_id";
+ public static final String AREA_ID_FULL = "plano_areas.area_id";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ DESCRICAO, PLANO_ID, TO_PLANO_ID, AREA_ID, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ DESCRICAO, PLANO_ID, ID, AREA_ID, };
+
+ private Map dataHash;
+
+ public PlanoAreasDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public String getDescricao()
+ {
+ return (String) get(DESCRICAO);
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.set(DESCRICAO, descricaoValue );
+ }
+
+ public Integer getPlano_id()
+ {
+ return (Integer) dataHash.get(PLANO_ID);
+ }
+
+ public void setPlano_id(Integer plano_idValue )
+ {
+ dataHash.put(TO_PLANO_ID, null);
+ dataHash.put(PLANO_ID, plano_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp.PlanosActuacaoData toPlano_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_PLANO_ID) == null && getPlano_id() != null )
+ {
+ dataHash.put(TO_PLANO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.PlanosActuacaoData.class, new Object[]{ getPlano_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp.PlanosActuacaoData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp.PlanosActuacaoData) dataHash.get(TO_PLANO_ID);
+ }
+
+ public void setToPlano_id(com.evolute.siprp.server.db.data.siprp.PlanosActuacaoData plano_idObject )
+ {
+ if( plano_idObject == null )
+ {
+ dataHash.put(PLANO_ID, null);
+ }
+ else
+ {
+ dataHash.put(PLANO_ID, plano_idObject.get( com.evolute.siprp.server.db.data.siprp.PlanosActuacaoData.ID ));
+ }
+ dataHash.put(TO_PLANO_ID, plano_idObject);
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public Integer getArea_id()
+ {
+ return (Integer) get(AREA_ID);
+ }
+
+ public void setArea_id(Integer area_idValue )
+ {
+ this.set(AREA_ID, area_idValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_PLANO_ID.equals( fieldName ) )
+ {
+ value = toPlano_id();
+ }
+ else if( PLANO_ID.equals( fieldName ) )
+ {
+ value = getPlano_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_PLANO_ID.equals( fieldName ) )
+ {
+ setToPlano_id( (com.evolute.siprp.server.db.data.siprp.PlanosActuacaoData) value );
+ }
+ else if( PLANO_ID.equals( fieldName ) )
+ {
+ setPlano_id( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_PLANO_ID) != null )
+ {
+ toPlano_id().save();
+ dataHash.put(PLANO_ID, toPlano_id().get( com.evolute.siprp.server.db.data.siprp.PlanosActuacaoData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return PlanoAreas.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoMedidas.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoMedidas.java
new file mode 100644
index 00000000..0aec8ae8
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoMedidas.java
@@ -0,0 +1,156 @@
+/*
+* PlanoMedidas.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+
+public final class PlanoMedidas implements JDOInnerObject
+{
+ private String descricao;
+ private Integer risco_id;
+ private Integer id;
+ private Integer medida_id;
+
+ public PlanoMedidas()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == PlanoMedidasDataAuto.DESCRICAO )
+ {
+ return descricao;
+ }
+ else if( fieldName == PlanoMedidasDataAuto.RISCO_ID )
+ {
+ return risco_id;
+ }
+ else if( fieldName == PlanoMedidasDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == PlanoMedidasDataAuto.MEDIDA_ID )
+ {
+ return medida_id;
+ }
+ else if( fieldName.equals( PlanoMedidasDataAuto.DESCRICAO ) )
+ {
+ return descricao;
+ }
+ else if( fieldName.equals( PlanoMedidasDataAuto.RISCO_ID ) )
+ {
+ return risco_id;
+ }
+ else if( fieldName.equals( PlanoMedidasDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( PlanoMedidasDataAuto.MEDIDA_ID ) )
+ {
+ return medida_id;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == PlanoMedidasDataAuto.DESCRICAO )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName == PlanoMedidasDataAuto.RISCO_ID )
+ {
+ risco_id = ( Integer ) value;
+ }
+ else if( fieldName == PlanoMedidasDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == PlanoMedidasDataAuto.MEDIDA_ID )
+ {
+ medida_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( PlanoMedidasDataAuto.DESCRICAO ) )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName.equals( PlanoMedidasDataAuto.RISCO_ID ) )
+ {
+ risco_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( PlanoMedidasDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( PlanoMedidasDataAuto.MEDIDA_ID ) )
+ {
+ medida_id = ( Integer ) value;
+ }
+ }
+
+ public String getDescricao()
+ {
+ return descricao;
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.descricao = descricaoValue;
+ }
+
+ public Integer getRisco_id()
+ {
+ return risco_id;
+ }
+
+ public void setRisco_id(Integer risco_idValue )
+ {
+ this.risco_id = risco_idValue;
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public Integer getMedida_id()
+ {
+ return medida_id;
+ }
+
+ public void setMedida_id(Integer medida_idValue )
+ {
+ this.medida_id = medida_idValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return PlanoMedidasDataAuto.class;
+ }
+
+ public PlanoMedidasDataAuto getOuterClassInstance()
+ {
+ PlanoMedidasDataAuto outerObj = new PlanoMedidasDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoMedidasData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoMedidasData.java
new file mode 100644
index 00000000..6bf63707
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoMedidasData.java
@@ -0,0 +1,18 @@
+/*
+* PlanoMedidasDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+
+public final class PlanoMedidasData extends com.evolute.siprp.server.db.data.siprp.PlanoMedidasDataAuto
+{
+
+ public PlanoMedidasData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoMedidasDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoMedidasDataAuto.java
new file mode 100644
index 00000000..774b51cc
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoMedidasDataAuto.java
@@ -0,0 +1,178 @@
+/*
+* PlanoMedidasDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class PlanoMedidasDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "plano_medidas";
+
+ public static final String DESCRICAO = "descricao";
+ public static final String DESCRICAO_FULL = "plano_medidas.descricao";
+ public static final String RISCO_ID = "risco_id";
+ public static final String RISCO_ID_FULL = "plano_medidas.risco_id";
+ public static final String TO_RISCO_ID = "to risco_id";
+ public static final String ID = "id";
+ public static final String ID_FULL = "plano_medidas.id";
+ public static final String MEDIDA_ID = "medida_id";
+ public static final String MEDIDA_ID_FULL = "plano_medidas.medida_id";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ DESCRICAO, RISCO_ID, TO_RISCO_ID, MEDIDA_ID, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ DESCRICAO, RISCO_ID, ID, MEDIDA_ID, };
+
+ private Map dataHash;
+
+ public PlanoMedidasDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public String getDescricao()
+ {
+ return (String) get(DESCRICAO);
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.set(DESCRICAO, descricaoValue );
+ }
+
+ public Integer getRisco_id()
+ {
+ return (Integer) dataHash.get(RISCO_ID);
+ }
+
+ public void setRisco_id(Integer risco_idValue )
+ {
+ dataHash.put(TO_RISCO_ID, null);
+ dataHash.put(RISCO_ID, risco_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp.PlanoRiscosData toRisco_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_RISCO_ID) == null && getRisco_id() != null )
+ {
+ dataHash.put(TO_RISCO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.PlanoRiscosData.class, new Object[]{ getRisco_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp.PlanoRiscosData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp.PlanoRiscosData) dataHash.get(TO_RISCO_ID);
+ }
+
+ public void setToRisco_id(com.evolute.siprp.server.db.data.siprp.PlanoRiscosData risco_idObject )
+ {
+ if( risco_idObject == null )
+ {
+ dataHash.put(RISCO_ID, null);
+ }
+ else
+ {
+ dataHash.put(RISCO_ID, risco_idObject.get( com.evolute.siprp.server.db.data.siprp.PlanoRiscosData.ID ));
+ }
+ dataHash.put(TO_RISCO_ID, risco_idObject);
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public Integer getMedida_id()
+ {
+ return (Integer) get(MEDIDA_ID);
+ }
+
+ public void setMedida_id(Integer medida_idValue )
+ {
+ this.set(MEDIDA_ID, medida_idValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_RISCO_ID.equals( fieldName ) )
+ {
+ value = toRisco_id();
+ }
+ else if( RISCO_ID.equals( fieldName ) )
+ {
+ value = getRisco_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_RISCO_ID.equals( fieldName ) )
+ {
+ setToRisco_id( (com.evolute.siprp.server.db.data.siprp.PlanoRiscosData) value );
+ }
+ else if( RISCO_ID.equals( fieldName ) )
+ {
+ setRisco_id( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_RISCO_ID) != null )
+ {
+ toRisco_id().save();
+ dataHash.put(RISCO_ID, toRisco_id().get( com.evolute.siprp.server.db.data.siprp.PlanoRiscosData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return PlanoMedidas.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoPostosTrabalho.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoPostosTrabalho.java
new file mode 100644
index 00000000..9c99caf3
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoPostosTrabalho.java
@@ -0,0 +1,156 @@
+/*
+* PlanoPostosTrabalho.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+
+public final class PlanoPostosTrabalho implements JDOInnerObject
+{
+ private String descricao;
+ private Integer medida_id;
+ private Integer id;
+ private Integer posto_id;
+
+ public PlanoPostosTrabalho()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == PlanoPostosTrabalhoDataAuto.DESCRICAO )
+ {
+ return descricao;
+ }
+ else if( fieldName == PlanoPostosTrabalhoDataAuto.MEDIDA_ID )
+ {
+ return medida_id;
+ }
+ else if( fieldName == PlanoPostosTrabalhoDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == PlanoPostosTrabalhoDataAuto.POSTO_ID )
+ {
+ return posto_id;
+ }
+ else if( fieldName.equals( PlanoPostosTrabalhoDataAuto.DESCRICAO ) )
+ {
+ return descricao;
+ }
+ else if( fieldName.equals( PlanoPostosTrabalhoDataAuto.MEDIDA_ID ) )
+ {
+ return medida_id;
+ }
+ else if( fieldName.equals( PlanoPostosTrabalhoDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( PlanoPostosTrabalhoDataAuto.POSTO_ID ) )
+ {
+ return posto_id;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == PlanoPostosTrabalhoDataAuto.DESCRICAO )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName == PlanoPostosTrabalhoDataAuto.MEDIDA_ID )
+ {
+ medida_id = ( Integer ) value;
+ }
+ else if( fieldName == PlanoPostosTrabalhoDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == PlanoPostosTrabalhoDataAuto.POSTO_ID )
+ {
+ posto_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( PlanoPostosTrabalhoDataAuto.DESCRICAO ) )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName.equals( PlanoPostosTrabalhoDataAuto.MEDIDA_ID ) )
+ {
+ medida_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( PlanoPostosTrabalhoDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( PlanoPostosTrabalhoDataAuto.POSTO_ID ) )
+ {
+ posto_id = ( Integer ) value;
+ }
+ }
+
+ public String getDescricao()
+ {
+ return descricao;
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.descricao = descricaoValue;
+ }
+
+ public Integer getMedida_id()
+ {
+ return medida_id;
+ }
+
+ public void setMedida_id(Integer medida_idValue )
+ {
+ this.medida_id = medida_idValue;
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public Integer getPosto_id()
+ {
+ return posto_id;
+ }
+
+ public void setPosto_id(Integer posto_idValue )
+ {
+ this.posto_id = posto_idValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return PlanoPostosTrabalhoDataAuto.class;
+ }
+
+ public PlanoPostosTrabalhoDataAuto getOuterClassInstance()
+ {
+ PlanoPostosTrabalhoDataAuto outerObj = new PlanoPostosTrabalhoDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoPostosTrabalhoData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoPostosTrabalhoData.java
new file mode 100644
index 00000000..1106ee73
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoPostosTrabalhoData.java
@@ -0,0 +1,18 @@
+/*
+* PlanoPostosTrabalhoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+
+public final class PlanoPostosTrabalhoData extends com.evolute.siprp.server.db.data.siprp.PlanoPostosTrabalhoDataAuto
+{
+
+ public PlanoPostosTrabalhoData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoPostosTrabalhoDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoPostosTrabalhoDataAuto.java
new file mode 100644
index 00000000..e4ca4469
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoPostosTrabalhoDataAuto.java
@@ -0,0 +1,178 @@
+/*
+* PlanoPostosTrabalhoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class PlanoPostosTrabalhoDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "plano_postos_trabalho";
+
+ public static final String DESCRICAO = "descricao";
+ public static final String DESCRICAO_FULL = "plano_postos_trabalho.descricao";
+ public static final String MEDIDA_ID = "medida_id";
+ public static final String MEDIDA_ID_FULL = "plano_postos_trabalho.medida_id";
+ public static final String TO_MEDIDA_ID = "to medida_id";
+ public static final String ID = "id";
+ public static final String ID_FULL = "plano_postos_trabalho.id";
+ public static final String POSTO_ID = "posto_id";
+ public static final String POSTO_ID_FULL = "plano_postos_trabalho.posto_id";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ DESCRICAO, MEDIDA_ID, TO_MEDIDA_ID, POSTO_ID, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ DESCRICAO, MEDIDA_ID, ID, POSTO_ID, };
+
+ private Map dataHash;
+
+ public PlanoPostosTrabalhoDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public String getDescricao()
+ {
+ return (String) get(DESCRICAO);
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.set(DESCRICAO, descricaoValue );
+ }
+
+ public Integer getMedida_id()
+ {
+ return (Integer) dataHash.get(MEDIDA_ID);
+ }
+
+ public void setMedida_id(Integer medida_idValue )
+ {
+ dataHash.put(TO_MEDIDA_ID, null);
+ dataHash.put(MEDIDA_ID, medida_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp.PlanoMedidasData toMedida_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_MEDIDA_ID) == null && getMedida_id() != null )
+ {
+ dataHash.put(TO_MEDIDA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.PlanoMedidasData.class, new Object[]{ getMedida_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp.PlanoMedidasData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp.PlanoMedidasData) dataHash.get(TO_MEDIDA_ID);
+ }
+
+ public void setToMedida_id(com.evolute.siprp.server.db.data.siprp.PlanoMedidasData medida_idObject )
+ {
+ if( medida_idObject == null )
+ {
+ dataHash.put(MEDIDA_ID, null);
+ }
+ else
+ {
+ dataHash.put(MEDIDA_ID, medida_idObject.get( com.evolute.siprp.server.db.data.siprp.PlanoMedidasData.ID ));
+ }
+ dataHash.put(TO_MEDIDA_ID, medida_idObject);
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public Integer getPosto_id()
+ {
+ return (Integer) get(POSTO_ID);
+ }
+
+ public void setPosto_id(Integer posto_idValue )
+ {
+ this.set(POSTO_ID, posto_idValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( MEDIDA_ID.equals( fieldName ) )
+ {
+ value = getMedida_id();
+ }
+ else if( TO_MEDIDA_ID.equals( fieldName ) )
+ {
+ value = toMedida_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( MEDIDA_ID.equals( fieldName ) )
+ {
+ setMedida_id( (Integer) value );
+ }
+ else if( TO_MEDIDA_ID.equals( fieldName ) )
+ {
+ setToMedida_id( (com.evolute.siprp.server.db.data.siprp.PlanoMedidasData) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_MEDIDA_ID) != null )
+ {
+ toMedida_id().save();
+ dataHash.put(MEDIDA_ID, toMedida_id().get( com.evolute.siprp.server.db.data.siprp.PlanoMedidasData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return PlanoPostosTrabalho.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoRiscos.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoRiscos.java
new file mode 100644
index 00000000..61804920
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoRiscos.java
@@ -0,0 +1,426 @@
+/*
+* PlanoRiscos.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+
+public final class PlanoRiscos implements JDOInnerObject
+{
+ private String descricao;
+ private String activo;
+ private Integer area_id;
+ private Integer id;
+ private Integer valor;
+ private String responsavel_execucao;
+ private String recursos_necessarios;
+ private java.util.Date data_inicio;
+ private java.util.Date data_fim;
+ private String parecer_dl;
+ private String parecer_dns;
+ private String verificacao_siprp;
+ private Integer risco_id;
+ private String por;
+
+ public PlanoRiscos()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == PlanoRiscosDataAuto.DESCRICAO )
+ {
+ return descricao;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.ACTIVO )
+ {
+ return activo;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.AREA_ID )
+ {
+ return area_id;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.VALOR )
+ {
+ return valor;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.RESPONSAVEL_EXECUCAO )
+ {
+ return responsavel_execucao;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.RECURSOS_NECESSARIOS )
+ {
+ return recursos_necessarios;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.DATA_INICIO )
+ {
+ return data_inicio;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.DATA_FIM )
+ {
+ return data_fim;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.PARECER_DL )
+ {
+ return parecer_dl;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.PARECER_DNS )
+ {
+ return parecer_dns;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.VERIFICACAO_SIPRP )
+ {
+ return verificacao_siprp;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.RISCO_ID )
+ {
+ return risco_id;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.POR )
+ {
+ return por;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.DESCRICAO ) )
+ {
+ return descricao;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.ACTIVO ) )
+ {
+ return activo;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.AREA_ID ) )
+ {
+ return area_id;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.VALOR ) )
+ {
+ return valor;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.RESPONSAVEL_EXECUCAO ) )
+ {
+ return responsavel_execucao;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.RECURSOS_NECESSARIOS ) )
+ {
+ return recursos_necessarios;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.DATA_INICIO ) )
+ {
+ return data_inicio;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.DATA_FIM ) )
+ {
+ return data_fim;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.PARECER_DL ) )
+ {
+ return parecer_dl;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.PARECER_DNS ) )
+ {
+ return parecer_dns;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.VERIFICACAO_SIPRP ) )
+ {
+ return verificacao_siprp;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.RISCO_ID ) )
+ {
+ return risco_id;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.POR ) )
+ {
+ return por;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == PlanoRiscosDataAuto.DESCRICAO )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.ACTIVO )
+ {
+ activo = ( String ) value;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.AREA_ID )
+ {
+ area_id = ( Integer ) value;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.VALOR )
+ {
+ valor = ( Integer ) value;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.RESPONSAVEL_EXECUCAO )
+ {
+ responsavel_execucao = ( String ) value;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.RECURSOS_NECESSARIOS )
+ {
+ recursos_necessarios = ( String ) value;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.DATA_INICIO )
+ {
+ data_inicio = ( java.util.Date ) value;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.DATA_FIM )
+ {
+ data_fim = ( java.util.Date ) value;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.PARECER_DL )
+ {
+ parecer_dl = ( String ) value;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.PARECER_DNS )
+ {
+ parecer_dns = ( String ) value;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.VERIFICACAO_SIPRP )
+ {
+ verificacao_siprp = ( String ) value;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.RISCO_ID )
+ {
+ risco_id = ( Integer ) value;
+ }
+ else if( fieldName == PlanoRiscosDataAuto.POR )
+ {
+ por = ( String ) value;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.DESCRICAO ) )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.ACTIVO ) )
+ {
+ activo = ( String ) value;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.AREA_ID ) )
+ {
+ area_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.VALOR ) )
+ {
+ valor = ( Integer ) value;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.RESPONSAVEL_EXECUCAO ) )
+ {
+ responsavel_execucao = ( String ) value;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.RECURSOS_NECESSARIOS ) )
+ {
+ recursos_necessarios = ( String ) value;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.DATA_INICIO ) )
+ {
+ data_inicio = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.DATA_FIM ) )
+ {
+ data_fim = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.PARECER_DL ) )
+ {
+ parecer_dl = ( String ) value;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.PARECER_DNS ) )
+ {
+ parecer_dns = ( String ) value;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.VERIFICACAO_SIPRP ) )
+ {
+ verificacao_siprp = ( String ) value;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.RISCO_ID ) )
+ {
+ risco_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( PlanoRiscosDataAuto.POR ) )
+ {
+ por = ( String ) value;
+ }
+ }
+
+ public String getDescricao()
+ {
+ return descricao;
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.descricao = descricaoValue;
+ }
+
+ public String getActivo()
+ {
+ return activo;
+ }
+
+ public void setActivo(String activoValue )
+ {
+ this.activo = activoValue;
+ }
+
+ public Integer getArea_id()
+ {
+ return area_id;
+ }
+
+ public void setArea_id(Integer area_idValue )
+ {
+ this.area_id = area_idValue;
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public Integer getValor()
+ {
+ return valor;
+ }
+
+ public void setValor(Integer valorValue )
+ {
+ this.valor = valorValue;
+ }
+
+ public String getResponsavel_execucao()
+ {
+ return responsavel_execucao;
+ }
+
+ public void setResponsavel_execucao(String responsavel_execucaoValue )
+ {
+ this.responsavel_execucao = responsavel_execucaoValue;
+ }
+
+ public String getRecursos_necessarios()
+ {
+ return recursos_necessarios;
+ }
+
+ public void setRecursos_necessarios(String recursos_necessariosValue )
+ {
+ this.recursos_necessarios = recursos_necessariosValue;
+ }
+
+ public java.util.Date getData_inicio()
+ {
+ return data_inicio;
+ }
+
+ public void setData_inicio(java.util.Date data_inicioValue )
+ {
+ this.data_inicio = data_inicioValue;
+ }
+
+ public java.util.Date getData_fim()
+ {
+ return data_fim;
+ }
+
+ public void setData_fim(java.util.Date data_fimValue )
+ {
+ this.data_fim = data_fimValue;
+ }
+
+ public String getParecer_dl()
+ {
+ return parecer_dl;
+ }
+
+ public void setParecer_dl(String parecer_dlValue )
+ {
+ this.parecer_dl = parecer_dlValue;
+ }
+
+ public String getParecer_dns()
+ {
+ return parecer_dns;
+ }
+
+ public void setParecer_dns(String parecer_dnsValue )
+ {
+ this.parecer_dns = parecer_dnsValue;
+ }
+
+ public String getVerificacao_siprp()
+ {
+ return verificacao_siprp;
+ }
+
+ public void setVerificacao_siprp(String verificacao_siprpValue )
+ {
+ this.verificacao_siprp = verificacao_siprpValue;
+ }
+
+ public Integer getRisco_id()
+ {
+ return risco_id;
+ }
+
+ public void setRisco_id(Integer risco_idValue )
+ {
+ this.risco_id = risco_idValue;
+ }
+
+ public String getPor()
+ {
+ return por;
+ }
+
+ public void setPor(String porValue )
+ {
+ this.por = porValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return PlanoRiscosDataAuto.class;
+ }
+
+ public PlanoRiscosDataAuto getOuterClassInstance()
+ {
+ PlanoRiscosDataAuto outerObj = new PlanoRiscosDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoRiscosData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoRiscosData.java
new file mode 100644
index 00000000..a493cf37
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoRiscosData.java
@@ -0,0 +1,18 @@
+/*
+* PlanoRiscosDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+
+public final class PlanoRiscosData extends com.evolute.siprp.server.db.data.siprp.PlanoRiscosDataAuto
+{
+
+ public PlanoRiscosData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoRiscosDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoRiscosDataAuto.java
new file mode 100644
index 00000000..46b649ef
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanoRiscosDataAuto.java
@@ -0,0 +1,301 @@
+/*
+* PlanoRiscosDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class PlanoRiscosDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "plano_riscos";
+
+ public static final String DESCRICAO = "descricao";
+ public static final String DESCRICAO_FULL = "plano_riscos.descricao";
+ public static final String ACTIVO = "activo";
+ public static final String ACTIVO_FULL = "plano_riscos.activo";
+ public static final String AREA_ID = "area_id";
+ public static final String AREA_ID_FULL = "plano_riscos.area_id";
+ public static final String TO_AREA_ID = "to area_id";
+ public static final String ID = "id";
+ public static final String ID_FULL = "plano_riscos.id";
+ public static final String VALOR = "valor";
+ public static final String VALOR_FULL = "plano_riscos.valor";
+ public static final String RESPONSAVEL_EXECUCAO = "responsavel_execucao";
+ public static final String RESPONSAVEL_EXECUCAO_FULL = "plano_riscos.responsavel_execucao";
+ public static final String RECURSOS_NECESSARIOS = "recursos_necessarios";
+ public static final String RECURSOS_NECESSARIOS_FULL = "plano_riscos.recursos_necessarios";
+ public static final String DATA_INICIO = "data_inicio";
+ public static final String DATA_INICIO_FULL = "plano_riscos.data_inicio";
+ public static final String DATA_FIM = "data_fim";
+ public static final String DATA_FIM_FULL = "plano_riscos.data_fim";
+ public static final String PARECER_DL = "parecer_dl";
+ public static final String PARECER_DL_FULL = "plano_riscos.parecer_dl";
+ public static final String PARECER_DNS = "parecer_dns";
+ public static final String PARECER_DNS_FULL = "plano_riscos.parecer_dns";
+ public static final String VERIFICACAO_SIPRP = "verificacao_siprp";
+ public static final String VERIFICACAO_SIPRP_FULL = "plano_riscos.verificacao_siprp";
+ public static final String RISCO_ID = "risco_id";
+ public static final String RISCO_ID_FULL = "plano_riscos.risco_id";
+ public static final String POR = "por";
+ public static final String POR_FULL = "plano_riscos.por";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ DESCRICAO, ACTIVO, AREA_ID, TO_AREA_ID, VALOR, RESPONSAVEL_EXECUCAO,
+ RECURSOS_NECESSARIOS, DATA_INICIO, DATA_FIM, PARECER_DL, PARECER_DNS,
+ VERIFICACAO_SIPRP, RISCO_ID, POR, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ DESCRICAO, ACTIVO, AREA_ID, ID, VALOR, RESPONSAVEL_EXECUCAO, RECURSOS_NECESSARIOS,
+ DATA_INICIO, DATA_FIM, PARECER_DL, PARECER_DNS, VERIFICACAO_SIPRP, RISCO_ID, POR, };
+
+ private Map dataHash;
+
+ public PlanoRiscosDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public String getDescricao()
+ {
+ return (String) get(DESCRICAO);
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.set(DESCRICAO, descricaoValue );
+ }
+
+ public String getActivo()
+ {
+ return (String) get(ACTIVO);
+ }
+
+ public void setActivo(String activoValue )
+ {
+ this.set(ACTIVO, activoValue );
+ }
+
+ public Integer getArea_id()
+ {
+ return (Integer) dataHash.get(AREA_ID);
+ }
+
+ public void setArea_id(Integer area_idValue )
+ {
+ dataHash.put(TO_AREA_ID, null);
+ dataHash.put(AREA_ID, area_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp.PlanoAreasData toArea_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_AREA_ID) == null && getArea_id() != null )
+ {
+ dataHash.put(TO_AREA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.PlanoAreasData.class, new Object[]{ getArea_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp.PlanoAreasData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp.PlanoAreasData) dataHash.get(TO_AREA_ID);
+ }
+
+ public void setToArea_id(com.evolute.siprp.server.db.data.siprp.PlanoAreasData area_idObject )
+ {
+ if( area_idObject == null )
+ {
+ dataHash.put(AREA_ID, null);
+ }
+ else
+ {
+ dataHash.put(AREA_ID, area_idObject.get( com.evolute.siprp.server.db.data.siprp.PlanoAreasData.ID ));
+ }
+ dataHash.put(TO_AREA_ID, area_idObject);
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public Integer getValor()
+ {
+ return (Integer) get(VALOR);
+ }
+
+ public void setValor(Integer valorValue )
+ {
+ this.set(VALOR, valorValue );
+ }
+
+ public String getResponsavel_execucao()
+ {
+ return (String) get(RESPONSAVEL_EXECUCAO);
+ }
+
+ public void setResponsavel_execucao(String responsavel_execucaoValue )
+ {
+ this.set(RESPONSAVEL_EXECUCAO, responsavel_execucaoValue );
+ }
+
+ public String getRecursos_necessarios()
+ {
+ return (String) get(RECURSOS_NECESSARIOS);
+ }
+
+ public void setRecursos_necessarios(String recursos_necessariosValue )
+ {
+ this.set(RECURSOS_NECESSARIOS, recursos_necessariosValue );
+ }
+
+ public java.util.Date getData_inicio()
+ {
+ return (java.util.Date) get(DATA_INICIO);
+ }
+
+ public void setData_inicio(java.util.Date data_inicioValue )
+ {
+ this.set(DATA_INICIO, data_inicioValue );
+ }
+
+ public java.util.Date getData_fim()
+ {
+ return (java.util.Date) get(DATA_FIM);
+ }
+
+ public void setData_fim(java.util.Date data_fimValue )
+ {
+ this.set(DATA_FIM, data_fimValue );
+ }
+
+ public String getParecer_dl()
+ {
+ return (String) get(PARECER_DL);
+ }
+
+ public void setParecer_dl(String parecer_dlValue )
+ {
+ this.set(PARECER_DL, parecer_dlValue );
+ }
+
+ public String getParecer_dns()
+ {
+ return (String) get(PARECER_DNS);
+ }
+
+ public void setParecer_dns(String parecer_dnsValue )
+ {
+ this.set(PARECER_DNS, parecer_dnsValue );
+ }
+
+ public String getVerificacao_siprp()
+ {
+ return (String) get(VERIFICACAO_SIPRP);
+ }
+
+ public void setVerificacao_siprp(String verificacao_siprpValue )
+ {
+ this.set(VERIFICACAO_SIPRP, verificacao_siprpValue );
+ }
+
+ public Integer getRisco_id()
+ {
+ return (Integer) get(RISCO_ID);
+ }
+
+ public void setRisco_id(Integer risco_idValue )
+ {
+ this.set(RISCO_ID, risco_idValue );
+ }
+
+ public String getPor()
+ {
+ return (String) get(POR);
+ }
+
+ public void setPor(String porValue )
+ {
+ this.set(POR, porValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_AREA_ID.equals( fieldName ) )
+ {
+ value = toArea_id();
+ }
+ else if( AREA_ID.equals( fieldName ) )
+ {
+ value = getArea_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_AREA_ID.equals( fieldName ) )
+ {
+ setToArea_id( (com.evolute.siprp.server.db.data.siprp.PlanoAreasData) value );
+ }
+ else if( AREA_ID.equals( fieldName ) )
+ {
+ setArea_id( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_AREA_ID) != null )
+ {
+ toArea_id().save();
+ dataHash.put(AREA_ID, toArea_id().get( com.evolute.siprp.server.db.data.siprp.PlanoAreasData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return PlanoRiscos.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanosActuacao.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanosActuacao.java
new file mode 100644
index 00000000..6b486673
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanosActuacao.java
@@ -0,0 +1,804 @@
+/*
+* PlanosActuacao.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+
+public final class PlanosActuacao implements JDOInnerObject
+{
+ private Integer estabelecimento_id;
+ private Integer fase;
+ private java.util.Date data_visita;
+ private String nome_estabelecimento;
+ private Boolean validacao_director_loja;
+ private Boolean validacao_dns;
+ private Boolean validacao_hs;
+ private String parecer_dns;
+ private String obs_correcao;
+ private java.util.Date data_validacao_dir_loja;
+ private Integer user_dir_loja;
+ private java.util.Date data_validacao_dns;
+ private Integer user_dns;
+ private java.util.Date data_validacao_hs;
+ private Integer user_hs;
+ private Integer fase_antes_correcao;
+ private String correcao;
+ private String observacoes_dl;
+ private String observacoes_dns;
+ private String verificacao_siprp;
+ private java.util.Date data_controlo;
+ private java.util.Date data_email_controlo;
+ private Integer empresa_id;
+ private String nome_empresa;
+ private Integer tecnico_hs_id;
+ private String tecnico_hs_nome;
+ private Integer id;
+ private java.util.Date data_relatorio;
+
+ public PlanosActuacao()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == PlanosActuacaoDataAuto.ESTABELECIMENTO_ID )
+ {
+ return estabelecimento_id;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.FASE )
+ {
+ return fase;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.DATA_VISITA )
+ {
+ return data_visita;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.NOME_ESTABELECIMENTO )
+ {
+ return nome_estabelecimento;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.VALIDACAO_DIRECTOR_LOJA )
+ {
+ return validacao_director_loja;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.VALIDACAO_DNS )
+ {
+ return validacao_dns;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.VALIDACAO_HS )
+ {
+ return validacao_hs;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.PARECER_DNS )
+ {
+ return parecer_dns;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.OBS_CORRECAO )
+ {
+ return obs_correcao;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.DATA_VALIDACAO_DIR_LOJA )
+ {
+ return data_validacao_dir_loja;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.USER_DIR_LOJA )
+ {
+ return user_dir_loja;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.DATA_VALIDACAO_DNS )
+ {
+ return data_validacao_dns;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.USER_DNS )
+ {
+ return user_dns;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.DATA_VALIDACAO_HS )
+ {
+ return data_validacao_hs;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.USER_HS )
+ {
+ return user_hs;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.FASE_ANTES_CORRECAO )
+ {
+ return fase_antes_correcao;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.CORRECAO )
+ {
+ return correcao;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.OBSERVACOES_DL )
+ {
+ return observacoes_dl;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.OBSERVACOES_DNS )
+ {
+ return observacoes_dns;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.VERIFICACAO_SIPRP )
+ {
+ return verificacao_siprp;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.DATA_CONTROLO )
+ {
+ return data_controlo;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.DATA_EMAIL_CONTROLO )
+ {
+ return data_email_controlo;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.EMPRESA_ID )
+ {
+ return empresa_id;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.NOME_EMPRESA )
+ {
+ return nome_empresa;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.TECNICO_HS_ID )
+ {
+ return tecnico_hs_id;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.TECNICO_HS_NOME )
+ {
+ return tecnico_hs_nome;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.DATA_RELATORIO )
+ {
+ return data_relatorio;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.ESTABELECIMENTO_ID ) )
+ {
+ return estabelecimento_id;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.FASE ) )
+ {
+ return fase;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_VISITA ) )
+ {
+ return data_visita;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.NOME_ESTABELECIMENTO ) )
+ {
+ return nome_estabelecimento;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.VALIDACAO_DIRECTOR_LOJA ) )
+ {
+ return validacao_director_loja;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.VALIDACAO_DNS ) )
+ {
+ return validacao_dns;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.VALIDACAO_HS ) )
+ {
+ return validacao_hs;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.PARECER_DNS ) )
+ {
+ return parecer_dns;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.OBS_CORRECAO ) )
+ {
+ return obs_correcao;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_VALIDACAO_DIR_LOJA ) )
+ {
+ return data_validacao_dir_loja;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.USER_DIR_LOJA ) )
+ {
+ return user_dir_loja;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_VALIDACAO_DNS ) )
+ {
+ return data_validacao_dns;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.USER_DNS ) )
+ {
+ return user_dns;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_VALIDACAO_HS ) )
+ {
+ return data_validacao_hs;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.USER_HS ) )
+ {
+ return user_hs;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.FASE_ANTES_CORRECAO ) )
+ {
+ return fase_antes_correcao;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.CORRECAO ) )
+ {
+ return correcao;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.OBSERVACOES_DL ) )
+ {
+ return observacoes_dl;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.OBSERVACOES_DNS ) )
+ {
+ return observacoes_dns;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.VERIFICACAO_SIPRP ) )
+ {
+ return verificacao_siprp;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_CONTROLO ) )
+ {
+ return data_controlo;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_EMAIL_CONTROLO ) )
+ {
+ return data_email_controlo;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.EMPRESA_ID ) )
+ {
+ return empresa_id;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.NOME_EMPRESA ) )
+ {
+ return nome_empresa;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.TECNICO_HS_ID ) )
+ {
+ return tecnico_hs_id;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.TECNICO_HS_NOME ) )
+ {
+ return tecnico_hs_nome;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_RELATORIO ) )
+ {
+ return data_relatorio;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == PlanosActuacaoDataAuto.ESTABELECIMENTO_ID )
+ {
+ estabelecimento_id = ( Integer ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.FASE )
+ {
+ fase = ( Integer ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.DATA_VISITA )
+ {
+ data_visita = ( java.util.Date ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.NOME_ESTABELECIMENTO )
+ {
+ nome_estabelecimento = ( String ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.VALIDACAO_DIRECTOR_LOJA )
+ {
+ validacao_director_loja = ( Boolean ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.VALIDACAO_DNS )
+ {
+ validacao_dns = ( Boolean ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.VALIDACAO_HS )
+ {
+ validacao_hs = ( Boolean ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.PARECER_DNS )
+ {
+ parecer_dns = ( String ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.OBS_CORRECAO )
+ {
+ obs_correcao = ( String ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.DATA_VALIDACAO_DIR_LOJA )
+ {
+ data_validacao_dir_loja = ( java.util.Date ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.USER_DIR_LOJA )
+ {
+ user_dir_loja = ( Integer ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.DATA_VALIDACAO_DNS )
+ {
+ data_validacao_dns = ( java.util.Date ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.USER_DNS )
+ {
+ user_dns = ( Integer ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.DATA_VALIDACAO_HS )
+ {
+ data_validacao_hs = ( java.util.Date ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.USER_HS )
+ {
+ user_hs = ( Integer ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.FASE_ANTES_CORRECAO )
+ {
+ fase_antes_correcao = ( Integer ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.CORRECAO )
+ {
+ correcao = ( String ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.OBSERVACOES_DL )
+ {
+ observacoes_dl = ( String ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.OBSERVACOES_DNS )
+ {
+ observacoes_dns = ( String ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.VERIFICACAO_SIPRP )
+ {
+ verificacao_siprp = ( String ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.DATA_CONTROLO )
+ {
+ data_controlo = ( java.util.Date ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.DATA_EMAIL_CONTROLO )
+ {
+ data_email_controlo = ( java.util.Date ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.EMPRESA_ID )
+ {
+ empresa_id = ( Integer ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.NOME_EMPRESA )
+ {
+ nome_empresa = ( String ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.TECNICO_HS_ID )
+ {
+ tecnico_hs_id = ( Integer ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.TECNICO_HS_NOME )
+ {
+ tecnico_hs_nome = ( String ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == PlanosActuacaoDataAuto.DATA_RELATORIO )
+ {
+ data_relatorio = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.ESTABELECIMENTO_ID ) )
+ {
+ estabelecimento_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.FASE ) )
+ {
+ fase = ( Integer ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_VISITA ) )
+ {
+ data_visita = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.NOME_ESTABELECIMENTO ) )
+ {
+ nome_estabelecimento = ( String ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.VALIDACAO_DIRECTOR_LOJA ) )
+ {
+ validacao_director_loja = ( Boolean ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.VALIDACAO_DNS ) )
+ {
+ validacao_dns = ( Boolean ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.VALIDACAO_HS ) )
+ {
+ validacao_hs = ( Boolean ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.PARECER_DNS ) )
+ {
+ parecer_dns = ( String ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.OBS_CORRECAO ) )
+ {
+ obs_correcao = ( String ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_VALIDACAO_DIR_LOJA ) )
+ {
+ data_validacao_dir_loja = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.USER_DIR_LOJA ) )
+ {
+ user_dir_loja = ( Integer ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_VALIDACAO_DNS ) )
+ {
+ data_validacao_dns = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.USER_DNS ) )
+ {
+ user_dns = ( Integer ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_VALIDACAO_HS ) )
+ {
+ data_validacao_hs = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.USER_HS ) )
+ {
+ user_hs = ( Integer ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.FASE_ANTES_CORRECAO ) )
+ {
+ fase_antes_correcao = ( Integer ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.CORRECAO ) )
+ {
+ correcao = ( String ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.OBSERVACOES_DL ) )
+ {
+ observacoes_dl = ( String ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.OBSERVACOES_DNS ) )
+ {
+ observacoes_dns = ( String ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.VERIFICACAO_SIPRP ) )
+ {
+ verificacao_siprp = ( String ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_CONTROLO ) )
+ {
+ data_controlo = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_EMAIL_CONTROLO ) )
+ {
+ data_email_controlo = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.EMPRESA_ID ) )
+ {
+ empresa_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.NOME_EMPRESA ) )
+ {
+ nome_empresa = ( String ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.TECNICO_HS_ID ) )
+ {
+ tecnico_hs_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.TECNICO_HS_NOME ) )
+ {
+ tecnico_hs_nome = ( String ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( PlanosActuacaoDataAuto.DATA_RELATORIO ) )
+ {
+ data_relatorio = ( java.util.Date ) value;
+ }
+ }
+
+ public Integer getEstabelecimento_id()
+ {
+ return estabelecimento_id;
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_idValue )
+ {
+ this.estabelecimento_id = estabelecimento_idValue;
+ }
+
+ public Integer getFase()
+ {
+ return fase;
+ }
+
+ public void setFase(Integer faseValue )
+ {
+ this.fase = faseValue;
+ }
+
+ public java.util.Date getData_visita()
+ {
+ return data_visita;
+ }
+
+ public void setData_visita(java.util.Date data_visitaValue )
+ {
+ this.data_visita = data_visitaValue;
+ }
+
+ public String getNome_estabelecimento()
+ {
+ return nome_estabelecimento;
+ }
+
+ public void setNome_estabelecimento(String nome_estabelecimentoValue )
+ {
+ this.nome_estabelecimento = nome_estabelecimentoValue;
+ }
+
+ public Boolean getValidacao_director_loja()
+ {
+ return validacao_director_loja;
+ }
+
+ public void setValidacao_director_loja(Boolean validacao_director_lojaValue )
+ {
+ this.validacao_director_loja = validacao_director_lojaValue;
+ }
+
+ public Boolean getValidacao_dns()
+ {
+ return validacao_dns;
+ }
+
+ public void setValidacao_dns(Boolean validacao_dnsValue )
+ {
+ this.validacao_dns = validacao_dnsValue;
+ }
+
+ public Boolean getValidacao_hs()
+ {
+ return validacao_hs;
+ }
+
+ public void setValidacao_hs(Boolean validacao_hsValue )
+ {
+ this.validacao_hs = validacao_hsValue;
+ }
+
+ public String getParecer_dns()
+ {
+ return parecer_dns;
+ }
+
+ public void setParecer_dns(String parecer_dnsValue )
+ {
+ this.parecer_dns = parecer_dnsValue;
+ }
+
+ public String getObs_correcao()
+ {
+ return obs_correcao;
+ }
+
+ public void setObs_correcao(String obs_correcaoValue )
+ {
+ this.obs_correcao = obs_correcaoValue;
+ }
+
+ public java.util.Date getData_validacao_dir_loja()
+ {
+ return data_validacao_dir_loja;
+ }
+
+ public void setData_validacao_dir_loja(java.util.Date data_validacao_dir_lojaValue )
+ {
+ this.data_validacao_dir_loja = data_validacao_dir_lojaValue;
+ }
+
+ public Integer getUser_dir_loja()
+ {
+ return user_dir_loja;
+ }
+
+ public void setUser_dir_loja(Integer user_dir_lojaValue )
+ {
+ this.user_dir_loja = user_dir_lojaValue;
+ }
+
+ public java.util.Date getData_validacao_dns()
+ {
+ return data_validacao_dns;
+ }
+
+ public void setData_validacao_dns(java.util.Date data_validacao_dnsValue )
+ {
+ this.data_validacao_dns = data_validacao_dnsValue;
+ }
+
+ public Integer getUser_dns()
+ {
+ return user_dns;
+ }
+
+ public void setUser_dns(Integer user_dnsValue )
+ {
+ this.user_dns = user_dnsValue;
+ }
+
+ public java.util.Date getData_validacao_hs()
+ {
+ return data_validacao_hs;
+ }
+
+ public void setData_validacao_hs(java.util.Date data_validacao_hsValue )
+ {
+ this.data_validacao_hs = data_validacao_hsValue;
+ }
+
+ public Integer getUser_hs()
+ {
+ return user_hs;
+ }
+
+ public void setUser_hs(Integer user_hsValue )
+ {
+ this.user_hs = user_hsValue;
+ }
+
+ public Integer getFase_antes_correcao()
+ {
+ return fase_antes_correcao;
+ }
+
+ public void setFase_antes_correcao(Integer fase_antes_correcaoValue )
+ {
+ this.fase_antes_correcao = fase_antes_correcaoValue;
+ }
+
+ public String getCorrecao()
+ {
+ return correcao;
+ }
+
+ public void setCorrecao(String correcaoValue )
+ {
+ this.correcao = correcaoValue;
+ }
+
+ public String getObservacoes_dl()
+ {
+ return observacoes_dl;
+ }
+
+ public void setObservacoes_dl(String observacoes_dlValue )
+ {
+ this.observacoes_dl = observacoes_dlValue;
+ }
+
+ public String getObservacoes_dns()
+ {
+ return observacoes_dns;
+ }
+
+ public void setObservacoes_dns(String observacoes_dnsValue )
+ {
+ this.observacoes_dns = observacoes_dnsValue;
+ }
+
+ public String getVerificacao_siprp()
+ {
+ return verificacao_siprp;
+ }
+
+ public void setVerificacao_siprp(String verificacao_siprpValue )
+ {
+ this.verificacao_siprp = verificacao_siprpValue;
+ }
+
+ public java.util.Date getData_controlo()
+ {
+ return data_controlo;
+ }
+
+ public void setData_controlo(java.util.Date data_controloValue )
+ {
+ this.data_controlo = data_controloValue;
+ }
+
+ public java.util.Date getData_email_controlo()
+ {
+ return data_email_controlo;
+ }
+
+ public void setData_email_controlo(java.util.Date data_email_controloValue )
+ {
+ this.data_email_controlo = data_email_controloValue;
+ }
+
+ public Integer getEmpresa_id()
+ {
+ return empresa_id;
+ }
+
+ public void setEmpresa_id(Integer empresa_idValue )
+ {
+ this.empresa_id = empresa_idValue;
+ }
+
+ public String getNome_empresa()
+ {
+ return nome_empresa;
+ }
+
+ public void setNome_empresa(String nome_empresaValue )
+ {
+ this.nome_empresa = nome_empresaValue;
+ }
+
+ public Integer getTecnico_hs_id()
+ {
+ return tecnico_hs_id;
+ }
+
+ public void setTecnico_hs_id(Integer tecnico_hs_idValue )
+ {
+ this.tecnico_hs_id = tecnico_hs_idValue;
+ }
+
+ public String getTecnico_hs_nome()
+ {
+ return tecnico_hs_nome;
+ }
+
+ public void setTecnico_hs_nome(String tecnico_hs_nomeValue )
+ {
+ this.tecnico_hs_nome = tecnico_hs_nomeValue;
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public java.util.Date getData_relatorio()
+ {
+ return data_relatorio;
+ }
+
+ public void setData_relatorio(java.util.Date data_relatorioValue )
+ {
+ this.data_relatorio = data_relatorioValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return PlanosActuacaoDataAuto.class;
+ }
+
+ public PlanosActuacaoDataAuto getOuterClassInstance()
+ {
+ PlanosActuacaoDataAuto outerObj = new PlanosActuacaoDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanosActuacaoData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanosActuacaoData.java
new file mode 100644
index 00000000..35ba9508
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanosActuacaoData.java
@@ -0,0 +1,18 @@
+/*
+* PlanosActuacaoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+
+public final class PlanosActuacaoData extends com.evolute.siprp.server.db.data.siprp.PlanosActuacaoDataAuto
+{
+
+ public PlanosActuacaoData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanosActuacaoDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanosActuacaoDataAuto.java
new file mode 100644
index 00000000..7414beec
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PlanosActuacaoDataAuto.java
@@ -0,0 +1,572 @@
+/*
+* PlanosActuacaoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class PlanosActuacaoDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "planos_actuacao";
+
+ public static final String ESTABELECIMENTO_ID = "estabelecimento_id";
+ public static final String ESTABELECIMENTO_ID_FULL = "planos_actuacao.estabelecimento_id";
+ public static final String FASE = "fase";
+ public static final String FASE_FULL = "planos_actuacao.fase";
+ public static final String DATA_VISITA = "data_visita";
+ public static final String DATA_VISITA_FULL = "planos_actuacao.data_visita";
+ public static final String NOME_ESTABELECIMENTO = "nome_estabelecimento";
+ public static final String NOME_ESTABELECIMENTO_FULL = "planos_actuacao.nome_estabelecimento";
+ public static final String VALIDACAO_DIRECTOR_LOJA = "validacao_director_loja";
+ public static final String VALIDACAO_DIRECTOR_LOJA_FULL = "planos_actuacao.validacao_director_loja";
+ public static final String VALIDACAO_DNS = "validacao_dns";
+ public static final String VALIDACAO_DNS_FULL = "planos_actuacao.validacao_dns";
+ public static final String VALIDACAO_HS = "validacao_hs";
+ public static final String VALIDACAO_HS_FULL = "planos_actuacao.validacao_hs";
+ public static final String PARECER_DNS = "parecer_dns";
+ public static final String PARECER_DNS_FULL = "planos_actuacao.parecer_dns";
+ public static final String OBS_CORRECAO = "obs_correcao";
+ public static final String OBS_CORRECAO_FULL = "planos_actuacao.obs_correcao";
+ public static final String DATA_VALIDACAO_DIR_LOJA = "data_validacao_dir_loja";
+ public static final String DATA_VALIDACAO_DIR_LOJA_FULL = "planos_actuacao.data_validacao_dir_loja";
+ public static final String USER_DIR_LOJA = "user_dir_loja";
+ public static final String USER_DIR_LOJA_FULL = "planos_actuacao.user_dir_loja";
+ public static final String TO_USER_DIR_LOJA = "to user_dir_loja";
+ public static final String DATA_VALIDACAO_DNS = "data_validacao_dns";
+ public static final String DATA_VALIDACAO_DNS_FULL = "planos_actuacao.data_validacao_dns";
+ public static final String USER_DNS = "user_dns";
+ public static final String USER_DNS_FULL = "planos_actuacao.user_dns";
+ public static final String TO_USER_DNS = "to user_dns";
+ public static final String DATA_VALIDACAO_HS = "data_validacao_hs";
+ public static final String DATA_VALIDACAO_HS_FULL = "planos_actuacao.data_validacao_hs";
+ public static final String USER_HS = "user_hs";
+ public static final String USER_HS_FULL = "planos_actuacao.user_hs";
+ public static final String TO_USER_HS = "to user_hs";
+ public static final String FASE_ANTES_CORRECAO = "fase_antes_correcao";
+ public static final String FASE_ANTES_CORRECAO_FULL = "planos_actuacao.fase_antes_correcao";
+ public static final String CORRECAO = "correcao";
+ public static final String CORRECAO_FULL = "planos_actuacao.correcao";
+ public static final String OBSERVACOES_DL = "observacoes_dl";
+ public static final String OBSERVACOES_DL_FULL = "planos_actuacao.observacoes_dl";
+ public static final String OBSERVACOES_DNS = "observacoes_dns";
+ public static final String OBSERVACOES_DNS_FULL = "planos_actuacao.observacoes_dns";
+ public static final String VERIFICACAO_SIPRP = "verificacao_siprp";
+ public static final String VERIFICACAO_SIPRP_FULL = "planos_actuacao.verificacao_siprp";
+ public static final String DATA_CONTROLO = "data_controlo";
+ public static final String DATA_CONTROLO_FULL = "planos_actuacao.data_controlo";
+ public static final String DATA_EMAIL_CONTROLO = "data_email_controlo";
+ public static final String DATA_EMAIL_CONTROLO_FULL = "planos_actuacao.data_email_controlo";
+ public static final String EMPRESA_ID = "empresa_id";
+ public static final String EMPRESA_ID_FULL = "planos_actuacao.empresa_id";
+ public static final String NOME_EMPRESA = "nome_empresa";
+ public static final String NOME_EMPRESA_FULL = "planos_actuacao.nome_empresa";
+ public static final String TECNICO_HS_ID = "tecnico_hs_id";
+ public static final String TECNICO_HS_ID_FULL = "planos_actuacao.tecnico_hs_id";
+ public static final String TECNICO_HS_NOME = "tecnico_hs_nome";
+ public static final String TECNICO_HS_NOME_FULL = "planos_actuacao.tecnico_hs_nome";
+ public static final String ID = "id";
+ public static final String ID_FULL = "planos_actuacao.id";
+ public static final String DATA_RELATORIO = "data_relatorio";
+ public static final String DATA_RELATORIO_FULL = "planos_actuacao.data_relatorio";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ ESTABELECIMENTO_ID, FASE, DATA_VISITA, NOME_ESTABELECIMENTO,
+ VALIDACAO_DIRECTOR_LOJA, VALIDACAO_DNS, VALIDACAO_HS, PARECER_DNS,
+ OBS_CORRECAO, DATA_VALIDACAO_DIR_LOJA, USER_DIR_LOJA, TO_USER_DIR_LOJA,
+ DATA_VALIDACAO_DNS, USER_DNS, TO_USER_DNS, DATA_VALIDACAO_HS, USER_HS,
+ TO_USER_HS, FASE_ANTES_CORRECAO, CORRECAO, OBSERVACOES_DL, OBSERVACOES_DNS,
+ VERIFICACAO_SIPRP, DATA_CONTROLO, DATA_EMAIL_CONTROLO, EMPRESA_ID,
+ NOME_EMPRESA, TECNICO_HS_ID, TECNICO_HS_NOME, DATA_RELATORIO, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ESTABELECIMENTO_ID, FASE, DATA_VISITA, NOME_ESTABELECIMENTO,
+ VALIDACAO_DIRECTOR_LOJA, VALIDACAO_DNS, VALIDACAO_HS, PARECER_DNS,
+ OBS_CORRECAO, DATA_VALIDACAO_DIR_LOJA, USER_DIR_LOJA, DATA_VALIDACAO_DNS,
+ USER_DNS, DATA_VALIDACAO_HS, USER_HS, FASE_ANTES_CORRECAO, CORRECAO,
+ OBSERVACOES_DL, OBSERVACOES_DNS, VERIFICACAO_SIPRP, DATA_CONTROLO,
+ DATA_EMAIL_CONTROLO, EMPRESA_ID, NOME_EMPRESA, TECNICO_HS_ID, TECNICO_HS_NOME,
+ ID, DATA_RELATORIO, };
+
+ private Map dataHash;
+
+ public PlanosActuacaoDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getEstabelecimento_id()
+ {
+ return (Integer) get(ESTABELECIMENTO_ID);
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_idValue )
+ {
+ this.set(ESTABELECIMENTO_ID, estabelecimento_idValue );
+ }
+
+ public Integer getFase()
+ {
+ return (Integer) get(FASE);
+ }
+
+ public void setFase(Integer faseValue )
+ {
+ this.set(FASE, faseValue );
+ }
+
+ public java.util.Date getData_visita()
+ {
+ return (java.util.Date) get(DATA_VISITA);
+ }
+
+ public void setData_visita(java.util.Date data_visitaValue )
+ {
+ this.set(DATA_VISITA, data_visitaValue );
+ }
+
+ public String getNome_estabelecimento()
+ {
+ return (String) get(NOME_ESTABELECIMENTO);
+ }
+
+ public void setNome_estabelecimento(String nome_estabelecimentoValue )
+ {
+ this.set(NOME_ESTABELECIMENTO, nome_estabelecimentoValue );
+ }
+
+ public Boolean getValidacao_director_loja()
+ {
+ return (Boolean) get(VALIDACAO_DIRECTOR_LOJA);
+ }
+
+ public void setValidacao_director_loja(Boolean validacao_director_lojaValue )
+ {
+ this.set(VALIDACAO_DIRECTOR_LOJA, validacao_director_lojaValue );
+ }
+
+ public Boolean getValidacao_dns()
+ {
+ return (Boolean) get(VALIDACAO_DNS);
+ }
+
+ public void setValidacao_dns(Boolean validacao_dnsValue )
+ {
+ this.set(VALIDACAO_DNS, validacao_dnsValue );
+ }
+
+ public Boolean getValidacao_hs()
+ {
+ return (Boolean) get(VALIDACAO_HS);
+ }
+
+ public void setValidacao_hs(Boolean validacao_hsValue )
+ {
+ this.set(VALIDACAO_HS, validacao_hsValue );
+ }
+
+ public String getParecer_dns()
+ {
+ return (String) get(PARECER_DNS);
+ }
+
+ public void setParecer_dns(String parecer_dnsValue )
+ {
+ this.set(PARECER_DNS, parecer_dnsValue );
+ }
+
+ public String getObs_correcao()
+ {
+ return (String) get(OBS_CORRECAO);
+ }
+
+ public void setObs_correcao(String obs_correcaoValue )
+ {
+ this.set(OBS_CORRECAO, obs_correcaoValue );
+ }
+
+ public java.util.Date getData_validacao_dir_loja()
+ {
+ return (java.util.Date) get(DATA_VALIDACAO_DIR_LOJA);
+ }
+
+ public void setData_validacao_dir_loja(java.util.Date data_validacao_dir_lojaValue )
+ {
+ this.set(DATA_VALIDACAO_DIR_LOJA, data_validacao_dir_lojaValue );
+ }
+
+ public Integer getUser_dir_loja()
+ {
+ return (Integer) dataHash.get(USER_DIR_LOJA);
+ }
+
+ public void setUser_dir_loja(Integer user_dir_lojaValue )
+ {
+ dataHash.put(TO_USER_DIR_LOJA, null);
+ dataHash.put(USER_DIR_LOJA, user_dir_lojaValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp.UtilizadoresData toUser_dir_loja()
+ throws Exception
+ {
+ if( dataHash.get(TO_USER_DIR_LOJA) == null && getUser_dir_loja() != null )
+ {
+ dataHash.put(TO_USER_DIR_LOJA, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.UtilizadoresData.class, new Object[]{ getUser_dir_loja() }, new String[]{ com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp.UtilizadoresData) dataHash.get(TO_USER_DIR_LOJA);
+ }
+
+ public void setToUser_dir_loja(com.evolute.siprp.server.db.data.siprp.UtilizadoresData user_dir_lojaObject )
+ {
+ if( user_dir_lojaObject == null )
+ {
+ dataHash.put(USER_DIR_LOJA, null);
+ }
+ else
+ {
+ dataHash.put(USER_DIR_LOJA, user_dir_lojaObject.get( com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID ));
+ }
+ dataHash.put(TO_USER_DIR_LOJA, user_dir_lojaObject);
+ }
+
+ public java.util.Date getData_validacao_dns()
+ {
+ return (java.util.Date) get(DATA_VALIDACAO_DNS);
+ }
+
+ public void setData_validacao_dns(java.util.Date data_validacao_dnsValue )
+ {
+ this.set(DATA_VALIDACAO_DNS, data_validacao_dnsValue );
+ }
+
+ public Integer getUser_dns()
+ {
+ return (Integer) dataHash.get(USER_DNS);
+ }
+
+ public void setUser_dns(Integer user_dnsValue )
+ {
+ dataHash.put(TO_USER_DNS, null);
+ dataHash.put(USER_DNS, user_dnsValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp.UtilizadoresData toUser_dns()
+ throws Exception
+ {
+ if( dataHash.get(TO_USER_DNS) == null && getUser_dns() != null )
+ {
+ dataHash.put(TO_USER_DNS, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.UtilizadoresData.class, new Object[]{ getUser_dns() }, new String[]{ com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp.UtilizadoresData) dataHash.get(TO_USER_DNS);
+ }
+
+ public void setToUser_dns(com.evolute.siprp.server.db.data.siprp.UtilizadoresData user_dnsObject )
+ {
+ if( user_dnsObject == null )
+ {
+ dataHash.put(USER_DNS, null);
+ }
+ else
+ {
+ dataHash.put(USER_DNS, user_dnsObject.get( com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID ));
+ }
+ dataHash.put(TO_USER_DNS, user_dnsObject);
+ }
+
+ public java.util.Date getData_validacao_hs()
+ {
+ return (java.util.Date) get(DATA_VALIDACAO_HS);
+ }
+
+ public void setData_validacao_hs(java.util.Date data_validacao_hsValue )
+ {
+ this.set(DATA_VALIDACAO_HS, data_validacao_hsValue );
+ }
+
+ public Integer getUser_hs()
+ {
+ return (Integer) dataHash.get(USER_HS);
+ }
+
+ public void setUser_hs(Integer user_hsValue )
+ {
+ dataHash.put(TO_USER_HS, null);
+ dataHash.put(USER_HS, user_hsValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp.UtilizadoresData toUser_hs()
+ throws Exception
+ {
+ if( dataHash.get(TO_USER_HS) == null && getUser_hs() != null )
+ {
+ dataHash.put(TO_USER_HS, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.UtilizadoresData.class, new Object[]{ getUser_hs() }, new String[]{ com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp.UtilizadoresData) dataHash.get(TO_USER_HS);
+ }
+
+ public void setToUser_hs(com.evolute.siprp.server.db.data.siprp.UtilizadoresData user_hsObject )
+ {
+ if( user_hsObject == null )
+ {
+ dataHash.put(USER_HS, null);
+ }
+ else
+ {
+ dataHash.put(USER_HS, user_hsObject.get( com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID ));
+ }
+ dataHash.put(TO_USER_HS, user_hsObject);
+ }
+
+ public Integer getFase_antes_correcao()
+ {
+ return (Integer) get(FASE_ANTES_CORRECAO);
+ }
+
+ public void setFase_antes_correcao(Integer fase_antes_correcaoValue )
+ {
+ this.set(FASE_ANTES_CORRECAO, fase_antes_correcaoValue );
+ }
+
+ public String getCorrecao()
+ {
+ return (String) get(CORRECAO);
+ }
+
+ public void setCorrecao(String correcaoValue )
+ {
+ this.set(CORRECAO, correcaoValue );
+ }
+
+ public String getObservacoes_dl()
+ {
+ return (String) get(OBSERVACOES_DL);
+ }
+
+ public void setObservacoes_dl(String observacoes_dlValue )
+ {
+ this.set(OBSERVACOES_DL, observacoes_dlValue );
+ }
+
+ public String getObservacoes_dns()
+ {
+ return (String) get(OBSERVACOES_DNS);
+ }
+
+ public void setObservacoes_dns(String observacoes_dnsValue )
+ {
+ this.set(OBSERVACOES_DNS, observacoes_dnsValue );
+ }
+
+ public String getVerificacao_siprp()
+ {
+ return (String) get(VERIFICACAO_SIPRP);
+ }
+
+ public void setVerificacao_siprp(String verificacao_siprpValue )
+ {
+ this.set(VERIFICACAO_SIPRP, verificacao_siprpValue );
+ }
+
+ public java.util.Date getData_controlo()
+ {
+ return (java.util.Date) get(DATA_CONTROLO);
+ }
+
+ public void setData_controlo(java.util.Date data_controloValue )
+ {
+ this.set(DATA_CONTROLO, data_controloValue );
+ }
+
+ public java.util.Date getData_email_controlo()
+ {
+ return (java.util.Date) get(DATA_EMAIL_CONTROLO);
+ }
+
+ public void setData_email_controlo(java.util.Date data_email_controloValue )
+ {
+ this.set(DATA_EMAIL_CONTROLO, data_email_controloValue );
+ }
+
+ public Integer getEmpresa_id()
+ {
+ return (Integer) get(EMPRESA_ID);
+ }
+
+ public void setEmpresa_id(Integer empresa_idValue )
+ {
+ this.set(EMPRESA_ID, empresa_idValue );
+ }
+
+ public String getNome_empresa()
+ {
+ return (String) get(NOME_EMPRESA);
+ }
+
+ public void setNome_empresa(String nome_empresaValue )
+ {
+ this.set(NOME_EMPRESA, nome_empresaValue );
+ }
+
+ public Integer getTecnico_hs_id()
+ {
+ return (Integer) get(TECNICO_HS_ID);
+ }
+
+ public void setTecnico_hs_id(Integer tecnico_hs_idValue )
+ {
+ this.set(TECNICO_HS_ID, tecnico_hs_idValue );
+ }
+
+ public String getTecnico_hs_nome()
+ {
+ return (String) get(TECNICO_HS_NOME);
+ }
+
+ public void setTecnico_hs_nome(String tecnico_hs_nomeValue )
+ {
+ this.set(TECNICO_HS_NOME, tecnico_hs_nomeValue );
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public java.util.Date getData_relatorio()
+ {
+ return (java.util.Date) get(DATA_RELATORIO);
+ }
+
+ public void setData_relatorio(java.util.Date data_relatorioValue )
+ {
+ this.set(DATA_RELATORIO, data_relatorioValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_USER_DIR_LOJA.equals( fieldName ) )
+ {
+ value = toUser_dir_loja();
+ }
+ else if( TO_USER_DNS.equals( fieldName ) )
+ {
+ value = toUser_dns();
+ }
+ else if( USER_DIR_LOJA.equals( fieldName ) )
+ {
+ value = getUser_dir_loja();
+ }
+ else if( TO_USER_HS.equals( fieldName ) )
+ {
+ value = toUser_hs();
+ }
+ else if( USER_HS.equals( fieldName ) )
+ {
+ value = getUser_hs();
+ }
+ else if( USER_DNS.equals( fieldName ) )
+ {
+ value = getUser_dns();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_USER_DIR_LOJA.equals( fieldName ) )
+ {
+ setToUser_dir_loja( (com.evolute.siprp.server.db.data.siprp.UtilizadoresData) value );
+ }
+ else if( TO_USER_DNS.equals( fieldName ) )
+ {
+ setToUser_dns( (com.evolute.siprp.server.db.data.siprp.UtilizadoresData) value );
+ }
+ else if( USER_DIR_LOJA.equals( fieldName ) )
+ {
+ setUser_dir_loja( (Integer) value );
+ }
+ else if( TO_USER_HS.equals( fieldName ) )
+ {
+ setToUser_hs( (com.evolute.siprp.server.db.data.siprp.UtilizadoresData) value );
+ }
+ else if( USER_HS.equals( fieldName ) )
+ {
+ setUser_hs( (Integer) value );
+ }
+ else if( USER_DNS.equals( fieldName ) )
+ {
+ setUser_dns( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_USER_DIR_LOJA) != null )
+ {
+ toUser_dir_loja().save();
+ dataHash.put(USER_DIR_LOJA, toUser_dir_loja().get( com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID ));
+ }
+
+ if( dataHash.get(TO_USER_DNS) != null )
+ {
+ toUser_dns().save();
+ dataHash.put(USER_DNS, toUser_dns().get( com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID ));
+ }
+
+ if( dataHash.get(TO_USER_HS) != null )
+ {
+ toUser_hs().save();
+ dataHash.put(USER_HS, toUser_hs().get( com.evolute.siprp.server.db.data.siprp.UtilizadoresData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return PlanosActuacao.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Properties.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Properties.java
new file mode 100644
index 00000000..b326f079
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Properties.java
@@ -0,0 +1,44 @@
+/*
+* Properties.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+
+public final class Properties implements JDOInnerObject
+{
+
+ public Properties()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ }
+
+ public Class getOuterClass()
+ {
+ return PropertiesDataAuto.class;
+ }
+
+ public PropertiesDataAuto getOuterClassInstance()
+ {
+ PropertiesDataAuto outerObj = new PropertiesDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Object getJDOPrimaryKey()
+ {
+ return null;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PropertiesData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PropertiesData.java
new file mode 100644
index 00000000..343f70d0
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PropertiesData.java
@@ -0,0 +1,18 @@
+/*
+* PropertiesDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+
+public final class PropertiesData extends com.evolute.siprp.server.db.data.siprp.PropertiesDataAuto
+{
+
+ public PropertiesData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PropertiesDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PropertiesDataAuto.java
new file mode 100644
index 00000000..c0d1d9b3
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/PropertiesDataAuto.java
@@ -0,0 +1,67 @@
+/*
+* PropertiesDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class PropertiesDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "properties";
+
+
+ public static final String FIELD_NAMES[] = new String[]{
+ };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ };
+
+ private Map dataHash;
+
+ public PropertiesDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return Properties.class;
+ }
+
+ public Object getJDOPrimaryKey()
+ {
+ return null;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Recomendacoes.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Recomendacoes.java
new file mode 100644
index 00000000..5c3636d7
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Recomendacoes.java
@@ -0,0 +1,129 @@
+/*
+* Recomendacoes.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+
+public final class Recomendacoes implements JDOInnerObject
+{
+ private Integer id;
+ private Integer analise_id;
+ private String recomendacao;
+
+ public Recomendacoes()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == RecomendacoesDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == RecomendacoesDataAuto.ANALISE_ID )
+ {
+ return analise_id;
+ }
+ else if( fieldName == RecomendacoesDataAuto.RECOMENDACAO )
+ {
+ return recomendacao;
+ }
+ else if( fieldName.equals( RecomendacoesDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( RecomendacoesDataAuto.ANALISE_ID ) )
+ {
+ return analise_id;
+ }
+ else if( fieldName.equals( RecomendacoesDataAuto.RECOMENDACAO ) )
+ {
+ return recomendacao;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == RecomendacoesDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == RecomendacoesDataAuto.ANALISE_ID )
+ {
+ analise_id = ( Integer ) value;
+ }
+ else if( fieldName == RecomendacoesDataAuto.RECOMENDACAO )
+ {
+ recomendacao = ( String ) value;
+ }
+ else if( fieldName.equals( RecomendacoesDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( RecomendacoesDataAuto.ANALISE_ID ) )
+ {
+ analise_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( RecomendacoesDataAuto.RECOMENDACAO ) )
+ {
+ recomendacao = ( String ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public Integer getAnalise_id()
+ {
+ return analise_id;
+ }
+
+ public void setAnalise_id(Integer analise_idValue )
+ {
+ this.analise_id = analise_idValue;
+ }
+
+ public String getRecomendacao()
+ {
+ return recomendacao;
+ }
+
+ public void setRecomendacao(String recomendacaoValue )
+ {
+ this.recomendacao = recomendacaoValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return RecomendacoesDataAuto.class;
+ }
+
+ public RecomendacoesDataAuto getOuterClassInstance()
+ {
+ RecomendacoesDataAuto outerObj = new RecomendacoesDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RecomendacoesData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RecomendacoesData.java
new file mode 100644
index 00000000..d76a5106
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RecomendacoesData.java
@@ -0,0 +1,18 @@
+/*
+* RecomendacoesDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+
+public final class RecomendacoesData extends com.evolute.siprp.server.db.data.siprp.RecomendacoesDataAuto
+{
+
+ public RecomendacoesData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RecomendacoesDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RecomendacoesDataAuto.java
new file mode 100644
index 00000000..5fda16ca
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RecomendacoesDataAuto.java
@@ -0,0 +1,166 @@
+/*
+* RecomendacoesDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class RecomendacoesDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "recomendacoes";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "recomendacoes.id";
+ public static final String ANALISE_ID = "analise_id";
+ public static final String ANALISE_ID_FULL = "recomendacoes.analise_id";
+ public static final String TO_ANALISE_ID = "to analise_id";
+ public static final String RECOMENDACAO = "recomendacao";
+ public static final String RECOMENDACAO_FULL = "recomendacoes.recomendacao";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ ANALISE_ID, TO_ANALISE_ID, RECOMENDACAO, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, ANALISE_ID, RECOMENDACAO, };
+
+ private Map dataHash;
+
+ public RecomendacoesDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public Integer getAnalise_id()
+ {
+ return (Integer) dataHash.get(ANALISE_ID);
+ }
+
+ public void setAnalise_id(Integer analise_idValue )
+ {
+ dataHash.put(TO_ANALISE_ID, null);
+ dataHash.put(ANALISE_ID, analise_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData toAnalise_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_ANALISE_ID) == null && getAnalise_id() != null )
+ {
+ dataHash.put(TO_ANALISE_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData.class, new Object[]{ getAnalise_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData) dataHash.get(TO_ANALISE_ID);
+ }
+
+ public void setToAnalise_id(com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData analise_idObject )
+ {
+ if( analise_idObject == null )
+ {
+ dataHash.put(ANALISE_ID, null);
+ }
+ else
+ {
+ dataHash.put(ANALISE_ID, analise_idObject.get( com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData.ID ));
+ }
+ dataHash.put(TO_ANALISE_ID, analise_idObject);
+ }
+
+ public String getRecomendacao()
+ {
+ return (String) get(RECOMENDACAO);
+ }
+
+ public void setRecomendacao(String recomendacaoValue )
+ {
+ this.set(RECOMENDACAO, recomendacaoValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_ANALISE_ID.equals( fieldName ) )
+ {
+ value = toAnalise_id();
+ }
+ else if( ANALISE_ID.equals( fieldName ) )
+ {
+ value = getAnalise_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_ANALISE_ID.equals( fieldName ) )
+ {
+ setToAnalise_id( (com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData) value );
+ }
+ else if( ANALISE_ID.equals( fieldName ) )
+ {
+ setAnalise_id( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_ANALISE_ID) != null )
+ {
+ toAnalise_id().save();
+ dataHash.put(ANALISE_ID, toAnalise_id().get( com.evolute.siprp.server.db.data.siprp.AnalisesAcidentesData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return Recomendacoes.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Roles.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Roles.java
new file mode 100644
index 00000000..d3247678
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Roles.java
@@ -0,0 +1,44 @@
+/*
+* Roles.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+
+public final class Roles implements JDOInnerObject
+{
+
+ public Roles()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ }
+
+ public Class getOuterClass()
+ {
+ return RolesDataAuto.class;
+ }
+
+ public RolesDataAuto getOuterClassInstance()
+ {
+ RolesDataAuto outerObj = new RolesDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Object getJDOPrimaryKey()
+ {
+ return null;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RolesData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RolesData.java
new file mode 100644
index 00000000..91b99f67
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RolesData.java
@@ -0,0 +1,18 @@
+/*
+* RolesDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+
+public final class RolesData extends com.evolute.siprp.server.db.data.siprp.RolesDataAuto
+{
+
+ public RolesData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RolesDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RolesDataAuto.java
new file mode 100644
index 00000000..628ecb46
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/RolesDataAuto.java
@@ -0,0 +1,67 @@
+/*
+* RolesDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class RolesDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "roles";
+
+
+ public static final String FIELD_NAMES[] = new String[]{
+ };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ };
+
+ private Map dataHash;
+
+ public RolesDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return Roles.class;
+ }
+
+ public Object getJDOPrimaryKey()
+ {
+ return null;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Seccoes.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Seccoes.java
new file mode 100644
index 00000000..17ef6967
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Seccoes.java
@@ -0,0 +1,156 @@
+/*
+* Seccoes.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+
+public final class Seccoes implements JDOInnerObject
+{
+ private Integer id;
+ private String descricao;
+ private Integer departamento_id;
+ private String activo;
+
+ public Seccoes()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == SeccoesDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == SeccoesDataAuto.DESCRICAO )
+ {
+ return descricao;
+ }
+ else if( fieldName == SeccoesDataAuto.DEPARTAMENTO_ID )
+ {
+ return departamento_id;
+ }
+ else if( fieldName == SeccoesDataAuto.ACTIVO )
+ {
+ return activo;
+ }
+ else if( fieldName.equals( SeccoesDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( SeccoesDataAuto.DESCRICAO ) )
+ {
+ return descricao;
+ }
+ else if( fieldName.equals( SeccoesDataAuto.DEPARTAMENTO_ID ) )
+ {
+ return departamento_id;
+ }
+ else if( fieldName.equals( SeccoesDataAuto.ACTIVO ) )
+ {
+ return activo;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == SeccoesDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == SeccoesDataAuto.DESCRICAO )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName == SeccoesDataAuto.DEPARTAMENTO_ID )
+ {
+ departamento_id = ( Integer ) value;
+ }
+ else if( fieldName == SeccoesDataAuto.ACTIVO )
+ {
+ activo = ( String ) value;
+ }
+ else if( fieldName.equals( SeccoesDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( SeccoesDataAuto.DESCRICAO ) )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName.equals( SeccoesDataAuto.DEPARTAMENTO_ID ) )
+ {
+ departamento_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( SeccoesDataAuto.ACTIVO ) )
+ {
+ activo = ( String ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getDescricao()
+ {
+ return descricao;
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.descricao = descricaoValue;
+ }
+
+ public Integer getDepartamento_id()
+ {
+ return departamento_id;
+ }
+
+ public void setDepartamento_id(Integer departamento_idValue )
+ {
+ this.departamento_id = departamento_idValue;
+ }
+
+ public String getActivo()
+ {
+ return activo;
+ }
+
+ public void setActivo(String activoValue )
+ {
+ this.activo = activoValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return SeccoesDataAuto.class;
+ }
+
+ public SeccoesDataAuto getOuterClassInstance()
+ {
+ SeccoesDataAuto outerObj = new SeccoesDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/SeccoesData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/SeccoesData.java
new file mode 100644
index 00000000..25b3d70a
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/SeccoesData.java
@@ -0,0 +1,18 @@
+/*
+* SeccoesDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+
+public final class SeccoesData extends com.evolute.siprp.server.db.data.siprp.SeccoesDataAuto
+{
+
+ public SeccoesData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/SeccoesDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/SeccoesDataAuto.java
new file mode 100644
index 00000000..7851d429
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/SeccoesDataAuto.java
@@ -0,0 +1,178 @@
+/*
+* SeccoesDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class SeccoesDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "seccoes";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "seccoes.id";
+ public static final String DESCRICAO = "descricao";
+ public static final String DESCRICAO_FULL = "seccoes.descricao";
+ public static final String DEPARTAMENTO_ID = "departamento_id";
+ public static final String DEPARTAMENTO_ID_FULL = "seccoes.departamento_id";
+ public static final String TO_DEPARTAMENTO_ID = "to departamento_id";
+ public static final String ACTIVO = "activo";
+ public static final String ACTIVO_FULL = "seccoes.activo";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ DESCRICAO, DEPARTAMENTO_ID, TO_DEPARTAMENTO_ID, ACTIVO, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, DESCRICAO, DEPARTAMENTO_ID, ACTIVO, };
+
+ private Map dataHash;
+
+ public SeccoesDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getDescricao()
+ {
+ return (String) get(DESCRICAO);
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.set(DESCRICAO, descricaoValue );
+ }
+
+ public Integer getDepartamento_id()
+ {
+ return (Integer) dataHash.get(DEPARTAMENTO_ID);
+ }
+
+ public void setDepartamento_id(Integer departamento_idValue )
+ {
+ dataHash.put(TO_DEPARTAMENTO_ID, null);
+ dataHash.put(DEPARTAMENTO_ID, departamento_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp.DepartamentosData toDepartamento_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_DEPARTAMENTO_ID) == null && getDepartamento_id() != null )
+ {
+ dataHash.put(TO_DEPARTAMENTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp.DepartamentosData.class, new Object[]{ getDepartamento_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp.DepartamentosData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp.DepartamentosData) dataHash.get(TO_DEPARTAMENTO_ID);
+ }
+
+ public void setToDepartamento_id(com.evolute.siprp.server.db.data.siprp.DepartamentosData departamento_idObject )
+ {
+ if( departamento_idObject == null )
+ {
+ dataHash.put(DEPARTAMENTO_ID, null);
+ }
+ else
+ {
+ dataHash.put(DEPARTAMENTO_ID, departamento_idObject.get( com.evolute.siprp.server.db.data.siprp.DepartamentosData.ID ));
+ }
+ dataHash.put(TO_DEPARTAMENTO_ID, departamento_idObject);
+ }
+
+ public String getActivo()
+ {
+ return (String) get(ACTIVO);
+ }
+
+ public void setActivo(String activoValue )
+ {
+ this.set(ACTIVO, activoValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( DEPARTAMENTO_ID.equals( fieldName ) )
+ {
+ value = getDepartamento_id();
+ }
+ else if( TO_DEPARTAMENTO_ID.equals( fieldName ) )
+ {
+ value = toDepartamento_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( DEPARTAMENTO_ID.equals( fieldName ) )
+ {
+ setDepartamento_id( (Integer) value );
+ }
+ else if( TO_DEPARTAMENTO_ID.equals( fieldName ) )
+ {
+ setToDepartamento_id( (com.evolute.siprp.server.db.data.siprp.DepartamentosData) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_DEPARTAMENTO_ID) != null )
+ {
+ toDepartamento_id().save();
+ dataHash.put(DEPARTAMENTO_ID, toDepartamento_id().get( com.evolute.siprp.server.db.data.siprp.DepartamentosData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return Seccoes.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/TiposUtilizadores.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/TiposUtilizadores.java
new file mode 100644
index 00000000..d3ea0d91
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/TiposUtilizadores.java
@@ -0,0 +1,183 @@
+/*
+* TiposUtilizadores.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+
+public final class TiposUtilizadores implements JDOInnerObject
+{
+ private Integer id;
+ private Integer tipo;
+ private String descricao;
+ private String activo;
+ private Integer ordem;
+
+ public TiposUtilizadores()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == TiposUtilizadoresDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == TiposUtilizadoresDataAuto.TIPO )
+ {
+ return tipo;
+ }
+ else if( fieldName == TiposUtilizadoresDataAuto.DESCRICAO )
+ {
+ return descricao;
+ }
+ else if( fieldName == TiposUtilizadoresDataAuto.ACTIVO )
+ {
+ return activo;
+ }
+ else if( fieldName == TiposUtilizadoresDataAuto.ORDEM )
+ {
+ return ordem;
+ }
+ else if( fieldName.equals( TiposUtilizadoresDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( TiposUtilizadoresDataAuto.TIPO ) )
+ {
+ return tipo;
+ }
+ else if( fieldName.equals( TiposUtilizadoresDataAuto.DESCRICAO ) )
+ {
+ return descricao;
+ }
+ else if( fieldName.equals( TiposUtilizadoresDataAuto.ACTIVO ) )
+ {
+ return activo;
+ }
+ else if( fieldName.equals( TiposUtilizadoresDataAuto.ORDEM ) )
+ {
+ return ordem;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == TiposUtilizadoresDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == TiposUtilizadoresDataAuto.TIPO )
+ {
+ tipo = ( Integer ) value;
+ }
+ else if( fieldName == TiposUtilizadoresDataAuto.DESCRICAO )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName == TiposUtilizadoresDataAuto.ACTIVO )
+ {
+ activo = ( String ) value;
+ }
+ else if( fieldName == TiposUtilizadoresDataAuto.ORDEM )
+ {
+ ordem = ( Integer ) value;
+ }
+ else if( fieldName.equals( TiposUtilizadoresDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( TiposUtilizadoresDataAuto.TIPO ) )
+ {
+ tipo = ( Integer ) value;
+ }
+ else if( fieldName.equals( TiposUtilizadoresDataAuto.DESCRICAO ) )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName.equals( TiposUtilizadoresDataAuto.ACTIVO ) )
+ {
+ activo = ( String ) value;
+ }
+ else if( fieldName.equals( TiposUtilizadoresDataAuto.ORDEM ) )
+ {
+ ordem = ( Integer ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public Integer getTipo()
+ {
+ return tipo;
+ }
+
+ public void setTipo(Integer tipoValue )
+ {
+ this.tipo = tipoValue;
+ }
+
+ public String getDescricao()
+ {
+ return descricao;
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.descricao = descricaoValue;
+ }
+
+ public String getActivo()
+ {
+ return activo;
+ }
+
+ public void setActivo(String activoValue )
+ {
+ this.activo = activoValue;
+ }
+
+ public Integer getOrdem()
+ {
+ return ordem;
+ }
+
+ public void setOrdem(Integer ordemValue )
+ {
+ this.ordem = ordemValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return TiposUtilizadoresDataAuto.class;
+ }
+
+ public TiposUtilizadoresDataAuto getOuterClassInstance()
+ {
+ TiposUtilizadoresDataAuto outerObj = new TiposUtilizadoresDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/TiposUtilizadoresData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/TiposUtilizadoresData.java
new file mode 100644
index 00000000..6dbc7c71
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/TiposUtilizadoresData.java
@@ -0,0 +1,18 @@
+/*
+* TiposUtilizadoresDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+
+public final class TiposUtilizadoresData extends com.evolute.siprp.server.db.data.siprp.TiposUtilizadoresDataAuto
+{
+
+ public TiposUtilizadoresData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/TiposUtilizadoresDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/TiposUtilizadoresDataAuto.java
new file mode 100644
index 00000000..ea29dd56
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/TiposUtilizadoresDataAuto.java
@@ -0,0 +1,131 @@
+/*
+* TiposUtilizadoresDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class TiposUtilizadoresDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "tipos_utilizadores";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "tipos_utilizadores.id";
+ public static final String TIPO = "tipo";
+ public static final String TIPO_FULL = "tipos_utilizadores.tipo";
+ public static final String DESCRICAO = "descricao";
+ public static final String DESCRICAO_FULL = "tipos_utilizadores.descricao";
+ public static final String ACTIVO = "activo";
+ public static final String ACTIVO_FULL = "tipos_utilizadores.activo";
+ public static final String ORDEM = "ordem";
+ public static final String ORDEM_FULL = "tipos_utilizadores.ordem";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ TIPO, DESCRICAO, ACTIVO, ORDEM, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, TIPO, DESCRICAO, ACTIVO, ORDEM, };
+
+ private Map dataHash;
+
+ public TiposUtilizadoresDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public Integer getTipo()
+ {
+ return (Integer) get(TIPO);
+ }
+
+ public void setTipo(Integer tipoValue )
+ {
+ this.set(TIPO, tipoValue );
+ }
+
+ public String getDescricao()
+ {
+ return (String) get(DESCRICAO);
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.set(DESCRICAO, descricaoValue );
+ }
+
+ public String getActivo()
+ {
+ return (String) get(ACTIVO);
+ }
+
+ public void setActivo(String activoValue )
+ {
+ this.set(ACTIVO, activoValue );
+ }
+
+ public Integer getOrdem()
+ {
+ return (Integer) get(ORDEM);
+ }
+
+ public void setOrdem(Integer ordemValue )
+ {
+ this.set(ORDEM, ordemValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return TiposUtilizadores.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Users.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Users.java
new file mode 100644
index 00000000..52b1e5a5
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Users.java
@@ -0,0 +1,44 @@
+/*
+* Users.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+
+public final class Users implements JDOInnerObject
+{
+
+ public Users()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ }
+
+ public Class getOuterClass()
+ {
+ return UsersDataAuto.class;
+ }
+
+ public UsersDataAuto getOuterClassInstance()
+ {
+ UsersDataAuto outerObj = new UsersDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Object getJDOPrimaryKey()
+ {
+ return null;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UsersData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UsersData.java
new file mode 100644
index 00000000..d95fd824
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UsersData.java
@@ -0,0 +1,18 @@
+/*
+* UsersDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+
+public final class UsersData extends com.evolute.siprp.server.db.data.siprp.UsersDataAuto
+{
+
+ public UsersData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UsersDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UsersDataAuto.java
new file mode 100644
index 00000000..bb8e7a32
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UsersDataAuto.java
@@ -0,0 +1,67 @@
+/*
+* UsersDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class UsersDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "users";
+
+
+ public static final String FIELD_NAMES[] = new String[]{
+ };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ };
+
+ private Map dataHash;
+
+ public UsersDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return Users.class;
+ }
+
+ public Object getJDOPrimaryKey()
+ {
+ return null;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Utilizadores.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Utilizadores.java
new file mode 100644
index 00000000..b253ed11
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/Utilizadores.java
@@ -0,0 +1,588 @@
+/*
+* Utilizadores.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+
+public final class Utilizadores implements JDOInnerObject
+{
+ private Integer id;
+ private String login;
+ private String password;
+ private String email;
+ private Integer empresa_id;
+ private Integer estabelecimento_id;
+ private String administrador;
+ private Integer medico_id;
+ private Integer tipo;
+ private String numero_cedula;
+ private String cap;
+ private String nome;
+ private Integer funcionario_hst_id;
+ private String activo;
+ private String responsavel_loja;
+ private String numero_mecanografico;
+ private String gestor_geral;
+ private String primeiro_login;
+ private String apagado;
+ private java.util.Date data_password;
+
+ public Utilizadores()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == UtilizadoresDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == UtilizadoresDataAuto.LOGIN )
+ {
+ return login;
+ }
+ else if( fieldName == UtilizadoresDataAuto.PASSWORD )
+ {
+ return password;
+ }
+ else if( fieldName == UtilizadoresDataAuto.EMAIL )
+ {
+ return email;
+ }
+ else if( fieldName == UtilizadoresDataAuto.EMPRESA_ID )
+ {
+ return empresa_id;
+ }
+ else if( fieldName == UtilizadoresDataAuto.ESTABELECIMENTO_ID )
+ {
+ return estabelecimento_id;
+ }
+ else if( fieldName == UtilizadoresDataAuto.ADMINISTRADOR )
+ {
+ return administrador;
+ }
+ else if( fieldName == UtilizadoresDataAuto.MEDICO_ID )
+ {
+ return medico_id;
+ }
+ else if( fieldName == UtilizadoresDataAuto.TIPO )
+ {
+ return tipo;
+ }
+ else if( fieldName == UtilizadoresDataAuto.NUMERO_CEDULA )
+ {
+ return numero_cedula;
+ }
+ else if( fieldName == UtilizadoresDataAuto.CAP )
+ {
+ return cap;
+ }
+ else if( fieldName == UtilizadoresDataAuto.NOME )
+ {
+ return nome;
+ }
+ else if( fieldName == UtilizadoresDataAuto.FUNCIONARIO_HST_ID )
+ {
+ return funcionario_hst_id;
+ }
+ else if( fieldName == UtilizadoresDataAuto.ACTIVO )
+ {
+ return activo;
+ }
+ else if( fieldName == UtilizadoresDataAuto.RESPONSAVEL_LOJA )
+ {
+ return responsavel_loja;
+ }
+ else if( fieldName == UtilizadoresDataAuto.NUMERO_MECANOGRAFICO )
+ {
+ return numero_mecanografico;
+ }
+ else if( fieldName == UtilizadoresDataAuto.GESTOR_GERAL )
+ {
+ return gestor_geral;
+ }
+ else if( fieldName == UtilizadoresDataAuto.PRIMEIRO_LOGIN )
+ {
+ return primeiro_login;
+ }
+ else if( fieldName == UtilizadoresDataAuto.APAGADO )
+ {
+ return apagado;
+ }
+ else if( fieldName == UtilizadoresDataAuto.DATA_PASSWORD )
+ {
+ return data_password;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.LOGIN ) )
+ {
+ return login;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.PASSWORD ) )
+ {
+ return password;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.EMAIL ) )
+ {
+ return email;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.EMPRESA_ID ) )
+ {
+ return empresa_id;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.ESTABELECIMENTO_ID ) )
+ {
+ return estabelecimento_id;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.ADMINISTRADOR ) )
+ {
+ return administrador;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.MEDICO_ID ) )
+ {
+ return medico_id;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.TIPO ) )
+ {
+ return tipo;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.NUMERO_CEDULA ) )
+ {
+ return numero_cedula;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.CAP ) )
+ {
+ return cap;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.NOME ) )
+ {
+ return nome;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.FUNCIONARIO_HST_ID ) )
+ {
+ return funcionario_hst_id;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.ACTIVO ) )
+ {
+ return activo;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.RESPONSAVEL_LOJA ) )
+ {
+ return responsavel_loja;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.NUMERO_MECANOGRAFICO ) )
+ {
+ return numero_mecanografico;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.GESTOR_GERAL ) )
+ {
+ return gestor_geral;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.PRIMEIRO_LOGIN ) )
+ {
+ return primeiro_login;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.APAGADO ) )
+ {
+ return apagado;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.DATA_PASSWORD ) )
+ {
+ return data_password;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == UtilizadoresDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == UtilizadoresDataAuto.LOGIN )
+ {
+ login = ( String ) value;
+ }
+ else if( fieldName == UtilizadoresDataAuto.PASSWORD )
+ {
+ password = ( String ) value;
+ }
+ else if( fieldName == UtilizadoresDataAuto.EMAIL )
+ {
+ email = ( String ) value;
+ }
+ else if( fieldName == UtilizadoresDataAuto.EMPRESA_ID )
+ {
+ empresa_id = ( Integer ) value;
+ }
+ else if( fieldName == UtilizadoresDataAuto.ESTABELECIMENTO_ID )
+ {
+ estabelecimento_id = ( Integer ) value;
+ }
+ else if( fieldName == UtilizadoresDataAuto.ADMINISTRADOR )
+ {
+ administrador = ( String ) value;
+ }
+ else if( fieldName == UtilizadoresDataAuto.MEDICO_ID )
+ {
+ medico_id = ( Integer ) value;
+ }
+ else if( fieldName == UtilizadoresDataAuto.TIPO )
+ {
+ tipo = ( Integer ) value;
+ }
+ else if( fieldName == UtilizadoresDataAuto.NUMERO_CEDULA )
+ {
+ numero_cedula = ( String ) value;
+ }
+ else if( fieldName == UtilizadoresDataAuto.CAP )
+ {
+ cap = ( String ) value;
+ }
+ else if( fieldName == UtilizadoresDataAuto.NOME )
+ {
+ nome = ( String ) value;
+ }
+ else if( fieldName == UtilizadoresDataAuto.FUNCIONARIO_HST_ID )
+ {
+ funcionario_hst_id = ( Integer ) value;
+ }
+ else if( fieldName == UtilizadoresDataAuto.ACTIVO )
+ {
+ activo = ( String ) value;
+ }
+ else if( fieldName == UtilizadoresDataAuto.RESPONSAVEL_LOJA )
+ {
+ responsavel_loja = ( String ) value;
+ }
+ else if( fieldName == UtilizadoresDataAuto.NUMERO_MECANOGRAFICO )
+ {
+ numero_mecanografico = ( String ) value;
+ }
+ else if( fieldName == UtilizadoresDataAuto.GESTOR_GERAL )
+ {
+ gestor_geral = ( String ) value;
+ }
+ else if( fieldName == UtilizadoresDataAuto.PRIMEIRO_LOGIN )
+ {
+ primeiro_login = ( String ) value;
+ }
+ else if( fieldName == UtilizadoresDataAuto.APAGADO )
+ {
+ apagado = ( String ) value;
+ }
+ else if( fieldName == UtilizadoresDataAuto.DATA_PASSWORD )
+ {
+ data_password = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.LOGIN ) )
+ {
+ login = ( String ) value;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.PASSWORD ) )
+ {
+ password = ( String ) value;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.EMAIL ) )
+ {
+ email = ( String ) value;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.EMPRESA_ID ) )
+ {
+ empresa_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.ESTABELECIMENTO_ID ) )
+ {
+ estabelecimento_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.ADMINISTRADOR ) )
+ {
+ administrador = ( String ) value;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.MEDICO_ID ) )
+ {
+ medico_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.TIPO ) )
+ {
+ tipo = ( Integer ) value;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.NUMERO_CEDULA ) )
+ {
+ numero_cedula = ( String ) value;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.CAP ) )
+ {
+ cap = ( String ) value;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.NOME ) )
+ {
+ nome = ( String ) value;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.FUNCIONARIO_HST_ID ) )
+ {
+ funcionario_hst_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.ACTIVO ) )
+ {
+ activo = ( String ) value;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.RESPONSAVEL_LOJA ) )
+ {
+ responsavel_loja = ( String ) value;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.NUMERO_MECANOGRAFICO ) )
+ {
+ numero_mecanografico = ( String ) value;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.GESTOR_GERAL ) )
+ {
+ gestor_geral = ( String ) value;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.PRIMEIRO_LOGIN ) )
+ {
+ primeiro_login = ( String ) value;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.APAGADO ) )
+ {
+ apagado = ( String ) value;
+ }
+ else if( fieldName.equals( UtilizadoresDataAuto.DATA_PASSWORD ) )
+ {
+ data_password = ( java.util.Date ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getLogin()
+ {
+ return login;
+ }
+
+ public void setLogin(String loginValue )
+ {
+ this.login = loginValue;
+ }
+
+ public String getPassword()
+ {
+ return password;
+ }
+
+ public void setPassword(String passwordValue )
+ {
+ this.password = passwordValue;
+ }
+
+ public String getEmail()
+ {
+ return email;
+ }
+
+ public void setEmail(String emailValue )
+ {
+ this.email = emailValue;
+ }
+
+ public Integer getEmpresa_id()
+ {
+ return empresa_id;
+ }
+
+ public void setEmpresa_id(Integer empresa_idValue )
+ {
+ this.empresa_id = empresa_idValue;
+ }
+
+ public Integer getEstabelecimento_id()
+ {
+ return estabelecimento_id;
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_idValue )
+ {
+ this.estabelecimento_id = estabelecimento_idValue;
+ }
+
+ public String getAdministrador()
+ {
+ return administrador;
+ }
+
+ public void setAdministrador(String administradorValue )
+ {
+ this.administrador = administradorValue;
+ }
+
+ public Integer getMedico_id()
+ {
+ return medico_id;
+ }
+
+ public void setMedico_id(Integer medico_idValue )
+ {
+ this.medico_id = medico_idValue;
+ }
+
+ public Integer getTipo()
+ {
+ return tipo;
+ }
+
+ public void setTipo(Integer tipoValue )
+ {
+ this.tipo = tipoValue;
+ }
+
+ public String getNumero_cedula()
+ {
+ return numero_cedula;
+ }
+
+ public void setNumero_cedula(String numero_cedulaValue )
+ {
+ this.numero_cedula = numero_cedulaValue;
+ }
+
+ public String getCap()
+ {
+ return cap;
+ }
+
+ public void setCap(String capValue )
+ {
+ this.cap = capValue;
+ }
+
+ public String getNome()
+ {
+ return nome;
+ }
+
+ public void setNome(String nomeValue )
+ {
+ this.nome = nomeValue;
+ }
+
+ public Integer getFuncionario_hst_id()
+ {
+ return funcionario_hst_id;
+ }
+
+ public void setFuncionario_hst_id(Integer funcionario_hst_idValue )
+ {
+ this.funcionario_hst_id = funcionario_hst_idValue;
+ }
+
+ public String getActivo()
+ {
+ return activo;
+ }
+
+ public void setActivo(String activoValue )
+ {
+ this.activo = activoValue;
+ }
+
+ public String getResponsavel_loja()
+ {
+ return responsavel_loja;
+ }
+
+ public void setResponsavel_loja(String responsavel_lojaValue )
+ {
+ this.responsavel_loja = responsavel_lojaValue;
+ }
+
+ public String getNumero_mecanografico()
+ {
+ return numero_mecanografico;
+ }
+
+ public void setNumero_mecanografico(String numero_mecanograficoValue )
+ {
+ this.numero_mecanografico = numero_mecanograficoValue;
+ }
+
+ public String getGestor_geral()
+ {
+ return gestor_geral;
+ }
+
+ public void setGestor_geral(String gestor_geralValue )
+ {
+ this.gestor_geral = gestor_geralValue;
+ }
+
+ public String getPrimeiro_login()
+ {
+ return primeiro_login;
+ }
+
+ public void setPrimeiro_login(String primeiro_loginValue )
+ {
+ this.primeiro_login = primeiro_loginValue;
+ }
+
+ public String getApagado()
+ {
+ return apagado;
+ }
+
+ public void setApagado(String apagadoValue )
+ {
+ this.apagado = apagadoValue;
+ }
+
+ public java.util.Date getData_password()
+ {
+ return data_password;
+ }
+
+ public void setData_password(java.util.Date data_passwordValue )
+ {
+ this.data_password = data_passwordValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return UtilizadoresDataAuto.class;
+ }
+
+ public UtilizadoresDataAuto getOuterClassInstance()
+ {
+ UtilizadoresDataAuto outerObj = new UtilizadoresDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UtilizadoresData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UtilizadoresData.java
new file mode 100644
index 00000000..4057941e
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UtilizadoresData.java
@@ -0,0 +1,18 @@
+/*
+* UtilizadoresDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+
+public final class UtilizadoresData extends com.evolute.siprp.server.db.data.siprp.UtilizadoresDataAuto
+{
+
+ public UtilizadoresData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UtilizadoresDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UtilizadoresDataAuto.java
new file mode 100644
index 00000000..5700401c
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/UtilizadoresDataAuto.java
@@ -0,0 +1,315 @@
+/*
+* UtilizadoresDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class UtilizadoresDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "utilizadores";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "utilizadores.id";
+ public static final String LOGIN = "login";
+ public static final String LOGIN_FULL = "utilizadores.login";
+ public static final String PASSWORD = "password";
+ public static final String PASSWORD_FULL = "utilizadores.password";
+ public static final String EMAIL = "email";
+ public static final String EMAIL_FULL = "utilizadores.email";
+ public static final String EMPRESA_ID = "empresa_id";
+ public static final String EMPRESA_ID_FULL = "utilizadores.empresa_id";
+ public static final String ESTABELECIMENTO_ID = "estabelecimento_id";
+ public static final String ESTABELECIMENTO_ID_FULL = "utilizadores.estabelecimento_id";
+ public static final String ADMINISTRADOR = "administrador";
+ public static final String ADMINISTRADOR_FULL = "utilizadores.administrador";
+ public static final String MEDICO_ID = "medico_id";
+ public static final String MEDICO_ID_FULL = "utilizadores.medico_id";
+ public static final String TIPO = "tipo";
+ public static final String TIPO_FULL = "utilizadores.tipo";
+ public static final String NUMERO_CEDULA = "numero_cedula";
+ public static final String NUMERO_CEDULA_FULL = "utilizadores.numero_cedula";
+ public static final String CAP = "cap";
+ public static final String CAP_FULL = "utilizadores.cap";
+ public static final String NOME = "nome";
+ public static final String NOME_FULL = "utilizadores.nome";
+ public static final String FUNCIONARIO_HST_ID = "funcionario_hst_id";
+ public static final String FUNCIONARIO_HST_ID_FULL = "utilizadores.funcionario_hst_id";
+ public static final String ACTIVO = "activo";
+ public static final String ACTIVO_FULL = "utilizadores.activo";
+ public static final String RESPONSAVEL_LOJA = "responsavel_loja";
+ public static final String RESPONSAVEL_LOJA_FULL = "utilizadores.responsavel_loja";
+ public static final String NUMERO_MECANOGRAFICO = "numero_mecanografico";
+ public static final String NUMERO_MECANOGRAFICO_FULL = "utilizadores.numero_mecanografico";
+ public static final String GESTOR_GERAL = "gestor_geral";
+ public static final String GESTOR_GERAL_FULL = "utilizadores.gestor_geral";
+ public static final String PRIMEIRO_LOGIN = "primeiro_login";
+ public static final String PRIMEIRO_LOGIN_FULL = "utilizadores.primeiro_login";
+ public static final String APAGADO = "apagado";
+ public static final String APAGADO_FULL = "utilizadores.apagado";
+ public static final String DATA_PASSWORD = "data_password";
+ public static final String DATA_PASSWORD_FULL = "utilizadores.data_password";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ LOGIN, PASSWORD, EMAIL, EMPRESA_ID, ESTABELECIMENTO_ID, ADMINISTRADOR, MEDICO_ID,
+ TIPO, NUMERO_CEDULA, CAP, NOME, FUNCIONARIO_HST_ID, ACTIVO, RESPONSAVEL_LOJA,
+ NUMERO_MECANOGRAFICO, GESTOR_GERAL, PRIMEIRO_LOGIN, APAGADO, DATA_PASSWORD, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, LOGIN, PASSWORD, EMAIL, EMPRESA_ID, ESTABELECIMENTO_ID, ADMINISTRADOR, MEDICO_ID,
+ TIPO, NUMERO_CEDULA, CAP, NOME, FUNCIONARIO_HST_ID, ACTIVO, RESPONSAVEL_LOJA,
+ NUMERO_MECANOGRAFICO, GESTOR_GERAL, PRIMEIRO_LOGIN, APAGADO, DATA_PASSWORD, };
+
+ private Map dataHash;
+
+ public UtilizadoresDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getLogin()
+ {
+ return (String) get(LOGIN);
+ }
+
+ public void setLogin(String loginValue )
+ {
+ this.set(LOGIN, loginValue );
+ }
+
+ public String getPassword()
+ {
+ return (String) get(PASSWORD);
+ }
+
+ public void setPassword(String passwordValue )
+ {
+ this.set(PASSWORD, passwordValue );
+ }
+
+ public String getEmail()
+ {
+ return (String) get(EMAIL);
+ }
+
+ public void setEmail(String emailValue )
+ {
+ this.set(EMAIL, emailValue );
+ }
+
+ public Integer getEmpresa_id()
+ {
+ return (Integer) get(EMPRESA_ID);
+ }
+
+ public void setEmpresa_id(Integer empresa_idValue )
+ {
+ this.set(EMPRESA_ID, empresa_idValue );
+ }
+
+ public Integer getEstabelecimento_id()
+ {
+ return (Integer) get(ESTABELECIMENTO_ID);
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_idValue )
+ {
+ this.set(ESTABELECIMENTO_ID, estabelecimento_idValue );
+ }
+
+ public String getAdministrador()
+ {
+ return (String) get(ADMINISTRADOR);
+ }
+
+ public void setAdministrador(String administradorValue )
+ {
+ this.set(ADMINISTRADOR, administradorValue );
+ }
+
+ public Integer getMedico_id()
+ {
+ return (Integer) get(MEDICO_ID);
+ }
+
+ public void setMedico_id(Integer medico_idValue )
+ {
+ this.set(MEDICO_ID, medico_idValue );
+ }
+
+ public Integer getTipo()
+ {
+ return (Integer) get(TIPO);
+ }
+
+ public void setTipo(Integer tipoValue )
+ {
+ this.set(TIPO, tipoValue );
+ }
+
+ public String getNumero_cedula()
+ {
+ return (String) get(NUMERO_CEDULA);
+ }
+
+ public void setNumero_cedula(String numero_cedulaValue )
+ {
+ this.set(NUMERO_CEDULA, numero_cedulaValue );
+ }
+
+ public String getCap()
+ {
+ return (String) get(CAP);
+ }
+
+ public void setCap(String capValue )
+ {
+ this.set(CAP, capValue );
+ }
+
+ public String getNome()
+ {
+ return (String) get(NOME);
+ }
+
+ public void setNome(String nomeValue )
+ {
+ this.set(NOME, nomeValue );
+ }
+
+ public Integer getFuncionario_hst_id()
+ {
+ return (Integer) get(FUNCIONARIO_HST_ID);
+ }
+
+ public void setFuncionario_hst_id(Integer funcionario_hst_idValue )
+ {
+ this.set(FUNCIONARIO_HST_ID, funcionario_hst_idValue );
+ }
+
+ public String getActivo()
+ {
+ return (String) get(ACTIVO);
+ }
+
+ public void setActivo(String activoValue )
+ {
+ this.set(ACTIVO, activoValue );
+ }
+
+ public String getResponsavel_loja()
+ {
+ return (String) get(RESPONSAVEL_LOJA);
+ }
+
+ public void setResponsavel_loja(String responsavel_lojaValue )
+ {
+ this.set(RESPONSAVEL_LOJA, responsavel_lojaValue );
+ }
+
+ public String getNumero_mecanografico()
+ {
+ return (String) get(NUMERO_MECANOGRAFICO);
+ }
+
+ public void setNumero_mecanografico(String numero_mecanograficoValue )
+ {
+ this.set(NUMERO_MECANOGRAFICO, numero_mecanograficoValue );
+ }
+
+ public String getGestor_geral()
+ {
+ return (String) get(GESTOR_GERAL);
+ }
+
+ public void setGestor_geral(String gestor_geralValue )
+ {
+ this.set(GESTOR_GERAL, gestor_geralValue );
+ }
+
+ public String getPrimeiro_login()
+ {
+ return (String) get(PRIMEIRO_LOGIN);
+ }
+
+ public void setPrimeiro_login(String primeiro_loginValue )
+ {
+ this.set(PRIMEIRO_LOGIN, primeiro_loginValue );
+ }
+
+ public String getApagado()
+ {
+ return (String) get(APAGADO);
+ }
+
+ public void setApagado(String apagadoValue )
+ {
+ this.set(APAGADO, apagadoValue );
+ }
+
+ public java.util.Date getData_password()
+ {
+ return (java.util.Date) get(DATA_PASSWORD);
+ }
+
+ public void setData_password(java.util.Date data_passwordValue )
+ {
+ this.set(DATA_PASSWORD, data_passwordValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return Utilizadores.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/package.jdo b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/package.jdo
new file mode 100644
index 00000000..b3e7a108
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp/package.jdo
@@ -0,0 +1,1001 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Actualizacao.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Actualizacao.java
new file mode 100644
index 00000000..c2cf9d4c
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Actualizacao.java
@@ -0,0 +1,102 @@
+/*
+* Actualizacao.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class Actualizacao implements JDOInnerObject
+{
+ private java.sql.Timestamp hora;
+ private Integer id;
+
+ public Actualizacao()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == ActualizacaoDataAuto.HORA )
+ {
+ return hora;
+ }
+ else if( fieldName == ActualizacaoDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName.equals( ActualizacaoDataAuto.HORA ) )
+ {
+ return hora;
+ }
+ else if( fieldName.equals( ActualizacaoDataAuto.ID ) )
+ {
+ return id;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == ActualizacaoDataAuto.HORA )
+ {
+ hora = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName == ActualizacaoDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( ActualizacaoDataAuto.HORA ) )
+ {
+ hora = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName.equals( ActualizacaoDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ }
+
+ public java.sql.Timestamp getHora()
+ {
+ return hora;
+ }
+
+ public void setHora(java.sql.Timestamp horaValue )
+ {
+ this.hora = horaValue;
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return ActualizacaoDataAuto.class;
+ }
+
+ public ActualizacaoDataAuto getOuterClassInstance()
+ {
+ ActualizacaoDataAuto outerObj = new ActualizacaoDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ActualizacaoData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ActualizacaoData.java
new file mode 100644
index 00000000..b4609619
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ActualizacaoData.java
@@ -0,0 +1,18 @@
+/*
+* ActualizacaoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class ActualizacaoData extends com.evolute.siprp.server.db.data.siprp_local3.ActualizacaoDataAuto
+{
+
+ public ActualizacaoData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ActualizacaoDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ActualizacaoDataAuto.java
new file mode 100644
index 00000000..476395c7
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ActualizacaoDataAuto.java
@@ -0,0 +1,95 @@
+/*
+* ActualizacaoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class ActualizacaoDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "actualizacao";
+
+ public static final String HORA = "hora";
+ public static final String HORA_FULL = "actualizacao.hora";
+ public static final String ID = "id";
+ public static final String ID_FULL = "actualizacao.id";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ HORA, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ HORA, ID, };
+
+ private Map dataHash;
+
+ public ActualizacaoDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public java.sql.Timestamp getHora()
+ {
+ return (java.sql.Timestamp) get(HORA);
+ }
+
+ public void setHora(java.sql.Timestamp horaValue )
+ {
+ this.set(HORA, horaValue );
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return Actualizacao.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Avisos.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Avisos.java
new file mode 100644
index 00000000..70a6c4af
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Avisos.java
@@ -0,0 +1,291 @@
+/*
+* Avisos.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class Avisos implements JDOInnerObject
+{
+ private Integer id;
+ private Integer tipo;
+ private Integer empresa_id;
+ private Integer estabelecimento_id;
+ private Integer trabalhador_id;
+ private Integer evento_id;
+ private java.util.Date data_aviso;
+ private java.util.Date data_evento;
+ private String descricao;
+
+ public Avisos()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == AvisosDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == AvisosDataAuto.TIPO )
+ {
+ return tipo;
+ }
+ else if( fieldName == AvisosDataAuto.EMPRESA_ID )
+ {
+ return empresa_id;
+ }
+ else if( fieldName == AvisosDataAuto.ESTABELECIMENTO_ID )
+ {
+ return estabelecimento_id;
+ }
+ else if( fieldName == AvisosDataAuto.TRABALHADOR_ID )
+ {
+ return trabalhador_id;
+ }
+ else if( fieldName == AvisosDataAuto.EVENTO_ID )
+ {
+ return evento_id;
+ }
+ else if( fieldName == AvisosDataAuto.DATA_AVISO )
+ {
+ return data_aviso;
+ }
+ else if( fieldName == AvisosDataAuto.DATA_EVENTO )
+ {
+ return data_evento;
+ }
+ else if( fieldName == AvisosDataAuto.DESCRICAO )
+ {
+ return descricao;
+ }
+ else if( fieldName.equals( AvisosDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( AvisosDataAuto.TIPO ) )
+ {
+ return tipo;
+ }
+ else if( fieldName.equals( AvisosDataAuto.EMPRESA_ID ) )
+ {
+ return empresa_id;
+ }
+ else if( fieldName.equals( AvisosDataAuto.ESTABELECIMENTO_ID ) )
+ {
+ return estabelecimento_id;
+ }
+ else if( fieldName.equals( AvisosDataAuto.TRABALHADOR_ID ) )
+ {
+ return trabalhador_id;
+ }
+ else if( fieldName.equals( AvisosDataAuto.EVENTO_ID ) )
+ {
+ return evento_id;
+ }
+ else if( fieldName.equals( AvisosDataAuto.DATA_AVISO ) )
+ {
+ return data_aviso;
+ }
+ else if( fieldName.equals( AvisosDataAuto.DATA_EVENTO ) )
+ {
+ return data_evento;
+ }
+ else if( fieldName.equals( AvisosDataAuto.DESCRICAO ) )
+ {
+ return descricao;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == AvisosDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == AvisosDataAuto.TIPO )
+ {
+ tipo = ( Integer ) value;
+ }
+ else if( fieldName == AvisosDataAuto.EMPRESA_ID )
+ {
+ empresa_id = ( Integer ) value;
+ }
+ else if( fieldName == AvisosDataAuto.ESTABELECIMENTO_ID )
+ {
+ estabelecimento_id = ( Integer ) value;
+ }
+ else if( fieldName == AvisosDataAuto.TRABALHADOR_ID )
+ {
+ trabalhador_id = ( Integer ) value;
+ }
+ else if( fieldName == AvisosDataAuto.EVENTO_ID )
+ {
+ evento_id = ( Integer ) value;
+ }
+ else if( fieldName == AvisosDataAuto.DATA_AVISO )
+ {
+ data_aviso = ( java.util.Date ) value;
+ }
+ else if( fieldName == AvisosDataAuto.DATA_EVENTO )
+ {
+ data_evento = ( java.util.Date ) value;
+ }
+ else if( fieldName == AvisosDataAuto.DESCRICAO )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName.equals( AvisosDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( AvisosDataAuto.TIPO ) )
+ {
+ tipo = ( Integer ) value;
+ }
+ else if( fieldName.equals( AvisosDataAuto.EMPRESA_ID ) )
+ {
+ empresa_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( AvisosDataAuto.ESTABELECIMENTO_ID ) )
+ {
+ estabelecimento_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( AvisosDataAuto.TRABALHADOR_ID ) )
+ {
+ trabalhador_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( AvisosDataAuto.EVENTO_ID ) )
+ {
+ evento_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( AvisosDataAuto.DATA_AVISO ) )
+ {
+ data_aviso = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( AvisosDataAuto.DATA_EVENTO ) )
+ {
+ data_evento = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( AvisosDataAuto.DESCRICAO ) )
+ {
+ descricao = ( String ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public Integer getTipo()
+ {
+ return tipo;
+ }
+
+ public void setTipo(Integer tipoValue )
+ {
+ this.tipo = tipoValue;
+ }
+
+ public Integer getEmpresa_id()
+ {
+ return empresa_id;
+ }
+
+ public void setEmpresa_id(Integer empresa_idValue )
+ {
+ this.empresa_id = empresa_idValue;
+ }
+
+ public Integer getEstabelecimento_id()
+ {
+ return estabelecimento_id;
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_idValue )
+ {
+ this.estabelecimento_id = estabelecimento_idValue;
+ }
+
+ public Integer getTrabalhador_id()
+ {
+ return trabalhador_id;
+ }
+
+ public void setTrabalhador_id(Integer trabalhador_idValue )
+ {
+ this.trabalhador_id = trabalhador_idValue;
+ }
+
+ public Integer getEvento_id()
+ {
+ return evento_id;
+ }
+
+ public void setEvento_id(Integer evento_idValue )
+ {
+ this.evento_id = evento_idValue;
+ }
+
+ public java.util.Date getData_aviso()
+ {
+ return data_aviso;
+ }
+
+ public void setData_aviso(java.util.Date data_avisoValue )
+ {
+ this.data_aviso = data_avisoValue;
+ }
+
+ public java.util.Date getData_evento()
+ {
+ return data_evento;
+ }
+
+ public void setData_evento(java.util.Date data_eventoValue )
+ {
+ this.data_evento = data_eventoValue;
+ }
+
+ public String getDescricao()
+ {
+ return descricao;
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.descricao = descricaoValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return AvisosDataAuto.class;
+ }
+
+ public AvisosDataAuto getOuterClassInstance()
+ {
+ AvisosDataAuto outerObj = new AvisosDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/AvisosData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/AvisosData.java
new file mode 100644
index 00000000..b860d562
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/AvisosData.java
@@ -0,0 +1,18 @@
+/*
+* AvisosDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class AvisosData extends com.evolute.siprp.server.db.data.siprp_local3.AvisosDataAuto
+{
+
+ public AvisosData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/AvisosDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/AvisosDataAuto.java
new file mode 100644
index 00000000..bddf66ac
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/AvisosDataAuto.java
@@ -0,0 +1,287 @@
+/*
+* AvisosDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class AvisosDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "avisos";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "avisos.id";
+ public static final String TIPO = "tipo";
+ public static final String TIPO_FULL = "avisos.tipo";
+ public static final String EMPRESA_ID = "empresa_id";
+ public static final String EMPRESA_ID_FULL = "avisos.empresa_id";
+ public static final String TO_EMPRESA_ID = "to empresa_id";
+ public static final String ESTABELECIMENTO_ID = "estabelecimento_id";
+ public static final String ESTABELECIMENTO_ID_FULL = "avisos.estabelecimento_id";
+ public static final String TO_ESTABELECIMENTO_ID = "to estabelecimento_id";
+ public static final String TRABALHADOR_ID = "trabalhador_id";
+ public static final String TRABALHADOR_ID_FULL = "avisos.trabalhador_id";
+ public static final String EVENTO_ID = "evento_id";
+ public static final String EVENTO_ID_FULL = "avisos.evento_id";
+ public static final String DATA_AVISO = "data_aviso";
+ public static final String DATA_AVISO_FULL = "avisos.data_aviso";
+ public static final String DATA_EVENTO = "data_evento";
+ public static final String DATA_EVENTO_FULL = "avisos.data_evento";
+ public static final String DESCRICAO = "descricao";
+ public static final String DESCRICAO_FULL = "avisos.descricao";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ TIPO, EMPRESA_ID, TO_EMPRESA_ID, ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID,
+ TRABALHADOR_ID, EVENTO_ID, DATA_AVISO, DATA_EVENTO, DESCRICAO, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, TIPO, EMPRESA_ID, ESTABELECIMENTO_ID, TRABALHADOR_ID, EVENTO_ID, DATA_AVISO,
+ DATA_EVENTO, DESCRICAO, };
+
+ private Map dataHash;
+
+ public AvisosDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public Integer getTipo()
+ {
+ return (Integer) get(TIPO);
+ }
+
+ public void setTipo(Integer tipoValue )
+ {
+ this.set(TIPO, tipoValue );
+ }
+
+ public Integer getEmpresa_id()
+ {
+ return (Integer) dataHash.get(EMPRESA_ID);
+ }
+
+ public void setEmpresa_id(Integer empresa_idValue )
+ {
+ dataHash.put(TO_EMPRESA_ID, null);
+ dataHash.put(EMPRESA_ID, empresa_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.EmpresasData toEmpresa_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_EMPRESA_ID) == null && getEmpresa_id() != null )
+ {
+ dataHash.put(TO_EMPRESA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.class, new Object[]{ getEmpresa_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) dataHash.get(TO_EMPRESA_ID);
+ }
+
+ public void setToEmpresa_id(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData empresa_idObject )
+ {
+ if( empresa_idObject == null )
+ {
+ dataHash.put(EMPRESA_ID, null);
+ }
+ else
+ {
+ dataHash.put(EMPRESA_ID, empresa_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID ));
+ }
+ dataHash.put(TO_EMPRESA_ID, empresa_idObject);
+ }
+
+ public Integer getEstabelecimento_id()
+ {
+ return (Integer) dataHash.get(ESTABELECIMENTO_ID);
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_idValue )
+ {
+ dataHash.put(TO_ESTABELECIMENTO_ID, null);
+ dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData toEstabelecimento_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_ESTABELECIMENTO_ID) == null && getEstabelecimento_id() != null )
+ {
+ dataHash.put(TO_ESTABELECIMENTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.class, new Object[]{ getEstabelecimento_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) dataHash.get(TO_ESTABELECIMENTO_ID);
+ }
+
+ public void setToEstabelecimento_id(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData estabelecimento_idObject )
+ {
+ if( estabelecimento_idObject == null )
+ {
+ dataHash.put(ESTABELECIMENTO_ID, null);
+ }
+ else
+ {
+ dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID ));
+ }
+ dataHash.put(TO_ESTABELECIMENTO_ID, estabelecimento_idObject);
+ }
+
+ public Integer getTrabalhador_id()
+ {
+ return (Integer) get(TRABALHADOR_ID);
+ }
+
+ public void setTrabalhador_id(Integer trabalhador_idValue )
+ {
+ this.set(TRABALHADOR_ID, trabalhador_idValue );
+ }
+
+ public Integer getEvento_id()
+ {
+ return (Integer) get(EVENTO_ID);
+ }
+
+ public void setEvento_id(Integer evento_idValue )
+ {
+ this.set(EVENTO_ID, evento_idValue );
+ }
+
+ public java.util.Date getData_aviso()
+ {
+ return (java.util.Date) get(DATA_AVISO);
+ }
+
+ public void setData_aviso(java.util.Date data_avisoValue )
+ {
+ this.set(DATA_AVISO, data_avisoValue );
+ }
+
+ public java.util.Date getData_evento()
+ {
+ return (java.util.Date) get(DATA_EVENTO);
+ }
+
+ public void setData_evento(java.util.Date data_eventoValue )
+ {
+ this.set(DATA_EVENTO, data_eventoValue );
+ }
+
+ public String getDescricao()
+ {
+ return (String) get(DESCRICAO);
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.set(DESCRICAO, descricaoValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ value = getEstabelecimento_id();
+ }
+ else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ value = toEstabelecimento_id();
+ }
+ else if( TO_EMPRESA_ID.equals( fieldName ) )
+ {
+ value = toEmpresa_id();
+ }
+ else if( EMPRESA_ID.equals( fieldName ) )
+ {
+ value = getEmpresa_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ setEstabelecimento_id( (Integer) value );
+ }
+ else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ setToEstabelecimento_id( (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) value );
+ }
+ else if( TO_EMPRESA_ID.equals( fieldName ) )
+ {
+ setToEmpresa_id( (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) value );
+ }
+ else if( EMPRESA_ID.equals( fieldName ) )
+ {
+ setEmpresa_id( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_EMPRESA_ID) != null )
+ {
+ toEmpresa_id().save();
+ dataHash.put(EMPRESA_ID, toEmpresa_id().get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID ));
+ }
+
+ if( dataHash.get(TO_ESTABELECIMENTO_ID) != null )
+ {
+ toEstabelecimento_id().save();
+ dataHash.put(ESTABELECIMENTO_ID, toEstabelecimento_id().get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return Avisos.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Contactos.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Contactos.java
new file mode 100644
index 00000000..1b5191ba
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Contactos.java
@@ -0,0 +1,237 @@
+/*
+* Contactos.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class Contactos implements JDOInnerObject
+{
+ private Integer id;
+ private String nome;
+ private String telefone;
+ private String telemovel;
+ private String fax;
+ private String email;
+ private String cargo;
+
+ public Contactos()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == ContactosDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == ContactosDataAuto.NOME )
+ {
+ return nome;
+ }
+ else if( fieldName == ContactosDataAuto.TELEFONE )
+ {
+ return telefone;
+ }
+ else if( fieldName == ContactosDataAuto.TELEMOVEL )
+ {
+ return telemovel;
+ }
+ else if( fieldName == ContactosDataAuto.FAX )
+ {
+ return fax;
+ }
+ else if( fieldName == ContactosDataAuto.EMAIL )
+ {
+ return email;
+ }
+ else if( fieldName == ContactosDataAuto.CARGO )
+ {
+ return cargo;
+ }
+ else if( fieldName.equals( ContactosDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( ContactosDataAuto.NOME ) )
+ {
+ return nome;
+ }
+ else if( fieldName.equals( ContactosDataAuto.TELEFONE ) )
+ {
+ return telefone;
+ }
+ else if( fieldName.equals( ContactosDataAuto.TELEMOVEL ) )
+ {
+ return telemovel;
+ }
+ else if( fieldName.equals( ContactosDataAuto.FAX ) )
+ {
+ return fax;
+ }
+ else if( fieldName.equals( ContactosDataAuto.EMAIL ) )
+ {
+ return email;
+ }
+ else if( fieldName.equals( ContactosDataAuto.CARGO ) )
+ {
+ return cargo;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == ContactosDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == ContactosDataAuto.NOME )
+ {
+ nome = ( String ) value;
+ }
+ else if( fieldName == ContactosDataAuto.TELEFONE )
+ {
+ telefone = ( String ) value;
+ }
+ else if( fieldName == ContactosDataAuto.TELEMOVEL )
+ {
+ telemovel = ( String ) value;
+ }
+ else if( fieldName == ContactosDataAuto.FAX )
+ {
+ fax = ( String ) value;
+ }
+ else if( fieldName == ContactosDataAuto.EMAIL )
+ {
+ email = ( String ) value;
+ }
+ else if( fieldName == ContactosDataAuto.CARGO )
+ {
+ cargo = ( String ) value;
+ }
+ else if( fieldName.equals( ContactosDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( ContactosDataAuto.NOME ) )
+ {
+ nome = ( String ) value;
+ }
+ else if( fieldName.equals( ContactosDataAuto.TELEFONE ) )
+ {
+ telefone = ( String ) value;
+ }
+ else if( fieldName.equals( ContactosDataAuto.TELEMOVEL ) )
+ {
+ telemovel = ( String ) value;
+ }
+ else if( fieldName.equals( ContactosDataAuto.FAX ) )
+ {
+ fax = ( String ) value;
+ }
+ else if( fieldName.equals( ContactosDataAuto.EMAIL ) )
+ {
+ email = ( String ) value;
+ }
+ else if( fieldName.equals( ContactosDataAuto.CARGO ) )
+ {
+ cargo = ( String ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getNome()
+ {
+ return nome;
+ }
+
+ public void setNome(String nomeValue )
+ {
+ this.nome = nomeValue;
+ }
+
+ public String getTelefone()
+ {
+ return telefone;
+ }
+
+ public void setTelefone(String telefoneValue )
+ {
+ this.telefone = telefoneValue;
+ }
+
+ public String getTelemovel()
+ {
+ return telemovel;
+ }
+
+ public void setTelemovel(String telemovelValue )
+ {
+ this.telemovel = telemovelValue;
+ }
+
+ public String getFax()
+ {
+ return fax;
+ }
+
+ public void setFax(String faxValue )
+ {
+ this.fax = faxValue;
+ }
+
+ public String getEmail()
+ {
+ return email;
+ }
+
+ public void setEmail(String emailValue )
+ {
+ this.email = emailValue;
+ }
+
+ public String getCargo()
+ {
+ return cargo;
+ }
+
+ public void setCargo(String cargoValue )
+ {
+ this.cargo = cargoValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return ContactosDataAuto.class;
+ }
+
+ public ContactosDataAuto getOuterClassInstance()
+ {
+ ContactosDataAuto outerObj = new ContactosDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ContactosData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ContactosData.java
new file mode 100644
index 00000000..85378c6a
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ContactosData.java
@@ -0,0 +1,18 @@
+/*
+* ContactosDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class ContactosData extends com.evolute.siprp.server.db.data.siprp_local3.ContactosDataAuto
+{
+
+ public ContactosData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ContactosDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ContactosDataAuto.java
new file mode 100644
index 00000000..c452497f
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ContactosDataAuto.java
@@ -0,0 +1,155 @@
+/*
+* ContactosDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class ContactosDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "contactos";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "contactos.id";
+ public static final String NOME = "nome";
+ public static final String NOME_FULL = "contactos.nome";
+ public static final String TELEFONE = "telefone";
+ public static final String TELEFONE_FULL = "contactos.telefone";
+ public static final String TELEMOVEL = "telemovel";
+ public static final String TELEMOVEL_FULL = "contactos.telemovel";
+ public static final String FAX = "fax";
+ public static final String FAX_FULL = "contactos.fax";
+ public static final String EMAIL = "email";
+ public static final String EMAIL_FULL = "contactos.email";
+ public static final String CARGO = "cargo";
+ public static final String CARGO_FULL = "contactos.cargo";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ NOME, TELEFONE, TELEMOVEL, FAX, EMAIL, CARGO, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, NOME, TELEFONE, TELEMOVEL, FAX, EMAIL, CARGO, };
+
+ private Map dataHash;
+
+ public ContactosDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getNome()
+ {
+ return (String) get(NOME);
+ }
+
+ public void setNome(String nomeValue )
+ {
+ this.set(NOME, nomeValue );
+ }
+
+ public String getTelefone()
+ {
+ return (String) get(TELEFONE);
+ }
+
+ public void setTelefone(String telefoneValue )
+ {
+ this.set(TELEFONE, telefoneValue );
+ }
+
+ public String getTelemovel()
+ {
+ return (String) get(TELEMOVEL);
+ }
+
+ public void setTelemovel(String telemovelValue )
+ {
+ this.set(TELEMOVEL, telemovelValue );
+ }
+
+ public String getFax()
+ {
+ return (String) get(FAX);
+ }
+
+ public void setFax(String faxValue )
+ {
+ this.set(FAX, faxValue );
+ }
+
+ public String getEmail()
+ {
+ return (String) get(EMAIL);
+ }
+
+ public void setEmail(String emailValue )
+ {
+ this.set(EMAIL, emailValue );
+ }
+
+ public String getCargo()
+ {
+ return (String) get(CARGO);
+ }
+
+ public void setCargo(String cargoValue )
+ {
+ this.set(CARGO, cargoValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return Contactos.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EcdOficial.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EcdOficial.java
new file mode 100644
index 00000000..3405cbd4
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EcdOficial.java
@@ -0,0 +1,183 @@
+/*
+* EcdOficial.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class EcdOficial implements JDOInnerObject
+{
+ private Integer id;
+ private String descricao;
+ private String descricao_plain;
+ private Integer ordem;
+ private String activo;
+
+ public EcdOficial()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == EcdOficialDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == EcdOficialDataAuto.DESCRICAO )
+ {
+ return descricao;
+ }
+ else if( fieldName == EcdOficialDataAuto.DESCRICAO_PLAIN )
+ {
+ return descricao_plain;
+ }
+ else if( fieldName == EcdOficialDataAuto.ORDEM )
+ {
+ return ordem;
+ }
+ else if( fieldName == EcdOficialDataAuto.ACTIVO )
+ {
+ return activo;
+ }
+ else if( fieldName.equals( EcdOficialDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( EcdOficialDataAuto.DESCRICAO ) )
+ {
+ return descricao;
+ }
+ else if( fieldName.equals( EcdOficialDataAuto.DESCRICAO_PLAIN ) )
+ {
+ return descricao_plain;
+ }
+ else if( fieldName.equals( EcdOficialDataAuto.ORDEM ) )
+ {
+ return ordem;
+ }
+ else if( fieldName.equals( EcdOficialDataAuto.ACTIVO ) )
+ {
+ return activo;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == EcdOficialDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == EcdOficialDataAuto.DESCRICAO )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName == EcdOficialDataAuto.DESCRICAO_PLAIN )
+ {
+ descricao_plain = ( String ) value;
+ }
+ else if( fieldName == EcdOficialDataAuto.ORDEM )
+ {
+ ordem = ( Integer ) value;
+ }
+ else if( fieldName == EcdOficialDataAuto.ACTIVO )
+ {
+ activo = ( String ) value;
+ }
+ else if( fieldName.equals( EcdOficialDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( EcdOficialDataAuto.DESCRICAO ) )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName.equals( EcdOficialDataAuto.DESCRICAO_PLAIN ) )
+ {
+ descricao_plain = ( String ) value;
+ }
+ else if( fieldName.equals( EcdOficialDataAuto.ORDEM ) )
+ {
+ ordem = ( Integer ) value;
+ }
+ else if( fieldName.equals( EcdOficialDataAuto.ACTIVO ) )
+ {
+ activo = ( String ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getDescricao()
+ {
+ return descricao;
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.descricao = descricaoValue;
+ }
+
+ public String getDescricao_plain()
+ {
+ return descricao_plain;
+ }
+
+ public void setDescricao_plain(String descricao_plainValue )
+ {
+ this.descricao_plain = descricao_plainValue;
+ }
+
+ public Integer getOrdem()
+ {
+ return ordem;
+ }
+
+ public void setOrdem(Integer ordemValue )
+ {
+ this.ordem = ordemValue;
+ }
+
+ public String getActivo()
+ {
+ return activo;
+ }
+
+ public void setActivo(String activoValue )
+ {
+ this.activo = activoValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return EcdOficialDataAuto.class;
+ }
+
+ public EcdOficialDataAuto getOuterClassInstance()
+ {
+ EcdOficialDataAuto outerObj = new EcdOficialDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EcdOficialData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EcdOficialData.java
new file mode 100644
index 00000000..79d44702
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EcdOficialData.java
@@ -0,0 +1,18 @@
+/*
+* EcdOficialDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class EcdOficialData extends com.evolute.siprp.server.db.data.siprp_local3.EcdOficialDataAuto
+{
+
+ public EcdOficialData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EcdOficialDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EcdOficialDataAuto.java
new file mode 100644
index 00000000..b66c1d0f
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EcdOficialDataAuto.java
@@ -0,0 +1,131 @@
+/*
+* EcdOficialDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class EcdOficialDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "ecd_oficial";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "ecd_oficial.id";
+ public static final String DESCRICAO = "descricao";
+ public static final String DESCRICAO_FULL = "ecd_oficial.descricao";
+ public static final String DESCRICAO_PLAIN = "descricao_plain";
+ public static final String DESCRICAO_PLAIN_FULL = "ecd_oficial.descricao_plain";
+ public static final String ORDEM = "ordem";
+ public static final String ORDEM_FULL = "ecd_oficial.ordem";
+ public static final String ACTIVO = "activo";
+ public static final String ACTIVO_FULL = "ecd_oficial.activo";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ DESCRICAO, DESCRICAO_PLAIN, ORDEM, ACTIVO, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, DESCRICAO, DESCRICAO_PLAIN, ORDEM, ACTIVO, };
+
+ private Map dataHash;
+
+ public EcdOficialDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getDescricao()
+ {
+ return (String) get(DESCRICAO);
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.set(DESCRICAO, descricaoValue );
+ }
+
+ public String getDescricao_plain()
+ {
+ return (String) get(DESCRICAO_PLAIN);
+ }
+
+ public void setDescricao_plain(String descricao_plainValue )
+ {
+ this.set(DESCRICAO_PLAIN, descricao_plainValue );
+ }
+
+ public Integer getOrdem()
+ {
+ return (Integer) get(ORDEM);
+ }
+
+ public void setOrdem(Integer ordemValue )
+ {
+ this.set(ORDEM, ordemValue );
+ }
+
+ public String getActivo()
+ {
+ return (String) get(ACTIVO);
+ }
+
+ public void setActivo(String activoValue )
+ {
+ this.set(ACTIVO, activoValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return EcdOficial.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmailPlanoDeActuacao.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmailPlanoDeActuacao.java
new file mode 100644
index 00000000..ef5cfc70
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmailPlanoDeActuacao.java
@@ -0,0 +1,129 @@
+/*
+* EmailPlanoDeActuacao.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class EmailPlanoDeActuacao implements JDOInnerObject
+{
+ private Integer id;
+ private String description;
+ private Integer estabelecimento_id;
+
+ public EmailPlanoDeActuacao()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == EmailPlanoDeActuacaoDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == EmailPlanoDeActuacaoDataAuto.DESCRIPTION )
+ {
+ return description;
+ }
+ else if( fieldName == EmailPlanoDeActuacaoDataAuto.ESTABELECIMENTO_ID )
+ {
+ return estabelecimento_id;
+ }
+ else if( fieldName.equals( EmailPlanoDeActuacaoDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( EmailPlanoDeActuacaoDataAuto.DESCRIPTION ) )
+ {
+ return description;
+ }
+ else if( fieldName.equals( EmailPlanoDeActuacaoDataAuto.ESTABELECIMENTO_ID ) )
+ {
+ return estabelecimento_id;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == EmailPlanoDeActuacaoDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == EmailPlanoDeActuacaoDataAuto.DESCRIPTION )
+ {
+ description = ( String ) value;
+ }
+ else if( fieldName == EmailPlanoDeActuacaoDataAuto.ESTABELECIMENTO_ID )
+ {
+ estabelecimento_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( EmailPlanoDeActuacaoDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( EmailPlanoDeActuacaoDataAuto.DESCRIPTION ) )
+ {
+ description = ( String ) value;
+ }
+ else if( fieldName.equals( EmailPlanoDeActuacaoDataAuto.ESTABELECIMENTO_ID ) )
+ {
+ estabelecimento_id = ( Integer ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String descriptionValue )
+ {
+ this.description = descriptionValue;
+ }
+
+ public Integer getEstabelecimento_id()
+ {
+ return estabelecimento_id;
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_idValue )
+ {
+ this.estabelecimento_id = estabelecimento_idValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return EmailPlanoDeActuacaoDataAuto.class;
+ }
+
+ public EmailPlanoDeActuacaoDataAuto getOuterClassInstance()
+ {
+ EmailPlanoDeActuacaoDataAuto outerObj = new EmailPlanoDeActuacaoDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmailPlanoDeActuacaoData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmailPlanoDeActuacaoData.java
new file mode 100644
index 00000000..c9124dff
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmailPlanoDeActuacaoData.java
@@ -0,0 +1,18 @@
+/*
+* EmailPlanoDeActuacaoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class EmailPlanoDeActuacaoData extends com.evolute.siprp.server.db.data.siprp_local3.EmailPlanoDeActuacaoDataAuto
+{
+
+ public EmailPlanoDeActuacaoData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmailPlanoDeActuacaoDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmailPlanoDeActuacaoDataAuto.java
new file mode 100644
index 00000000..420b63a9
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmailPlanoDeActuacaoDataAuto.java
@@ -0,0 +1,166 @@
+/*
+* EmailPlanoDeActuacaoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class EmailPlanoDeActuacaoDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "email_plano_de_actuacao";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "email_plano_de_actuacao.id";
+ public static final String DESCRIPTION = "description";
+ public static final String DESCRIPTION_FULL = "email_plano_de_actuacao.description";
+ public static final String ESTABELECIMENTO_ID = "estabelecimento_id";
+ public static final String ESTABELECIMENTO_ID_FULL = "email_plano_de_actuacao.estabelecimento_id";
+ public static final String TO_ESTABELECIMENTO_ID = "to estabelecimento_id";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ DESCRIPTION, ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, DESCRIPTION, ESTABELECIMENTO_ID, };
+
+ private Map dataHash;
+
+ public EmailPlanoDeActuacaoDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getDescription()
+ {
+ return (String) get(DESCRIPTION);
+ }
+
+ public void setDescription(String descriptionValue )
+ {
+ this.set(DESCRIPTION, descriptionValue );
+ }
+
+ public Integer getEstabelecimento_id()
+ {
+ return (Integer) dataHash.get(ESTABELECIMENTO_ID);
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_idValue )
+ {
+ dataHash.put(TO_ESTABELECIMENTO_ID, null);
+ dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData toEstabelecimento_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_ESTABELECIMENTO_ID) == null && getEstabelecimento_id() != null )
+ {
+ dataHash.put(TO_ESTABELECIMENTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.class, new Object[]{ getEstabelecimento_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) dataHash.get(TO_ESTABELECIMENTO_ID);
+ }
+
+ public void setToEstabelecimento_id(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData estabelecimento_idObject )
+ {
+ if( estabelecimento_idObject == null )
+ {
+ dataHash.put(ESTABELECIMENTO_ID, null);
+ }
+ else
+ {
+ dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID ));
+ }
+ dataHash.put(TO_ESTABELECIMENTO_ID, estabelecimento_idObject);
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ value = getEstabelecimento_id();
+ }
+ else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ value = toEstabelecimento_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ setEstabelecimento_id( (Integer) value );
+ }
+ else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ setToEstabelecimento_id( (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_ESTABELECIMENTO_ID) != null )
+ {
+ toEstabelecimento_id().save();
+ dataHash.put(ESTABELECIMENTO_ID, toEstabelecimento_id().get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return EmailPlanoDeActuacao.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Empresas.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Empresas.java
new file mode 100644
index 00000000..e7abed30
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Empresas.java
@@ -0,0 +1,1263 @@
+/*
+* Empresas.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class Empresas implements JDOInnerObject
+{
+ private Integer id;
+ private String designacao_social;
+ private Integer servico_saude_tipo;
+ private String servico_saude_designacao;
+ private Integer servico_higiene_tipo;
+ private String servico_higiene_designacao;
+ private String inactivo;
+ private String morada;
+ private String codigo_postal;
+ private String localidade;
+ private String distrito;
+ private String concelho;
+ private Integer numero_trabalhadores;
+ private java.util.Date data_proposta;
+ private java.util.Date data_aceitacao;
+ private String perfil_1;
+ private String perfil_2;
+ private java.util.Date data_envio_contrato;
+ private java.util.Date data_recepcao_contrato;
+ private java.util.Date data_envio_idict;
+ private String cae;
+ private String contribuinte;
+ private String seguranca_social;
+ private String codigo_1;
+ private String codigo_2;
+ private String codigo_3;
+ private Integer servicos;
+ private Integer contacto_1;
+ private Integer contacto_2;
+ private java.util.Date data_relatorio_anual;
+ private Double preco_higiene;
+ private Double preco_medicina;
+ private String periodicidade;
+ private String actividade;
+ private java.sql.Timestamp actualizacao;
+ private String designacao_social_plain;
+ private String a_consultas;
+ private String a_exames;
+ private String b_consultas;
+ private String b_exames;
+ private java.util.Date data_cancelamento;
+ private Integer duracao;
+ private java.util.Date inicio_contrato;
+ private Integer empresa_logo_id;
+ private Boolean imprimir_tabela_alargada;
+
+ public Empresas()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == EmpresasDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == EmpresasDataAuto.DESIGNACAO_SOCIAL )
+ {
+ return designacao_social;
+ }
+ else if( fieldName == EmpresasDataAuto.SERVICO_SAUDE_TIPO )
+ {
+ return servico_saude_tipo;
+ }
+ else if( fieldName == EmpresasDataAuto.SERVICO_SAUDE_DESIGNACAO )
+ {
+ return servico_saude_designacao;
+ }
+ else if( fieldName == EmpresasDataAuto.SERVICO_HIGIENE_TIPO )
+ {
+ return servico_higiene_tipo;
+ }
+ else if( fieldName == EmpresasDataAuto.SERVICO_HIGIENE_DESIGNACAO )
+ {
+ return servico_higiene_designacao;
+ }
+ else if( fieldName == EmpresasDataAuto.INACTIVO )
+ {
+ return inactivo;
+ }
+ else if( fieldName == EmpresasDataAuto.MORADA )
+ {
+ return morada;
+ }
+ else if( fieldName == EmpresasDataAuto.CODIGO_POSTAL )
+ {
+ return codigo_postal;
+ }
+ else if( fieldName == EmpresasDataAuto.LOCALIDADE )
+ {
+ return localidade;
+ }
+ else if( fieldName == EmpresasDataAuto.DISTRITO )
+ {
+ return distrito;
+ }
+ else if( fieldName == EmpresasDataAuto.CONCELHO )
+ {
+ return concelho;
+ }
+ else if( fieldName == EmpresasDataAuto.NUMERO_TRABALHADORES )
+ {
+ return numero_trabalhadores;
+ }
+ else if( fieldName == EmpresasDataAuto.DATA_PROPOSTA )
+ {
+ return data_proposta;
+ }
+ else if( fieldName == EmpresasDataAuto.DATA_ACEITACAO )
+ {
+ return data_aceitacao;
+ }
+ else if( fieldName == EmpresasDataAuto.PERFIL_1 )
+ {
+ return perfil_1;
+ }
+ else if( fieldName == EmpresasDataAuto.PERFIL_2 )
+ {
+ return perfil_2;
+ }
+ else if( fieldName == EmpresasDataAuto.DATA_ENVIO_CONTRATO )
+ {
+ return data_envio_contrato;
+ }
+ else if( fieldName == EmpresasDataAuto.DATA_RECEPCAO_CONTRATO )
+ {
+ return data_recepcao_contrato;
+ }
+ else if( fieldName == EmpresasDataAuto.DATA_ENVIO_IDICT )
+ {
+ return data_envio_idict;
+ }
+ else if( fieldName == EmpresasDataAuto.CAE )
+ {
+ return cae;
+ }
+ else if( fieldName == EmpresasDataAuto.CONTRIBUINTE )
+ {
+ return contribuinte;
+ }
+ else if( fieldName == EmpresasDataAuto.SEGURANCA_SOCIAL )
+ {
+ return seguranca_social;
+ }
+ else if( fieldName == EmpresasDataAuto.CODIGO_1 )
+ {
+ return codigo_1;
+ }
+ else if( fieldName == EmpresasDataAuto.CODIGO_2 )
+ {
+ return codigo_2;
+ }
+ else if( fieldName == EmpresasDataAuto.CODIGO_3 )
+ {
+ return codigo_3;
+ }
+ else if( fieldName == EmpresasDataAuto.SERVICOS )
+ {
+ return servicos;
+ }
+ else if( fieldName == EmpresasDataAuto.CONTACTO_1 )
+ {
+ return contacto_1;
+ }
+ else if( fieldName == EmpresasDataAuto.CONTACTO_2 )
+ {
+ return contacto_2;
+ }
+ else if( fieldName == EmpresasDataAuto.DATA_RELATORIO_ANUAL )
+ {
+ return data_relatorio_anual;
+ }
+ else if( fieldName == EmpresasDataAuto.PRECO_HIGIENE )
+ {
+ return preco_higiene;
+ }
+ else if( fieldName == EmpresasDataAuto.PRECO_MEDICINA )
+ {
+ return preco_medicina;
+ }
+ else if( fieldName == EmpresasDataAuto.PERIODICIDADE )
+ {
+ return periodicidade;
+ }
+ else if( fieldName == EmpresasDataAuto.ACTIVIDADE )
+ {
+ return actividade;
+ }
+ else if( fieldName == EmpresasDataAuto.ACTUALIZACAO )
+ {
+ return actualizacao;
+ }
+ else if( fieldName == EmpresasDataAuto.DESIGNACAO_SOCIAL_PLAIN )
+ {
+ return designacao_social_plain;
+ }
+ else if( fieldName == EmpresasDataAuto.A_CONSULTAS )
+ {
+ return a_consultas;
+ }
+ else if( fieldName == EmpresasDataAuto.A_EXAMES )
+ {
+ return a_exames;
+ }
+ else if( fieldName == EmpresasDataAuto.B_CONSULTAS )
+ {
+ return b_consultas;
+ }
+ else if( fieldName == EmpresasDataAuto.B_EXAMES )
+ {
+ return b_exames;
+ }
+ else if( fieldName == EmpresasDataAuto.DATA_CANCELAMENTO )
+ {
+ return data_cancelamento;
+ }
+ else if( fieldName == EmpresasDataAuto.DURACAO )
+ {
+ return duracao;
+ }
+ else if( fieldName == EmpresasDataAuto.INICIO_CONTRATO )
+ {
+ return inicio_contrato;
+ }
+ else if( fieldName == EmpresasDataAuto.EMPRESA_LOGO_ID )
+ {
+ return empresa_logo_id;
+ }
+ else if( fieldName == EmpresasDataAuto.IMPRIMIR_TABELA_ALARGADA )
+ {
+ return imprimir_tabela_alargada;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.DESIGNACAO_SOCIAL ) )
+ {
+ return designacao_social;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.SERVICO_SAUDE_TIPO ) )
+ {
+ return servico_saude_tipo;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.SERVICO_SAUDE_DESIGNACAO ) )
+ {
+ return servico_saude_designacao;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.SERVICO_HIGIENE_TIPO ) )
+ {
+ return servico_higiene_tipo;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.SERVICO_HIGIENE_DESIGNACAO ) )
+ {
+ return servico_higiene_designacao;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.INACTIVO ) )
+ {
+ return inactivo;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.MORADA ) )
+ {
+ return morada;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.CODIGO_POSTAL ) )
+ {
+ return codigo_postal;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.LOCALIDADE ) )
+ {
+ return localidade;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.DISTRITO ) )
+ {
+ return distrito;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.CONCELHO ) )
+ {
+ return concelho;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.NUMERO_TRABALHADORES ) )
+ {
+ return numero_trabalhadores;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.DATA_PROPOSTA ) )
+ {
+ return data_proposta;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.DATA_ACEITACAO ) )
+ {
+ return data_aceitacao;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.PERFIL_1 ) )
+ {
+ return perfil_1;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.PERFIL_2 ) )
+ {
+ return perfil_2;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.DATA_ENVIO_CONTRATO ) )
+ {
+ return data_envio_contrato;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.DATA_RECEPCAO_CONTRATO ) )
+ {
+ return data_recepcao_contrato;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.DATA_ENVIO_IDICT ) )
+ {
+ return data_envio_idict;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.CAE ) )
+ {
+ return cae;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.CONTRIBUINTE ) )
+ {
+ return contribuinte;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.SEGURANCA_SOCIAL ) )
+ {
+ return seguranca_social;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.CODIGO_1 ) )
+ {
+ return codigo_1;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.CODIGO_2 ) )
+ {
+ return codigo_2;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.CODIGO_3 ) )
+ {
+ return codigo_3;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.SERVICOS ) )
+ {
+ return servicos;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.CONTACTO_1 ) )
+ {
+ return contacto_1;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.CONTACTO_2 ) )
+ {
+ return contacto_2;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.DATA_RELATORIO_ANUAL ) )
+ {
+ return data_relatorio_anual;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.PRECO_HIGIENE ) )
+ {
+ return preco_higiene;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.PRECO_MEDICINA ) )
+ {
+ return preco_medicina;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.PERIODICIDADE ) )
+ {
+ return periodicidade;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.ACTIVIDADE ) )
+ {
+ return actividade;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.ACTUALIZACAO ) )
+ {
+ return actualizacao;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.DESIGNACAO_SOCIAL_PLAIN ) )
+ {
+ return designacao_social_plain;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.A_CONSULTAS ) )
+ {
+ return a_consultas;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.A_EXAMES ) )
+ {
+ return a_exames;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.B_CONSULTAS ) )
+ {
+ return b_consultas;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.B_EXAMES ) )
+ {
+ return b_exames;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.DATA_CANCELAMENTO ) )
+ {
+ return data_cancelamento;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.DURACAO ) )
+ {
+ return duracao;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.INICIO_CONTRATO ) )
+ {
+ return inicio_contrato;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.EMPRESA_LOGO_ID ) )
+ {
+ return empresa_logo_id;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.IMPRIMIR_TABELA_ALARGADA ) )
+ {
+ return imprimir_tabela_alargada;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == EmpresasDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.DESIGNACAO_SOCIAL )
+ {
+ designacao_social = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.SERVICO_SAUDE_TIPO )
+ {
+ servico_saude_tipo = ( Integer ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.SERVICO_SAUDE_DESIGNACAO )
+ {
+ servico_saude_designacao = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.SERVICO_HIGIENE_TIPO )
+ {
+ servico_higiene_tipo = ( Integer ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.SERVICO_HIGIENE_DESIGNACAO )
+ {
+ servico_higiene_designacao = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.INACTIVO )
+ {
+ inactivo = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.MORADA )
+ {
+ morada = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.CODIGO_POSTAL )
+ {
+ codigo_postal = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.LOCALIDADE )
+ {
+ localidade = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.DISTRITO )
+ {
+ distrito = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.CONCELHO )
+ {
+ concelho = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.NUMERO_TRABALHADORES )
+ {
+ numero_trabalhadores = ( Integer ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.DATA_PROPOSTA )
+ {
+ data_proposta = ( java.util.Date ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.DATA_ACEITACAO )
+ {
+ data_aceitacao = ( java.util.Date ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.PERFIL_1 )
+ {
+ perfil_1 = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.PERFIL_2 )
+ {
+ perfil_2 = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.DATA_ENVIO_CONTRATO )
+ {
+ data_envio_contrato = ( java.util.Date ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.DATA_RECEPCAO_CONTRATO )
+ {
+ data_recepcao_contrato = ( java.util.Date ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.DATA_ENVIO_IDICT )
+ {
+ data_envio_idict = ( java.util.Date ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.CAE )
+ {
+ cae = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.CONTRIBUINTE )
+ {
+ contribuinte = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.SEGURANCA_SOCIAL )
+ {
+ seguranca_social = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.CODIGO_1 )
+ {
+ codigo_1 = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.CODIGO_2 )
+ {
+ codigo_2 = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.CODIGO_3 )
+ {
+ codigo_3 = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.SERVICOS )
+ {
+ servicos = ( Integer ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.CONTACTO_1 )
+ {
+ contacto_1 = ( Integer ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.CONTACTO_2 )
+ {
+ contacto_2 = ( Integer ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.DATA_RELATORIO_ANUAL )
+ {
+ data_relatorio_anual = ( java.util.Date ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.PRECO_HIGIENE )
+ {
+ preco_higiene = ( Double ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.PRECO_MEDICINA )
+ {
+ preco_medicina = ( Double ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.PERIODICIDADE )
+ {
+ periodicidade = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.ACTIVIDADE )
+ {
+ actividade = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.ACTUALIZACAO )
+ {
+ actualizacao = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.DESIGNACAO_SOCIAL_PLAIN )
+ {
+ designacao_social_plain = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.A_CONSULTAS )
+ {
+ a_consultas = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.A_EXAMES )
+ {
+ a_exames = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.B_CONSULTAS )
+ {
+ b_consultas = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.B_EXAMES )
+ {
+ b_exames = ( String ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.DATA_CANCELAMENTO )
+ {
+ data_cancelamento = ( java.util.Date ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.DURACAO )
+ {
+ duracao = ( Integer ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.INICIO_CONTRATO )
+ {
+ inicio_contrato = ( java.util.Date ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.EMPRESA_LOGO_ID )
+ {
+ empresa_logo_id = ( Integer ) value;
+ }
+ else if( fieldName == EmpresasDataAuto.IMPRIMIR_TABELA_ALARGADA )
+ {
+ imprimir_tabela_alargada = ( Boolean ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.DESIGNACAO_SOCIAL ) )
+ {
+ designacao_social = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.SERVICO_SAUDE_TIPO ) )
+ {
+ servico_saude_tipo = ( Integer ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.SERVICO_SAUDE_DESIGNACAO ) )
+ {
+ servico_saude_designacao = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.SERVICO_HIGIENE_TIPO ) )
+ {
+ servico_higiene_tipo = ( Integer ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.SERVICO_HIGIENE_DESIGNACAO ) )
+ {
+ servico_higiene_designacao = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.INACTIVO ) )
+ {
+ inactivo = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.MORADA ) )
+ {
+ morada = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.CODIGO_POSTAL ) )
+ {
+ codigo_postal = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.LOCALIDADE ) )
+ {
+ localidade = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.DISTRITO ) )
+ {
+ distrito = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.CONCELHO ) )
+ {
+ concelho = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.NUMERO_TRABALHADORES ) )
+ {
+ numero_trabalhadores = ( Integer ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.DATA_PROPOSTA ) )
+ {
+ data_proposta = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.DATA_ACEITACAO ) )
+ {
+ data_aceitacao = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.PERFIL_1 ) )
+ {
+ perfil_1 = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.PERFIL_2 ) )
+ {
+ perfil_2 = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.DATA_ENVIO_CONTRATO ) )
+ {
+ data_envio_contrato = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.DATA_RECEPCAO_CONTRATO ) )
+ {
+ data_recepcao_contrato = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.DATA_ENVIO_IDICT ) )
+ {
+ data_envio_idict = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.CAE ) )
+ {
+ cae = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.CONTRIBUINTE ) )
+ {
+ contribuinte = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.SEGURANCA_SOCIAL ) )
+ {
+ seguranca_social = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.CODIGO_1 ) )
+ {
+ codigo_1 = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.CODIGO_2 ) )
+ {
+ codigo_2 = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.CODIGO_3 ) )
+ {
+ codigo_3 = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.SERVICOS ) )
+ {
+ servicos = ( Integer ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.CONTACTO_1 ) )
+ {
+ contacto_1 = ( Integer ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.CONTACTO_2 ) )
+ {
+ contacto_2 = ( Integer ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.DATA_RELATORIO_ANUAL ) )
+ {
+ data_relatorio_anual = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.PRECO_HIGIENE ) )
+ {
+ preco_higiene = ( Double ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.PRECO_MEDICINA ) )
+ {
+ preco_medicina = ( Double ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.PERIODICIDADE ) )
+ {
+ periodicidade = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.ACTIVIDADE ) )
+ {
+ actividade = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.ACTUALIZACAO ) )
+ {
+ actualizacao = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.DESIGNACAO_SOCIAL_PLAIN ) )
+ {
+ designacao_social_plain = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.A_CONSULTAS ) )
+ {
+ a_consultas = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.A_EXAMES ) )
+ {
+ a_exames = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.B_CONSULTAS ) )
+ {
+ b_consultas = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.B_EXAMES ) )
+ {
+ b_exames = ( String ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.DATA_CANCELAMENTO ) )
+ {
+ data_cancelamento = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.DURACAO ) )
+ {
+ duracao = ( Integer ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.INICIO_CONTRATO ) )
+ {
+ inicio_contrato = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.EMPRESA_LOGO_ID ) )
+ {
+ empresa_logo_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( EmpresasDataAuto.IMPRIMIR_TABELA_ALARGADA ) )
+ {
+ imprimir_tabela_alargada = ( Boolean ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getDesignacao_social()
+ {
+ return designacao_social;
+ }
+
+ public void setDesignacao_social(String designacao_socialValue )
+ {
+ this.designacao_social = designacao_socialValue;
+ }
+
+ public Integer getServico_saude_tipo()
+ {
+ return servico_saude_tipo;
+ }
+
+ public void setServico_saude_tipo(Integer servico_saude_tipoValue )
+ {
+ this.servico_saude_tipo = servico_saude_tipoValue;
+ }
+
+ public String getServico_saude_designacao()
+ {
+ return servico_saude_designacao;
+ }
+
+ public void setServico_saude_designacao(String servico_saude_designacaoValue )
+ {
+ this.servico_saude_designacao = servico_saude_designacaoValue;
+ }
+
+ public Integer getServico_higiene_tipo()
+ {
+ return servico_higiene_tipo;
+ }
+
+ public void setServico_higiene_tipo(Integer servico_higiene_tipoValue )
+ {
+ this.servico_higiene_tipo = servico_higiene_tipoValue;
+ }
+
+ public String getServico_higiene_designacao()
+ {
+ return servico_higiene_designacao;
+ }
+
+ public void setServico_higiene_designacao(String servico_higiene_designacaoValue )
+ {
+ this.servico_higiene_designacao = servico_higiene_designacaoValue;
+ }
+
+ public String getInactivo()
+ {
+ return inactivo;
+ }
+
+ public void setInactivo(String inactivoValue )
+ {
+ this.inactivo = inactivoValue;
+ }
+
+ public String getMorada()
+ {
+ return morada;
+ }
+
+ public void setMorada(String moradaValue )
+ {
+ this.morada = moradaValue;
+ }
+
+ public String getCodigo_postal()
+ {
+ return codigo_postal;
+ }
+
+ public void setCodigo_postal(String codigo_postalValue )
+ {
+ this.codigo_postal = codigo_postalValue;
+ }
+
+ public String getLocalidade()
+ {
+ return localidade;
+ }
+
+ public void setLocalidade(String localidadeValue )
+ {
+ this.localidade = localidadeValue;
+ }
+
+ public String getDistrito()
+ {
+ return distrito;
+ }
+
+ public void setDistrito(String distritoValue )
+ {
+ this.distrito = distritoValue;
+ }
+
+ public String getConcelho()
+ {
+ return concelho;
+ }
+
+ public void setConcelho(String concelhoValue )
+ {
+ this.concelho = concelhoValue;
+ }
+
+ public Integer getNumero_trabalhadores()
+ {
+ return numero_trabalhadores;
+ }
+
+ public void setNumero_trabalhadores(Integer numero_trabalhadoresValue )
+ {
+ this.numero_trabalhadores = numero_trabalhadoresValue;
+ }
+
+ public java.util.Date getData_proposta()
+ {
+ return data_proposta;
+ }
+
+ public void setData_proposta(java.util.Date data_propostaValue )
+ {
+ this.data_proposta = data_propostaValue;
+ }
+
+ public java.util.Date getData_aceitacao()
+ {
+ return data_aceitacao;
+ }
+
+ public void setData_aceitacao(java.util.Date data_aceitacaoValue )
+ {
+ this.data_aceitacao = data_aceitacaoValue;
+ }
+
+ public String getPerfil_1()
+ {
+ return perfil_1;
+ }
+
+ public void setPerfil_1(String perfil_1Value )
+ {
+ this.perfil_1 = perfil_1Value;
+ }
+
+ public String getPerfil_2()
+ {
+ return perfil_2;
+ }
+
+ public void setPerfil_2(String perfil_2Value )
+ {
+ this.perfil_2 = perfil_2Value;
+ }
+
+ public java.util.Date getData_envio_contrato()
+ {
+ return data_envio_contrato;
+ }
+
+ public void setData_envio_contrato(java.util.Date data_envio_contratoValue )
+ {
+ this.data_envio_contrato = data_envio_contratoValue;
+ }
+
+ public java.util.Date getData_recepcao_contrato()
+ {
+ return data_recepcao_contrato;
+ }
+
+ public void setData_recepcao_contrato(java.util.Date data_recepcao_contratoValue )
+ {
+ this.data_recepcao_contrato = data_recepcao_contratoValue;
+ }
+
+ public java.util.Date getData_envio_idict()
+ {
+ return data_envio_idict;
+ }
+
+ public void setData_envio_idict(java.util.Date data_envio_idictValue )
+ {
+ this.data_envio_idict = data_envio_idictValue;
+ }
+
+ public String getCae()
+ {
+ return cae;
+ }
+
+ public void setCae(String caeValue )
+ {
+ this.cae = caeValue;
+ }
+
+ public String getContribuinte()
+ {
+ return contribuinte;
+ }
+
+ public void setContribuinte(String contribuinteValue )
+ {
+ this.contribuinte = contribuinteValue;
+ }
+
+ public String getSeguranca_social()
+ {
+ return seguranca_social;
+ }
+
+ public void setSeguranca_social(String seguranca_socialValue )
+ {
+ this.seguranca_social = seguranca_socialValue;
+ }
+
+ public String getCodigo_1()
+ {
+ return codigo_1;
+ }
+
+ public void setCodigo_1(String codigo_1Value )
+ {
+ this.codigo_1 = codigo_1Value;
+ }
+
+ public String getCodigo_2()
+ {
+ return codigo_2;
+ }
+
+ public void setCodigo_2(String codigo_2Value )
+ {
+ this.codigo_2 = codigo_2Value;
+ }
+
+ public String getCodigo_3()
+ {
+ return codigo_3;
+ }
+
+ public void setCodigo_3(String codigo_3Value )
+ {
+ this.codigo_3 = codigo_3Value;
+ }
+
+ public Integer getServicos()
+ {
+ return servicos;
+ }
+
+ public void setServicos(Integer servicosValue )
+ {
+ this.servicos = servicosValue;
+ }
+
+ public Integer getContacto_1()
+ {
+ return contacto_1;
+ }
+
+ public void setContacto_1(Integer contacto_1Value )
+ {
+ this.contacto_1 = contacto_1Value;
+ }
+
+ public Integer getContacto_2()
+ {
+ return contacto_2;
+ }
+
+ public void setContacto_2(Integer contacto_2Value )
+ {
+ this.contacto_2 = contacto_2Value;
+ }
+
+ public java.util.Date getData_relatorio_anual()
+ {
+ return data_relatorio_anual;
+ }
+
+ public void setData_relatorio_anual(java.util.Date data_relatorio_anualValue )
+ {
+ this.data_relatorio_anual = data_relatorio_anualValue;
+ }
+
+ public Double getPreco_higiene()
+ {
+ return preco_higiene;
+ }
+
+ public void setPreco_higiene(Double preco_higieneValue )
+ {
+ this.preco_higiene = preco_higieneValue;
+ }
+
+ public Double getPreco_medicina()
+ {
+ return preco_medicina;
+ }
+
+ public void setPreco_medicina(Double preco_medicinaValue )
+ {
+ this.preco_medicina = preco_medicinaValue;
+ }
+
+ public String getPeriodicidade()
+ {
+ return periodicidade;
+ }
+
+ public void setPeriodicidade(String periodicidadeValue )
+ {
+ this.periodicidade = periodicidadeValue;
+ }
+
+ public String getActividade()
+ {
+ return actividade;
+ }
+
+ public void setActividade(String actividadeValue )
+ {
+ this.actividade = actividadeValue;
+ }
+
+ public java.sql.Timestamp getActualizacao()
+ {
+ return actualizacao;
+ }
+
+ public void setActualizacao(java.sql.Timestamp actualizacaoValue )
+ {
+ this.actualizacao = actualizacaoValue;
+ }
+
+ public String getDesignacao_social_plain()
+ {
+ return designacao_social_plain;
+ }
+
+ public void setDesignacao_social_plain(String designacao_social_plainValue )
+ {
+ this.designacao_social_plain = designacao_social_plainValue;
+ }
+
+ public String getA_consultas()
+ {
+ return a_consultas;
+ }
+
+ public void setA_consultas(String a_consultasValue )
+ {
+ this.a_consultas = a_consultasValue;
+ }
+
+ public String getA_exames()
+ {
+ return a_exames;
+ }
+
+ public void setA_exames(String a_examesValue )
+ {
+ this.a_exames = a_examesValue;
+ }
+
+ public String getB_consultas()
+ {
+ return b_consultas;
+ }
+
+ public void setB_consultas(String b_consultasValue )
+ {
+ this.b_consultas = b_consultasValue;
+ }
+
+ public String getB_exames()
+ {
+ return b_exames;
+ }
+
+ public void setB_exames(String b_examesValue )
+ {
+ this.b_exames = b_examesValue;
+ }
+
+ public java.util.Date getData_cancelamento()
+ {
+ return data_cancelamento;
+ }
+
+ public void setData_cancelamento(java.util.Date data_cancelamentoValue )
+ {
+ this.data_cancelamento = data_cancelamentoValue;
+ }
+
+ public Integer getDuracao()
+ {
+ return duracao;
+ }
+
+ public void setDuracao(Integer duracaoValue )
+ {
+ this.duracao = duracaoValue;
+ }
+
+ public java.util.Date getInicio_contrato()
+ {
+ return inicio_contrato;
+ }
+
+ public void setInicio_contrato(java.util.Date inicio_contratoValue )
+ {
+ this.inicio_contrato = inicio_contratoValue;
+ }
+
+ public Integer getEmpresa_logo_id()
+ {
+ return empresa_logo_id;
+ }
+
+ public void setEmpresa_logo_id(Integer empresa_logo_idValue )
+ {
+ this.empresa_logo_id = empresa_logo_idValue;
+ }
+
+ public Boolean getImprimir_tabela_alargada()
+ {
+ return imprimir_tabela_alargada;
+ }
+
+ public void setImprimir_tabela_alargada(Boolean imprimir_tabela_alargadaValue )
+ {
+ this.imprimir_tabela_alargada = imprimir_tabela_alargadaValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return EmpresasDataAuto.class;
+ }
+
+ public EmpresasDataAuto getOuterClassInstance()
+ {
+ EmpresasDataAuto outerObj = new EmpresasDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmpresasData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmpresasData.java
new file mode 100644
index 00000000..dc525cdb
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmpresasData.java
@@ -0,0 +1,18 @@
+/*
+* EmpresasDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class EmpresasData extends com.evolute.siprp.server.db.data.siprp_local3.EmpresasDataAuto
+{
+
+ public EmpresasData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmpresasDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmpresasDataAuto.java
new file mode 100644
index 00000000..a25597d4
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EmpresasDataAuto.java
@@ -0,0 +1,782 @@
+/*
+* EmpresasDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class EmpresasDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "empresas";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "empresas.id";
+ public static final String DESIGNACAO_SOCIAL = "designacao_social";
+ public static final String DESIGNACAO_SOCIAL_FULL = "empresas.designacao_social";
+ public static final String SERVICO_SAUDE_TIPO = "servico_saude_tipo";
+ public static final String SERVICO_SAUDE_TIPO_FULL = "empresas.servico_saude_tipo";
+ public static final String SERVICO_SAUDE_DESIGNACAO = "servico_saude_designacao";
+ public static final String SERVICO_SAUDE_DESIGNACAO_FULL = "empresas.servico_saude_designacao";
+ public static final String SERVICO_HIGIENE_TIPO = "servico_higiene_tipo";
+ public static final String SERVICO_HIGIENE_TIPO_FULL = "empresas.servico_higiene_tipo";
+ public static final String SERVICO_HIGIENE_DESIGNACAO = "servico_higiene_designacao";
+ public static final String SERVICO_HIGIENE_DESIGNACAO_FULL = "empresas.servico_higiene_designacao";
+ public static final String INACTIVO = "inactivo";
+ public static final String INACTIVO_FULL = "empresas.inactivo";
+ public static final String MORADA = "morada";
+ public static final String MORADA_FULL = "empresas.morada";
+ public static final String CODIGO_POSTAL = "codigo_postal";
+ public static final String CODIGO_POSTAL_FULL = "empresas.codigo_postal";
+ public static final String LOCALIDADE = "localidade";
+ public static final String LOCALIDADE_FULL = "empresas.localidade";
+ public static final String DISTRITO = "distrito";
+ public static final String DISTRITO_FULL = "empresas.distrito";
+ public static final String CONCELHO = "concelho";
+ public static final String CONCELHO_FULL = "empresas.concelho";
+ public static final String NUMERO_TRABALHADORES = "numero_trabalhadores";
+ public static final String NUMERO_TRABALHADORES_FULL = "empresas.numero_trabalhadores";
+ public static final String DATA_PROPOSTA = "data_proposta";
+ public static final String DATA_PROPOSTA_FULL = "empresas.data_proposta";
+ public static final String DATA_ACEITACAO = "data_aceitacao";
+ public static final String DATA_ACEITACAO_FULL = "empresas.data_aceitacao";
+ public static final String PERFIL_1 = "perfil_1";
+ public static final String PERFIL_1_FULL = "empresas.perfil_1";
+ public static final String PERFIL_2 = "perfil_2";
+ public static final String PERFIL_2_FULL = "empresas.perfil_2";
+ public static final String DATA_ENVIO_CONTRATO = "data_envio_contrato";
+ public static final String DATA_ENVIO_CONTRATO_FULL = "empresas.data_envio_contrato";
+ public static final String DATA_RECEPCAO_CONTRATO = "data_recepcao_contrato";
+ public static final String DATA_RECEPCAO_CONTRATO_FULL = "empresas.data_recepcao_contrato";
+ public static final String DATA_ENVIO_IDICT = "data_envio_idict";
+ public static final String DATA_ENVIO_IDICT_FULL = "empresas.data_envio_idict";
+ public static final String CAE = "cae";
+ public static final String CAE_FULL = "empresas.cae";
+ public static final String CONTRIBUINTE = "contribuinte";
+ public static final String CONTRIBUINTE_FULL = "empresas.contribuinte";
+ public static final String SEGURANCA_SOCIAL = "seguranca_social";
+ public static final String SEGURANCA_SOCIAL_FULL = "empresas.seguranca_social";
+ public static final String CODIGO_1 = "codigo_1";
+ public static final String CODIGO_1_FULL = "empresas.codigo_1";
+ public static final String CODIGO_2 = "codigo_2";
+ public static final String CODIGO_2_FULL = "empresas.codigo_2";
+ public static final String CODIGO_3 = "codigo_3";
+ public static final String CODIGO_3_FULL = "empresas.codigo_3";
+ public static final String SERVICOS = "servicos";
+ public static final String SERVICOS_FULL = "empresas.servicos";
+ public static final String CONTACTO_1 = "contacto_1";
+ public static final String CONTACTO_1_FULL = "empresas.contacto_1";
+ public static final String TO_CONTACTO_1 = "to contacto_1";
+ public static final String CONTACTO_2 = "contacto_2";
+ public static final String CONTACTO_2_FULL = "empresas.contacto_2";
+ public static final String TO_CONTACTO_2 = "to contacto_2";
+ public static final String DATA_RELATORIO_ANUAL = "data_relatorio_anual";
+ public static final String DATA_RELATORIO_ANUAL_FULL = "empresas.data_relatorio_anual";
+ public static final String PRECO_HIGIENE = "preco_higiene";
+ public static final String PRECO_HIGIENE_FULL = "empresas.preco_higiene";
+ public static final String PRECO_MEDICINA = "preco_medicina";
+ public static final String PRECO_MEDICINA_FULL = "empresas.preco_medicina";
+ public static final String PERIODICIDADE = "periodicidade";
+ public static final String PERIODICIDADE_FULL = "empresas.periodicidade";
+ public static final String ACTIVIDADE = "actividade";
+ public static final String ACTIVIDADE_FULL = "empresas.actividade";
+ public static final String ACTUALIZACAO = "actualizacao";
+ public static final String ACTUALIZACAO_FULL = "empresas.actualizacao";
+ public static final String DESIGNACAO_SOCIAL_PLAIN = "designacao_social_plain";
+ public static final String DESIGNACAO_SOCIAL_PLAIN_FULL = "empresas.designacao_social_plain";
+ public static final String A_CONSULTAS = "a_consultas";
+ public static final String A_CONSULTAS_FULL = "empresas.a_consultas";
+ public static final String A_EXAMES = "a_exames";
+ public static final String A_EXAMES_FULL = "empresas.a_exames";
+ public static final String B_CONSULTAS = "b_consultas";
+ public static final String B_CONSULTAS_FULL = "empresas.b_consultas";
+ public static final String B_EXAMES = "b_exames";
+ public static final String B_EXAMES_FULL = "empresas.b_exames";
+ public static final String DATA_CANCELAMENTO = "data_cancelamento";
+ public static final String DATA_CANCELAMENTO_FULL = "empresas.data_cancelamento";
+ public static final String DURACAO = "duracao";
+ public static final String DURACAO_FULL = "empresas.duracao";
+ public static final String INICIO_CONTRATO = "inicio_contrato";
+ public static final String INICIO_CONTRATO_FULL = "empresas.inicio_contrato";
+ public static final String EMPRESA_LOGO_ID = "empresa_logo_id";
+ public static final String EMPRESA_LOGO_ID_FULL = "empresas.empresa_logo_id";
+ public static final String TO_EMPRESA_LOGO_ID = "to empresa_logo_id";
+ public static final String IMPRIMIR_TABELA_ALARGADA = "imprimir_tabela_alargada";
+ public static final String IMPRIMIR_TABELA_ALARGADA_FULL = "empresas.imprimir_tabela_alargada";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ DESIGNACAO_SOCIAL, SERVICO_SAUDE_TIPO, SERVICO_SAUDE_DESIGNACAO,
+ SERVICO_HIGIENE_TIPO, SERVICO_HIGIENE_DESIGNACAO, INACTIVO, MORADA,
+ CODIGO_POSTAL, LOCALIDADE, DISTRITO, CONCELHO, NUMERO_TRABALHADORES,
+ DATA_PROPOSTA, DATA_ACEITACAO, PERFIL_1, PERFIL_2, DATA_ENVIO_CONTRATO,
+ DATA_RECEPCAO_CONTRATO, DATA_ENVIO_IDICT, CAE, CONTRIBUINTE, SEGURANCA_SOCIAL,
+ CODIGO_1, CODIGO_2, CODIGO_3, SERVICOS, CONTACTO_1, TO_CONTACTO_1, CONTACTO_2,
+ TO_CONTACTO_2, DATA_RELATORIO_ANUAL, PRECO_HIGIENE, PRECO_MEDICINA,
+ PERIODICIDADE, ACTIVIDADE, ACTUALIZACAO, DESIGNACAO_SOCIAL_PLAIN, A_CONSULTAS,
+ A_EXAMES, B_CONSULTAS, B_EXAMES, DATA_CANCELAMENTO, DURACAO, INICIO_CONTRATO,
+ EMPRESA_LOGO_ID, TO_EMPRESA_LOGO_ID, IMPRIMIR_TABELA_ALARGADA, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, DESIGNACAO_SOCIAL, SERVICO_SAUDE_TIPO, SERVICO_SAUDE_DESIGNACAO,
+ SERVICO_HIGIENE_TIPO, SERVICO_HIGIENE_DESIGNACAO, INACTIVO, MORADA,
+ CODIGO_POSTAL, LOCALIDADE, DISTRITO, CONCELHO, NUMERO_TRABALHADORES,
+ DATA_PROPOSTA, DATA_ACEITACAO, PERFIL_1, PERFIL_2, DATA_ENVIO_CONTRATO,
+ DATA_RECEPCAO_CONTRATO, DATA_ENVIO_IDICT, CAE, CONTRIBUINTE, SEGURANCA_SOCIAL,
+ CODIGO_1, CODIGO_2, CODIGO_3, SERVICOS, CONTACTO_1, CONTACTO_2,
+ DATA_RELATORIO_ANUAL, PRECO_HIGIENE, PRECO_MEDICINA, PERIODICIDADE, ACTIVIDADE,
+ ACTUALIZACAO, DESIGNACAO_SOCIAL_PLAIN, A_CONSULTAS, A_EXAMES, B_CONSULTAS,
+ B_EXAMES, DATA_CANCELAMENTO, DURACAO, INICIO_CONTRATO, EMPRESA_LOGO_ID,
+ IMPRIMIR_TABELA_ALARGADA, };
+
+ private Map dataHash;
+
+ public EmpresasDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getDesignacao_social()
+ {
+ return (String) get(DESIGNACAO_SOCIAL);
+ }
+
+ public void setDesignacao_social(String designacao_socialValue )
+ {
+ this.set(DESIGNACAO_SOCIAL, designacao_socialValue );
+ }
+
+ public Integer getServico_saude_tipo()
+ {
+ return (Integer) get(SERVICO_SAUDE_TIPO);
+ }
+
+ public void setServico_saude_tipo(Integer servico_saude_tipoValue )
+ {
+ this.set(SERVICO_SAUDE_TIPO, servico_saude_tipoValue );
+ }
+
+ public String getServico_saude_designacao()
+ {
+ return (String) get(SERVICO_SAUDE_DESIGNACAO);
+ }
+
+ public void setServico_saude_designacao(String servico_saude_designacaoValue )
+ {
+ this.set(SERVICO_SAUDE_DESIGNACAO, servico_saude_designacaoValue );
+ }
+
+ public Integer getServico_higiene_tipo()
+ {
+ return (Integer) get(SERVICO_HIGIENE_TIPO);
+ }
+
+ public void setServico_higiene_tipo(Integer servico_higiene_tipoValue )
+ {
+ this.set(SERVICO_HIGIENE_TIPO, servico_higiene_tipoValue );
+ }
+
+ public String getServico_higiene_designacao()
+ {
+ return (String) get(SERVICO_HIGIENE_DESIGNACAO);
+ }
+
+ public void setServico_higiene_designacao(String servico_higiene_designacaoValue )
+ {
+ this.set(SERVICO_HIGIENE_DESIGNACAO, servico_higiene_designacaoValue );
+ }
+
+ public String getInactivo()
+ {
+ return (String) get(INACTIVO);
+ }
+
+ public void setInactivo(String inactivoValue )
+ {
+ this.set(INACTIVO, inactivoValue );
+ }
+
+ public String getMorada()
+ {
+ return (String) get(MORADA);
+ }
+
+ public void setMorada(String moradaValue )
+ {
+ this.set(MORADA, moradaValue );
+ }
+
+ public String getCodigo_postal()
+ {
+ return (String) get(CODIGO_POSTAL);
+ }
+
+ public void setCodigo_postal(String codigo_postalValue )
+ {
+ this.set(CODIGO_POSTAL, codigo_postalValue );
+ }
+
+ public String getLocalidade()
+ {
+ return (String) get(LOCALIDADE);
+ }
+
+ public void setLocalidade(String localidadeValue )
+ {
+ this.set(LOCALIDADE, localidadeValue );
+ }
+
+ public String getDistrito()
+ {
+ return (String) get(DISTRITO);
+ }
+
+ public void setDistrito(String distritoValue )
+ {
+ this.set(DISTRITO, distritoValue );
+ }
+
+ public String getConcelho()
+ {
+ return (String) get(CONCELHO);
+ }
+
+ public void setConcelho(String concelhoValue )
+ {
+ this.set(CONCELHO, concelhoValue );
+ }
+
+ public Integer getNumero_trabalhadores()
+ {
+ return (Integer) get(NUMERO_TRABALHADORES);
+ }
+
+ public void setNumero_trabalhadores(Integer numero_trabalhadoresValue )
+ {
+ this.set(NUMERO_TRABALHADORES, numero_trabalhadoresValue );
+ }
+
+ public java.util.Date getData_proposta()
+ {
+ return (java.util.Date) get(DATA_PROPOSTA);
+ }
+
+ public void setData_proposta(java.util.Date data_propostaValue )
+ {
+ this.set(DATA_PROPOSTA, data_propostaValue );
+ }
+
+ public java.util.Date getData_aceitacao()
+ {
+ return (java.util.Date) get(DATA_ACEITACAO);
+ }
+
+ public void setData_aceitacao(java.util.Date data_aceitacaoValue )
+ {
+ this.set(DATA_ACEITACAO, data_aceitacaoValue );
+ }
+
+ public String getPerfil_1()
+ {
+ return (String) get(PERFIL_1);
+ }
+
+ public void setPerfil_1(String perfil_1Value )
+ {
+ this.set(PERFIL_1, perfil_1Value );
+ }
+
+ public String getPerfil_2()
+ {
+ return (String) get(PERFIL_2);
+ }
+
+ public void setPerfil_2(String perfil_2Value )
+ {
+ this.set(PERFIL_2, perfil_2Value );
+ }
+
+ public java.util.Date getData_envio_contrato()
+ {
+ return (java.util.Date) get(DATA_ENVIO_CONTRATO);
+ }
+
+ public void setData_envio_contrato(java.util.Date data_envio_contratoValue )
+ {
+ this.set(DATA_ENVIO_CONTRATO, data_envio_contratoValue );
+ }
+
+ public java.util.Date getData_recepcao_contrato()
+ {
+ return (java.util.Date) get(DATA_RECEPCAO_CONTRATO);
+ }
+
+ public void setData_recepcao_contrato(java.util.Date data_recepcao_contratoValue )
+ {
+ this.set(DATA_RECEPCAO_CONTRATO, data_recepcao_contratoValue );
+ }
+
+ public java.util.Date getData_envio_idict()
+ {
+ return (java.util.Date) get(DATA_ENVIO_IDICT);
+ }
+
+ public void setData_envio_idict(java.util.Date data_envio_idictValue )
+ {
+ this.set(DATA_ENVIO_IDICT, data_envio_idictValue );
+ }
+
+ public String getCae()
+ {
+ return (String) get(CAE);
+ }
+
+ public void setCae(String caeValue )
+ {
+ this.set(CAE, caeValue );
+ }
+
+ public String getContribuinte()
+ {
+ return (String) get(CONTRIBUINTE);
+ }
+
+ public void setContribuinte(String contribuinteValue )
+ {
+ this.set(CONTRIBUINTE, contribuinteValue );
+ }
+
+ public String getSeguranca_social()
+ {
+ return (String) get(SEGURANCA_SOCIAL);
+ }
+
+ public void setSeguranca_social(String seguranca_socialValue )
+ {
+ this.set(SEGURANCA_SOCIAL, seguranca_socialValue );
+ }
+
+ public String getCodigo_1()
+ {
+ return (String) get(CODIGO_1);
+ }
+
+ public void setCodigo_1(String codigo_1Value )
+ {
+ this.set(CODIGO_1, codigo_1Value );
+ }
+
+ public String getCodigo_2()
+ {
+ return (String) get(CODIGO_2);
+ }
+
+ public void setCodigo_2(String codigo_2Value )
+ {
+ this.set(CODIGO_2, codigo_2Value );
+ }
+
+ public String getCodigo_3()
+ {
+ return (String) get(CODIGO_3);
+ }
+
+ public void setCodigo_3(String codigo_3Value )
+ {
+ this.set(CODIGO_3, codigo_3Value );
+ }
+
+ public Integer getServicos()
+ {
+ return (Integer) get(SERVICOS);
+ }
+
+ public void setServicos(Integer servicosValue )
+ {
+ this.set(SERVICOS, servicosValue );
+ }
+
+ public Integer getContacto_1()
+ {
+ return (Integer) dataHash.get(CONTACTO_1);
+ }
+
+ public void setContacto_1(Integer contacto_1Value )
+ {
+ dataHash.put(TO_CONTACTO_1, null);
+ dataHash.put(CONTACTO_1, contacto_1Value );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.ContactosData toContacto_1()
+ throws Exception
+ {
+ if( dataHash.get(TO_CONTACTO_1) == null && getContacto_1() != null )
+ {
+ dataHash.put(TO_CONTACTO_1, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.ContactosData.class, new Object[]{ getContacto_1() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.ContactosData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.ContactosData) dataHash.get(TO_CONTACTO_1);
+ }
+
+ public void setToContacto_1(com.evolute.siprp.server.db.data.siprp_local3.ContactosData contacto_1Object )
+ {
+ if( contacto_1Object == null )
+ {
+ dataHash.put(CONTACTO_1, null);
+ }
+ else
+ {
+ dataHash.put(CONTACTO_1, contacto_1Object.get( com.evolute.siprp.server.db.data.siprp_local3.ContactosData.ID ));
+ }
+ dataHash.put(TO_CONTACTO_1, contacto_1Object);
+ }
+
+ public Integer getContacto_2()
+ {
+ return (Integer) dataHash.get(CONTACTO_2);
+ }
+
+ public void setContacto_2(Integer contacto_2Value )
+ {
+ dataHash.put(TO_CONTACTO_2, null);
+ dataHash.put(CONTACTO_2, contacto_2Value );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.ContactosData toContacto_2()
+ throws Exception
+ {
+ if( dataHash.get(TO_CONTACTO_2) == null && getContacto_2() != null )
+ {
+ dataHash.put(TO_CONTACTO_2, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.ContactosData.class, new Object[]{ getContacto_2() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.ContactosData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.ContactosData) dataHash.get(TO_CONTACTO_2);
+ }
+
+ public void setToContacto_2(com.evolute.siprp.server.db.data.siprp_local3.ContactosData contacto_2Object )
+ {
+ if( contacto_2Object == null )
+ {
+ dataHash.put(CONTACTO_2, null);
+ }
+ else
+ {
+ dataHash.put(CONTACTO_2, contacto_2Object.get( com.evolute.siprp.server.db.data.siprp_local3.ContactosData.ID ));
+ }
+ dataHash.put(TO_CONTACTO_2, contacto_2Object);
+ }
+
+ public java.util.Date getData_relatorio_anual()
+ {
+ return (java.util.Date) get(DATA_RELATORIO_ANUAL);
+ }
+
+ public void setData_relatorio_anual(java.util.Date data_relatorio_anualValue )
+ {
+ this.set(DATA_RELATORIO_ANUAL, data_relatorio_anualValue );
+ }
+
+ public Double getPreco_higiene()
+ {
+ return (Double) get(PRECO_HIGIENE);
+ }
+
+ public void setPreco_higiene(Double preco_higieneValue )
+ {
+ this.set(PRECO_HIGIENE, preco_higieneValue );
+ }
+
+ public Double getPreco_medicina()
+ {
+ return (Double) get(PRECO_MEDICINA);
+ }
+
+ public void setPreco_medicina(Double preco_medicinaValue )
+ {
+ this.set(PRECO_MEDICINA, preco_medicinaValue );
+ }
+
+ public String getPeriodicidade()
+ {
+ return (String) get(PERIODICIDADE);
+ }
+
+ public void setPeriodicidade(String periodicidadeValue )
+ {
+ this.set(PERIODICIDADE, periodicidadeValue );
+ }
+
+ public String getActividade()
+ {
+ return (String) get(ACTIVIDADE);
+ }
+
+ public void setActividade(String actividadeValue )
+ {
+ this.set(ACTIVIDADE, actividadeValue );
+ }
+
+ public java.sql.Timestamp getActualizacao()
+ {
+ return (java.sql.Timestamp) get(ACTUALIZACAO);
+ }
+
+ public void setActualizacao(java.sql.Timestamp actualizacaoValue )
+ {
+ this.set(ACTUALIZACAO, actualizacaoValue );
+ }
+
+ public String getDesignacao_social_plain()
+ {
+ return (String) get(DESIGNACAO_SOCIAL_PLAIN);
+ }
+
+ public void setDesignacao_social_plain(String designacao_social_plainValue )
+ {
+ this.set(DESIGNACAO_SOCIAL_PLAIN, designacao_social_plainValue );
+ }
+
+ public String getA_consultas()
+ {
+ return (String) get(A_CONSULTAS);
+ }
+
+ public void setA_consultas(String a_consultasValue )
+ {
+ this.set(A_CONSULTAS, a_consultasValue );
+ }
+
+ public String getA_exames()
+ {
+ return (String) get(A_EXAMES);
+ }
+
+ public void setA_exames(String a_examesValue )
+ {
+ this.set(A_EXAMES, a_examesValue );
+ }
+
+ public String getB_consultas()
+ {
+ return (String) get(B_CONSULTAS);
+ }
+
+ public void setB_consultas(String b_consultasValue )
+ {
+ this.set(B_CONSULTAS, b_consultasValue );
+ }
+
+ public String getB_exames()
+ {
+ return (String) get(B_EXAMES);
+ }
+
+ public void setB_exames(String b_examesValue )
+ {
+ this.set(B_EXAMES, b_examesValue );
+ }
+
+ public java.util.Date getData_cancelamento()
+ {
+ return (java.util.Date) get(DATA_CANCELAMENTO);
+ }
+
+ public void setData_cancelamento(java.util.Date data_cancelamentoValue )
+ {
+ this.set(DATA_CANCELAMENTO, data_cancelamentoValue );
+ }
+
+ public Integer getDuracao()
+ {
+ return (Integer) get(DURACAO);
+ }
+
+ public void setDuracao(Integer duracaoValue )
+ {
+ this.set(DURACAO, duracaoValue );
+ }
+
+ public java.util.Date getInicio_contrato()
+ {
+ return (java.util.Date) get(INICIO_CONTRATO);
+ }
+
+ public void setInicio_contrato(java.util.Date inicio_contratoValue )
+ {
+ this.set(INICIO_CONTRATO, inicio_contratoValue );
+ }
+
+ public Integer getEmpresa_logo_id()
+ {
+ return (Integer) dataHash.get(EMPRESA_LOGO_ID);
+ }
+
+ public void setEmpresa_logo_id(Integer empresa_logo_idValue )
+ {
+ dataHash.put(TO_EMPRESA_LOGO_ID, null);
+ dataHash.put(EMPRESA_LOGO_ID, empresa_logo_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.ImageData toEmpresa_logo_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_EMPRESA_LOGO_ID) == null && getEmpresa_logo_id() != null )
+ {
+ dataHash.put(TO_EMPRESA_LOGO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.ImageData.class, new Object[]{ getEmpresa_logo_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.ImageData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.ImageData) dataHash.get(TO_EMPRESA_LOGO_ID);
+ }
+
+ public void setToEmpresa_logo_id(com.evolute.siprp.server.db.data.siprp_local3.ImageData empresa_logo_idObject )
+ {
+ if( empresa_logo_idObject == null )
+ {
+ dataHash.put(EMPRESA_LOGO_ID, null);
+ }
+ else
+ {
+ dataHash.put(EMPRESA_LOGO_ID, empresa_logo_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.ImageData.ID ));
+ }
+ dataHash.put(TO_EMPRESA_LOGO_ID, empresa_logo_idObject);
+ }
+
+ public Boolean getImprimir_tabela_alargada()
+ {
+ return (Boolean) get(IMPRIMIR_TABELA_ALARGADA);
+ }
+
+ public void setImprimir_tabela_alargada(Boolean imprimir_tabela_alargadaValue )
+ {
+ this.set(IMPRIMIR_TABELA_ALARGADA, imprimir_tabela_alargadaValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_CONTACTO_1.equals( fieldName ) )
+ {
+ value = toContacto_1();
+ }
+ else if( TO_CONTACTO_2.equals( fieldName ) )
+ {
+ value = toContacto_2();
+ }
+ else if( TO_EMPRESA_LOGO_ID.equals( fieldName ) )
+ {
+ value = toEmpresa_logo_id();
+ }
+ else if( EMPRESA_LOGO_ID.equals( fieldName ) )
+ {
+ value = getEmpresa_logo_id();
+ }
+ else if( CONTACTO_1.equals( fieldName ) )
+ {
+ value = getContacto_1();
+ }
+ else if( CONTACTO_2.equals( fieldName ) )
+ {
+ value = getContacto_2();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_CONTACTO_1.equals( fieldName ) )
+ {
+ setToContacto_1( (com.evolute.siprp.server.db.data.siprp_local3.ContactosData) value );
+ }
+ else if( TO_CONTACTO_2.equals( fieldName ) )
+ {
+ setToContacto_2( (com.evolute.siprp.server.db.data.siprp_local3.ContactosData) value );
+ }
+ else if( TO_EMPRESA_LOGO_ID.equals( fieldName ) )
+ {
+ setToEmpresa_logo_id( (com.evolute.siprp.server.db.data.siprp_local3.ImageData) value );
+ }
+ else if( EMPRESA_LOGO_ID.equals( fieldName ) )
+ {
+ setEmpresa_logo_id( (Integer) value );
+ }
+ else if( CONTACTO_1.equals( fieldName ) )
+ {
+ setContacto_1( (Integer) value );
+ }
+ else if( CONTACTO_2.equals( fieldName ) )
+ {
+ setContacto_2( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_CONTACTO_1) != null )
+ {
+ toContacto_1().save();
+ dataHash.put(CONTACTO_1, toContacto_1().get( com.evolute.siprp.server.db.data.siprp_local3.ContactosData.ID ));
+ }
+
+ if( dataHash.get(TO_CONTACTO_2) != null )
+ {
+ toContacto_2().save();
+ dataHash.put(CONTACTO_2, toContacto_2().get( com.evolute.siprp.server.db.data.siprp_local3.ContactosData.ID ));
+ }
+
+ if( dataHash.get(TO_EMPRESA_LOGO_ID) != null )
+ {
+ toEmpresa_logo_id().save();
+ dataHash.put(EMPRESA_LOGO_ID, toEmpresa_logo_id().get( com.evolute.siprp.server.db.data.siprp_local3.ImageData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return Empresas.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Errors.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Errors.java
new file mode 100644
index 00000000..6b0e8d8a
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Errors.java
@@ -0,0 +1,183 @@
+/*
+* Errors.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class Errors implements JDOInnerObject
+{
+ private Integer id;
+ private java.sql.Timestamp date;
+ private String type;
+ private String environment;
+ private String description;
+
+ public Errors()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == ErrorsDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == ErrorsDataAuto.DATE )
+ {
+ return date;
+ }
+ else if( fieldName == ErrorsDataAuto.TYPE )
+ {
+ return type;
+ }
+ else if( fieldName == ErrorsDataAuto.ENVIRONMENT )
+ {
+ return environment;
+ }
+ else if( fieldName == ErrorsDataAuto.DESCRIPTION )
+ {
+ return description;
+ }
+ else if( fieldName.equals( ErrorsDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( ErrorsDataAuto.DATE ) )
+ {
+ return date;
+ }
+ else if( fieldName.equals( ErrorsDataAuto.TYPE ) )
+ {
+ return type;
+ }
+ else if( fieldName.equals( ErrorsDataAuto.ENVIRONMENT ) )
+ {
+ return environment;
+ }
+ else if( fieldName.equals( ErrorsDataAuto.DESCRIPTION ) )
+ {
+ return description;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == ErrorsDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == ErrorsDataAuto.DATE )
+ {
+ date = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName == ErrorsDataAuto.TYPE )
+ {
+ type = ( String ) value;
+ }
+ else if( fieldName == ErrorsDataAuto.ENVIRONMENT )
+ {
+ environment = ( String ) value;
+ }
+ else if( fieldName == ErrorsDataAuto.DESCRIPTION )
+ {
+ description = ( String ) value;
+ }
+ else if( fieldName.equals( ErrorsDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( ErrorsDataAuto.DATE ) )
+ {
+ date = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName.equals( ErrorsDataAuto.TYPE ) )
+ {
+ type = ( String ) value;
+ }
+ else if( fieldName.equals( ErrorsDataAuto.ENVIRONMENT ) )
+ {
+ environment = ( String ) value;
+ }
+ else if( fieldName.equals( ErrorsDataAuto.DESCRIPTION ) )
+ {
+ description = ( String ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public java.sql.Timestamp getDate()
+ {
+ return date;
+ }
+
+ public void setDate(java.sql.Timestamp dateValue )
+ {
+ this.date = dateValue;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+
+ public void setType(String typeValue )
+ {
+ this.type = typeValue;
+ }
+
+ public String getEnvironment()
+ {
+ return environment;
+ }
+
+ public void setEnvironment(String environmentValue )
+ {
+ this.environment = environmentValue;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String descriptionValue )
+ {
+ this.description = descriptionValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return ErrorsDataAuto.class;
+ }
+
+ public ErrorsDataAuto getOuterClassInstance()
+ {
+ ErrorsDataAuto outerObj = new ErrorsDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ErrorsData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ErrorsData.java
new file mode 100644
index 00000000..48187f9b
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ErrorsData.java
@@ -0,0 +1,18 @@
+/*
+* ErrorsDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class ErrorsData extends com.evolute.siprp.server.db.data.siprp_local3.ErrorsDataAuto
+{
+
+ public ErrorsData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ErrorsDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ErrorsDataAuto.java
new file mode 100644
index 00000000..93e4b325
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ErrorsDataAuto.java
@@ -0,0 +1,131 @@
+/*
+* ErrorsDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class ErrorsDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "errors";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "errors.id";
+ public static final String DATE = "date";
+ public static final String DATE_FULL = "errors.date";
+ public static final String TYPE = "type";
+ public static final String TYPE_FULL = "errors.type";
+ public static final String ENVIRONMENT = "environment";
+ public static final String ENVIRONMENT_FULL = "errors.environment";
+ public static final String DESCRIPTION = "description";
+ public static final String DESCRIPTION_FULL = "errors.description";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ DATE, TYPE, ENVIRONMENT, DESCRIPTION, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, DATE, TYPE, ENVIRONMENT, DESCRIPTION, };
+
+ private Map dataHash;
+
+ public ErrorsDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public java.sql.Timestamp getDate()
+ {
+ return (java.sql.Timestamp) get(DATE);
+ }
+
+ public void setDate(java.sql.Timestamp dateValue )
+ {
+ this.set(DATE, dateValue );
+ }
+
+ public String getType()
+ {
+ return (String) get(TYPE);
+ }
+
+ public void setType(String typeValue )
+ {
+ this.set(TYPE, typeValue );
+ }
+
+ public String getEnvironment()
+ {
+ return (String) get(ENVIRONMENT);
+ }
+
+ public void setEnvironment(String environmentValue )
+ {
+ this.set(ENVIRONMENT, environmentValue );
+ }
+
+ public String getDescription()
+ {
+ return (String) get(DESCRIPTION);
+ }
+
+ public void setDescription(String descriptionValue )
+ {
+ this.set(DESCRIPTION, descriptionValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return Errors.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Estabelecimentos.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Estabelecimentos.java
new file mode 100644
index 00000000..7485cfd9
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Estabelecimentos.java
@@ -0,0 +1,453 @@
+/*
+* Estabelecimentos.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class Estabelecimentos implements JDOInnerObject
+{
+ private Integer id;
+ private String nome;
+ private String localidade;
+ private String inactivo;
+ private Integer empresa_id;
+ private String morada;
+ private String codigo_postal;
+ private String contacto_backup;
+ private String historico;
+ private java.sql.Timestamp actualizacao;
+ private String nome_plain;
+ private Integer medico_id;
+ private Integer prestador_consulta_id;
+ private Integer prestador_ecds_id;
+ private Integer contacto_id;
+
+ public Estabelecimentos()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == EstabelecimentosDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.NOME )
+ {
+ return nome;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.LOCALIDADE )
+ {
+ return localidade;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.INACTIVO )
+ {
+ return inactivo;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.EMPRESA_ID )
+ {
+ return empresa_id;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.MORADA )
+ {
+ return morada;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.CODIGO_POSTAL )
+ {
+ return codigo_postal;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.CONTACTO_BACKUP )
+ {
+ return contacto_backup;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.HISTORICO )
+ {
+ return historico;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.ACTUALIZACAO )
+ {
+ return actualizacao;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.NOME_PLAIN )
+ {
+ return nome_plain;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.MEDICO_ID )
+ {
+ return medico_id;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.PRESTADOR_CONSULTA_ID )
+ {
+ return prestador_consulta_id;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.PRESTADOR_ECDS_ID )
+ {
+ return prestador_ecds_id;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.CONTACTO_ID )
+ {
+ return contacto_id;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.NOME ) )
+ {
+ return nome;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.LOCALIDADE ) )
+ {
+ return localidade;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.INACTIVO ) )
+ {
+ return inactivo;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.EMPRESA_ID ) )
+ {
+ return empresa_id;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.MORADA ) )
+ {
+ return morada;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.CODIGO_POSTAL ) )
+ {
+ return codigo_postal;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.CONTACTO_BACKUP ) )
+ {
+ return contacto_backup;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.HISTORICO ) )
+ {
+ return historico;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.ACTUALIZACAO ) )
+ {
+ return actualizacao;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.NOME_PLAIN ) )
+ {
+ return nome_plain;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.MEDICO_ID ) )
+ {
+ return medico_id;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.PRESTADOR_CONSULTA_ID ) )
+ {
+ return prestador_consulta_id;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.PRESTADOR_ECDS_ID ) )
+ {
+ return prestador_ecds_id;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.CONTACTO_ID ) )
+ {
+ return contacto_id;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == EstabelecimentosDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.NOME )
+ {
+ nome = ( String ) value;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.LOCALIDADE )
+ {
+ localidade = ( String ) value;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.INACTIVO )
+ {
+ inactivo = ( String ) value;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.EMPRESA_ID )
+ {
+ empresa_id = ( Integer ) value;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.MORADA )
+ {
+ morada = ( String ) value;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.CODIGO_POSTAL )
+ {
+ codigo_postal = ( String ) value;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.CONTACTO_BACKUP )
+ {
+ contacto_backup = ( String ) value;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.HISTORICO )
+ {
+ historico = ( String ) value;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.ACTUALIZACAO )
+ {
+ actualizacao = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.NOME_PLAIN )
+ {
+ nome_plain = ( String ) value;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.MEDICO_ID )
+ {
+ medico_id = ( Integer ) value;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.PRESTADOR_CONSULTA_ID )
+ {
+ prestador_consulta_id = ( Integer ) value;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.PRESTADOR_ECDS_ID )
+ {
+ prestador_ecds_id = ( Integer ) value;
+ }
+ else if( fieldName == EstabelecimentosDataAuto.CONTACTO_ID )
+ {
+ contacto_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.NOME ) )
+ {
+ nome = ( String ) value;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.LOCALIDADE ) )
+ {
+ localidade = ( String ) value;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.INACTIVO ) )
+ {
+ inactivo = ( String ) value;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.EMPRESA_ID ) )
+ {
+ empresa_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.MORADA ) )
+ {
+ morada = ( String ) value;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.CODIGO_POSTAL ) )
+ {
+ codigo_postal = ( String ) value;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.CONTACTO_BACKUP ) )
+ {
+ contacto_backup = ( String ) value;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.HISTORICO ) )
+ {
+ historico = ( String ) value;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.ACTUALIZACAO ) )
+ {
+ actualizacao = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.NOME_PLAIN ) )
+ {
+ nome_plain = ( String ) value;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.MEDICO_ID ) )
+ {
+ medico_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.PRESTADOR_CONSULTA_ID ) )
+ {
+ prestador_consulta_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.PRESTADOR_ECDS_ID ) )
+ {
+ prestador_ecds_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( EstabelecimentosDataAuto.CONTACTO_ID ) )
+ {
+ contacto_id = ( Integer ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getNome()
+ {
+ return nome;
+ }
+
+ public void setNome(String nomeValue )
+ {
+ this.nome = nomeValue;
+ }
+
+ public String getLocalidade()
+ {
+ return localidade;
+ }
+
+ public void setLocalidade(String localidadeValue )
+ {
+ this.localidade = localidadeValue;
+ }
+
+ public String getInactivo()
+ {
+ return inactivo;
+ }
+
+ public void setInactivo(String inactivoValue )
+ {
+ this.inactivo = inactivoValue;
+ }
+
+ public Integer getEmpresa_id()
+ {
+ return empresa_id;
+ }
+
+ public void setEmpresa_id(Integer empresa_idValue )
+ {
+ this.empresa_id = empresa_idValue;
+ }
+
+ public String getMorada()
+ {
+ return morada;
+ }
+
+ public void setMorada(String moradaValue )
+ {
+ this.morada = moradaValue;
+ }
+
+ public String getCodigo_postal()
+ {
+ return codigo_postal;
+ }
+
+ public void setCodigo_postal(String codigo_postalValue )
+ {
+ this.codigo_postal = codigo_postalValue;
+ }
+
+ public String getContacto_backup()
+ {
+ return contacto_backup;
+ }
+
+ public void setContacto_backup(String contacto_backupValue )
+ {
+ this.contacto_backup = contacto_backupValue;
+ }
+
+ public String getHistorico()
+ {
+ return historico;
+ }
+
+ public void setHistorico(String historicoValue )
+ {
+ this.historico = historicoValue;
+ }
+
+ public java.sql.Timestamp getActualizacao()
+ {
+ return actualizacao;
+ }
+
+ public void setActualizacao(java.sql.Timestamp actualizacaoValue )
+ {
+ this.actualizacao = actualizacaoValue;
+ }
+
+ public String getNome_plain()
+ {
+ return nome_plain;
+ }
+
+ public void setNome_plain(String nome_plainValue )
+ {
+ this.nome_plain = nome_plainValue;
+ }
+
+ public Integer getMedico_id()
+ {
+ return medico_id;
+ }
+
+ public void setMedico_id(Integer medico_idValue )
+ {
+ this.medico_id = medico_idValue;
+ }
+
+ public Integer getPrestador_consulta_id()
+ {
+ return prestador_consulta_id;
+ }
+
+ public void setPrestador_consulta_id(Integer prestador_consulta_idValue )
+ {
+ this.prestador_consulta_id = prestador_consulta_idValue;
+ }
+
+ public Integer getPrestador_ecds_id()
+ {
+ return prestador_ecds_id;
+ }
+
+ public void setPrestador_ecds_id(Integer prestador_ecds_idValue )
+ {
+ this.prestador_ecds_id = prestador_ecds_idValue;
+ }
+
+ public Integer getContacto_id()
+ {
+ return contacto_id;
+ }
+
+ public void setContacto_id(Integer contacto_idValue )
+ {
+ this.contacto_id = contacto_idValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return EstabelecimentosDataAuto.class;
+ }
+
+ public EstabelecimentosDataAuto getOuterClassInstance()
+ {
+ EstabelecimentosDataAuto outerObj = new EstabelecimentosDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EstabelecimentosData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EstabelecimentosData.java
new file mode 100644
index 00000000..a695b73a
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EstabelecimentosData.java
@@ -0,0 +1,18 @@
+/*
+* EstabelecimentosDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class EstabelecimentosData extends com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosDataAuto
+{
+
+ public EstabelecimentosData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EstabelecimentosDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EstabelecimentosDataAuto.java
new file mode 100644
index 00000000..038eeab5
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EstabelecimentosDataAuto.java
@@ -0,0 +1,503 @@
+/*
+* EstabelecimentosDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class EstabelecimentosDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "estabelecimentos";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "estabelecimentos.id";
+ public static final String NOME = "nome";
+ public static final String NOME_FULL = "estabelecimentos.nome";
+ public static final String LOCALIDADE = "localidade";
+ public static final String LOCALIDADE_FULL = "estabelecimentos.localidade";
+ public static final String INACTIVO = "inactivo";
+ public static final String INACTIVO_FULL = "estabelecimentos.inactivo";
+ public static final String EMPRESA_ID = "empresa_id";
+ public static final String EMPRESA_ID_FULL = "estabelecimentos.empresa_id";
+ public static final String TO_EMPRESA_ID = "to empresa_id";
+ public static final String MORADA = "morada";
+ public static final String MORADA_FULL = "estabelecimentos.morada";
+ public static final String CODIGO_POSTAL = "codigo_postal";
+ public static final String CODIGO_POSTAL_FULL = "estabelecimentos.codigo_postal";
+ public static final String CONTACTO_BACKUP = "contacto_backup";
+ public static final String CONTACTO_BACKUP_FULL = "estabelecimentos.contacto_backup";
+ public static final String HISTORICO = "historico";
+ public static final String HISTORICO_FULL = "estabelecimentos.historico";
+ public static final String ACTUALIZACAO = "actualizacao";
+ public static final String ACTUALIZACAO_FULL = "estabelecimentos.actualizacao";
+ public static final String NOME_PLAIN = "nome_plain";
+ public static final String NOME_PLAIN_FULL = "estabelecimentos.nome_plain";
+ public static final String MEDICO_ID = "medico_id";
+ public static final String MEDICO_ID_FULL = "estabelecimentos.medico_id";
+ public static final String TO_MEDICO_ID = "to medico_id";
+ public static final String PRESTADOR_CONSULTA_ID = "prestador_consulta_id";
+ public static final String PRESTADOR_CONSULTA_ID_FULL = "estabelecimentos.prestador_consulta_id";
+ public static final String TO_PRESTADOR_CONSULTA_ID = "to prestador_consulta_id";
+ public static final String PRESTADOR_ECDS_ID = "prestador_ecds_id";
+ public static final String PRESTADOR_ECDS_ID_FULL = "estabelecimentos.prestador_ecds_id";
+ public static final String TO_PRESTADOR_ECDS_ID = "to prestador_ecds_id";
+ public static final String CONTACTO_ID = "contacto_id";
+ public static final String CONTACTO_ID_FULL = "estabelecimentos.contacto_id";
+ public static final String TO_CONTACTO_ID = "to contacto_id";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ NOME, LOCALIDADE, INACTIVO, EMPRESA_ID, TO_EMPRESA_ID, MORADA, CODIGO_POSTAL,
+ CONTACTO_BACKUP, HISTORICO, ACTUALIZACAO, NOME_PLAIN, MEDICO_ID, TO_MEDICO_ID,
+ PRESTADOR_CONSULTA_ID, TO_PRESTADOR_CONSULTA_ID, PRESTADOR_ECDS_ID,
+ TO_PRESTADOR_ECDS_ID, CONTACTO_ID, TO_CONTACTO_ID, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, NOME, LOCALIDADE, INACTIVO, EMPRESA_ID, MORADA, CODIGO_POSTAL, CONTACTO_BACKUP,
+ HISTORICO, ACTUALIZACAO, NOME_PLAIN, MEDICO_ID, PRESTADOR_CONSULTA_ID,
+ PRESTADOR_ECDS_ID, CONTACTO_ID, };
+
+ private Map dataHash;
+
+ public EstabelecimentosDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getNome()
+ {
+ return (String) get(NOME);
+ }
+
+ public void setNome(String nomeValue )
+ {
+ this.set(NOME, nomeValue );
+ }
+
+ public String getLocalidade()
+ {
+ return (String) get(LOCALIDADE);
+ }
+
+ public void setLocalidade(String localidadeValue )
+ {
+ this.set(LOCALIDADE, localidadeValue );
+ }
+
+ public String getInactivo()
+ {
+ return (String) get(INACTIVO);
+ }
+
+ public void setInactivo(String inactivoValue )
+ {
+ this.set(INACTIVO, inactivoValue );
+ }
+
+ public Integer getEmpresa_id()
+ {
+ return (Integer) dataHash.get(EMPRESA_ID);
+ }
+
+ public void setEmpresa_id(Integer empresa_idValue )
+ {
+ dataHash.put(TO_EMPRESA_ID, null);
+ dataHash.put(EMPRESA_ID, empresa_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.EmpresasData toEmpresa_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_EMPRESA_ID) == null && getEmpresa_id() != null )
+ {
+ dataHash.put(TO_EMPRESA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.class, new Object[]{ getEmpresa_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) dataHash.get(TO_EMPRESA_ID);
+ }
+
+ public void setToEmpresa_id(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData empresa_idObject )
+ {
+ if( empresa_idObject == null )
+ {
+ dataHash.put(EMPRESA_ID, null);
+ }
+ else
+ {
+ dataHash.put(EMPRESA_ID, empresa_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID ));
+ }
+ dataHash.put(TO_EMPRESA_ID, empresa_idObject);
+ }
+
+ public String getMorada()
+ {
+ return (String) get(MORADA);
+ }
+
+ public void setMorada(String moradaValue )
+ {
+ this.set(MORADA, moradaValue );
+ }
+
+ public String getCodigo_postal()
+ {
+ return (String) get(CODIGO_POSTAL);
+ }
+
+ public void setCodigo_postal(String codigo_postalValue )
+ {
+ this.set(CODIGO_POSTAL, codigo_postalValue );
+ }
+
+ public String getContacto_backup()
+ {
+ return (String) get(CONTACTO_BACKUP);
+ }
+
+ public void setContacto_backup(String contacto_backupValue )
+ {
+ this.set(CONTACTO_BACKUP, contacto_backupValue );
+ }
+
+ public String getHistorico()
+ {
+ return (String) get(HISTORICO);
+ }
+
+ public void setHistorico(String historicoValue )
+ {
+ this.set(HISTORICO, historicoValue );
+ }
+
+ public java.sql.Timestamp getActualizacao()
+ {
+ return (java.sql.Timestamp) get(ACTUALIZACAO);
+ }
+
+ public void setActualizacao(java.sql.Timestamp actualizacaoValue )
+ {
+ this.set(ACTUALIZACAO, actualizacaoValue );
+ }
+
+ public String getNome_plain()
+ {
+ return (String) get(NOME_PLAIN);
+ }
+
+ public void setNome_plain(String nome_plainValue )
+ {
+ this.set(NOME_PLAIN, nome_plainValue );
+ }
+
+ public Integer getMedico_id()
+ {
+ return (Integer) dataHash.get(MEDICO_ID);
+ }
+
+ public void setMedico_id(Integer medico_idValue )
+ {
+ dataHash.put(TO_MEDICO_ID, null);
+ dataHash.put(MEDICO_ID, medico_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.MedicosData toMedico_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_MEDICO_ID) == null && getMedico_id() != null )
+ {
+ dataHash.put(TO_MEDICO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.MedicosData.class, new Object[]{ getMedico_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.MedicosData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.MedicosData) dataHash.get(TO_MEDICO_ID);
+ }
+
+ public void setToMedico_id(com.evolute.siprp.server.db.data.siprp_local3.MedicosData medico_idObject )
+ {
+ if( medico_idObject == null )
+ {
+ dataHash.put(MEDICO_ID, null);
+ }
+ else
+ {
+ dataHash.put(MEDICO_ID, medico_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.MedicosData.ID ));
+ }
+ dataHash.put(TO_MEDICO_ID, medico_idObject);
+ }
+
+ public Integer getPrestador_consulta_id()
+ {
+ return (Integer) dataHash.get(PRESTADOR_CONSULTA_ID);
+ }
+
+ public void setPrestador_consulta_id(Integer prestador_consulta_idValue )
+ {
+ dataHash.put(TO_PRESTADOR_CONSULTA_ID, null);
+ dataHash.put(PRESTADOR_CONSULTA_ID, prestador_consulta_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData toPrestador_consulta_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_PRESTADOR_CONSULTA_ID) == null && getPrestador_consulta_id() != null )
+ {
+ dataHash.put(TO_PRESTADOR_CONSULTA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.class, new Object[]{ getPrestador_consulta_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) dataHash.get(TO_PRESTADOR_CONSULTA_ID);
+ }
+
+ public void setToPrestador_consulta_id(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData prestador_consulta_idObject )
+ {
+ if( prestador_consulta_idObject == null )
+ {
+ dataHash.put(PRESTADOR_CONSULTA_ID, null);
+ }
+ else
+ {
+ dataHash.put(PRESTADOR_CONSULTA_ID, prestador_consulta_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID ));
+ }
+ dataHash.put(TO_PRESTADOR_CONSULTA_ID, prestador_consulta_idObject);
+ }
+
+ public Integer getPrestador_ecds_id()
+ {
+ return (Integer) dataHash.get(PRESTADOR_ECDS_ID);
+ }
+
+ public void setPrestador_ecds_id(Integer prestador_ecds_idValue )
+ {
+ dataHash.put(TO_PRESTADOR_ECDS_ID, null);
+ dataHash.put(PRESTADOR_ECDS_ID, prestador_ecds_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData toPrestador_ecds_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_PRESTADOR_ECDS_ID) == null && getPrestador_ecds_id() != null )
+ {
+ dataHash.put(TO_PRESTADOR_ECDS_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.class, new Object[]{ getPrestador_ecds_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) dataHash.get(TO_PRESTADOR_ECDS_ID);
+ }
+
+ public void setToPrestador_ecds_id(com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData prestador_ecds_idObject )
+ {
+ if( prestador_ecds_idObject == null )
+ {
+ dataHash.put(PRESTADOR_ECDS_ID, null);
+ }
+ else
+ {
+ dataHash.put(PRESTADOR_ECDS_ID, prestador_ecds_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID ));
+ }
+ dataHash.put(TO_PRESTADOR_ECDS_ID, prestador_ecds_idObject);
+ }
+
+ public Integer getContacto_id()
+ {
+ return (Integer) dataHash.get(CONTACTO_ID);
+ }
+
+ public void setContacto_id(Integer contacto_idValue )
+ {
+ dataHash.put(TO_CONTACTO_ID, null);
+ dataHash.put(CONTACTO_ID, contacto_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.ContactosData toContacto_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_CONTACTO_ID) == null && getContacto_id() != null )
+ {
+ dataHash.put(TO_CONTACTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.ContactosData.class, new Object[]{ getContacto_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.ContactosData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.ContactosData) dataHash.get(TO_CONTACTO_ID);
+ }
+
+ public void setToContacto_id(com.evolute.siprp.server.db.data.siprp_local3.ContactosData contacto_idObject )
+ {
+ if( contacto_idObject == null )
+ {
+ dataHash.put(CONTACTO_ID, null);
+ }
+ else
+ {
+ dataHash.put(CONTACTO_ID, contacto_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.ContactosData.ID ));
+ }
+ dataHash.put(TO_CONTACTO_ID, contacto_idObject);
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( CONTACTO_ID.equals( fieldName ) )
+ {
+ value = getContacto_id();
+ }
+ else if( TO_PRESTADOR_ECDS_ID.equals( fieldName ) )
+ {
+ value = toPrestador_ecds_id();
+ }
+ else if( TO_PRESTADOR_CONSULTA_ID.equals( fieldName ) )
+ {
+ value = toPrestador_consulta_id();
+ }
+ else if( TO_CONTACTO_ID.equals( fieldName ) )
+ {
+ value = toContacto_id();
+ }
+ else if( TO_EMPRESA_ID.equals( fieldName ) )
+ {
+ value = toEmpresa_id();
+ }
+ else if( PRESTADOR_CONSULTA_ID.equals( fieldName ) )
+ {
+ value = getPrestador_consulta_id();
+ }
+ else if( EMPRESA_ID.equals( fieldName ) )
+ {
+ value = getEmpresa_id();
+ }
+ else if( TO_MEDICO_ID.equals( fieldName ) )
+ {
+ value = toMedico_id();
+ }
+ else if( PRESTADOR_ECDS_ID.equals( fieldName ) )
+ {
+ value = getPrestador_ecds_id();
+ }
+ else if( MEDICO_ID.equals( fieldName ) )
+ {
+ value = getMedico_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( CONTACTO_ID.equals( fieldName ) )
+ {
+ setContacto_id( (Integer) value );
+ }
+ else if( TO_PRESTADOR_ECDS_ID.equals( fieldName ) )
+ {
+ setToPrestador_ecds_id( (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) value );
+ }
+ else if( TO_PRESTADOR_CONSULTA_ID.equals( fieldName ) )
+ {
+ setToPrestador_consulta_id( (com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData) value );
+ }
+ else if( TO_CONTACTO_ID.equals( fieldName ) )
+ {
+ setToContacto_id( (com.evolute.siprp.server.db.data.siprp_local3.ContactosData) value );
+ }
+ else if( TO_EMPRESA_ID.equals( fieldName ) )
+ {
+ setToEmpresa_id( (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) value );
+ }
+ else if( PRESTADOR_CONSULTA_ID.equals( fieldName ) )
+ {
+ setPrestador_consulta_id( (Integer) value );
+ }
+ else if( EMPRESA_ID.equals( fieldName ) )
+ {
+ setEmpresa_id( (Integer) value );
+ }
+ else if( TO_MEDICO_ID.equals( fieldName ) )
+ {
+ setToMedico_id( (com.evolute.siprp.server.db.data.siprp_local3.MedicosData) value );
+ }
+ else if( PRESTADOR_ECDS_ID.equals( fieldName ) )
+ {
+ setPrestador_ecds_id( (Integer) value );
+ }
+ else if( MEDICO_ID.equals( fieldName ) )
+ {
+ setMedico_id( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_EMPRESA_ID) != null )
+ {
+ toEmpresa_id().save();
+ dataHash.put(EMPRESA_ID, toEmpresa_id().get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID ));
+ }
+
+ if( dataHash.get(TO_MEDICO_ID) != null )
+ {
+ toMedico_id().save();
+ dataHash.put(MEDICO_ID, toMedico_id().get( com.evolute.siprp.server.db.data.siprp_local3.MedicosData.ID ));
+ }
+
+ if( dataHash.get(TO_PRESTADOR_CONSULTA_ID) != null )
+ {
+ toPrestador_consulta_id().save();
+ dataHash.put(PRESTADOR_CONSULTA_ID, toPrestador_consulta_id().get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID ));
+ }
+
+ if( dataHash.get(TO_PRESTADOR_ECDS_ID) != null )
+ {
+ toPrestador_ecds_id().save();
+ dataHash.put(PRESTADOR_ECDS_ID, toPrestador_ecds_id().get( com.evolute.siprp.server.db.data.siprp_local3.PrestadoresData.ID ));
+ }
+
+ if( dataHash.get(TO_CONTACTO_ID) != null )
+ {
+ toContacto_id().save();
+ dataHash.put(CONTACTO_ID, toContacto_id().get( com.evolute.siprp.server.db.data.siprp_local3.ContactosData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return Estabelecimentos.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Etiquetas.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Etiquetas.java
new file mode 100644
index 00000000..612e886b
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Etiquetas.java
@@ -0,0 +1,426 @@
+/*
+* Etiquetas.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class Etiquetas implements JDOInnerObject
+{
+ private Integer id;
+ private String descricao;
+ private String descricao_plain;
+ private Double altura;
+ private Double largura;
+ private Double margem_esquerda;
+ private Double margem_cima;
+ private Integer colunas;
+ private Integer linhas;
+ private String continua;
+ private Double altura_folha;
+ private Double largura_folha;
+ private Double margem_vertical_folha;
+ private Double margem_horizontal_folha;
+
+ public Etiquetas()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == EtiquetasDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == EtiquetasDataAuto.DESCRICAO )
+ {
+ return descricao;
+ }
+ else if( fieldName == EtiquetasDataAuto.DESCRICAO_PLAIN )
+ {
+ return descricao_plain;
+ }
+ else if( fieldName == EtiquetasDataAuto.ALTURA )
+ {
+ return altura;
+ }
+ else if( fieldName == EtiquetasDataAuto.LARGURA )
+ {
+ return largura;
+ }
+ else if( fieldName == EtiquetasDataAuto.MARGEM_ESQUERDA )
+ {
+ return margem_esquerda;
+ }
+ else if( fieldName == EtiquetasDataAuto.MARGEM_CIMA )
+ {
+ return margem_cima;
+ }
+ else if( fieldName == EtiquetasDataAuto.COLUNAS )
+ {
+ return colunas;
+ }
+ else if( fieldName == EtiquetasDataAuto.LINHAS )
+ {
+ return linhas;
+ }
+ else if( fieldName == EtiquetasDataAuto.CONTINUA )
+ {
+ return continua;
+ }
+ else if( fieldName == EtiquetasDataAuto.ALTURA_FOLHA )
+ {
+ return altura_folha;
+ }
+ else if( fieldName == EtiquetasDataAuto.LARGURA_FOLHA )
+ {
+ return largura_folha;
+ }
+ else if( fieldName == EtiquetasDataAuto.MARGEM_VERTICAL_FOLHA )
+ {
+ return margem_vertical_folha;
+ }
+ else if( fieldName == EtiquetasDataAuto.MARGEM_HORIZONTAL_FOLHA )
+ {
+ return margem_horizontal_folha;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.DESCRICAO ) )
+ {
+ return descricao;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.DESCRICAO_PLAIN ) )
+ {
+ return descricao_plain;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.ALTURA ) )
+ {
+ return altura;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.LARGURA ) )
+ {
+ return largura;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.MARGEM_ESQUERDA ) )
+ {
+ return margem_esquerda;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.MARGEM_CIMA ) )
+ {
+ return margem_cima;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.COLUNAS ) )
+ {
+ return colunas;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.LINHAS ) )
+ {
+ return linhas;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.CONTINUA ) )
+ {
+ return continua;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.ALTURA_FOLHA ) )
+ {
+ return altura_folha;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.LARGURA_FOLHA ) )
+ {
+ return largura_folha;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.MARGEM_VERTICAL_FOLHA ) )
+ {
+ return margem_vertical_folha;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.MARGEM_HORIZONTAL_FOLHA ) )
+ {
+ return margem_horizontal_folha;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == EtiquetasDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == EtiquetasDataAuto.DESCRICAO )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName == EtiquetasDataAuto.DESCRICAO_PLAIN )
+ {
+ descricao_plain = ( String ) value;
+ }
+ else if( fieldName == EtiquetasDataAuto.ALTURA )
+ {
+ altura = ( Double ) value;
+ }
+ else if( fieldName == EtiquetasDataAuto.LARGURA )
+ {
+ largura = ( Double ) value;
+ }
+ else if( fieldName == EtiquetasDataAuto.MARGEM_ESQUERDA )
+ {
+ margem_esquerda = ( Double ) value;
+ }
+ else if( fieldName == EtiquetasDataAuto.MARGEM_CIMA )
+ {
+ margem_cima = ( Double ) value;
+ }
+ else if( fieldName == EtiquetasDataAuto.COLUNAS )
+ {
+ colunas = ( Integer ) value;
+ }
+ else if( fieldName == EtiquetasDataAuto.LINHAS )
+ {
+ linhas = ( Integer ) value;
+ }
+ else if( fieldName == EtiquetasDataAuto.CONTINUA )
+ {
+ continua = ( String ) value;
+ }
+ else if( fieldName == EtiquetasDataAuto.ALTURA_FOLHA )
+ {
+ altura_folha = ( Double ) value;
+ }
+ else if( fieldName == EtiquetasDataAuto.LARGURA_FOLHA )
+ {
+ largura_folha = ( Double ) value;
+ }
+ else if( fieldName == EtiquetasDataAuto.MARGEM_VERTICAL_FOLHA )
+ {
+ margem_vertical_folha = ( Double ) value;
+ }
+ else if( fieldName == EtiquetasDataAuto.MARGEM_HORIZONTAL_FOLHA )
+ {
+ margem_horizontal_folha = ( Double ) value;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.DESCRICAO ) )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.DESCRICAO_PLAIN ) )
+ {
+ descricao_plain = ( String ) value;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.ALTURA ) )
+ {
+ altura = ( Double ) value;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.LARGURA ) )
+ {
+ largura = ( Double ) value;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.MARGEM_ESQUERDA ) )
+ {
+ margem_esquerda = ( Double ) value;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.MARGEM_CIMA ) )
+ {
+ margem_cima = ( Double ) value;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.COLUNAS ) )
+ {
+ colunas = ( Integer ) value;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.LINHAS ) )
+ {
+ linhas = ( Integer ) value;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.CONTINUA ) )
+ {
+ continua = ( String ) value;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.ALTURA_FOLHA ) )
+ {
+ altura_folha = ( Double ) value;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.LARGURA_FOLHA ) )
+ {
+ largura_folha = ( Double ) value;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.MARGEM_VERTICAL_FOLHA ) )
+ {
+ margem_vertical_folha = ( Double ) value;
+ }
+ else if( fieldName.equals( EtiquetasDataAuto.MARGEM_HORIZONTAL_FOLHA ) )
+ {
+ margem_horizontal_folha = ( Double ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getDescricao()
+ {
+ return descricao;
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.descricao = descricaoValue;
+ }
+
+ public String getDescricao_plain()
+ {
+ return descricao_plain;
+ }
+
+ public void setDescricao_plain(String descricao_plainValue )
+ {
+ this.descricao_plain = descricao_plainValue;
+ }
+
+ public Double getAltura()
+ {
+ return altura;
+ }
+
+ public void setAltura(Double alturaValue )
+ {
+ this.altura = alturaValue;
+ }
+
+ public Double getLargura()
+ {
+ return largura;
+ }
+
+ public void setLargura(Double larguraValue )
+ {
+ this.largura = larguraValue;
+ }
+
+ public Double getMargem_esquerda()
+ {
+ return margem_esquerda;
+ }
+
+ public void setMargem_esquerda(Double margem_esquerdaValue )
+ {
+ this.margem_esquerda = margem_esquerdaValue;
+ }
+
+ public Double getMargem_cima()
+ {
+ return margem_cima;
+ }
+
+ public void setMargem_cima(Double margem_cimaValue )
+ {
+ this.margem_cima = margem_cimaValue;
+ }
+
+ public Integer getColunas()
+ {
+ return colunas;
+ }
+
+ public void setColunas(Integer colunasValue )
+ {
+ this.colunas = colunasValue;
+ }
+
+ public Integer getLinhas()
+ {
+ return linhas;
+ }
+
+ public void setLinhas(Integer linhasValue )
+ {
+ this.linhas = linhasValue;
+ }
+
+ public String getContinua()
+ {
+ return continua;
+ }
+
+ public void setContinua(String continuaValue )
+ {
+ this.continua = continuaValue;
+ }
+
+ public Double getAltura_folha()
+ {
+ return altura_folha;
+ }
+
+ public void setAltura_folha(Double altura_folhaValue )
+ {
+ this.altura_folha = altura_folhaValue;
+ }
+
+ public Double getLargura_folha()
+ {
+ return largura_folha;
+ }
+
+ public void setLargura_folha(Double largura_folhaValue )
+ {
+ this.largura_folha = largura_folhaValue;
+ }
+
+ public Double getMargem_vertical_folha()
+ {
+ return margem_vertical_folha;
+ }
+
+ public void setMargem_vertical_folha(Double margem_vertical_folhaValue )
+ {
+ this.margem_vertical_folha = margem_vertical_folhaValue;
+ }
+
+ public Double getMargem_horizontal_folha()
+ {
+ return margem_horizontal_folha;
+ }
+
+ public void setMargem_horizontal_folha(Double margem_horizontal_folhaValue )
+ {
+ this.margem_horizontal_folha = margem_horizontal_folhaValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return EtiquetasDataAuto.class;
+ }
+
+ public EtiquetasDataAuto getOuterClassInstance()
+ {
+ EtiquetasDataAuto outerObj = new EtiquetasDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EtiquetasData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EtiquetasData.java
new file mode 100644
index 00000000..9fcc0122
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EtiquetasData.java
@@ -0,0 +1,18 @@
+/*
+* EtiquetasDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class EtiquetasData extends com.evolute.siprp.server.db.data.siprp_local3.EtiquetasDataAuto
+{
+
+ public EtiquetasData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EtiquetasDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EtiquetasDataAuto.java
new file mode 100644
index 00000000..650d0e17
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/EtiquetasDataAuto.java
@@ -0,0 +1,243 @@
+/*
+* EtiquetasDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class EtiquetasDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "etiquetas";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "etiquetas.id";
+ public static final String DESCRICAO = "descricao";
+ public static final String DESCRICAO_FULL = "etiquetas.descricao";
+ public static final String DESCRICAO_PLAIN = "descricao_plain";
+ public static final String DESCRICAO_PLAIN_FULL = "etiquetas.descricao_plain";
+ public static final String ALTURA = "altura";
+ public static final String ALTURA_FULL = "etiquetas.altura";
+ public static final String LARGURA = "largura";
+ public static final String LARGURA_FULL = "etiquetas.largura";
+ public static final String MARGEM_ESQUERDA = "margem_esquerda";
+ public static final String MARGEM_ESQUERDA_FULL = "etiquetas.margem_esquerda";
+ public static final String MARGEM_CIMA = "margem_cima";
+ public static final String MARGEM_CIMA_FULL = "etiquetas.margem_cima";
+ public static final String COLUNAS = "colunas";
+ public static final String COLUNAS_FULL = "etiquetas.colunas";
+ public static final String LINHAS = "linhas";
+ public static final String LINHAS_FULL = "etiquetas.linhas";
+ public static final String CONTINUA = "continua";
+ public static final String CONTINUA_FULL = "etiquetas.continua";
+ public static final String ALTURA_FOLHA = "altura_folha";
+ public static final String ALTURA_FOLHA_FULL = "etiquetas.altura_folha";
+ public static final String LARGURA_FOLHA = "largura_folha";
+ public static final String LARGURA_FOLHA_FULL = "etiquetas.largura_folha";
+ public static final String MARGEM_VERTICAL_FOLHA = "margem_vertical_folha";
+ public static final String MARGEM_VERTICAL_FOLHA_FULL = "etiquetas.margem_vertical_folha";
+ public static final String MARGEM_HORIZONTAL_FOLHA = "margem_horizontal_folha";
+ public static final String MARGEM_HORIZONTAL_FOLHA_FULL = "etiquetas.margem_horizontal_folha";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ DESCRICAO, DESCRICAO_PLAIN, ALTURA, LARGURA, MARGEM_ESQUERDA, MARGEM_CIMA, COLUNAS,
+ LINHAS, CONTINUA, ALTURA_FOLHA, LARGURA_FOLHA, MARGEM_VERTICAL_FOLHA,
+ MARGEM_HORIZONTAL_FOLHA, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, DESCRICAO, DESCRICAO_PLAIN, ALTURA, LARGURA, MARGEM_ESQUERDA, MARGEM_CIMA,
+ COLUNAS, LINHAS, CONTINUA, ALTURA_FOLHA, LARGURA_FOLHA, MARGEM_VERTICAL_FOLHA,
+ MARGEM_HORIZONTAL_FOLHA, };
+
+ private Map dataHash;
+
+ public EtiquetasDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getDescricao()
+ {
+ return (String) get(DESCRICAO);
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.set(DESCRICAO, descricaoValue );
+ }
+
+ public String getDescricao_plain()
+ {
+ return (String) get(DESCRICAO_PLAIN);
+ }
+
+ public void setDescricao_plain(String descricao_plainValue )
+ {
+ this.set(DESCRICAO_PLAIN, descricao_plainValue );
+ }
+
+ public Double getAltura()
+ {
+ return (Double) get(ALTURA);
+ }
+
+ public void setAltura(Double alturaValue )
+ {
+ this.set(ALTURA, alturaValue );
+ }
+
+ public Double getLargura()
+ {
+ return (Double) get(LARGURA);
+ }
+
+ public void setLargura(Double larguraValue )
+ {
+ this.set(LARGURA, larguraValue );
+ }
+
+ public Double getMargem_esquerda()
+ {
+ return (Double) get(MARGEM_ESQUERDA);
+ }
+
+ public void setMargem_esquerda(Double margem_esquerdaValue )
+ {
+ this.set(MARGEM_ESQUERDA, margem_esquerdaValue );
+ }
+
+ public Double getMargem_cima()
+ {
+ return (Double) get(MARGEM_CIMA);
+ }
+
+ public void setMargem_cima(Double margem_cimaValue )
+ {
+ this.set(MARGEM_CIMA, margem_cimaValue );
+ }
+
+ public Integer getColunas()
+ {
+ return (Integer) get(COLUNAS);
+ }
+
+ public void setColunas(Integer colunasValue )
+ {
+ this.set(COLUNAS, colunasValue );
+ }
+
+ public Integer getLinhas()
+ {
+ return (Integer) get(LINHAS);
+ }
+
+ public void setLinhas(Integer linhasValue )
+ {
+ this.set(LINHAS, linhasValue );
+ }
+
+ public String getContinua()
+ {
+ return (String) get(CONTINUA);
+ }
+
+ public void setContinua(String continuaValue )
+ {
+ this.set(CONTINUA, continuaValue );
+ }
+
+ public Double getAltura_folha()
+ {
+ return (Double) get(ALTURA_FOLHA);
+ }
+
+ public void setAltura_folha(Double altura_folhaValue )
+ {
+ this.set(ALTURA_FOLHA, altura_folhaValue );
+ }
+
+ public Double getLargura_folha()
+ {
+ return (Double) get(LARGURA_FOLHA);
+ }
+
+ public void setLargura_folha(Double largura_folhaValue )
+ {
+ this.set(LARGURA_FOLHA, largura_folhaValue );
+ }
+
+ public Double getMargem_vertical_folha()
+ {
+ return (Double) get(MARGEM_VERTICAL_FOLHA);
+ }
+
+ public void setMargem_vertical_folha(Double margem_vertical_folhaValue )
+ {
+ this.set(MARGEM_VERTICAL_FOLHA, margem_vertical_folhaValue );
+ }
+
+ public Double getMargem_horizontal_folha()
+ {
+ return (Double) get(MARGEM_HORIZONTAL_FOLHA);
+ }
+
+ public void setMargem_horizontal_folha(Double margem_horizontal_folhaValue )
+ {
+ this.set(MARGEM_HORIZONTAL_FOLHA, margem_horizontal_folhaValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return Etiquetas.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Exames.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Exames.java
new file mode 100644
index 00000000..db6ff331
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/Exames.java
@@ -0,0 +1,507 @@
+/*
+* Exames.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class Exames implements JDOInnerObject
+{
+ private Integer id;
+ private java.util.Date data;
+ private Integer tipo;
+ private Integer ocasional;
+ private String outro_tipo;
+ private Integer resultado;
+ private String outra_funcao_1;
+ private String outra_funcao_2;
+ private String outra_funcao_3;
+ private String outra_funcao_4;
+ private java.util.Date proximo_exame;
+ private String outras_recomendacoes;
+ private String inactivo;
+ private Integer trabalhador_id;
+ private Integer medico_id;
+ private byte[] pdf;
+ private byte[] fo;
+
+ public Exames()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == ExamesDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == ExamesDataAuto.DATA )
+ {
+ return data;
+ }
+ else if( fieldName == ExamesDataAuto.TIPO )
+ {
+ return tipo;
+ }
+ else if( fieldName == ExamesDataAuto.OCASIONAL )
+ {
+ return ocasional;
+ }
+ else if( fieldName == ExamesDataAuto.OUTRO_TIPO )
+ {
+ return outro_tipo;
+ }
+ else if( fieldName == ExamesDataAuto.RESULTADO )
+ {
+ return resultado;
+ }
+ else if( fieldName == ExamesDataAuto.OUTRA_FUNCAO_1 )
+ {
+ return outra_funcao_1;
+ }
+ else if( fieldName == ExamesDataAuto.OUTRA_FUNCAO_2 )
+ {
+ return outra_funcao_2;
+ }
+ else if( fieldName == ExamesDataAuto.OUTRA_FUNCAO_3 )
+ {
+ return outra_funcao_3;
+ }
+ else if( fieldName == ExamesDataAuto.OUTRA_FUNCAO_4 )
+ {
+ return outra_funcao_4;
+ }
+ else if( fieldName == ExamesDataAuto.PROXIMO_EXAME )
+ {
+ return proximo_exame;
+ }
+ else if( fieldName == ExamesDataAuto.OUTRAS_RECOMENDACOES )
+ {
+ return outras_recomendacoes;
+ }
+ else if( fieldName == ExamesDataAuto.INACTIVO )
+ {
+ return inactivo;
+ }
+ else if( fieldName == ExamesDataAuto.TRABALHADOR_ID )
+ {
+ return trabalhador_id;
+ }
+ else if( fieldName == ExamesDataAuto.MEDICO_ID )
+ {
+ return medico_id;
+ }
+ else if( fieldName == ExamesDataAuto.PDF )
+ {
+ return pdf;
+ }
+ else if( fieldName == ExamesDataAuto.FO )
+ {
+ return fo;
+ }
+ else if( fieldName.equals( ExamesDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( ExamesDataAuto.DATA ) )
+ {
+ return data;
+ }
+ else if( fieldName.equals( ExamesDataAuto.TIPO ) )
+ {
+ return tipo;
+ }
+ else if( fieldName.equals( ExamesDataAuto.OCASIONAL ) )
+ {
+ return ocasional;
+ }
+ else if( fieldName.equals( ExamesDataAuto.OUTRO_TIPO ) )
+ {
+ return outro_tipo;
+ }
+ else if( fieldName.equals( ExamesDataAuto.RESULTADO ) )
+ {
+ return resultado;
+ }
+ else if( fieldName.equals( ExamesDataAuto.OUTRA_FUNCAO_1 ) )
+ {
+ return outra_funcao_1;
+ }
+ else if( fieldName.equals( ExamesDataAuto.OUTRA_FUNCAO_2 ) )
+ {
+ return outra_funcao_2;
+ }
+ else if( fieldName.equals( ExamesDataAuto.OUTRA_FUNCAO_3 ) )
+ {
+ return outra_funcao_3;
+ }
+ else if( fieldName.equals( ExamesDataAuto.OUTRA_FUNCAO_4 ) )
+ {
+ return outra_funcao_4;
+ }
+ else if( fieldName.equals( ExamesDataAuto.PROXIMO_EXAME ) )
+ {
+ return proximo_exame;
+ }
+ else if( fieldName.equals( ExamesDataAuto.OUTRAS_RECOMENDACOES ) )
+ {
+ return outras_recomendacoes;
+ }
+ else if( fieldName.equals( ExamesDataAuto.INACTIVO ) )
+ {
+ return inactivo;
+ }
+ else if( fieldName.equals( ExamesDataAuto.TRABALHADOR_ID ) )
+ {
+ return trabalhador_id;
+ }
+ else if( fieldName.equals( ExamesDataAuto.MEDICO_ID ) )
+ {
+ return medico_id;
+ }
+ else if( fieldName.equals( ExamesDataAuto.PDF ) )
+ {
+ return pdf;
+ }
+ else if( fieldName.equals( ExamesDataAuto.FO ) )
+ {
+ return fo;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == ExamesDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == ExamesDataAuto.DATA )
+ {
+ data = ( java.util.Date ) value;
+ }
+ else if( fieldName == ExamesDataAuto.TIPO )
+ {
+ tipo = ( Integer ) value;
+ }
+ else if( fieldName == ExamesDataAuto.OCASIONAL )
+ {
+ ocasional = ( Integer ) value;
+ }
+ else if( fieldName == ExamesDataAuto.OUTRO_TIPO )
+ {
+ outro_tipo = ( String ) value;
+ }
+ else if( fieldName == ExamesDataAuto.RESULTADO )
+ {
+ resultado = ( Integer ) value;
+ }
+ else if( fieldName == ExamesDataAuto.OUTRA_FUNCAO_1 )
+ {
+ outra_funcao_1 = ( String ) value;
+ }
+ else if( fieldName == ExamesDataAuto.OUTRA_FUNCAO_2 )
+ {
+ outra_funcao_2 = ( String ) value;
+ }
+ else if( fieldName == ExamesDataAuto.OUTRA_FUNCAO_3 )
+ {
+ outra_funcao_3 = ( String ) value;
+ }
+ else if( fieldName == ExamesDataAuto.OUTRA_FUNCAO_4 )
+ {
+ outra_funcao_4 = ( String ) value;
+ }
+ else if( fieldName == ExamesDataAuto.PROXIMO_EXAME )
+ {
+ proximo_exame = ( java.util.Date ) value;
+ }
+ else if( fieldName == ExamesDataAuto.OUTRAS_RECOMENDACOES )
+ {
+ outras_recomendacoes = ( String ) value;
+ }
+ else if( fieldName == ExamesDataAuto.INACTIVO )
+ {
+ inactivo = ( String ) value;
+ }
+ else if( fieldName == ExamesDataAuto.TRABALHADOR_ID )
+ {
+ trabalhador_id = ( Integer ) value;
+ }
+ else if( fieldName == ExamesDataAuto.MEDICO_ID )
+ {
+ medico_id = ( Integer ) value;
+ }
+ else if( fieldName == ExamesDataAuto.PDF )
+ {
+ pdf = ( byte[] ) value;
+ }
+ else if( fieldName == ExamesDataAuto.FO )
+ {
+ fo = ( byte[] ) value;
+ }
+ else if( fieldName.equals( ExamesDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( ExamesDataAuto.DATA ) )
+ {
+ data = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( ExamesDataAuto.TIPO ) )
+ {
+ tipo = ( Integer ) value;
+ }
+ else if( fieldName.equals( ExamesDataAuto.OCASIONAL ) )
+ {
+ ocasional = ( Integer ) value;
+ }
+ else if( fieldName.equals( ExamesDataAuto.OUTRO_TIPO ) )
+ {
+ outro_tipo = ( String ) value;
+ }
+ else if( fieldName.equals( ExamesDataAuto.RESULTADO ) )
+ {
+ resultado = ( Integer ) value;
+ }
+ else if( fieldName.equals( ExamesDataAuto.OUTRA_FUNCAO_1 ) )
+ {
+ outra_funcao_1 = ( String ) value;
+ }
+ else if( fieldName.equals( ExamesDataAuto.OUTRA_FUNCAO_2 ) )
+ {
+ outra_funcao_2 = ( String ) value;
+ }
+ else if( fieldName.equals( ExamesDataAuto.OUTRA_FUNCAO_3 ) )
+ {
+ outra_funcao_3 = ( String ) value;
+ }
+ else if( fieldName.equals( ExamesDataAuto.OUTRA_FUNCAO_4 ) )
+ {
+ outra_funcao_4 = ( String ) value;
+ }
+ else if( fieldName.equals( ExamesDataAuto.PROXIMO_EXAME ) )
+ {
+ proximo_exame = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( ExamesDataAuto.OUTRAS_RECOMENDACOES ) )
+ {
+ outras_recomendacoes = ( String ) value;
+ }
+ else if( fieldName.equals( ExamesDataAuto.INACTIVO ) )
+ {
+ inactivo = ( String ) value;
+ }
+ else if( fieldName.equals( ExamesDataAuto.TRABALHADOR_ID ) )
+ {
+ trabalhador_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( ExamesDataAuto.MEDICO_ID ) )
+ {
+ medico_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( ExamesDataAuto.PDF ) )
+ {
+ pdf = ( byte[] ) value;
+ }
+ else if( fieldName.equals( ExamesDataAuto.FO ) )
+ {
+ fo = ( byte[] ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public java.util.Date getData()
+ {
+ return data;
+ }
+
+ public void setData(java.util.Date dataValue )
+ {
+ this.data = dataValue;
+ }
+
+ public Integer getTipo()
+ {
+ return tipo;
+ }
+
+ public void setTipo(Integer tipoValue )
+ {
+ this.tipo = tipoValue;
+ }
+
+ public Integer getOcasional()
+ {
+ return ocasional;
+ }
+
+ public void setOcasional(Integer ocasionalValue )
+ {
+ this.ocasional = ocasionalValue;
+ }
+
+ public String getOutro_tipo()
+ {
+ return outro_tipo;
+ }
+
+ public void setOutro_tipo(String outro_tipoValue )
+ {
+ this.outro_tipo = outro_tipoValue;
+ }
+
+ public Integer getResultado()
+ {
+ return resultado;
+ }
+
+ public void setResultado(Integer resultadoValue )
+ {
+ this.resultado = resultadoValue;
+ }
+
+ public String getOutra_funcao_1()
+ {
+ return outra_funcao_1;
+ }
+
+ public void setOutra_funcao_1(String outra_funcao_1Value )
+ {
+ this.outra_funcao_1 = outra_funcao_1Value;
+ }
+
+ public String getOutra_funcao_2()
+ {
+ return outra_funcao_2;
+ }
+
+ public void setOutra_funcao_2(String outra_funcao_2Value )
+ {
+ this.outra_funcao_2 = outra_funcao_2Value;
+ }
+
+ public String getOutra_funcao_3()
+ {
+ return outra_funcao_3;
+ }
+
+ public void setOutra_funcao_3(String outra_funcao_3Value )
+ {
+ this.outra_funcao_3 = outra_funcao_3Value;
+ }
+
+ public String getOutra_funcao_4()
+ {
+ return outra_funcao_4;
+ }
+
+ public void setOutra_funcao_4(String outra_funcao_4Value )
+ {
+ this.outra_funcao_4 = outra_funcao_4Value;
+ }
+
+ public java.util.Date getProximo_exame()
+ {
+ return proximo_exame;
+ }
+
+ public void setProximo_exame(java.util.Date proximo_exameValue )
+ {
+ this.proximo_exame = proximo_exameValue;
+ }
+
+ public String getOutras_recomendacoes()
+ {
+ return outras_recomendacoes;
+ }
+
+ public void setOutras_recomendacoes(String outras_recomendacoesValue )
+ {
+ this.outras_recomendacoes = outras_recomendacoesValue;
+ }
+
+ public String getInactivo()
+ {
+ return inactivo;
+ }
+
+ public void setInactivo(String inactivoValue )
+ {
+ this.inactivo = inactivoValue;
+ }
+
+ public Integer getTrabalhador_id()
+ {
+ return trabalhador_id;
+ }
+
+ public void setTrabalhador_id(Integer trabalhador_idValue )
+ {
+ this.trabalhador_id = trabalhador_idValue;
+ }
+
+ public Integer getMedico_id()
+ {
+ return medico_id;
+ }
+
+ public void setMedico_id(Integer medico_idValue )
+ {
+ this.medico_id = medico_idValue;
+ }
+
+ public byte[] getPdf()
+ {
+ return pdf;
+ }
+
+ public void setPdf(byte[] pdfValue )
+ {
+ this.pdf = pdfValue;
+ }
+
+ public byte[] getFo()
+ {
+ return fo;
+ }
+
+ public void setFo(byte[] foValue )
+ {
+ this.fo = foValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return ExamesDataAuto.class;
+ }
+
+ public ExamesDataAuto getOuterClassInstance()
+ {
+ ExamesDataAuto outerObj = new ExamesDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesData.java
new file mode 100644
index 00000000..020efe58
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesData.java
@@ -0,0 +1,18 @@
+/*
+* ExamesDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class ExamesData extends com.evolute.siprp.server.db.data.siprp_local3.ExamesDataAuto
+{
+
+ public ExamesData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesDataAuto.java
new file mode 100644
index 00000000..7e6e54c6
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesDataAuto.java
@@ -0,0 +1,338 @@
+/*
+* ExamesDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class ExamesDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "exames";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "exames.id";
+ public static final String DATA = "data";
+ public static final String DATA_FULL = "exames.data";
+ public static final String TIPO = "tipo";
+ public static final String TIPO_FULL = "exames.tipo";
+ public static final String OCASIONAL = "ocasional";
+ public static final String OCASIONAL_FULL = "exames.ocasional";
+ public static final String OUTRO_TIPO = "outro_tipo";
+ public static final String OUTRO_TIPO_FULL = "exames.outro_tipo";
+ public static final String RESULTADO = "resultado";
+ public static final String RESULTADO_FULL = "exames.resultado";
+ public static final String OUTRA_FUNCAO_1 = "outra_funcao_1";
+ public static final String OUTRA_FUNCAO_1_FULL = "exames.outra_funcao_1";
+ public static final String OUTRA_FUNCAO_2 = "outra_funcao_2";
+ public static final String OUTRA_FUNCAO_2_FULL = "exames.outra_funcao_2";
+ public static final String OUTRA_FUNCAO_3 = "outra_funcao_3";
+ public static final String OUTRA_FUNCAO_3_FULL = "exames.outra_funcao_3";
+ public static final String OUTRA_FUNCAO_4 = "outra_funcao_4";
+ public static final String OUTRA_FUNCAO_4_FULL = "exames.outra_funcao_4";
+ public static final String PROXIMO_EXAME = "proximo_exame";
+ public static final String PROXIMO_EXAME_FULL = "exames.proximo_exame";
+ public static final String OUTRAS_RECOMENDACOES = "outras_recomendacoes";
+ public static final String OUTRAS_RECOMENDACOES_FULL = "exames.outras_recomendacoes";
+ public static final String INACTIVO = "inactivo";
+ public static final String INACTIVO_FULL = "exames.inactivo";
+ public static final String TRABALHADOR_ID = "trabalhador_id";
+ public static final String TRABALHADOR_ID_FULL = "exames.trabalhador_id";
+ public static final String MEDICO_ID = "medico_id";
+ public static final String MEDICO_ID_FULL = "exames.medico_id";
+ public static final String TO_MEDICO_ID = "to medico_id";
+ public static final String PDF = "pdf";
+ public static final String PDF_FULL = "exames.pdf";
+ public static final String FO = "fo";
+ public static final String FO_FULL = "exames.fo";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ DATA, TIPO, OCASIONAL, OUTRO_TIPO, RESULTADO, OUTRA_FUNCAO_1, OUTRA_FUNCAO_2,
+ OUTRA_FUNCAO_3, OUTRA_FUNCAO_4, PROXIMO_EXAME, OUTRAS_RECOMENDACOES, INACTIVO,
+ TRABALHADOR_ID, MEDICO_ID, TO_MEDICO_ID, PDF, FO, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, DATA, TIPO, OCASIONAL, OUTRO_TIPO, RESULTADO, OUTRA_FUNCAO_1, OUTRA_FUNCAO_2,
+ OUTRA_FUNCAO_3, OUTRA_FUNCAO_4, PROXIMO_EXAME, OUTRAS_RECOMENDACOES, INACTIVO,
+ TRABALHADOR_ID, MEDICO_ID, PDF, FO, };
+
+ private Map dataHash;
+
+ public ExamesDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public java.util.Date getData()
+ {
+ return (java.util.Date) get(DATA);
+ }
+
+ public void setData(java.util.Date dataValue )
+ {
+ this.set(DATA, dataValue );
+ }
+
+ public Integer getTipo()
+ {
+ return (Integer) get(TIPO);
+ }
+
+ public void setTipo(Integer tipoValue )
+ {
+ this.set(TIPO, tipoValue );
+ }
+
+ public Integer getOcasional()
+ {
+ return (Integer) get(OCASIONAL);
+ }
+
+ public void setOcasional(Integer ocasionalValue )
+ {
+ this.set(OCASIONAL, ocasionalValue );
+ }
+
+ public String getOutro_tipo()
+ {
+ return (String) get(OUTRO_TIPO);
+ }
+
+ public void setOutro_tipo(String outro_tipoValue )
+ {
+ this.set(OUTRO_TIPO, outro_tipoValue );
+ }
+
+ public Integer getResultado()
+ {
+ return (Integer) get(RESULTADO);
+ }
+
+ public void setResultado(Integer resultadoValue )
+ {
+ this.set(RESULTADO, resultadoValue );
+ }
+
+ public String getOutra_funcao_1()
+ {
+ return (String) get(OUTRA_FUNCAO_1);
+ }
+
+ public void setOutra_funcao_1(String outra_funcao_1Value )
+ {
+ this.set(OUTRA_FUNCAO_1, outra_funcao_1Value );
+ }
+
+ public String getOutra_funcao_2()
+ {
+ return (String) get(OUTRA_FUNCAO_2);
+ }
+
+ public void setOutra_funcao_2(String outra_funcao_2Value )
+ {
+ this.set(OUTRA_FUNCAO_2, outra_funcao_2Value );
+ }
+
+ public String getOutra_funcao_3()
+ {
+ return (String) get(OUTRA_FUNCAO_3);
+ }
+
+ public void setOutra_funcao_3(String outra_funcao_3Value )
+ {
+ this.set(OUTRA_FUNCAO_3, outra_funcao_3Value );
+ }
+
+ public String getOutra_funcao_4()
+ {
+ return (String) get(OUTRA_FUNCAO_4);
+ }
+
+ public void setOutra_funcao_4(String outra_funcao_4Value )
+ {
+ this.set(OUTRA_FUNCAO_4, outra_funcao_4Value );
+ }
+
+ public java.util.Date getProximo_exame()
+ {
+ return (java.util.Date) get(PROXIMO_EXAME);
+ }
+
+ public void setProximo_exame(java.util.Date proximo_exameValue )
+ {
+ this.set(PROXIMO_EXAME, proximo_exameValue );
+ }
+
+ public String getOutras_recomendacoes()
+ {
+ return (String) get(OUTRAS_RECOMENDACOES);
+ }
+
+ public void setOutras_recomendacoes(String outras_recomendacoesValue )
+ {
+ this.set(OUTRAS_RECOMENDACOES, outras_recomendacoesValue );
+ }
+
+ public String getInactivo()
+ {
+ return (String) get(INACTIVO);
+ }
+
+ public void setInactivo(String inactivoValue )
+ {
+ this.set(INACTIVO, inactivoValue );
+ }
+
+ public Integer getTrabalhador_id()
+ {
+ return (Integer) get(TRABALHADOR_ID);
+ }
+
+ public void setTrabalhador_id(Integer trabalhador_idValue )
+ {
+ this.set(TRABALHADOR_ID, trabalhador_idValue );
+ }
+
+ public Integer getMedico_id()
+ {
+ return (Integer) dataHash.get(MEDICO_ID);
+ }
+
+ public void setMedico_id(Integer medico_idValue )
+ {
+ dataHash.put(TO_MEDICO_ID, null);
+ dataHash.put(MEDICO_ID, medico_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.MedicosData toMedico_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_MEDICO_ID) == null && getMedico_id() != null )
+ {
+ dataHash.put(TO_MEDICO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.MedicosData.class, new Object[]{ getMedico_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.MedicosData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.MedicosData) dataHash.get(TO_MEDICO_ID);
+ }
+
+ public void setToMedico_id(com.evolute.siprp.server.db.data.siprp_local3.MedicosData medico_idObject )
+ {
+ if( medico_idObject == null )
+ {
+ dataHash.put(MEDICO_ID, null);
+ }
+ else
+ {
+ dataHash.put(MEDICO_ID, medico_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.MedicosData.ID ));
+ }
+ dataHash.put(TO_MEDICO_ID, medico_idObject);
+ }
+
+ public byte[] getPdf()
+ {
+ return (byte[]) get(PDF);
+ }
+
+ public void setPdf(byte[] pdfValue )
+ {
+ this.set(PDF, pdfValue );
+ }
+
+ public byte[] getFo()
+ {
+ return (byte[]) get(FO);
+ }
+
+ public void setFo(byte[] foValue )
+ {
+ this.set(FO, foValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_MEDICO_ID.equals( fieldName ) )
+ {
+ value = toMedico_id();
+ }
+ else if( MEDICO_ID.equals( fieldName ) )
+ {
+ value = getMedico_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_MEDICO_ID.equals( fieldName ) )
+ {
+ setToMedico_id( (com.evolute.siprp.server.db.data.siprp_local3.MedicosData) value );
+ }
+ else if( MEDICO_ID.equals( fieldName ) )
+ {
+ setMedico_id( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_MEDICO_ID) != null )
+ {
+ toMedico_id().save();
+ dataHash.put(MEDICO_ID, toMedico_id().get( com.evolute.siprp.server.db.data.siprp_local3.MedicosData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return Exames.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPerfis.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPerfis.java
new file mode 100644
index 00000000..831d47ab
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPerfis.java
@@ -0,0 +1,156 @@
+/*
+* ExamesPerfis.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class ExamesPerfis implements JDOInnerObject
+{
+ private Integer id;
+ private Integer perfil;
+ private Integer tipo;
+ private Integer multiplicador;
+
+ public ExamesPerfis()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == ExamesPerfisDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == ExamesPerfisDataAuto.PERFIL )
+ {
+ return perfil;
+ }
+ else if( fieldName == ExamesPerfisDataAuto.TIPO )
+ {
+ return tipo;
+ }
+ else if( fieldName == ExamesPerfisDataAuto.MULTIPLICADOR )
+ {
+ return multiplicador;
+ }
+ else if( fieldName.equals( ExamesPerfisDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( ExamesPerfisDataAuto.PERFIL ) )
+ {
+ return perfil;
+ }
+ else if( fieldName.equals( ExamesPerfisDataAuto.TIPO ) )
+ {
+ return tipo;
+ }
+ else if( fieldName.equals( ExamesPerfisDataAuto.MULTIPLICADOR ) )
+ {
+ return multiplicador;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == ExamesPerfisDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == ExamesPerfisDataAuto.PERFIL )
+ {
+ perfil = ( Integer ) value;
+ }
+ else if( fieldName == ExamesPerfisDataAuto.TIPO )
+ {
+ tipo = ( Integer ) value;
+ }
+ else if( fieldName == ExamesPerfisDataAuto.MULTIPLICADOR )
+ {
+ multiplicador = ( Integer ) value;
+ }
+ else if( fieldName.equals( ExamesPerfisDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( ExamesPerfisDataAuto.PERFIL ) )
+ {
+ perfil = ( Integer ) value;
+ }
+ else if( fieldName.equals( ExamesPerfisDataAuto.TIPO ) )
+ {
+ tipo = ( Integer ) value;
+ }
+ else if( fieldName.equals( ExamesPerfisDataAuto.MULTIPLICADOR ) )
+ {
+ multiplicador = ( Integer ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public Integer getPerfil()
+ {
+ return perfil;
+ }
+
+ public void setPerfil(Integer perfilValue )
+ {
+ this.perfil = perfilValue;
+ }
+
+ public Integer getTipo()
+ {
+ return tipo;
+ }
+
+ public void setTipo(Integer tipoValue )
+ {
+ this.tipo = tipoValue;
+ }
+
+ public Integer getMultiplicador()
+ {
+ return multiplicador;
+ }
+
+ public void setMultiplicador(Integer multiplicadorValue )
+ {
+ this.multiplicador = multiplicadorValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return ExamesPerfisDataAuto.class;
+ }
+
+ public ExamesPerfisDataAuto getOuterClassInstance()
+ {
+ ExamesPerfisDataAuto outerObj = new ExamesPerfisDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPerfisData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPerfisData.java
new file mode 100644
index 00000000..f3926b39
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPerfisData.java
@@ -0,0 +1,18 @@
+/*
+* ExamesPerfisDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class ExamesPerfisData extends com.evolute.siprp.server.db.data.siprp_local3.ExamesPerfisDataAuto
+{
+
+ public ExamesPerfisData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPerfisDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPerfisDataAuto.java
new file mode 100644
index 00000000..75953d60
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPerfisDataAuto.java
@@ -0,0 +1,178 @@
+/*
+* ExamesPerfisDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class ExamesPerfisDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "exames_perfis";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "exames_perfis.id";
+ public static final String PERFIL = "perfil";
+ public static final String PERFIL_FULL = "exames_perfis.perfil";
+ public static final String TIPO = "tipo";
+ public static final String TIPO_FULL = "exames_perfis.tipo";
+ public static final String TO_TIPO = "to tipo";
+ public static final String MULTIPLICADOR = "multiplicador";
+ public static final String MULTIPLICADOR_FULL = "exames_perfis.multiplicador";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ PERFIL, TIPO, TO_TIPO, MULTIPLICADOR, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, PERFIL, TIPO, MULTIPLICADOR, };
+
+ private Map dataHash;
+
+ public ExamesPerfisDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public Integer getPerfil()
+ {
+ return (Integer) get(PERFIL);
+ }
+
+ public void setPerfil(Integer perfilValue )
+ {
+ this.set(PERFIL, perfilValue );
+ }
+
+ public Integer getTipo()
+ {
+ return (Integer) dataHash.get(TIPO);
+ }
+
+ public void setTipo(Integer tipoValue )
+ {
+ dataHash.put(TO_TIPO, null);
+ dataHash.put(TIPO, tipoValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.TiposExamesCompData toTipo()
+ throws Exception
+ {
+ if( dataHash.get(TO_TIPO) == null && getTipo() != null )
+ {
+ dataHash.put(TO_TIPO, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.TiposExamesCompData.class, new Object[]{ getTipo() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.TiposExamesCompData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.TiposExamesCompData) dataHash.get(TO_TIPO);
+ }
+
+ public void setToTipo(com.evolute.siprp.server.db.data.siprp_local3.TiposExamesCompData tipoObject )
+ {
+ if( tipoObject == null )
+ {
+ dataHash.put(TIPO, null);
+ }
+ else
+ {
+ dataHash.put(TIPO, tipoObject.get( com.evolute.siprp.server.db.data.siprp_local3.TiposExamesCompData.ID ));
+ }
+ dataHash.put(TO_TIPO, tipoObject);
+ }
+
+ public Integer getMultiplicador()
+ {
+ return (Integer) get(MULTIPLICADOR);
+ }
+
+ public void setMultiplicador(Integer multiplicadorValue )
+ {
+ this.set(MULTIPLICADOR, multiplicadorValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TIPO.equals( fieldName ) )
+ {
+ value = getTipo();
+ }
+ else if( TO_TIPO.equals( fieldName ) )
+ {
+ value = toTipo();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TIPO.equals( fieldName ) )
+ {
+ setTipo( (Integer) value );
+ }
+ else if( TO_TIPO.equals( fieldName ) )
+ {
+ setToTipo( (com.evolute.siprp.server.db.data.siprp_local3.TiposExamesCompData) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_TIPO) != null )
+ {
+ toTipo().save();
+ dataHash.put(TIPO, toTipo().get( com.evolute.siprp.server.db.data.siprp_local3.TiposExamesCompData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return ExamesPerfis.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPortaria.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPortaria.java
new file mode 100644
index 00000000..e02bd930
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPortaria.java
@@ -0,0 +1,129 @@
+/*
+* ExamesPortaria.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class ExamesPortaria implements JDOInnerObject
+{
+ private Integer id;
+ private String portaria;
+ private java.sql.Timestamp data_entrada;
+
+ public ExamesPortaria()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == ExamesPortariaDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == ExamesPortariaDataAuto.PORTARIA )
+ {
+ return portaria;
+ }
+ else if( fieldName == ExamesPortariaDataAuto.DATA_ENTRADA )
+ {
+ return data_entrada;
+ }
+ else if( fieldName.equals( ExamesPortariaDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( ExamesPortariaDataAuto.PORTARIA ) )
+ {
+ return portaria;
+ }
+ else if( fieldName.equals( ExamesPortariaDataAuto.DATA_ENTRADA ) )
+ {
+ return data_entrada;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == ExamesPortariaDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == ExamesPortariaDataAuto.PORTARIA )
+ {
+ portaria = ( String ) value;
+ }
+ else if( fieldName == ExamesPortariaDataAuto.DATA_ENTRADA )
+ {
+ data_entrada = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName.equals( ExamesPortariaDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( ExamesPortariaDataAuto.PORTARIA ) )
+ {
+ portaria = ( String ) value;
+ }
+ else if( fieldName.equals( ExamesPortariaDataAuto.DATA_ENTRADA ) )
+ {
+ data_entrada = ( java.sql.Timestamp ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getPortaria()
+ {
+ return portaria;
+ }
+
+ public void setPortaria(String portariaValue )
+ {
+ this.portaria = portariaValue;
+ }
+
+ public java.sql.Timestamp getData_entrada()
+ {
+ return data_entrada;
+ }
+
+ public void setData_entrada(java.sql.Timestamp data_entradaValue )
+ {
+ this.data_entrada = data_entradaValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return ExamesPortariaDataAuto.class;
+ }
+
+ public ExamesPortariaDataAuto getOuterClassInstance()
+ {
+ ExamesPortariaDataAuto outerObj = new ExamesPortariaDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPortariaData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPortariaData.java
new file mode 100644
index 00000000..cada00a5
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPortariaData.java
@@ -0,0 +1,18 @@
+/*
+* ExamesPortariaDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class ExamesPortariaData extends com.evolute.siprp.server.db.data.siprp_local3.ExamesPortariaDataAuto
+{
+
+ public ExamesPortariaData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPortariaDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPortariaDataAuto.java
new file mode 100644
index 00000000..16c2c1c9
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/ExamesPortariaDataAuto.java
@@ -0,0 +1,107 @@
+/*
+* ExamesPortariaDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class ExamesPortariaDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "exames_portaria";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "exames_portaria.id";
+ public static final String PORTARIA = "portaria";
+ public static final String PORTARIA_FULL = "exames_portaria.portaria";
+ public static final String DATA_ENTRADA = "data_entrada";
+ public static final String DATA_ENTRADA_FULL = "exames_portaria.data_entrada";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ PORTARIA, DATA_ENTRADA, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, PORTARIA, DATA_ENTRADA, };
+
+ private Map dataHash;
+
+ public ExamesPortariaDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getPortaria()
+ {
+ return (String) get(PORTARIA);
+ }
+
+ public void setPortaria(String portariaValue )
+ {
+ this.set(PORTARIA, portariaValue );
+ }
+
+ public java.sql.Timestamp getData_entrada()
+ {
+ return (java.sql.Timestamp) get(DATA_ENTRADA);
+ }
+
+ public void setData_entrada(java.sql.Timestamp data_entradaValue )
+ {
+ this.set(DATA_ENTRADA, data_entradaValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return ExamesPortaria.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HistoricoEstabelecimento.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HistoricoEstabelecimento.java
new file mode 100644
index 00000000..4c42d13b
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HistoricoEstabelecimento.java
@@ -0,0 +1,156 @@
+/*
+* HistoricoEstabelecimento.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HistoricoEstabelecimento implements JDOInnerObject
+{
+ private Integer id;
+ private Integer estabelecimento_id;
+ private java.util.Date data;
+ private String texto;
+
+ public HistoricoEstabelecimento()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HistoricoEstabelecimentoDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == HistoricoEstabelecimentoDataAuto.ESTABELECIMENTO_ID )
+ {
+ return estabelecimento_id;
+ }
+ else if( fieldName == HistoricoEstabelecimentoDataAuto.DATA )
+ {
+ return data;
+ }
+ else if( fieldName == HistoricoEstabelecimentoDataAuto.TEXTO )
+ {
+ return texto;
+ }
+ else if( fieldName.equals( HistoricoEstabelecimentoDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( HistoricoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) )
+ {
+ return estabelecimento_id;
+ }
+ else if( fieldName.equals( HistoricoEstabelecimentoDataAuto.DATA ) )
+ {
+ return data;
+ }
+ else if( fieldName.equals( HistoricoEstabelecimentoDataAuto.TEXTO ) )
+ {
+ return texto;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HistoricoEstabelecimentoDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == HistoricoEstabelecimentoDataAuto.ESTABELECIMENTO_ID )
+ {
+ estabelecimento_id = ( Integer ) value;
+ }
+ else if( fieldName == HistoricoEstabelecimentoDataAuto.DATA )
+ {
+ data = ( java.util.Date ) value;
+ }
+ else if( fieldName == HistoricoEstabelecimentoDataAuto.TEXTO )
+ {
+ texto = ( String ) value;
+ }
+ else if( fieldName.equals( HistoricoEstabelecimentoDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HistoricoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) )
+ {
+ estabelecimento_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HistoricoEstabelecimentoDataAuto.DATA ) )
+ {
+ data = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( HistoricoEstabelecimentoDataAuto.TEXTO ) )
+ {
+ texto = ( String ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public Integer getEstabelecimento_id()
+ {
+ return estabelecimento_id;
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_idValue )
+ {
+ this.estabelecimento_id = estabelecimento_idValue;
+ }
+
+ public java.util.Date getData()
+ {
+ return data;
+ }
+
+ public void setData(java.util.Date dataValue )
+ {
+ this.data = dataValue;
+ }
+
+ public String getTexto()
+ {
+ return texto;
+ }
+
+ public void setTexto(String textoValue )
+ {
+ this.texto = textoValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HistoricoEstabelecimentoDataAuto.class;
+ }
+
+ public HistoricoEstabelecimentoDataAuto getOuterClassInstance()
+ {
+ HistoricoEstabelecimentoDataAuto outerObj = new HistoricoEstabelecimentoDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HistoricoEstabelecimentoData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HistoricoEstabelecimentoData.java
new file mode 100644
index 00000000..d4b80f87
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HistoricoEstabelecimentoData.java
@@ -0,0 +1,18 @@
+/*
+* HistoricoEstabelecimentoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HistoricoEstabelecimentoData extends com.evolute.siprp.server.db.data.siprp_local3.HistoricoEstabelecimentoDataAuto
+{
+
+ public HistoricoEstabelecimentoData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HistoricoEstabelecimentoDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HistoricoEstabelecimentoDataAuto.java
new file mode 100644
index 00000000..a73cdcf0
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HistoricoEstabelecimentoDataAuto.java
@@ -0,0 +1,178 @@
+/*
+* HistoricoEstabelecimentoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HistoricoEstabelecimentoDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "historico_estabelecimento";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "historico_estabelecimento.id";
+ public static final String ESTABELECIMENTO_ID = "estabelecimento_id";
+ public static final String ESTABELECIMENTO_ID_FULL = "historico_estabelecimento.estabelecimento_id";
+ public static final String TO_ESTABELECIMENTO_ID = "to estabelecimento_id";
+ public static final String DATA = "data";
+ public static final String DATA_FULL = "historico_estabelecimento.data";
+ public static final String TEXTO = "texto";
+ public static final String TEXTO_FULL = "historico_estabelecimento.texto";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID, DATA, TEXTO, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, ESTABELECIMENTO_ID, DATA, TEXTO, };
+
+ private Map dataHash;
+
+ public HistoricoEstabelecimentoDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public Integer getEstabelecimento_id()
+ {
+ return (Integer) dataHash.get(ESTABELECIMENTO_ID);
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_idValue )
+ {
+ dataHash.put(TO_ESTABELECIMENTO_ID, null);
+ dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData toEstabelecimento_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_ESTABELECIMENTO_ID) == null && getEstabelecimento_id() != null )
+ {
+ dataHash.put(TO_ESTABELECIMENTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.class, new Object[]{ getEstabelecimento_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) dataHash.get(TO_ESTABELECIMENTO_ID);
+ }
+
+ public void setToEstabelecimento_id(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData estabelecimento_idObject )
+ {
+ if( estabelecimento_idObject == null )
+ {
+ dataHash.put(ESTABELECIMENTO_ID, null);
+ }
+ else
+ {
+ dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID ));
+ }
+ dataHash.put(TO_ESTABELECIMENTO_ID, estabelecimento_idObject);
+ }
+
+ public java.util.Date getData()
+ {
+ return (java.util.Date) get(DATA);
+ }
+
+ public void setData(java.util.Date dataValue )
+ {
+ this.set(DATA, dataValue );
+ }
+
+ public String getTexto()
+ {
+ return (String) get(TEXTO);
+ }
+
+ public void setTexto(String textoValue )
+ {
+ this.set(TEXTO, textoValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ value = getEstabelecimento_id();
+ }
+ else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ value = toEstabelecimento_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ setEstabelecimento_id( (Integer) value );
+ }
+ else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ setToEstabelecimento_id( (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_ESTABELECIMENTO_ID) != null )
+ {
+ toEstabelecimento_id().save();
+ dataHash.put(ESTABELECIMENTO_ID, toEstabelecimento_id().get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HistoricoEstabelecimento.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsArea.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsArea.java
new file mode 100644
index 00000000..00a2b74b
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsArea.java
@@ -0,0 +1,183 @@
+/*
+* HsArea.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsArea implements JDOInnerObject
+{
+ private Integer id;
+ private Integer empresa_id;
+ private String description;
+ private java.sql.Timestamp deleted_date;
+ private Integer ordem;
+
+ public HsArea()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsAreaDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == HsAreaDataAuto.EMPRESA_ID )
+ {
+ return empresa_id;
+ }
+ else if( fieldName == HsAreaDataAuto.DESCRIPTION )
+ {
+ return description;
+ }
+ else if( fieldName == HsAreaDataAuto.DELETED_DATE )
+ {
+ return deleted_date;
+ }
+ else if( fieldName == HsAreaDataAuto.ORDEM )
+ {
+ return ordem;
+ }
+ else if( fieldName.equals( HsAreaDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( HsAreaDataAuto.EMPRESA_ID ) )
+ {
+ return empresa_id;
+ }
+ else if( fieldName.equals( HsAreaDataAuto.DESCRIPTION ) )
+ {
+ return description;
+ }
+ else if( fieldName.equals( HsAreaDataAuto.DELETED_DATE ) )
+ {
+ return deleted_date;
+ }
+ else if( fieldName.equals( HsAreaDataAuto.ORDEM ) )
+ {
+ return ordem;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsAreaDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == HsAreaDataAuto.EMPRESA_ID )
+ {
+ empresa_id = ( Integer ) value;
+ }
+ else if( fieldName == HsAreaDataAuto.DESCRIPTION )
+ {
+ description = ( String ) value;
+ }
+ else if( fieldName == HsAreaDataAuto.DELETED_DATE )
+ {
+ deleted_date = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName == HsAreaDataAuto.ORDEM )
+ {
+ ordem = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsAreaDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsAreaDataAuto.EMPRESA_ID ) )
+ {
+ empresa_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsAreaDataAuto.DESCRIPTION ) )
+ {
+ description = ( String ) value;
+ }
+ else if( fieldName.equals( HsAreaDataAuto.DELETED_DATE ) )
+ {
+ deleted_date = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName.equals( HsAreaDataAuto.ORDEM ) )
+ {
+ ordem = ( Integer ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public Integer getEmpresa_id()
+ {
+ return empresa_id;
+ }
+
+ public void setEmpresa_id(Integer empresa_idValue )
+ {
+ this.empresa_id = empresa_idValue;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String descriptionValue )
+ {
+ this.description = descriptionValue;
+ }
+
+ public java.sql.Timestamp getDeleted_date()
+ {
+ return deleted_date;
+ }
+
+ public void setDeleted_date(java.sql.Timestamp deleted_dateValue )
+ {
+ this.deleted_date = deleted_dateValue;
+ }
+
+ public Integer getOrdem()
+ {
+ return ordem;
+ }
+
+ public void setOrdem(Integer ordemValue )
+ {
+ this.ordem = ordemValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsAreaDataAuto.class;
+ }
+
+ public HsAreaDataAuto getOuterClassInstance()
+ {
+ HsAreaDataAuto outerObj = new HsAreaDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsAreaData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsAreaData.java
new file mode 100644
index 00000000..370274f8
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsAreaData.java
@@ -0,0 +1,18 @@
+/*
+* HsAreaDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsAreaData extends com.evolute.siprp.server.db.data.siprp_local3.HsAreaDataAuto
+{
+
+ public HsAreaData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsAreaDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsAreaDataAuto.java
new file mode 100644
index 00000000..a3c1020c
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsAreaDataAuto.java
@@ -0,0 +1,190 @@
+/*
+* HsAreaDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsAreaDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_area";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "hs_area.id";
+ public static final String EMPRESA_ID = "empresa_id";
+ public static final String EMPRESA_ID_FULL = "hs_area.empresa_id";
+ public static final String TO_EMPRESA_ID = "to empresa_id";
+ public static final String DESCRIPTION = "description";
+ public static final String DESCRIPTION_FULL = "hs_area.description";
+ public static final String DELETED_DATE = "deleted_date";
+ public static final String DELETED_DATE_FULL = "hs_area.deleted_date";
+ public static final String ORDEM = "ordem";
+ public static final String ORDEM_FULL = "hs_area.ordem";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ EMPRESA_ID, TO_EMPRESA_ID, DESCRIPTION, DELETED_DATE, ORDEM, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, EMPRESA_ID, DESCRIPTION, DELETED_DATE, ORDEM, };
+
+ private Map dataHash;
+
+ public HsAreaDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public Integer getEmpresa_id()
+ {
+ return (Integer) dataHash.get(EMPRESA_ID);
+ }
+
+ public void setEmpresa_id(Integer empresa_idValue )
+ {
+ dataHash.put(TO_EMPRESA_ID, null);
+ dataHash.put(EMPRESA_ID, empresa_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.EmpresasData toEmpresa_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_EMPRESA_ID) == null && getEmpresa_id() != null )
+ {
+ dataHash.put(TO_EMPRESA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.class, new Object[]{ getEmpresa_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) dataHash.get(TO_EMPRESA_ID);
+ }
+
+ public void setToEmpresa_id(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData empresa_idObject )
+ {
+ if( empresa_idObject == null )
+ {
+ dataHash.put(EMPRESA_ID, null);
+ }
+ else
+ {
+ dataHash.put(EMPRESA_ID, empresa_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID ));
+ }
+ dataHash.put(TO_EMPRESA_ID, empresa_idObject);
+ }
+
+ public String getDescription()
+ {
+ return (String) get(DESCRIPTION);
+ }
+
+ public void setDescription(String descriptionValue )
+ {
+ this.set(DESCRIPTION, descriptionValue );
+ }
+
+ public java.sql.Timestamp getDeleted_date()
+ {
+ return (java.sql.Timestamp) get(DELETED_DATE);
+ }
+
+ public void setDeleted_date(java.sql.Timestamp deleted_dateValue )
+ {
+ this.set(DELETED_DATE, deleted_dateValue );
+ }
+
+ public Integer getOrdem()
+ {
+ return (Integer) get(ORDEM);
+ }
+
+ public void setOrdem(Integer ordemValue )
+ {
+ this.set(ORDEM, ordemValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_EMPRESA_ID.equals( fieldName ) )
+ {
+ value = toEmpresa_id();
+ }
+ else if( EMPRESA_ID.equals( fieldName ) )
+ {
+ value = getEmpresa_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_EMPRESA_ID.equals( fieldName ) )
+ {
+ setToEmpresa_id( (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) value );
+ }
+ else if( EMPRESA_ID.equals( fieldName ) )
+ {
+ setEmpresa_id( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_EMPRESA_ID) != null )
+ {
+ toEmpresa_id().save();
+ dataHash.put(EMPRESA_ID, toEmpresa_id().get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsArea.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmail.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmail.java
new file mode 100644
index 00000000..47fe8c47
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmail.java
@@ -0,0 +1,102 @@
+/*
+* HsEmail.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsEmail implements JDOInnerObject
+{
+ private Integer id;
+ private String email;
+
+ public HsEmail()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsEmailDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == HsEmailDataAuto.EMAIL )
+ {
+ return email;
+ }
+ else if( fieldName.equals( HsEmailDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( HsEmailDataAuto.EMAIL ) )
+ {
+ return email;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsEmailDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == HsEmailDataAuto.EMAIL )
+ {
+ email = ( String ) value;
+ }
+ else if( fieldName.equals( HsEmailDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsEmailDataAuto.EMAIL ) )
+ {
+ email = ( String ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getEmail()
+ {
+ return email;
+ }
+
+ public void setEmail(String emailValue )
+ {
+ this.email = emailValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsEmailDataAuto.class;
+ }
+
+ public HsEmailDataAuto getOuterClassInstance()
+ {
+ HsEmailDataAuto outerObj = new HsEmailDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailData.java
new file mode 100644
index 00000000..000d7e1e
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailData.java
@@ -0,0 +1,18 @@
+/*
+* HsEmailDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsEmailData extends com.evolute.siprp.server.db.data.siprp_local3.HsEmailDataAuto
+{
+
+ public HsEmailData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailDataAuto.java
new file mode 100644
index 00000000..8ddaf5a9
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailDataAuto.java
@@ -0,0 +1,95 @@
+/*
+* HsEmailDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsEmailDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_email";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "hs_email.id";
+ public static final String EMAIL = "email";
+ public static final String EMAIL_FULL = "hs_email.email";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ EMAIL, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, EMAIL, };
+
+ private Map dataHash;
+
+ public HsEmailDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getEmail()
+ {
+ return (String) get(EMAIL);
+ }
+
+ public void setEmail(String emailValue )
+ {
+ this.set(EMAIL, emailValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsEmail.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresa.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresa.java
new file mode 100644
index 00000000..f1f6bd34
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresa.java
@@ -0,0 +1,114 @@
+/*
+* HsEmailEmpresa.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsEmailEmpresa implements JDOInnerObject
+{
+ private Integer email_id;
+ private Integer empresa_id;
+
+ public HsEmailEmpresa()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsEmailEmpresaDataAuto.EMAIL_ID )
+ {
+ return email_id;
+ }
+ else if( fieldName == HsEmailEmpresaDataAuto.EMPRESA_ID )
+ {
+ return empresa_id;
+ }
+ else if( fieldName.equals( HsEmailEmpresaDataAuto.EMAIL_ID ) )
+ {
+ return email_id;
+ }
+ else if( fieldName.equals( HsEmailEmpresaDataAuto.EMPRESA_ID ) )
+ {
+ return empresa_id;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsEmailEmpresaDataAuto.EMAIL_ID )
+ {
+ email_id = ( Integer ) value;
+ }
+ else if( fieldName == HsEmailEmpresaDataAuto.EMPRESA_ID )
+ {
+ empresa_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsEmailEmpresaDataAuto.EMAIL_ID ) )
+ {
+ email_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsEmailEmpresaDataAuto.EMPRESA_ID ) )
+ {
+ empresa_id = ( Integer ) value;
+ }
+ }
+
+ public Integer getEmail_id()
+ {
+ return email_id;
+ }
+
+ public void setEmail_id(Integer email_idValue )
+ {
+ this.email_id = email_idValue;
+ }
+
+ public Integer getEmpresa_id()
+ {
+ return empresa_id;
+ }
+
+ public void setEmpresa_id(Integer empresa_idValue )
+ {
+ this.empresa_id = empresa_idValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsEmailEmpresaDataAuto.class;
+ }
+
+ public HsEmailEmpresaDataAuto getOuterClassInstance()
+ {
+ HsEmailEmpresaDataAuto outerObj = new HsEmailEmpresaDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsEmailEmpresaID getJDOPrimaryKey()
+ {
+ com.evolute.siprp.server.db.data.siprp_local3.HsEmailEmpresaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsEmailEmpresaID();
+
+ Object obj;
+ obj = this.getEmail_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.email_id = (Integer)obj;
+
+ obj = this.getEmpresa_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.empresa_id = (Integer)obj;
+
+ return id;
+
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresaData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresaData.java
new file mode 100644
index 00000000..8d62e893
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresaData.java
@@ -0,0 +1,18 @@
+/*
+* HsEmailEmpresaDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsEmailEmpresaData extends com.evolute.siprp.server.db.data.siprp_local3.HsEmailEmpresaDataAuto
+{
+
+ public HsEmailEmpresaData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresaDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresaDataAuto.java
new file mode 100644
index 00000000..e62e029b
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresaDataAuto.java
@@ -0,0 +1,213 @@
+/*
+* HsEmailEmpresaDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsEmailEmpresaDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_email_empresa";
+
+ public static final String EMAIL_ID = "email_id";
+ public static final String EMAIL_ID_FULL = "hs_email_empresa.email_id";
+ public static final String TO_EMAIL_ID = "to email_id";
+ public static final String EMPRESA_ID = "empresa_id";
+ public static final String EMPRESA_ID_FULL = "hs_email_empresa.empresa_id";
+ public static final String TO_EMPRESA_ID = "to empresa_id";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ EMAIL_ID, EMPRESA_ID, };
+
+ private Map dataHash;
+
+ public HsEmailEmpresaDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getEmail_id()
+ {
+ return (Integer) dataHash.get(EMAIL_ID);
+ }
+
+ public void setEmail_id(Integer email_idValue )
+ {
+ dataHash.put(TO_EMAIL_ID, null);
+ dataHash.put(EMAIL_ID, email_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsEmailData toEmail_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_EMAIL_ID) == null && getEmail_id() != null )
+ {
+ dataHash.put(TO_EMAIL_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsEmailData.class, new Object[]{ getEmail_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsEmailData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.HsEmailData) dataHash.get(TO_EMAIL_ID);
+ }
+
+ public void setToEmail_id(com.evolute.siprp.server.db.data.siprp_local3.HsEmailData email_idObject )
+ {
+ if( email_idObject == null )
+ {
+ dataHash.put(EMAIL_ID, null);
+ }
+ else
+ {
+ dataHash.put(EMAIL_ID, email_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsEmailData.ID ));
+ }
+ dataHash.put(TO_EMAIL_ID, email_idObject);
+ }
+
+ public Integer getEmpresa_id()
+ {
+ return (Integer) dataHash.get(EMPRESA_ID);
+ }
+
+ public void setEmpresa_id(Integer empresa_idValue )
+ {
+ dataHash.put(TO_EMPRESA_ID, null);
+ dataHash.put(EMPRESA_ID, empresa_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.EmpresasData toEmpresa_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_EMPRESA_ID) == null && getEmpresa_id() != null )
+ {
+ dataHash.put(TO_EMPRESA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.class, new Object[]{ getEmpresa_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) dataHash.get(TO_EMPRESA_ID);
+ }
+
+ public void setToEmpresa_id(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData empresa_idObject )
+ {
+ if( empresa_idObject == null )
+ {
+ dataHash.put(EMPRESA_ID, null);
+ }
+ else
+ {
+ dataHash.put(EMPRESA_ID, empresa_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID ));
+ }
+ dataHash.put(TO_EMPRESA_ID, empresa_idObject);
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_EMAIL_ID.equals( fieldName ) )
+ {
+ value = toEmail_id();
+ }
+ else if( TO_EMPRESA_ID.equals( fieldName ) )
+ {
+ value = toEmpresa_id();
+ }
+ else if( EMPRESA_ID.equals( fieldName ) )
+ {
+ value = getEmpresa_id();
+ }
+ else if( EMAIL_ID.equals( fieldName ) )
+ {
+ value = getEmail_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_EMAIL_ID.equals( fieldName ) )
+ {
+ setToEmail_id( (com.evolute.siprp.server.db.data.siprp_local3.HsEmailData) value );
+ }
+ else if( TO_EMPRESA_ID.equals( fieldName ) )
+ {
+ setToEmpresa_id( (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) value );
+ }
+ else if( EMPRESA_ID.equals( fieldName ) )
+ {
+ setEmpresa_id( (Integer) value );
+ }
+ else if( EMAIL_ID.equals( fieldName ) )
+ {
+ setEmail_id( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_EMAIL_ID) != null )
+ {
+ toEmail_id().save();
+ dataHash.put(EMAIL_ID, toEmail_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsEmailData.ID ));
+ }
+
+ if( dataHash.get(TO_EMPRESA_ID) != null )
+ {
+ toEmpresa_id().save();
+ dataHash.put(EMPRESA_ID, toEmpresa_id().get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsEmailEmpresa.class;
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsEmailEmpresaID getJDOPrimaryKey()
+ {
+ com.evolute.siprp.server.db.data.siprp_local3.HsEmailEmpresaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsEmailEmpresaID();
+
+ Object obj;
+ obj = this.getEmail_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.email_id = (Integer)obj;
+
+ obj = this.getEmpresa_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.empresa_id = (Integer)obj;
+
+ return id;
+
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresaID.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresaID.java
new file mode 100644
index 00000000..e91ca3af
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEmpresaID.java
@@ -0,0 +1,37 @@
+/*
+* HsEmailEmpresaID.java
+*
+* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import java.io.*;
+
+import com.evolute.utils.jdo.jpox.JDOIDClass;
+
+public final class HsEmailEmpresaID extends JDOIDClass implements Serializable
+{
+ public Integer email_id;
+ public Integer empresa_id;
+
+ public HsEmailEmpresaID()
+ {
+ }
+
+
+ public Object[] getValue()
+ {
+ Object value[] = new Object[ 2 ];
+ value[ 0 ] = email_id;
+ value[ 1 ] = empresa_id;
+ return value;
+ }
+
+ public void setValues( Object values[] )
+ {
+ email_id = (Integer) values[ 0 ];
+ empresa_id = (Integer) values[ 1 ];
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimento.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimento.java
new file mode 100644
index 00000000..72604cbd
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimento.java
@@ -0,0 +1,114 @@
+/*
+* HsEmailEstabelecimento.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsEmailEstabelecimento implements JDOInnerObject
+{
+ private Integer email_id;
+ private Integer estabelecimento_id;
+
+ public HsEmailEstabelecimento()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsEmailEstabelecimentoDataAuto.EMAIL_ID )
+ {
+ return email_id;
+ }
+ else if( fieldName == HsEmailEstabelecimentoDataAuto.ESTABELECIMENTO_ID )
+ {
+ return estabelecimento_id;
+ }
+ else if( fieldName.equals( HsEmailEstabelecimentoDataAuto.EMAIL_ID ) )
+ {
+ return email_id;
+ }
+ else if( fieldName.equals( HsEmailEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) )
+ {
+ return estabelecimento_id;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsEmailEstabelecimentoDataAuto.EMAIL_ID )
+ {
+ email_id = ( Integer ) value;
+ }
+ else if( fieldName == HsEmailEstabelecimentoDataAuto.ESTABELECIMENTO_ID )
+ {
+ estabelecimento_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsEmailEstabelecimentoDataAuto.EMAIL_ID ) )
+ {
+ email_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsEmailEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) )
+ {
+ estabelecimento_id = ( Integer ) value;
+ }
+ }
+
+ public Integer getEmail_id()
+ {
+ return email_id;
+ }
+
+ public void setEmail_id(Integer email_idValue )
+ {
+ this.email_id = email_idValue;
+ }
+
+ public Integer getEstabelecimento_id()
+ {
+ return estabelecimento_id;
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_idValue )
+ {
+ this.estabelecimento_id = estabelecimento_idValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsEmailEstabelecimentoDataAuto.class;
+ }
+
+ public HsEmailEstabelecimentoDataAuto getOuterClassInstance()
+ {
+ HsEmailEstabelecimentoDataAuto outerObj = new HsEmailEstabelecimentoDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsEmailEstabelecimentoID getJDOPrimaryKey()
+ {
+ com.evolute.siprp.server.db.data.siprp_local3.HsEmailEstabelecimentoID id = new com.evolute.siprp.server.db.data.siprp_local3.HsEmailEstabelecimentoID();
+
+ Object obj;
+ obj = this.getEmail_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.email_id = (Integer)obj;
+
+ obj = this.getEstabelecimento_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.estabelecimento_id = (Integer)obj;
+
+ return id;
+
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimentoData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimentoData.java
new file mode 100644
index 00000000..61825778
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimentoData.java
@@ -0,0 +1,18 @@
+/*
+* HsEmailEstabelecimentoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsEmailEstabelecimentoData extends com.evolute.siprp.server.db.data.siprp_local3.HsEmailEstabelecimentoDataAuto
+{
+
+ public HsEmailEstabelecimentoData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimentoDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimentoDataAuto.java
new file mode 100644
index 00000000..a8148460
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimentoDataAuto.java
@@ -0,0 +1,213 @@
+/*
+* HsEmailEstabelecimentoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsEmailEstabelecimentoDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_email_estabelecimento";
+
+ public static final String EMAIL_ID = "email_id";
+ public static final String EMAIL_ID_FULL = "hs_email_estabelecimento.email_id";
+ public static final String TO_EMAIL_ID = "to email_id";
+ public static final String ESTABELECIMENTO_ID = "estabelecimento_id";
+ public static final String ESTABELECIMENTO_ID_FULL = "hs_email_estabelecimento.estabelecimento_id";
+ public static final String TO_ESTABELECIMENTO_ID = "to estabelecimento_id";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ EMAIL_ID, ESTABELECIMENTO_ID, };
+
+ private Map dataHash;
+
+ public HsEmailEstabelecimentoDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getEmail_id()
+ {
+ return (Integer) dataHash.get(EMAIL_ID);
+ }
+
+ public void setEmail_id(Integer email_idValue )
+ {
+ dataHash.put(TO_EMAIL_ID, null);
+ dataHash.put(EMAIL_ID, email_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsEmailData toEmail_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_EMAIL_ID) == null && getEmail_id() != null )
+ {
+ dataHash.put(TO_EMAIL_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsEmailData.class, new Object[]{ getEmail_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsEmailData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.HsEmailData) dataHash.get(TO_EMAIL_ID);
+ }
+
+ public void setToEmail_id(com.evolute.siprp.server.db.data.siprp_local3.HsEmailData email_idObject )
+ {
+ if( email_idObject == null )
+ {
+ dataHash.put(EMAIL_ID, null);
+ }
+ else
+ {
+ dataHash.put(EMAIL_ID, email_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsEmailData.ID ));
+ }
+ dataHash.put(TO_EMAIL_ID, email_idObject);
+ }
+
+ public Integer getEstabelecimento_id()
+ {
+ return (Integer) dataHash.get(ESTABELECIMENTO_ID);
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_idValue )
+ {
+ dataHash.put(TO_ESTABELECIMENTO_ID, null);
+ dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData toEstabelecimento_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_ESTABELECIMENTO_ID) == null && getEstabelecimento_id() != null )
+ {
+ dataHash.put(TO_ESTABELECIMENTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.class, new Object[]{ getEstabelecimento_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) dataHash.get(TO_ESTABELECIMENTO_ID);
+ }
+
+ public void setToEstabelecimento_id(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData estabelecimento_idObject )
+ {
+ if( estabelecimento_idObject == null )
+ {
+ dataHash.put(ESTABELECIMENTO_ID, null);
+ }
+ else
+ {
+ dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID ));
+ }
+ dataHash.put(TO_ESTABELECIMENTO_ID, estabelecimento_idObject);
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ value = getEstabelecimento_id();
+ }
+ else if( TO_EMAIL_ID.equals( fieldName ) )
+ {
+ value = toEmail_id();
+ }
+ else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ value = toEstabelecimento_id();
+ }
+ else if( EMAIL_ID.equals( fieldName ) )
+ {
+ value = getEmail_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ setEstabelecimento_id( (Integer) value );
+ }
+ else if( TO_EMAIL_ID.equals( fieldName ) )
+ {
+ setToEmail_id( (com.evolute.siprp.server.db.data.siprp_local3.HsEmailData) value );
+ }
+ else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ setToEstabelecimento_id( (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) value );
+ }
+ else if( EMAIL_ID.equals( fieldName ) )
+ {
+ setEmail_id( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_EMAIL_ID) != null )
+ {
+ toEmail_id().save();
+ dataHash.put(EMAIL_ID, toEmail_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsEmailData.ID ));
+ }
+
+ if( dataHash.get(TO_ESTABELECIMENTO_ID) != null )
+ {
+ toEstabelecimento_id().save();
+ dataHash.put(ESTABELECIMENTO_ID, toEstabelecimento_id().get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsEmailEstabelecimento.class;
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsEmailEstabelecimentoID getJDOPrimaryKey()
+ {
+ com.evolute.siprp.server.db.data.siprp_local3.HsEmailEstabelecimentoID id = new com.evolute.siprp.server.db.data.siprp_local3.HsEmailEstabelecimentoID();
+
+ Object obj;
+ obj = this.getEmail_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.email_id = (Integer)obj;
+
+ obj = this.getEstabelecimento_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.estabelecimento_id = (Integer)obj;
+
+ return id;
+
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimentoID.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimentoID.java
new file mode 100644
index 00000000..b446e70b
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEmailEstabelecimentoID.java
@@ -0,0 +1,37 @@
+/*
+* HsEmailEstabelecimentoID.java
+*
+* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import java.io.*;
+
+import com.evolute.utils.jdo.jpox.JDOIDClass;
+
+public final class HsEmailEstabelecimentoID extends JDOIDClass implements Serializable
+{
+ public Integer email_id;
+ public Integer estabelecimento_id;
+
+ public HsEmailEstabelecimentoID()
+ {
+ }
+
+
+ public Object[] getValue()
+ {
+ Object value[] = new Object[ 2 ];
+ value[ 0 ] = email_id;
+ value[ 1 ] = estabelecimento_id;
+ return value;
+ }
+
+ public void setValues( Object values[] )
+ {
+ email_id = (Integer) values[ 0 ];
+ estabelecimento_id = (Integer) values[ 1 ];
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEquipamento.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEquipamento.java
new file mode 100644
index 00000000..93b1088e
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEquipamento.java
@@ -0,0 +1,183 @@
+/*
+* HsEquipamento.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsEquipamento implements JDOInnerObject
+{
+ private Integer id;
+ private String tipo;
+ private String marca;
+ private String modelo;
+ private java.sql.Timestamp deleted_date;
+
+ public HsEquipamento()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsEquipamentoDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == HsEquipamentoDataAuto.TIPO )
+ {
+ return tipo;
+ }
+ else if( fieldName == HsEquipamentoDataAuto.MARCA )
+ {
+ return marca;
+ }
+ else if( fieldName == HsEquipamentoDataAuto.MODELO )
+ {
+ return modelo;
+ }
+ else if( fieldName == HsEquipamentoDataAuto.DELETED_DATE )
+ {
+ return deleted_date;
+ }
+ else if( fieldName.equals( HsEquipamentoDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( HsEquipamentoDataAuto.TIPO ) )
+ {
+ return tipo;
+ }
+ else if( fieldName.equals( HsEquipamentoDataAuto.MARCA ) )
+ {
+ return marca;
+ }
+ else if( fieldName.equals( HsEquipamentoDataAuto.MODELO ) )
+ {
+ return modelo;
+ }
+ else if( fieldName.equals( HsEquipamentoDataAuto.DELETED_DATE ) )
+ {
+ return deleted_date;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsEquipamentoDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == HsEquipamentoDataAuto.TIPO )
+ {
+ tipo = ( String ) value;
+ }
+ else if( fieldName == HsEquipamentoDataAuto.MARCA )
+ {
+ marca = ( String ) value;
+ }
+ else if( fieldName == HsEquipamentoDataAuto.MODELO )
+ {
+ modelo = ( String ) value;
+ }
+ else if( fieldName == HsEquipamentoDataAuto.DELETED_DATE )
+ {
+ deleted_date = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName.equals( HsEquipamentoDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsEquipamentoDataAuto.TIPO ) )
+ {
+ tipo = ( String ) value;
+ }
+ else if( fieldName.equals( HsEquipamentoDataAuto.MARCA ) )
+ {
+ marca = ( String ) value;
+ }
+ else if( fieldName.equals( HsEquipamentoDataAuto.MODELO ) )
+ {
+ modelo = ( String ) value;
+ }
+ else if( fieldName.equals( HsEquipamentoDataAuto.DELETED_DATE ) )
+ {
+ deleted_date = ( java.sql.Timestamp ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getTipo()
+ {
+ return tipo;
+ }
+
+ public void setTipo(String tipoValue )
+ {
+ this.tipo = tipoValue;
+ }
+
+ public String getMarca()
+ {
+ return marca;
+ }
+
+ public void setMarca(String marcaValue )
+ {
+ this.marca = marcaValue;
+ }
+
+ public String getModelo()
+ {
+ return modelo;
+ }
+
+ public void setModelo(String modeloValue )
+ {
+ this.modelo = modeloValue;
+ }
+
+ public java.sql.Timestamp getDeleted_date()
+ {
+ return deleted_date;
+ }
+
+ public void setDeleted_date(java.sql.Timestamp deleted_dateValue )
+ {
+ this.deleted_date = deleted_dateValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsEquipamentoDataAuto.class;
+ }
+
+ public HsEquipamentoDataAuto getOuterClassInstance()
+ {
+ HsEquipamentoDataAuto outerObj = new HsEquipamentoDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEquipamentoData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEquipamentoData.java
new file mode 100644
index 00000000..e1bc0c8e
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEquipamentoData.java
@@ -0,0 +1,18 @@
+/*
+* HsEquipamentoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsEquipamentoData extends com.evolute.siprp.server.db.data.siprp_local3.HsEquipamentoDataAuto
+{
+
+ public HsEquipamentoData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEquipamentoDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEquipamentoDataAuto.java
new file mode 100644
index 00000000..fff3d566
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsEquipamentoDataAuto.java
@@ -0,0 +1,131 @@
+/*
+* HsEquipamentoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsEquipamentoDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_equipamento";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "hs_equipamento.id";
+ public static final String TIPO = "tipo";
+ public static final String TIPO_FULL = "hs_equipamento.tipo";
+ public static final String MARCA = "marca";
+ public static final String MARCA_FULL = "hs_equipamento.marca";
+ public static final String MODELO = "modelo";
+ public static final String MODELO_FULL = "hs_equipamento.modelo";
+ public static final String DELETED_DATE = "deleted_date";
+ public static final String DELETED_DATE_FULL = "hs_equipamento.deleted_date";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ TIPO, MARCA, MODELO, DELETED_DATE, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, TIPO, MARCA, MODELO, DELETED_DATE, };
+
+ private Map dataHash;
+
+ public HsEquipamentoDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getTipo()
+ {
+ return (String) get(TIPO);
+ }
+
+ public void setTipo(String tipoValue )
+ {
+ this.set(TIPO, tipoValue );
+ }
+
+ public String getMarca()
+ {
+ return (String) get(MARCA);
+ }
+
+ public void setMarca(String marcaValue )
+ {
+ this.set(MARCA, marcaValue );
+ }
+
+ public String getModelo()
+ {
+ return (String) get(MODELO);
+ }
+
+ public void setModelo(String modeloValue )
+ {
+ this.set(MODELO, modeloValue );
+ }
+
+ public java.sql.Timestamp getDeleted_date()
+ {
+ return (java.sql.Timestamp) get(DELETED_DATE);
+ }
+
+ public void setDeleted_date(java.sql.Timestamp deleted_dateValue )
+ {
+ this.set(DELETED_DATE, deleted_dateValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsEquipamento.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacao.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacao.java
new file mode 100644
index 00000000..9d907180
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacao.java
@@ -0,0 +1,156 @@
+/*
+* HsLegislacao.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsLegislacao implements JDOInnerObject
+{
+ private Integer id;
+ private String description;
+ private Integer categoria_id;
+ private java.sql.Timestamp deleted_date;
+
+ public HsLegislacao()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsLegislacaoDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == HsLegislacaoDataAuto.DESCRIPTION )
+ {
+ return description;
+ }
+ else if( fieldName == HsLegislacaoDataAuto.CATEGORIA_ID )
+ {
+ return categoria_id;
+ }
+ else if( fieldName == HsLegislacaoDataAuto.DELETED_DATE )
+ {
+ return deleted_date;
+ }
+ else if( fieldName.equals( HsLegislacaoDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( HsLegislacaoDataAuto.DESCRIPTION ) )
+ {
+ return description;
+ }
+ else if( fieldName.equals( HsLegislacaoDataAuto.CATEGORIA_ID ) )
+ {
+ return categoria_id;
+ }
+ else if( fieldName.equals( HsLegislacaoDataAuto.DELETED_DATE ) )
+ {
+ return deleted_date;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsLegislacaoDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == HsLegislacaoDataAuto.DESCRIPTION )
+ {
+ description = ( String ) value;
+ }
+ else if( fieldName == HsLegislacaoDataAuto.CATEGORIA_ID )
+ {
+ categoria_id = ( Integer ) value;
+ }
+ else if( fieldName == HsLegislacaoDataAuto.DELETED_DATE )
+ {
+ deleted_date = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName.equals( HsLegislacaoDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsLegislacaoDataAuto.DESCRIPTION ) )
+ {
+ description = ( String ) value;
+ }
+ else if( fieldName.equals( HsLegislacaoDataAuto.CATEGORIA_ID ) )
+ {
+ categoria_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsLegislacaoDataAuto.DELETED_DATE ) )
+ {
+ deleted_date = ( java.sql.Timestamp ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String descriptionValue )
+ {
+ this.description = descriptionValue;
+ }
+
+ public Integer getCategoria_id()
+ {
+ return categoria_id;
+ }
+
+ public void setCategoria_id(Integer categoria_idValue )
+ {
+ this.categoria_id = categoria_idValue;
+ }
+
+ public java.sql.Timestamp getDeleted_date()
+ {
+ return deleted_date;
+ }
+
+ public void setDeleted_date(java.sql.Timestamp deleted_dateValue )
+ {
+ this.deleted_date = deleted_dateValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsLegislacaoDataAuto.class;
+ }
+
+ public HsLegislacaoDataAuto getOuterClassInstance()
+ {
+ HsLegislacaoDataAuto outerObj = new HsLegislacaoDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoCategoria.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoCategoria.java
new file mode 100644
index 00000000..b5a12d2e
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoCategoria.java
@@ -0,0 +1,129 @@
+/*
+* HsLegislacaoCategoria.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsLegislacaoCategoria implements JDOInnerObject
+{
+ private Integer id;
+ private String description;
+ private java.sql.Timestamp deleted_date;
+
+ public HsLegislacaoCategoria()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsLegislacaoCategoriaDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == HsLegislacaoCategoriaDataAuto.DESCRIPTION )
+ {
+ return description;
+ }
+ else if( fieldName == HsLegislacaoCategoriaDataAuto.DELETED_DATE )
+ {
+ return deleted_date;
+ }
+ else if( fieldName.equals( HsLegislacaoCategoriaDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( HsLegislacaoCategoriaDataAuto.DESCRIPTION ) )
+ {
+ return description;
+ }
+ else if( fieldName.equals( HsLegislacaoCategoriaDataAuto.DELETED_DATE ) )
+ {
+ return deleted_date;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsLegislacaoCategoriaDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == HsLegislacaoCategoriaDataAuto.DESCRIPTION )
+ {
+ description = ( String ) value;
+ }
+ else if( fieldName == HsLegislacaoCategoriaDataAuto.DELETED_DATE )
+ {
+ deleted_date = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName.equals( HsLegislacaoCategoriaDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsLegislacaoCategoriaDataAuto.DESCRIPTION ) )
+ {
+ description = ( String ) value;
+ }
+ else if( fieldName.equals( HsLegislacaoCategoriaDataAuto.DELETED_DATE ) )
+ {
+ deleted_date = ( java.sql.Timestamp ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String descriptionValue )
+ {
+ this.description = descriptionValue;
+ }
+
+ public java.sql.Timestamp getDeleted_date()
+ {
+ return deleted_date;
+ }
+
+ public void setDeleted_date(java.sql.Timestamp deleted_dateValue )
+ {
+ this.deleted_date = deleted_dateValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsLegislacaoCategoriaDataAuto.class;
+ }
+
+ public HsLegislacaoCategoriaDataAuto getOuterClassInstance()
+ {
+ HsLegislacaoCategoriaDataAuto outerObj = new HsLegislacaoCategoriaDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoCategoriaData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoCategoriaData.java
new file mode 100644
index 00000000..a67d8598
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoCategoriaData.java
@@ -0,0 +1,18 @@
+/*
+* HsLegislacaoCategoriaDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsLegislacaoCategoriaData extends com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoCategoriaDataAuto
+{
+
+ public HsLegislacaoCategoriaData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoCategoriaDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoCategoriaDataAuto.java
new file mode 100644
index 00000000..cac6f64d
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoCategoriaDataAuto.java
@@ -0,0 +1,107 @@
+/*
+* HsLegislacaoCategoriaDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsLegislacaoCategoriaDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_legislacao_categoria";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "hs_legislacao_categoria.id";
+ public static final String DESCRIPTION = "description";
+ public static final String DESCRIPTION_FULL = "hs_legislacao_categoria.description";
+ public static final String DELETED_DATE = "deleted_date";
+ public static final String DELETED_DATE_FULL = "hs_legislacao_categoria.deleted_date";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ DESCRIPTION, DELETED_DATE, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, DESCRIPTION, DELETED_DATE, };
+
+ private Map dataHash;
+
+ public HsLegislacaoCategoriaDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getDescription()
+ {
+ return (String) get(DESCRIPTION);
+ }
+
+ public void setDescription(String descriptionValue )
+ {
+ this.set(DESCRIPTION, descriptionValue );
+ }
+
+ public java.sql.Timestamp getDeleted_date()
+ {
+ return (java.sql.Timestamp) get(DELETED_DATE);
+ }
+
+ public void setDeleted_date(java.sql.Timestamp deleted_dateValue )
+ {
+ this.set(DELETED_DATE, deleted_dateValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsLegislacaoCategoria.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoData.java
new file mode 100644
index 00000000..fa0fd18e
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoData.java
@@ -0,0 +1,18 @@
+/*
+* HsLegislacaoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsLegislacaoData extends com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoDataAuto
+{
+
+ public HsLegislacaoData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoDataAuto.java
new file mode 100644
index 00000000..f5ba2806
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoDataAuto.java
@@ -0,0 +1,178 @@
+/*
+* HsLegislacaoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsLegislacaoDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_legislacao";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "hs_legislacao.id";
+ public static final String DESCRIPTION = "description";
+ public static final String DESCRIPTION_FULL = "hs_legislacao.description";
+ public static final String CATEGORIA_ID = "categoria_id";
+ public static final String CATEGORIA_ID_FULL = "hs_legislacao.categoria_id";
+ public static final String TO_CATEGORIA_ID = "to categoria_id";
+ public static final String DELETED_DATE = "deleted_date";
+ public static final String DELETED_DATE_FULL = "hs_legislacao.deleted_date";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ DESCRIPTION, CATEGORIA_ID, TO_CATEGORIA_ID, DELETED_DATE, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, DESCRIPTION, CATEGORIA_ID, DELETED_DATE, };
+
+ private Map dataHash;
+
+ public HsLegislacaoDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getDescription()
+ {
+ return (String) get(DESCRIPTION);
+ }
+
+ public void setDescription(String descriptionValue )
+ {
+ this.set(DESCRIPTION, descriptionValue );
+ }
+
+ public Integer getCategoria_id()
+ {
+ return (Integer) dataHash.get(CATEGORIA_ID);
+ }
+
+ public void setCategoria_id(Integer categoria_idValue )
+ {
+ dataHash.put(TO_CATEGORIA_ID, null);
+ dataHash.put(CATEGORIA_ID, categoria_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoCategoriaData toCategoria_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_CATEGORIA_ID) == null && getCategoria_id() != null )
+ {
+ dataHash.put(TO_CATEGORIA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoCategoriaData.class, new Object[]{ getCategoria_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoCategoriaData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoCategoriaData) dataHash.get(TO_CATEGORIA_ID);
+ }
+
+ public void setToCategoria_id(com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoCategoriaData categoria_idObject )
+ {
+ if( categoria_idObject == null )
+ {
+ dataHash.put(CATEGORIA_ID, null);
+ }
+ else
+ {
+ dataHash.put(CATEGORIA_ID, categoria_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoCategoriaData.ID ));
+ }
+ dataHash.put(TO_CATEGORIA_ID, categoria_idObject);
+ }
+
+ public java.sql.Timestamp getDeleted_date()
+ {
+ return (java.sql.Timestamp) get(DELETED_DATE);
+ }
+
+ public void setDeleted_date(java.sql.Timestamp deleted_dateValue )
+ {
+ this.set(DELETED_DATE, deleted_dateValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( CATEGORIA_ID.equals( fieldName ) )
+ {
+ value = getCategoria_id();
+ }
+ else if( TO_CATEGORIA_ID.equals( fieldName ) )
+ {
+ value = toCategoria_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( CATEGORIA_ID.equals( fieldName ) )
+ {
+ setCategoria_id( (Integer) value );
+ }
+ else if( TO_CATEGORIA_ID.equals( fieldName ) )
+ {
+ setToCategoria_id( (com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoCategoriaData) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_CATEGORIA_ID) != null )
+ {
+ toCategoria_id().save();
+ dataHash.put(CATEGORIA_ID, toCategoria_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoCategoriaData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsLegislacao.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresa.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresa.java
new file mode 100644
index 00000000..d924dd3a
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresa.java
@@ -0,0 +1,114 @@
+/*
+* HsLegislacaoEmpresa.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsLegislacaoEmpresa implements JDOInnerObject
+{
+ private Integer legislacao_id;
+ private Integer empresa_id;
+
+ public HsLegislacaoEmpresa()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsLegislacaoEmpresaDataAuto.LEGISLACAO_ID )
+ {
+ return legislacao_id;
+ }
+ else if( fieldName == HsLegislacaoEmpresaDataAuto.EMPRESA_ID )
+ {
+ return empresa_id;
+ }
+ else if( fieldName.equals( HsLegislacaoEmpresaDataAuto.LEGISLACAO_ID ) )
+ {
+ return legislacao_id;
+ }
+ else if( fieldName.equals( HsLegislacaoEmpresaDataAuto.EMPRESA_ID ) )
+ {
+ return empresa_id;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsLegislacaoEmpresaDataAuto.LEGISLACAO_ID )
+ {
+ legislacao_id = ( Integer ) value;
+ }
+ else if( fieldName == HsLegislacaoEmpresaDataAuto.EMPRESA_ID )
+ {
+ empresa_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsLegislacaoEmpresaDataAuto.LEGISLACAO_ID ) )
+ {
+ legislacao_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsLegislacaoEmpresaDataAuto.EMPRESA_ID ) )
+ {
+ empresa_id = ( Integer ) value;
+ }
+ }
+
+ public Integer getLegislacao_id()
+ {
+ return legislacao_id;
+ }
+
+ public void setLegislacao_id(Integer legislacao_idValue )
+ {
+ this.legislacao_id = legislacao_idValue;
+ }
+
+ public Integer getEmpresa_id()
+ {
+ return empresa_id;
+ }
+
+ public void setEmpresa_id(Integer empresa_idValue )
+ {
+ this.empresa_id = empresa_idValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsLegislacaoEmpresaDataAuto.class;
+ }
+
+ public HsLegislacaoEmpresaDataAuto getOuterClassInstance()
+ {
+ HsLegislacaoEmpresaDataAuto outerObj = new HsLegislacaoEmpresaDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEmpresaID getJDOPrimaryKey()
+ {
+ com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEmpresaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEmpresaID();
+
+ Object obj;
+ obj = this.getLegislacao_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.legislacao_id = (Integer)obj;
+
+ obj = this.getEmpresa_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.empresa_id = (Integer)obj;
+
+ return id;
+
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresaData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresaData.java
new file mode 100644
index 00000000..a813f1e0
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresaData.java
@@ -0,0 +1,18 @@
+/*
+* HsLegislacaoEmpresaDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsLegislacaoEmpresaData extends com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEmpresaDataAuto
+{
+
+ public HsLegislacaoEmpresaData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresaDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresaDataAuto.java
new file mode 100644
index 00000000..13eae314
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresaDataAuto.java
@@ -0,0 +1,213 @@
+/*
+* HsLegislacaoEmpresaDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsLegislacaoEmpresaDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_legislacao_empresa";
+
+ public static final String LEGISLACAO_ID = "legislacao_id";
+ public static final String LEGISLACAO_ID_FULL = "hs_legislacao_empresa.legislacao_id";
+ public static final String TO_LEGISLACAO_ID = "to legislacao_id";
+ public static final String EMPRESA_ID = "empresa_id";
+ public static final String EMPRESA_ID_FULL = "hs_legislacao_empresa.empresa_id";
+ public static final String TO_EMPRESA_ID = "to empresa_id";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ LEGISLACAO_ID, EMPRESA_ID, };
+
+ private Map dataHash;
+
+ public HsLegislacaoEmpresaDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getLegislacao_id()
+ {
+ return (Integer) dataHash.get(LEGISLACAO_ID);
+ }
+
+ public void setLegislacao_id(Integer legislacao_idValue )
+ {
+ dataHash.put(TO_LEGISLACAO_ID, null);
+ dataHash.put(LEGISLACAO_ID, legislacao_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData toLegislacao_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_LEGISLACAO_ID) == null && getLegislacao_id() != null )
+ {
+ dataHash.put(TO_LEGISLACAO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData.class, new Object[]{ getLegislacao_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData) dataHash.get(TO_LEGISLACAO_ID);
+ }
+
+ public void setToLegislacao_id(com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData legislacao_idObject )
+ {
+ if( legislacao_idObject == null )
+ {
+ dataHash.put(LEGISLACAO_ID, null);
+ }
+ else
+ {
+ dataHash.put(LEGISLACAO_ID, legislacao_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData.ID ));
+ }
+ dataHash.put(TO_LEGISLACAO_ID, legislacao_idObject);
+ }
+
+ public Integer getEmpresa_id()
+ {
+ return (Integer) dataHash.get(EMPRESA_ID);
+ }
+
+ public void setEmpresa_id(Integer empresa_idValue )
+ {
+ dataHash.put(TO_EMPRESA_ID, null);
+ dataHash.put(EMPRESA_ID, empresa_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.EmpresasData toEmpresa_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_EMPRESA_ID) == null && getEmpresa_id() != null )
+ {
+ dataHash.put(TO_EMPRESA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.class, new Object[]{ getEmpresa_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) dataHash.get(TO_EMPRESA_ID);
+ }
+
+ public void setToEmpresa_id(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData empresa_idObject )
+ {
+ if( empresa_idObject == null )
+ {
+ dataHash.put(EMPRESA_ID, null);
+ }
+ else
+ {
+ dataHash.put(EMPRESA_ID, empresa_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID ));
+ }
+ dataHash.put(TO_EMPRESA_ID, empresa_idObject);
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_LEGISLACAO_ID.equals( fieldName ) )
+ {
+ value = toLegislacao_id();
+ }
+ else if( TO_EMPRESA_ID.equals( fieldName ) )
+ {
+ value = toEmpresa_id();
+ }
+ else if( EMPRESA_ID.equals( fieldName ) )
+ {
+ value = getEmpresa_id();
+ }
+ else if( LEGISLACAO_ID.equals( fieldName ) )
+ {
+ value = getLegislacao_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_LEGISLACAO_ID.equals( fieldName ) )
+ {
+ setToLegislacao_id( (com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData) value );
+ }
+ else if( TO_EMPRESA_ID.equals( fieldName ) )
+ {
+ setToEmpresa_id( (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) value );
+ }
+ else if( EMPRESA_ID.equals( fieldName ) )
+ {
+ setEmpresa_id( (Integer) value );
+ }
+ else if( LEGISLACAO_ID.equals( fieldName ) )
+ {
+ setLegislacao_id( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_LEGISLACAO_ID) != null )
+ {
+ toLegislacao_id().save();
+ dataHash.put(LEGISLACAO_ID, toLegislacao_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData.ID ));
+ }
+
+ if( dataHash.get(TO_EMPRESA_ID) != null )
+ {
+ toEmpresa_id().save();
+ dataHash.put(EMPRESA_ID, toEmpresa_id().get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsLegislacaoEmpresa.class;
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEmpresaID getJDOPrimaryKey()
+ {
+ com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEmpresaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEmpresaID();
+
+ Object obj;
+ obj = this.getLegislacao_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.legislacao_id = (Integer)obj;
+
+ obj = this.getEmpresa_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.empresa_id = (Integer)obj;
+
+ return id;
+
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresaID.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresaID.java
new file mode 100644
index 00000000..434b5896
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEmpresaID.java
@@ -0,0 +1,37 @@
+/*
+* HsLegislacaoEmpresaID.java
+*
+* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import java.io.*;
+
+import com.evolute.utils.jdo.jpox.JDOIDClass;
+
+public final class HsLegislacaoEmpresaID extends JDOIDClass implements Serializable
+{
+ public Integer legislacao_id;
+ public Integer empresa_id;
+
+ public HsLegislacaoEmpresaID()
+ {
+ }
+
+
+ public Object[] getValue()
+ {
+ Object value[] = new Object[ 2 ];
+ value[ 0 ] = legislacao_id;
+ value[ 1 ] = empresa_id;
+ return value;
+ }
+
+ public void setValues( Object values[] )
+ {
+ legislacao_id = (Integer) values[ 0 ];
+ empresa_id = (Integer) values[ 1 ];
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimento.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimento.java
new file mode 100644
index 00000000..1cfe7a33
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimento.java
@@ -0,0 +1,141 @@
+/*
+* HsLegislacaoEstabelecimento.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsLegislacaoEstabelecimento implements JDOInnerObject
+{
+ private Integer legislacao_id;
+ private Integer estabelecimento_id;
+ private Integer ordem;
+
+ public HsLegislacaoEstabelecimento()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsLegislacaoEstabelecimentoDataAuto.LEGISLACAO_ID )
+ {
+ return legislacao_id;
+ }
+ else if( fieldName == HsLegislacaoEstabelecimentoDataAuto.ESTABELECIMENTO_ID )
+ {
+ return estabelecimento_id;
+ }
+ else if( fieldName == HsLegislacaoEstabelecimentoDataAuto.ORDEM )
+ {
+ return ordem;
+ }
+ else if( fieldName.equals( HsLegislacaoEstabelecimentoDataAuto.LEGISLACAO_ID ) )
+ {
+ return legislacao_id;
+ }
+ else if( fieldName.equals( HsLegislacaoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) )
+ {
+ return estabelecimento_id;
+ }
+ else if( fieldName.equals( HsLegislacaoEstabelecimentoDataAuto.ORDEM ) )
+ {
+ return ordem;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsLegislacaoEstabelecimentoDataAuto.LEGISLACAO_ID )
+ {
+ legislacao_id = ( Integer ) value;
+ }
+ else if( fieldName == HsLegislacaoEstabelecimentoDataAuto.ESTABELECIMENTO_ID )
+ {
+ estabelecimento_id = ( Integer ) value;
+ }
+ else if( fieldName == HsLegislacaoEstabelecimentoDataAuto.ORDEM )
+ {
+ ordem = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsLegislacaoEstabelecimentoDataAuto.LEGISLACAO_ID ) )
+ {
+ legislacao_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsLegislacaoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) )
+ {
+ estabelecimento_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsLegislacaoEstabelecimentoDataAuto.ORDEM ) )
+ {
+ ordem = ( Integer ) value;
+ }
+ }
+
+ public Integer getLegislacao_id()
+ {
+ return legislacao_id;
+ }
+
+ public void setLegislacao_id(Integer legislacao_idValue )
+ {
+ this.legislacao_id = legislacao_idValue;
+ }
+
+ public Integer getEstabelecimento_id()
+ {
+ return estabelecimento_id;
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_idValue )
+ {
+ this.estabelecimento_id = estabelecimento_idValue;
+ }
+
+ public Integer getOrdem()
+ {
+ return ordem;
+ }
+
+ public void setOrdem(Integer ordemValue )
+ {
+ this.ordem = ordemValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsLegislacaoEstabelecimentoDataAuto.class;
+ }
+
+ public HsLegislacaoEstabelecimentoDataAuto getOuterClassInstance()
+ {
+ HsLegislacaoEstabelecimentoDataAuto outerObj = new HsLegislacaoEstabelecimentoDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEstabelecimentoID getJDOPrimaryKey()
+ {
+ com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEstabelecimentoID id = new com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEstabelecimentoID();
+
+ Object obj;
+ obj = this.getLegislacao_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.legislacao_id = (Integer)obj;
+
+ obj = this.getEstabelecimento_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.estabelecimento_id = (Integer)obj;
+
+ return id;
+
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimentoData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimentoData.java
new file mode 100644
index 00000000..1b59d4b5
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimentoData.java
@@ -0,0 +1,18 @@
+/*
+* HsLegislacaoEstabelecimentoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsLegislacaoEstabelecimentoData extends com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEstabelecimentoDataAuto
+{
+
+ public HsLegislacaoEstabelecimentoData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimentoDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimentoDataAuto.java
new file mode 100644
index 00000000..3a80bb57
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimentoDataAuto.java
@@ -0,0 +1,225 @@
+/*
+* HsLegislacaoEstabelecimentoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsLegislacaoEstabelecimentoDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_legislacao_estabelecimento";
+
+ public static final String LEGISLACAO_ID = "legislacao_id";
+ public static final String LEGISLACAO_ID_FULL = "hs_legislacao_estabelecimento.legislacao_id";
+ public static final String TO_LEGISLACAO_ID = "to legislacao_id";
+ public static final String ESTABELECIMENTO_ID = "estabelecimento_id";
+ public static final String ESTABELECIMENTO_ID_FULL = "hs_legislacao_estabelecimento.estabelecimento_id";
+ public static final String TO_ESTABELECIMENTO_ID = "to estabelecimento_id";
+ public static final String ORDEM = "ordem";
+ public static final String ORDEM_FULL = "hs_legislacao_estabelecimento.ordem";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ ORDEM, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ LEGISLACAO_ID, ESTABELECIMENTO_ID, ORDEM, };
+
+ private Map dataHash;
+
+ public HsLegislacaoEstabelecimentoDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getLegislacao_id()
+ {
+ return (Integer) dataHash.get(LEGISLACAO_ID);
+ }
+
+ public void setLegislacao_id(Integer legislacao_idValue )
+ {
+ dataHash.put(TO_LEGISLACAO_ID, null);
+ dataHash.put(LEGISLACAO_ID, legislacao_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData toLegislacao_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_LEGISLACAO_ID) == null && getLegislacao_id() != null )
+ {
+ dataHash.put(TO_LEGISLACAO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData.class, new Object[]{ getLegislacao_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData) dataHash.get(TO_LEGISLACAO_ID);
+ }
+
+ public void setToLegislacao_id(com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData legislacao_idObject )
+ {
+ if( legislacao_idObject == null )
+ {
+ dataHash.put(LEGISLACAO_ID, null);
+ }
+ else
+ {
+ dataHash.put(LEGISLACAO_ID, legislacao_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData.ID ));
+ }
+ dataHash.put(TO_LEGISLACAO_ID, legislacao_idObject);
+ }
+
+ public Integer getEstabelecimento_id()
+ {
+ return (Integer) dataHash.get(ESTABELECIMENTO_ID);
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_idValue )
+ {
+ dataHash.put(TO_ESTABELECIMENTO_ID, null);
+ dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData toEstabelecimento_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_ESTABELECIMENTO_ID) == null && getEstabelecimento_id() != null )
+ {
+ dataHash.put(TO_ESTABELECIMENTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.class, new Object[]{ getEstabelecimento_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) dataHash.get(TO_ESTABELECIMENTO_ID);
+ }
+
+ public void setToEstabelecimento_id(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData estabelecimento_idObject )
+ {
+ if( estabelecimento_idObject == null )
+ {
+ dataHash.put(ESTABELECIMENTO_ID, null);
+ }
+ else
+ {
+ dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID ));
+ }
+ dataHash.put(TO_ESTABELECIMENTO_ID, estabelecimento_idObject);
+ }
+
+ public Integer getOrdem()
+ {
+ return (Integer) get(ORDEM);
+ }
+
+ public void setOrdem(Integer ordemValue )
+ {
+ this.set(ORDEM, ordemValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ value = getEstabelecimento_id();
+ }
+ else if( TO_LEGISLACAO_ID.equals( fieldName ) )
+ {
+ value = toLegislacao_id();
+ }
+ else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ value = toEstabelecimento_id();
+ }
+ else if( LEGISLACAO_ID.equals( fieldName ) )
+ {
+ value = getLegislacao_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ setEstabelecimento_id( (Integer) value );
+ }
+ else if( TO_LEGISLACAO_ID.equals( fieldName ) )
+ {
+ setToLegislacao_id( (com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData) value );
+ }
+ else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ setToEstabelecimento_id( (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) value );
+ }
+ else if( LEGISLACAO_ID.equals( fieldName ) )
+ {
+ setLegislacao_id( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_LEGISLACAO_ID) != null )
+ {
+ toLegislacao_id().save();
+ dataHash.put(LEGISLACAO_ID, toLegislacao_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoData.ID ));
+ }
+
+ if( dataHash.get(TO_ESTABELECIMENTO_ID) != null )
+ {
+ toEstabelecimento_id().save();
+ dataHash.put(ESTABELECIMENTO_ID, toEstabelecimento_id().get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsLegislacaoEstabelecimento.class;
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEstabelecimentoID getJDOPrimaryKey()
+ {
+ com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEstabelecimentoID id = new com.evolute.siprp.server.db.data.siprp_local3.HsLegislacaoEstabelecimentoID();
+
+ Object obj;
+ obj = this.getLegislacao_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.legislacao_id = (Integer)obj;
+
+ obj = this.getEstabelecimento_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.estabelecimento_id = (Integer)obj;
+
+ return id;
+
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimentoID.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimentoID.java
new file mode 100644
index 00000000..4458495b
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsLegislacaoEstabelecimentoID.java
@@ -0,0 +1,37 @@
+/*
+* HsLegislacaoEstabelecimentoID.java
+*
+* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import java.io.*;
+
+import com.evolute.utils.jdo.jpox.JDOIDClass;
+
+public final class HsLegislacaoEstabelecimentoID extends JDOIDClass implements Serializable
+{
+ public Integer legislacao_id;
+ public Integer estabelecimento_id;
+
+ public HsLegislacaoEstabelecimentoID()
+ {
+ }
+
+
+ public Object[] getValue()
+ {
+ Object value[] = new Object[ 2 ];
+ value[ 0 ] = legislacao_id;
+ value[ 1 ] = estabelecimento_id;
+ return value;
+ }
+
+ public void setValues( Object values[] )
+ {
+ legislacao_id = (Integer) values[ 0 ];
+ estabelecimento_id = (Integer) values[ 1 ];
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsMedida.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsMedida.java
new file mode 100644
index 00000000..c7ca53da
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsMedida.java
@@ -0,0 +1,156 @@
+/*
+* HsMedida.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsMedida implements JDOInnerObject
+{
+ private Integer id;
+ private String description;
+ private String requesitos_legais;
+ private java.sql.Timestamp deleted_date;
+
+ public HsMedida()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsMedidaDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == HsMedidaDataAuto.DESCRIPTION )
+ {
+ return description;
+ }
+ else if( fieldName == HsMedidaDataAuto.REQUESITOS_LEGAIS )
+ {
+ return requesitos_legais;
+ }
+ else if( fieldName == HsMedidaDataAuto.DELETED_DATE )
+ {
+ return deleted_date;
+ }
+ else if( fieldName.equals( HsMedidaDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( HsMedidaDataAuto.DESCRIPTION ) )
+ {
+ return description;
+ }
+ else if( fieldName.equals( HsMedidaDataAuto.REQUESITOS_LEGAIS ) )
+ {
+ return requesitos_legais;
+ }
+ else if( fieldName.equals( HsMedidaDataAuto.DELETED_DATE ) )
+ {
+ return deleted_date;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsMedidaDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == HsMedidaDataAuto.DESCRIPTION )
+ {
+ description = ( String ) value;
+ }
+ else if( fieldName == HsMedidaDataAuto.REQUESITOS_LEGAIS )
+ {
+ requesitos_legais = ( String ) value;
+ }
+ else if( fieldName == HsMedidaDataAuto.DELETED_DATE )
+ {
+ deleted_date = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName.equals( HsMedidaDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsMedidaDataAuto.DESCRIPTION ) )
+ {
+ description = ( String ) value;
+ }
+ else if( fieldName.equals( HsMedidaDataAuto.REQUESITOS_LEGAIS ) )
+ {
+ requesitos_legais = ( String ) value;
+ }
+ else if( fieldName.equals( HsMedidaDataAuto.DELETED_DATE ) )
+ {
+ deleted_date = ( java.sql.Timestamp ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String descriptionValue )
+ {
+ this.description = descriptionValue;
+ }
+
+ public String getRequesitos_legais()
+ {
+ return requesitos_legais;
+ }
+
+ public void setRequesitos_legais(String requesitos_legaisValue )
+ {
+ this.requesitos_legais = requesitos_legaisValue;
+ }
+
+ public java.sql.Timestamp getDeleted_date()
+ {
+ return deleted_date;
+ }
+
+ public void setDeleted_date(java.sql.Timestamp deleted_dateValue )
+ {
+ this.deleted_date = deleted_dateValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsMedidaDataAuto.class;
+ }
+
+ public HsMedidaDataAuto getOuterClassInstance()
+ {
+ HsMedidaDataAuto outerObj = new HsMedidaDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsMedidaData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsMedidaData.java
new file mode 100644
index 00000000..a8633b3e
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsMedidaData.java
@@ -0,0 +1,18 @@
+/*
+* HsMedidaDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsMedidaData extends com.evolute.siprp.server.db.data.siprp_local3.HsMedidaDataAuto
+{
+
+ public HsMedidaData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsMedidaDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsMedidaDataAuto.java
new file mode 100644
index 00000000..cb1fe621
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsMedidaDataAuto.java
@@ -0,0 +1,119 @@
+/*
+* HsMedidaDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsMedidaDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_medida";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "hs_medida.id";
+ public static final String DESCRIPTION = "description";
+ public static final String DESCRIPTION_FULL = "hs_medida.description";
+ public static final String REQUESITOS_LEGAIS = "requesitos_legais";
+ public static final String REQUESITOS_LEGAIS_FULL = "hs_medida.requesitos_legais";
+ public static final String DELETED_DATE = "deleted_date";
+ public static final String DELETED_DATE_FULL = "hs_medida.deleted_date";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ DESCRIPTION, REQUESITOS_LEGAIS, DELETED_DATE, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, DESCRIPTION, REQUESITOS_LEGAIS, DELETED_DATE, };
+
+ private Map dataHash;
+
+ public HsMedidaDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getDescription()
+ {
+ return (String) get(DESCRIPTION);
+ }
+
+ public void setDescription(String descriptionValue )
+ {
+ this.set(DESCRIPTION, descriptionValue );
+ }
+
+ public String getRequesitos_legais()
+ {
+ return (String) get(REQUESITOS_LEGAIS);
+ }
+
+ public void setRequesitos_legais(String requesitos_legaisValue )
+ {
+ this.set(REQUESITOS_LEGAIS, requesitos_legaisValue );
+ }
+
+ public java.sql.Timestamp getDeleted_date()
+ {
+ return (java.sql.Timestamp) get(DELETED_DATE);
+ }
+
+ public void setDeleted_date(java.sql.Timestamp deleted_dateValue )
+ {
+ this.set(DELETED_DATE, deleted_dateValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsMedida.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacao.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacao.java
new file mode 100644
index 00000000..ad7d6895
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacao.java
@@ -0,0 +1,183 @@
+/*
+* HsNormalizacao.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsNormalizacao implements JDOInnerObject
+{
+ private Integer id;
+ private String codigo;
+ private String descricao;
+ private Boolean portuguesa;
+ private java.sql.Timestamp deleted_date;
+
+ public HsNormalizacao()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsNormalizacaoDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == HsNormalizacaoDataAuto.CODIGO )
+ {
+ return codigo;
+ }
+ else if( fieldName == HsNormalizacaoDataAuto.DESCRICAO )
+ {
+ return descricao;
+ }
+ else if( fieldName == HsNormalizacaoDataAuto.PORTUGUESA )
+ {
+ return portuguesa;
+ }
+ else if( fieldName == HsNormalizacaoDataAuto.DELETED_DATE )
+ {
+ return deleted_date;
+ }
+ else if( fieldName.equals( HsNormalizacaoDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( HsNormalizacaoDataAuto.CODIGO ) )
+ {
+ return codigo;
+ }
+ else if( fieldName.equals( HsNormalizacaoDataAuto.DESCRICAO ) )
+ {
+ return descricao;
+ }
+ else if( fieldName.equals( HsNormalizacaoDataAuto.PORTUGUESA ) )
+ {
+ return portuguesa;
+ }
+ else if( fieldName.equals( HsNormalizacaoDataAuto.DELETED_DATE ) )
+ {
+ return deleted_date;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsNormalizacaoDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == HsNormalizacaoDataAuto.CODIGO )
+ {
+ codigo = ( String ) value;
+ }
+ else if( fieldName == HsNormalizacaoDataAuto.DESCRICAO )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName == HsNormalizacaoDataAuto.PORTUGUESA )
+ {
+ portuguesa = ( Boolean ) value;
+ }
+ else if( fieldName == HsNormalizacaoDataAuto.DELETED_DATE )
+ {
+ deleted_date = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName.equals( HsNormalizacaoDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsNormalizacaoDataAuto.CODIGO ) )
+ {
+ codigo = ( String ) value;
+ }
+ else if( fieldName.equals( HsNormalizacaoDataAuto.DESCRICAO ) )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName.equals( HsNormalizacaoDataAuto.PORTUGUESA ) )
+ {
+ portuguesa = ( Boolean ) value;
+ }
+ else if( fieldName.equals( HsNormalizacaoDataAuto.DELETED_DATE ) )
+ {
+ deleted_date = ( java.sql.Timestamp ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getCodigo()
+ {
+ return codigo;
+ }
+
+ public void setCodigo(String codigoValue )
+ {
+ this.codigo = codigoValue;
+ }
+
+ public String getDescricao()
+ {
+ return descricao;
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.descricao = descricaoValue;
+ }
+
+ public Boolean getPortuguesa()
+ {
+ return portuguesa;
+ }
+
+ public void setPortuguesa(Boolean portuguesaValue )
+ {
+ this.portuguesa = portuguesaValue;
+ }
+
+ public java.sql.Timestamp getDeleted_date()
+ {
+ return deleted_date;
+ }
+
+ public void setDeleted_date(java.sql.Timestamp deleted_dateValue )
+ {
+ this.deleted_date = deleted_dateValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsNormalizacaoDataAuto.class;
+ }
+
+ public HsNormalizacaoDataAuto getOuterClassInstance()
+ {
+ HsNormalizacaoDataAuto outerObj = new HsNormalizacaoDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoData.java
new file mode 100644
index 00000000..4f3994c2
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoData.java
@@ -0,0 +1,18 @@
+/*
+* HsNormalizacaoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsNormalizacaoData extends com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoDataAuto
+{
+
+ public HsNormalizacaoData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoDataAuto.java
new file mode 100644
index 00000000..24cb1ffa
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoDataAuto.java
@@ -0,0 +1,131 @@
+/*
+* HsNormalizacaoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsNormalizacaoDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_normalizacao";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "hs_normalizacao.id";
+ public static final String CODIGO = "codigo";
+ public static final String CODIGO_FULL = "hs_normalizacao.codigo";
+ public static final String DESCRICAO = "descricao";
+ public static final String DESCRICAO_FULL = "hs_normalizacao.descricao";
+ public static final String PORTUGUESA = "portuguesa";
+ public static final String PORTUGUESA_FULL = "hs_normalizacao.portuguesa";
+ public static final String DELETED_DATE = "deleted_date";
+ public static final String DELETED_DATE_FULL = "hs_normalizacao.deleted_date";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ CODIGO, DESCRICAO, PORTUGUESA, DELETED_DATE, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, CODIGO, DESCRICAO, PORTUGUESA, DELETED_DATE, };
+
+ private Map dataHash;
+
+ public HsNormalizacaoDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getCodigo()
+ {
+ return (String) get(CODIGO);
+ }
+
+ public void setCodigo(String codigoValue )
+ {
+ this.set(CODIGO, codigoValue );
+ }
+
+ public String getDescricao()
+ {
+ return (String) get(DESCRICAO);
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.set(DESCRICAO, descricaoValue );
+ }
+
+ public Boolean getPortuguesa()
+ {
+ return (Boolean) get(PORTUGUESA);
+ }
+
+ public void setPortuguesa(Boolean portuguesaValue )
+ {
+ this.set(PORTUGUESA, portuguesaValue );
+ }
+
+ public java.sql.Timestamp getDeleted_date()
+ {
+ return (java.sql.Timestamp) get(DELETED_DATE);
+ }
+
+ public void setDeleted_date(java.sql.Timestamp deleted_dateValue )
+ {
+ this.set(DELETED_DATE, deleted_dateValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ value = dataHash.get( fieldName );
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ dataHash.put( fieldName, value );
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsNormalizacao.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresa.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresa.java
new file mode 100644
index 00000000..f37ffcbc
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresa.java
@@ -0,0 +1,114 @@
+/*
+* HsNormalizacaoEmpresa.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsNormalizacaoEmpresa implements JDOInnerObject
+{
+ private Integer normalizacao_id;
+ private Integer empresa_id;
+
+ public HsNormalizacaoEmpresa()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsNormalizacaoEmpresaDataAuto.NORMALIZACAO_ID )
+ {
+ return normalizacao_id;
+ }
+ else if( fieldName == HsNormalizacaoEmpresaDataAuto.EMPRESA_ID )
+ {
+ return empresa_id;
+ }
+ else if( fieldName.equals( HsNormalizacaoEmpresaDataAuto.NORMALIZACAO_ID ) )
+ {
+ return normalizacao_id;
+ }
+ else if( fieldName.equals( HsNormalizacaoEmpresaDataAuto.EMPRESA_ID ) )
+ {
+ return empresa_id;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsNormalizacaoEmpresaDataAuto.NORMALIZACAO_ID )
+ {
+ normalizacao_id = ( Integer ) value;
+ }
+ else if( fieldName == HsNormalizacaoEmpresaDataAuto.EMPRESA_ID )
+ {
+ empresa_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsNormalizacaoEmpresaDataAuto.NORMALIZACAO_ID ) )
+ {
+ normalizacao_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsNormalizacaoEmpresaDataAuto.EMPRESA_ID ) )
+ {
+ empresa_id = ( Integer ) value;
+ }
+ }
+
+ public Integer getNormalizacao_id()
+ {
+ return normalizacao_id;
+ }
+
+ public void setNormalizacao_id(Integer normalizacao_idValue )
+ {
+ this.normalizacao_id = normalizacao_idValue;
+ }
+
+ public Integer getEmpresa_id()
+ {
+ return empresa_id;
+ }
+
+ public void setEmpresa_id(Integer empresa_idValue )
+ {
+ this.empresa_id = empresa_idValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsNormalizacaoEmpresaDataAuto.class;
+ }
+
+ public HsNormalizacaoEmpresaDataAuto getOuterClassInstance()
+ {
+ HsNormalizacaoEmpresaDataAuto outerObj = new HsNormalizacaoEmpresaDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEmpresaID getJDOPrimaryKey()
+ {
+ com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEmpresaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEmpresaID();
+
+ Object obj;
+ obj = this.getNormalizacao_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.normalizacao_id = (Integer)obj;
+
+ obj = this.getEmpresa_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.empresa_id = (Integer)obj;
+
+ return id;
+
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresaData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresaData.java
new file mode 100644
index 00000000..5ac28c2b
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresaData.java
@@ -0,0 +1,18 @@
+/*
+* HsNormalizacaoEmpresaDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsNormalizacaoEmpresaData extends com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEmpresaDataAuto
+{
+
+ public HsNormalizacaoEmpresaData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresaDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresaDataAuto.java
new file mode 100644
index 00000000..d93ea9ab
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresaDataAuto.java
@@ -0,0 +1,213 @@
+/*
+* HsNormalizacaoEmpresaDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsNormalizacaoEmpresaDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_normalizacao_empresa";
+
+ public static final String NORMALIZACAO_ID = "normalizacao_id";
+ public static final String NORMALIZACAO_ID_FULL = "hs_normalizacao_empresa.normalizacao_id";
+ public static final String TO_NORMALIZACAO_ID = "to normalizacao_id";
+ public static final String EMPRESA_ID = "empresa_id";
+ public static final String EMPRESA_ID_FULL = "hs_normalizacao_empresa.empresa_id";
+ public static final String TO_EMPRESA_ID = "to empresa_id";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ NORMALIZACAO_ID, EMPRESA_ID, };
+
+ private Map dataHash;
+
+ public HsNormalizacaoEmpresaDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getNormalizacao_id()
+ {
+ return (Integer) dataHash.get(NORMALIZACAO_ID);
+ }
+
+ public void setNormalizacao_id(Integer normalizacao_idValue )
+ {
+ dataHash.put(TO_NORMALIZACAO_ID, null);
+ dataHash.put(NORMALIZACAO_ID, normalizacao_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData toNormalizacao_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_NORMALIZACAO_ID) == null && getNormalizacao_id() != null )
+ {
+ dataHash.put(TO_NORMALIZACAO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData.class, new Object[]{ getNormalizacao_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData) dataHash.get(TO_NORMALIZACAO_ID);
+ }
+
+ public void setToNormalizacao_id(com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData normalizacao_idObject )
+ {
+ if( normalizacao_idObject == null )
+ {
+ dataHash.put(NORMALIZACAO_ID, null);
+ }
+ else
+ {
+ dataHash.put(NORMALIZACAO_ID, normalizacao_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData.ID ));
+ }
+ dataHash.put(TO_NORMALIZACAO_ID, normalizacao_idObject);
+ }
+
+ public Integer getEmpresa_id()
+ {
+ return (Integer) dataHash.get(EMPRESA_ID);
+ }
+
+ public void setEmpresa_id(Integer empresa_idValue )
+ {
+ dataHash.put(TO_EMPRESA_ID, null);
+ dataHash.put(EMPRESA_ID, empresa_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.EmpresasData toEmpresa_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_EMPRESA_ID) == null && getEmpresa_id() != null )
+ {
+ dataHash.put(TO_EMPRESA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.class, new Object[]{ getEmpresa_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) dataHash.get(TO_EMPRESA_ID);
+ }
+
+ public void setToEmpresa_id(com.evolute.siprp.server.db.data.siprp_local3.EmpresasData empresa_idObject )
+ {
+ if( empresa_idObject == null )
+ {
+ dataHash.put(EMPRESA_ID, null);
+ }
+ else
+ {
+ dataHash.put(EMPRESA_ID, empresa_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID ));
+ }
+ dataHash.put(TO_EMPRESA_ID, empresa_idObject);
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_EMPRESA_ID.equals( fieldName ) )
+ {
+ value = toEmpresa_id();
+ }
+ else if( EMPRESA_ID.equals( fieldName ) )
+ {
+ value = getEmpresa_id();
+ }
+ else if( NORMALIZACAO_ID.equals( fieldName ) )
+ {
+ value = getNormalizacao_id();
+ }
+ else if( TO_NORMALIZACAO_ID.equals( fieldName ) )
+ {
+ value = toNormalizacao_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_EMPRESA_ID.equals( fieldName ) )
+ {
+ setToEmpresa_id( (com.evolute.siprp.server.db.data.siprp_local3.EmpresasData) value );
+ }
+ else if( EMPRESA_ID.equals( fieldName ) )
+ {
+ setEmpresa_id( (Integer) value );
+ }
+ else if( NORMALIZACAO_ID.equals( fieldName ) )
+ {
+ setNormalizacao_id( (Integer) value );
+ }
+ else if( TO_NORMALIZACAO_ID.equals( fieldName ) )
+ {
+ setToNormalizacao_id( (com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_NORMALIZACAO_ID) != null )
+ {
+ toNormalizacao_id().save();
+ dataHash.put(NORMALIZACAO_ID, toNormalizacao_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData.ID ));
+ }
+
+ if( dataHash.get(TO_EMPRESA_ID) != null )
+ {
+ toEmpresa_id().save();
+ dataHash.put(EMPRESA_ID, toEmpresa_id().get( com.evolute.siprp.server.db.data.siprp_local3.EmpresasData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsNormalizacaoEmpresa.class;
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEmpresaID getJDOPrimaryKey()
+ {
+ com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEmpresaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEmpresaID();
+
+ Object obj;
+ obj = this.getNormalizacao_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.normalizacao_id = (Integer)obj;
+
+ obj = this.getEmpresa_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.empresa_id = (Integer)obj;
+
+ return id;
+
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresaID.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresaID.java
new file mode 100644
index 00000000..1a6529b1
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEmpresaID.java
@@ -0,0 +1,37 @@
+/*
+* HsNormalizacaoEmpresaID.java
+*
+* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import java.io.*;
+
+import com.evolute.utils.jdo.jpox.JDOIDClass;
+
+public final class HsNormalizacaoEmpresaID extends JDOIDClass implements Serializable
+{
+ public Integer normalizacao_id;
+ public Integer empresa_id;
+
+ public HsNormalizacaoEmpresaID()
+ {
+ }
+
+
+ public Object[] getValue()
+ {
+ Object value[] = new Object[ 2 ];
+ value[ 0 ] = normalizacao_id;
+ value[ 1 ] = empresa_id;
+ return value;
+ }
+
+ public void setValues( Object values[] )
+ {
+ normalizacao_id = (Integer) values[ 0 ];
+ empresa_id = (Integer) values[ 1 ];
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimento.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimento.java
new file mode 100644
index 00000000..97fb0089
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimento.java
@@ -0,0 +1,114 @@
+/*
+* HsNormalizacaoEstabelecimento.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsNormalizacaoEstabelecimento implements JDOInnerObject
+{
+ private Integer normalizacao_id;
+ private Integer estabelecimento_id;
+
+ public HsNormalizacaoEstabelecimento()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsNormalizacaoEstabelecimentoDataAuto.NORMALIZACAO_ID )
+ {
+ return normalizacao_id;
+ }
+ else if( fieldName == HsNormalizacaoEstabelecimentoDataAuto.ESTABELECIMENTO_ID )
+ {
+ return estabelecimento_id;
+ }
+ else if( fieldName.equals( HsNormalizacaoEstabelecimentoDataAuto.NORMALIZACAO_ID ) )
+ {
+ return normalizacao_id;
+ }
+ else if( fieldName.equals( HsNormalizacaoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) )
+ {
+ return estabelecimento_id;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsNormalizacaoEstabelecimentoDataAuto.NORMALIZACAO_ID )
+ {
+ normalizacao_id = ( Integer ) value;
+ }
+ else if( fieldName == HsNormalizacaoEstabelecimentoDataAuto.ESTABELECIMENTO_ID )
+ {
+ estabelecimento_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsNormalizacaoEstabelecimentoDataAuto.NORMALIZACAO_ID ) )
+ {
+ normalizacao_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsNormalizacaoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) )
+ {
+ estabelecimento_id = ( Integer ) value;
+ }
+ }
+
+ public Integer getNormalizacao_id()
+ {
+ return normalizacao_id;
+ }
+
+ public void setNormalizacao_id(Integer normalizacao_idValue )
+ {
+ this.normalizacao_id = normalizacao_idValue;
+ }
+
+ public Integer getEstabelecimento_id()
+ {
+ return estabelecimento_id;
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_idValue )
+ {
+ this.estabelecimento_id = estabelecimento_idValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsNormalizacaoEstabelecimentoDataAuto.class;
+ }
+
+ public HsNormalizacaoEstabelecimentoDataAuto getOuterClassInstance()
+ {
+ HsNormalizacaoEstabelecimentoDataAuto outerObj = new HsNormalizacaoEstabelecimentoDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEstabelecimentoID getJDOPrimaryKey()
+ {
+ com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEstabelecimentoID id = new com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEstabelecimentoID();
+
+ Object obj;
+ obj = this.getNormalizacao_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.normalizacao_id = (Integer)obj;
+
+ obj = this.getEstabelecimento_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.estabelecimento_id = (Integer)obj;
+
+ return id;
+
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimentoData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimentoData.java
new file mode 100644
index 00000000..f3343c7a
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimentoData.java
@@ -0,0 +1,18 @@
+/*
+* HsNormalizacaoEstabelecimentoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsNormalizacaoEstabelecimentoData extends com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEstabelecimentoDataAuto
+{
+
+ public HsNormalizacaoEstabelecimentoData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimentoDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimentoDataAuto.java
new file mode 100644
index 00000000..d0074e2d
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimentoDataAuto.java
@@ -0,0 +1,213 @@
+/*
+* HsNormalizacaoEstabelecimentoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsNormalizacaoEstabelecimentoDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_normalizacao_estabelecimento";
+
+ public static final String NORMALIZACAO_ID = "normalizacao_id";
+ public static final String NORMALIZACAO_ID_FULL = "hs_normalizacao_estabelecimento.normalizacao_id";
+ public static final String TO_NORMALIZACAO_ID = "to normalizacao_id";
+ public static final String ESTABELECIMENTO_ID = "estabelecimento_id";
+ public static final String ESTABELECIMENTO_ID_FULL = "hs_normalizacao_estabelecimento.estabelecimento_id";
+ public static final String TO_ESTABELECIMENTO_ID = "to estabelecimento_id";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ NORMALIZACAO_ID, ESTABELECIMENTO_ID, };
+
+ private Map dataHash;
+
+ public HsNormalizacaoEstabelecimentoDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getNormalizacao_id()
+ {
+ return (Integer) dataHash.get(NORMALIZACAO_ID);
+ }
+
+ public void setNormalizacao_id(Integer normalizacao_idValue )
+ {
+ dataHash.put(TO_NORMALIZACAO_ID, null);
+ dataHash.put(NORMALIZACAO_ID, normalizacao_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData toNormalizacao_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_NORMALIZACAO_ID) == null && getNormalizacao_id() != null )
+ {
+ dataHash.put(TO_NORMALIZACAO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData.class, new Object[]{ getNormalizacao_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData) dataHash.get(TO_NORMALIZACAO_ID);
+ }
+
+ public void setToNormalizacao_id(com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData normalizacao_idObject )
+ {
+ if( normalizacao_idObject == null )
+ {
+ dataHash.put(NORMALIZACAO_ID, null);
+ }
+ else
+ {
+ dataHash.put(NORMALIZACAO_ID, normalizacao_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData.ID ));
+ }
+ dataHash.put(TO_NORMALIZACAO_ID, normalizacao_idObject);
+ }
+
+ public Integer getEstabelecimento_id()
+ {
+ return (Integer) dataHash.get(ESTABELECIMENTO_ID);
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_idValue )
+ {
+ dataHash.put(TO_ESTABELECIMENTO_ID, null);
+ dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData toEstabelecimento_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_ESTABELECIMENTO_ID) == null && getEstabelecimento_id() != null )
+ {
+ dataHash.put(TO_ESTABELECIMENTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.class, new Object[]{ getEstabelecimento_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) dataHash.get(TO_ESTABELECIMENTO_ID);
+ }
+
+ public void setToEstabelecimento_id(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData estabelecimento_idObject )
+ {
+ if( estabelecimento_idObject == null )
+ {
+ dataHash.put(ESTABELECIMENTO_ID, null);
+ }
+ else
+ {
+ dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID ));
+ }
+ dataHash.put(TO_ESTABELECIMENTO_ID, estabelecimento_idObject);
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ value = getEstabelecimento_id();
+ }
+ else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ value = toEstabelecimento_id();
+ }
+ else if( NORMALIZACAO_ID.equals( fieldName ) )
+ {
+ value = getNormalizacao_id();
+ }
+ else if( TO_NORMALIZACAO_ID.equals( fieldName ) )
+ {
+ value = toNormalizacao_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ setEstabelecimento_id( (Integer) value );
+ }
+ else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ setToEstabelecimento_id( (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) value );
+ }
+ else if( NORMALIZACAO_ID.equals( fieldName ) )
+ {
+ setNormalizacao_id( (Integer) value );
+ }
+ else if( TO_NORMALIZACAO_ID.equals( fieldName ) )
+ {
+ setToNormalizacao_id( (com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_NORMALIZACAO_ID) != null )
+ {
+ toNormalizacao_id().save();
+ dataHash.put(NORMALIZACAO_ID, toNormalizacao_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoData.ID ));
+ }
+
+ if( dataHash.get(TO_ESTABELECIMENTO_ID) != null )
+ {
+ toEstabelecimento_id().save();
+ dataHash.put(ESTABELECIMENTO_ID, toEstabelecimento_id().get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsNormalizacaoEstabelecimento.class;
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEstabelecimentoID getJDOPrimaryKey()
+ {
+ com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEstabelecimentoID id = new com.evolute.siprp.server.db.data.siprp_local3.HsNormalizacaoEstabelecimentoID();
+
+ Object obj;
+ obj = this.getNormalizacao_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.normalizacao_id = (Integer)obj;
+
+ obj = this.getEstabelecimento_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.estabelecimento_id = (Integer)obj;
+
+ return id;
+
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimentoID.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimentoID.java
new file mode 100644
index 00000000..76fbd4ae
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsNormalizacaoEstabelecimentoID.java
@@ -0,0 +1,37 @@
+/*
+* HsNormalizacaoEstabelecimentoID.java
+*
+* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import java.io.*;
+
+import com.evolute.utils.jdo.jpox.JDOIDClass;
+
+public final class HsNormalizacaoEstabelecimentoID extends JDOIDClass implements Serializable
+{
+ public Integer normalizacao_id;
+ public Integer estabelecimento_id;
+
+ public HsNormalizacaoEstabelecimentoID()
+ {
+ }
+
+
+ public Object[] getValue()
+ {
+ Object value[] = new Object[ 2 ];
+ value[ 0 ] = normalizacao_id;
+ value[ 1 ] = estabelecimento_id;
+ return value;
+ }
+
+ public void setValues( Object values[] )
+ {
+ normalizacao_id = (Integer) values[ 0 ];
+ estabelecimento_id = (Integer) values[ 1 ];
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPosto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPosto.java
new file mode 100644
index 00000000..8a45fd18
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPosto.java
@@ -0,0 +1,183 @@
+/*
+* HsPosto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsPosto implements JDOInnerObject
+{
+ private Integer id;
+ private Integer area_id;
+ private String description;
+ private java.sql.Timestamp deleted_date;
+ private Boolean is_principal;
+
+ public HsPosto()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsPostoDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == HsPostoDataAuto.AREA_ID )
+ {
+ return area_id;
+ }
+ else if( fieldName == HsPostoDataAuto.DESCRIPTION )
+ {
+ return description;
+ }
+ else if( fieldName == HsPostoDataAuto.DELETED_DATE )
+ {
+ return deleted_date;
+ }
+ else if( fieldName == HsPostoDataAuto.IS_PRINCIPAL )
+ {
+ return is_principal;
+ }
+ else if( fieldName.equals( HsPostoDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( HsPostoDataAuto.AREA_ID ) )
+ {
+ return area_id;
+ }
+ else if( fieldName.equals( HsPostoDataAuto.DESCRIPTION ) )
+ {
+ return description;
+ }
+ else if( fieldName.equals( HsPostoDataAuto.DELETED_DATE ) )
+ {
+ return deleted_date;
+ }
+ else if( fieldName.equals( HsPostoDataAuto.IS_PRINCIPAL ) )
+ {
+ return is_principal;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsPostoDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == HsPostoDataAuto.AREA_ID )
+ {
+ area_id = ( Integer ) value;
+ }
+ else if( fieldName == HsPostoDataAuto.DESCRIPTION )
+ {
+ description = ( String ) value;
+ }
+ else if( fieldName == HsPostoDataAuto.DELETED_DATE )
+ {
+ deleted_date = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName == HsPostoDataAuto.IS_PRINCIPAL )
+ {
+ is_principal = ( Boolean ) value;
+ }
+ else if( fieldName.equals( HsPostoDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsPostoDataAuto.AREA_ID ) )
+ {
+ area_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsPostoDataAuto.DESCRIPTION ) )
+ {
+ description = ( String ) value;
+ }
+ else if( fieldName.equals( HsPostoDataAuto.DELETED_DATE ) )
+ {
+ deleted_date = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName.equals( HsPostoDataAuto.IS_PRINCIPAL ) )
+ {
+ is_principal = ( Boolean ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public Integer getArea_id()
+ {
+ return area_id;
+ }
+
+ public void setArea_id(Integer area_idValue )
+ {
+ this.area_id = area_idValue;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String descriptionValue )
+ {
+ this.description = descriptionValue;
+ }
+
+ public java.sql.Timestamp getDeleted_date()
+ {
+ return deleted_date;
+ }
+
+ public void setDeleted_date(java.sql.Timestamp deleted_dateValue )
+ {
+ this.deleted_date = deleted_dateValue;
+ }
+
+ public Boolean getIs_principal()
+ {
+ return is_principal;
+ }
+
+ public void setIs_principal(Boolean is_principalValue )
+ {
+ this.is_principal = is_principalValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsPostoDataAuto.class;
+ }
+
+ public HsPostoDataAuto getOuterClassInstance()
+ {
+ HsPostoDataAuto outerObj = new HsPostoDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoData.java
new file mode 100644
index 00000000..3097ac5a
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoData.java
@@ -0,0 +1,18 @@
+/*
+* HsPostoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsPostoData extends com.evolute.siprp.server.db.data.siprp_local3.HsPostoDataAuto
+{
+
+ public HsPostoData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoDataAuto.java
new file mode 100644
index 00000000..5842bb3d
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoDataAuto.java
@@ -0,0 +1,190 @@
+/*
+* HsPostoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsPostoDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_posto";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "hs_posto.id";
+ public static final String AREA_ID = "area_id";
+ public static final String AREA_ID_FULL = "hs_posto.area_id";
+ public static final String TO_AREA_ID = "to area_id";
+ public static final String DESCRIPTION = "description";
+ public static final String DESCRIPTION_FULL = "hs_posto.description";
+ public static final String DELETED_DATE = "deleted_date";
+ public static final String DELETED_DATE_FULL = "hs_posto.deleted_date";
+ public static final String IS_PRINCIPAL = "is_principal";
+ public static final String IS_PRINCIPAL_FULL = "hs_posto.is_principal";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ AREA_ID, TO_AREA_ID, DESCRIPTION, DELETED_DATE, IS_PRINCIPAL, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, AREA_ID, DESCRIPTION, DELETED_DATE, IS_PRINCIPAL, };
+
+ private Map dataHash;
+
+ public HsPostoDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public Integer getArea_id()
+ {
+ return (Integer) dataHash.get(AREA_ID);
+ }
+
+ public void setArea_id(Integer area_idValue )
+ {
+ dataHash.put(TO_AREA_ID, null);
+ dataHash.put(AREA_ID, area_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsAreaData toArea_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_AREA_ID) == null && getArea_id() != null )
+ {
+ dataHash.put(TO_AREA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsAreaData.class, new Object[]{ getArea_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsAreaData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.HsAreaData) dataHash.get(TO_AREA_ID);
+ }
+
+ public void setToArea_id(com.evolute.siprp.server.db.data.siprp_local3.HsAreaData area_idObject )
+ {
+ if( area_idObject == null )
+ {
+ dataHash.put(AREA_ID, null);
+ }
+ else
+ {
+ dataHash.put(AREA_ID, area_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsAreaData.ID ));
+ }
+ dataHash.put(TO_AREA_ID, area_idObject);
+ }
+
+ public String getDescription()
+ {
+ return (String) get(DESCRIPTION);
+ }
+
+ public void setDescription(String descriptionValue )
+ {
+ this.set(DESCRIPTION, descriptionValue );
+ }
+
+ public java.sql.Timestamp getDeleted_date()
+ {
+ return (java.sql.Timestamp) get(DELETED_DATE);
+ }
+
+ public void setDeleted_date(java.sql.Timestamp deleted_dateValue )
+ {
+ this.set(DELETED_DATE, deleted_dateValue );
+ }
+
+ public Boolean getIs_principal()
+ {
+ return (Boolean) get(IS_PRINCIPAL);
+ }
+
+ public void setIs_principal(Boolean is_principalValue )
+ {
+ this.set(IS_PRINCIPAL, is_principalValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_AREA_ID.equals( fieldName ) )
+ {
+ value = toArea_id();
+ }
+ else if( AREA_ID.equals( fieldName ) )
+ {
+ value = getArea_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_AREA_ID.equals( fieldName ) )
+ {
+ setToArea_id( (com.evolute.siprp.server.db.data.siprp_local3.HsAreaData) value );
+ }
+ else if( AREA_ID.equals( fieldName ) )
+ {
+ setArea_id( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_AREA_ID) != null )
+ {
+ toArea_id().save();
+ dataHash.put(AREA_ID, toArea_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsAreaData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsPosto.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimento.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimento.java
new file mode 100644
index 00000000..ae1afd80
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimento.java
@@ -0,0 +1,114 @@
+/*
+* HsPostoEstabelecimento.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsPostoEstabelecimento implements JDOInnerObject
+{
+ private Integer posto_id;
+ private Integer estabelecimento_id;
+
+ public HsPostoEstabelecimento()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsPostoEstabelecimentoDataAuto.POSTO_ID )
+ {
+ return posto_id;
+ }
+ else if( fieldName == HsPostoEstabelecimentoDataAuto.ESTABELECIMENTO_ID )
+ {
+ return estabelecimento_id;
+ }
+ else if( fieldName.equals( HsPostoEstabelecimentoDataAuto.POSTO_ID ) )
+ {
+ return posto_id;
+ }
+ else if( fieldName.equals( HsPostoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) )
+ {
+ return estabelecimento_id;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsPostoEstabelecimentoDataAuto.POSTO_ID )
+ {
+ posto_id = ( Integer ) value;
+ }
+ else if( fieldName == HsPostoEstabelecimentoDataAuto.ESTABELECIMENTO_ID )
+ {
+ estabelecimento_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsPostoEstabelecimentoDataAuto.POSTO_ID ) )
+ {
+ posto_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsPostoEstabelecimentoDataAuto.ESTABELECIMENTO_ID ) )
+ {
+ estabelecimento_id = ( Integer ) value;
+ }
+ }
+
+ public Integer getPosto_id()
+ {
+ return posto_id;
+ }
+
+ public void setPosto_id(Integer posto_idValue )
+ {
+ this.posto_id = posto_idValue;
+ }
+
+ public Integer getEstabelecimento_id()
+ {
+ return estabelecimento_id;
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_idValue )
+ {
+ this.estabelecimento_id = estabelecimento_idValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsPostoEstabelecimentoDataAuto.class;
+ }
+
+ public HsPostoEstabelecimentoDataAuto getOuterClassInstance()
+ {
+ HsPostoEstabelecimentoDataAuto outerObj = new HsPostoEstabelecimentoDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsPostoEstabelecimentoID getJDOPrimaryKey()
+ {
+ com.evolute.siprp.server.db.data.siprp_local3.HsPostoEstabelecimentoID id = new com.evolute.siprp.server.db.data.siprp_local3.HsPostoEstabelecimentoID();
+
+ Object obj;
+ obj = this.getPosto_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.posto_id = (Integer)obj;
+
+ obj = this.getEstabelecimento_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.estabelecimento_id = (Integer)obj;
+
+ return id;
+
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimentoData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimentoData.java
new file mode 100644
index 00000000..988cf403
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimentoData.java
@@ -0,0 +1,18 @@
+/*
+* HsPostoEstabelecimentoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsPostoEstabelecimentoData extends com.evolute.siprp.server.db.data.siprp_local3.HsPostoEstabelecimentoDataAuto
+{
+
+ public HsPostoEstabelecimentoData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimentoDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimentoDataAuto.java
new file mode 100644
index 00000000..caa1037d
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimentoDataAuto.java
@@ -0,0 +1,213 @@
+/*
+* HsPostoEstabelecimentoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsPostoEstabelecimentoDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_posto_estabelecimento";
+
+ public static final String POSTO_ID = "posto_id";
+ public static final String POSTO_ID_FULL = "hs_posto_estabelecimento.posto_id";
+ public static final String TO_POSTO_ID = "to posto_id";
+ public static final String ESTABELECIMENTO_ID = "estabelecimento_id";
+ public static final String ESTABELECIMENTO_ID_FULL = "hs_posto_estabelecimento.estabelecimento_id";
+ public static final String TO_ESTABELECIMENTO_ID = "to estabelecimento_id";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ POSTO_ID, ESTABELECIMENTO_ID, };
+
+ private Map dataHash;
+
+ public HsPostoEstabelecimentoDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getPosto_id()
+ {
+ return (Integer) dataHash.get(POSTO_ID);
+ }
+
+ public void setPosto_id(Integer posto_idValue )
+ {
+ dataHash.put(TO_POSTO_ID, null);
+ dataHash.put(POSTO_ID, posto_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsPostoData toPosto_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_POSTO_ID) == null && getPosto_id() != null )
+ {
+ dataHash.put(TO_POSTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.class, new Object[]{ getPosto_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.HsPostoData) dataHash.get(TO_POSTO_ID);
+ }
+
+ public void setToPosto_id(com.evolute.siprp.server.db.data.siprp_local3.HsPostoData posto_idObject )
+ {
+ if( posto_idObject == null )
+ {
+ dataHash.put(POSTO_ID, null);
+ }
+ else
+ {
+ dataHash.put(POSTO_ID, posto_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.ID ));
+ }
+ dataHash.put(TO_POSTO_ID, posto_idObject);
+ }
+
+ public Integer getEstabelecimento_id()
+ {
+ return (Integer) dataHash.get(ESTABELECIMENTO_ID);
+ }
+
+ public void setEstabelecimento_id(Integer estabelecimento_idValue )
+ {
+ dataHash.put(TO_ESTABELECIMENTO_ID, null);
+ dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData toEstabelecimento_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_ESTABELECIMENTO_ID) == null && getEstabelecimento_id() != null )
+ {
+ dataHash.put(TO_ESTABELECIMENTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.class, new Object[]{ getEstabelecimento_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) dataHash.get(TO_ESTABELECIMENTO_ID);
+ }
+
+ public void setToEstabelecimento_id(com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData estabelecimento_idObject )
+ {
+ if( estabelecimento_idObject == null )
+ {
+ dataHash.put(ESTABELECIMENTO_ID, null);
+ }
+ else
+ {
+ dataHash.put(ESTABELECIMENTO_ID, estabelecimento_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID ));
+ }
+ dataHash.put(TO_ESTABELECIMENTO_ID, estabelecimento_idObject);
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_POSTO_ID.equals( fieldName ) )
+ {
+ value = toPosto_id();
+ }
+ else if( POSTO_ID.equals( fieldName ) )
+ {
+ value = getPosto_id();
+ }
+ else if( ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ value = getEstabelecimento_id();
+ }
+ else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ value = toEstabelecimento_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_POSTO_ID.equals( fieldName ) )
+ {
+ setToPosto_id( (com.evolute.siprp.server.db.data.siprp_local3.HsPostoData) value );
+ }
+ else if( POSTO_ID.equals( fieldName ) )
+ {
+ setPosto_id( (Integer) value );
+ }
+ else if( ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ setEstabelecimento_id( (Integer) value );
+ }
+ else if( TO_ESTABELECIMENTO_ID.equals( fieldName ) )
+ {
+ setToEstabelecimento_id( (com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_POSTO_ID) != null )
+ {
+ toPosto_id().save();
+ dataHash.put(POSTO_ID, toPosto_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.ID ));
+ }
+
+ if( dataHash.get(TO_ESTABELECIMENTO_ID) != null )
+ {
+ toEstabelecimento_id().save();
+ dataHash.put(ESTABELECIMENTO_ID, toEstabelecimento_id().get( com.evolute.siprp.server.db.data.siprp_local3.EstabelecimentosData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsPostoEstabelecimento.class;
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsPostoEstabelecimentoID getJDOPrimaryKey()
+ {
+ com.evolute.siprp.server.db.data.siprp_local3.HsPostoEstabelecimentoID id = new com.evolute.siprp.server.db.data.siprp_local3.HsPostoEstabelecimentoID();
+
+ Object obj;
+ obj = this.getPosto_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.posto_id = (Integer)obj;
+
+ obj = this.getEstabelecimento_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.estabelecimento_id = (Integer)obj;
+
+ return id;
+
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimentoID.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimentoID.java
new file mode 100644
index 00000000..444f59d1
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoEstabelecimentoID.java
@@ -0,0 +1,37 @@
+/*
+* HsPostoEstabelecimentoID.java
+*
+* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import java.io.*;
+
+import com.evolute.utils.jdo.jpox.JDOIDClass;
+
+public final class HsPostoEstabelecimentoID extends JDOIDClass implements Serializable
+{
+ public Integer posto_id;
+ public Integer estabelecimento_id;
+
+ public HsPostoEstabelecimentoID()
+ {
+ }
+
+
+ public Object[] getValue()
+ {
+ Object value[] = new Object[ 2 ];
+ value[ 0 ] = posto_id;
+ value[ 1 ] = estabelecimento_id;
+ return value;
+ }
+
+ public void setValues( Object values[] )
+ {
+ posto_id = (Integer) values[ 0 ];
+ estabelecimento_id = (Integer) values[ 1 ];
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedida.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedida.java
new file mode 100644
index 00000000..b1340cca
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedida.java
@@ -0,0 +1,114 @@
+/*
+* HsPostoMedida.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsPostoMedida implements JDOInnerObject
+{
+ private Integer posto_id;
+ private Integer medida_id;
+
+ public HsPostoMedida()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsPostoMedidaDataAuto.POSTO_ID )
+ {
+ return posto_id;
+ }
+ else if( fieldName == HsPostoMedidaDataAuto.MEDIDA_ID )
+ {
+ return medida_id;
+ }
+ else if( fieldName.equals( HsPostoMedidaDataAuto.POSTO_ID ) )
+ {
+ return posto_id;
+ }
+ else if( fieldName.equals( HsPostoMedidaDataAuto.MEDIDA_ID ) )
+ {
+ return medida_id;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsPostoMedidaDataAuto.POSTO_ID )
+ {
+ posto_id = ( Integer ) value;
+ }
+ else if( fieldName == HsPostoMedidaDataAuto.MEDIDA_ID )
+ {
+ medida_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsPostoMedidaDataAuto.POSTO_ID ) )
+ {
+ posto_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsPostoMedidaDataAuto.MEDIDA_ID ) )
+ {
+ medida_id = ( Integer ) value;
+ }
+ }
+
+ public Integer getPosto_id()
+ {
+ return posto_id;
+ }
+
+ public void setPosto_id(Integer posto_idValue )
+ {
+ this.posto_id = posto_idValue;
+ }
+
+ public Integer getMedida_id()
+ {
+ return medida_id;
+ }
+
+ public void setMedida_id(Integer medida_idValue )
+ {
+ this.medida_id = medida_idValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsPostoMedidaDataAuto.class;
+ }
+
+ public HsPostoMedidaDataAuto getOuterClassInstance()
+ {
+ HsPostoMedidaDataAuto outerObj = new HsPostoMedidaDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsPostoMedidaID getJDOPrimaryKey()
+ {
+ com.evolute.siprp.server.db.data.siprp_local3.HsPostoMedidaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsPostoMedidaID();
+
+ Object obj;
+ obj = this.getPosto_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.posto_id = (Integer)obj;
+
+ obj = this.getMedida_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.medida_id = (Integer)obj;
+
+ return id;
+
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedidaData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedidaData.java
new file mode 100644
index 00000000..508f7f12
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedidaData.java
@@ -0,0 +1,18 @@
+/*
+* HsPostoMedidaDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsPostoMedidaData extends com.evolute.siprp.server.db.data.siprp_local3.HsPostoMedidaDataAuto
+{
+
+ public HsPostoMedidaData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedidaDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedidaDataAuto.java
new file mode 100644
index 00000000..daeb7a9a
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedidaDataAuto.java
@@ -0,0 +1,213 @@
+/*
+* HsPostoMedidaDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsPostoMedidaDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_posto_medida";
+
+ public static final String POSTO_ID = "posto_id";
+ public static final String POSTO_ID_FULL = "hs_posto_medida.posto_id";
+ public static final String TO_POSTO_ID = "to posto_id";
+ public static final String MEDIDA_ID = "medida_id";
+ public static final String MEDIDA_ID_FULL = "hs_posto_medida.medida_id";
+ public static final String TO_MEDIDA_ID = "to medida_id";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ POSTO_ID, MEDIDA_ID, };
+
+ private Map dataHash;
+
+ public HsPostoMedidaDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getPosto_id()
+ {
+ return (Integer) dataHash.get(POSTO_ID);
+ }
+
+ public void setPosto_id(Integer posto_idValue )
+ {
+ dataHash.put(TO_POSTO_ID, null);
+ dataHash.put(POSTO_ID, posto_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsPostoData toPosto_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_POSTO_ID) == null && getPosto_id() != null )
+ {
+ dataHash.put(TO_POSTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.class, new Object[]{ getPosto_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.HsPostoData) dataHash.get(TO_POSTO_ID);
+ }
+
+ public void setToPosto_id(com.evolute.siprp.server.db.data.siprp_local3.HsPostoData posto_idObject )
+ {
+ if( posto_idObject == null )
+ {
+ dataHash.put(POSTO_ID, null);
+ }
+ else
+ {
+ dataHash.put(POSTO_ID, posto_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.ID ));
+ }
+ dataHash.put(TO_POSTO_ID, posto_idObject);
+ }
+
+ public Integer getMedida_id()
+ {
+ return (Integer) dataHash.get(MEDIDA_ID);
+ }
+
+ public void setMedida_id(Integer medida_idValue )
+ {
+ dataHash.put(TO_MEDIDA_ID, null);
+ dataHash.put(MEDIDA_ID, medida_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData toMedida_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_MEDIDA_ID) == null && getMedida_id() != null )
+ {
+ dataHash.put(TO_MEDIDA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData.class, new Object[]{ getMedida_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData) dataHash.get(TO_MEDIDA_ID);
+ }
+
+ public void setToMedida_id(com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData medida_idObject )
+ {
+ if( medida_idObject == null )
+ {
+ dataHash.put(MEDIDA_ID, null);
+ }
+ else
+ {
+ dataHash.put(MEDIDA_ID, medida_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData.ID ));
+ }
+ dataHash.put(TO_MEDIDA_ID, medida_idObject);
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_POSTO_ID.equals( fieldName ) )
+ {
+ value = toPosto_id();
+ }
+ else if( POSTO_ID.equals( fieldName ) )
+ {
+ value = getPosto_id();
+ }
+ else if( MEDIDA_ID.equals( fieldName ) )
+ {
+ value = getMedida_id();
+ }
+ else if( TO_MEDIDA_ID.equals( fieldName ) )
+ {
+ value = toMedida_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_POSTO_ID.equals( fieldName ) )
+ {
+ setToPosto_id( (com.evolute.siprp.server.db.data.siprp_local3.HsPostoData) value );
+ }
+ else if( POSTO_ID.equals( fieldName ) )
+ {
+ setPosto_id( (Integer) value );
+ }
+ else if( MEDIDA_ID.equals( fieldName ) )
+ {
+ setMedida_id( (Integer) value );
+ }
+ else if( TO_MEDIDA_ID.equals( fieldName ) )
+ {
+ setToMedida_id( (com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_POSTO_ID) != null )
+ {
+ toPosto_id().save();
+ dataHash.put(POSTO_ID, toPosto_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.ID ));
+ }
+
+ if( dataHash.get(TO_MEDIDA_ID) != null )
+ {
+ toMedida_id().save();
+ dataHash.put(MEDIDA_ID, toMedida_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsMedidaData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsPostoMedida.class;
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsPostoMedidaID getJDOPrimaryKey()
+ {
+ com.evolute.siprp.server.db.data.siprp_local3.HsPostoMedidaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsPostoMedidaID();
+
+ Object obj;
+ obj = this.getPosto_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.posto_id = (Integer)obj;
+
+ obj = this.getMedida_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.medida_id = (Integer)obj;
+
+ return id;
+
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedidaID.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedidaID.java
new file mode 100644
index 00000000..788d3ad8
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoMedidaID.java
@@ -0,0 +1,37 @@
+/*
+* HsPostoMedidaID.java
+*
+* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import java.io.*;
+
+import com.evolute.utils.jdo.jpox.JDOIDClass;
+
+public final class HsPostoMedidaID extends JDOIDClass implements Serializable
+{
+ public Integer posto_id;
+ public Integer medida_id;
+
+ public HsPostoMedidaID()
+ {
+ }
+
+
+ public Object[] getValue()
+ {
+ Object value[] = new Object[ 2 ];
+ value[ 0 ] = posto_id;
+ value[ 1 ] = medida_id;
+ return value;
+ }
+
+ public void setValues( Object values[] )
+ {
+ posto_id = (Integer) values[ 0 ];
+ medida_id = (Integer) values[ 1 ];
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRisco.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRisco.java
new file mode 100644
index 00000000..3f0ebc14
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRisco.java
@@ -0,0 +1,249 @@
+/*
+* HsPostoRisco.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsPostoRisco implements JDOInnerObject
+{
+ private Integer posto_id;
+ private Integer risco_id;
+ private Integer probabilidade;
+ private Integer severidade;
+ private Integer valor_qualitativo;
+ private String is_plano_actuacao;
+ private Integer ordem;
+
+ public HsPostoRisco()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsPostoRiscoDataAuto.POSTO_ID )
+ {
+ return posto_id;
+ }
+ else if( fieldName == HsPostoRiscoDataAuto.RISCO_ID )
+ {
+ return risco_id;
+ }
+ else if( fieldName == HsPostoRiscoDataAuto.PROBABILIDADE )
+ {
+ return probabilidade;
+ }
+ else if( fieldName == HsPostoRiscoDataAuto.SEVERIDADE )
+ {
+ return severidade;
+ }
+ else if( fieldName == HsPostoRiscoDataAuto.VALOR_QUALITATIVO )
+ {
+ return valor_qualitativo;
+ }
+ else if( fieldName == HsPostoRiscoDataAuto.IS_PLANO_ACTUACAO )
+ {
+ return is_plano_actuacao;
+ }
+ else if( fieldName == HsPostoRiscoDataAuto.ORDEM )
+ {
+ return ordem;
+ }
+ else if( fieldName.equals( HsPostoRiscoDataAuto.POSTO_ID ) )
+ {
+ return posto_id;
+ }
+ else if( fieldName.equals( HsPostoRiscoDataAuto.RISCO_ID ) )
+ {
+ return risco_id;
+ }
+ else if( fieldName.equals( HsPostoRiscoDataAuto.PROBABILIDADE ) )
+ {
+ return probabilidade;
+ }
+ else if( fieldName.equals( HsPostoRiscoDataAuto.SEVERIDADE ) )
+ {
+ return severidade;
+ }
+ else if( fieldName.equals( HsPostoRiscoDataAuto.VALOR_QUALITATIVO ) )
+ {
+ return valor_qualitativo;
+ }
+ else if( fieldName.equals( HsPostoRiscoDataAuto.IS_PLANO_ACTUACAO ) )
+ {
+ return is_plano_actuacao;
+ }
+ else if( fieldName.equals( HsPostoRiscoDataAuto.ORDEM ) )
+ {
+ return ordem;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsPostoRiscoDataAuto.POSTO_ID )
+ {
+ posto_id = ( Integer ) value;
+ }
+ else if( fieldName == HsPostoRiscoDataAuto.RISCO_ID )
+ {
+ risco_id = ( Integer ) value;
+ }
+ else if( fieldName == HsPostoRiscoDataAuto.PROBABILIDADE )
+ {
+ probabilidade = ( Integer ) value;
+ }
+ else if( fieldName == HsPostoRiscoDataAuto.SEVERIDADE )
+ {
+ severidade = ( Integer ) value;
+ }
+ else if( fieldName == HsPostoRiscoDataAuto.VALOR_QUALITATIVO )
+ {
+ valor_qualitativo = ( Integer ) value;
+ }
+ else if( fieldName == HsPostoRiscoDataAuto.IS_PLANO_ACTUACAO )
+ {
+ is_plano_actuacao = ( String ) value;
+ }
+ else if( fieldName == HsPostoRiscoDataAuto.ORDEM )
+ {
+ ordem = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsPostoRiscoDataAuto.POSTO_ID ) )
+ {
+ posto_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsPostoRiscoDataAuto.RISCO_ID ) )
+ {
+ risco_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsPostoRiscoDataAuto.PROBABILIDADE ) )
+ {
+ probabilidade = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsPostoRiscoDataAuto.SEVERIDADE ) )
+ {
+ severidade = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsPostoRiscoDataAuto.VALOR_QUALITATIVO ) )
+ {
+ valor_qualitativo = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsPostoRiscoDataAuto.IS_PLANO_ACTUACAO ) )
+ {
+ is_plano_actuacao = ( String ) value;
+ }
+ else if( fieldName.equals( HsPostoRiscoDataAuto.ORDEM ) )
+ {
+ ordem = ( Integer ) value;
+ }
+ }
+
+ public Integer getPosto_id()
+ {
+ return posto_id;
+ }
+
+ public void setPosto_id(Integer posto_idValue )
+ {
+ this.posto_id = posto_idValue;
+ }
+
+ public Integer getRisco_id()
+ {
+ return risco_id;
+ }
+
+ public void setRisco_id(Integer risco_idValue )
+ {
+ this.risco_id = risco_idValue;
+ }
+
+ public Integer getProbabilidade()
+ {
+ return probabilidade;
+ }
+
+ public void setProbabilidade(Integer probabilidadeValue )
+ {
+ this.probabilidade = probabilidadeValue;
+ }
+
+ public Integer getSeveridade()
+ {
+ return severidade;
+ }
+
+ public void setSeveridade(Integer severidadeValue )
+ {
+ this.severidade = severidadeValue;
+ }
+
+ public Integer getValor_qualitativo()
+ {
+ return valor_qualitativo;
+ }
+
+ public void setValor_qualitativo(Integer valor_qualitativoValue )
+ {
+ this.valor_qualitativo = valor_qualitativoValue;
+ }
+
+ public String getIs_plano_actuacao()
+ {
+ return is_plano_actuacao;
+ }
+
+ public void setIs_plano_actuacao(String is_plano_actuacaoValue )
+ {
+ this.is_plano_actuacao = is_plano_actuacaoValue;
+ }
+
+ public Integer getOrdem()
+ {
+ return ordem;
+ }
+
+ public void setOrdem(Integer ordemValue )
+ {
+ this.ordem = ordemValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsPostoRiscoDataAuto.class;
+ }
+
+ public HsPostoRiscoDataAuto getOuterClassInstance()
+ {
+ HsPostoRiscoDataAuto outerObj = new HsPostoRiscoDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsPostoRiscoID getJDOPrimaryKey()
+ {
+ com.evolute.siprp.server.db.data.siprp_local3.HsPostoRiscoID id = new com.evolute.siprp.server.db.data.siprp_local3.HsPostoRiscoID();
+
+ Object obj;
+ obj = this.getPosto_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.posto_id = (Integer)obj;
+
+ obj = this.getRisco_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.risco_id = (Integer)obj;
+
+ return id;
+
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRiscoData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRiscoData.java
new file mode 100644
index 00000000..46e1e2a4
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRiscoData.java
@@ -0,0 +1,18 @@
+/*
+* HsPostoRiscoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsPostoRiscoData extends com.evolute.siprp.server.db.data.siprp_local3.HsPostoRiscoDataAuto
+{
+
+ public HsPostoRiscoData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRiscoDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRiscoDataAuto.java
new file mode 100644
index 00000000..6a729287
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRiscoDataAuto.java
@@ -0,0 +1,322 @@
+/*
+* HsPostoRiscoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsPostoRiscoDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_posto_risco";
+
+ public static final String POSTO_ID = "posto_id";
+ public static final String POSTO_ID_FULL = "hs_posto_risco.posto_id";
+ public static final String TO_POSTO_ID = "to posto_id";
+ public static final String RISCO_ID = "risco_id";
+ public static final String RISCO_ID_FULL = "hs_posto_risco.risco_id";
+ public static final String TO_RISCO_ID = "to risco_id";
+ public static final String PROBABILIDADE = "probabilidade";
+ public static final String PROBABILIDADE_FULL = "hs_posto_risco.probabilidade";
+ public static final String SEVERIDADE = "severidade";
+ public static final String SEVERIDADE_FULL = "hs_posto_risco.severidade";
+ public static final String VALOR_QUALITATIVO = "valor_qualitativo";
+ public static final String VALOR_QUALITATIVO_FULL = "hs_posto_risco.valor_qualitativo";
+ public static final String TO_VALOR_QUALITATIVO = "to valor_qualitativo";
+ public static final String IS_PLANO_ACTUACAO = "is_plano_actuacao";
+ public static final String IS_PLANO_ACTUACAO_FULL = "hs_posto_risco.is_plano_actuacao";
+ public static final String ORDEM = "ordem";
+ public static final String ORDEM_FULL = "hs_posto_risco.ordem";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ PROBABILIDADE, SEVERIDADE, VALOR_QUALITATIVO, TO_VALOR_QUALITATIVO,
+ IS_PLANO_ACTUACAO, ORDEM, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ POSTO_ID, RISCO_ID, PROBABILIDADE, SEVERIDADE, VALOR_QUALITATIVO,
+ IS_PLANO_ACTUACAO, ORDEM, };
+
+ private Map dataHash;
+
+ public HsPostoRiscoDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getPosto_id()
+ {
+ return (Integer) dataHash.get(POSTO_ID);
+ }
+
+ public void setPosto_id(Integer posto_idValue )
+ {
+ dataHash.put(TO_POSTO_ID, null);
+ dataHash.put(POSTO_ID, posto_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsPostoData toPosto_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_POSTO_ID) == null && getPosto_id() != null )
+ {
+ dataHash.put(TO_POSTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.class, new Object[]{ getPosto_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.HsPostoData) dataHash.get(TO_POSTO_ID);
+ }
+
+ public void setToPosto_id(com.evolute.siprp.server.db.data.siprp_local3.HsPostoData posto_idObject )
+ {
+ if( posto_idObject == null )
+ {
+ dataHash.put(POSTO_ID, null);
+ }
+ else
+ {
+ dataHash.put(POSTO_ID, posto_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.ID ));
+ }
+ dataHash.put(TO_POSTO_ID, posto_idObject);
+ }
+
+ public Integer getRisco_id()
+ {
+ return (Integer) dataHash.get(RISCO_ID);
+ }
+
+ public void setRisco_id(Integer risco_idValue )
+ {
+ dataHash.put(TO_RISCO_ID, null);
+ dataHash.put(RISCO_ID, risco_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData toRisco_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_RISCO_ID) == null && getRisco_id() != null )
+ {
+ dataHash.put(TO_RISCO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData.class, new Object[]{ getRisco_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData) dataHash.get(TO_RISCO_ID);
+ }
+
+ public void setToRisco_id(com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData risco_idObject )
+ {
+ if( risco_idObject == null )
+ {
+ dataHash.put(RISCO_ID, null);
+ }
+ else
+ {
+ dataHash.put(RISCO_ID, risco_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData.ID ));
+ }
+ dataHash.put(TO_RISCO_ID, risco_idObject);
+ }
+
+ public Integer getProbabilidade()
+ {
+ return (Integer) get(PROBABILIDADE);
+ }
+
+ public void setProbabilidade(Integer probabilidadeValue )
+ {
+ this.set(PROBABILIDADE, probabilidadeValue );
+ }
+
+ public Integer getSeveridade()
+ {
+ return (Integer) get(SEVERIDADE);
+ }
+
+ public void setSeveridade(Integer severidadeValue )
+ {
+ this.set(SEVERIDADE, severidadeValue );
+ }
+
+ public Integer getValor_qualitativo()
+ {
+ return (Integer) dataHash.get(VALOR_QUALITATIVO);
+ }
+
+ public void setValor_qualitativo(Integer valor_qualitativoValue )
+ {
+ dataHash.put(TO_VALOR_QUALITATIVO, null);
+ dataHash.put(VALOR_QUALITATIVO, valor_qualitativoValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData toValor_qualitativo()
+ throws Exception
+ {
+ if( dataHash.get(TO_VALOR_QUALITATIVO) == null && getValor_qualitativo() != null )
+ {
+ dataHash.put(TO_VALOR_QUALITATIVO, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData.class, new Object[]{ getValor_qualitativo() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData) dataHash.get(TO_VALOR_QUALITATIVO);
+ }
+
+ public void setToValor_qualitativo(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData valor_qualitativoObject )
+ {
+ if( valor_qualitativoObject == null )
+ {
+ dataHash.put(VALOR_QUALITATIVO, null);
+ }
+ else
+ {
+ dataHash.put(VALOR_QUALITATIVO, valor_qualitativoObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData.ID ));
+ }
+ dataHash.put(TO_VALOR_QUALITATIVO, valor_qualitativoObject);
+ }
+
+ public String getIs_plano_actuacao()
+ {
+ return (String) get(IS_PLANO_ACTUACAO);
+ }
+
+ public void setIs_plano_actuacao(String is_plano_actuacaoValue )
+ {
+ this.set(IS_PLANO_ACTUACAO, is_plano_actuacaoValue );
+ }
+
+ public Integer getOrdem()
+ {
+ return (Integer) get(ORDEM);
+ }
+
+ public void setOrdem(Integer ordemValue )
+ {
+ this.set(ORDEM, ordemValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_POSTO_ID.equals( fieldName ) )
+ {
+ value = toPosto_id();
+ }
+ else if( POSTO_ID.equals( fieldName ) )
+ {
+ value = getPosto_id();
+ }
+ else if( TO_VALOR_QUALITATIVO.equals( fieldName ) )
+ {
+ value = toValor_qualitativo();
+ }
+ else if( VALOR_QUALITATIVO.equals( fieldName ) )
+ {
+ value = getValor_qualitativo();
+ }
+ else if( TO_RISCO_ID.equals( fieldName ) )
+ {
+ value = toRisco_id();
+ }
+ else if( RISCO_ID.equals( fieldName ) )
+ {
+ value = getRisco_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_POSTO_ID.equals( fieldName ) )
+ {
+ setToPosto_id( (com.evolute.siprp.server.db.data.siprp_local3.HsPostoData) value );
+ }
+ else if( POSTO_ID.equals( fieldName ) )
+ {
+ setPosto_id( (Integer) value );
+ }
+ else if( TO_VALOR_QUALITATIVO.equals( fieldName ) )
+ {
+ setToValor_qualitativo( (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData) value );
+ }
+ else if( VALOR_QUALITATIVO.equals( fieldName ) )
+ {
+ setValor_qualitativo( (Integer) value );
+ }
+ else if( TO_RISCO_ID.equals( fieldName ) )
+ {
+ setToRisco_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData) value );
+ }
+ else if( RISCO_ID.equals( fieldName ) )
+ {
+ setRisco_id( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_POSTO_ID) != null )
+ {
+ toPosto_id().save();
+ dataHash.put(POSTO_ID, toPosto_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsPostoData.ID ));
+ }
+
+ if( dataHash.get(TO_RISCO_ID) != null )
+ {
+ toRisco_id().save();
+ dataHash.put(RISCO_ID, toRisco_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRiscoData.ID ));
+ }
+
+ if( dataHash.get(TO_VALOR_QUALITATIVO) != null )
+ {
+ toValor_qualitativo().save();
+ dataHash.put(VALOR_QUALITATIVO, toValor_qualitativo().get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoValorQualitativoData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsPostoRisco.class;
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsPostoRiscoID getJDOPrimaryKey()
+ {
+ com.evolute.siprp.server.db.data.siprp_local3.HsPostoRiscoID id = new com.evolute.siprp.server.db.data.siprp_local3.HsPostoRiscoID();
+
+ Object obj;
+ obj = this.getPosto_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.posto_id = (Integer)obj;
+
+ obj = this.getRisco_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.risco_id = (Integer)obj;
+
+ return id;
+
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRiscoID.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRiscoID.java
new file mode 100644
index 00000000..887d7c05
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsPostoRiscoID.java
@@ -0,0 +1,37 @@
+/*
+* HsPostoRiscoID.java
+*
+* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import java.io.*;
+
+import com.evolute.utils.jdo.jpox.JDOIDClass;
+
+public final class HsPostoRiscoID extends JDOIDClass implements Serializable
+{
+ public Integer posto_id;
+ public Integer risco_id;
+
+ public HsPostoRiscoID()
+ {
+ }
+
+
+ public Object[] getValue()
+ {
+ Object value[] = new Object[ 2 ];
+ value[ 0 ] = posto_id;
+ value[ 1 ] = risco_id;
+ return value;
+ }
+
+ public void setValues( Object values[] )
+ {
+ posto_id = (Integer) values[ 0 ];
+ risco_id = (Integer) values[ 1 ];
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorio.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorio.java
new file mode 100644
index 00000000..5a338fd5
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorio.java
@@ -0,0 +1,399 @@
+/*
+* HsRelatorio.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsRelatorio implements JDOInnerObject
+{
+ private Integer id;
+ private java.util.Date data;
+ private java.sql.Timestamp deleted_date;
+ private Integer marcacao_id;
+ private java.sql.Timestamp is_submetido;
+ private Boolean avaliacao_inicial;
+ private String acompanhante1;
+ private String funcao_acompanhante1;
+ private String acompanhante2;
+ private String funcao_acompanhante2;
+ private String acompanhante3;
+ private String funcao_acompanhante3;
+ private String funcionarios;
+
+ public HsRelatorio()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsRelatorioDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == HsRelatorioDataAuto.DATA )
+ {
+ return data;
+ }
+ else if( fieldName == HsRelatorioDataAuto.DELETED_DATE )
+ {
+ return deleted_date;
+ }
+ else if( fieldName == HsRelatorioDataAuto.MARCACAO_ID )
+ {
+ return marcacao_id;
+ }
+ else if( fieldName == HsRelatorioDataAuto.IS_SUBMETIDO )
+ {
+ return is_submetido;
+ }
+ else if( fieldName == HsRelatorioDataAuto.AVALIACAO_INICIAL )
+ {
+ return avaliacao_inicial;
+ }
+ else if( fieldName == HsRelatorioDataAuto.ACOMPANHANTE1 )
+ {
+ return acompanhante1;
+ }
+ else if( fieldName == HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE1 )
+ {
+ return funcao_acompanhante1;
+ }
+ else if( fieldName == HsRelatorioDataAuto.ACOMPANHANTE2 )
+ {
+ return acompanhante2;
+ }
+ else if( fieldName == HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE2 )
+ {
+ return funcao_acompanhante2;
+ }
+ else if( fieldName == HsRelatorioDataAuto.ACOMPANHANTE3 )
+ {
+ return acompanhante3;
+ }
+ else if( fieldName == HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE3 )
+ {
+ return funcao_acompanhante3;
+ }
+ else if( fieldName == HsRelatorioDataAuto.FUNCIONARIOS )
+ {
+ return funcionarios;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.DATA ) )
+ {
+ return data;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.DELETED_DATE ) )
+ {
+ return deleted_date;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.MARCACAO_ID ) )
+ {
+ return marcacao_id;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.IS_SUBMETIDO ) )
+ {
+ return is_submetido;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.AVALIACAO_INICIAL ) )
+ {
+ return avaliacao_inicial;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.ACOMPANHANTE1 ) )
+ {
+ return acompanhante1;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE1 ) )
+ {
+ return funcao_acompanhante1;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.ACOMPANHANTE2 ) )
+ {
+ return acompanhante2;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE2 ) )
+ {
+ return funcao_acompanhante2;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.ACOMPANHANTE3 ) )
+ {
+ return acompanhante3;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE3 ) )
+ {
+ return funcao_acompanhante3;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.FUNCIONARIOS ) )
+ {
+ return funcionarios;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsRelatorioDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioDataAuto.DATA )
+ {
+ data = ( java.util.Date ) value;
+ }
+ else if( fieldName == HsRelatorioDataAuto.DELETED_DATE )
+ {
+ deleted_date = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName == HsRelatorioDataAuto.MARCACAO_ID )
+ {
+ marcacao_id = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioDataAuto.IS_SUBMETIDO )
+ {
+ is_submetido = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName == HsRelatorioDataAuto.AVALIACAO_INICIAL )
+ {
+ avaliacao_inicial = ( Boolean ) value;
+ }
+ else if( fieldName == HsRelatorioDataAuto.ACOMPANHANTE1 )
+ {
+ acompanhante1 = ( String ) value;
+ }
+ else if( fieldName == HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE1 )
+ {
+ funcao_acompanhante1 = ( String ) value;
+ }
+ else if( fieldName == HsRelatorioDataAuto.ACOMPANHANTE2 )
+ {
+ acompanhante2 = ( String ) value;
+ }
+ else if( fieldName == HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE2 )
+ {
+ funcao_acompanhante2 = ( String ) value;
+ }
+ else if( fieldName == HsRelatorioDataAuto.ACOMPANHANTE3 )
+ {
+ acompanhante3 = ( String ) value;
+ }
+ else if( fieldName == HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE3 )
+ {
+ funcao_acompanhante3 = ( String ) value;
+ }
+ else if( fieldName == HsRelatorioDataAuto.FUNCIONARIOS )
+ {
+ funcionarios = ( String ) value;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.DATA ) )
+ {
+ data = ( java.util.Date ) value;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.DELETED_DATE ) )
+ {
+ deleted_date = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.MARCACAO_ID ) )
+ {
+ marcacao_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.IS_SUBMETIDO ) )
+ {
+ is_submetido = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.AVALIACAO_INICIAL ) )
+ {
+ avaliacao_inicial = ( Boolean ) value;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.ACOMPANHANTE1 ) )
+ {
+ acompanhante1 = ( String ) value;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE1 ) )
+ {
+ funcao_acompanhante1 = ( String ) value;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.ACOMPANHANTE2 ) )
+ {
+ acompanhante2 = ( String ) value;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE2 ) )
+ {
+ funcao_acompanhante2 = ( String ) value;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.ACOMPANHANTE3 ) )
+ {
+ acompanhante3 = ( String ) value;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.FUNCAO_ACOMPANHANTE3 ) )
+ {
+ funcao_acompanhante3 = ( String ) value;
+ }
+ else if( fieldName.equals( HsRelatorioDataAuto.FUNCIONARIOS ) )
+ {
+ funcionarios = ( String ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public java.util.Date getData()
+ {
+ return data;
+ }
+
+ public void setData(java.util.Date dataValue )
+ {
+ this.data = dataValue;
+ }
+
+ public java.sql.Timestamp getDeleted_date()
+ {
+ return deleted_date;
+ }
+
+ public void setDeleted_date(java.sql.Timestamp deleted_dateValue )
+ {
+ this.deleted_date = deleted_dateValue;
+ }
+
+ public Integer getMarcacao_id()
+ {
+ return marcacao_id;
+ }
+
+ public void setMarcacao_id(Integer marcacao_idValue )
+ {
+ this.marcacao_id = marcacao_idValue;
+ }
+
+ public java.sql.Timestamp getIs_submetido()
+ {
+ return is_submetido;
+ }
+
+ public void setIs_submetido(java.sql.Timestamp is_submetidoValue )
+ {
+ this.is_submetido = is_submetidoValue;
+ }
+
+ public Boolean getAvaliacao_inicial()
+ {
+ return avaliacao_inicial;
+ }
+
+ public void setAvaliacao_inicial(Boolean avaliacao_inicialValue )
+ {
+ this.avaliacao_inicial = avaliacao_inicialValue;
+ }
+
+ public String getAcompanhante1()
+ {
+ return acompanhante1;
+ }
+
+ public void setAcompanhante1(String acompanhante1Value )
+ {
+ this.acompanhante1 = acompanhante1Value;
+ }
+
+ public String getFuncao_acompanhante1()
+ {
+ return funcao_acompanhante1;
+ }
+
+ public void setFuncao_acompanhante1(String funcao_acompanhante1Value )
+ {
+ this.funcao_acompanhante1 = funcao_acompanhante1Value;
+ }
+
+ public String getAcompanhante2()
+ {
+ return acompanhante2;
+ }
+
+ public void setAcompanhante2(String acompanhante2Value )
+ {
+ this.acompanhante2 = acompanhante2Value;
+ }
+
+ public String getFuncao_acompanhante2()
+ {
+ return funcao_acompanhante2;
+ }
+
+ public void setFuncao_acompanhante2(String funcao_acompanhante2Value )
+ {
+ this.funcao_acompanhante2 = funcao_acompanhante2Value;
+ }
+
+ public String getAcompanhante3()
+ {
+ return acompanhante3;
+ }
+
+ public void setAcompanhante3(String acompanhante3Value )
+ {
+ this.acompanhante3 = acompanhante3Value;
+ }
+
+ public String getFuncao_acompanhante3()
+ {
+ return funcao_acompanhante3;
+ }
+
+ public void setFuncao_acompanhante3(String funcao_acompanhante3Value )
+ {
+ this.funcao_acompanhante3 = funcao_acompanhante3Value;
+ }
+
+ public String getFuncionarios()
+ {
+ return funcionarios;
+ }
+
+ public void setFuncionarios(String funcionariosValue )
+ {
+ this.funcionarios = funcionariosValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsRelatorioDataAuto.class;
+ }
+
+ public HsRelatorioDataAuto getOuterClassInstance()
+ {
+ HsRelatorioDataAuto outerObj = new HsRelatorioDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioArea.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioArea.java
new file mode 100644
index 00000000..a8c808f4
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioArea.java
@@ -0,0 +1,183 @@
+/*
+* HsRelatorioArea.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsRelatorioArea implements JDOInnerObject
+{
+ private Integer id;
+ private String description;
+ private java.sql.Timestamp deleted_date;
+ private Integer relatorio_id;
+ private Integer ordem;
+
+ public HsRelatorioArea()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsRelatorioAreaDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == HsRelatorioAreaDataAuto.DESCRIPTION )
+ {
+ return description;
+ }
+ else if( fieldName == HsRelatorioAreaDataAuto.DELETED_DATE )
+ {
+ return deleted_date;
+ }
+ else if( fieldName == HsRelatorioAreaDataAuto.RELATORIO_ID )
+ {
+ return relatorio_id;
+ }
+ else if( fieldName == HsRelatorioAreaDataAuto.ORDEM )
+ {
+ return ordem;
+ }
+ else if( fieldName.equals( HsRelatorioAreaDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( HsRelatorioAreaDataAuto.DESCRIPTION ) )
+ {
+ return description;
+ }
+ else if( fieldName.equals( HsRelatorioAreaDataAuto.DELETED_DATE ) )
+ {
+ return deleted_date;
+ }
+ else if( fieldName.equals( HsRelatorioAreaDataAuto.RELATORIO_ID ) )
+ {
+ return relatorio_id;
+ }
+ else if( fieldName.equals( HsRelatorioAreaDataAuto.ORDEM ) )
+ {
+ return ordem;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsRelatorioAreaDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioAreaDataAuto.DESCRIPTION )
+ {
+ description = ( String ) value;
+ }
+ else if( fieldName == HsRelatorioAreaDataAuto.DELETED_DATE )
+ {
+ deleted_date = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName == HsRelatorioAreaDataAuto.RELATORIO_ID )
+ {
+ relatorio_id = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioAreaDataAuto.ORDEM )
+ {
+ ordem = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioAreaDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioAreaDataAuto.DESCRIPTION ) )
+ {
+ description = ( String ) value;
+ }
+ else if( fieldName.equals( HsRelatorioAreaDataAuto.DELETED_DATE ) )
+ {
+ deleted_date = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName.equals( HsRelatorioAreaDataAuto.RELATORIO_ID ) )
+ {
+ relatorio_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioAreaDataAuto.ORDEM ) )
+ {
+ ordem = ( Integer ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String descriptionValue )
+ {
+ this.description = descriptionValue;
+ }
+
+ public java.sql.Timestamp getDeleted_date()
+ {
+ return deleted_date;
+ }
+
+ public void setDeleted_date(java.sql.Timestamp deleted_dateValue )
+ {
+ this.deleted_date = deleted_dateValue;
+ }
+
+ public Integer getRelatorio_id()
+ {
+ return relatorio_id;
+ }
+
+ public void setRelatorio_id(Integer relatorio_idValue )
+ {
+ this.relatorio_id = relatorio_idValue;
+ }
+
+ public Integer getOrdem()
+ {
+ return ordem;
+ }
+
+ public void setOrdem(Integer ordemValue )
+ {
+ this.ordem = ordemValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsRelatorioAreaDataAuto.class;
+ }
+
+ public HsRelatorioAreaDataAuto getOuterClassInstance()
+ {
+ HsRelatorioAreaDataAuto outerObj = new HsRelatorioAreaDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioAreaData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioAreaData.java
new file mode 100644
index 00000000..d9640a30
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioAreaData.java
@@ -0,0 +1,18 @@
+/*
+* HsRelatorioAreaDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsRelatorioAreaData extends com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioAreaDataAuto
+{
+
+ public HsRelatorioAreaData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioAreaDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioAreaDataAuto.java
new file mode 100644
index 00000000..6f84cb7a
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioAreaDataAuto.java
@@ -0,0 +1,190 @@
+/*
+* HsRelatorioAreaDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsRelatorioAreaDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_relatorio_area";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "hs_relatorio_area.id";
+ public static final String DESCRIPTION = "description";
+ public static final String DESCRIPTION_FULL = "hs_relatorio_area.description";
+ public static final String DELETED_DATE = "deleted_date";
+ public static final String DELETED_DATE_FULL = "hs_relatorio_area.deleted_date";
+ public static final String RELATORIO_ID = "relatorio_id";
+ public static final String RELATORIO_ID_FULL = "hs_relatorio_area.relatorio_id";
+ public static final String TO_RELATORIO_ID = "to relatorio_id";
+ public static final String ORDEM = "ordem";
+ public static final String ORDEM_FULL = "hs_relatorio_area.ordem";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ DESCRIPTION, DELETED_DATE, RELATORIO_ID, TO_RELATORIO_ID, ORDEM, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, DESCRIPTION, DELETED_DATE, RELATORIO_ID, ORDEM, };
+
+ private Map dataHash;
+
+ public HsRelatorioAreaDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getDescription()
+ {
+ return (String) get(DESCRIPTION);
+ }
+
+ public void setDescription(String descriptionValue )
+ {
+ this.set(DESCRIPTION, descriptionValue );
+ }
+
+ public java.sql.Timestamp getDeleted_date()
+ {
+ return (java.sql.Timestamp) get(DELETED_DATE);
+ }
+
+ public void setDeleted_date(java.sql.Timestamp deleted_dateValue )
+ {
+ this.set(DELETED_DATE, deleted_dateValue );
+ }
+
+ public Integer getRelatorio_id()
+ {
+ return (Integer) dataHash.get(RELATORIO_ID);
+ }
+
+ public void setRelatorio_id(Integer relatorio_idValue )
+ {
+ dataHash.put(TO_RELATORIO_ID, null);
+ dataHash.put(RELATORIO_ID, relatorio_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData toRelatorio_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_RELATORIO_ID) == null && getRelatorio_id() != null )
+ {
+ dataHash.put(TO_RELATORIO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.class, new Object[]{ getRelatorio_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData) dataHash.get(TO_RELATORIO_ID);
+ }
+
+ public void setToRelatorio_id(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData relatorio_idObject )
+ {
+ if( relatorio_idObject == null )
+ {
+ dataHash.put(RELATORIO_ID, null);
+ }
+ else
+ {
+ dataHash.put(RELATORIO_ID, relatorio_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID ));
+ }
+ dataHash.put(TO_RELATORIO_ID, relatorio_idObject);
+ }
+
+ public Integer getOrdem()
+ {
+ return (Integer) get(ORDEM);
+ }
+
+ public void setOrdem(Integer ordemValue )
+ {
+ this.set(ORDEM, ordemValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( RELATORIO_ID.equals( fieldName ) )
+ {
+ value = getRelatorio_id();
+ }
+ else if( TO_RELATORIO_ID.equals( fieldName ) )
+ {
+ value = toRelatorio_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( RELATORIO_ID.equals( fieldName ) )
+ {
+ setRelatorio_id( (Integer) value );
+ }
+ else if( TO_RELATORIO_ID.equals( fieldName ) )
+ {
+ setToRelatorio_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_RELATORIO_ID) != null )
+ {
+ toRelatorio_id().save();
+ dataHash.put(RELATORIO_ID, toRelatorio_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsRelatorioArea.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioData.java
new file mode 100644
index 00000000..2b6b80f3
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioData.java
@@ -0,0 +1,18 @@
+/*
+* HsRelatorioDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsRelatorioData extends com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioDataAuto
+{
+
+ public HsRelatorioData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioDataAuto.java
new file mode 100644
index 00000000..fa4a02ff
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioDataAuto.java
@@ -0,0 +1,290 @@
+/*
+* HsRelatorioDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsRelatorioDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_relatorio";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "hs_relatorio.id";
+ public static final String DATA = "data";
+ public static final String DATA_FULL = "hs_relatorio.data";
+ public static final String DELETED_DATE = "deleted_date";
+ public static final String DELETED_DATE_FULL = "hs_relatorio.deleted_date";
+ public static final String MARCACAO_ID = "marcacao_id";
+ public static final String MARCACAO_ID_FULL = "hs_relatorio.marcacao_id";
+ public static final String TO_MARCACAO_ID = "to marcacao_id";
+ public static final String IS_SUBMETIDO = "is_submetido";
+ public static final String IS_SUBMETIDO_FULL = "hs_relatorio.is_submetido";
+ public static final String AVALIACAO_INICIAL = "avaliacao_inicial";
+ public static final String AVALIACAO_INICIAL_FULL = "hs_relatorio.avaliacao_inicial";
+ public static final String ACOMPANHANTE1 = "acompanhante1";
+ public static final String ACOMPANHANTE1_FULL = "hs_relatorio.acompanhante1";
+ public static final String FUNCAO_ACOMPANHANTE1 = "funcao_acompanhante1";
+ public static final String FUNCAO_ACOMPANHANTE1_FULL = "hs_relatorio.funcao_acompanhante1";
+ public static final String ACOMPANHANTE2 = "acompanhante2";
+ public static final String ACOMPANHANTE2_FULL = "hs_relatorio.acompanhante2";
+ public static final String FUNCAO_ACOMPANHANTE2 = "funcao_acompanhante2";
+ public static final String FUNCAO_ACOMPANHANTE2_FULL = "hs_relatorio.funcao_acompanhante2";
+ public static final String ACOMPANHANTE3 = "acompanhante3";
+ public static final String ACOMPANHANTE3_FULL = "hs_relatorio.acompanhante3";
+ public static final String FUNCAO_ACOMPANHANTE3 = "funcao_acompanhante3";
+ public static final String FUNCAO_ACOMPANHANTE3_FULL = "hs_relatorio.funcao_acompanhante3";
+ public static final String FUNCIONARIOS = "funcionarios";
+ public static final String FUNCIONARIOS_FULL = "hs_relatorio.funcionarios";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ DATA, DELETED_DATE, MARCACAO_ID, TO_MARCACAO_ID, IS_SUBMETIDO, AVALIACAO_INICIAL,
+ ACOMPANHANTE1, FUNCAO_ACOMPANHANTE1, ACOMPANHANTE2, FUNCAO_ACOMPANHANTE2,
+ ACOMPANHANTE3, FUNCAO_ACOMPANHANTE3, FUNCIONARIOS, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, DATA, DELETED_DATE, MARCACAO_ID, IS_SUBMETIDO, AVALIACAO_INICIAL,
+ ACOMPANHANTE1, FUNCAO_ACOMPANHANTE1, ACOMPANHANTE2, FUNCAO_ACOMPANHANTE2,
+ ACOMPANHANTE3, FUNCAO_ACOMPANHANTE3, FUNCIONARIOS, };
+
+ private Map dataHash;
+
+ public HsRelatorioDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public java.util.Date getData()
+ {
+ return (java.util.Date) get(DATA);
+ }
+
+ public void setData(java.util.Date dataValue )
+ {
+ this.set(DATA, dataValue );
+ }
+
+ public java.sql.Timestamp getDeleted_date()
+ {
+ return (java.sql.Timestamp) get(DELETED_DATE);
+ }
+
+ public void setDeleted_date(java.sql.Timestamp deleted_dateValue )
+ {
+ this.set(DELETED_DATE, deleted_dateValue );
+ }
+
+ public Integer getMarcacao_id()
+ {
+ return (Integer) dataHash.get(MARCACAO_ID);
+ }
+
+ public void setMarcacao_id(Integer marcacao_idValue )
+ {
+ dataHash.put(TO_MARCACAO_ID, null);
+ dataHash.put(MARCACAO_ID, marcacao_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData toMarcacao_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_MARCACAO_ID) == null && getMarcacao_id() != null )
+ {
+ dataHash.put(TO_MARCACAO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData.class, new Object[]{ getMarcacao_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData) dataHash.get(TO_MARCACAO_ID);
+ }
+
+ public void setToMarcacao_id(com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData marcacao_idObject )
+ {
+ if( marcacao_idObject == null )
+ {
+ dataHash.put(MARCACAO_ID, null);
+ }
+ else
+ {
+ dataHash.put(MARCACAO_ID, marcacao_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData.ID ));
+ }
+ dataHash.put(TO_MARCACAO_ID, marcacao_idObject);
+ }
+
+ public java.sql.Timestamp getIs_submetido()
+ {
+ return (java.sql.Timestamp) get(IS_SUBMETIDO);
+ }
+
+ public void setIs_submetido(java.sql.Timestamp is_submetidoValue )
+ {
+ this.set(IS_SUBMETIDO, is_submetidoValue );
+ }
+
+ public Boolean getAvaliacao_inicial()
+ {
+ return (Boolean) get(AVALIACAO_INICIAL);
+ }
+
+ public void setAvaliacao_inicial(Boolean avaliacao_inicialValue )
+ {
+ this.set(AVALIACAO_INICIAL, avaliacao_inicialValue );
+ }
+
+ public String getAcompanhante1()
+ {
+ return (String) get(ACOMPANHANTE1);
+ }
+
+ public void setAcompanhante1(String acompanhante1Value )
+ {
+ this.set(ACOMPANHANTE1, acompanhante1Value );
+ }
+
+ public String getFuncao_acompanhante1()
+ {
+ return (String) get(FUNCAO_ACOMPANHANTE1);
+ }
+
+ public void setFuncao_acompanhante1(String funcao_acompanhante1Value )
+ {
+ this.set(FUNCAO_ACOMPANHANTE1, funcao_acompanhante1Value );
+ }
+
+ public String getAcompanhante2()
+ {
+ return (String) get(ACOMPANHANTE2);
+ }
+
+ public void setAcompanhante2(String acompanhante2Value )
+ {
+ this.set(ACOMPANHANTE2, acompanhante2Value );
+ }
+
+ public String getFuncao_acompanhante2()
+ {
+ return (String) get(FUNCAO_ACOMPANHANTE2);
+ }
+
+ public void setFuncao_acompanhante2(String funcao_acompanhante2Value )
+ {
+ this.set(FUNCAO_ACOMPANHANTE2, funcao_acompanhante2Value );
+ }
+
+ public String getAcompanhante3()
+ {
+ return (String) get(ACOMPANHANTE3);
+ }
+
+ public void setAcompanhante3(String acompanhante3Value )
+ {
+ this.set(ACOMPANHANTE3, acompanhante3Value );
+ }
+
+ public String getFuncao_acompanhante3()
+ {
+ return (String) get(FUNCAO_ACOMPANHANTE3);
+ }
+
+ public void setFuncao_acompanhante3(String funcao_acompanhante3Value )
+ {
+ this.set(FUNCAO_ACOMPANHANTE3, funcao_acompanhante3Value );
+ }
+
+ public String getFuncionarios()
+ {
+ return (String) get(FUNCIONARIOS);
+ }
+
+ public void setFuncionarios(String funcionariosValue )
+ {
+ this.set(FUNCIONARIOS, funcionariosValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_MARCACAO_ID.equals( fieldName ) )
+ {
+ value = toMarcacao_id();
+ }
+ else if( MARCACAO_ID.equals( fieldName ) )
+ {
+ value = getMarcacao_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_MARCACAO_ID.equals( fieldName ) )
+ {
+ setToMarcacao_id( (com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData) value );
+ }
+ else if( MARCACAO_ID.equals( fieldName ) )
+ {
+ setMarcacao_id( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_MARCACAO_ID) != null )
+ {
+ toMarcacao_id().save();
+ dataHash.put(MARCACAO_ID, toMarcacao_id().get( com.evolute.siprp.server.db.data.siprp_local3.MarcacoesEstabelecimentoData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsRelatorio.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioEquipamento.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioEquipamento.java
new file mode 100644
index 00000000..ee5abf9c
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioEquipamento.java
@@ -0,0 +1,210 @@
+/*
+* HsRelatorioEquipamento.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsRelatorioEquipamento implements JDOInnerObject
+{
+ private Integer hs_relatorio_id;
+ private Integer hs_equipamento;
+ private Integer id;
+ private String tipo;
+ private String marca;
+ private String modelo;
+
+ public HsRelatorioEquipamento()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsRelatorioEquipamentoDataAuto.HS_RELATORIO_ID )
+ {
+ return hs_relatorio_id;
+ }
+ else if( fieldName == HsRelatorioEquipamentoDataAuto.HS_EQUIPAMENTO )
+ {
+ return hs_equipamento;
+ }
+ else if( fieldName == HsRelatorioEquipamentoDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == HsRelatorioEquipamentoDataAuto.TIPO )
+ {
+ return tipo;
+ }
+ else if( fieldName == HsRelatorioEquipamentoDataAuto.MARCA )
+ {
+ return marca;
+ }
+ else if( fieldName == HsRelatorioEquipamentoDataAuto.MODELO )
+ {
+ return modelo;
+ }
+ else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.HS_RELATORIO_ID ) )
+ {
+ return hs_relatorio_id;
+ }
+ else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.HS_EQUIPAMENTO ) )
+ {
+ return hs_equipamento;
+ }
+ else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.TIPO ) )
+ {
+ return tipo;
+ }
+ else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.MARCA ) )
+ {
+ return marca;
+ }
+ else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.MODELO ) )
+ {
+ return modelo;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsRelatorioEquipamentoDataAuto.HS_RELATORIO_ID )
+ {
+ hs_relatorio_id = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioEquipamentoDataAuto.HS_EQUIPAMENTO )
+ {
+ hs_equipamento = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioEquipamentoDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioEquipamentoDataAuto.TIPO )
+ {
+ tipo = ( String ) value;
+ }
+ else if( fieldName == HsRelatorioEquipamentoDataAuto.MARCA )
+ {
+ marca = ( String ) value;
+ }
+ else if( fieldName == HsRelatorioEquipamentoDataAuto.MODELO )
+ {
+ modelo = ( String ) value;
+ }
+ else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.HS_RELATORIO_ID ) )
+ {
+ hs_relatorio_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.HS_EQUIPAMENTO ) )
+ {
+ hs_equipamento = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.TIPO ) )
+ {
+ tipo = ( String ) value;
+ }
+ else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.MARCA ) )
+ {
+ marca = ( String ) value;
+ }
+ else if( fieldName.equals( HsRelatorioEquipamentoDataAuto.MODELO ) )
+ {
+ modelo = ( String ) value;
+ }
+ }
+
+ public Integer getHs_relatorio_id()
+ {
+ return hs_relatorio_id;
+ }
+
+ public void setHs_relatorio_id(Integer hs_relatorio_idValue )
+ {
+ this.hs_relatorio_id = hs_relatorio_idValue;
+ }
+
+ public Integer getHs_equipamento()
+ {
+ return hs_equipamento;
+ }
+
+ public void setHs_equipamento(Integer hs_equipamentoValue )
+ {
+ this.hs_equipamento = hs_equipamentoValue;
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getTipo()
+ {
+ return tipo;
+ }
+
+ public void setTipo(String tipoValue )
+ {
+ this.tipo = tipoValue;
+ }
+
+ public String getMarca()
+ {
+ return marca;
+ }
+
+ public void setMarca(String marcaValue )
+ {
+ this.marca = marcaValue;
+ }
+
+ public String getModelo()
+ {
+ return modelo;
+ }
+
+ public void setModelo(String modeloValue )
+ {
+ this.modelo = modeloValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsRelatorioEquipamentoDataAuto.class;
+ }
+
+ public HsRelatorioEquipamentoDataAuto getOuterClassInstance()
+ {
+ HsRelatorioEquipamentoDataAuto outerObj = new HsRelatorioEquipamentoDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioEquipamentoData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioEquipamentoData.java
new file mode 100644
index 00000000..fdf9a44c
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioEquipamentoData.java
@@ -0,0 +1,18 @@
+/*
+* HsRelatorioEquipamentoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsRelatorioEquipamentoData extends com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioEquipamentoDataAuto
+{
+
+ public HsRelatorioEquipamentoData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioEquipamentoDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioEquipamentoDataAuto.java
new file mode 100644
index 00000000..1e94688b
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioEquipamentoDataAuto.java
@@ -0,0 +1,202 @@
+/*
+* HsRelatorioEquipamentoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsRelatorioEquipamentoDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_relatorio_equipamento";
+
+ public static final String HS_RELATORIO_ID = "hs_relatorio_id";
+ public static final String HS_RELATORIO_ID_FULL = "hs_relatorio_equipamento.hs_relatorio_id";
+ public static final String TO_HS_RELATORIO_ID = "to hs_relatorio_id";
+ public static final String HS_EQUIPAMENTO = "hs_equipamento";
+ public static final String HS_EQUIPAMENTO_FULL = "hs_relatorio_equipamento.hs_equipamento";
+ public static final String ID = "id";
+ public static final String ID_FULL = "hs_relatorio_equipamento.id";
+ public static final String TIPO = "tipo";
+ public static final String TIPO_FULL = "hs_relatorio_equipamento.tipo";
+ public static final String MARCA = "marca";
+ public static final String MARCA_FULL = "hs_relatorio_equipamento.marca";
+ public static final String MODELO = "modelo";
+ public static final String MODELO_FULL = "hs_relatorio_equipamento.modelo";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ HS_RELATORIO_ID, TO_HS_RELATORIO_ID, HS_EQUIPAMENTO, TIPO, MARCA, MODELO, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ HS_RELATORIO_ID, HS_EQUIPAMENTO, ID, TIPO, MARCA, MODELO, };
+
+ private Map dataHash;
+
+ public HsRelatorioEquipamentoDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getHs_relatorio_id()
+ {
+ return (Integer) dataHash.get(HS_RELATORIO_ID);
+ }
+
+ public void setHs_relatorio_id(Integer hs_relatorio_idValue )
+ {
+ dataHash.put(TO_HS_RELATORIO_ID, null);
+ dataHash.put(HS_RELATORIO_ID, hs_relatorio_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData toHs_relatorio_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_HS_RELATORIO_ID) == null && getHs_relatorio_id() != null )
+ {
+ dataHash.put(TO_HS_RELATORIO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.class, new Object[]{ getHs_relatorio_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData) dataHash.get(TO_HS_RELATORIO_ID);
+ }
+
+ public void setToHs_relatorio_id(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData hs_relatorio_idObject )
+ {
+ if( hs_relatorio_idObject == null )
+ {
+ dataHash.put(HS_RELATORIO_ID, null);
+ }
+ else
+ {
+ dataHash.put(HS_RELATORIO_ID, hs_relatorio_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID ));
+ }
+ dataHash.put(TO_HS_RELATORIO_ID, hs_relatorio_idObject);
+ }
+
+ public Integer getHs_equipamento()
+ {
+ return (Integer) get(HS_EQUIPAMENTO);
+ }
+
+ public void setHs_equipamento(Integer hs_equipamentoValue )
+ {
+ this.set(HS_EQUIPAMENTO, hs_equipamentoValue );
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getTipo()
+ {
+ return (String) get(TIPO);
+ }
+
+ public void setTipo(String tipoValue )
+ {
+ this.set(TIPO, tipoValue );
+ }
+
+ public String getMarca()
+ {
+ return (String) get(MARCA);
+ }
+
+ public void setMarca(String marcaValue )
+ {
+ this.set(MARCA, marcaValue );
+ }
+
+ public String getModelo()
+ {
+ return (String) get(MODELO);
+ }
+
+ public void setModelo(String modeloValue )
+ {
+ this.set(MODELO, modeloValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_HS_RELATORIO_ID.equals( fieldName ) )
+ {
+ value = toHs_relatorio_id();
+ }
+ else if( HS_RELATORIO_ID.equals( fieldName ) )
+ {
+ value = getHs_relatorio_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_HS_RELATORIO_ID.equals( fieldName ) )
+ {
+ setToHs_relatorio_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData) value );
+ }
+ else if( HS_RELATORIO_ID.equals( fieldName ) )
+ {
+ setHs_relatorio_id( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_HS_RELATORIO_ID) != null )
+ {
+ toHs_relatorio_id().save();
+ dataHash.put(HS_RELATORIO_ID, toHs_relatorio_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsRelatorioEquipamento.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioLegislacao.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioLegislacao.java
new file mode 100644
index 00000000..27d7e9c2
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioLegislacao.java
@@ -0,0 +1,210 @@
+/*
+* HsRelatorioLegislacao.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsRelatorioLegislacao implements JDOInnerObject
+{
+ private Integer hs_relatorio_id;
+ private Integer hs_legislacao_id;
+ private Integer id;
+ private String categoria;
+ private String descricao;
+ private Integer ordem;
+
+ public HsRelatorioLegislacao()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsRelatorioLegislacaoDataAuto.HS_RELATORIO_ID )
+ {
+ return hs_relatorio_id;
+ }
+ else if( fieldName == HsRelatorioLegislacaoDataAuto.HS_LEGISLACAO_ID )
+ {
+ return hs_legislacao_id;
+ }
+ else if( fieldName == HsRelatorioLegislacaoDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == HsRelatorioLegislacaoDataAuto.CATEGORIA )
+ {
+ return categoria;
+ }
+ else if( fieldName == HsRelatorioLegislacaoDataAuto.DESCRICAO )
+ {
+ return descricao;
+ }
+ else if( fieldName == HsRelatorioLegislacaoDataAuto.ORDEM )
+ {
+ return ordem;
+ }
+ else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.HS_RELATORIO_ID ) )
+ {
+ return hs_relatorio_id;
+ }
+ else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.HS_LEGISLACAO_ID ) )
+ {
+ return hs_legislacao_id;
+ }
+ else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.CATEGORIA ) )
+ {
+ return categoria;
+ }
+ else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.DESCRICAO ) )
+ {
+ return descricao;
+ }
+ else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.ORDEM ) )
+ {
+ return ordem;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsRelatorioLegislacaoDataAuto.HS_RELATORIO_ID )
+ {
+ hs_relatorio_id = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioLegislacaoDataAuto.HS_LEGISLACAO_ID )
+ {
+ hs_legislacao_id = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioLegislacaoDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioLegislacaoDataAuto.CATEGORIA )
+ {
+ categoria = ( String ) value;
+ }
+ else if( fieldName == HsRelatorioLegislacaoDataAuto.DESCRICAO )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName == HsRelatorioLegislacaoDataAuto.ORDEM )
+ {
+ ordem = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.HS_RELATORIO_ID ) )
+ {
+ hs_relatorio_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.HS_LEGISLACAO_ID ) )
+ {
+ hs_legislacao_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.CATEGORIA ) )
+ {
+ categoria = ( String ) value;
+ }
+ else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.DESCRICAO ) )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName.equals( HsRelatorioLegislacaoDataAuto.ORDEM ) )
+ {
+ ordem = ( Integer ) value;
+ }
+ }
+
+ public Integer getHs_relatorio_id()
+ {
+ return hs_relatorio_id;
+ }
+
+ public void setHs_relatorio_id(Integer hs_relatorio_idValue )
+ {
+ this.hs_relatorio_id = hs_relatorio_idValue;
+ }
+
+ public Integer getHs_legislacao_id()
+ {
+ return hs_legislacao_id;
+ }
+
+ public void setHs_legislacao_id(Integer hs_legislacao_idValue )
+ {
+ this.hs_legislacao_id = hs_legislacao_idValue;
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getCategoria()
+ {
+ return categoria;
+ }
+
+ public void setCategoria(String categoriaValue )
+ {
+ this.categoria = categoriaValue;
+ }
+
+ public String getDescricao()
+ {
+ return descricao;
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.descricao = descricaoValue;
+ }
+
+ public Integer getOrdem()
+ {
+ return ordem;
+ }
+
+ public void setOrdem(Integer ordemValue )
+ {
+ this.ordem = ordemValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsRelatorioLegislacaoDataAuto.class;
+ }
+
+ public HsRelatorioLegislacaoDataAuto getOuterClassInstance()
+ {
+ HsRelatorioLegislacaoDataAuto outerObj = new HsRelatorioLegislacaoDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioLegislacaoData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioLegislacaoData.java
new file mode 100644
index 00000000..e26436ce
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioLegislacaoData.java
@@ -0,0 +1,18 @@
+/*
+* HsRelatorioLegislacaoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsRelatorioLegislacaoData extends com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioLegislacaoDataAuto
+{
+
+ public HsRelatorioLegislacaoData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioLegislacaoDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioLegislacaoDataAuto.java
new file mode 100644
index 00000000..d01cb04c
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioLegislacaoDataAuto.java
@@ -0,0 +1,203 @@
+/*
+* HsRelatorioLegislacaoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsRelatorioLegislacaoDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_relatorio_legislacao";
+
+ public static final String HS_RELATORIO_ID = "hs_relatorio_id";
+ public static final String HS_RELATORIO_ID_FULL = "hs_relatorio_legislacao.hs_relatorio_id";
+ public static final String TO_HS_RELATORIO_ID = "to hs_relatorio_id";
+ public static final String HS_LEGISLACAO_ID = "hs_legislacao_id";
+ public static final String HS_LEGISLACAO_ID_FULL = "hs_relatorio_legislacao.hs_legislacao_id";
+ public static final String ID = "id";
+ public static final String ID_FULL = "hs_relatorio_legislacao.id";
+ public static final String CATEGORIA = "categoria";
+ public static final String CATEGORIA_FULL = "hs_relatorio_legislacao.categoria";
+ public static final String DESCRICAO = "descricao";
+ public static final String DESCRICAO_FULL = "hs_relatorio_legislacao.descricao";
+ public static final String ORDEM = "ordem";
+ public static final String ORDEM_FULL = "hs_relatorio_legislacao.ordem";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ HS_RELATORIO_ID, TO_HS_RELATORIO_ID, HS_LEGISLACAO_ID, CATEGORIA, DESCRICAO,
+ ORDEM, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ HS_RELATORIO_ID, HS_LEGISLACAO_ID, ID, CATEGORIA, DESCRICAO, ORDEM, };
+
+ private Map dataHash;
+
+ public HsRelatorioLegislacaoDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getHs_relatorio_id()
+ {
+ return (Integer) dataHash.get(HS_RELATORIO_ID);
+ }
+
+ public void setHs_relatorio_id(Integer hs_relatorio_idValue )
+ {
+ dataHash.put(TO_HS_RELATORIO_ID, null);
+ dataHash.put(HS_RELATORIO_ID, hs_relatorio_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData toHs_relatorio_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_HS_RELATORIO_ID) == null && getHs_relatorio_id() != null )
+ {
+ dataHash.put(TO_HS_RELATORIO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.class, new Object[]{ getHs_relatorio_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData) dataHash.get(TO_HS_RELATORIO_ID);
+ }
+
+ public void setToHs_relatorio_id(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData hs_relatorio_idObject )
+ {
+ if( hs_relatorio_idObject == null )
+ {
+ dataHash.put(HS_RELATORIO_ID, null);
+ }
+ else
+ {
+ dataHash.put(HS_RELATORIO_ID, hs_relatorio_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID ));
+ }
+ dataHash.put(TO_HS_RELATORIO_ID, hs_relatorio_idObject);
+ }
+
+ public Integer getHs_legislacao_id()
+ {
+ return (Integer) get(HS_LEGISLACAO_ID);
+ }
+
+ public void setHs_legislacao_id(Integer hs_legislacao_idValue )
+ {
+ this.set(HS_LEGISLACAO_ID, hs_legislacao_idValue );
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getCategoria()
+ {
+ return (String) get(CATEGORIA);
+ }
+
+ public void setCategoria(String categoriaValue )
+ {
+ this.set(CATEGORIA, categoriaValue );
+ }
+
+ public String getDescricao()
+ {
+ return (String) get(DESCRICAO);
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.set(DESCRICAO, descricaoValue );
+ }
+
+ public Integer getOrdem()
+ {
+ return (Integer) get(ORDEM);
+ }
+
+ public void setOrdem(Integer ordemValue )
+ {
+ this.set(ORDEM, ordemValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_HS_RELATORIO_ID.equals( fieldName ) )
+ {
+ value = toHs_relatorio_id();
+ }
+ else if( HS_RELATORIO_ID.equals( fieldName ) )
+ {
+ value = getHs_relatorio_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_HS_RELATORIO_ID.equals( fieldName ) )
+ {
+ setToHs_relatorio_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData) value );
+ }
+ else if( HS_RELATORIO_ID.equals( fieldName ) )
+ {
+ setHs_relatorio_id( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_HS_RELATORIO_ID) != null )
+ {
+ toHs_relatorio_id().save();
+ dataHash.put(HS_RELATORIO_ID, toHs_relatorio_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsRelatorioLegislacao.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioMedida.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioMedida.java
new file mode 100644
index 00000000..4bee51d5
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioMedida.java
@@ -0,0 +1,183 @@
+/*
+* HsRelatorioMedida.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsRelatorioMedida implements JDOInnerObject
+{
+ private Integer id;
+ private Integer risco_id;
+ private String description;
+ private String requesitos_legais;
+ private java.sql.Timestamp deleted_date;
+
+ public HsRelatorioMedida()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsRelatorioMedidaDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == HsRelatorioMedidaDataAuto.RISCO_ID )
+ {
+ return risco_id;
+ }
+ else if( fieldName == HsRelatorioMedidaDataAuto.DESCRIPTION )
+ {
+ return description;
+ }
+ else if( fieldName == HsRelatorioMedidaDataAuto.REQUESITOS_LEGAIS )
+ {
+ return requesitos_legais;
+ }
+ else if( fieldName == HsRelatorioMedidaDataAuto.DELETED_DATE )
+ {
+ return deleted_date;
+ }
+ else if( fieldName.equals( HsRelatorioMedidaDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( HsRelatorioMedidaDataAuto.RISCO_ID ) )
+ {
+ return risco_id;
+ }
+ else if( fieldName.equals( HsRelatorioMedidaDataAuto.DESCRIPTION ) )
+ {
+ return description;
+ }
+ else if( fieldName.equals( HsRelatorioMedidaDataAuto.REQUESITOS_LEGAIS ) )
+ {
+ return requesitos_legais;
+ }
+ else if( fieldName.equals( HsRelatorioMedidaDataAuto.DELETED_DATE ) )
+ {
+ return deleted_date;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsRelatorioMedidaDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioMedidaDataAuto.RISCO_ID )
+ {
+ risco_id = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioMedidaDataAuto.DESCRIPTION )
+ {
+ description = ( String ) value;
+ }
+ else if( fieldName == HsRelatorioMedidaDataAuto.REQUESITOS_LEGAIS )
+ {
+ requesitos_legais = ( String ) value;
+ }
+ else if( fieldName == HsRelatorioMedidaDataAuto.DELETED_DATE )
+ {
+ deleted_date = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName.equals( HsRelatorioMedidaDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioMedidaDataAuto.RISCO_ID ) )
+ {
+ risco_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioMedidaDataAuto.DESCRIPTION ) )
+ {
+ description = ( String ) value;
+ }
+ else if( fieldName.equals( HsRelatorioMedidaDataAuto.REQUESITOS_LEGAIS ) )
+ {
+ requesitos_legais = ( String ) value;
+ }
+ else if( fieldName.equals( HsRelatorioMedidaDataAuto.DELETED_DATE ) )
+ {
+ deleted_date = ( java.sql.Timestamp ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public Integer getRisco_id()
+ {
+ return risco_id;
+ }
+
+ public void setRisco_id(Integer risco_idValue )
+ {
+ this.risco_id = risco_idValue;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String descriptionValue )
+ {
+ this.description = descriptionValue;
+ }
+
+ public String getRequesitos_legais()
+ {
+ return requesitos_legais;
+ }
+
+ public void setRequesitos_legais(String requesitos_legaisValue )
+ {
+ this.requesitos_legais = requesitos_legaisValue;
+ }
+
+ public java.sql.Timestamp getDeleted_date()
+ {
+ return deleted_date;
+ }
+
+ public void setDeleted_date(java.sql.Timestamp deleted_dateValue )
+ {
+ this.deleted_date = deleted_dateValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsRelatorioMedidaDataAuto.class;
+ }
+
+ public HsRelatorioMedidaDataAuto getOuterClassInstance()
+ {
+ HsRelatorioMedidaDataAuto outerObj = new HsRelatorioMedidaDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioMedidaData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioMedidaData.java
new file mode 100644
index 00000000..977b2091
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioMedidaData.java
@@ -0,0 +1,18 @@
+/*
+* HsRelatorioMedidaDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsRelatorioMedidaData extends com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioMedidaDataAuto
+{
+
+ public HsRelatorioMedidaData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioMedidaDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioMedidaDataAuto.java
new file mode 100644
index 00000000..1d546c5a
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioMedidaDataAuto.java
@@ -0,0 +1,190 @@
+/*
+* HsRelatorioMedidaDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsRelatorioMedidaDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_relatorio_medida";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "hs_relatorio_medida.id";
+ public static final String RISCO_ID = "risco_id";
+ public static final String RISCO_ID_FULL = "hs_relatorio_medida.risco_id";
+ public static final String TO_RISCO_ID = "to risco_id";
+ public static final String DESCRIPTION = "description";
+ public static final String DESCRIPTION_FULL = "hs_relatorio_medida.description";
+ public static final String REQUESITOS_LEGAIS = "requesitos_legais";
+ public static final String REQUESITOS_LEGAIS_FULL = "hs_relatorio_medida.requesitos_legais";
+ public static final String DELETED_DATE = "deleted_date";
+ public static final String DELETED_DATE_FULL = "hs_relatorio_medida.deleted_date";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ RISCO_ID, TO_RISCO_ID, DESCRIPTION, REQUESITOS_LEGAIS, DELETED_DATE, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, RISCO_ID, DESCRIPTION, REQUESITOS_LEGAIS, DELETED_DATE, };
+
+ private Map dataHash;
+
+ public HsRelatorioMedidaDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public Integer getRisco_id()
+ {
+ return (Integer) dataHash.get(RISCO_ID);
+ }
+
+ public void setRisco_id(Integer risco_idValue )
+ {
+ dataHash.put(TO_RISCO_ID, null);
+ dataHash.put(RISCO_ID, risco_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData toRisco_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_RISCO_ID) == null && getRisco_id() != null )
+ {
+ dataHash.put(TO_RISCO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData.class, new Object[]{ getRisco_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData) dataHash.get(TO_RISCO_ID);
+ }
+
+ public void setToRisco_id(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData risco_idObject )
+ {
+ if( risco_idObject == null )
+ {
+ dataHash.put(RISCO_ID, null);
+ }
+ else
+ {
+ dataHash.put(RISCO_ID, risco_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData.ID ));
+ }
+ dataHash.put(TO_RISCO_ID, risco_idObject);
+ }
+
+ public String getDescription()
+ {
+ return (String) get(DESCRIPTION);
+ }
+
+ public void setDescription(String descriptionValue )
+ {
+ this.set(DESCRIPTION, descriptionValue );
+ }
+
+ public String getRequesitos_legais()
+ {
+ return (String) get(REQUESITOS_LEGAIS);
+ }
+
+ public void setRequesitos_legais(String requesitos_legaisValue )
+ {
+ this.set(REQUESITOS_LEGAIS, requesitos_legaisValue );
+ }
+
+ public java.sql.Timestamp getDeleted_date()
+ {
+ return (java.sql.Timestamp) get(DELETED_DATE);
+ }
+
+ public void setDeleted_date(java.sql.Timestamp deleted_dateValue )
+ {
+ this.set(DELETED_DATE, deleted_dateValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_RISCO_ID.equals( fieldName ) )
+ {
+ value = toRisco_id();
+ }
+ else if( RISCO_ID.equals( fieldName ) )
+ {
+ value = getRisco_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_RISCO_ID.equals( fieldName ) )
+ {
+ setToRisco_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData) value );
+ }
+ else if( RISCO_ID.equals( fieldName ) )
+ {
+ setRisco_id( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_RISCO_ID) != null )
+ {
+ toRisco_id().save();
+ dataHash.put(RISCO_ID, toRisco_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioRiscoData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsRelatorioMedida.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioNormalizacao.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioNormalizacao.java
new file mode 100644
index 00000000..5cb7063e
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioNormalizacao.java
@@ -0,0 +1,210 @@
+/*
+* HsRelatorioNormalizacao.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsRelatorioNormalizacao implements JDOInnerObject
+{
+ private Integer hs_relatorio_id;
+ private Integer hs_normalizacao_id;
+ private Integer id;
+ private String codigo;
+ private String descricao;
+ private Boolean portuguesa;
+
+ public HsRelatorioNormalizacao()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsRelatorioNormalizacaoDataAuto.HS_RELATORIO_ID )
+ {
+ return hs_relatorio_id;
+ }
+ else if( fieldName == HsRelatorioNormalizacaoDataAuto.HS_NORMALIZACAO_ID )
+ {
+ return hs_normalizacao_id;
+ }
+ else if( fieldName == HsRelatorioNormalizacaoDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == HsRelatorioNormalizacaoDataAuto.CODIGO )
+ {
+ return codigo;
+ }
+ else if( fieldName == HsRelatorioNormalizacaoDataAuto.DESCRICAO )
+ {
+ return descricao;
+ }
+ else if( fieldName == HsRelatorioNormalizacaoDataAuto.PORTUGUESA )
+ {
+ return portuguesa;
+ }
+ else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.HS_RELATORIO_ID ) )
+ {
+ return hs_relatorio_id;
+ }
+ else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.HS_NORMALIZACAO_ID ) )
+ {
+ return hs_normalizacao_id;
+ }
+ else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.CODIGO ) )
+ {
+ return codigo;
+ }
+ else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.DESCRICAO ) )
+ {
+ return descricao;
+ }
+ else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.PORTUGUESA ) )
+ {
+ return portuguesa;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsRelatorioNormalizacaoDataAuto.HS_RELATORIO_ID )
+ {
+ hs_relatorio_id = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioNormalizacaoDataAuto.HS_NORMALIZACAO_ID )
+ {
+ hs_normalizacao_id = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioNormalizacaoDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioNormalizacaoDataAuto.CODIGO )
+ {
+ codigo = ( String ) value;
+ }
+ else if( fieldName == HsRelatorioNormalizacaoDataAuto.DESCRICAO )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName == HsRelatorioNormalizacaoDataAuto.PORTUGUESA )
+ {
+ portuguesa = ( Boolean ) value;
+ }
+ else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.HS_RELATORIO_ID ) )
+ {
+ hs_relatorio_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.HS_NORMALIZACAO_ID ) )
+ {
+ hs_normalizacao_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.CODIGO ) )
+ {
+ codigo = ( String ) value;
+ }
+ else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.DESCRICAO ) )
+ {
+ descricao = ( String ) value;
+ }
+ else if( fieldName.equals( HsRelatorioNormalizacaoDataAuto.PORTUGUESA ) )
+ {
+ portuguesa = ( Boolean ) value;
+ }
+ }
+
+ public Integer getHs_relatorio_id()
+ {
+ return hs_relatorio_id;
+ }
+
+ public void setHs_relatorio_id(Integer hs_relatorio_idValue )
+ {
+ this.hs_relatorio_id = hs_relatorio_idValue;
+ }
+
+ public Integer getHs_normalizacao_id()
+ {
+ return hs_normalizacao_id;
+ }
+
+ public void setHs_normalizacao_id(Integer hs_normalizacao_idValue )
+ {
+ this.hs_normalizacao_id = hs_normalizacao_idValue;
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getCodigo()
+ {
+ return codigo;
+ }
+
+ public void setCodigo(String codigoValue )
+ {
+ this.codigo = codigoValue;
+ }
+
+ public String getDescricao()
+ {
+ return descricao;
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.descricao = descricaoValue;
+ }
+
+ public Boolean getPortuguesa()
+ {
+ return portuguesa;
+ }
+
+ public void setPortuguesa(Boolean portuguesaValue )
+ {
+ this.portuguesa = portuguesaValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsRelatorioNormalizacaoDataAuto.class;
+ }
+
+ public HsRelatorioNormalizacaoDataAuto getOuterClassInstance()
+ {
+ HsRelatorioNormalizacaoDataAuto outerObj = new HsRelatorioNormalizacaoDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioNormalizacaoData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioNormalizacaoData.java
new file mode 100644
index 00000000..a7386050
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioNormalizacaoData.java
@@ -0,0 +1,18 @@
+/*
+* HsRelatorioNormalizacaoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsRelatorioNormalizacaoData extends com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioNormalizacaoDataAuto
+{
+
+ public HsRelatorioNormalizacaoData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioNormalizacaoDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioNormalizacaoDataAuto.java
new file mode 100644
index 00000000..cb95f185
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioNormalizacaoDataAuto.java
@@ -0,0 +1,203 @@
+/*
+* HsRelatorioNormalizacaoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsRelatorioNormalizacaoDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_relatorio_normalizacao";
+
+ public static final String HS_RELATORIO_ID = "hs_relatorio_id";
+ public static final String HS_RELATORIO_ID_FULL = "hs_relatorio_normalizacao.hs_relatorio_id";
+ public static final String TO_HS_RELATORIO_ID = "to hs_relatorio_id";
+ public static final String HS_NORMALIZACAO_ID = "hs_normalizacao_id";
+ public static final String HS_NORMALIZACAO_ID_FULL = "hs_relatorio_normalizacao.hs_normalizacao_id";
+ public static final String ID = "id";
+ public static final String ID_FULL = "hs_relatorio_normalizacao.id";
+ public static final String CODIGO = "codigo";
+ public static final String CODIGO_FULL = "hs_relatorio_normalizacao.codigo";
+ public static final String DESCRICAO = "descricao";
+ public static final String DESCRICAO_FULL = "hs_relatorio_normalizacao.descricao";
+ public static final String PORTUGUESA = "portuguesa";
+ public static final String PORTUGUESA_FULL = "hs_relatorio_normalizacao.portuguesa";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ HS_RELATORIO_ID, TO_HS_RELATORIO_ID, HS_NORMALIZACAO_ID, CODIGO, DESCRICAO,
+ PORTUGUESA, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ HS_RELATORIO_ID, HS_NORMALIZACAO_ID, ID, CODIGO, DESCRICAO, PORTUGUESA, };
+
+ private Map dataHash;
+
+ public HsRelatorioNormalizacaoDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getHs_relatorio_id()
+ {
+ return (Integer) dataHash.get(HS_RELATORIO_ID);
+ }
+
+ public void setHs_relatorio_id(Integer hs_relatorio_idValue )
+ {
+ dataHash.put(TO_HS_RELATORIO_ID, null);
+ dataHash.put(HS_RELATORIO_ID, hs_relatorio_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData toHs_relatorio_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_HS_RELATORIO_ID) == null && getHs_relatorio_id() != null )
+ {
+ dataHash.put(TO_HS_RELATORIO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.class, new Object[]{ getHs_relatorio_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData) dataHash.get(TO_HS_RELATORIO_ID);
+ }
+
+ public void setToHs_relatorio_id(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData hs_relatorio_idObject )
+ {
+ if( hs_relatorio_idObject == null )
+ {
+ dataHash.put(HS_RELATORIO_ID, null);
+ }
+ else
+ {
+ dataHash.put(HS_RELATORIO_ID, hs_relatorio_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID ));
+ }
+ dataHash.put(TO_HS_RELATORIO_ID, hs_relatorio_idObject);
+ }
+
+ public Integer getHs_normalizacao_id()
+ {
+ return (Integer) get(HS_NORMALIZACAO_ID);
+ }
+
+ public void setHs_normalizacao_id(Integer hs_normalizacao_idValue )
+ {
+ this.set(HS_NORMALIZACAO_ID, hs_normalizacao_idValue );
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getCodigo()
+ {
+ return (String) get(CODIGO);
+ }
+
+ public void setCodigo(String codigoValue )
+ {
+ this.set(CODIGO, codigoValue );
+ }
+
+ public String getDescricao()
+ {
+ return (String) get(DESCRICAO);
+ }
+
+ public void setDescricao(String descricaoValue )
+ {
+ this.set(DESCRICAO, descricaoValue );
+ }
+
+ public Boolean getPortuguesa()
+ {
+ return (Boolean) get(PORTUGUESA);
+ }
+
+ public void setPortuguesa(Boolean portuguesaValue )
+ {
+ this.set(PORTUGUESA, portuguesaValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_HS_RELATORIO_ID.equals( fieldName ) )
+ {
+ value = toHs_relatorio_id();
+ }
+ else if( HS_RELATORIO_ID.equals( fieldName ) )
+ {
+ value = getHs_relatorio_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_HS_RELATORIO_ID.equals( fieldName ) )
+ {
+ setToHs_relatorio_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData) value );
+ }
+ else if( HS_RELATORIO_ID.equals( fieldName ) )
+ {
+ setHs_relatorio_id( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_HS_RELATORIO_ID) != null )
+ {
+ toHs_relatorio_id().save();
+ dataHash.put(HS_RELATORIO_ID, toHs_relatorio_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsRelatorioNormalizacao.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPosto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPosto.java
new file mode 100644
index 00000000..966c2a5e
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPosto.java
@@ -0,0 +1,183 @@
+/*
+* HsRelatorioPosto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsRelatorioPosto implements JDOInnerObject
+{
+ private Integer id;
+ private String description;
+ private Integer area_id;
+ private java.sql.Timestamp deleted_date;
+ private Boolean is_principal;
+
+ public HsRelatorioPosto()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsRelatorioPostoDataAuto.ID )
+ {
+ return id;
+ }
+ else if( fieldName == HsRelatorioPostoDataAuto.DESCRIPTION )
+ {
+ return description;
+ }
+ else if( fieldName == HsRelatorioPostoDataAuto.AREA_ID )
+ {
+ return area_id;
+ }
+ else if( fieldName == HsRelatorioPostoDataAuto.DELETED_DATE )
+ {
+ return deleted_date;
+ }
+ else if( fieldName == HsRelatorioPostoDataAuto.IS_PRINCIPAL )
+ {
+ return is_principal;
+ }
+ else if( fieldName.equals( HsRelatorioPostoDataAuto.ID ) )
+ {
+ return id;
+ }
+ else if( fieldName.equals( HsRelatorioPostoDataAuto.DESCRIPTION ) )
+ {
+ return description;
+ }
+ else if( fieldName.equals( HsRelatorioPostoDataAuto.AREA_ID ) )
+ {
+ return area_id;
+ }
+ else if( fieldName.equals( HsRelatorioPostoDataAuto.DELETED_DATE ) )
+ {
+ return deleted_date;
+ }
+ else if( fieldName.equals( HsRelatorioPostoDataAuto.IS_PRINCIPAL ) )
+ {
+ return is_principal;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsRelatorioPostoDataAuto.ID )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioPostoDataAuto.DESCRIPTION )
+ {
+ description = ( String ) value;
+ }
+ else if( fieldName == HsRelatorioPostoDataAuto.AREA_ID )
+ {
+ area_id = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioPostoDataAuto.DELETED_DATE )
+ {
+ deleted_date = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName == HsRelatorioPostoDataAuto.IS_PRINCIPAL )
+ {
+ is_principal = ( Boolean ) value;
+ }
+ else if( fieldName.equals( HsRelatorioPostoDataAuto.ID ) )
+ {
+ id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioPostoDataAuto.DESCRIPTION ) )
+ {
+ description = ( String ) value;
+ }
+ else if( fieldName.equals( HsRelatorioPostoDataAuto.AREA_ID ) )
+ {
+ area_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioPostoDataAuto.DELETED_DATE ) )
+ {
+ deleted_date = ( java.sql.Timestamp ) value;
+ }
+ else if( fieldName.equals( HsRelatorioPostoDataAuto.IS_PRINCIPAL ) )
+ {
+ is_principal = ( Boolean ) value;
+ }
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.id = idValue;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String descriptionValue )
+ {
+ this.description = descriptionValue;
+ }
+
+ public Integer getArea_id()
+ {
+ return area_id;
+ }
+
+ public void setArea_id(Integer area_idValue )
+ {
+ this.area_id = area_idValue;
+ }
+
+ public java.sql.Timestamp getDeleted_date()
+ {
+ return deleted_date;
+ }
+
+ public void setDeleted_date(java.sql.Timestamp deleted_dateValue )
+ {
+ this.deleted_date = deleted_dateValue;
+ }
+
+ public Boolean getIs_principal()
+ {
+ return is_principal;
+ }
+
+ public void setIs_principal(Boolean is_principalValue )
+ {
+ this.is_principal = is_principalValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsRelatorioPostoDataAuto.class;
+ }
+
+ public HsRelatorioPostoDataAuto getOuterClassInstance()
+ {
+ HsRelatorioPostoDataAuto outerObj = new HsRelatorioPostoDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoData.java
new file mode 100644
index 00000000..b304fc7b
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoData.java
@@ -0,0 +1,18 @@
+/*
+* HsRelatorioPostoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsRelatorioPostoData extends com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoDataAuto
+{
+
+ public HsRelatorioPostoData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoDataAuto.java
new file mode 100644
index 00000000..5d24162c
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoDataAuto.java
@@ -0,0 +1,190 @@
+/*
+* HsRelatorioPostoDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsRelatorioPostoDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_relatorio_posto";
+
+ public static final String ID = "id";
+ public static final String ID_FULL = "hs_relatorio_posto.id";
+ public static final String DESCRIPTION = "description";
+ public static final String DESCRIPTION_FULL = "hs_relatorio_posto.description";
+ public static final String AREA_ID = "area_id";
+ public static final String AREA_ID_FULL = "hs_relatorio_posto.area_id";
+ public static final String TO_AREA_ID = "to area_id";
+ public static final String DELETED_DATE = "deleted_date";
+ public static final String DELETED_DATE_FULL = "hs_relatorio_posto.deleted_date";
+ public static final String IS_PRINCIPAL = "is_principal";
+ public static final String IS_PRINCIPAL_FULL = "hs_relatorio_posto.is_principal";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ DESCRIPTION, AREA_ID, TO_AREA_ID, DELETED_DATE, IS_PRINCIPAL, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ ID, DESCRIPTION, AREA_ID, DELETED_DATE, IS_PRINCIPAL, };
+
+ private Map dataHash;
+
+ public HsRelatorioPostoDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getId()
+ {
+ return (Integer) get(ID);
+ }
+
+ public void setId(Integer idValue )
+ {
+ this.set(ID, idValue );
+ }
+
+ public String getDescription()
+ {
+ return (String) get(DESCRIPTION);
+ }
+
+ public void setDescription(String descriptionValue )
+ {
+ this.set(DESCRIPTION, descriptionValue );
+ }
+
+ public Integer getArea_id()
+ {
+ return (Integer) dataHash.get(AREA_ID);
+ }
+
+ public void setArea_id(Integer area_idValue )
+ {
+ dataHash.put(TO_AREA_ID, null);
+ dataHash.put(AREA_ID, area_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioAreaData toArea_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_AREA_ID) == null && getArea_id() != null )
+ {
+ dataHash.put(TO_AREA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioAreaData.class, new Object[]{ getArea_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioAreaData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioAreaData) dataHash.get(TO_AREA_ID);
+ }
+
+ public void setToArea_id(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioAreaData area_idObject )
+ {
+ if( area_idObject == null )
+ {
+ dataHash.put(AREA_ID, null);
+ }
+ else
+ {
+ dataHash.put(AREA_ID, area_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioAreaData.ID ));
+ }
+ dataHash.put(TO_AREA_ID, area_idObject);
+ }
+
+ public java.sql.Timestamp getDeleted_date()
+ {
+ return (java.sql.Timestamp) get(DELETED_DATE);
+ }
+
+ public void setDeleted_date(java.sql.Timestamp deleted_dateValue )
+ {
+ this.set(DELETED_DATE, deleted_dateValue );
+ }
+
+ public Boolean getIs_principal()
+ {
+ return (Boolean) get(IS_PRINCIPAL);
+ }
+
+ public void setIs_principal(Boolean is_principalValue )
+ {
+ this.set(IS_PRINCIPAL, is_principalValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_AREA_ID.equals( fieldName ) )
+ {
+ value = toArea_id();
+ }
+ else if( AREA_ID.equals( fieldName ) )
+ {
+ value = getArea_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_AREA_ID.equals( fieldName ) )
+ {
+ setToArea_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioAreaData) value );
+ }
+ else if( AREA_ID.equals( fieldName ) )
+ {
+ setArea_id( (Integer) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_AREA_ID) != null )
+ {
+ toArea_id().save();
+ dataHash.put(AREA_ID, toArea_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioAreaData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsRelatorioPosto.class;
+ }
+
+ public Integer getJDOPrimaryKey()
+ {
+ Object obj = this.getId();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ return (Integer) obj;
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedida.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedida.java
new file mode 100644
index 00000000..17841d62
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedida.java
@@ -0,0 +1,141 @@
+/*
+* HsRelatorioPostoMedida.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsRelatorioPostoMedida implements JDOInnerObject
+{
+ private Integer posto_id;
+ private Integer medida_id;
+ private Boolean is_plano_actuacao;
+
+ public HsRelatorioPostoMedida()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsRelatorioPostoMedidaDataAuto.POSTO_ID )
+ {
+ return posto_id;
+ }
+ else if( fieldName == HsRelatorioPostoMedidaDataAuto.MEDIDA_ID )
+ {
+ return medida_id;
+ }
+ else if( fieldName == HsRelatorioPostoMedidaDataAuto.IS_PLANO_ACTUACAO )
+ {
+ return is_plano_actuacao;
+ }
+ else if( fieldName.equals( HsRelatorioPostoMedidaDataAuto.POSTO_ID ) )
+ {
+ return posto_id;
+ }
+ else if( fieldName.equals( HsRelatorioPostoMedidaDataAuto.MEDIDA_ID ) )
+ {
+ return medida_id;
+ }
+ else if( fieldName.equals( HsRelatorioPostoMedidaDataAuto.IS_PLANO_ACTUACAO ) )
+ {
+ return is_plano_actuacao;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsRelatorioPostoMedidaDataAuto.POSTO_ID )
+ {
+ posto_id = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioPostoMedidaDataAuto.MEDIDA_ID )
+ {
+ medida_id = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioPostoMedidaDataAuto.IS_PLANO_ACTUACAO )
+ {
+ is_plano_actuacao = ( Boolean ) value;
+ }
+ else if( fieldName.equals( HsRelatorioPostoMedidaDataAuto.POSTO_ID ) )
+ {
+ posto_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioPostoMedidaDataAuto.MEDIDA_ID ) )
+ {
+ medida_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioPostoMedidaDataAuto.IS_PLANO_ACTUACAO ) )
+ {
+ is_plano_actuacao = ( Boolean ) value;
+ }
+ }
+
+ public Integer getPosto_id()
+ {
+ return posto_id;
+ }
+
+ public void setPosto_id(Integer posto_idValue )
+ {
+ this.posto_id = posto_idValue;
+ }
+
+ public Integer getMedida_id()
+ {
+ return medida_id;
+ }
+
+ public void setMedida_id(Integer medida_idValue )
+ {
+ this.medida_id = medida_idValue;
+ }
+
+ public Boolean getIs_plano_actuacao()
+ {
+ return is_plano_actuacao;
+ }
+
+ public void setIs_plano_actuacao(Boolean is_plano_actuacaoValue )
+ {
+ this.is_plano_actuacao = is_plano_actuacaoValue;
+ }
+
+ public Class getOuterClass()
+ {
+ return HsRelatorioPostoMedidaDataAuto.class;
+ }
+
+ public HsRelatorioPostoMedidaDataAuto getOuterClassInstance()
+ {
+ HsRelatorioPostoMedidaDataAuto outerObj = new HsRelatorioPostoMedidaDataAuto();
+ outerObj.setInnerObject(this);
+ return outerObj;
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoMedidaID getJDOPrimaryKey()
+ {
+ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoMedidaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoMedidaID();
+
+ Object obj;
+ obj = this.getPosto_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.posto_id = (Integer)obj;
+
+ obj = this.getMedida_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.medida_id = (Integer)obj;
+
+ return id;
+
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedidaData.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedidaData.java
new file mode 100644
index 00000000..d9f3aa8a
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedidaData.java
@@ -0,0 +1,18 @@
+/*
+* HsRelatorioPostoMedidaDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Edit at will
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+
+public final class HsRelatorioPostoMedidaData extends com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoMedidaDataAuto
+{
+
+ public HsRelatorioPostoMedidaData()
+ {
+ super();
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedidaDataAuto.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedidaDataAuto.java
new file mode 100644
index 00000000..dc07a4a2
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedidaDataAuto.java
@@ -0,0 +1,225 @@
+/*
+* HsRelatorioPostoMedidaDataAuto.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+import java.util.HashMap;
+import java.util.Map;
+
+class HsRelatorioPostoMedidaDataAuto extends JDOObject
+{
+
+ public static final String TABLENAME = "hs_relatorio_posto_medida";
+
+ public static final String POSTO_ID = "posto_id";
+ public static final String POSTO_ID_FULL = "hs_relatorio_posto_medida.posto_id";
+ public static final String TO_POSTO_ID = "to posto_id";
+ public static final String MEDIDA_ID = "medida_id";
+ public static final String MEDIDA_ID_FULL = "hs_relatorio_posto_medida.medida_id";
+ public static final String TO_MEDIDA_ID = "to medida_id";
+ public static final String IS_PLANO_ACTUACAO = "is_plano_actuacao";
+ public static final String IS_PLANO_ACTUACAO_FULL = "hs_relatorio_posto_medida.is_plano_actuacao";
+
+ public static final String FIELD_NAMES[] = new String[]{
+ IS_PLANO_ACTUACAO, };
+
+
+ protected static final String ALL_FIELD_NAMES[] = new String[]{
+ POSTO_ID, MEDIDA_ID, IS_PLANO_ACTUACAO, };
+
+ private Map dataHash;
+
+ public HsRelatorioPostoMedidaDataAuto()
+ {
+ dataHash = new HashMap();
+ }
+
+ public Integer getPosto_id()
+ {
+ return (Integer) dataHash.get(POSTO_ID);
+ }
+
+ public void setPosto_id(Integer posto_idValue )
+ {
+ dataHash.put(TO_POSTO_ID, null);
+ dataHash.put(POSTO_ID, posto_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData toPosto_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_POSTO_ID) == null && getPosto_id() != null )
+ {
+ dataHash.put(TO_POSTO_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData.class, new Object[]{ getPosto_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData) dataHash.get(TO_POSTO_ID);
+ }
+
+ public void setToPosto_id(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData posto_idObject )
+ {
+ if( posto_idObject == null )
+ {
+ dataHash.put(POSTO_ID, null);
+ }
+ else
+ {
+ dataHash.put(POSTO_ID, posto_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData.ID ));
+ }
+ dataHash.put(TO_POSTO_ID, posto_idObject);
+ }
+
+ public Integer getMedida_id()
+ {
+ return (Integer) dataHash.get(MEDIDA_ID);
+ }
+
+ public void setMedida_id(Integer medida_idValue )
+ {
+ dataHash.put(TO_MEDIDA_ID, null);
+ dataHash.put(MEDIDA_ID, medida_idValue );
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioMedidaData toMedida_id()
+ throws Exception
+ {
+ if( dataHash.get(TO_MEDIDA_ID) == null && getMedida_id() != null )
+ {
+ dataHash.put(TO_MEDIDA_ID, getJDOProvider().load(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioMedidaData.class, new Object[]{ getMedida_id() }, new String[]{ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioMedidaData.ID }));
+ }
+ return (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioMedidaData) dataHash.get(TO_MEDIDA_ID);
+ }
+
+ public void setToMedida_id(com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioMedidaData medida_idObject )
+ {
+ if( medida_idObject == null )
+ {
+ dataHash.put(MEDIDA_ID, null);
+ }
+ else
+ {
+ dataHash.put(MEDIDA_ID, medida_idObject.get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioMedidaData.ID ));
+ }
+ dataHash.put(TO_MEDIDA_ID, medida_idObject);
+ }
+
+ public Boolean getIs_plano_actuacao()
+ {
+ return (Boolean) get(IS_PLANO_ACTUACAO);
+ }
+
+ public void setIs_plano_actuacao(Boolean is_plano_actuacaoValue )
+ {
+ this.set(IS_PLANO_ACTUACAO, is_plano_actuacaoValue );
+ }
+
+ protected Object innerGet( String fieldName )
+ throws Exception
+ {
+ Object value = null;
+ if( TO_POSTO_ID.equals( fieldName ) )
+ {
+ value = toPosto_id();
+ }
+ else if( POSTO_ID.equals( fieldName ) )
+ {
+ value = getPosto_id();
+ }
+ else if( MEDIDA_ID.equals( fieldName ) )
+ {
+ value = getMedida_id();
+ }
+ else if( TO_MEDIDA_ID.equals( fieldName ) )
+ {
+ value = toMedida_id();
+ }
+ else
+ {
+ value = dataHash.get( fieldName );
+ }
+ return value;
+ }
+
+ protected void innerSet( String fieldName, Object value )
+ throws Exception
+ {
+ if( TO_POSTO_ID.equals( fieldName ) )
+ {
+ setToPosto_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData) value );
+ }
+ else if( POSTO_ID.equals( fieldName ) )
+ {
+ setPosto_id( (Integer) value );
+ }
+ else if( MEDIDA_ID.equals( fieldName ) )
+ {
+ setMedida_id( (Integer) value );
+ }
+ else if( TO_MEDIDA_ID.equals( fieldName ) )
+ {
+ setToMedida_id( (com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioMedidaData) value );
+ }
+ else
+ {
+ dataHash.put( fieldName, value );
+ }
+ }
+
+ public void save()
+ throws Exception
+ {
+ if( dataHash.get(TO_POSTO_ID) != null )
+ {
+ toPosto_id().save();
+ dataHash.put(POSTO_ID, toPosto_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoData.ID ));
+ }
+
+ if( dataHash.get(TO_MEDIDA_ID) != null )
+ {
+ toMedida_id().save();
+ dataHash.put(MEDIDA_ID, toMedida_id().get( com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioMedidaData.ID ));
+ }
+
+ super.save();
+ }
+
+ public String []getFieldNames()
+ {
+ return FIELD_NAMES;
+ }
+
+ protected String []getAllFieldNames()
+ {
+ return ALL_FIELD_NAMES;
+ }
+
+ public Class getInnerClass()
+ {
+ return HsRelatorioPostoMedida.class;
+ }
+
+ public com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoMedidaID getJDOPrimaryKey()
+ {
+ com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoMedidaID id = new com.evolute.siprp.server.db.data.siprp_local3.HsRelatorioPostoMedidaID();
+
+ Object obj;
+ obj = this.getPosto_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.posto_id = (Integer)obj;
+
+ obj = this.getMedida_id();
+ if(obj instanceof JDOObject){
+ obj = ((JDOObject) obj).getInnerObject();
+ }
+ id.medida_id = (Integer)obj;
+
+ return id;
+
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedidaID.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedidaID.java
new file mode 100644
index 00000000..e1987682
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoMedidaID.java
@@ -0,0 +1,37 @@
+/*
+* HsRelatorioPostoMedidaID.java
+*
+* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import java.io.*;
+
+import com.evolute.utils.jdo.jpox.JDOIDClass;
+
+public final class HsRelatorioPostoMedidaID extends JDOIDClass implements Serializable
+{
+ public Integer posto_id;
+ public Integer medida_id;
+
+ public HsRelatorioPostoMedidaID()
+ {
+ }
+
+
+ public Object[] getValue()
+ {
+ Object value[] = new Object[ 2 ];
+ value[ 0 ] = posto_id;
+ value[ 1 ] = medida_id;
+ return value;
+ }
+
+ public void setValues( Object values[] )
+ {
+ posto_id = (Integer) values[ 0 ];
+ medida_id = (Integer) values[ 1 ];
+ }
+}
diff --git a/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoRisco.java b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoRisco.java
new file mode 100644
index 00000000..ea04abe0
--- /dev/null
+++ b/branches/SIPRP/GestaoSHST/src/com/evolute/siprp/server/db/data/siprp_local3/HsRelatorioPostoRisco.java
@@ -0,0 +1,222 @@
+/*
+* HsRelatorioPostoRisco.java
+*
+* Generated by com.evutils.codegen.JDOObjectGenerator
+*
+* Use but DON'T TOUCH
+*/
+package com.evolute.siprp.server.db.data.siprp_local3;
+
+import com.evolute.utils.jdo.*;
+
+public final class HsRelatorioPostoRisco implements JDOInnerObject
+{
+ private Integer posto_id;
+ private Integer risco_id;
+ private Integer probabilidade;
+ private Integer severidade;
+ private Integer valor_qualitativo_id;
+ private Integer ordem;
+
+ public HsRelatorioPostoRisco()
+ {
+ }
+
+ public Object getField( String fieldName )
+ {
+ if( fieldName == HsRelatorioPostoRiscoDataAuto.POSTO_ID )
+ {
+ return posto_id;
+ }
+ else if( fieldName == HsRelatorioPostoRiscoDataAuto.RISCO_ID )
+ {
+ return risco_id;
+ }
+ else if( fieldName == HsRelatorioPostoRiscoDataAuto.PROBABILIDADE )
+ {
+ return probabilidade;
+ }
+ else if( fieldName == HsRelatorioPostoRiscoDataAuto.SEVERIDADE )
+ {
+ return severidade;
+ }
+ else if( fieldName == HsRelatorioPostoRiscoDataAuto.VALOR_QUALITATIVO_ID )
+ {
+ return valor_qualitativo_id;
+ }
+ else if( fieldName == HsRelatorioPostoRiscoDataAuto.ORDEM )
+ {
+ return ordem;
+ }
+ else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.POSTO_ID ) )
+ {
+ return posto_id;
+ }
+ else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.RISCO_ID ) )
+ {
+ return risco_id;
+ }
+ else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.PROBABILIDADE ) )
+ {
+ return probabilidade;
+ }
+ else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.SEVERIDADE ) )
+ {
+ return severidade;
+ }
+ else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.VALOR_QUALITATIVO_ID ) )
+ {
+ return valor_qualitativo_id;
+ }
+ else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.ORDEM ) )
+ {
+ return ordem;
+ }
+ return null;
+ }
+
+ public void setField( String fieldName, Object value )
+ {
+ if( fieldName == HsRelatorioPostoRiscoDataAuto.POSTO_ID )
+ {
+ posto_id = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioPostoRiscoDataAuto.RISCO_ID )
+ {
+ risco_id = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioPostoRiscoDataAuto.PROBABILIDADE )
+ {
+ probabilidade = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioPostoRiscoDataAuto.SEVERIDADE )
+ {
+ severidade = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioPostoRiscoDataAuto.VALOR_QUALITATIVO_ID )
+ {
+ valor_qualitativo_id = ( Integer ) value;
+ }
+ else if( fieldName == HsRelatorioPostoRiscoDataAuto.ORDEM )
+ {
+ ordem = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.POSTO_ID ) )
+ {
+ posto_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.RISCO_ID ) )
+ {
+ risco_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.PROBABILIDADE ) )
+ {
+ probabilidade = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.SEVERIDADE ) )
+ {
+ severidade = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.VALOR_QUALITATIVO_ID ) )
+ {
+ valor_qualitativo_id = ( Integer ) value;
+ }
+ else if( fieldName.equals( HsRelatorioPostoRiscoDataAuto.ORDEM ) )
+ {
+ ordem = ( Integer ) value;
+ }
+ }
+
+ public Integer getPosto_id()
+ {
+ return posto_id;
+ }
+
+ public void setPosto_id(Integer posto_idValue )
+ {
+ this.posto_id = posto_idValue;
+ }
+
+ public Integer getRisco_id()
+ {
+ return risco_id;
+ }
+
+ public void setRisco_id(Integer risco_idValue )
+ {
+ this.risco_id = risco_idValue;
+ }
+
+ public Integer getProbabilidade()
+ {
+ return probabilidade;
+ }
+
+ public void setProbabilidade(Integer probabilidadeValue )
+ {
+ this.probabilidade = probabilidadeValue;
+ }
+
+ public Integer getSeveridade()
+ {
+ return severidade;
+ }
+
+ public void setSeveridade(Integer severidadeValue )
+ {
+ this.severidade = severidadeValue;
+ }
+
+ public Integer getValor_qualitativo_id()
+ {
+ return valor_qualitativo_id;
+ }
+
+ public void setValor_qualitativo_id(Integer valor_qualitativo_idValue )
+ {
+ this.valor_qualitativo_id = valor_qualitativo_idValue;
+ }
+
+ public Integer getOrdem()
+ {
+ return ordem;
+ }
+
+ public void setOrdem(Integer ordemValue )
+ {
+ this.ordem = ordemValue;
+ }
+
+ public Class