/* * SessionBean1.java * * Created on September 18, 2007, 3:14 PM * Copyright lluis */ package analiseacidentestrabalho; import beans.Medico; import beans.Utilizador; import beans.Acidentado; import beans.AnaliseAcidente; import com.sun.rave.web.ui.appbase.AbstractSessionBean; import global.Global; 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 = ""; private Boolean canAccessEstatisticas = false; public Boolean getCanAccessEstatisticas() { return canAccessEstatisticas; } public void setCanAccessEstatisticas(Boolean canAccessEstatisticas) { this.canAccessEstatisticas = canAccessEstatisticas; } /** *

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); setCanAccessEstatisticas( false ); } /** *

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; setCanAccessEstatisticas( currentUser != null && currentUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP ); } 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 beans.Correcao correcao; public beans.Correcao getCorrecao() { return correcao; } public void setCorrecao(beans.Correcao correcao) { this.correcao = correcao; } public String getLogoEmpresaUrl() { return logoEmpresaUrl; } public void setLogoEmpresaUrl(String logoEmpresaUrl) { this.logoEmpresaUrl = logoEmpresaUrl; } }