git-svn-id: https://svn.coded.pt/svn/SIPRP@1798 bb69d46d-e84e-40c8-a05a-06db0d633741

lxbfYeaa
Frederico Palma 12 years ago
parent 937359bf33
commit 9f98dc988e

@ -72,10 +72,5 @@
<attribute name="owner.project.facets" value="jst.web"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/Java SE 6 (MacOS X Default)">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="bin"/>
</classpath>

@ -1,329 +0,0 @@
/*
* Acesso.java
*
* Created on Oct 15, 2008, 9:49:21 AM
*/
package analiseacidentestrabalho;
import beans.Utilizador;
import com.evolute.utils.error.ErrorLogger;
import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.DropDown;
import com.sun.rave.web.ui.component.StaticText;
import db.providers.AnalisesDataProvider;
import db.providers.UtilizadoresDataProvider;
import global.Global;
import javax.faces.FacesException;
import javax.faces.component.html.HtmlPanelGrid;
import javax.faces.context.FacesContext;
import utils.JSFUtils;
import utils.Utils;
/**
* <p>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.</p>
*
* @author lluis
*/
public class Acesso extends AbstractPageBean
{
// <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
/**
* <p>Automatically managed component initialization. <strong>WARNING:</strong>
* This method is automatically generated, so any user-specified code inserted
* here is subject to being replaced.</p>
*/
private void _init() throws Exception
{
}
private StaticText stWelcome = new StaticText();
public StaticText getStWelcome()
{
return stWelcome;
}
public void setStWelcome(StaticText st)
{
this.stWelcome = st;
}
private DropDown drpEstabelecimentos = new DropDown();
public DropDown getDrpEstabelecimentos()
{
return drpEstabelecimentos;
}
public void setDrpEstabelecimentos(DropDown dd)
{
this.drpEstabelecimentos = dd;
}
private HtmlPanelGrid gridEstabelecimento = new HtmlPanelGrid();
public HtmlPanelGrid getGridEstabelecimento()
{
return gridEstabelecimento;
}
public void setGridEstabelecimento(HtmlPanelGrid hpg)
{
this.gridEstabelecimento = hpg;
}
// </editor-fold>
/**
* <p>Construct a new Page bean instance.</p>
*/
public Acesso()
{
}
/**
* <p>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.</p>
*
* <p>Note that, if the current request is a postback, the property
* values of the components do <strong>not</strong> represent any
* values submitted with this request. Instead, they represent the
* property values that were saved for this view when it was rendered.</p>
*/
@Override
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
// <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
// Initialize automatically managed components
// *Note* - this logic should NOT be modified
try
{
_init();
}
catch ( Exception e )
{
log("Acesso Initialization Failure", e);
throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
}
// </editor-fold>
// Perform application initialization that must complete
// *after* managed components are initialized
// TODO - add your own initialization code here
}
/**
* <p>Callback method that is called after the component tree has been
* restored, but before any event processing takes place. This method
* will <strong>only</strong> 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.</p>
*/
@Override
public void preprocess()
{
}
/**
* <p>Callback method that is called just before rendering takes place.
* This method will <strong>only</strong> 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.</p>
*/
@Override
public void prerender()
{
Utilizador u = getSessionBean1().getCurrentUser();
String nomeHtml = Utils.unicodeToHTML( u.getNome() );
stWelcome.setText("Bem vindo(a) " + nomeHtml);
if ( u.getTipo().intValue() == Global.TIPO_UTILIZADOR_GESTOR )
{
initializeEstabelecimentos();
}
else
{
gridEstabelecimento.setRendered( false );
}
}
/**
* <p>Callback method that is called after rendering is completed for
* this request, if <code>init()</code> was called (regardless of whether
* or not this was the page that was actually rendered). Customize this
* method to release resources acquired in the <code>init()</code>,
* <code>preprocess()</code>, or <code>prerender()</code> methods (or
* acquired during execution of an event handler).</p>
*
*/
@Override
public void destroy()
{
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected SessionBean1 getSessionBean1()
{
return ( SessionBean1 ) getBean("SessionBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected RequestBean1 getRequestBean1()
{
return ( RequestBean1 ) getBean("RequestBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
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
return null;
}
public String lnkAjuda_action() {
// TODO: Replace with your code
return null;
}
public String lnkLogout_action()
{
FacesContext fc = getFacesContext();
try
{
JSFUtils.logout( fc, false );
}
catch ( Exception ex )
{
ErrorLogger.logException( ex );
}
return "login";
}
public String lnkAnalises_action()
{
String page = "gestor";
Utilizador u = getSessionBean1().getCurrentUser();
try
{
UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance();
Integer permissao = udp.getPermissionCode( u.getId() );
if ( permissao != null )
{
switch ( permissao.intValue() )
{
case 1: //seguranca
page = "form_seguranca";
break;
case 2: //rh
page = "form_rh";
break;
case 3: //hs
page = "form_hs";
break;
case 6: //gestor
Integer estabelecimento = null;
if(u.getTipo().intValue() == Global.TIPO_UTILIZADOR_GESTOR)
{
estabelecimento = (Integer) drpEstabelecimentos.getSelected();
u.setEstabelecimento_gestor( estabelecimento );
}
page = "form_gestor";
break;
case 7: //dir ger rh
page = "form_dir_ger_rh";
break;
case 8: //dir_siprp
page = "form_dir_siprp";
break;
default:
page = "gestor";
break;
}
}
}
catch ( Exception ex )
{
ErrorLogger.logException( ex );
page = "gestor";
}
return page;
}
public String lnkPlanos_action()
{
Utilizador u = getSessionBean1().getCurrentUser();
FacesContext fc = getFacesContext().getCurrentInstance();
Integer estabelecimento = null;
if ( u.getTipo().intValue() == Global.TIPO_UTILIZADOR_GESTOR )
{
estabelecimento = ( Integer ) drpEstabelecimentos.getSelected();
u.setEstabelecimento_gestor( estabelecimento );
}
Global.redirectToPlanos( fc, u );
return null;
}
private void initializeEstabelecimentos()
{
try
{
AnalisesDataProvider adp = AnalisesDataProvider.getInstance();
com.sun.rave.web.ui.model.Option[] listGestorOptions = adp.getEstabelecimentosGestorList( getSessionBean1().getCurrentUser().getEmpresa_id(), new Boolean( true ) );
getSessionBean1().setEstabelecimentosGestorOptions( listGestorOptions );
drpEstabelecimentos.setSelected( new Integer( 0 ) );
}
catch ( Exception ex )
{
ErrorLogger.logException( ex );
}
}
}

@ -1,100 +0,0 @@
/*
* 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;
/**
* <p>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.</p>
*
* <p>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.</p>
*/
public class ApplicationBean1 extends AbstractApplicationBean {
// <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
private int __placeholder;
/**
* <p>Automatically managed component initialization. <strong>WARNING:</strong>
* This method is automatically generated, so any user-specified code inserted
* here is subject to being replaced.</p>
*/
private void _init() throws Exception {
}
// </editor-fold>
/**
* <p>Construct a new application data bean instance.</p>
*/
public ApplicationBean1() {
}
/**
* <p>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.</p>
*
* <p>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.</p>
*/
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
// <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
// 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);
}
// </editor-fold>
// Perform application initialization that must complete
// *after* managed components are initialized
// TODO - add your own initialization code here
}
/**
* <p>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.</p>
*
* <p>You may customize this method to clean up resources allocated
* during the execution of the <code>init()</code> method, or
* at any later time during the lifetime of the application.</p>
*/
public void destroy() {
}
/**
* <p>Return an appropriate character encoding based on the
* <code>Locale</code> defined for the current JavaServer Faces
* view. If no more suitable encoding can be found, return
* "UTF-8" as a general purpose default.</p>
*
* <p>The default implementation uses the implementation from
* our superclass, <code>AbstractApplicationBean</code>.</p>
*/
public String getLocaleCharacterEncoding() {
return super.getLocaleCharacterEncoding();
}
}

@ -1,312 +0,0 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package analiseacidentestrabalho;
import beans.AnaliseAcidente;
import beans.Utilizador;
import com.evolute.utils.error.ErrorLogger;
import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.Hyperlink;
import com.sun.rave.web.ui.component.StaticText;
import com.sun.rave.web.ui.component.TextArea;
import db.providers.AnalisesDataProvider;
import global.Global;
import java.util.Date;
import javax.faces.FacesException;
import javax.faces.context.FacesContext;
import utils.Utils;
/**
* <p>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.</p>
*
* @version ConfirmarDesactivar.java
* @version Created on Oct 11, 2010, 3:38:04 PM
* @author dneves
*/
public class ConfirmarDesactivar extends AbstractPageBean
{
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 StaticText txtMsg = new StaticText();
public StaticText getTxtMsg()
{
return txtMsg;
}
public void setTxtMsg( StaticText st )
{
this.txtMsg = st;
}
private StaticText textAnalise = new StaticText();
public StaticText getTextAnalise()
{
return textAnalise;
}
public void setTextAnalise( StaticText textAnalise )
{
this.textAnalise = textAnalise;
}
private TextArea textComentario = new TextArea();
public TextArea getTextComentario()
{
return textComentario;
}
public void setTextComentario( TextArea textComentario )
{
this.textComentario = textComentario;
}
private void _init() throws Exception
{
}
public ConfirmarDesactivar()
{
}
@Override
public void init()
{
super.init();
try
{
_init();
}
catch ( Exception e )
{
log( "ConfirmarDesactivar Initialization Failure", e );
throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
}
if ( ! canAccess() )
{
try
{
getExternalContext().redirect( "Login.jsp" );
}
catch( Exception e )
{
ErrorLogger.logException( e );
}
}
}
/**
* <p>Callback method that is called after the component tree has been
* restored, but before any event processing takes place. This method
* will <strong>only</strong> 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.</p>
*/
@Override
public void preprocess()
{
txtMsg.setText( getSessionBean1().getMsg() );
getSessionBean1().setMsg( "" );
}
/**
* <p>Callback method that is called just before rendering takes place.
* This method will <strong>only</strong> 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.</p>
*/
@Override
public void prerender()
{
System.out.println( "\n=== CONFIRMAR_DESACTIVACAO ===" );
lblUser.setText( getSessionBean1().getCurrentUser().getLogin() );
AnaliseAcidente analise = getSessionBean1().getCurrentAnalise();
if ( analise != null )
{
textAnalise.setText( "Análise nº " + analise.getAnalise_nr() );
System.out.println( "\nConfirmarDesactivar . prerender() : " +
"AnaliseID = " + analise.getId() +
" ; AnaliseNr = " + analise.getAnalise_nr() +
" ; AnaliseEstado = " + analise.getEstado() );
}
else
{
textAnalise.setText( "Análise inválida." );
System.out.println( "\nConfirmarDesactivar . prerender() : Analise = null !" );
}
}
/**
* <p>Callback method that is called after rendering is completed for
* this request, if <code>init()</code> was called (regardless of whether
* or not this was the page that was actually rendered). Customize this
* method to release resources acquired in the <code>init()</code>,
* <code>preprocess()</code>, or <code>prerender()</code> methods (or
* acquired during execution of an event handler).</p>
*/
@Override
public void destroy()
{
}
/**
* <p>Return a reference to the scoped data bean.</p>
*
* @return reference to the scoped data bean
*/
protected SessionBean1 getSessionBean1()
{
return ( SessionBean1 ) getBean( "SessionBean1" );
}
/**
* <p>Return a reference to the scoped data bean.</p>
*
* @return reference to the scoped data bean
*/
protected RequestBean1 getRequestBean1()
{
return ( RequestBean1 ) getBean( "RequestBean1" );
}
/**
* <p>Return a reference to the scoped data bean.</p>
*
* @return reference to the scoped data bean
*/
protected ApplicationBean1 getApplicationBean1()
{
return ( ApplicationBean1 ) getBean( "ApplicationBean1" );
}
private boolean canAccess()
{
boolean canAccess = false;
if ( getSessionBean1().isLoggedIn() )
{
Utilizador u = getSessionBean1().getCurrentUser();
if ( u != null && u.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP )
{
canAccess = true;
}
}
return canAccess;
}
public String lnkPlanosActuacao_action()
{
Utilizador u = getSessionBean1().getCurrentUser();
FacesContext fc = getFacesContext().getCurrentInstance();
Global.redirectToPlanos(fc, u);
return null;
}
public String lnkNewUser_action()
{
getSessionBean1().setNavFrom( "EstatisticasProcesso" );
return "gestao_utilizadores";
}
public String lnkEditUser_action()
{
getSessionBean1().setNavFrom( "EstatisticasProcesso" );
getSessionBean1().setModoEdicaoUtilizador( "edit" );
return "user";
}
public String lnkLogout_action()
{
Utils.doLogout( getExternalContext(), true );
return null;
}
public String buttonCancelar_action()
{
getSessionBean1().setCurrentAnalise( null );
return "formDirSiprp";
}
public String buttonConfirmar_action()
{
Utilizador currentUser = getSessionBean1().getCurrentUser();
AnaliseAcidente analise = getSessionBean1().getCurrentAnalise();
if ( userCanDesactivarAnalise( currentUser ) && analise != null )
{
try
{
String comentario = null;
if ( textComentario.getText() != null )
{
comentario = ( ( String ) textComentario.getText() ).trim();
comentario = "".equals( comentario ) ? null : comentario;
comentario = comentario != null ? comentario.replaceAll( "\n", "<br/>" ) : null;
}
analise.setEstado( Global.ESTADO_CONCLUIDO );
analise.setConcluido_por_desactivacao( Boolean.TRUE );
analise.setData_desactivacao( new Date() );
analise.setComentario_desactivacao( comentario );
AnalisesDataProvider adp = AnalisesDataProvider.getInstance();
adp.updateAnalise( analise );
}
catch ( Exception e )
{
ErrorLogger.logException( e );
getSessionBean1().setMsg( "Erro a desactivar análise.\n" + e.getMessage() );
}
}
return "formDirSiprp";
}
private boolean userCanDesactivarAnalise( Utilizador user )
{
boolean canDesactivar = false;
if ( user != null )
{
int userType = user.getTipo() == null ? -1 : user.getTipo().intValue();
canDesactivar = userType == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP;
}
return canDesactivar;
}
}

@ -1,401 +0,0 @@
/*
* 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.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.Link;
import com.sun.rave.web.ui.component.Page;
import com.sun.rave.web.ui.model.SingleSelectOptionsList;
import javax.faces.FacesException;
import javax.faces.event.ActionEvent;
import javax.faces.event.ValueChangeEvent;
import utils.Utils;
/**
* <p>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.</p>
*/
public class Dummy extends AbstractPageBean {
// <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
private int __placeholder;
/**
* <p>Automatically managed component initialization. <strong>WARNING:</strong>
* This method is automatically generated, so any user-specified code inserted
* here is subject to being replaced.</p>
*/
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;
}
// </editor-fold>
/**
* <p>Construct a new Page bean instance.</p>
*/
public Dummy() {
}
/**
* <p>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.</p>
*
* <p>Note that, if the current request is a postback, the property
* values of the components do <strong>not</strong> represent any
* values submitted with this request. Instead, they represent the
* property values that were saved for this view when it was rendered.</p>
*/
public void init() {
// Perform initializations inherited from our superclass
super.init();
// Perform application initialization that must complete
// *before* managed components are initialized
// <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
// 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);
}
// </editor-fold>
// Perform application initialization that must complete
// *after* managed components are initialized
}
/**
* <p>Callback method that is called after the component tree has been
* restored, but before any event processing takes place. This method
* will <strong>only</strong> 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.</p>
*/
public void preprocess() {
}
/**
* <p>Callback method that is called just before rendering takes place.
* This method will <strong>only</strong> 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.</p>
*/
public void prerender() {
//txtIn.setText("OLA");
}
/**
* <p>Callback method that is called after rendering is completed for
* this request, if <code>init()</code> was called (regardless of whether
* or not this was the page that was actually rendered). Customize this
* method to release resources acquired in the <code>init()</code>,
* <code>preprocess()</code>, or <code>prerender()</code> methods (or
* acquired during execution of an event handler).</p>
*/
public void destroy() {
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected RequestBean1 getRequestBean1() {
return (RequestBean1)getBean("RequestBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected SessionBean1 getSessionBean1() {
return (SessionBean1)getBean("SessionBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected ApplicationBean1 getApplicationBean1()
{
return (ApplicationBean1)getBean("ApplicationBean1");
}
public String butCancelar_action()
{
return null;
}
public String butGravar_action()
{
return null;
}
public String butEnviar_action()
{
return null;
}
public String butImagem_action()
{
return null;
}
public String lnkMoreMed1_action()
{
return null;
}
public String lnkNome_action()
{
return null;
}
public String lnkDataNascimento_action()
{
return null;
}
public String lnkEditUser_action()
{
return null;
}
public String lnkLogout_action()
{
Utils.doLogout( getExternalContext(), false );
return null;
}
public String butProcurarTrab_action()
{
return null;
}
public String lnkPOR_action()
{
return null;
}
public String lnkNomeTrabalhador_action()
{
return null;
}
public String lnkEstabelecimentoTrabalhador_action()
{
return null;
}
public void drpTipo_processValueChange(ValueChangeEvent event)
{
}
public void drpNome_processValueChange(ValueChangeEvent event)
{
}
public String hyperlink1_action()
{
return null;
}
public void lnk_actionListener(ActionEvent e)
{
System.out.println("LINK");
}
// public String lnkAjuda_action()
// {
// 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()
{
return null;
}
public String butEliminar_action()
{
return null;
}
public String lnkPlanosActuacao_action()
{
return null;
}
public String lnkAnalisesAcidente_action()
{
return null;
}
public String lnkNewUser_action()
{
return null;
}
public String lnkAjuda_action()
{
return null;
}
public String lnkGerirUtilizadores_action()
{
return null;
}
public String lnkAnalises_action()
{
return null;
}
public String lnkPlanos_action()
{
return null;
}
}

@ -1,24 +0,0 @@
/*
* 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;
import beans.Utilizador;
/**
*
* @author lluis
*/
public class EditUser extends Utilizador{
/** Creates a new instance of EditUser */
public EditUser() {
}
}

@ -1,753 +0,0 @@
/*
* EnviarCorrecao.java
*
* Created on November 28, 2007, 5:27 PM
* Copyright lluis
*/
package analiseacidentestrabalho;
import beans.Correcao;
import com.evolute.utils.error.ErrorLogger;
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.providers.AnalisesDataProvider;
import db.providers.EstadosCorrecaoDataProvider;
import global.Global;
import java.util.ArrayList;
import javax.faces.FacesException;
import javax.faces.component.html.HtmlPanelGrid;
import javax.faces.event.ValueChangeEvent;
import utils.Utils;
/**
* <p>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.</p>
*/
public class EnviarCorrecao extends AbstractPageBean {
// <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
private int __placeholder;
/**
* <p>Automatically managed component initialization. <strong>WARNING:</strong>
* This method is automatically generated, so any user-specified code inserted
* here is subject to being replaced.</p>
*/
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;
}
// </editor-fold>
/**
* <p>Construct a new Page bean instance.</p>
*/
public EnviarCorrecao() {
}
/**
* <p>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.</p>
*
* <p>Note that, if the current request is a postback, the property
* values of the components do <strong>not</strong> represent any
* values submitted with this request. Instead, they represent the
* property values that were saved for this view when it was rendered.</p>
*/
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
// <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
// 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);
}
// </editor-fold>
// Perform application initialization that must complete
// *after* managed components are initialized
// TODO - add your own initialization code here
}
/**
* <p>Callback method that is called after the component tree has been
* restored, but before any event processing takes place. This method
* will <strong>only</strong> 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.</p>
*/
public void preprocess() {
}
/**
* <p>Callback method that is called just before rendering takes place.
* This method will <strong>only</strong> 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.</p>
*/
public void prerender() {
lblUser.setText( getSessionBean1().getCurrentUser().getLogin());
fillTabelaEstados();
txtMsg.setText(getSessionBean1().getMsg());
getSessionBean1().setMsg("");
}
/**
* <p>Callback method that is called after rendering is completed for
* this request, if <code>init()</code> was called (regardless of whether
* or not this was the page that was actually rendered). Customize this
* method to release resources acquired in the <code>init()</code>,
* <code>preprocess()</code>, or <code>prerender()</code> methods (or
* acquired during execution of an event handler).</p>
*/
public void destroy() {
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected SessionBean1 getSessionBean1() {
return (SessionBean1)getBean("SessionBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected RequestBean1 getRequestBean1() {
return (RequestBean1)getBean("RequestBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected ApplicationBean1 getApplicationBean1() {
return (ApplicationBean1)getBean("ApplicationBean1");
}
public String lnkEditUser_action() {
// TODO: Replace with your code
return null;
}
public String lnkLogout_action()
{
Utils.doLogout( getExternalContext(), true );
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)
// {
// ErrorLogger.logException( ex );
// }
// 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)
// {
// ErrorLogger.logException( ex );
// }
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);
}
try
{
AnalisesDataProvider adp = AnalisesDataProvider.getInstance();
adp.changeEstado( c );
}
catch ( Exception ex )
{
ErrorLogger.logException( ex );
}
return "form_hs";
}
else
{
getSessionBean1().setMsg("Tem de indicar para onde enviar a correc&ccedil;&atilde;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;
}
}

@ -1,239 +0,0 @@
/*
* 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;
/**
* <p>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.</p>
*/
public class Erro extends AbstractPageBean {
// <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
private int __placeholder;
/**
* <p>Automatically managed component initialization. <strong>WARNING:</strong>
* This method is automatically generated, so any user-specified code inserted
* here is subject to being replaced.</p>
*/
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;
}
// </editor-fold>
/**
* <p>Construct a new Page bean instance.</p>
*/
public Erro() {
}
/**
* <p>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.</p>
*
* <p>Note that, if the current request is a postback, the property
* values of the components do <strong>not</strong> represent any
* values submitted with this request. Instead, they represent the
* property values that were saved for this view when it was rendered.</p>
*/
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
// <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
// 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);
}
// </editor-fold>
// Perform application initialization that must complete
// *after* managed components are initialized
// TODO - add your own initialization code here
}
/**
* <p>Callback method that is called after the component tree has been
* restored, but before any event processing takes place. This method
* will <strong>only</strong> 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.</p>
*/
public void preprocess() {
}
/**
* <p>Callback method that is called just before rendering takes place.
* This method will <strong>only</strong> 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.</p>
*/
public void prerender() {
txtMsg.setText( getSessionBean1().getMsg() );
getSessionBean1().setMsg("");
System.out.println("ERROR PAGE");
}
/**
* <p>Callback method that is called after rendering is completed for
* this request, if <code>init()</code> was called (regardless of whether
* or not this was the page that was actually rendered). Customize this
* method to release resources acquired in the <code>init()</code>,
* <code>preprocess()</code>, or <code>prerender()</code> methods (or
* acquired during execution of an event handler).</p>
*/
public void destroy() {
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected ApplicationBean1 getApplicationBean1() {
return (ApplicationBean1)getBean("ApplicationBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected RequestBean1 getRequestBean1() {
return (RequestBean1)getBean("RequestBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected SessionBean1 getSessionBean1() {
return (SessionBean1)getBean("SessionBean1");
}
}

@ -1,152 +0,0 @@
/*
* 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;
/**
* <p>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.</p>
*/
public class Footer extends AbstractFragmentBean {
// <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
private int __placeholder;
/**
* <p>Automatically managed component initialization. <strong>WARNING:</strong>
* This method is automatically generated, so any user-specified code inserted
* here is subject to being replaced.</p>
*/
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;
}
// </editor-fold>
public Footer() {
}
/**
* <p>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.</p>
*
* <p>The default implementation does nothing.</p>
*/
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
// <editor-fold defaultstate="collapsed" desc="Visual-Web-managed Component Initialization">
// 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);
}
// </editor-fold>
// Perform application initialization that must complete
// *after* managed components are initialized
// TODO - add your own initialization code here
}
/**
* <p>Callback method that is called after rendering is completed for
* this request, if <code>init()</code> was called. Override this
* method to release resources acquired in the <code>init()</code>
* resources that will be needed for event handlers and lifecycle methods.</p>
*
* <p>The default implementation does nothing.</p>
*/
public void destroy() {
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected RequestBean1 getRequestBean1() {
return (RequestBean1)getBean("RequestBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected SessionBean1 getSessionBean1() {
return (SessionBean1)getBean("SessionBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected ApplicationBean1 getApplicationBean1() {
return (ApplicationBean1)getBean("ApplicationBean1");
}
}

@ -1,136 +0,0 @@
/*
* Header.java
*
* Created on September 19, 2007, 10:14 AM
* Copyright lluis
*/
package analiseacidentestrabalho;
import com.sun.rave.web.ui.appbase.AbstractFragmentBean;
import javax.faces.FacesException;
import utils.Utils;
/**
* <p>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.</p>
*/
public class Header extends AbstractFragmentBean
{
// <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
private int __placeholder;
/**
* <p>Automatically managed component initialization. <strong>WARNING:</strong>
* This method is automatically generated, so any user-specified code inserted
* here is subject to being replaced.</p>
*/
private void _init() throws Exception {
}
// </editor-fold>
public Header()
{
}
/**
* <p>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.</p>
*
* <p>The default implementation does nothing.</p>
*/
@Override
public void init()
{
// Perform initializations inherited from our superclass
super.init();
// Perform application initialization that must complete
// *before* managed components are initialized
// <editor-fold defaultstate="collapsed" desc="Visual-Web-managed Component Initialization">
// 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);
}
// </editor-fold>
// Perform application initialization that must complete
// *after* managed components are initialized
}
/**
* <p>Callback method that is called after rendering is completed for
* this request, if <code>init()</code> was called. Override this
* method to release resources acquired in the <code>init()</code>
* resources that will be needed for event handlers and lifecycle methods.</p>
*
* <p>The default implementation does nothing.</p>
*/
@Override
public void destroy()
{
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected RequestBean1 getRequestBean1() {
return (RequestBean1)getBean("RequestBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected SessionBean1 getSessionBean1() {
return (SessionBean1)getBean("SessionBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected ApplicationBean1 getApplicationBean1() {
return (ApplicationBean1)getBean("ApplicationBean1");
}
public String lnkAnalisesAcidente_action()
{
return null;
}
public String lnkPlanosActuacao_action()
{
return null;
}
public String lnkNewUser_action()
{
return null;
}
public String lnkEditUser_action()
{
return null;
}
public String lnkAjuda_action()
{
return null;
}
public String lnkLogout_action()
{
Utils.doLogout( getExternalContext(), false );
return null;
}
}

@ -1,478 +0,0 @@
/*
* LoadImage.java
*
* Created on September 26, 2007, 5:36 PM
* Copyright lluis
*/
package analiseacidentestrabalho;
import com.evolute.utils.error.ErrorLogger;
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;
import utils.Utils;
/**
* <p>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.</p>
*/
public class LoadImage extends AbstractPageBean {
// <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
private int __placeholder;
/**
* <p>Automatically managed component initialization. <strong>WARNING:</strong>
* This method is automatically generated, so any user-specified code inserted
* here is subject to being replaced.</p>
*/
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;
}
// </editor-fold>
/**
* <p>Construct a new Page bean instance.</p>
*/
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() {
}
/**
* <p>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.</p>
*
* <p>Note that, if the current request is a postback, the property
* values of the components do <strong>not</strong> represent any
* values submitted with this request. Instead, they represent the
* property values that were saved for this view when it was rendered.</p>
*/
@Override
public void init()
{
// Perform initializations inherited from our superclass
super.init();
// Perform application initialization that must complete
// *before* managed components are initialized
// <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
// 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);
}
// </editor-fold>
// Perform application initialization that must complete
// *after* managed components are initialized
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)
{
ErrorLogger.logException( ex );
}
}
}
/**
* <p>Callback method that is called after the component tree has been
* restored, but before any event processing takes place. This method
* will <strong>only</strong> 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.</p>
*/
@Override
public void preprocess()
{
}
/**
* <p>Callback method that is called just before rendering takes place.
* This method will <strong>only</strong> 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.</p>
*/
@Override
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("");
}
/**
* <p>Callback method that is called after rendering is completed for
* this request, if <code>init()</code> was called (regardless of whether
* or not this was the page that was actually rendered). Customize this
* method to release resources acquired in the <code>init()</code>,
* <code>preprocess()</code>, or <code>prerender()</code> methods (or
* acquired during execution of an event handler).</p>
*/
@Override
public void destroy()
{
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected RequestBean1 getRequestBean1() {
return (RequestBean1)getBean("RequestBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected ApplicationBean1 getApplicationBean1() {
return (ApplicationBean1)getBean("ApplicationBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected SessionBean1 getSessionBean1() {
return (SessionBean1)getBean("SessionBean1");
}
public String lnkLogout_action()
{
Utils.doLogout( getExternalContext(), false );
return null;
}
public String lnkNome_action()
{
return null;
}
public String lnkDataNascimento_action()
{
return null;
}
public String butCancelar_action()
{
getSessionBean1().setImageName( null );
return "analise_acidente";
}
public String butUpload_action()
{
//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) {
ErrorLogger.logException( ex );
getSessionBean1().setMsg("N&atilde;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);
}
}
}

@ -1,677 +0,0 @@
/*
* Page1.java
*
* Created on September 18, 2007, 3:14 PM
* Copyright lluis
*/
package analiseacidentestrabalho;
import beans.Utilizador;
import com.evolute.utils.error.ErrorLogger;
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.providers.AnalisesDataProvider;
import db.providers.UtilizadoresDataProvider;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.GregorianCalendar;
import javax.faces.FacesException;
import javax.faces.component.html.HtmlPanelGrid;
import utils.Utils;
/**
* <p>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.</p>
*/
public class Login extends AbstractPageBean
{
// <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
private int __placeholder;
/**
* <p>Automatically managed component initialization. <strong>WARNING:</strong>
* This method is automatically generated, so any user-specified code inserted
* here is subject to being replaced.</p>
*/
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;
}
// </editor-fold>
/**
* <p>Construct a new Page bean instance.</p>
*/
public Login()
{
// connect();
}
/**
* <p>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.</p>
*
* <p>Note that, if the current request is a postback, the property
* values of the components do <strong>not</strong> represent any
* values submitted with this request. Instead, they represent the
* property values that were saved for this view when it was rendered.</p>
*/
@Override
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
// <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
// 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);
}
// </editor-fold>
// Perform application initialization that must complete
// *after* managed components are initialized
// TODO - add your own initialization code here
}
/**
* <p>Callback method that is called after the component tree has been
* restored, but before any event processing takes place. This method
* will <strong>only</strong> 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.</p>
*/
@Override
public void preprocess()
{
}
/**
* <p>Callback method that is called just before rendering takes place.
* This method will <strong>only</strong> 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.</p>
*/
@Override
public void prerender()
{
txtMsg.setText(getSessionBean1().getMsg());
getSessionBean1().setMsg("");
}
/**
* <p>Callback method that is called after rendering is completed for
* this request, if <code>init()</code> was called (regardless of whether
* or not this was the page that was actually rendered). Customize this
* method to release resources acquired in the <code>init()</code>,
* <code>preprocess()</code>, or <code>prerender()</code> methods (or
* acquired during execution of an event handler).</p>
*/
@Override
public void destroy()
{
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected SessionBean1 getSessionBean1() {
return (SessionBean1)getBean("SessionBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected RequestBean1 getRequestBean1() {
return (RequestBean1)getBean("RequestBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected ApplicationBean1 getApplicationBean1()
{
return (ApplicationBean1)getBean("ApplicationBean1");
}
public String butLogin_action()
{
String sRet = null;
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
{
UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance();
Utilizador u = udp.getUtilizador( utilizador );
if( u != null && "y".equals( u.getActivo() ) )
{
if ( ! password.equals( u.getPassword() ) )
{
getSessionBean1().setMsg( "Palavra-chave inv&aacute;lida !" );
}
else
{
//if(u.getOwner_id().intValue() == 0 )
Utils.doLogin( getExternalContext(), u );
//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() );
sRet = "form_seguranca";
if ( permissao != null )
{
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 )
{
ErrorLogger.logException( e1 );
getSessionBean1().setMsg("N&atilde;o tem permiss&atilde;o para entrar na aplica&ccedil;&atilde;o !");
}
}
}
else
{
getSessionBean1().setMsg("Utilizador inv&aacute;lido ! ");
}
}
catch(Exception ex)
{
ErrorLogger.logException( ex );
getSessionBean1().setMsg("Utilizador inv&aacute;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()
{
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&ccedil;&atilde;o &agrave; Base de Dados");
// //***** terminate session
// try
// {
// getExternalContext().redirect("faces/Erro.jsp");
// }
// catch ( Exception e )
// {
// ErrorLogger.logException( e );
// }
// ErrorLogger.logException( ex );
// }
// }
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)
// {
// ErrorLogger.logException( ex );
// }
// try
// {
// getSessionBean1().setMedicosOptions(udp.getMedicosList());
// //drpTipo.setSelected(new Integer(0));
// }
// catch(Exception ex)
// {
// ErrorLogger.logException( ex );
// }
// AnalisesDataProvider adp = new AnalisesDataProvider();
try
{
AnalisesDataProvider adp = AnalisesDataProvider.getInstance();
getSessionBean1().setCausasOptions( adp.getCausasAcidente( false ) );
}
catch(Exception ex)
{
ErrorLogger.logException( ex );
}
try
{
AnalisesDataProvider adp = AnalisesDataProvider.getInstance();
getSessionBean1().setDepartamentoOptions(adp.getDepartamentosList());
}
catch(Exception ex)
{
ErrorLogger.logException( ex );
}
}
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)
{
ErrorLogger.logException( ex );
}
}
return false;
}
}

@ -1,176 +0,0 @@
/*
* 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;
}
}

@ -1,551 +0,0 @@
/*
* RecuperarPassword.java
*
* Created on September 19, 2007, 9:57 AM
* Copyright lluis
*/
package analiseacidentestrabalho;
import beans.Utilizador;
import com.evolute.utils.error.ErrorLogger;
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.providers.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;
/**
* <p>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.</p>
*/
public class RecuperarPassword extends AbstractPageBean {
// <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
private int __placeholder;
/**
* <p>Automatically managed component initialization. <strong>WARNING:</strong>
* This method is automatically generated, so any user-specified code inserted
* here is subject to being replaced.</p>
*/
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;
}
// </editor-fold>
/**
* <p>Construct a new Page bean instance.</p>
*/
public RecuperarPassword() {
}
/**
* <p>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.</p>
*
* <p>Note that, if the current request is a postback, the property
* values of the components do <strong>not</strong> represent any
* values submitted with this request. Instead, they represent the
* property values that were saved for this view when it was rendered.</p>
*/
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
// <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
// 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);
}
// </editor-fold>
// 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 . . .
// }
// }
}
/**
* <p>Callback method that is called after the component tree has been
* restored, but before any event processing takes place. This method
* will <strong>only</strong> 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.</p>
*/
@Override
public void preprocess()
{
}
/**
* <p>Callback method that is called just before rendering takes place.
* This method will <strong>only</strong> 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.</p>
*/
public void prerender() {
txtMsg.setText(getSessionBean1().getMsg());
getSessionBean1().setMsg("");
}
/**
* <p>Callback method that is called after rendering is completed for
* this request, if <code>init()</code> was called (regardless of whether
* or not this was the page that was actually rendered). Customize this
* method to release resources acquired in the <code>init()</code>,
* <code>preprocess()</code>, or <code>prerender()</code> methods (or
* acquired during execution of an event handler).</p>
*/
public void destroy() {
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected RequestBean1 getRequestBean1() {
return (RequestBean1)getBean("RequestBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected SessionBean1 getSessionBean1() {
return (SessionBean1)getBean("SessionBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
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())
{
try
{
UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance();
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 !");
ErrorLogger.logException( ex );
}
}
else
{
getSessionBean1().setMsg("Os dados n&atilde;o coincidem com os registos !");
}
}
catch(Exception ex)
{
getSessionBean1().setMsg("Utilizador inv&aacute;lido !");
}
}
return null;
}
private final String SMTP_HOST = "mail2.evolute.pt";
private final int SMTP_PORT = 587;
private final String mail_username = "acidentes.auchan@siprp.pt";
private final String mail_password = "EghRzS2l";
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", SMTP_HOST );
props.put("mail.from", admin_email );
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.user", mail_username );
props.put("mail.smtp.password", mail_password );
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><head> <meta content='text/html;charset=ISO-8859-1' http-equiv='Content-Type'></head>";
html+="<body bgcolor='#ffffff' text='#000000'>";
html+="<h3>Envio da password de " + login + " :</h3>";
html+="<p>Password: " + password + "</p>";
html+="<body></html>";
msgBodyPart.setContent(html, "text/html");
multipart.addBodyPart(msgBodyPart);
msg.setContent(multipart);
// Transport.send(msg);
Transport t;
t = session1.getTransport( "smtp" );
t.connect( SMTP_HOST, SMTP_PORT, mail_username, mail_password );
t.sendMessage( msg, msg.getAllRecipients() );
t.close();
System.out.println("Email Enviado !!!! " + emailTo + ", " + login);
// }
// catch (Exception ex)
// {
// System.out.println("MAIL ERROR : " + ex.getMessage());
// ErrorLogger.logException( ex );
// }
}
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&aacute;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;
// }
}

@ -1,108 +0,0 @@
/*
* 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;
/**
* <p>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.</p>
*
* <p>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.</p>
*/
public class RequestBean1 extends AbstractRequestBean
{
// <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
private int __placeholder;
/**
* <p>Automatically managed component initialization. <strong>WARNING:</strong>
* This method is automatically generated, so any user-specified code inserted
* here is subject to being replaced.</p>
*/
private void _init() throws Exception {
}
// </editor-fold>
/**
* <p>Construct a new request data bean instance.</p>
*/
public RequestBean1()
{
}
/**
* <p>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.</p>
*
* <p>You may customize this method to allocate resources that are required
* for the lifetime of the current request.</p>
*/
@Override
public void init()
{
// Perform initializations inherited from our superclass
super.init();
// Perform application initialization that must complete
// *before* managed components are initialized
// <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
// 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);
}
// </editor-fold>
// Perform application initialization that must complete
// *after* managed components are initialized
}
/**
* <p>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.</p>
*
* <p>You may customize this method to clean up resources allocated
* during the execution of the <code>init()</code> method, or
* at any later time during the lifetime of the request.</p>
*/
@Override
public void destroy()
{
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected SessionBean1 getSessionBean1()
{
return (SessionBean1)getBean("SessionBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected ApplicationBean1 getApplicationBean1()
{
return (ApplicationBean1)getBean("ApplicationBean1");
}
}

@ -1,917 +0,0 @@
/*
* 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;
/**
* <p>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.</p>
*
* <p>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.</p>
*/
public class SessionBean1 extends AbstractSessionBean
{
// <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
private int __placeholder;
private db.providers.AnalisesActualDataProvider analisesActualDataProvider;
private db.providers.AnalisesSeguimentoDataProvider analisesSeguimentoDataProvider;
private db.providers.AnalisesConcluidasDataProvider analisesConcluidasDataProvider;
private db.providers.TrabalhadoresListDataProvider trabalhadoresListDataProvider;
private db.providers.EstadosCorrecaoDataProvider estadosCorrecaoDataProvider;
private db.providers.UtilizadoresActivosListDataProvider utilizadoresActivosListDataProvider;
private db.providers.UtilizadoresInactivosListDataProvider utilizadoresInactivosListDataProvider;
/**
* <p>Automatically managed component initialization. <strong>WARNING:</strong>
* This method is automatically generated, so any user-specified code inserted
* here is subject to being replaced.</p>
*/
private void _init() throws Exception
{
}
// </editor-fold>
private String logoEmpresaUrl = "";
private Boolean canAccessEstatisticas = false;
public Boolean getCanAccessEstatisticas()
{
return Boolean.TRUE;
// if ( isLoggedIn() && getCurrentUser() != null && getCurrentUser().getTipo() != null )
// {
// int tipo = getCurrentUser().getTipo().intValue();
//
// canAccessEstatisticas = tipo == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP || tipo == Global.TIPO_UTILIZADOR_HS
// || tipo == Global.TIPO_UTILIZADOR_GESTOR || tipo == Global.TIPO_UTILIZADOR_DIRECTOR_GERAL_RH
// || tipo == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA;
// }
// return canAccessEstatisticas;
}
public void setCanAccessEstatisticas( Boolean canAccessEstatisticas )
{
this.canAccessEstatisticas = canAccessEstatisticas;
}
private Boolean isSearchingUtilizadores = false;
/**
* <p>Construct a new session data bean instance.</p>
*/
public SessionBean1()
{
msg = new String( "" );
currentUser = new Utilizador();
analisesActualDataProvider = new db.providers.AnalisesActualDataProvider();
analisesSeguimentoDataProvider = new db.providers.AnalisesSeguimentoDataProvider();
analisesConcluidasDataProvider = new db.providers.AnalisesConcluidasDataProvider();
trabalhadoresListDataProvider = new db.providers.TrabalhadoresListDataProvider();
setEstadosCorrecaoDataProvider( new db.providers.EstadosCorrecaoDataProvider() );
utilizadoresActivosListDataProvider = new db.providers.UtilizadoresActivosListDataProvider();
utilizadoresInactivosListDataProvider = new db.providers.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 );
setIsSearchingUtilizadores( false );
}
/**
* <p>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.</p>
*
* <p>You may customize this method to initialize and cache data values
* or resources that are required for the lifetime of a particular
* user session.</p>
*/
@Override
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
// <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
// 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 );
}
// </editor-fold>
// Perform application initialization that must complete
// *after* managed components are initialized
// TODO - add your own initialization code here
}
/**
* <p>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 <code>activate()</code> method
* will be called to indicate that the transfer is complete.</p>
*
* <p>You may customize this method to release references to session data
* or resources that can not be serialized with the session itself.</p>
*/
@Override
public void passivate()
{
}
/**
* <p>This method is called when the session containing it was
* reactivated.</p>
*
* <p>You may customize this method to reacquire references to session
* data or resources that could not be serialized with the
* session itself.</p>
*/
@Override
public void activate()
{
}
/**
* <p>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.</p>
*
* <p>You may customize this method to clean up resources allocated
* during the execution of the <code>init()</code> method, or
* at any later time during the lifetime of the application.</p>
*/
@Override
public void destroy()
{
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
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( getCanAccessEstatisticas() );
}
public db.providers.AnalisesActualDataProvider getAnalisesActualDataProvider()
{
return analisesActualDataProvider;
}
public void setAnalisesActualDataProvider( db.providers.AnalisesActualDataProvider analisesActualDataProvider )
{
this.analisesActualDataProvider = analisesActualDataProvider;
}
public db.providers.AnalisesSeguimentoDataProvider getAnalisesSeguimentoDataProvider()
{
return analisesSeguimentoDataProvider;
}
public void setAnalisesSeguimentoDataProvider( db.providers.AnalisesSeguimentoDataProvider analisesSeguimentoDataProvider )
{
this.analisesSeguimentoDataProvider = analisesSeguimentoDataProvider;
}
public db.providers.AnalisesConcluidasDataProvider getAnalisesConcluidasDataProvider()
{
return analisesConcluidasDataProvider;
}
public void setAnalisesConcluidasDataProvider( db.providers.AnalisesConcluidasDataProvider analisesConcluidasDataProvider )
{
this.analisesConcluidasDataProvider = analisesConcluidasDataProvider;
}
public db.providers.TrabalhadoresListDataProvider getTrabalhadoresListDataProvider()
{
return trabalhadoresListDataProvider;
}
public void setTrabalhadoresListDataProvider( db.providers.TrabalhadoresListDataProvider trabalhadoresListDataProvider )
{
this.trabalhadoresListDataProvider = trabalhadoresListDataProvider;
}
public db.providers.EstadosCorrecaoDataProvider getEstadosCorrecaoDataProvider()
{
return estadosCorrecaoDataProvider;
}
public void setEstadosCorrecaoDataProvider( db.providers.EstadosCorrecaoDataProvider estadosCorrecaoDataProvider )
{
this.estadosCorrecaoDataProvider = estadosCorrecaoDataProvider;
}
public db.providers.UtilizadoresActivosListDataProvider getUtilizadoresActivosListDataProvider()
{
return utilizadoresActivosListDataProvider;
}
public void setUtilizadoresActivosListDataProvider( db.providers.UtilizadoresActivosListDataProvider utilizadoresActivosListDataProvider )
{
this.utilizadoresActivosListDataProvider = utilizadoresActivosListDataProvider;
}
public db.providers.UtilizadoresInactivosListDataProvider getUtilizadoresInactivosListDataProvider()
{
return utilizadoresInactivosListDataProvider;
}
public void setUtilizadoresInactivosListDataProvider( db.providers.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;
}
public Boolean getIsSearchingUtilizadores()
{
return isSearchingUtilizadores;
}
public void setIsSearchingUtilizadores( Boolean isSearchingUtilizadores )
{
this.isSearchingUtilizadores = isSearchingUtilizadores;
}
}

@ -1,203 +0,0 @@
/*
* 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;
/**
* <p>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.</p>
*/
public class Top extends AbstractFragmentBean {
// <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
private int __placeholder;
/**
* <p>Automatically managed component initialization. <strong>WARNING:</strong>
* This method is automatically generated, so any user-specified code inserted
* here is subject to being replaced.</p>
*/
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;
}
// </editor-fold>
public Top() {
}
/**
* <p>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.</p>
*
* <p>The default implementation does nothing.</p>
*/
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
// <editor-fold defaultstate="collapsed" desc="Visual-Web-managed Component Initialization">
// 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);
}
// </editor-fold>
// Perform application initialization that must complete
// *after* managed components are initialized
// TODO - add your own initialization code here
}
/**
* <p>Callback method that is called after rendering is completed for
* this request, if <code>init()</code> was called. Override this
* method to release resources acquired in the <code>init()</code>
* resources that will be needed for event handlers and lifecycle methods.</p>
*
* <p>The default implementation does nothing.</p>
*/
public void destroy() {
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected ApplicationBean1 getApplicationBean1() {
return (ApplicationBean1)getBean("ApplicationBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected RequestBean1 getRequestBean1() {
return (RequestBean1)getBean("RequestBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*/
protected SessionBean1 getSessionBean1() {
return (SessionBean1)getBean("SessionBean1");
}
}

@ -1,47 +0,0 @@
# production
server.siprp = localhost
port.siprp = 5436
database.siprp = siprp
username.siprp = postgres
#password.siprp =
server.siprp_local = localhost
port.siprp_local = 5436
database.siprp_local = siprp_local_3
username.siprp_local = postgres
#password.siprp_local =
debug = false
# tests localhost
#server.siprp = localhost
#port.siprp = 5432
#database.siprp = siprp
#username.siprp = postgres
#password.siprp = Typein
#
#server.siprp_local = localhost
#port.siprp_local = 5432
#database.siprp_local = siprp_local_3
#username.siprp_local = postgres
#password.siprp_local = Typein
#
#debug = true
# tests ws2
#server.siprp = ws2
#port.siprp = 5432
#database.siprp = siprp
#username.siprp = postgres
#password.siprp = Typein
#
#server.siprp_local = ws2
#port.siprp_local = 5432
#database.siprp_local = siprp_local_3
#username.siprp_local = postgres
#password.siprp_local = Typein
#
#debug = true

@ -1,189 +0,0 @@
/*
* Acidentado.java
*
* Created on October 16, 2007, 2:36 PM
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package beans;
import java.io.Serializable;
/**
*
* @author lluis
*/
public class Acidentado implements Serializable
{
private Integer id;
private String nome;
private java.sql.Date data_nascimento;
private String bilhete_identidade;
private String morada;
private String cod_postal;
private String localidade;
private String contacto_telefonico;
private java.sql.Date data_admissao;
private String funcao;
private String turno;
private Integer trabalhador_id;
private String numero_mecanografico;
private String nome_superior_hierarquico;
private String email_superior_hierarquico;
private String estabelecimento_origem;
private java.sql.Date data_email_superior_hierarquico;
/** Creates a new instance of Acidentado */
public Acidentado() {
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
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 getBilhete_identidade() {
return bilhete_identidade;
}
public void setBilhete_identidade(String bilhete_identidade) {
this.bilhete_identidade = bilhete_identidade;
}
public String getMorada() {
return morada;
}
public void setMorada(String morada) {
this.morada = morada;
}
public String getCod_postal() {
return cod_postal;
}
public void setCod_postal(String cod_postal) {
this.cod_postal = cod_postal;
}
public String getLocalidade() {
return localidade;
}
public void setLocalidade(String localidade) {
this.localidade = localidade;
}
public String getContacto_telefonico() {
return contacto_telefonico;
}
public void setContacto_telefonico(String contacto_telefonico) {
this.contacto_telefonico = contacto_telefonico;
}
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 getFuncao() {
return funcao;
}
public void setFuncao(String funcao) {
this.funcao = funcao;
}
public Integer getTrabalhador_id() {
return trabalhador_id;
}
public void setTrabalhador_id(Integer trabalhador_id) {
this.trabalhador_id = trabalhador_id;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public String getTurno() {
return turno;
}
public void setTurno(String turno) {
this.turno = turno;
}
public String getNumero_mecanografico() {
return numero_mecanografico;
}
public void setNumero_mecanografico(String numero_mecanografico) {
this.numero_mecanografico = numero_mecanografico;
}
public String getNome_superior_hierarquico() {
if(nome_superior_hierarquico == null)
{
return "";
}
return nome_superior_hierarquico;
}
public void setNome_superior_hierarquico(String nome_superior_hierarquico) {
this.nome_superior_hierarquico = nome_superior_hierarquico;
}
public String getEmail_superior_hierarquico() {
if(email_superior_hierarquico == null)
{
return "";
}
return email_superior_hierarquico;
}
public void setEmail_superior_hierarquico(String email_superior_hierarquico) {
this.email_superior_hierarquico = email_superior_hierarquico;
}
public String getEstabelecimento_origem() {
if(estabelecimento_origem == null)
{
return "";
}
return estabelecimento_origem;
}
public void setEstabelecimento_origem(String estabelecimento_origem) {
this.estabelecimento_origem = estabelecimento_origem;
}
public java.sql.Date getData_email_superior_hierarquico() {
return data_email_superior_hierarquico;
}
public void setData_email_superior_hierarquico(java.sql.Date data_email_superior_hierarquico) {
this.data_email_superior_hierarquico = data_email_superior_hierarquico;
}
}

@ -1,43 +0,0 @@
/*
* 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 beans;
import java.io.Serializable;
/**
*
* @author lluis
*/
public class Causa implements Serializable
{
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;
}
}

@ -1,52 +0,0 @@
/*
* 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 beans;
import java.io.Serializable;
/**
*
* @author lluis
*/
public class Controle implements Serializable
{
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;
}
}

@ -1,78 +0,0 @@
/*
* 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 beans;
import java.io.Serializable;
/**
*
* @author lluis
*/
public class Correcao implements Serializable
{
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;
}
}

@ -1,52 +0,0 @@
/*
* 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 beans;
import java.io.Serializable;
/**
*
* @author lluis
*/
public class Departamento implements Serializable
{
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;
}
}

@ -1,52 +0,0 @@
/*
* 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 beans;
import java.io.Serializable;
/**
*
* @author lluis
*/
public class Estabelecimento implements Serializable
{
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;
}
}

@ -1,42 +0,0 @@
/*
* 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 beans;
import java.io.Serializable;
/**
*
* @author lluis
*/
public class Estado implements Serializable
{
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;
}
}

@ -1,49 +0,0 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import java.io.Serializable;
/**
*
* @author dneves
*/
public class EstatisticaProcessoBean implements Serializable
{
private Integer estado = null;
private String fase = null;
private Long count = new Long( 0 );
public EstatisticaProcessoBean()
{
}
public Long getCount() {
return count;
}
public void setCount(Long count) {
this.count = count;
}
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;
}
}

@ -1,56 +0,0 @@
/*
* 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 beans;
import java.io.Serializable;
/**
*
* @author lluis
*/
public class Medico implements Serializable
{
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);
}
}

@ -1,57 +0,0 @@
/*
* 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 beans;
import java.io.Serializable;
/**
*
* @author lluis
*/
public class Medida implements Serializable
{
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 String getMedidaForSql()
{
return getMedida().replaceAll( "'", "''" );
}
public void setMedida(String medida) {
this.medida = medida;
}
}

@ -1,52 +0,0 @@
/*
* 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 beans;
import java.io.Serializable;
/**
*
* @author lluis
*/
public class Permissao implements Serializable
{
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;
}
}

@ -1,52 +0,0 @@
/*
* 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 beans;
import java.io.Serializable;
/**
*
* @author lluis
*/
public class Recomendacao implements Serializable
{
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;
}
}

@ -1,61 +0,0 @@
/*
* 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 beans;
import java.io.Serializable;
/**
*
* @author lluis
*/
public class Seccao implements Serializable
{
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;
}
}

@ -1,47 +0,0 @@
/*
* 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 beans;
import java.io.Serializable;
/**
*
* @author lluis
*/
public class TecnicoSaude implements Serializable
{
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);
}
}

@ -1,70 +0,0 @@
/*
* 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 beans;
import java.io.Serializable;
/**
*
* @author lluis
*/
public class TipoUtilizador implements Serializable
{
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;
}
}

@ -1,98 +0,0 @@
/*
* 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 beans;
import java.io.Serializable;
/**
*
* @author lluis
*/
public class Trabalhador implements Serializable
{
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;
}
}

@ -1,274 +0,0 @@
/*
* 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 beans;
import java.io.Serializable;
import java.sql.Date;
/**
*
* @author lluis
*/
public class Utilizador implements Serializable
{
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()
{
String n = numero_mecanografico;
if ( n != null && "null".equals( n ) )
{
n = "";
}
return n;
}
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;
}
}

@ -1,41 +0,0 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package db;
import com.evolute.utils.Singleton;
/**
*
* @author dneves
*/
public interface DBConstants
{
public static enum DB { SIPRP, SIPRP_LOCAL };
public static final String DEFAULT_PROVIDER = Singleton.DEFAULT_OBJECT_PROVIDER;
public static final String LOCAL_PROVIDER = "LOCAL_PROVIDER";
public static final String DEFAULT_DBMANAGER = "DEFAULT_DBMANAGER";
public static final String LOCAL_DBMANAGER = "LOCAL_DBMANAGER";
public static final String SESSION_CONNECTION = "SESSION_CONNECTION";
public static final String SESSION_CONNECTION_LOCAL = "SESSION_CONNECTION_LOCAL";
public static final String SERVER_SIPRP = "server.siprp";
public static final String PORT_SIPRP = "port.siprp";
public static final String DATABASE_SIPRP = "database.siprp";
public static final String USERNAME_SIPRP = "username.siprp";
public static final String PASSWORD_SIPRP = "password.siprp";
public static final String SERVER_SIPRP_LOCAL = "server.siprp_local";
public static final String PORT_SIPRP_LOCAL = "port.siprp_local";
public static final String DATABASE_SIPRP_LOCAL = "database.siprp_local";
public static final String USERNAME_SIPRP_LOCAL = "username.siprp_local";
public static final String PASSWORD_SIPRP_LOCAL = "password.siprp_local";
public static final String CONNECTION_URL = "connection.url";
public static final String LOCAL_CONNECTION_URL = "connection.local_url";
}

@ -1,61 +0,0 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package db;
import com.evolute.properties.EvoAbstractPropertiesLoader;
import com.evolute.properties.PropertiesException;
/**
*
* @author dneves
*/
public class DBPropertiesLoader extends EvoAbstractPropertiesLoader
{
private static DBPropertiesLoader INSTANCE = null;
private String connection_url = null;
private String local_connection_url = null;
private DBPropertiesLoader()
{
super( null, null, null, null );
}
public static synchronized DBPropertiesLoader getInstance()
{
if ( INSTANCE == null )
{
INSTANCE = new DBPropertiesLoader();
}
return INSTANCE;
}
@Override
protected void postLoad() throws PropertiesException
{
String server = findProperty( DBConstants.SERVER_SIPRP );
int port = findProperty( DBConstants.PORT_SIPRP, new Integer( -1 ) );
String database = findProperty( DBConstants.DATABASE_SIPRP );
connection_url = "jdbc:postgresql://" + server + ":" + port + "/" + database;
server = findProperty( DBConstants.SERVER_SIPRP_LOCAL );
port = findProperty( DBConstants.PORT_SIPRP_LOCAL, new Integer( -1 ) );
database = findProperty( DBConstants.DATABASE_SIPRP_LOCAL );
local_connection_url = "jdbc:postgresql://" + server + ":" + port + "/" + database;
}
public String getConnectionURL()
{
return connection_url;
}
public String getLocalConnectionURL()
{
return local_connection_url;
}
}

@ -1,47 +0,0 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package db;
/**
*
* @author dneves
*/
public interface EstatisticasConstants
{
public static final String[] KEY_NAMES = new String[] {
"POR", "Nome", "Ano Ocorrência", "Data Ocorrência", "Hora Ocorrência", "Horas Trabalhadas no Turno",
/*"Departamento", */"Estabelecimento", "Secção", "Causas do Acidente", "Turno de Trabalho", "Formação SHST",
"Participado \u00e0 Seguradora"
//TODO: falta os 2 ultimos
};
public static final String KEY_POR = "acidentados.numero_mecanografico";
public static final String KEY_NOME = "acidentados.nome";
public static final String KEY_ANO_OCORRENCIA = "date_part( 'year', analises_acidentes.data_acidente )";
public static final String KEY_DATA_OCORRENCIA = "analises_acidentes.data_acidente";
public static final String KEY_HORA_OCORRENCIA = "analises_acidentes.hora_acidente";
public static final String KEY_HORAS_TRABALHADAS = "analises_acidentes.horas_turno";
// public static final String KEY_DEPARTAMENTO = "departamentos.descricao";
public static final String KEY_ESTABELECIMENTO = "analises_acidentes.estabelecimento_id";
public static final String KEY_SECCAO = "analises_acidentes.seccao_id";
public static final String KEY_CAUSAS_ACIDENTE = "analises_acidentes.causas";
public static final String KEY_TURNO_TRABALHO = "acidentados.turno";
public static final String KEY_FORMACAO_SHST = "analises_acidentes.formacao_shst";
public static final String KEY_PARTICIPADO_SEGURO = "analises_acidentes.participado";
public static final String KEY_POSTO_ACIDENTADO = "posto_acidentado";
public static final String KEY_OUTROS_ACIDENTADOS = "outros_acidentados";
public static final String KEY_STYLE_COLUMN_HEADER = "columnHeader";
public static final String KEY_STYLE_COLUMN_NORMAL = "columnNormal";
}

@ -1,178 +0,0 @@
/*
* Actualizacao.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class Actualizacao extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.ObjectPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final String TABLENAME = "actualizacao";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.actualizacao";
public static final int _INVALID__INDEX = -1;
public static final String FIELD_NAMES[] = new String[]{
};
public static final String FIELD_NAMES_FULL[] = new String[]{
};
protected static final String DB_FIELD_NAMES[] = new String[]{
};
protected static final String PK_FIELD_NAMES[] = new String[]{
};
public static final String DEFAULT_LOAD_SET[] = new String[] {
};
protected com.evolute.entity.utils.ObjectPrimaryKey primaryKey;
public Actualizacao()
{
super();
dirtyProperties = new boolean[]{ };
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
throw new RuntimeException( "getPrimaryKeyName on Actualizacao is invalid" );
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : Actualizacao._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.ObjectPrimaryKey( TABLENAME, Actualizacao.PK_FIELD_NAMES );
}
}
@Override
public com.evolute.entity.utils.ObjectPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,776 +0,0 @@
/*
* Avisos.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class Avisos extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( Avisos.ID, Avisos.ID_INDEX );
FIELD_INDEXES.put( Avisos.ID_FULL, Avisos.ID_INDEX );
FIELD_INDEXES.put( Avisos.TIPO, Avisos.TIPO_INDEX );
FIELD_INDEXES.put( Avisos.TIPO_FULL, Avisos.TIPO_INDEX );
com.evolute.entity.evo.EvoDataObject.register( Avisos.CLASS_IDENTIFIER, Avisos.EMPRESA_ID, Avisos.TO_EMPRESA_ID );
FIELD_INDEXES.put( Avisos.EMPRESA_ID, Avisos.EMPRESA_ID_INDEX );
FIELD_INDEXES.put( Avisos.EMPRESA_ID_FULL, Avisos.EMPRESA_ID_INDEX );
FIELD_INDEXES.put( Avisos.TO_EMPRESA_ID, Avisos.TO_EMPRESA_ID_INDEX );
com.evolute.entity.evo.EvoDataObject.register( Avisos.CLASS_IDENTIFIER, Avisos.ESTABELECIMENTO_ID, Avisos.TO_ESTABELECIMENTO_ID );
FIELD_INDEXES.put( Avisos.ESTABELECIMENTO_ID, Avisos.ESTABELECIMENTO_ID_INDEX );
FIELD_INDEXES.put( Avisos.ESTABELECIMENTO_ID_FULL, Avisos.ESTABELECIMENTO_ID_INDEX );
FIELD_INDEXES.put( Avisos.TO_ESTABELECIMENTO_ID, Avisos.TO_ESTABELECIMENTO_ID_INDEX );
com.evolute.entity.evo.EvoDataObject.register( Avisos.CLASS_IDENTIFIER, Avisos.TRABALHADOR_ID, Avisos.TO_TRABALHADOR_ID );
FIELD_INDEXES.put( Avisos.TRABALHADOR_ID, Avisos.TRABALHADOR_ID_INDEX );
FIELD_INDEXES.put( Avisos.TRABALHADOR_ID_FULL, Avisos.TRABALHADOR_ID_INDEX );
FIELD_INDEXES.put( Avisos.TO_TRABALHADOR_ID, Avisos.TO_TRABALHADOR_ID_INDEX );
FIELD_INDEXES.put( Avisos.EVENTO_ID, Avisos.EVENTO_ID_INDEX );
FIELD_INDEXES.put( Avisos.EVENTO_ID_FULL, Avisos.EVENTO_ID_INDEX );
FIELD_INDEXES.put( Avisos.DATA_AVISO, Avisos.DATA_AVISO_INDEX );
FIELD_INDEXES.put( Avisos.DATA_AVISO_FULL, Avisos.DATA_AVISO_INDEX );
FIELD_INDEXES.put( Avisos.DATA_EVENTO, Avisos.DATA_EVENTO_INDEX );
FIELD_INDEXES.put( Avisos.DATA_EVENTO_FULL, Avisos.DATA_EVENTO_INDEX );
FIELD_INDEXES.put( Avisos.DESCRICAO, Avisos.DESCRICAO_INDEX );
FIELD_INDEXES.put( Avisos.DESCRICAO_FULL, Avisos.DESCRICAO_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas =
new com.evolute.entity.ForeignKey( Avisos.class, Avisos.EMPRESA_ID, db.data.siprp.outer.EmpresasData.class, db.data.siprp.outer.EmpresasData.ID );
public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos =
new com.evolute.entity.ForeignKey( Avisos.class, Avisos.ESTABELECIMENTO_ID, db.data.siprp.outer.EstabelecimentosData.class, db.data.siprp.outer.EstabelecimentosData.ID );
public static final com.evolute.entity.ForeignKey ForeignKeytrabalhador_idTotrabalhadores =
new com.evolute.entity.ForeignKey( Avisos.class, Avisos.TRABALHADOR_ID, db.data.siprp.outer.TrabalhadoresData.class, db.data.siprp.outer.TrabalhadoresData.ID );
public static final String TABLENAME = "avisos";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.avisos";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "avisos.id";
public static final int ID_INDEX = 0;
public static final String TIPO = "tipo";
public static final String TIPO_FULL = "avisos.tipo";
public static final int TIPO_INDEX = 1;
public static final String EMPRESA_ID = "empresa_id";
public static final String EMPRESA_ID_FULL = "avisos.empresa_id";
public static final int EMPRESA_ID_INDEX = 2;
public static final String TO_EMPRESA_ID = "to_empresa_id";
public static final String TO_EMPRESA_ID_FULL = "avisos.to_empresa_id";
public static final int TO_EMPRESA_ID_INDEX = 3;
public static final String ESTABELECIMENTO_ID = "estabelecimento_id";
public static final String ESTABELECIMENTO_ID_FULL = "avisos.estabelecimento_id";
public static final int ESTABELECIMENTO_ID_INDEX = 4;
public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id";
public static final String TO_ESTABELECIMENTO_ID_FULL = "avisos.to_estabelecimento_id";
public static final int TO_ESTABELECIMENTO_ID_INDEX = 5;
public static final String TRABALHADOR_ID = "trabalhador_id";
public static final String TRABALHADOR_ID_FULL = "avisos.trabalhador_id";
public static final int TRABALHADOR_ID_INDEX = 6;
public static final String TO_TRABALHADOR_ID = "to_trabalhador_id";
public static final String TO_TRABALHADOR_ID_FULL = "avisos.to_trabalhador_id";
public static final int TO_TRABALHADOR_ID_INDEX = 7;
public static final String EVENTO_ID = "evento_id";
public static final String EVENTO_ID_FULL = "avisos.evento_id";
public static final int EVENTO_ID_INDEX = 8;
public static final String DATA_AVISO = "data_aviso";
public static final String DATA_AVISO_FULL = "avisos.data_aviso";
public static final int DATA_AVISO_INDEX = 9;
public static final String DATA_EVENTO = "data_evento";
public static final String DATA_EVENTO_FULL = "avisos.data_evento";
public static final int DATA_EVENTO_INDEX = 10;
public static final String DESCRICAO = "descricao";
public static final String DESCRICAO_FULL = "avisos.descricao";
public static final int DESCRICAO_INDEX = 11;
public static final String FIELD_NAMES[] = new String[]{
TIPO, EMPRESA_ID, TO_EMPRESA_ID, ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID,
TRABALHADOR_ID, TO_TRABALHADOR_ID, EVENTO_ID, DATA_AVISO, DATA_EVENTO, DESCRICAO, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + TIPO, TABLENAME + "." + EMPRESA_ID, TABLENAME + "." + TO_EMPRESA_ID, TABLENAME + "." + ESTABELECIMENTO_ID, TABLENAME + "." + TO_ESTABELECIMENTO_ID,
TABLENAME + "." + TRABALHADOR_ID, TABLENAME + "." + TO_TRABALHADOR_ID, TABLENAME + "." + EVENTO_ID, TABLENAME + "." + DATA_AVISO, TABLENAME + "." + DATA_EVENTO, TABLENAME + "." + DESCRICAO, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, TIPO, EMPRESA_ID, ESTABELECIMENTO_ID, TRABALHADOR_ID, EVENTO_ID, DATA_AVISO,
DATA_EVENTO, DESCRICAO, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, TIPO, EMPRESA_ID, ESTABELECIMENTO_ID, TRABALHADOR_ID, EVENTO_ID, DATA_AVISO,
DATA_EVENTO, DESCRICAO, };
private Integer id;
private Integer tipo;
private Integer empresa_id;
private db.data.siprp.outer.EmpresasData to_empresa_id;
private Integer estabelecimento_id;
private db.data.siprp.outer.EstabelecimentosData to_estabelecimento_id;
private Integer trabalhador_id;
private db.data.siprp.outer.TrabalhadoresData to_trabalhador_id;
private Integer evento_id;
private java.util.Date data_aviso;
private java.util.Date data_evento;
private String descricao;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public Avisos()
{
super();
dirtyProperties = new boolean[]{ false, false, false
, false, false, false, false, false, false, false, false,
false };
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public Integer getTipo()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( TIPO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.tipo;
}
public void setTipo( Integer tipo )
{
try
{
preProcess( TIPO, tipo );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.tipo = tipo;
LAZY_LOADED_OBJECTS.put( TIPO, Boolean.TRUE );
}
public Integer getEmpresa_id()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( EMPRESA_ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.empresa_id;
}
public void setEmpresa_id( Integer empresa_id )
{
try
{
preProcess( EMPRESA_ID, empresa_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.empresa_id = empresa_id;
LAZY_LOADED_OBJECTS.put( EMPRESA_ID, Boolean.TRUE );
}
public db.data.siprp.outer.EmpresasData toEmpresa_id()
{
try
{
prepare( TO_EMPRESA_ID );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
return this.to_empresa_id;
}
public void setToEmpresa_id( db.data.siprp.outer.EmpresasData to_empresa_id )
{
try
{
preProcess( TO_EMPRESA_ID, to_empresa_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.to_empresa_id = to_empresa_id;
}
public Integer getEstabelecimento_id()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ESTABELECIMENTO_ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.estabelecimento_id;
}
public void setEstabelecimento_id( Integer estabelecimento_id )
{
try
{
preProcess( ESTABELECIMENTO_ID, estabelecimento_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.estabelecimento_id = estabelecimento_id;
LAZY_LOADED_OBJECTS.put( ESTABELECIMENTO_ID, Boolean.TRUE );
}
public db.data.siprp.outer.EstabelecimentosData toEstabelecimento_id()
{
try
{
prepare( TO_ESTABELECIMENTO_ID );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
return this.to_estabelecimento_id;
}
public void setToEstabelecimento_id( db.data.siprp.outer.EstabelecimentosData to_estabelecimento_id )
{
try
{
preProcess( TO_ESTABELECIMENTO_ID, to_estabelecimento_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.to_estabelecimento_id = to_estabelecimento_id;
}
public Integer getTrabalhador_id()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( TRABALHADOR_ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.trabalhador_id;
}
public void setTrabalhador_id( Integer trabalhador_id )
{
try
{
preProcess( TRABALHADOR_ID, trabalhador_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.trabalhador_id = trabalhador_id;
LAZY_LOADED_OBJECTS.put( TRABALHADOR_ID, Boolean.TRUE );
}
public db.data.siprp.outer.TrabalhadoresData toTrabalhador_id()
{
try
{
prepare( TO_TRABALHADOR_ID );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
return this.to_trabalhador_id;
}
public void setToTrabalhador_id( db.data.siprp.outer.TrabalhadoresData to_trabalhador_id )
{
try
{
preProcess( TO_TRABALHADOR_ID, to_trabalhador_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.to_trabalhador_id = to_trabalhador_id;
}
public Integer getEvento_id()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( EVENTO_ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.evento_id;
}
public void setEvento_id( Integer evento_id )
{
try
{
preProcess( EVENTO_ID, evento_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.evento_id = evento_id;
LAZY_LOADED_OBJECTS.put( EVENTO_ID, Boolean.TRUE );
}
public java.util.Date getData_aviso()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DATA_AVISO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.data_aviso;
}
public void setData_aviso( java.util.Date data_aviso )
{
try
{
preProcess( DATA_AVISO, data_aviso );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.data_aviso = data_aviso;
LAZY_LOADED_OBJECTS.put( DATA_AVISO, Boolean.TRUE );
}
public java.util.Date getData_evento()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DATA_EVENTO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.data_evento;
}
public void setData_evento( java.util.Date data_evento )
{
try
{
preProcess( DATA_EVENTO, data_evento );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.data_evento = data_evento;
LAZY_LOADED_OBJECTS.put( DATA_EVENTO, Boolean.TRUE );
}
public String getDescricao()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DESCRICAO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.descricao;
}
public void setDescricao( String descricao )
{
try
{
preProcess( DESCRICAO, descricao );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.descricao = descricao;
LAZY_LOADED_OBJECTS.put( DESCRICAO, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Avisos.ID_INDEX:
value = getId();
break;
case Avisos.TIPO_INDEX:
value = getTipo();
break;
case Avisos.EMPRESA_ID_INDEX:
value = getEmpresa_id();
break;
case Avisos.TO_EMPRESA_ID_INDEX:
value = toEmpresa_id();
break;
case Avisos.ESTABELECIMENTO_ID_INDEX:
value = getEstabelecimento_id();
break;
case Avisos.TO_ESTABELECIMENTO_ID_INDEX:
value = toEstabelecimento_id();
break;
case Avisos.TRABALHADOR_ID_INDEX:
value = getTrabalhador_id();
break;
case Avisos.TO_TRABALHADOR_ID_INDEX:
value = toTrabalhador_id();
break;
case Avisos.EVENTO_ID_INDEX:
value = getEvento_id();
break;
case Avisos.DATA_AVISO_INDEX:
value = getData_aviso();
break;
case Avisos.DATA_EVENTO_INDEX:
value = getData_evento();
break;
case Avisos.DESCRICAO_INDEX:
value = getDescricao();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Avisos.ID_INDEX:
value = this.id;
break;
case Avisos.TIPO_INDEX:
value = this.tipo;
break;
case Avisos.EMPRESA_ID_INDEX:
value = this.empresa_id;
break;
case Avisos.TO_EMPRESA_ID_INDEX:
value = this.to_empresa_id;
break;
case Avisos.ESTABELECIMENTO_ID_INDEX:
value = this.estabelecimento_id;
break;
case Avisos.TO_ESTABELECIMENTO_ID_INDEX:
value = this.to_estabelecimento_id;
break;
case Avisos.TRABALHADOR_ID_INDEX:
value = this.trabalhador_id;
break;
case Avisos.TO_TRABALHADOR_ID_INDEX:
value = this.to_trabalhador_id;
break;
case Avisos.EVENTO_ID_INDEX:
value = this.evento_id;
break;
case Avisos.DATA_AVISO_INDEX:
value = this.data_aviso;
break;
case Avisos.DATA_EVENTO_INDEX:
value = this.data_evento;
break;
case Avisos.DESCRICAO_INDEX:
value = this.descricao;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Avisos.ID_INDEX:
setId( ( Integer ) value );
break;
case Avisos.TIPO_INDEX:
setTipo( ( Integer ) value );
break;
case Avisos.EMPRESA_ID_INDEX:
setEmpresa_id( ( Integer ) value );
break;
case Avisos.TO_EMPRESA_ID_INDEX:
setToEmpresa_id( ( db.data.siprp.outer.EmpresasData ) value );
break;
case Avisos.ESTABELECIMENTO_ID_INDEX:
setEstabelecimento_id( ( Integer ) value );
break;
case Avisos.TO_ESTABELECIMENTO_ID_INDEX:
setToEstabelecimento_id( ( db.data.siprp.outer.EstabelecimentosData ) value );
break;
case Avisos.TRABALHADOR_ID_INDEX:
setTrabalhador_id( ( Integer ) value );
break;
case Avisos.TO_TRABALHADOR_ID_INDEX:
setToTrabalhador_id( ( db.data.siprp.outer.TrabalhadoresData ) value );
break;
case Avisos.EVENTO_ID_INDEX:
setEvento_id( ( Integer ) value );
break;
case Avisos.DATA_AVISO_INDEX:
setData_aviso( ( java.util.Date ) value );
break;
case Avisos.DATA_EVENTO_INDEX:
setData_evento( ( java.util.Date ) value );
break;
case Avisos.DESCRICAO_INDEX:
setDescricao( ( String ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Avisos.ID_INDEX:
this.id = ( Integer ) value;
break;
case Avisos.TIPO_INDEX:
this.tipo = ( Integer ) value;
break;
case Avisos.EMPRESA_ID_INDEX:
this.empresa_id = ( Integer ) value;
break;
case Avisos.TO_EMPRESA_ID_INDEX:
this.to_empresa_id = ( db.data.siprp.outer.EmpresasData ) value;
break;
case Avisos.ESTABELECIMENTO_ID_INDEX:
this.estabelecimento_id = ( Integer ) value;
break;
case Avisos.TO_ESTABELECIMENTO_ID_INDEX:
this.to_estabelecimento_id = ( db.data.siprp.outer.EstabelecimentosData ) value;
break;
case Avisos.TRABALHADOR_ID_INDEX:
this.trabalhador_id = ( Integer ) value;
break;
case Avisos.TO_TRABALHADOR_ID_INDEX:
this.to_trabalhador_id = ( db.data.siprp.outer.TrabalhadoresData ) value;
break;
case Avisos.EVENTO_ID_INDEX:
this.evento_id = ( Integer ) value;
break;
case Avisos.DATA_AVISO_INDEX:
this.data_aviso = ( java.util.Date ) value;
break;
case Avisos.DATA_EVENTO_INDEX:
this.data_evento = ( java.util.Date ) value;
break;
case Avisos.DESCRICAO_INDEX:
this.descricao = ( String ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case Avisos.ID_INDEX:
theClass = Integer.class;
break;
case Avisos.TIPO_INDEX:
theClass = Integer.class;
break;
case Avisos.EMPRESA_ID_INDEX:
theClass = Integer.class;
break;
case Avisos.TO_EMPRESA_ID_INDEX:
theClass = db.data.siprp.outer.EmpresasData.class;
break;
case Avisos.ESTABELECIMENTO_ID_INDEX:
theClass = Integer.class;
break;
case Avisos.TO_ESTABELECIMENTO_ID_INDEX:
theClass = db.data.siprp.outer.EstabelecimentosData.class;
break;
case Avisos.TRABALHADOR_ID_INDEX:
theClass = Integer.class;
break;
case Avisos.TO_TRABALHADOR_ID_INDEX:
theClass = db.data.siprp.outer.TrabalhadoresData.class;
break;
case Avisos.EVENTO_ID_INDEX:
theClass = Integer.class;
break;
case Avisos.DATA_AVISO_INDEX:
theClass = java.util.Date.class;
break;
case Avisos.DATA_EVENTO_INDEX:
theClass = java.util.Date.class;
break;
case Avisos.DESCRICAO_INDEX:
theClass = String.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : Avisos._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Avisos.PK_FIELD_NAMES );
primaryKey.set( 0, getId() );
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,342 +0,0 @@
/*
* Causas.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class Causas extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( Causas.ID, Causas.ID_INDEX );
FIELD_INDEXES.put( Causas.ID_FULL, Causas.ID_INDEX );
FIELD_INDEXES.put( Causas.CAUSA, Causas.CAUSA_INDEX );
FIELD_INDEXES.put( Causas.CAUSA_FULL, Causas.CAUSA_INDEX );
FIELD_INDEXES.put( Causas.ACTIVA, Causas.ACTIVA_INDEX );
FIELD_INDEXES.put( Causas.ACTIVA_FULL, Causas.ACTIVA_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final String TABLENAME = "causas";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.causas";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "causas.id";
public static final int ID_INDEX = 0;
public static final String CAUSA = "causa";
public static final String CAUSA_FULL = "causas.causa";
public static final int CAUSA_INDEX = 1;
public static final String ACTIVA = "activa";
public static final String ACTIVA_FULL = "causas.activa";
public static final int ACTIVA_INDEX = 2;
public static final String FIELD_NAMES[] = new String[]{
CAUSA, ACTIVA, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + CAUSA, TABLENAME + "." + ACTIVA, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, CAUSA, ACTIVA, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, CAUSA, ACTIVA, };
private Integer id;
private String causa;
private String activa;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public Causas()
{
super();
dirtyProperties = new boolean[]{ false, false, false };
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public String getCausa()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( CAUSA );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.causa;
}
public void setCausa( String causa )
{
try
{
preProcess( CAUSA, causa );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.causa = causa;
LAZY_LOADED_OBJECTS.put( CAUSA, Boolean.TRUE );
}
public String getActiva()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ACTIVA );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.activa;
}
public void setActiva( String activa )
{
try
{
preProcess( ACTIVA, activa );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.activa = activa;
LAZY_LOADED_OBJECTS.put( ACTIVA, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Causas.ID_INDEX:
value = getId();
break;
case Causas.CAUSA_INDEX:
value = getCausa();
break;
case Causas.ACTIVA_INDEX:
value = getActiva();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Causas.ID_INDEX:
value = this.id;
break;
case Causas.CAUSA_INDEX:
value = this.causa;
break;
case Causas.ACTIVA_INDEX:
value = this.activa;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Causas.ID_INDEX:
setId( ( Integer ) value );
break;
case Causas.CAUSA_INDEX:
setCausa( ( String ) value );
break;
case Causas.ACTIVA_INDEX:
setActiva( ( String ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Causas.ID_INDEX:
this.id = ( Integer ) value;
break;
case Causas.CAUSA_INDEX:
this.causa = ( String ) value;
break;
case Causas.ACTIVA_INDEX:
this.activa = ( String ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case Causas.ID_INDEX:
theClass = Integer.class;
break;
case Causas.CAUSA_INDEX:
theClass = String.class;
break;
case Causas.ACTIVA_INDEX:
theClass = String.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : Causas._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Causas.PK_FIELD_NAMES );
Object idObject = array.get( row, col + 0 );
try
{
primaryKey.set( 0, ( Integer ) idObject );
setId( ( Integer ) idObject );
}
catch( ClassCastException ex )
{
if( idObject instanceof Number )
{
primaryKey.set( 0, ((Number)idObject).intValue() );
setId( ((Number)idObject).intValue() );
}
else {
throw ex;
}
}
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,523 +0,0 @@
/*
* Contactos.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class Contactos extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( Contactos.ID, Contactos.ID_INDEX );
FIELD_INDEXES.put( Contactos.ID_FULL, Contactos.ID_INDEX );
FIELD_INDEXES.put( Contactos.NOME, Contactos.NOME_INDEX );
FIELD_INDEXES.put( Contactos.NOME_FULL, Contactos.NOME_INDEX );
FIELD_INDEXES.put( Contactos.TELEFONE, Contactos.TELEFONE_INDEX );
FIELD_INDEXES.put( Contactos.TELEFONE_FULL, Contactos.TELEFONE_INDEX );
FIELD_INDEXES.put( Contactos.TELEMOVEL, Contactos.TELEMOVEL_INDEX );
FIELD_INDEXES.put( Contactos.TELEMOVEL_FULL, Contactos.TELEMOVEL_INDEX );
FIELD_INDEXES.put( Contactos.FAX, Contactos.FAX_INDEX );
FIELD_INDEXES.put( Contactos.FAX_FULL, Contactos.FAX_INDEX );
FIELD_INDEXES.put( Contactos.EMAIL, Contactos.EMAIL_INDEX );
FIELD_INDEXES.put( Contactos.EMAIL_FULL, Contactos.EMAIL_INDEX );
FIELD_INDEXES.put( Contactos.CARGO, Contactos.CARGO_INDEX );
FIELD_INDEXES.put( Contactos.CARGO_FULL, Contactos.CARGO_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final String TABLENAME = "contactos";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.contactos";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "contactos.id";
public static final int ID_INDEX = 0;
public static final String NOME = "nome";
public static final String NOME_FULL = "contactos.nome";
public static final int NOME_INDEX = 1;
public static final String TELEFONE = "telefone";
public static final String TELEFONE_FULL = "contactos.telefone";
public static final int TELEFONE_INDEX = 2;
public static final String TELEMOVEL = "telemovel";
public static final String TELEMOVEL_FULL = "contactos.telemovel";
public static final int TELEMOVEL_INDEX = 3;
public static final String FAX = "fax";
public static final String FAX_FULL = "contactos.fax";
public static final int FAX_INDEX = 4;
public static final String EMAIL = "email";
public static final String EMAIL_FULL = "contactos.email";
public static final int EMAIL_INDEX = 5;
public static final String CARGO = "cargo";
public static final String CARGO_FULL = "contactos.cargo";
public static final int CARGO_INDEX = 6;
public static final String FIELD_NAMES[] = new String[]{
NOME, TELEFONE, TELEMOVEL, FAX, EMAIL, CARGO, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + NOME, TABLENAME + "." + TELEFONE, TABLENAME + "." + TELEMOVEL, TABLENAME + "." + FAX, TABLENAME + "." + EMAIL, TABLENAME + "." + CARGO, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, NOME, TELEFONE, TELEMOVEL, FAX, EMAIL, CARGO, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, NOME, TELEFONE, TELEMOVEL, FAX, EMAIL, CARGO, };
private Integer id;
private String nome;
private String telefone;
private String telemovel;
private String fax;
private String email;
private String cargo;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public Contactos()
{
super();
dirtyProperties = new boolean[]{ false, false, false,
false, false, false, false };
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public String getNome()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( NOME );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.nome;
}
public void setNome( String nome )
{
try
{
preProcess( NOME, nome );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.nome = nome;
LAZY_LOADED_OBJECTS.put( NOME, Boolean.TRUE );
}
public String getTelefone()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( TELEFONE );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.telefone;
}
public void setTelefone( String telefone )
{
try
{
preProcess( TELEFONE, telefone );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.telefone = telefone;
LAZY_LOADED_OBJECTS.put( TELEFONE, Boolean.TRUE );
}
public String getTelemovel()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( TELEMOVEL );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.telemovel;
}
public void setTelemovel( String telemovel )
{
try
{
preProcess( TELEMOVEL, telemovel );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.telemovel = telemovel;
LAZY_LOADED_OBJECTS.put( TELEMOVEL, Boolean.TRUE );
}
public String getFax()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( FAX );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.fax;
}
public void setFax( String fax )
{
try
{
preProcess( FAX, fax );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.fax = fax;
LAZY_LOADED_OBJECTS.put( FAX, Boolean.TRUE );
}
public String getEmail()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( EMAIL );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.email;
}
public void setEmail( String email )
{
try
{
preProcess( EMAIL, email );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.email = email;
LAZY_LOADED_OBJECTS.put( EMAIL, Boolean.TRUE );
}
public String getCargo()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( CARGO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.cargo;
}
public void setCargo( String cargo )
{
try
{
preProcess( CARGO, cargo );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.cargo = cargo;
LAZY_LOADED_OBJECTS.put( CARGO, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Contactos.ID_INDEX:
value = getId();
break;
case Contactos.NOME_INDEX:
value = getNome();
break;
case Contactos.TELEFONE_INDEX:
value = getTelefone();
break;
case Contactos.TELEMOVEL_INDEX:
value = getTelemovel();
break;
case Contactos.FAX_INDEX:
value = getFax();
break;
case Contactos.EMAIL_INDEX:
value = getEmail();
break;
case Contactos.CARGO_INDEX:
value = getCargo();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Contactos.ID_INDEX:
value = this.id;
break;
case Contactos.NOME_INDEX:
value = this.nome;
break;
case Contactos.TELEFONE_INDEX:
value = this.telefone;
break;
case Contactos.TELEMOVEL_INDEX:
value = this.telemovel;
break;
case Contactos.FAX_INDEX:
value = this.fax;
break;
case Contactos.EMAIL_INDEX:
value = this.email;
break;
case Contactos.CARGO_INDEX:
value = this.cargo;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Contactos.ID_INDEX:
setId( ( Integer ) value );
break;
case Contactos.NOME_INDEX:
setNome( ( String ) value );
break;
case Contactos.TELEFONE_INDEX:
setTelefone( ( String ) value );
break;
case Contactos.TELEMOVEL_INDEX:
setTelemovel( ( String ) value );
break;
case Contactos.FAX_INDEX:
setFax( ( String ) value );
break;
case Contactos.EMAIL_INDEX:
setEmail( ( String ) value );
break;
case Contactos.CARGO_INDEX:
setCargo( ( String ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Contactos.ID_INDEX:
this.id = ( Integer ) value;
break;
case Contactos.NOME_INDEX:
this.nome = ( String ) value;
break;
case Contactos.TELEFONE_INDEX:
this.telefone = ( String ) value;
break;
case Contactos.TELEMOVEL_INDEX:
this.telemovel = ( String ) value;
break;
case Contactos.FAX_INDEX:
this.fax = ( String ) value;
break;
case Contactos.EMAIL_INDEX:
this.email = ( String ) value;
break;
case Contactos.CARGO_INDEX:
this.cargo = ( String ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case Contactos.ID_INDEX:
theClass = Integer.class;
break;
case Contactos.NOME_INDEX:
theClass = String.class;
break;
case Contactos.TELEFONE_INDEX:
theClass = String.class;
break;
case Contactos.TELEMOVEL_INDEX:
theClass = String.class;
break;
case Contactos.FAX_INDEX:
theClass = String.class;
break;
case Contactos.EMAIL_INDEX:
theClass = String.class;
break;
case Contactos.CARGO_INDEX:
theClass = String.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : Contactos._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Contactos.PK_FIELD_NAMES );
primaryKey.set( 0, getId() );
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,342 +0,0 @@
/*
* Controle.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class Controle extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( Controle.ID, Controle.ID_INDEX );
FIELD_INDEXES.put( Controle.ID_FULL, Controle.ID_INDEX );
FIELD_INDEXES.put( Controle.ANALISE_YEAR, Controle.ANALISE_YEAR_INDEX );
FIELD_INDEXES.put( Controle.ANALISE_YEAR_FULL, Controle.ANALISE_YEAR_INDEX );
FIELD_INDEXES.put( Controle.LAST_ANALISE_NR, Controle.LAST_ANALISE_NR_INDEX );
FIELD_INDEXES.put( Controle.LAST_ANALISE_NR_FULL, Controle.LAST_ANALISE_NR_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final String TABLENAME = "controle";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.controle";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "controle.id";
public static final int ID_INDEX = 0;
public static final String ANALISE_YEAR = "analise_year";
public static final String ANALISE_YEAR_FULL = "controle.analise_year";
public static final int ANALISE_YEAR_INDEX = 1;
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 int LAST_ANALISE_NR_INDEX = 2;
public static final String FIELD_NAMES[] = new String[]{
ANALISE_YEAR, LAST_ANALISE_NR, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + ANALISE_YEAR, TABLENAME + "." + LAST_ANALISE_NR, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, ANALISE_YEAR, LAST_ANALISE_NR, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, ANALISE_YEAR, LAST_ANALISE_NR, };
private Integer id;
private Integer analise_year;
private Integer last_analise_nr;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public Controle()
{
super();
dirtyProperties = new boolean[]{ false, false, false };
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public Integer getAnalise_year()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ANALISE_YEAR );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.analise_year;
}
public void setAnalise_year( Integer analise_year )
{
try
{
preProcess( ANALISE_YEAR, analise_year );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.analise_year = analise_year;
LAZY_LOADED_OBJECTS.put( ANALISE_YEAR, Boolean.TRUE );
}
public Integer getLast_analise_nr()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( LAST_ANALISE_NR );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.last_analise_nr;
}
public void setLast_analise_nr( Integer last_analise_nr )
{
try
{
preProcess( LAST_ANALISE_NR, last_analise_nr );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.last_analise_nr = last_analise_nr;
LAZY_LOADED_OBJECTS.put( LAST_ANALISE_NR, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Controle.ID_INDEX:
value = getId();
break;
case Controle.ANALISE_YEAR_INDEX:
value = getAnalise_year();
break;
case Controle.LAST_ANALISE_NR_INDEX:
value = getLast_analise_nr();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Controle.ID_INDEX:
value = this.id;
break;
case Controle.ANALISE_YEAR_INDEX:
value = this.analise_year;
break;
case Controle.LAST_ANALISE_NR_INDEX:
value = this.last_analise_nr;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Controle.ID_INDEX:
setId( ( Integer ) value );
break;
case Controle.ANALISE_YEAR_INDEX:
setAnalise_year( ( Integer ) value );
break;
case Controle.LAST_ANALISE_NR_INDEX:
setLast_analise_nr( ( Integer ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Controle.ID_INDEX:
this.id = ( Integer ) value;
break;
case Controle.ANALISE_YEAR_INDEX:
this.analise_year = ( Integer ) value;
break;
case Controle.LAST_ANALISE_NR_INDEX:
this.last_analise_nr = ( Integer ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case Controle.ID_INDEX:
theClass = Integer.class;
break;
case Controle.ANALISE_YEAR_INDEX:
theClass = Integer.class;
break;
case Controle.LAST_ANALISE_NR_INDEX:
theClass = Integer.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : Controle._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Controle.PK_FIELD_NAMES );
Object idObject = array.get( row, col + 0 );
try
{
primaryKey.set( 0, ( Integer ) idObject );
setId( ( Integer ) idObject );
}
catch( ClassCastException ex )
{
if( idObject instanceof Number )
{
primaryKey.set( 0, ((Number)idObject).intValue() );
setId( ((Number)idObject).intValue() );
}
else {
throw ex;
}
}
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,376 +0,0 @@
/*
* Departamentos.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class Departamentos extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( Departamentos.ID, Departamentos.ID_INDEX );
FIELD_INDEXES.put( Departamentos.ID_FULL, Departamentos.ID_INDEX );
FIELD_INDEXES.put( Departamentos.DESCRICAO, Departamentos.DESCRICAO_INDEX );
FIELD_INDEXES.put( Departamentos.DESCRICAO_FULL, Departamentos.DESCRICAO_INDEX );
FIELD_INDEXES.put( Departamentos.ACTIVO, Departamentos.ACTIVO_INDEX );
FIELD_INDEXES.put( Departamentos.ACTIVO_FULL, Departamentos.ACTIVO_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final String TABLENAME = "departamentos";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.departamentos";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "departamentos.id";
public static final int ID_INDEX = 0;
public static final String DESCRICAO = "descricao";
public static final String DESCRICAO_FULL = "departamentos.descricao";
public static final int DESCRICAO_INDEX = 1;
public static final String ACTIVO = "activo";
public static final String ACTIVO_FULL = "departamentos.activo";
public static final int ACTIVO_INDEX = 2;
public static final String FIELD_NAMES[] = new String[]{
DESCRICAO, ACTIVO, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + DESCRICAO, TABLENAME + "." + ACTIVO, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, DESCRICAO, ACTIVO, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, DESCRICAO, ACTIVO, };
private Integer id;
private String descricao;
private String activo;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public Departamentos()
{
super();
dirtyProperties = new boolean[]{ false, false, false };
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public java.util.List<db.data.siprp.outer.AnalisesAcidentesData>fromAnalisesAcidentes_departamento_id()
{
java.util.List<db.data.siprp.outer.AnalisesAcidentesData> result = new java.util.LinkedList< db.data.siprp.outer.AnalisesAcidentesData >();
if ( getPrimaryKey() != null )
{
try
{
result = fromReference( db.data.siprp.outer.AnalisesAcidentesData.class , getPrimaryKey().getMap().get("id"), "departamento_id" );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
}
return result;
}
public java.util.List<db.data.siprp.outer.SeccoesData>fromSeccoes_departamento_id()
{
java.util.List<db.data.siprp.outer.SeccoesData> result = new java.util.LinkedList< db.data.siprp.outer.SeccoesData >();
if ( getPrimaryKey() != null )
{
try
{
result = fromReference( db.data.siprp.outer.SeccoesData.class , getPrimaryKey().getMap().get("id"), "departamento_id" );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
}
return result;
}
public String getDescricao()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DESCRICAO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.descricao;
}
public void setDescricao( String descricao )
{
try
{
preProcess( DESCRICAO, descricao );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.descricao = descricao;
LAZY_LOADED_OBJECTS.put( DESCRICAO, Boolean.TRUE );
}
public String getActivo()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ACTIVO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.activo;
}
public void setActivo( String activo )
{
try
{
preProcess( ACTIVO, activo );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.activo = activo;
LAZY_LOADED_OBJECTS.put( ACTIVO, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Departamentos.ID_INDEX:
value = getId();
break;
case Departamentos.DESCRICAO_INDEX:
value = getDescricao();
break;
case Departamentos.ACTIVO_INDEX:
value = getActivo();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Departamentos.ID_INDEX:
value = this.id;
break;
case Departamentos.DESCRICAO_INDEX:
value = this.descricao;
break;
case Departamentos.ACTIVO_INDEX:
value = this.activo;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Departamentos.ID_INDEX:
setId( ( Integer ) value );
break;
case Departamentos.DESCRICAO_INDEX:
setDescricao( ( String ) value );
break;
case Departamentos.ACTIVO_INDEX:
setActivo( ( String ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Departamentos.ID_INDEX:
this.id = ( Integer ) value;
break;
case Departamentos.DESCRICAO_INDEX:
this.descricao = ( String ) value;
break;
case Departamentos.ACTIVO_INDEX:
this.activo = ( String ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case Departamentos.ID_INDEX:
theClass = Integer.class;
break;
case Departamentos.DESCRICAO_INDEX:
theClass = String.class;
break;
case Departamentos.ACTIVO_INDEX:
theClass = String.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : Departamentos._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Departamentos.PK_FIELD_NAMES );
Object idObject = array.get( row, col + 0 );
try
{
primaryKey.set( 0, ( Integer ) idObject );
setId( ( Integer ) idObject );
}
catch( ClassCastException ex )
{
if( idObject instanceof Number )
{
primaryKey.set( 0, ((Number)idObject).intValue() );
setId( ((Number)idObject).intValue() );
}
else {
throw ex;
}
}
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,425 +0,0 @@
/*
* Errors.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class Errors extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( Errors.ID, Errors.ID_INDEX );
FIELD_INDEXES.put( Errors.ID_FULL, Errors.ID_INDEX );
FIELD_INDEXES.put( Errors.DATE, Errors.DATE_INDEX );
FIELD_INDEXES.put( Errors.DATE_FULL, Errors.DATE_INDEX );
FIELD_INDEXES.put( Errors.TYPE, Errors.TYPE_INDEX );
FIELD_INDEXES.put( Errors.TYPE_FULL, Errors.TYPE_INDEX );
FIELD_INDEXES.put( Errors.ENVIRONMENT, Errors.ENVIRONMENT_INDEX );
FIELD_INDEXES.put( Errors.ENVIRONMENT_FULL, Errors.ENVIRONMENT_INDEX );
FIELD_INDEXES.put( Errors.DESCRIPTION, Errors.DESCRIPTION_INDEX );
FIELD_INDEXES.put( Errors.DESCRIPTION_FULL, Errors.DESCRIPTION_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final String TABLENAME = "errors";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.errors";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "errors.id";
public static final int ID_INDEX = 0;
public static final String DATE = "date";
public static final String DATE_FULL = "errors.date";
public static final int DATE_INDEX = 1;
public static final String TYPE = "type";
public static final String TYPE_FULL = "errors.type";
public static final int TYPE_INDEX = 2;
public static final String ENVIRONMENT = "environment";
public static final String ENVIRONMENT_FULL = "errors.environment";
public static final int ENVIRONMENT_INDEX = 3;
public static final String DESCRIPTION = "description";
public static final String DESCRIPTION_FULL = "errors.description";
public static final int DESCRIPTION_INDEX = 4;
public static final String FIELD_NAMES[] = new String[]{
DATE, TYPE, ENVIRONMENT, DESCRIPTION, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + DATE, TABLENAME + "." + TYPE, TABLENAME + "." + ENVIRONMENT, TABLENAME + "." + DESCRIPTION, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, DATE, TYPE, ENVIRONMENT, DESCRIPTION, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, DATE, TYPE, ENVIRONMENT, DESCRIPTION, };
private Integer id;
private java.sql.Timestamp date;
private String type;
private String environment;
private String description;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public Errors()
{
super();
dirtyProperties = new boolean[]{ false, false, false,
false, false };
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public java.sql.Timestamp getDate()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DATE );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.date;
}
public void setDate( java.sql.Timestamp date )
{
try
{
preProcess( DATE, date );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.date = date;
LAZY_LOADED_OBJECTS.put( DATE, Boolean.TRUE );
}
public String getType()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( TYPE );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.type;
}
public void setType( String type )
{
try
{
preProcess( TYPE, type );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.type = type;
LAZY_LOADED_OBJECTS.put( TYPE, Boolean.TRUE );
}
public String getEnvironment()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ENVIRONMENT );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.environment;
}
public void setEnvironment( String environment )
{
try
{
preProcess( ENVIRONMENT, environment );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.environment = environment;
LAZY_LOADED_OBJECTS.put( ENVIRONMENT, Boolean.TRUE );
}
public String getDescription()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DESCRIPTION );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.description;
}
public void setDescription( String description )
{
try
{
preProcess( DESCRIPTION, description );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.description = description;
LAZY_LOADED_OBJECTS.put( DESCRIPTION, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Errors.ID_INDEX:
value = getId();
break;
case Errors.DATE_INDEX:
value = getDate();
break;
case Errors.TYPE_INDEX:
value = getType();
break;
case Errors.ENVIRONMENT_INDEX:
value = getEnvironment();
break;
case Errors.DESCRIPTION_INDEX:
value = getDescription();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Errors.ID_INDEX:
value = this.id;
break;
case Errors.DATE_INDEX:
value = this.date;
break;
case Errors.TYPE_INDEX:
value = this.type;
break;
case Errors.ENVIRONMENT_INDEX:
value = this.environment;
break;
case Errors.DESCRIPTION_INDEX:
value = this.description;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Errors.ID_INDEX:
setId( ( Integer ) value );
break;
case Errors.DATE_INDEX:
setDate( ( java.sql.Timestamp ) value );
break;
case Errors.TYPE_INDEX:
setType( ( String ) value );
break;
case Errors.ENVIRONMENT_INDEX:
setEnvironment( ( String ) value );
break;
case Errors.DESCRIPTION_INDEX:
setDescription( ( String ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Errors.ID_INDEX:
this.id = ( Integer ) value;
break;
case Errors.DATE_INDEX:
this.date = ( java.sql.Timestamp ) value;
break;
case Errors.TYPE_INDEX:
this.type = ( String ) value;
break;
case Errors.ENVIRONMENT_INDEX:
this.environment = ( String ) value;
break;
case Errors.DESCRIPTION_INDEX:
this.description = ( String ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case Errors.ID_INDEX:
theClass = Integer.class;
break;
case Errors.DATE_INDEX:
theClass = java.sql.Timestamp.class;
break;
case Errors.TYPE_INDEX:
theClass = String.class;
break;
case Errors.ENVIRONMENT_INDEX:
theClass = String.class;
break;
case Errors.DESCRIPTION_INDEX:
theClass = String.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : Errors._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Errors.PK_FIELD_NAMES );
primaryKey.set( 0, getId() );
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,775 +0,0 @@
/*
* Estabelecimentos.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class Estabelecimentos extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( Estabelecimentos.ID, Estabelecimentos.ID_INDEX );
FIELD_INDEXES.put( Estabelecimentos.ID_FULL, Estabelecimentos.ID_INDEX );
com.evolute.entity.evo.EvoDataObject.register( Estabelecimentos.CLASS_IDENTIFIER, Estabelecimentos.EMPRESA_ID, Estabelecimentos.TO_EMPRESA_ID );
FIELD_INDEXES.put( Estabelecimentos.EMPRESA_ID, Estabelecimentos.EMPRESA_ID_INDEX );
FIELD_INDEXES.put( Estabelecimentos.EMPRESA_ID_FULL, Estabelecimentos.EMPRESA_ID_INDEX );
FIELD_INDEXES.put( Estabelecimentos.TO_EMPRESA_ID, Estabelecimentos.TO_EMPRESA_ID_INDEX );
FIELD_INDEXES.put( Estabelecimentos.MORADA, Estabelecimentos.MORADA_INDEX );
FIELD_INDEXES.put( Estabelecimentos.MORADA_FULL, Estabelecimentos.MORADA_INDEX );
FIELD_INDEXES.put( Estabelecimentos.CODIGO_POSTAL, Estabelecimentos.CODIGO_POSTAL_INDEX );
FIELD_INDEXES.put( Estabelecimentos.CODIGO_POSTAL_FULL, Estabelecimentos.CODIGO_POSTAL_INDEX );
FIELD_INDEXES.put( Estabelecimentos.LOCALIDADE, Estabelecimentos.LOCALIDADE_INDEX );
FIELD_INDEXES.put( Estabelecimentos.LOCALIDADE_FULL, Estabelecimentos.LOCALIDADE_INDEX );
FIELD_INDEXES.put( Estabelecimentos.ULTIMA_VISITA, Estabelecimentos.ULTIMA_VISITA_INDEX );
FIELD_INDEXES.put( Estabelecimentos.ULTIMA_VISITA_FULL, Estabelecimentos.ULTIMA_VISITA_INDEX );
FIELD_INDEXES.put( Estabelecimentos.REALIZADA, Estabelecimentos.REALIZADA_INDEX );
FIELD_INDEXES.put( Estabelecimentos.REALIZADA_FULL, Estabelecimentos.REALIZADA_INDEX );
FIELD_INDEXES.put( Estabelecimentos.PROXIMA_VISITA, Estabelecimentos.PROXIMA_VISITA_INDEX );
FIELD_INDEXES.put( Estabelecimentos.PROXIMA_VISITA_FULL, Estabelecimentos.PROXIMA_VISITA_INDEX );
FIELD_INDEXES.put( Estabelecimentos.NOME, Estabelecimentos.NOME_INDEX );
FIELD_INDEXES.put( Estabelecimentos.NOME_FULL, Estabelecimentos.NOME_INDEX );
FIELD_INDEXES.put( Estabelecimentos.MEDICO_ID, Estabelecimentos.MEDICO_ID_INDEX );
FIELD_INDEXES.put( Estabelecimentos.MEDICO_ID_FULL, Estabelecimentos.MEDICO_ID_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas =
new com.evolute.entity.ForeignKey( Estabelecimentos.class, Estabelecimentos.EMPRESA_ID, db.data.siprp.outer.EmpresasData.class, db.data.siprp.outer.EmpresasData.ID );
public static final String TABLENAME = "estabelecimentos";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.estabelecimentos";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "estabelecimentos.id";
public static final int ID_INDEX = 0;
public static final String EMPRESA_ID = "empresa_id";
public static final String EMPRESA_ID_FULL = "estabelecimentos.empresa_id";
public static final int EMPRESA_ID_INDEX = 1;
public static final String TO_EMPRESA_ID = "to_empresa_id";
public static final String TO_EMPRESA_ID_FULL = "estabelecimentos.to_empresa_id";
public static final int TO_EMPRESA_ID_INDEX = 2;
public static final String MORADA = "morada";
public static final String MORADA_FULL = "estabelecimentos.morada";
public static final int MORADA_INDEX = 3;
public static final String CODIGO_POSTAL = "codigo_postal";
public static final String CODIGO_POSTAL_FULL = "estabelecimentos.codigo_postal";
public static final int CODIGO_POSTAL_INDEX = 4;
public static final String LOCALIDADE = "localidade";
public static final String LOCALIDADE_FULL = "estabelecimentos.localidade";
public static final int LOCALIDADE_INDEX = 5;
public static final String ULTIMA_VISITA = "ultima_visita";
public static final String ULTIMA_VISITA_FULL = "estabelecimentos.ultima_visita";
public static final int ULTIMA_VISITA_INDEX = 6;
public static final String REALIZADA = "realizada";
public static final String REALIZADA_FULL = "estabelecimentos.realizada";
public static final int REALIZADA_INDEX = 7;
public static final String PROXIMA_VISITA = "proxima_visita";
public static final String PROXIMA_VISITA_FULL = "estabelecimentos.proxima_visita";
public static final int PROXIMA_VISITA_INDEX = 8;
public static final String NOME = "nome";
public static final String NOME_FULL = "estabelecimentos.nome";
public static final int NOME_INDEX = 9;
public static final String MEDICO_ID = "medico_id";
public static final String MEDICO_ID_FULL = "estabelecimentos.medico_id";
public static final int MEDICO_ID_INDEX = 10;
public static final String FIELD_NAMES[] = new String[]{
EMPRESA_ID, TO_EMPRESA_ID, MORADA, CODIGO_POSTAL, LOCALIDADE, ULTIMA_VISITA,
REALIZADA, PROXIMA_VISITA, NOME, MEDICO_ID, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + EMPRESA_ID, TABLENAME + "." + TO_EMPRESA_ID, TABLENAME + "." + MORADA, TABLENAME + "." + CODIGO_POSTAL, TABLENAME + "." + LOCALIDADE, TABLENAME + "." + ULTIMA_VISITA,
TABLENAME + "." + REALIZADA, TABLENAME + "." + PROXIMA_VISITA, TABLENAME + "." + NOME, TABLENAME + "." + MEDICO_ID, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, EMPRESA_ID, MORADA, CODIGO_POSTAL, LOCALIDADE, ULTIMA_VISITA, REALIZADA,
PROXIMA_VISITA, NOME, MEDICO_ID, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, EMPRESA_ID, MORADA, CODIGO_POSTAL, LOCALIDADE, ULTIMA_VISITA, REALIZADA,
PROXIMA_VISITA, NOME, MEDICO_ID, };
private Integer id;
private Integer empresa_id;
private db.data.siprp.outer.EmpresasData to_empresa_id;
private String morada;
private String codigo_postal;
private String localidade;
private java.util.Date ultima_visita;
private String realizada;
private java.util.Date proxima_visita;
private String nome;
private Integer medico_id;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public Estabelecimentos()
{
super();
dirtyProperties = new boolean[]{ false, false, false,
false, false, false, false, false, false, false, false };
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public java.util.List<db.data.siprp.outer.AvisosData>fromAvisos_estabelecimento_id()
{
java.util.List<db.data.siprp.outer.AvisosData> result = new java.util.LinkedList< db.data.siprp.outer.AvisosData >();
if ( getPrimaryKey() != null )
{
try
{
result = fromReference( db.data.siprp.outer.AvisosData.class , getPrimaryKey().getMap().get("id"), "estabelecimento_id" );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
}
return result;
}
public java.util.List<db.data.siprp.outer.HistoricoEstabelecimentoData>fromHistoricoEstabelecimento_estabelecimento_id()
{
java.util.List<db.data.siprp.outer.HistoricoEstabelecimentoData> result = new java.util.LinkedList< db.data.siprp.outer.HistoricoEstabelecimentoData >();
if ( getPrimaryKey() != null )
{
try
{
result = fromReference( db.data.siprp.outer.HistoricoEstabelecimentoData.class , getPrimaryKey().getMap().get("id"), "estabelecimento_id" );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
}
return result;
}
public java.util.List<db.data.siprp.outer.TrabalhadoresData>fromTrabalhadores_estabelecimento_id()
{
java.util.List<db.data.siprp.outer.TrabalhadoresData> result = new java.util.LinkedList< db.data.siprp.outer.TrabalhadoresData >();
if ( getPrimaryKey() != null )
{
try
{
result = fromReference( db.data.siprp.outer.TrabalhadoresData.class , getPrimaryKey().getMap().get("id"), "estabelecimento_id" );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
}
return result;
}
public Integer getEmpresa_id()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( EMPRESA_ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.empresa_id;
}
public void setEmpresa_id( Integer empresa_id )
{
try
{
preProcess( EMPRESA_ID, empresa_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.empresa_id = empresa_id;
LAZY_LOADED_OBJECTS.put( EMPRESA_ID, Boolean.TRUE );
}
public db.data.siprp.outer.EmpresasData toEmpresa_id()
{
try
{
prepare( TO_EMPRESA_ID );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
return this.to_empresa_id;
}
public void setToEmpresa_id( db.data.siprp.outer.EmpresasData to_empresa_id )
{
try
{
preProcess( TO_EMPRESA_ID, to_empresa_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.to_empresa_id = to_empresa_id;
}
public String getMorada()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( MORADA );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.morada;
}
public void setMorada( String morada )
{
try
{
preProcess( MORADA, morada );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.morada = morada;
LAZY_LOADED_OBJECTS.put( MORADA, Boolean.TRUE );
}
public String getCodigo_postal()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( CODIGO_POSTAL );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.codigo_postal;
}
public void setCodigo_postal( String codigo_postal )
{
try
{
preProcess( CODIGO_POSTAL, codigo_postal );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.codigo_postal = codigo_postal;
LAZY_LOADED_OBJECTS.put( CODIGO_POSTAL, Boolean.TRUE );
}
public String getLocalidade()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( LOCALIDADE );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.localidade;
}
public void setLocalidade( String localidade )
{
try
{
preProcess( LOCALIDADE, localidade );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.localidade = localidade;
LAZY_LOADED_OBJECTS.put( LOCALIDADE, Boolean.TRUE );
}
public java.util.Date getUltima_visita()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ULTIMA_VISITA );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.ultima_visita;
}
public void setUltima_visita( java.util.Date ultima_visita )
{
try
{
preProcess( ULTIMA_VISITA, ultima_visita );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.ultima_visita = ultima_visita;
LAZY_LOADED_OBJECTS.put( ULTIMA_VISITA, Boolean.TRUE );
}
public String getRealizada()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( REALIZADA );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.realizada;
}
public void setRealizada( String realizada )
{
try
{
preProcess( REALIZADA, realizada );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.realizada = realizada;
LAZY_LOADED_OBJECTS.put( REALIZADA, Boolean.TRUE );
}
public java.util.Date getProxima_visita()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( PROXIMA_VISITA );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.proxima_visita;
}
public void setProxima_visita( java.util.Date proxima_visita )
{
try
{
preProcess( PROXIMA_VISITA, proxima_visita );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.proxima_visita = proxima_visita;
LAZY_LOADED_OBJECTS.put( PROXIMA_VISITA, Boolean.TRUE );
}
public String getNome()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( NOME );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.nome;
}
public void setNome( String nome )
{
try
{
preProcess( NOME, nome );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.nome = nome;
LAZY_LOADED_OBJECTS.put( NOME, Boolean.TRUE );
}
public Integer getMedico_id()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( MEDICO_ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.medico_id;
}
public void setMedico_id( Integer medico_id )
{
try
{
preProcess( MEDICO_ID, medico_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.medico_id = medico_id;
LAZY_LOADED_OBJECTS.put( MEDICO_ID, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Estabelecimentos.ID_INDEX:
value = getId();
break;
case Estabelecimentos.EMPRESA_ID_INDEX:
value = getEmpresa_id();
break;
case Estabelecimentos.TO_EMPRESA_ID_INDEX:
value = toEmpresa_id();
break;
case Estabelecimentos.MORADA_INDEX:
value = getMorada();
break;
case Estabelecimentos.CODIGO_POSTAL_INDEX:
value = getCodigo_postal();
break;
case Estabelecimentos.LOCALIDADE_INDEX:
value = getLocalidade();
break;
case Estabelecimentos.ULTIMA_VISITA_INDEX:
value = getUltima_visita();
break;
case Estabelecimentos.REALIZADA_INDEX:
value = getRealizada();
break;
case Estabelecimentos.PROXIMA_VISITA_INDEX:
value = getProxima_visita();
break;
case Estabelecimentos.NOME_INDEX:
value = getNome();
break;
case Estabelecimentos.MEDICO_ID_INDEX:
value = getMedico_id();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Estabelecimentos.ID_INDEX:
value = this.id;
break;
case Estabelecimentos.EMPRESA_ID_INDEX:
value = this.empresa_id;
break;
case Estabelecimentos.TO_EMPRESA_ID_INDEX:
value = this.to_empresa_id;
break;
case Estabelecimentos.MORADA_INDEX:
value = this.morada;
break;
case Estabelecimentos.CODIGO_POSTAL_INDEX:
value = this.codigo_postal;
break;
case Estabelecimentos.LOCALIDADE_INDEX:
value = this.localidade;
break;
case Estabelecimentos.ULTIMA_VISITA_INDEX:
value = this.ultima_visita;
break;
case Estabelecimentos.REALIZADA_INDEX:
value = this.realizada;
break;
case Estabelecimentos.PROXIMA_VISITA_INDEX:
value = this.proxima_visita;
break;
case Estabelecimentos.NOME_INDEX:
value = this.nome;
break;
case Estabelecimentos.MEDICO_ID_INDEX:
value = this.medico_id;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Estabelecimentos.ID_INDEX:
setId( ( Integer ) value );
break;
case Estabelecimentos.EMPRESA_ID_INDEX:
setEmpresa_id( ( Integer ) value );
break;
case Estabelecimentos.TO_EMPRESA_ID_INDEX:
setToEmpresa_id( ( db.data.siprp.outer.EmpresasData ) value );
break;
case Estabelecimentos.MORADA_INDEX:
setMorada( ( String ) value );
break;
case Estabelecimentos.CODIGO_POSTAL_INDEX:
setCodigo_postal( ( String ) value );
break;
case Estabelecimentos.LOCALIDADE_INDEX:
setLocalidade( ( String ) value );
break;
case Estabelecimentos.ULTIMA_VISITA_INDEX:
setUltima_visita( ( java.util.Date ) value );
break;
case Estabelecimentos.REALIZADA_INDEX:
setRealizada( ( String ) value );
break;
case Estabelecimentos.PROXIMA_VISITA_INDEX:
setProxima_visita( ( java.util.Date ) value );
break;
case Estabelecimentos.NOME_INDEX:
setNome( ( String ) value );
break;
case Estabelecimentos.MEDICO_ID_INDEX:
setMedico_id( ( Integer ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Estabelecimentos.ID_INDEX:
this.id = ( Integer ) value;
break;
case Estabelecimentos.EMPRESA_ID_INDEX:
this.empresa_id = ( Integer ) value;
break;
case Estabelecimentos.TO_EMPRESA_ID_INDEX:
this.to_empresa_id = ( db.data.siprp.outer.EmpresasData ) value;
break;
case Estabelecimentos.MORADA_INDEX:
this.morada = ( String ) value;
break;
case Estabelecimentos.CODIGO_POSTAL_INDEX:
this.codigo_postal = ( String ) value;
break;
case Estabelecimentos.LOCALIDADE_INDEX:
this.localidade = ( String ) value;
break;
case Estabelecimentos.ULTIMA_VISITA_INDEX:
this.ultima_visita = ( java.util.Date ) value;
break;
case Estabelecimentos.REALIZADA_INDEX:
this.realizada = ( String ) value;
break;
case Estabelecimentos.PROXIMA_VISITA_INDEX:
this.proxima_visita = ( java.util.Date ) value;
break;
case Estabelecimentos.NOME_INDEX:
this.nome = ( String ) value;
break;
case Estabelecimentos.MEDICO_ID_INDEX:
this.medico_id = ( Integer ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case Estabelecimentos.ID_INDEX:
theClass = Integer.class;
break;
case Estabelecimentos.EMPRESA_ID_INDEX:
theClass = Integer.class;
break;
case Estabelecimentos.TO_EMPRESA_ID_INDEX:
theClass = db.data.siprp.outer.EmpresasData.class;
break;
case Estabelecimentos.MORADA_INDEX:
theClass = String.class;
break;
case Estabelecimentos.CODIGO_POSTAL_INDEX:
theClass = String.class;
break;
case Estabelecimentos.LOCALIDADE_INDEX:
theClass = String.class;
break;
case Estabelecimentos.ULTIMA_VISITA_INDEX:
theClass = java.util.Date.class;
break;
case Estabelecimentos.REALIZADA_INDEX:
theClass = String.class;
break;
case Estabelecimentos.PROXIMA_VISITA_INDEX:
theClass = java.util.Date.class;
break;
case Estabelecimentos.NOME_INDEX:
theClass = String.class;
break;
case Estabelecimentos.MEDICO_ID_INDEX:
theClass = Integer.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : Estabelecimentos._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Estabelecimentos.PK_FIELD_NAMES );
primaryKey.set( 0, getId() );
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,409 +0,0 @@
/*
* EstadoMedidas.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class EstadoMedidas extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( EstadoMedidas.ID, EstadoMedidas.ID_INDEX );
FIELD_INDEXES.put( EstadoMedidas.ID_FULL, EstadoMedidas.ID_INDEX );
FIELD_INDEXES.put( EstadoMedidas.DESCRICAO, EstadoMedidas.DESCRICAO_INDEX );
FIELD_INDEXES.put( EstadoMedidas.DESCRICAO_FULL, EstadoMedidas.DESCRICAO_INDEX );
FIELD_INDEXES.put( EstadoMedidas.ORDEM, EstadoMedidas.ORDEM_INDEX );
FIELD_INDEXES.put( EstadoMedidas.ORDEM_FULL, EstadoMedidas.ORDEM_INDEX );
FIELD_INDEXES.put( EstadoMedidas.ACTIVO, EstadoMedidas.ACTIVO_INDEX );
FIELD_INDEXES.put( EstadoMedidas.ACTIVO_FULL, EstadoMedidas.ACTIVO_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final String TABLENAME = "estado_medidas";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.estado_medidas";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "estado_medidas.id";
public static final int ID_INDEX = 0;
public static final String DESCRICAO = "descricao";
public static final String DESCRICAO_FULL = "estado_medidas.descricao";
public static final int DESCRICAO_INDEX = 1;
public static final String ORDEM = "ordem";
public static final String ORDEM_FULL = "estado_medidas.ordem";
public static final int ORDEM_INDEX = 2;
public static final String ACTIVO = "activo";
public static final String ACTIVO_FULL = "estado_medidas.activo";
public static final int ACTIVO_INDEX = 3;
public static final String FIELD_NAMES[] = new String[]{
DESCRICAO, ORDEM, ACTIVO, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + DESCRICAO, TABLENAME + "." + ORDEM, TABLENAME + "." + ACTIVO, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, DESCRICAO, ORDEM, ACTIVO, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, DESCRICAO, ORDEM, ACTIVO, };
private Integer id;
private String descricao;
private Integer ordem;
private String activo;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public EstadoMedidas()
{
super();
dirtyProperties = new boolean[]{ false, false, false,
false };
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public java.util.List<db.data.siprp.outer.PlanoMedidasData>fromPlanoMedidas_estado_medidas_id()
{
java.util.List<db.data.siprp.outer.PlanoMedidasData> result = new java.util.LinkedList< db.data.siprp.outer.PlanoMedidasData >();
if ( getPrimaryKey() != null )
{
try
{
result = fromReference( db.data.siprp.outer.PlanoMedidasData.class , getPrimaryKey().getMap().get("id"), "estado_medidas_id" );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
}
return result;
}
public String getDescricao()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DESCRICAO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.descricao;
}
public void setDescricao( String descricao )
{
try
{
preProcess( DESCRICAO, descricao );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.descricao = descricao;
LAZY_LOADED_OBJECTS.put( DESCRICAO, Boolean.TRUE );
}
public Integer getOrdem()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ORDEM );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.ordem;
}
public void setOrdem( Integer ordem )
{
try
{
preProcess( ORDEM, ordem );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.ordem = ordem;
LAZY_LOADED_OBJECTS.put( ORDEM, Boolean.TRUE );
}
public String getActivo()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ACTIVO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.activo;
}
public void setActivo( String activo )
{
try
{
preProcess( ACTIVO, activo );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.activo = activo;
LAZY_LOADED_OBJECTS.put( ACTIVO, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case EstadoMedidas.ID_INDEX:
value = getId();
break;
case EstadoMedidas.DESCRICAO_INDEX:
value = getDescricao();
break;
case EstadoMedidas.ORDEM_INDEX:
value = getOrdem();
break;
case EstadoMedidas.ACTIVO_INDEX:
value = getActivo();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case EstadoMedidas.ID_INDEX:
value = this.id;
break;
case EstadoMedidas.DESCRICAO_INDEX:
value = this.descricao;
break;
case EstadoMedidas.ORDEM_INDEX:
value = this.ordem;
break;
case EstadoMedidas.ACTIVO_INDEX:
value = this.activo;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case EstadoMedidas.ID_INDEX:
setId( ( Integer ) value );
break;
case EstadoMedidas.DESCRICAO_INDEX:
setDescricao( ( String ) value );
break;
case EstadoMedidas.ORDEM_INDEX:
setOrdem( ( Integer ) value );
break;
case EstadoMedidas.ACTIVO_INDEX:
setActivo( ( String ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case EstadoMedidas.ID_INDEX:
this.id = ( Integer ) value;
break;
case EstadoMedidas.DESCRICAO_INDEX:
this.descricao = ( String ) value;
break;
case EstadoMedidas.ORDEM_INDEX:
this.ordem = ( Integer ) value;
break;
case EstadoMedidas.ACTIVO_INDEX:
this.activo = ( String ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case EstadoMedidas.ID_INDEX:
theClass = Integer.class;
break;
case EstadoMedidas.DESCRICAO_INDEX:
theClass = String.class;
break;
case EstadoMedidas.ORDEM_INDEX:
theClass = Integer.class;
break;
case EstadoMedidas.ACTIVO_INDEX:
theClass = String.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : EstadoMedidas._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, EstadoMedidas.PK_FIELD_NAMES );
Object idObject = array.get( row, col + 0 );
try
{
primaryKey.set( 0, ( Integer ) idObject );
setId( ( Integer ) idObject );
}
catch( ClassCastException ex )
{
if( idObject instanceof Number )
{
primaryKey.set( 0, ((Number)idObject).intValue() );
setId( ((Number)idObject).intValue() );
}
else {
throw ex;
}
}
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,426 +0,0 @@
/*
* ExamesPerfis.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class ExamesPerfis extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( ExamesPerfis.ID, ExamesPerfis.ID_INDEX );
FIELD_INDEXES.put( ExamesPerfis.ID_FULL, ExamesPerfis.ID_INDEX );
FIELD_INDEXES.put( ExamesPerfis.PERFIL, ExamesPerfis.PERFIL_INDEX );
FIELD_INDEXES.put( ExamesPerfis.PERFIL_FULL, ExamesPerfis.PERFIL_INDEX );
com.evolute.entity.evo.EvoDataObject.register( ExamesPerfis.CLASS_IDENTIFIER, ExamesPerfis.TIPO, ExamesPerfis.TO_TIPO );
FIELD_INDEXES.put( ExamesPerfis.TIPO, ExamesPerfis.TIPO_INDEX );
FIELD_INDEXES.put( ExamesPerfis.TIPO_FULL, ExamesPerfis.TIPO_INDEX );
FIELD_INDEXES.put( ExamesPerfis.TO_TIPO, ExamesPerfis.TO_TIPO_INDEX );
FIELD_INDEXES.put( ExamesPerfis.MULTIPLICADOR, ExamesPerfis.MULTIPLICADOR_INDEX );
FIELD_INDEXES.put( ExamesPerfis.MULTIPLICADOR_FULL, ExamesPerfis.MULTIPLICADOR_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final com.evolute.entity.ForeignKey ForeignKeytipoTotipos_exames_comp =
new com.evolute.entity.ForeignKey( ExamesPerfis.class, ExamesPerfis.TIPO, db.data.siprp.outer.TiposExamesCompData.class, db.data.siprp.outer.TiposExamesCompData.ID );
public static final String TABLENAME = "exames_perfis";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.exames_perfis";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "exames_perfis.id";
public static final int ID_INDEX = 0;
public static final String PERFIL = "perfil";
public static final String PERFIL_FULL = "exames_perfis.perfil";
public static final int PERFIL_INDEX = 1;
public static final String TIPO = "tipo";
public static final String TIPO_FULL = "exames_perfis.tipo";
public static final int TIPO_INDEX = 2;
public static final String TO_TIPO = "to_tipo";
public static final String TO_TIPO_FULL = "exames_perfis.to_tipo";
public static final int TO_TIPO_INDEX = 3;
public static final String MULTIPLICADOR = "multiplicador";
public static final String MULTIPLICADOR_FULL = "exames_perfis.multiplicador";
public static final int MULTIPLICADOR_INDEX = 4;
public static final String FIELD_NAMES[] = new String[]{
PERFIL, TIPO, TO_TIPO, MULTIPLICADOR, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + PERFIL, TABLENAME + "." + TIPO, TABLENAME + "." + TO_TIPO, TABLENAME + "." + MULTIPLICADOR, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, PERFIL, TIPO, MULTIPLICADOR, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, PERFIL, TIPO, MULTIPLICADOR, };
private Integer id;
private Integer perfil;
private Integer tipo;
private db.data.siprp.outer.TiposExamesCompData to_tipo;
private Integer multiplicador;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public ExamesPerfis()
{
super();
dirtyProperties = new boolean[]{ false, false, false
, false, false };
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public Integer getPerfil()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( PERFIL );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.perfil;
}
public void setPerfil( Integer perfil )
{
try
{
preProcess( PERFIL, perfil );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.perfil = perfil;
LAZY_LOADED_OBJECTS.put( PERFIL, Boolean.TRUE );
}
public Integer getTipo()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( TIPO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.tipo;
}
public void setTipo( Integer tipo )
{
try
{
preProcess( TIPO, tipo );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.tipo = tipo;
LAZY_LOADED_OBJECTS.put( TIPO, Boolean.TRUE );
}
public db.data.siprp.outer.TiposExamesCompData toTipo()
{
try
{
prepare( TO_TIPO );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
return this.to_tipo;
}
public void setToTipo( db.data.siprp.outer.TiposExamesCompData to_tipo )
{
try
{
preProcess( TO_TIPO, to_tipo );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.to_tipo = to_tipo;
}
public Integer getMultiplicador()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( MULTIPLICADOR );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.multiplicador;
}
public void setMultiplicador( Integer multiplicador )
{
try
{
preProcess( MULTIPLICADOR, multiplicador );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.multiplicador = multiplicador;
LAZY_LOADED_OBJECTS.put( MULTIPLICADOR, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case ExamesPerfis.ID_INDEX:
value = getId();
break;
case ExamesPerfis.PERFIL_INDEX:
value = getPerfil();
break;
case ExamesPerfis.TIPO_INDEX:
value = getTipo();
break;
case ExamesPerfis.TO_TIPO_INDEX:
value = toTipo();
break;
case ExamesPerfis.MULTIPLICADOR_INDEX:
value = getMultiplicador();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case ExamesPerfis.ID_INDEX:
value = this.id;
break;
case ExamesPerfis.PERFIL_INDEX:
value = this.perfil;
break;
case ExamesPerfis.TIPO_INDEX:
value = this.tipo;
break;
case ExamesPerfis.TO_TIPO_INDEX:
value = this.to_tipo;
break;
case ExamesPerfis.MULTIPLICADOR_INDEX:
value = this.multiplicador;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case ExamesPerfis.ID_INDEX:
setId( ( Integer ) value );
break;
case ExamesPerfis.PERFIL_INDEX:
setPerfil( ( Integer ) value );
break;
case ExamesPerfis.TIPO_INDEX:
setTipo( ( Integer ) value );
break;
case ExamesPerfis.TO_TIPO_INDEX:
setToTipo( ( db.data.siprp.outer.TiposExamesCompData ) value );
break;
case ExamesPerfis.MULTIPLICADOR_INDEX:
setMultiplicador( ( Integer ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case ExamesPerfis.ID_INDEX:
this.id = ( Integer ) value;
break;
case ExamesPerfis.PERFIL_INDEX:
this.perfil = ( Integer ) value;
break;
case ExamesPerfis.TIPO_INDEX:
this.tipo = ( Integer ) value;
break;
case ExamesPerfis.TO_TIPO_INDEX:
this.to_tipo = ( db.data.siprp.outer.TiposExamesCompData ) value;
break;
case ExamesPerfis.MULTIPLICADOR_INDEX:
this.multiplicador = ( Integer ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case ExamesPerfis.ID_INDEX:
theClass = Integer.class;
break;
case ExamesPerfis.PERFIL_INDEX:
theClass = Integer.class;
break;
case ExamesPerfis.TIPO_INDEX:
theClass = Integer.class;
break;
case ExamesPerfis.TO_TIPO_INDEX:
theClass = db.data.siprp.outer.TiposExamesCompData.class;
break;
case ExamesPerfis.MULTIPLICADOR_INDEX:
theClass = Integer.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : ExamesPerfis._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, ExamesPerfis.PK_FIELD_NAMES );
primaryKey.set( 0, getId() );
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,426 +0,0 @@
/*
* HistoricoEstabelecimento.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class HistoricoEstabelecimento extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( HistoricoEstabelecimento.ID, HistoricoEstabelecimento.ID_INDEX );
FIELD_INDEXES.put( HistoricoEstabelecimento.ID_FULL, HistoricoEstabelecimento.ID_INDEX );
com.evolute.entity.evo.EvoDataObject.register( HistoricoEstabelecimento.CLASS_IDENTIFIER, HistoricoEstabelecimento.ESTABELECIMENTO_ID, HistoricoEstabelecimento.TO_ESTABELECIMENTO_ID );
FIELD_INDEXES.put( HistoricoEstabelecimento.ESTABELECIMENTO_ID, HistoricoEstabelecimento.ESTABELECIMENTO_ID_INDEX );
FIELD_INDEXES.put( HistoricoEstabelecimento.ESTABELECIMENTO_ID_FULL, HistoricoEstabelecimento.ESTABELECIMENTO_ID_INDEX );
FIELD_INDEXES.put( HistoricoEstabelecimento.TO_ESTABELECIMENTO_ID, HistoricoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX );
FIELD_INDEXES.put( HistoricoEstabelecimento.DATA, HistoricoEstabelecimento.DATA_INDEX );
FIELD_INDEXES.put( HistoricoEstabelecimento.DATA_FULL, HistoricoEstabelecimento.DATA_INDEX );
FIELD_INDEXES.put( HistoricoEstabelecimento.TEXTO, HistoricoEstabelecimento.TEXTO_INDEX );
FIELD_INDEXES.put( HistoricoEstabelecimento.TEXTO_FULL, HistoricoEstabelecimento.TEXTO_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos =
new com.evolute.entity.ForeignKey( HistoricoEstabelecimento.class, HistoricoEstabelecimento.ESTABELECIMENTO_ID, db.data.siprp.outer.EstabelecimentosData.class, db.data.siprp.outer.EstabelecimentosData.ID );
public static final String TABLENAME = "historico_estabelecimento";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.historico_estabelecimento";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "historico_estabelecimento.id";
public static final int ID_INDEX = 0;
public static final String ESTABELECIMENTO_ID = "estabelecimento_id";
public static final String ESTABELECIMENTO_ID_FULL = "historico_estabelecimento.estabelecimento_id";
public static final int ESTABELECIMENTO_ID_INDEX = 1;
public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id";
public static final String TO_ESTABELECIMENTO_ID_FULL = "historico_estabelecimento.to_estabelecimento_id";
public static final int TO_ESTABELECIMENTO_ID_INDEX = 2;
public static final String DATA = "data";
public static final String DATA_FULL = "historico_estabelecimento.data";
public static final int DATA_INDEX = 3;
public static final String TEXTO = "texto";
public static final String TEXTO_FULL = "historico_estabelecimento.texto";
public static final int TEXTO_INDEX = 4;
public static final String FIELD_NAMES[] = new String[]{
ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID, DATA, TEXTO, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + ESTABELECIMENTO_ID, TABLENAME + "." + TO_ESTABELECIMENTO_ID, TABLENAME + "." + DATA, TABLENAME + "." + TEXTO, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, ESTABELECIMENTO_ID, DATA, TEXTO, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, ESTABELECIMENTO_ID, DATA, TEXTO, };
private Integer id;
private Integer estabelecimento_id;
private db.data.siprp.outer.EstabelecimentosData to_estabelecimento_id;
private java.util.Date data;
private String texto;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public HistoricoEstabelecimento()
{
super();
dirtyProperties = new boolean[]{ false, false, false,
false, false };
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public Integer getEstabelecimento_id()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ESTABELECIMENTO_ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.estabelecimento_id;
}
public void setEstabelecimento_id( Integer estabelecimento_id )
{
try
{
preProcess( ESTABELECIMENTO_ID, estabelecimento_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.estabelecimento_id = estabelecimento_id;
LAZY_LOADED_OBJECTS.put( ESTABELECIMENTO_ID, Boolean.TRUE );
}
public db.data.siprp.outer.EstabelecimentosData toEstabelecimento_id()
{
try
{
prepare( TO_ESTABELECIMENTO_ID );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
return this.to_estabelecimento_id;
}
public void setToEstabelecimento_id( db.data.siprp.outer.EstabelecimentosData to_estabelecimento_id )
{
try
{
preProcess( TO_ESTABELECIMENTO_ID, to_estabelecimento_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.to_estabelecimento_id = to_estabelecimento_id;
}
public java.util.Date getData()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DATA );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.data;
}
public void setData( java.util.Date data )
{
try
{
preProcess( DATA, data );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.data = data;
LAZY_LOADED_OBJECTS.put( DATA, Boolean.TRUE );
}
public String getTexto()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( TEXTO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.texto;
}
public void setTexto( String texto )
{
try
{
preProcess( TEXTO, texto );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.texto = texto;
LAZY_LOADED_OBJECTS.put( TEXTO, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case HistoricoEstabelecimento.ID_INDEX:
value = getId();
break;
case HistoricoEstabelecimento.ESTABELECIMENTO_ID_INDEX:
value = getEstabelecimento_id();
break;
case HistoricoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX:
value = toEstabelecimento_id();
break;
case HistoricoEstabelecimento.DATA_INDEX:
value = getData();
break;
case HistoricoEstabelecimento.TEXTO_INDEX:
value = getTexto();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case HistoricoEstabelecimento.ID_INDEX:
value = this.id;
break;
case HistoricoEstabelecimento.ESTABELECIMENTO_ID_INDEX:
value = this.estabelecimento_id;
break;
case HistoricoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX:
value = this.to_estabelecimento_id;
break;
case HistoricoEstabelecimento.DATA_INDEX:
value = this.data;
break;
case HistoricoEstabelecimento.TEXTO_INDEX:
value = this.texto;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case HistoricoEstabelecimento.ID_INDEX:
setId( ( Integer ) value );
break;
case HistoricoEstabelecimento.ESTABELECIMENTO_ID_INDEX:
setEstabelecimento_id( ( Integer ) value );
break;
case HistoricoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX:
setToEstabelecimento_id( ( db.data.siprp.outer.EstabelecimentosData ) value );
break;
case HistoricoEstabelecimento.DATA_INDEX:
setData( ( java.util.Date ) value );
break;
case HistoricoEstabelecimento.TEXTO_INDEX:
setTexto( ( String ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case HistoricoEstabelecimento.ID_INDEX:
this.id = ( Integer ) value;
break;
case HistoricoEstabelecimento.ESTABELECIMENTO_ID_INDEX:
this.estabelecimento_id = ( Integer ) value;
break;
case HistoricoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX:
this.to_estabelecimento_id = ( db.data.siprp.outer.EstabelecimentosData ) value;
break;
case HistoricoEstabelecimento.DATA_INDEX:
this.data = ( java.util.Date ) value;
break;
case HistoricoEstabelecimento.TEXTO_INDEX:
this.texto = ( String ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case HistoricoEstabelecimento.ID_INDEX:
theClass = Integer.class;
break;
case HistoricoEstabelecimento.ESTABELECIMENTO_ID_INDEX:
theClass = Integer.class;
break;
case HistoricoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX:
theClass = db.data.siprp.outer.EstabelecimentosData.class;
break;
case HistoricoEstabelecimento.DATA_INDEX:
theClass = java.util.Date.class;
break;
case HistoricoEstabelecimento.TEXTO_INDEX:
theClass = String.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : HistoricoEstabelecimento._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, HistoricoEstabelecimento.PK_FIELD_NAMES );
primaryKey.set( 0, getId() );
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,475 +0,0 @@
/*
* MarcacoesEmpresa.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class MarcacoesEmpresa extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( MarcacoesEmpresa.ID, MarcacoesEmpresa.ID_INDEX );
FIELD_INDEXES.put( MarcacoesEmpresa.ID_FULL, MarcacoesEmpresa.ID_INDEX );
FIELD_INDEXES.put( MarcacoesEmpresa.DATA, MarcacoesEmpresa.DATA_INDEX );
FIELD_INDEXES.put( MarcacoesEmpresa.DATA_FULL, MarcacoesEmpresa.DATA_INDEX );
FIELD_INDEXES.put( MarcacoesEmpresa.TEXTO, MarcacoesEmpresa.TEXTO_INDEX );
FIELD_INDEXES.put( MarcacoesEmpresa.TEXTO_FULL, MarcacoesEmpresa.TEXTO_INDEX );
com.evolute.entity.evo.EvoDataObject.register( MarcacoesEmpresa.CLASS_IDENTIFIER, MarcacoesEmpresa.EMPRESA_ID, MarcacoesEmpresa.TO_EMPRESA_ID );
FIELD_INDEXES.put( MarcacoesEmpresa.EMPRESA_ID, MarcacoesEmpresa.EMPRESA_ID_INDEX );
FIELD_INDEXES.put( MarcacoesEmpresa.EMPRESA_ID_FULL, MarcacoesEmpresa.EMPRESA_ID_INDEX );
FIELD_INDEXES.put( MarcacoesEmpresa.TO_EMPRESA_ID, MarcacoesEmpresa.TO_EMPRESA_ID_INDEX );
FIELD_INDEXES.put( MarcacoesEmpresa.REALIZADA, MarcacoesEmpresa.REALIZADA_INDEX );
FIELD_INDEXES.put( MarcacoesEmpresa.REALIZADA_FULL, MarcacoesEmpresa.REALIZADA_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas =
new com.evolute.entity.ForeignKey( MarcacoesEmpresa.class, MarcacoesEmpresa.EMPRESA_ID, db.data.siprp.outer.EmpresasData.class, db.data.siprp.outer.EmpresasData.ID );
public static final String TABLENAME = "marcacoes_empresa";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.marcacoes_empresa";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "marcacoes_empresa.id";
public static final int ID_INDEX = 0;
public static final String DATA = "data";
public static final String DATA_FULL = "marcacoes_empresa.data";
public static final int DATA_INDEX = 1;
public static final String TEXTO = "texto";
public static final String TEXTO_FULL = "marcacoes_empresa.texto";
public static final int TEXTO_INDEX = 2;
public static final String EMPRESA_ID = "empresa_id";
public static final String EMPRESA_ID_FULL = "marcacoes_empresa.empresa_id";
public static final int EMPRESA_ID_INDEX = 3;
public static final String TO_EMPRESA_ID = "to_empresa_id";
public static final String TO_EMPRESA_ID_FULL = "marcacoes_empresa.to_empresa_id";
public static final int TO_EMPRESA_ID_INDEX = 4;
public static final String REALIZADA = "realizada";
public static final String REALIZADA_FULL = "marcacoes_empresa.realizada";
public static final int REALIZADA_INDEX = 5;
public static final String FIELD_NAMES[] = new String[]{
DATA, TEXTO, EMPRESA_ID, TO_EMPRESA_ID, REALIZADA, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + DATA, TABLENAME + "." + TEXTO, TABLENAME + "." + EMPRESA_ID, TABLENAME + "." + TO_EMPRESA_ID, TABLENAME + "." + REALIZADA, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, DATA, TEXTO, EMPRESA_ID, REALIZADA, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, DATA, TEXTO, EMPRESA_ID, REALIZADA, };
private Integer id;
private java.util.Date data;
private String texto;
private Integer empresa_id;
private db.data.siprp.outer.EmpresasData to_empresa_id;
private String realizada;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public MarcacoesEmpresa()
{
super();
dirtyProperties = new boolean[]{ false, false, false,
false, false, false };
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public java.util.Date getData()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DATA );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.data;
}
public void setData( java.util.Date data )
{
try
{
preProcess( DATA, data );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.data = data;
LAZY_LOADED_OBJECTS.put( DATA, Boolean.TRUE );
}
public String getTexto()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( TEXTO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.texto;
}
public void setTexto( String texto )
{
try
{
preProcess( TEXTO, texto );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.texto = texto;
LAZY_LOADED_OBJECTS.put( TEXTO, Boolean.TRUE );
}
public Integer getEmpresa_id()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( EMPRESA_ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.empresa_id;
}
public void setEmpresa_id( Integer empresa_id )
{
try
{
preProcess( EMPRESA_ID, empresa_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.empresa_id = empresa_id;
LAZY_LOADED_OBJECTS.put( EMPRESA_ID, Boolean.TRUE );
}
public db.data.siprp.outer.EmpresasData toEmpresa_id()
{
try
{
prepare( TO_EMPRESA_ID );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
return this.to_empresa_id;
}
public void setToEmpresa_id( db.data.siprp.outer.EmpresasData to_empresa_id )
{
try
{
preProcess( TO_EMPRESA_ID, to_empresa_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.to_empresa_id = to_empresa_id;
}
public String getRealizada()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( REALIZADA );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.realizada;
}
public void setRealizada( String realizada )
{
try
{
preProcess( REALIZADA, realizada );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.realizada = realizada;
LAZY_LOADED_OBJECTS.put( REALIZADA, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case MarcacoesEmpresa.ID_INDEX:
value = getId();
break;
case MarcacoesEmpresa.DATA_INDEX:
value = getData();
break;
case MarcacoesEmpresa.TEXTO_INDEX:
value = getTexto();
break;
case MarcacoesEmpresa.EMPRESA_ID_INDEX:
value = getEmpresa_id();
break;
case MarcacoesEmpresa.TO_EMPRESA_ID_INDEX:
value = toEmpresa_id();
break;
case MarcacoesEmpresa.REALIZADA_INDEX:
value = getRealizada();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case MarcacoesEmpresa.ID_INDEX:
value = this.id;
break;
case MarcacoesEmpresa.DATA_INDEX:
value = this.data;
break;
case MarcacoesEmpresa.TEXTO_INDEX:
value = this.texto;
break;
case MarcacoesEmpresa.EMPRESA_ID_INDEX:
value = this.empresa_id;
break;
case MarcacoesEmpresa.TO_EMPRESA_ID_INDEX:
value = this.to_empresa_id;
break;
case MarcacoesEmpresa.REALIZADA_INDEX:
value = this.realizada;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case MarcacoesEmpresa.ID_INDEX:
setId( ( Integer ) value );
break;
case MarcacoesEmpresa.DATA_INDEX:
setData( ( java.util.Date ) value );
break;
case MarcacoesEmpresa.TEXTO_INDEX:
setTexto( ( String ) value );
break;
case MarcacoesEmpresa.EMPRESA_ID_INDEX:
setEmpresa_id( ( Integer ) value );
break;
case MarcacoesEmpresa.TO_EMPRESA_ID_INDEX:
setToEmpresa_id( ( db.data.siprp.outer.EmpresasData ) value );
break;
case MarcacoesEmpresa.REALIZADA_INDEX:
setRealizada( ( String ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case MarcacoesEmpresa.ID_INDEX:
this.id = ( Integer ) value;
break;
case MarcacoesEmpresa.DATA_INDEX:
this.data = ( java.util.Date ) value;
break;
case MarcacoesEmpresa.TEXTO_INDEX:
this.texto = ( String ) value;
break;
case MarcacoesEmpresa.EMPRESA_ID_INDEX:
this.empresa_id = ( Integer ) value;
break;
case MarcacoesEmpresa.TO_EMPRESA_ID_INDEX:
this.to_empresa_id = ( db.data.siprp.outer.EmpresasData ) value;
break;
case MarcacoesEmpresa.REALIZADA_INDEX:
this.realizada = ( String ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case MarcacoesEmpresa.ID_INDEX:
theClass = Integer.class;
break;
case MarcacoesEmpresa.DATA_INDEX:
theClass = java.util.Date.class;
break;
case MarcacoesEmpresa.TEXTO_INDEX:
theClass = String.class;
break;
case MarcacoesEmpresa.EMPRESA_ID_INDEX:
theClass = Integer.class;
break;
case MarcacoesEmpresa.TO_EMPRESA_ID_INDEX:
theClass = db.data.siprp.outer.EmpresasData.class;
break;
case MarcacoesEmpresa.REALIZADA_INDEX:
theClass = String.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : MarcacoesEmpresa._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, MarcacoesEmpresa.PK_FIELD_NAMES );
primaryKey.set( 0, getId() );
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,474 +0,0 @@
/*
* MarcacoesEstabelecimento.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class MarcacoesEstabelecimento extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( MarcacoesEstabelecimento.ID, MarcacoesEstabelecimento.ID_INDEX );
FIELD_INDEXES.put( MarcacoesEstabelecimento.ID_FULL, MarcacoesEstabelecimento.ID_INDEX );
FIELD_INDEXES.put( MarcacoesEstabelecimento.DATA, MarcacoesEstabelecimento.DATA_INDEX );
FIELD_INDEXES.put( MarcacoesEstabelecimento.DATA_FULL, MarcacoesEstabelecimento.DATA_INDEX );
FIELD_INDEXES.put( MarcacoesEstabelecimento.REALIZADA, MarcacoesEstabelecimento.REALIZADA_INDEX );
FIELD_INDEXES.put( MarcacoesEstabelecimento.REALIZADA_FULL, MarcacoesEstabelecimento.REALIZADA_INDEX );
FIELD_INDEXES.put( MarcacoesEstabelecimento.DATA_EMAIL, MarcacoesEstabelecimento.DATA_EMAIL_INDEX );
FIELD_INDEXES.put( MarcacoesEstabelecimento.DATA_EMAIL_FULL, MarcacoesEstabelecimento.DATA_EMAIL_INDEX );
FIELD_INDEXES.put( MarcacoesEstabelecimento.DATA_RELATORIO, MarcacoesEstabelecimento.DATA_RELATORIO_INDEX );
FIELD_INDEXES.put( MarcacoesEstabelecimento.DATA_RELATORIO_FULL, MarcacoesEstabelecimento.DATA_RELATORIO_INDEX );
FIELD_INDEXES.put( MarcacoesEstabelecimento.ESTABELECIMENTO_ID, MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX );
FIELD_INDEXES.put( MarcacoesEstabelecimento.ESTABELECIMENTO_ID_FULL, MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final String TABLENAME = "marcacoes_estabelecimento";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.marcacoes_estabelecimento";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "marcacoes_estabelecimento.id";
public static final int ID_INDEX = 0;
public static final String DATA = "data";
public static final String DATA_FULL = "marcacoes_estabelecimento.data";
public static final int DATA_INDEX = 1;
public static final String REALIZADA = "realizada";
public static final String REALIZADA_FULL = "marcacoes_estabelecimento.realizada";
public static final int REALIZADA_INDEX = 2;
public static final String DATA_EMAIL = "data_email";
public static final String DATA_EMAIL_FULL = "marcacoes_estabelecimento.data_email";
public static final int DATA_EMAIL_INDEX = 3;
public static final String DATA_RELATORIO = "data_relatorio";
public static final String DATA_RELATORIO_FULL = "marcacoes_estabelecimento.data_relatorio";
public static final int DATA_RELATORIO_INDEX = 4;
public static final String ESTABELECIMENTO_ID = "estabelecimento_id";
public static final String ESTABELECIMENTO_ID_FULL = "marcacoes_estabelecimento.estabelecimento_id";
public static final int ESTABELECIMENTO_ID_INDEX = 5;
public static final String FIELD_NAMES[] = new String[]{
DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, ESTABELECIMENTO_ID, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + DATA, TABLENAME + "." + REALIZADA, TABLENAME + "." + DATA_EMAIL, TABLENAME + "." + DATA_RELATORIO, TABLENAME + "." + ESTABELECIMENTO_ID, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, ESTABELECIMENTO_ID, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, ESTABELECIMENTO_ID, };
private Integer id;
private java.util.Date data;
private String realizada;
private java.util.Date data_email;
private java.util.Date data_relatorio;
private Integer estabelecimento_id;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public MarcacoesEstabelecimento()
{
super();
dirtyProperties = new boolean[]{ false, false, false,
false, false, false };
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public java.util.Date getData()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DATA );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.data;
}
public void setData( java.util.Date data )
{
try
{
preProcess( DATA, data );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.data = data;
LAZY_LOADED_OBJECTS.put( DATA, Boolean.TRUE );
}
public String getRealizada()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( REALIZADA );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.realizada;
}
public void setRealizada( String realizada )
{
try
{
preProcess( REALIZADA, realizada );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.realizada = realizada;
LAZY_LOADED_OBJECTS.put( REALIZADA, Boolean.TRUE );
}
public java.util.Date getData_email()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DATA_EMAIL );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.data_email;
}
public void setData_email( java.util.Date data_email )
{
try
{
preProcess( DATA_EMAIL, data_email );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.data_email = data_email;
LAZY_LOADED_OBJECTS.put( DATA_EMAIL, Boolean.TRUE );
}
public java.util.Date getData_relatorio()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DATA_RELATORIO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.data_relatorio;
}
public void setData_relatorio( java.util.Date data_relatorio )
{
try
{
preProcess( DATA_RELATORIO, data_relatorio );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.data_relatorio = data_relatorio;
LAZY_LOADED_OBJECTS.put( DATA_RELATORIO, Boolean.TRUE );
}
public Integer getEstabelecimento_id()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ESTABELECIMENTO_ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.estabelecimento_id;
}
public void setEstabelecimento_id( Integer estabelecimento_id )
{
try
{
preProcess( ESTABELECIMENTO_ID, estabelecimento_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.estabelecimento_id = estabelecimento_id;
LAZY_LOADED_OBJECTS.put( ESTABELECIMENTO_ID, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case MarcacoesEstabelecimento.ID_INDEX:
value = getId();
break;
case MarcacoesEstabelecimento.DATA_INDEX:
value = getData();
break;
case MarcacoesEstabelecimento.REALIZADA_INDEX:
value = getRealizada();
break;
case MarcacoesEstabelecimento.DATA_EMAIL_INDEX:
value = getData_email();
break;
case MarcacoesEstabelecimento.DATA_RELATORIO_INDEX:
value = getData_relatorio();
break;
case MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX:
value = getEstabelecimento_id();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case MarcacoesEstabelecimento.ID_INDEX:
value = this.id;
break;
case MarcacoesEstabelecimento.DATA_INDEX:
value = this.data;
break;
case MarcacoesEstabelecimento.REALIZADA_INDEX:
value = this.realizada;
break;
case MarcacoesEstabelecimento.DATA_EMAIL_INDEX:
value = this.data_email;
break;
case MarcacoesEstabelecimento.DATA_RELATORIO_INDEX:
value = this.data_relatorio;
break;
case MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX:
value = this.estabelecimento_id;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case MarcacoesEstabelecimento.ID_INDEX:
setId( ( Integer ) value );
break;
case MarcacoesEstabelecimento.DATA_INDEX:
setData( ( java.util.Date ) value );
break;
case MarcacoesEstabelecimento.REALIZADA_INDEX:
setRealizada( ( String ) value );
break;
case MarcacoesEstabelecimento.DATA_EMAIL_INDEX:
setData_email( ( java.util.Date ) value );
break;
case MarcacoesEstabelecimento.DATA_RELATORIO_INDEX:
setData_relatorio( ( java.util.Date ) value );
break;
case MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX:
setEstabelecimento_id( ( Integer ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case MarcacoesEstabelecimento.ID_INDEX:
this.id = ( Integer ) value;
break;
case MarcacoesEstabelecimento.DATA_INDEX:
this.data = ( java.util.Date ) value;
break;
case MarcacoesEstabelecimento.REALIZADA_INDEX:
this.realizada = ( String ) value;
break;
case MarcacoesEstabelecimento.DATA_EMAIL_INDEX:
this.data_email = ( java.util.Date ) value;
break;
case MarcacoesEstabelecimento.DATA_RELATORIO_INDEX:
this.data_relatorio = ( java.util.Date ) value;
break;
case MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX:
this.estabelecimento_id = ( Integer ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case MarcacoesEstabelecimento.ID_INDEX:
theClass = Integer.class;
break;
case MarcacoesEstabelecimento.DATA_INDEX:
theClass = java.util.Date.class;
break;
case MarcacoesEstabelecimento.REALIZADA_INDEX:
theClass = String.class;
break;
case MarcacoesEstabelecimento.DATA_EMAIL_INDEX:
theClass = java.util.Date.class;
break;
case MarcacoesEstabelecimento.DATA_RELATORIO_INDEX:
theClass = java.util.Date.class;
break;
case MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX:
theClass = Integer.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : MarcacoesEstabelecimento._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, MarcacoesEstabelecimento.PK_FIELD_NAMES );
primaryKey.set( 0, getId() );
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,575 +0,0 @@
/*
* MarcacoesTrabalhador.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class MarcacoesTrabalhador extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( MarcacoesTrabalhador.ID, MarcacoesTrabalhador.ID_INDEX );
FIELD_INDEXES.put( MarcacoesTrabalhador.ID_FULL, MarcacoesTrabalhador.ID_INDEX );
FIELD_INDEXES.put( MarcacoesTrabalhador.DATA, MarcacoesTrabalhador.DATA_INDEX );
FIELD_INDEXES.put( MarcacoesTrabalhador.DATA_FULL, MarcacoesTrabalhador.DATA_INDEX );
FIELD_INDEXES.put( MarcacoesTrabalhador.REALIZADA, MarcacoesTrabalhador.REALIZADA_INDEX );
FIELD_INDEXES.put( MarcacoesTrabalhador.REALIZADA_FULL, MarcacoesTrabalhador.REALIZADA_INDEX );
FIELD_INDEXES.put( MarcacoesTrabalhador.DATA_EMAIL, MarcacoesTrabalhador.DATA_EMAIL_INDEX );
FIELD_INDEXES.put( MarcacoesTrabalhador.DATA_EMAIL_FULL, MarcacoesTrabalhador.DATA_EMAIL_INDEX );
FIELD_INDEXES.put( MarcacoesTrabalhador.DATA_RELATORIO, MarcacoesTrabalhador.DATA_RELATORIO_INDEX );
FIELD_INDEXES.put( MarcacoesTrabalhador.DATA_RELATORIO_FULL, MarcacoesTrabalhador.DATA_RELATORIO_INDEX );
FIELD_INDEXES.put( MarcacoesTrabalhador.TIPO, MarcacoesTrabalhador.TIPO_INDEX );
FIELD_INDEXES.put( MarcacoesTrabalhador.TIPO_FULL, MarcacoesTrabalhador.TIPO_INDEX );
com.evolute.entity.evo.EvoDataObject.register( MarcacoesTrabalhador.CLASS_IDENTIFIER, MarcacoesTrabalhador.TRABALHADOR_ID, MarcacoesTrabalhador.TO_TRABALHADOR_ID );
FIELD_INDEXES.put( MarcacoesTrabalhador.TRABALHADOR_ID, MarcacoesTrabalhador.TRABALHADOR_ID_INDEX );
FIELD_INDEXES.put( MarcacoesTrabalhador.TRABALHADOR_ID_FULL, MarcacoesTrabalhador.TRABALHADOR_ID_INDEX );
FIELD_INDEXES.put( MarcacoesTrabalhador.TO_TRABALHADOR_ID, MarcacoesTrabalhador.TO_TRABALHADOR_ID_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final com.evolute.entity.ForeignKey ForeignKeytrabalhador_idTotrabalhadores =
new com.evolute.entity.ForeignKey( MarcacoesTrabalhador.class, MarcacoesTrabalhador.TRABALHADOR_ID, db.data.siprp.outer.TrabalhadoresData.class, db.data.siprp.outer.TrabalhadoresData.ID );
public static final String TABLENAME = "marcacoes_trabalhador";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.marcacoes_trabalhador";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "marcacoes_trabalhador.id";
public static final int ID_INDEX = 0;
public static final String DATA = "data";
public static final String DATA_FULL = "marcacoes_trabalhador.data";
public static final int DATA_INDEX = 1;
public static final String REALIZADA = "realizada";
public static final String REALIZADA_FULL = "marcacoes_trabalhador.realizada";
public static final int REALIZADA_INDEX = 2;
public static final String DATA_EMAIL = "data_email";
public static final String DATA_EMAIL_FULL = "marcacoes_trabalhador.data_email";
public static final int DATA_EMAIL_INDEX = 3;
public static final String DATA_RELATORIO = "data_relatorio";
public static final String DATA_RELATORIO_FULL = "marcacoes_trabalhador.data_relatorio";
public static final int DATA_RELATORIO_INDEX = 4;
public static final String TIPO = "tipo";
public static final String TIPO_FULL = "marcacoes_trabalhador.tipo";
public static final int TIPO_INDEX = 5;
public static final String TRABALHADOR_ID = "trabalhador_id";
public static final String TRABALHADOR_ID_FULL = "marcacoes_trabalhador.trabalhador_id";
public static final int TRABALHADOR_ID_INDEX = 6;
public static final String TO_TRABALHADOR_ID = "to_trabalhador_id";
public static final String TO_TRABALHADOR_ID_FULL = "marcacoes_trabalhador.to_trabalhador_id";
public static final int TO_TRABALHADOR_ID_INDEX = 7;
public static final String FIELD_NAMES[] = new String[]{
DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, TIPO, TRABALHADOR_ID,
TO_TRABALHADOR_ID, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + DATA, TABLENAME + "." + REALIZADA, TABLENAME + "." + DATA_EMAIL, TABLENAME + "." + DATA_RELATORIO, TABLENAME + "." + TIPO, TABLENAME + "." + TRABALHADOR_ID,
TABLENAME + "." + TO_TRABALHADOR_ID, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, TIPO, TRABALHADOR_ID, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, TIPO, TRABALHADOR_ID, };
private Integer id;
private java.util.Date data;
private String realizada;
private java.util.Date data_email;
private java.util.Date data_relatorio;
private Integer tipo;
private Integer trabalhador_id;
private db.data.siprp.outer.TrabalhadoresData to_trabalhador_id;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public MarcacoesTrabalhador()
{
super();
dirtyProperties = new boolean[]{ false, false, false,
false, false, false, false, false };
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public java.util.Date getData()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DATA );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.data;
}
public void setData( java.util.Date data )
{
try
{
preProcess( DATA, data );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.data = data;
LAZY_LOADED_OBJECTS.put( DATA, Boolean.TRUE );
}
public String getRealizada()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( REALIZADA );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.realizada;
}
public void setRealizada( String realizada )
{
try
{
preProcess( REALIZADA, realizada );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.realizada = realizada;
LAZY_LOADED_OBJECTS.put( REALIZADA, Boolean.TRUE );
}
public java.util.Date getData_email()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DATA_EMAIL );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.data_email;
}
public void setData_email( java.util.Date data_email )
{
try
{
preProcess( DATA_EMAIL, data_email );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.data_email = data_email;
LAZY_LOADED_OBJECTS.put( DATA_EMAIL, Boolean.TRUE );
}
public java.util.Date getData_relatorio()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DATA_RELATORIO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.data_relatorio;
}
public void setData_relatorio( java.util.Date data_relatorio )
{
try
{
preProcess( DATA_RELATORIO, data_relatorio );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.data_relatorio = data_relatorio;
LAZY_LOADED_OBJECTS.put( DATA_RELATORIO, Boolean.TRUE );
}
public Integer getTipo()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( TIPO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.tipo;
}
public void setTipo( Integer tipo )
{
try
{
preProcess( TIPO, tipo );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.tipo = tipo;
LAZY_LOADED_OBJECTS.put( TIPO, Boolean.TRUE );
}
public Integer getTrabalhador_id()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( TRABALHADOR_ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.trabalhador_id;
}
public void setTrabalhador_id( Integer trabalhador_id )
{
try
{
preProcess( TRABALHADOR_ID, trabalhador_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.trabalhador_id = trabalhador_id;
LAZY_LOADED_OBJECTS.put( TRABALHADOR_ID, Boolean.TRUE );
}
public db.data.siprp.outer.TrabalhadoresData toTrabalhador_id()
{
try
{
prepare( TO_TRABALHADOR_ID );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
return this.to_trabalhador_id;
}
public void setToTrabalhador_id( db.data.siprp.outer.TrabalhadoresData to_trabalhador_id )
{
try
{
preProcess( TO_TRABALHADOR_ID, to_trabalhador_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.to_trabalhador_id = to_trabalhador_id;
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case MarcacoesTrabalhador.ID_INDEX:
value = getId();
break;
case MarcacoesTrabalhador.DATA_INDEX:
value = getData();
break;
case MarcacoesTrabalhador.REALIZADA_INDEX:
value = getRealizada();
break;
case MarcacoesTrabalhador.DATA_EMAIL_INDEX:
value = getData_email();
break;
case MarcacoesTrabalhador.DATA_RELATORIO_INDEX:
value = getData_relatorio();
break;
case MarcacoesTrabalhador.TIPO_INDEX:
value = getTipo();
break;
case MarcacoesTrabalhador.TRABALHADOR_ID_INDEX:
value = getTrabalhador_id();
break;
case MarcacoesTrabalhador.TO_TRABALHADOR_ID_INDEX:
value = toTrabalhador_id();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case MarcacoesTrabalhador.ID_INDEX:
value = this.id;
break;
case MarcacoesTrabalhador.DATA_INDEX:
value = this.data;
break;
case MarcacoesTrabalhador.REALIZADA_INDEX:
value = this.realizada;
break;
case MarcacoesTrabalhador.DATA_EMAIL_INDEX:
value = this.data_email;
break;
case MarcacoesTrabalhador.DATA_RELATORIO_INDEX:
value = this.data_relatorio;
break;
case MarcacoesTrabalhador.TIPO_INDEX:
value = this.tipo;
break;
case MarcacoesTrabalhador.TRABALHADOR_ID_INDEX:
value = this.trabalhador_id;
break;
case MarcacoesTrabalhador.TO_TRABALHADOR_ID_INDEX:
value = this.to_trabalhador_id;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case MarcacoesTrabalhador.ID_INDEX:
setId( ( Integer ) value );
break;
case MarcacoesTrabalhador.DATA_INDEX:
setData( ( java.util.Date ) value );
break;
case MarcacoesTrabalhador.REALIZADA_INDEX:
setRealizada( ( String ) value );
break;
case MarcacoesTrabalhador.DATA_EMAIL_INDEX:
setData_email( ( java.util.Date ) value );
break;
case MarcacoesTrabalhador.DATA_RELATORIO_INDEX:
setData_relatorio( ( java.util.Date ) value );
break;
case MarcacoesTrabalhador.TIPO_INDEX:
setTipo( ( Integer ) value );
break;
case MarcacoesTrabalhador.TRABALHADOR_ID_INDEX:
setTrabalhador_id( ( Integer ) value );
break;
case MarcacoesTrabalhador.TO_TRABALHADOR_ID_INDEX:
setToTrabalhador_id( ( db.data.siprp.outer.TrabalhadoresData ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case MarcacoesTrabalhador.ID_INDEX:
this.id = ( Integer ) value;
break;
case MarcacoesTrabalhador.DATA_INDEX:
this.data = ( java.util.Date ) value;
break;
case MarcacoesTrabalhador.REALIZADA_INDEX:
this.realizada = ( String ) value;
break;
case MarcacoesTrabalhador.DATA_EMAIL_INDEX:
this.data_email = ( java.util.Date ) value;
break;
case MarcacoesTrabalhador.DATA_RELATORIO_INDEX:
this.data_relatorio = ( java.util.Date ) value;
break;
case MarcacoesTrabalhador.TIPO_INDEX:
this.tipo = ( Integer ) value;
break;
case MarcacoesTrabalhador.TRABALHADOR_ID_INDEX:
this.trabalhador_id = ( Integer ) value;
break;
case MarcacoesTrabalhador.TO_TRABALHADOR_ID_INDEX:
this.to_trabalhador_id = ( db.data.siprp.outer.TrabalhadoresData ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case MarcacoesTrabalhador.ID_INDEX:
theClass = Integer.class;
break;
case MarcacoesTrabalhador.DATA_INDEX:
theClass = java.util.Date.class;
break;
case MarcacoesTrabalhador.REALIZADA_INDEX:
theClass = String.class;
break;
case MarcacoesTrabalhador.DATA_EMAIL_INDEX:
theClass = java.util.Date.class;
break;
case MarcacoesTrabalhador.DATA_RELATORIO_INDEX:
theClass = java.util.Date.class;
break;
case MarcacoesTrabalhador.TIPO_INDEX:
theClass = Integer.class;
break;
case MarcacoesTrabalhador.TRABALHADOR_ID_INDEX:
theClass = Integer.class;
break;
case MarcacoesTrabalhador.TO_TRABALHADOR_ID_INDEX:
theClass = db.data.siprp.outer.TrabalhadoresData.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : MarcacoesTrabalhador._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, MarcacoesTrabalhador.PK_FIELD_NAMES );
primaryKey.set( 0, getId() );
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,393 +0,0 @@
/*
* Medicos.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class Medicos extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( Medicos.ID, Medicos.ID_INDEX );
FIELD_INDEXES.put( Medicos.ID_FULL, Medicos.ID_INDEX );
FIELD_INDEXES.put( Medicos.NOME, Medicos.NOME_INDEX );
FIELD_INDEXES.put( Medicos.NOME_FULL, Medicos.NOME_INDEX );
FIELD_INDEXES.put( Medicos.NUMERO_CEDULA, Medicos.NUMERO_CEDULA_INDEX );
FIELD_INDEXES.put( Medicos.NUMERO_CEDULA_FULL, Medicos.NUMERO_CEDULA_INDEX );
FIELD_INDEXES.put( Medicos.INACTIVO, Medicos.INACTIVO_INDEX );
FIELD_INDEXES.put( Medicos.INACTIVO_FULL, Medicos.INACTIVO_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final String TABLENAME = "medicos";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.medicos";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "medicos.id";
public static final int ID_INDEX = 0;
public static final String NOME = "nome";
public static final String NOME_FULL = "medicos.nome";
public static final int NOME_INDEX = 1;
public static final String NUMERO_CEDULA = "numero_cedula";
public static final String NUMERO_CEDULA_FULL = "medicos.numero_cedula";
public static final int NUMERO_CEDULA_INDEX = 2;
public static final String INACTIVO = "inactivo";
public static final String INACTIVO_FULL = "medicos.inactivo";
public static final int INACTIVO_INDEX = 3;
public static final String FIELD_NAMES[] = new String[]{
NOME, NUMERO_CEDULA, INACTIVO, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + NOME, TABLENAME + "." + NUMERO_CEDULA, TABLENAME + "." + INACTIVO, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, NOME, NUMERO_CEDULA, INACTIVO, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, NOME, NUMERO_CEDULA, INACTIVO, };
private Integer id;
private String nome;
private String numero_cedula;
private String inactivo;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public Medicos()
{
super();
dirtyProperties = new boolean[]{ false, false, false,
false };
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public java.util.List<db.data.siprp.outer.ExamesData>fromExames_medico_id()
{
java.util.List<db.data.siprp.outer.ExamesData> result = new java.util.LinkedList< db.data.siprp.outer.ExamesData >();
if ( getPrimaryKey() != null )
{
try
{
result = fromReference( db.data.siprp.outer.ExamesData.class , getPrimaryKey().getMap().get("id"), "medico_id" );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
}
return result;
}
public String getNome()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( NOME );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.nome;
}
public void setNome( String nome )
{
try
{
preProcess( NOME, nome );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.nome = nome;
LAZY_LOADED_OBJECTS.put( NOME, Boolean.TRUE );
}
public String getNumero_cedula()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( NUMERO_CEDULA );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.numero_cedula;
}
public void setNumero_cedula( String numero_cedula )
{
try
{
preProcess( NUMERO_CEDULA, numero_cedula );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.numero_cedula = numero_cedula;
LAZY_LOADED_OBJECTS.put( NUMERO_CEDULA, Boolean.TRUE );
}
public String getInactivo()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( INACTIVO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.inactivo;
}
public void setInactivo( String inactivo )
{
try
{
preProcess( INACTIVO, inactivo );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.inactivo = inactivo;
LAZY_LOADED_OBJECTS.put( INACTIVO, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Medicos.ID_INDEX:
value = getId();
break;
case Medicos.NOME_INDEX:
value = getNome();
break;
case Medicos.NUMERO_CEDULA_INDEX:
value = getNumero_cedula();
break;
case Medicos.INACTIVO_INDEX:
value = getInactivo();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Medicos.ID_INDEX:
value = this.id;
break;
case Medicos.NOME_INDEX:
value = this.nome;
break;
case Medicos.NUMERO_CEDULA_INDEX:
value = this.numero_cedula;
break;
case Medicos.INACTIVO_INDEX:
value = this.inactivo;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Medicos.ID_INDEX:
setId( ( Integer ) value );
break;
case Medicos.NOME_INDEX:
setNome( ( String ) value );
break;
case Medicos.NUMERO_CEDULA_INDEX:
setNumero_cedula( ( String ) value );
break;
case Medicos.INACTIVO_INDEX:
setInactivo( ( String ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Medicos.ID_INDEX:
this.id = ( Integer ) value;
break;
case Medicos.NOME_INDEX:
this.nome = ( String ) value;
break;
case Medicos.NUMERO_CEDULA_INDEX:
this.numero_cedula = ( String ) value;
break;
case Medicos.INACTIVO_INDEX:
this.inactivo = ( String ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case Medicos.ID_INDEX:
theClass = Integer.class;
break;
case Medicos.NOME_INDEX:
theClass = String.class;
break;
case Medicos.NUMERO_CEDULA_INDEX:
theClass = String.class;
break;
case Medicos.INACTIVO_INDEX:
theClass = String.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : Medicos._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Medicos.PK_FIELD_NAMES );
primaryKey.set( 0, getId() );
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,393 +0,0 @@
/*
* Medidas.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class Medidas extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( Medidas.ID, Medidas.ID_INDEX );
FIELD_INDEXES.put( Medidas.ID_FULL, Medidas.ID_INDEX );
com.evolute.entity.evo.EvoDataObject.register( Medidas.CLASS_IDENTIFIER, Medidas.ANALISE_ID, Medidas.TO_ANALISE_ID );
FIELD_INDEXES.put( Medidas.ANALISE_ID, Medidas.ANALISE_ID_INDEX );
FIELD_INDEXES.put( Medidas.ANALISE_ID_FULL, Medidas.ANALISE_ID_INDEX );
FIELD_INDEXES.put( Medidas.TO_ANALISE_ID, Medidas.TO_ANALISE_ID_INDEX );
FIELD_INDEXES.put( Medidas.MEDIDA, Medidas.MEDIDA_INDEX );
FIELD_INDEXES.put( Medidas.MEDIDA_FULL, Medidas.MEDIDA_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final com.evolute.entity.ForeignKey ForeignKeyanalise_idToanalises_acidentes =
new com.evolute.entity.ForeignKey( Medidas.class, Medidas.ANALISE_ID, db.data.siprp.outer.AnalisesAcidentesData.class, db.data.siprp.outer.AnalisesAcidentesData.ID );
public static final String TABLENAME = "medidas";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.medidas";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "medidas.id";
public static final int ID_INDEX = 0;
public static final String ANALISE_ID = "analise_id";
public static final String ANALISE_ID_FULL = "medidas.analise_id";
public static final int ANALISE_ID_INDEX = 1;
public static final String TO_ANALISE_ID = "to_analise_id";
public static final String TO_ANALISE_ID_FULL = "medidas.to_analise_id";
public static final int TO_ANALISE_ID_INDEX = 2;
public static final String MEDIDA = "medida";
public static final String MEDIDA_FULL = "medidas.medida";
public static final int MEDIDA_INDEX = 3;
public static final String FIELD_NAMES[] = new String[]{
ANALISE_ID, TO_ANALISE_ID, MEDIDA, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + ANALISE_ID, TABLENAME + "." + TO_ANALISE_ID, TABLENAME + "." + MEDIDA, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, ANALISE_ID, MEDIDA, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, ANALISE_ID, MEDIDA, };
private Integer id;
private Integer analise_id;
private db.data.siprp.outer.AnalisesAcidentesData to_analise_id;
private String medida;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public Medidas()
{
super();
dirtyProperties = new boolean[]{ false, false, false,
false };
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public Integer getAnalise_id()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ANALISE_ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.analise_id;
}
public void setAnalise_id( Integer analise_id )
{
try
{
preProcess( ANALISE_ID, analise_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.analise_id = analise_id;
LAZY_LOADED_OBJECTS.put( ANALISE_ID, Boolean.TRUE );
}
public db.data.siprp.outer.AnalisesAcidentesData toAnalise_id()
{
try
{
prepare( TO_ANALISE_ID );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
return this.to_analise_id;
}
public void setToAnalise_id( db.data.siprp.outer.AnalisesAcidentesData to_analise_id )
{
try
{
preProcess( TO_ANALISE_ID, to_analise_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.to_analise_id = to_analise_id;
}
public String getMedida()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( MEDIDA );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.medida;
}
public void setMedida( String medida )
{
try
{
preProcess( MEDIDA, medida );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.medida = medida;
LAZY_LOADED_OBJECTS.put( MEDIDA, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Medidas.ID_INDEX:
value = getId();
break;
case Medidas.ANALISE_ID_INDEX:
value = getAnalise_id();
break;
case Medidas.TO_ANALISE_ID_INDEX:
value = toAnalise_id();
break;
case Medidas.MEDIDA_INDEX:
value = getMedida();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Medidas.ID_INDEX:
value = this.id;
break;
case Medidas.ANALISE_ID_INDEX:
value = this.analise_id;
break;
case Medidas.TO_ANALISE_ID_INDEX:
value = this.to_analise_id;
break;
case Medidas.MEDIDA_INDEX:
value = this.medida;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Medidas.ID_INDEX:
setId( ( Integer ) value );
break;
case Medidas.ANALISE_ID_INDEX:
setAnalise_id( ( Integer ) value );
break;
case Medidas.TO_ANALISE_ID_INDEX:
setToAnalise_id( ( db.data.siprp.outer.AnalisesAcidentesData ) value );
break;
case Medidas.MEDIDA_INDEX:
setMedida( ( String ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Medidas.ID_INDEX:
this.id = ( Integer ) value;
break;
case Medidas.ANALISE_ID_INDEX:
this.analise_id = ( Integer ) value;
break;
case Medidas.TO_ANALISE_ID_INDEX:
this.to_analise_id = ( db.data.siprp.outer.AnalisesAcidentesData ) value;
break;
case Medidas.MEDIDA_INDEX:
this.medida = ( String ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case Medidas.ID_INDEX:
theClass = Integer.class;
break;
case Medidas.ANALISE_ID_INDEX:
theClass = Integer.class;
break;
case Medidas.TO_ANALISE_ID_INDEX:
theClass = db.data.siprp.outer.AnalisesAcidentesData.class;
break;
case Medidas.MEDIDA_INDEX:
theClass = String.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : Medidas._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Medidas.PK_FIELD_NAMES );
Object idObject = array.get( row, col + 0 );
try
{
primaryKey.set( 0, ( Integer ) idObject );
setId( ( Integer ) idObject );
}
catch( ClassCastException ex )
{
if( idObject instanceof Number )
{
primaryKey.set( 0, ((Number)idObject).intValue() );
setId( ((Number)idObject).intValue() );
}
else {
throw ex;
}
}
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,441 +0,0 @@
/*
* NotNoticias.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class NotNoticias extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( NotNoticias.ID, NotNoticias.ID_INDEX );
FIELD_INDEXES.put( NotNoticias.ID_FULL, NotNoticias.ID_INDEX );
FIELD_INDEXES.put( NotNoticias.DATA, NotNoticias.DATA_INDEX );
FIELD_INDEXES.put( NotNoticias.DATA_FULL, NotNoticias.DATA_INDEX );
FIELD_INDEXES.put( NotNoticias.STAMP, NotNoticias.STAMP_INDEX );
FIELD_INDEXES.put( NotNoticias.STAMP_FULL, NotNoticias.STAMP_INDEX );
FIELD_INDEXES.put( NotNoticias.UTILIZADOR, NotNoticias.UTILIZADOR_INDEX );
FIELD_INDEXES.put( NotNoticias.UTILIZADOR_FULL, NotNoticias.UTILIZADOR_INDEX );
FIELD_INDEXES.put( NotNoticias.NOTICIA, NotNoticias.NOTICIA_INDEX );
FIELD_INDEXES.put( NotNoticias.NOTICIA_FULL, NotNoticias.NOTICIA_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final String TABLENAME = "not_noticias";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.not_noticias";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "not_noticias.id";
public static final int ID_INDEX = 0;
public static final String DATA = "data";
public static final String DATA_FULL = "not_noticias.data";
public static final int DATA_INDEX = 1;
public static final String STAMP = "stamp";
public static final String STAMP_FULL = "not_noticias.stamp";
public static final int STAMP_INDEX = 2;
public static final String UTILIZADOR = "utilizador";
public static final String UTILIZADOR_FULL = "not_noticias.utilizador";
public static final int UTILIZADOR_INDEX = 3;
public static final String NOTICIA = "noticia";
public static final String NOTICIA_FULL = "not_noticias.noticia";
public static final int NOTICIA_INDEX = 4;
public static final String FIELD_NAMES[] = new String[]{
DATA, STAMP, UTILIZADOR, NOTICIA, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + DATA, TABLENAME + "." + STAMP, TABLENAME + "." + UTILIZADOR, TABLENAME + "." + NOTICIA, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, DATA, STAMP, UTILIZADOR, NOTICIA, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, DATA, STAMP, UTILIZADOR, NOTICIA, };
private Integer id;
private java.util.Date data;
private java.sql.Timestamp stamp;
private String utilizador;
private String noticia;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public NotNoticias()
{
super();
dirtyProperties = new boolean[]{ false, false, false,
false, false };
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public java.util.Date getData()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DATA );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.data;
}
public void setData( java.util.Date data )
{
try
{
preProcess( DATA, data );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.data = data;
LAZY_LOADED_OBJECTS.put( DATA, Boolean.TRUE );
}
public java.sql.Timestamp getStamp()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( STAMP );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.stamp;
}
public void setStamp( java.sql.Timestamp stamp )
{
try
{
preProcess( STAMP, stamp );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.stamp = stamp;
LAZY_LOADED_OBJECTS.put( STAMP, Boolean.TRUE );
}
public String getUtilizador()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( UTILIZADOR );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.utilizador;
}
public void setUtilizador( String utilizador )
{
try
{
preProcess( UTILIZADOR, utilizador );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.utilizador = utilizador;
LAZY_LOADED_OBJECTS.put( UTILIZADOR, Boolean.TRUE );
}
public String getNoticia()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( NOTICIA );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.noticia;
}
public void setNoticia( String noticia )
{
try
{
preProcess( NOTICIA, noticia );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.noticia = noticia;
LAZY_LOADED_OBJECTS.put( NOTICIA, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case NotNoticias.ID_INDEX:
value = getId();
break;
case NotNoticias.DATA_INDEX:
value = getData();
break;
case NotNoticias.STAMP_INDEX:
value = getStamp();
break;
case NotNoticias.UTILIZADOR_INDEX:
value = getUtilizador();
break;
case NotNoticias.NOTICIA_INDEX:
value = getNoticia();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case NotNoticias.ID_INDEX:
value = this.id;
break;
case NotNoticias.DATA_INDEX:
value = this.data;
break;
case NotNoticias.STAMP_INDEX:
value = this.stamp;
break;
case NotNoticias.UTILIZADOR_INDEX:
value = this.utilizador;
break;
case NotNoticias.NOTICIA_INDEX:
value = this.noticia;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case NotNoticias.ID_INDEX:
setId( ( Integer ) value );
break;
case NotNoticias.DATA_INDEX:
setData( ( java.util.Date ) value );
break;
case NotNoticias.STAMP_INDEX:
setStamp( ( java.sql.Timestamp ) value );
break;
case NotNoticias.UTILIZADOR_INDEX:
setUtilizador( ( String ) value );
break;
case NotNoticias.NOTICIA_INDEX:
setNoticia( ( String ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case NotNoticias.ID_INDEX:
this.id = ( Integer ) value;
break;
case NotNoticias.DATA_INDEX:
this.data = ( java.util.Date ) value;
break;
case NotNoticias.STAMP_INDEX:
this.stamp = ( java.sql.Timestamp ) value;
break;
case NotNoticias.UTILIZADOR_INDEX:
this.utilizador = ( String ) value;
break;
case NotNoticias.NOTICIA_INDEX:
this.noticia = ( String ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case NotNoticias.ID_INDEX:
theClass = Integer.class;
break;
case NotNoticias.DATA_INDEX:
theClass = java.util.Date.class;
break;
case NotNoticias.STAMP_INDEX:
theClass = java.sql.Timestamp.class;
break;
case NotNoticias.UTILIZADOR_INDEX:
theClass = String.class;
break;
case NotNoticias.NOTICIA_INDEX:
theClass = String.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : NotNoticias._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, NotNoticias.PK_FIELD_NAMES );
Object idObject = array.get( row, col + 0 );
try
{
primaryKey.set( 0, ( Integer ) idObject );
setId( ( Integer ) idObject );
}
catch( ClassCastException ex )
{
if( idObject instanceof Number )
{
primaryKey.set( 0, ((Number)idObject).intValue() );
setId( ((Number)idObject).intValue() );
}
else {
throw ex;
}
}
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,342 +0,0 @@
/*
* Permissoes.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class Permissoes extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( Permissoes.ID, Permissoes.ID_INDEX );
FIELD_INDEXES.put( Permissoes.ID_FULL, Permissoes.ID_INDEX );
FIELD_INDEXES.put( Permissoes.USER_ID, Permissoes.USER_ID_INDEX );
FIELD_INDEXES.put( Permissoes.USER_ID_FULL, Permissoes.USER_ID_INDEX );
FIELD_INDEXES.put( Permissoes.CODIGO_PERMISSAO, Permissoes.CODIGO_PERMISSAO_INDEX );
FIELD_INDEXES.put( Permissoes.CODIGO_PERMISSAO_FULL, Permissoes.CODIGO_PERMISSAO_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final String TABLENAME = "permissoes";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.permissoes";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "permissoes.id";
public static final int ID_INDEX = 0;
public static final String USER_ID = "user_id";
public static final String USER_ID_FULL = "permissoes.user_id";
public static final int USER_ID_INDEX = 1;
public static final String CODIGO_PERMISSAO = "codigo_permissao";
public static final String CODIGO_PERMISSAO_FULL = "permissoes.codigo_permissao";
public static final int CODIGO_PERMISSAO_INDEX = 2;
public static final String FIELD_NAMES[] = new String[]{
USER_ID, CODIGO_PERMISSAO, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + USER_ID, TABLENAME + "." + CODIGO_PERMISSAO, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, USER_ID, CODIGO_PERMISSAO, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, USER_ID, CODIGO_PERMISSAO, };
private Integer id;
private Integer user_id;
private Integer codigo_permissao;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public Permissoes()
{
super();
dirtyProperties = new boolean[]{ false, false, false };
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public Integer getUser_id()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( USER_ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.user_id;
}
public void setUser_id( Integer user_id )
{
try
{
preProcess( USER_ID, user_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.user_id = user_id;
LAZY_LOADED_OBJECTS.put( USER_ID, Boolean.TRUE );
}
public Integer getCodigo_permissao()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( CODIGO_PERMISSAO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.codigo_permissao;
}
public void setCodigo_permissao( Integer codigo_permissao )
{
try
{
preProcess( CODIGO_PERMISSAO, codigo_permissao );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.codigo_permissao = codigo_permissao;
LAZY_LOADED_OBJECTS.put( CODIGO_PERMISSAO, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Permissoes.ID_INDEX:
value = getId();
break;
case Permissoes.USER_ID_INDEX:
value = getUser_id();
break;
case Permissoes.CODIGO_PERMISSAO_INDEX:
value = getCodigo_permissao();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Permissoes.ID_INDEX:
value = this.id;
break;
case Permissoes.USER_ID_INDEX:
value = this.user_id;
break;
case Permissoes.CODIGO_PERMISSAO_INDEX:
value = this.codigo_permissao;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Permissoes.ID_INDEX:
setId( ( Integer ) value );
break;
case Permissoes.USER_ID_INDEX:
setUser_id( ( Integer ) value );
break;
case Permissoes.CODIGO_PERMISSAO_INDEX:
setCodigo_permissao( ( Integer ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Permissoes.ID_INDEX:
this.id = ( Integer ) value;
break;
case Permissoes.USER_ID_INDEX:
this.user_id = ( Integer ) value;
break;
case Permissoes.CODIGO_PERMISSAO_INDEX:
this.codigo_permissao = ( Integer ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case Permissoes.ID_INDEX:
theClass = Integer.class;
break;
case Permissoes.USER_ID_INDEX:
theClass = Integer.class;
break;
case Permissoes.CODIGO_PERMISSAO_INDEX:
theClass = Integer.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : Permissoes._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Permissoes.PK_FIELD_NAMES );
Object idObject = array.get( row, col + 0 );
try
{
primaryKey.set( 0, ( Integer ) idObject );
setId( ( Integer ) idObject );
}
catch( ClassCastException ex )
{
if( idObject instanceof Number )
{
primaryKey.set( 0, ((Number)idObject).intValue() );
setId( ((Number)idObject).intValue() );
}
else {
throw ex;
}
}
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,557 +0,0 @@
/*
* PlanoAreas.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class PlanoAreas extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( PlanoAreas.DESCRICAO, PlanoAreas.DESCRICAO_INDEX );
FIELD_INDEXES.put( PlanoAreas.DESCRICAO_FULL, PlanoAreas.DESCRICAO_INDEX );
com.evolute.entity.evo.EvoDataObject.register( PlanoAreas.CLASS_IDENTIFIER, PlanoAreas.PLANO_ID, PlanoAreas.TO_PLANO_ID );
FIELD_INDEXES.put( PlanoAreas.PLANO_ID, PlanoAreas.PLANO_ID_INDEX );
FIELD_INDEXES.put( PlanoAreas.PLANO_ID_FULL, PlanoAreas.PLANO_ID_INDEX );
FIELD_INDEXES.put( PlanoAreas.TO_PLANO_ID, PlanoAreas.TO_PLANO_ID_INDEX );
FIELD_INDEXES.put( PlanoAreas.ID, PlanoAreas.ID_INDEX );
FIELD_INDEXES.put( PlanoAreas.ID_FULL, PlanoAreas.ID_INDEX );
FIELD_INDEXES.put( PlanoAreas.AREA_ID, PlanoAreas.AREA_ID_INDEX );
FIELD_INDEXES.put( PlanoAreas.AREA_ID_FULL, PlanoAreas.AREA_ID_INDEX );
FIELD_INDEXES.put( PlanoAreas.IS_PRINCIPAL, PlanoAreas.IS_PRINCIPAL_INDEX );
FIELD_INDEXES.put( PlanoAreas.IS_PRINCIPAL_FULL, PlanoAreas.IS_PRINCIPAL_INDEX );
FIELD_INDEXES.put( PlanoAreas.ORDEM, PlanoAreas.ORDEM_INDEX );
FIELD_INDEXES.put( PlanoAreas.ORDEM_FULL, PlanoAreas.ORDEM_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final com.evolute.entity.ForeignKey ForeignKeyplano_idToplanos_actuacao =
new com.evolute.entity.ForeignKey( PlanoAreas.class, PlanoAreas.PLANO_ID, db.data.siprp.outer.PlanosActuacaoData.class, db.data.siprp.outer.PlanosActuacaoData.ID );
public static final String TABLENAME = "plano_areas";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.plano_areas";
public static final int _INVALID__INDEX = -1;
public static final String DESCRICAO = "descricao";
public static final String DESCRICAO_FULL = "plano_areas.descricao";
public static final int DESCRICAO_INDEX = 0;
public static final String PLANO_ID = "plano_id";
public static final String PLANO_ID_FULL = "plano_areas.plano_id";
public static final int PLANO_ID_INDEX = 1;
public static final String TO_PLANO_ID = "to_plano_id";
public static final String TO_PLANO_ID_FULL = "plano_areas.to_plano_id";
public static final int TO_PLANO_ID_INDEX = 2;
public static final String ID = "id";
public static final String ID_FULL = "plano_areas.id";
public static final int ID_INDEX = 3;
public static final String AREA_ID = "area_id";
public static final String AREA_ID_FULL = "plano_areas.area_id";
public static final int AREA_ID_INDEX = 4;
public static final String IS_PRINCIPAL = "is_principal";
public static final String IS_PRINCIPAL_FULL = "plano_areas.is_principal";
public static final int IS_PRINCIPAL_INDEX = 5;
public static final String ORDEM = "ordem";
public static final String ORDEM_FULL = "plano_areas.ordem";
public static final int ORDEM_INDEX = 6;
public static final String FIELD_NAMES[] = new String[]{
DESCRICAO, PLANO_ID, TO_PLANO_ID, AREA_ID, IS_PRINCIPAL, ORDEM, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + DESCRICAO, TABLENAME + "." + PLANO_ID, TABLENAME + "." + TO_PLANO_ID, TABLENAME + "." + AREA_ID, TABLENAME + "." + IS_PRINCIPAL, TABLENAME + "." + ORDEM, };
protected static final String DB_FIELD_NAMES[] = new String[]{
DESCRICAO, PLANO_ID, ID, AREA_ID, IS_PRINCIPAL, ORDEM, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
DESCRICAO, PLANO_ID, ID, AREA_ID, IS_PRINCIPAL, ORDEM, };
private String descricao;
private Integer plano_id;
private db.data.siprp.outer.PlanosActuacaoData to_plano_id;
private Integer id;
private Integer area_id;
private Boolean is_principal;
private Integer ordem;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public PlanoAreas()
{
super();
dirtyProperties = new boolean[]{ false, false, false,
false, false, false, false };
}
public String getDescricao()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DESCRICAO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.descricao;
}
public void setDescricao( String descricao )
{
try
{
preProcess( DESCRICAO, descricao );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.descricao = descricao;
LAZY_LOADED_OBJECTS.put( DESCRICAO, Boolean.TRUE );
}
public Integer getPlano_id()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( PLANO_ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.plano_id;
}
public void setPlano_id( Integer plano_id )
{
try
{
preProcess( PLANO_ID, plano_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.plano_id = plano_id;
LAZY_LOADED_OBJECTS.put( PLANO_ID, Boolean.TRUE );
}
public db.data.siprp.outer.PlanosActuacaoData toPlano_id()
{
try
{
prepare( TO_PLANO_ID );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
return this.to_plano_id;
}
public void setToPlano_id( db.data.siprp.outer.PlanosActuacaoData to_plano_id )
{
try
{
preProcess( TO_PLANO_ID, to_plano_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.to_plano_id = to_plano_id;
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public java.util.List<db.data.siprp.outer.PlanoRiscosData>fromPlanoRiscos_area_id()
{
java.util.List<db.data.siprp.outer.PlanoRiscosData> result = new java.util.LinkedList< db.data.siprp.outer.PlanoRiscosData >();
if ( getPrimaryKey() != null )
{
try
{
result = fromReference( db.data.siprp.outer.PlanoRiscosData.class , getPrimaryKey().getMap().get("id"), "area_id" );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
}
return result;
}
public Integer getArea_id()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( AREA_ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.area_id;
}
public void setArea_id( Integer area_id )
{
try
{
preProcess( AREA_ID, area_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.area_id = area_id;
LAZY_LOADED_OBJECTS.put( AREA_ID, Boolean.TRUE );
}
public Boolean getIs_principal()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( IS_PRINCIPAL );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.is_principal;
}
public void setIs_principal( Boolean is_principal )
{
try
{
preProcess( IS_PRINCIPAL, is_principal );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.is_principal = is_principal;
LAZY_LOADED_OBJECTS.put( IS_PRINCIPAL, Boolean.TRUE );
}
public Integer getOrdem()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ORDEM );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.ordem;
}
public void setOrdem( Integer ordem )
{
try
{
preProcess( ORDEM, ordem );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.ordem = ordem;
LAZY_LOADED_OBJECTS.put( ORDEM, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case PlanoAreas.DESCRICAO_INDEX:
value = getDescricao();
break;
case PlanoAreas.PLANO_ID_INDEX:
value = getPlano_id();
break;
case PlanoAreas.TO_PLANO_ID_INDEX:
value = toPlano_id();
break;
case PlanoAreas.ID_INDEX:
value = getId();
break;
case PlanoAreas.AREA_ID_INDEX:
value = getArea_id();
break;
case PlanoAreas.IS_PRINCIPAL_INDEX:
value = getIs_principal();
break;
case PlanoAreas.ORDEM_INDEX:
value = getOrdem();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case PlanoAreas.DESCRICAO_INDEX:
value = this.descricao;
break;
case PlanoAreas.PLANO_ID_INDEX:
value = this.plano_id;
break;
case PlanoAreas.TO_PLANO_ID_INDEX:
value = this.to_plano_id;
break;
case PlanoAreas.ID_INDEX:
value = this.id;
break;
case PlanoAreas.AREA_ID_INDEX:
value = this.area_id;
break;
case PlanoAreas.IS_PRINCIPAL_INDEX:
value = this.is_principal;
break;
case PlanoAreas.ORDEM_INDEX:
value = this.ordem;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case PlanoAreas.DESCRICAO_INDEX:
setDescricao( ( String ) value );
break;
case PlanoAreas.PLANO_ID_INDEX:
setPlano_id( ( Integer ) value );
break;
case PlanoAreas.TO_PLANO_ID_INDEX:
setToPlano_id( ( db.data.siprp.outer.PlanosActuacaoData ) value );
break;
case PlanoAreas.ID_INDEX:
setId( ( Integer ) value );
break;
case PlanoAreas.AREA_ID_INDEX:
setArea_id( ( Integer ) value );
break;
case PlanoAreas.IS_PRINCIPAL_INDEX:
setIs_principal( ( Boolean ) value );
break;
case PlanoAreas.ORDEM_INDEX:
setOrdem( ( Integer ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case PlanoAreas.DESCRICAO_INDEX:
this.descricao = ( String ) value;
break;
case PlanoAreas.PLANO_ID_INDEX:
this.plano_id = ( Integer ) value;
break;
case PlanoAreas.TO_PLANO_ID_INDEX:
this.to_plano_id = ( db.data.siprp.outer.PlanosActuacaoData ) value;
break;
case PlanoAreas.ID_INDEX:
this.id = ( Integer ) value;
break;
case PlanoAreas.AREA_ID_INDEX:
this.area_id = ( Integer ) value;
break;
case PlanoAreas.IS_PRINCIPAL_INDEX:
this.is_principal = ( Boolean ) value;
break;
case PlanoAreas.ORDEM_INDEX:
this.ordem = ( Integer ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case PlanoAreas.DESCRICAO_INDEX:
theClass = String.class;
break;
case PlanoAreas.PLANO_ID_INDEX:
theClass = Integer.class;
break;
case PlanoAreas.TO_PLANO_ID_INDEX:
theClass = db.data.siprp.outer.PlanosActuacaoData.class;
break;
case PlanoAreas.ID_INDEX:
theClass = Integer.class;
break;
case PlanoAreas.AREA_ID_INDEX:
theClass = Integer.class;
break;
case PlanoAreas.IS_PRINCIPAL_INDEX:
theClass = Boolean.class;
break;
case PlanoAreas.ORDEM_INDEX:
theClass = Integer.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : PlanoAreas._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, PlanoAreas.PK_FIELD_NAMES );
Object idObject = array.get( row, col + 0 );
try
{
primaryKey.set( 0, ( Integer ) idObject );
setId( ( Integer ) idObject );
}
catch( ClassCastException ex )
{
if( idObject instanceof Number )
{
primaryKey.set( 0, ((Number)idObject).intValue() );
setId( ((Number)idObject).intValue() );
}
else {
throw ex;
}
}
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,560 +0,0 @@
/*
* PlanoMedidas.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class PlanoMedidas extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( PlanoMedidas.DESCRICAO, PlanoMedidas.DESCRICAO_INDEX );
FIELD_INDEXES.put( PlanoMedidas.DESCRICAO_FULL, PlanoMedidas.DESCRICAO_INDEX );
com.evolute.entity.evo.EvoDataObject.register( PlanoMedidas.CLASS_IDENTIFIER, PlanoMedidas.RISCO_ID, PlanoMedidas.TO_RISCO_ID );
FIELD_INDEXES.put( PlanoMedidas.RISCO_ID, PlanoMedidas.RISCO_ID_INDEX );
FIELD_INDEXES.put( PlanoMedidas.RISCO_ID_FULL, PlanoMedidas.RISCO_ID_INDEX );
FIELD_INDEXES.put( PlanoMedidas.TO_RISCO_ID, PlanoMedidas.TO_RISCO_ID_INDEX );
FIELD_INDEXES.put( PlanoMedidas.ID, PlanoMedidas.ID_INDEX );
FIELD_INDEXES.put( PlanoMedidas.ID_FULL, PlanoMedidas.ID_INDEX );
FIELD_INDEXES.put( PlanoMedidas.MEDIDA_ID, PlanoMedidas.MEDIDA_ID_INDEX );
FIELD_INDEXES.put( PlanoMedidas.MEDIDA_ID_FULL, PlanoMedidas.MEDIDA_ID_INDEX );
com.evolute.entity.evo.EvoDataObject.register( PlanoMedidas.CLASS_IDENTIFIER, PlanoMedidas.ESTADO_MEDIDAS_ID, PlanoMedidas.TO_ESTADO_MEDIDAS_ID );
FIELD_INDEXES.put( PlanoMedidas.ESTADO_MEDIDAS_ID, PlanoMedidas.ESTADO_MEDIDAS_ID_INDEX );
FIELD_INDEXES.put( PlanoMedidas.ESTADO_MEDIDAS_ID_FULL, PlanoMedidas.ESTADO_MEDIDAS_ID_INDEX );
FIELD_INDEXES.put( PlanoMedidas.TO_ESTADO_MEDIDAS_ID, PlanoMedidas.TO_ESTADO_MEDIDAS_ID_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final com.evolute.entity.ForeignKey ForeignKeyrisco_idToplano_riscos =
new com.evolute.entity.ForeignKey( PlanoMedidas.class, PlanoMedidas.RISCO_ID, db.data.siprp.outer.PlanoRiscosData.class, db.data.siprp.outer.PlanoRiscosData.ID );
public static final com.evolute.entity.ForeignKey ForeignKeyestado_medidas_idToestado_medidas =
new com.evolute.entity.ForeignKey( PlanoMedidas.class, PlanoMedidas.ESTADO_MEDIDAS_ID, db.data.siprp.outer.EstadoMedidasData.class, db.data.siprp.outer.EstadoMedidasData.ID );
public static final String TABLENAME = "plano_medidas";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.plano_medidas";
public static final int _INVALID__INDEX = -1;
public static final String DESCRICAO = "descricao";
public static final String DESCRICAO_FULL = "plano_medidas.descricao";
public static final int DESCRICAO_INDEX = 0;
public static final String RISCO_ID = "risco_id";
public static final String RISCO_ID_FULL = "plano_medidas.risco_id";
public static final int RISCO_ID_INDEX = 1;
public static final String TO_RISCO_ID = "to_risco_id";
public static final String TO_RISCO_ID_FULL = "plano_medidas.to_risco_id";
public static final int TO_RISCO_ID_INDEX = 2;
public static final String ID = "id";
public static final String ID_FULL = "plano_medidas.id";
public static final int ID_INDEX = 3;
public static final String MEDIDA_ID = "medida_id";
public static final String MEDIDA_ID_FULL = "plano_medidas.medida_id";
public static final int MEDIDA_ID_INDEX = 4;
public static final String ESTADO_MEDIDAS_ID = "estado_medidas_id";
public static final String ESTADO_MEDIDAS_ID_FULL = "plano_medidas.estado_medidas_id";
public static final int ESTADO_MEDIDAS_ID_INDEX = 5;
public static final String TO_ESTADO_MEDIDAS_ID = "to_estado_medidas_id";
public static final String TO_ESTADO_MEDIDAS_ID_FULL = "plano_medidas.to_estado_medidas_id";
public static final int TO_ESTADO_MEDIDAS_ID_INDEX = 6;
public static final String FIELD_NAMES[] = new String[]{
DESCRICAO, RISCO_ID, TO_RISCO_ID, MEDIDA_ID, ESTADO_MEDIDAS_ID,
TO_ESTADO_MEDIDAS_ID, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + DESCRICAO, TABLENAME + "." + RISCO_ID, TABLENAME + "." + TO_RISCO_ID, TABLENAME + "." + MEDIDA_ID, TABLENAME + "." + ESTADO_MEDIDAS_ID,
TABLENAME + "." + TO_ESTADO_MEDIDAS_ID, };
protected static final String DB_FIELD_NAMES[] = new String[]{
DESCRICAO, RISCO_ID, ID, MEDIDA_ID, ESTADO_MEDIDAS_ID, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
DESCRICAO, RISCO_ID, ID, MEDIDA_ID, ESTADO_MEDIDAS_ID, };
private String descricao;
private Integer risco_id;
private db.data.siprp.outer.PlanoRiscosData to_risco_id;
private Integer id;
private Integer medida_id;
private Integer estado_medidas_id;
private db.data.siprp.outer.EstadoMedidasData to_estado_medidas_id;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public PlanoMedidas()
{
super();
dirtyProperties = new boolean[]{ false, false, false,
false, false, false, false };
}
public String getDescricao()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DESCRICAO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.descricao;
}
public void setDescricao( String descricao )
{
try
{
preProcess( DESCRICAO, descricao );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.descricao = descricao;
LAZY_LOADED_OBJECTS.put( DESCRICAO, Boolean.TRUE );
}
public Integer getRisco_id()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( RISCO_ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.risco_id;
}
public void setRisco_id( Integer risco_id )
{
try
{
preProcess( RISCO_ID, risco_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.risco_id = risco_id;
LAZY_LOADED_OBJECTS.put( RISCO_ID, Boolean.TRUE );
}
public db.data.siprp.outer.PlanoRiscosData toRisco_id()
{
try
{
prepare( TO_RISCO_ID );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
return this.to_risco_id;
}
public void setToRisco_id( db.data.siprp.outer.PlanoRiscosData to_risco_id )
{
try
{
preProcess( TO_RISCO_ID, to_risco_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.to_risco_id = to_risco_id;
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public java.util.List<db.data.siprp.outer.PlanoPostosTrabalhoData>fromPlanoPostosTrabalho_medida_id()
{
java.util.List<db.data.siprp.outer.PlanoPostosTrabalhoData> result = new java.util.LinkedList< db.data.siprp.outer.PlanoPostosTrabalhoData >();
if ( getPrimaryKey() != null )
{
try
{
result = fromReference( db.data.siprp.outer.PlanoPostosTrabalhoData.class , getPrimaryKey().getMap().get("id"), "medida_id" );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
}
return result;
}
public Integer getMedida_id()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( MEDIDA_ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.medida_id;
}
public void setMedida_id( Integer medida_id )
{
try
{
preProcess( MEDIDA_ID, medida_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.medida_id = medida_id;
LAZY_LOADED_OBJECTS.put( MEDIDA_ID, Boolean.TRUE );
}
public Integer getEstado_medidas_id()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ESTADO_MEDIDAS_ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.estado_medidas_id;
}
public void setEstado_medidas_id( Integer estado_medidas_id )
{
try
{
preProcess( ESTADO_MEDIDAS_ID, estado_medidas_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.estado_medidas_id = estado_medidas_id;
LAZY_LOADED_OBJECTS.put( ESTADO_MEDIDAS_ID, Boolean.TRUE );
}
public db.data.siprp.outer.EstadoMedidasData toEstado_medidas_id()
{
try
{
prepare( TO_ESTADO_MEDIDAS_ID );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
return this.to_estado_medidas_id;
}
public void setToEstado_medidas_id( db.data.siprp.outer.EstadoMedidasData to_estado_medidas_id )
{
try
{
preProcess( TO_ESTADO_MEDIDAS_ID, to_estado_medidas_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.to_estado_medidas_id = to_estado_medidas_id;
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case PlanoMedidas.DESCRICAO_INDEX:
value = getDescricao();
break;
case PlanoMedidas.RISCO_ID_INDEX:
value = getRisco_id();
break;
case PlanoMedidas.TO_RISCO_ID_INDEX:
value = toRisco_id();
break;
case PlanoMedidas.ID_INDEX:
value = getId();
break;
case PlanoMedidas.MEDIDA_ID_INDEX:
value = getMedida_id();
break;
case PlanoMedidas.ESTADO_MEDIDAS_ID_INDEX:
value = getEstado_medidas_id();
break;
case PlanoMedidas.TO_ESTADO_MEDIDAS_ID_INDEX:
value = toEstado_medidas_id();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case PlanoMedidas.DESCRICAO_INDEX:
value = this.descricao;
break;
case PlanoMedidas.RISCO_ID_INDEX:
value = this.risco_id;
break;
case PlanoMedidas.TO_RISCO_ID_INDEX:
value = this.to_risco_id;
break;
case PlanoMedidas.ID_INDEX:
value = this.id;
break;
case PlanoMedidas.MEDIDA_ID_INDEX:
value = this.medida_id;
break;
case PlanoMedidas.ESTADO_MEDIDAS_ID_INDEX:
value = this.estado_medidas_id;
break;
case PlanoMedidas.TO_ESTADO_MEDIDAS_ID_INDEX:
value = this.to_estado_medidas_id;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case PlanoMedidas.DESCRICAO_INDEX:
setDescricao( ( String ) value );
break;
case PlanoMedidas.RISCO_ID_INDEX:
setRisco_id( ( Integer ) value );
break;
case PlanoMedidas.TO_RISCO_ID_INDEX:
setToRisco_id( ( db.data.siprp.outer.PlanoRiscosData ) value );
break;
case PlanoMedidas.ID_INDEX:
setId( ( Integer ) value );
break;
case PlanoMedidas.MEDIDA_ID_INDEX:
setMedida_id( ( Integer ) value );
break;
case PlanoMedidas.ESTADO_MEDIDAS_ID_INDEX:
setEstado_medidas_id( ( Integer ) value );
break;
case PlanoMedidas.TO_ESTADO_MEDIDAS_ID_INDEX:
setToEstado_medidas_id( ( db.data.siprp.outer.EstadoMedidasData ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case PlanoMedidas.DESCRICAO_INDEX:
this.descricao = ( String ) value;
break;
case PlanoMedidas.RISCO_ID_INDEX:
this.risco_id = ( Integer ) value;
break;
case PlanoMedidas.TO_RISCO_ID_INDEX:
this.to_risco_id = ( db.data.siprp.outer.PlanoRiscosData ) value;
break;
case PlanoMedidas.ID_INDEX:
this.id = ( Integer ) value;
break;
case PlanoMedidas.MEDIDA_ID_INDEX:
this.medida_id = ( Integer ) value;
break;
case PlanoMedidas.ESTADO_MEDIDAS_ID_INDEX:
this.estado_medidas_id = ( Integer ) value;
break;
case PlanoMedidas.TO_ESTADO_MEDIDAS_ID_INDEX:
this.to_estado_medidas_id = ( db.data.siprp.outer.EstadoMedidasData ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case PlanoMedidas.DESCRICAO_INDEX:
theClass = String.class;
break;
case PlanoMedidas.RISCO_ID_INDEX:
theClass = Integer.class;
break;
case PlanoMedidas.TO_RISCO_ID_INDEX:
theClass = db.data.siprp.outer.PlanoRiscosData.class;
break;
case PlanoMedidas.ID_INDEX:
theClass = Integer.class;
break;
case PlanoMedidas.MEDIDA_ID_INDEX:
theClass = Integer.class;
break;
case PlanoMedidas.ESTADO_MEDIDAS_ID_INDEX:
theClass = Integer.class;
break;
case PlanoMedidas.TO_ESTADO_MEDIDAS_ID_INDEX:
theClass = db.data.siprp.outer.EstadoMedidasData.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : PlanoMedidas._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, PlanoMedidas.PK_FIELD_NAMES );
Object idObject = array.get( row, col + 0 );
try
{
primaryKey.set( 0, ( Integer ) idObject );
setId( ( Integer ) idObject );
}
catch( ClassCastException ex )
{
if( idObject instanceof Number )
{
primaryKey.set( 0, ((Number)idObject).intValue() );
setId( ((Number)idObject).intValue() );
}
else {
throw ex;
}
}
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,491 +0,0 @@
/*
* PlanoPostosTrabalho.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class PlanoPostosTrabalho extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( PlanoPostosTrabalho.DESCRICAO, PlanoPostosTrabalho.DESCRICAO_INDEX );
FIELD_INDEXES.put( PlanoPostosTrabalho.DESCRICAO_FULL, PlanoPostosTrabalho.DESCRICAO_INDEX );
com.evolute.entity.evo.EvoDataObject.register( PlanoPostosTrabalho.CLASS_IDENTIFIER, PlanoPostosTrabalho.MEDIDA_ID, PlanoPostosTrabalho.TO_MEDIDA_ID );
FIELD_INDEXES.put( PlanoPostosTrabalho.MEDIDA_ID, PlanoPostosTrabalho.MEDIDA_ID_INDEX );
FIELD_INDEXES.put( PlanoPostosTrabalho.MEDIDA_ID_FULL, PlanoPostosTrabalho.MEDIDA_ID_INDEX );
FIELD_INDEXES.put( PlanoPostosTrabalho.TO_MEDIDA_ID, PlanoPostosTrabalho.TO_MEDIDA_ID_INDEX );
FIELD_INDEXES.put( PlanoPostosTrabalho.ID, PlanoPostosTrabalho.ID_INDEX );
FIELD_INDEXES.put( PlanoPostosTrabalho.ID_FULL, PlanoPostosTrabalho.ID_INDEX );
FIELD_INDEXES.put( PlanoPostosTrabalho.POSTO_ID, PlanoPostosTrabalho.POSTO_ID_INDEX );
FIELD_INDEXES.put( PlanoPostosTrabalho.POSTO_ID_FULL, PlanoPostosTrabalho.POSTO_ID_INDEX );
FIELD_INDEXES.put( PlanoPostosTrabalho.IS_PRINCIPAL, PlanoPostosTrabalho.IS_PRINCIPAL_INDEX );
FIELD_INDEXES.put( PlanoPostosTrabalho.IS_PRINCIPAL_FULL, PlanoPostosTrabalho.IS_PRINCIPAL_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final com.evolute.entity.ForeignKey ForeignKeymedida_idToplano_medidas =
new com.evolute.entity.ForeignKey( PlanoPostosTrabalho.class, PlanoPostosTrabalho.MEDIDA_ID, db.data.siprp.outer.PlanoMedidasData.class, db.data.siprp.outer.PlanoMedidasData.ID );
public static final String TABLENAME = "plano_postos_trabalho";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.plano_postos_trabalho";
public static final int _INVALID__INDEX = -1;
public static final String DESCRICAO = "descricao";
public static final String DESCRICAO_FULL = "plano_postos_trabalho.descricao";
public static final int DESCRICAO_INDEX = 0;
public static final String MEDIDA_ID = "medida_id";
public static final String MEDIDA_ID_FULL = "plano_postos_trabalho.medida_id";
public static final int MEDIDA_ID_INDEX = 1;
public static final String TO_MEDIDA_ID = "to_medida_id";
public static final String TO_MEDIDA_ID_FULL = "plano_postos_trabalho.to_medida_id";
public static final int TO_MEDIDA_ID_INDEX = 2;
public static final String ID = "id";
public static final String ID_FULL = "plano_postos_trabalho.id";
public static final int ID_INDEX = 3;
public static final String POSTO_ID = "posto_id";
public static final String POSTO_ID_FULL = "plano_postos_trabalho.posto_id";
public static final int POSTO_ID_INDEX = 4;
public static final String IS_PRINCIPAL = "is_principal";
public static final String IS_PRINCIPAL_FULL = "plano_postos_trabalho.is_principal";
public static final int IS_PRINCIPAL_INDEX = 5;
public static final String FIELD_NAMES[] = new String[]{
DESCRICAO, MEDIDA_ID, TO_MEDIDA_ID, POSTO_ID, IS_PRINCIPAL, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + DESCRICAO, TABLENAME + "." + MEDIDA_ID, TABLENAME + "." + TO_MEDIDA_ID, TABLENAME + "." + POSTO_ID, TABLENAME + "." + IS_PRINCIPAL, };
protected static final String DB_FIELD_NAMES[] = new String[]{
DESCRICAO, MEDIDA_ID, ID, POSTO_ID, IS_PRINCIPAL, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
DESCRICAO, MEDIDA_ID, ID, POSTO_ID, IS_PRINCIPAL, };
private String descricao;
private Integer medida_id;
private db.data.siprp.outer.PlanoMedidasData to_medida_id;
private Integer id;
private Integer posto_id;
private Boolean is_principal;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public PlanoPostosTrabalho()
{
super();
dirtyProperties = new boolean[]{ false, false, false,
false, false, false };
}
public String getDescricao()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DESCRICAO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.descricao;
}
public void setDescricao( String descricao )
{
try
{
preProcess( DESCRICAO, descricao );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.descricao = descricao;
LAZY_LOADED_OBJECTS.put( DESCRICAO, Boolean.TRUE );
}
public Integer getMedida_id()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( MEDIDA_ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.medida_id;
}
public void setMedida_id( Integer medida_id )
{
try
{
preProcess( MEDIDA_ID, medida_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.medida_id = medida_id;
LAZY_LOADED_OBJECTS.put( MEDIDA_ID, Boolean.TRUE );
}
public db.data.siprp.outer.PlanoMedidasData toMedida_id()
{
try
{
prepare( TO_MEDIDA_ID );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
return this.to_medida_id;
}
public void setToMedida_id( db.data.siprp.outer.PlanoMedidasData to_medida_id )
{
try
{
preProcess( TO_MEDIDA_ID, to_medida_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.to_medida_id = to_medida_id;
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public Integer getPosto_id()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( POSTO_ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.posto_id;
}
public void setPosto_id( Integer posto_id )
{
try
{
preProcess( POSTO_ID, posto_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.posto_id = posto_id;
LAZY_LOADED_OBJECTS.put( POSTO_ID, Boolean.TRUE );
}
public Boolean getIs_principal()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( IS_PRINCIPAL );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.is_principal;
}
public void setIs_principal( Boolean is_principal )
{
try
{
preProcess( IS_PRINCIPAL, is_principal );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.is_principal = is_principal;
LAZY_LOADED_OBJECTS.put( IS_PRINCIPAL, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case PlanoPostosTrabalho.DESCRICAO_INDEX:
value = getDescricao();
break;
case PlanoPostosTrabalho.MEDIDA_ID_INDEX:
value = getMedida_id();
break;
case PlanoPostosTrabalho.TO_MEDIDA_ID_INDEX:
value = toMedida_id();
break;
case PlanoPostosTrabalho.ID_INDEX:
value = getId();
break;
case PlanoPostosTrabalho.POSTO_ID_INDEX:
value = getPosto_id();
break;
case PlanoPostosTrabalho.IS_PRINCIPAL_INDEX:
value = getIs_principal();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case PlanoPostosTrabalho.DESCRICAO_INDEX:
value = this.descricao;
break;
case PlanoPostosTrabalho.MEDIDA_ID_INDEX:
value = this.medida_id;
break;
case PlanoPostosTrabalho.TO_MEDIDA_ID_INDEX:
value = this.to_medida_id;
break;
case PlanoPostosTrabalho.ID_INDEX:
value = this.id;
break;
case PlanoPostosTrabalho.POSTO_ID_INDEX:
value = this.posto_id;
break;
case PlanoPostosTrabalho.IS_PRINCIPAL_INDEX:
value = this.is_principal;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case PlanoPostosTrabalho.DESCRICAO_INDEX:
setDescricao( ( String ) value );
break;
case PlanoPostosTrabalho.MEDIDA_ID_INDEX:
setMedida_id( ( Integer ) value );
break;
case PlanoPostosTrabalho.TO_MEDIDA_ID_INDEX:
setToMedida_id( ( db.data.siprp.outer.PlanoMedidasData ) value );
break;
case PlanoPostosTrabalho.ID_INDEX:
setId( ( Integer ) value );
break;
case PlanoPostosTrabalho.POSTO_ID_INDEX:
setPosto_id( ( Integer ) value );
break;
case PlanoPostosTrabalho.IS_PRINCIPAL_INDEX:
setIs_principal( ( Boolean ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case PlanoPostosTrabalho.DESCRICAO_INDEX:
this.descricao = ( String ) value;
break;
case PlanoPostosTrabalho.MEDIDA_ID_INDEX:
this.medida_id = ( Integer ) value;
break;
case PlanoPostosTrabalho.TO_MEDIDA_ID_INDEX:
this.to_medida_id = ( db.data.siprp.outer.PlanoMedidasData ) value;
break;
case PlanoPostosTrabalho.ID_INDEX:
this.id = ( Integer ) value;
break;
case PlanoPostosTrabalho.POSTO_ID_INDEX:
this.posto_id = ( Integer ) value;
break;
case PlanoPostosTrabalho.IS_PRINCIPAL_INDEX:
this.is_principal = ( Boolean ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case PlanoPostosTrabalho.DESCRICAO_INDEX:
theClass = String.class;
break;
case PlanoPostosTrabalho.MEDIDA_ID_INDEX:
theClass = Integer.class;
break;
case PlanoPostosTrabalho.TO_MEDIDA_ID_INDEX:
theClass = db.data.siprp.outer.PlanoMedidasData.class;
break;
case PlanoPostosTrabalho.ID_INDEX:
theClass = Integer.class;
break;
case PlanoPostosTrabalho.POSTO_ID_INDEX:
theClass = Integer.class;
break;
case PlanoPostosTrabalho.IS_PRINCIPAL_INDEX:
theClass = Boolean.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : PlanoPostosTrabalho._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, PlanoPostosTrabalho.PK_FIELD_NAMES );
Object idObject = array.get( row, col + 0 );
try
{
primaryKey.set( 0, ( Integer ) idObject );
setId( ( Integer ) idObject );
}
catch( ClassCastException ex )
{
if( idObject instanceof Number )
{
primaryKey.set( 0, ((Number)idObject).intValue() );
setId( ((Number)idObject).intValue() );
}
else {
throw ex;
}
}
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,326 +0,0 @@
/*
* PlanoValoresQualitativos.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class PlanoValoresQualitativos extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( PlanoValoresQualitativos.ID, PlanoValoresQualitativos.ID_INDEX );
FIELD_INDEXES.put( PlanoValoresQualitativos.ID_FULL, PlanoValoresQualitativos.ID_INDEX );
FIELD_INDEXES.put( PlanoValoresQualitativos.DESCRICAO, PlanoValoresQualitativos.DESCRICAO_INDEX );
FIELD_INDEXES.put( PlanoValoresQualitativos.DESCRICAO_FULL, PlanoValoresQualitativos.DESCRICAO_INDEX );
FIELD_INDEXES.put( PlanoValoresQualitativos.DELETED_STAMP, PlanoValoresQualitativos.DELETED_STAMP_INDEX );
FIELD_INDEXES.put( PlanoValoresQualitativos.DELETED_STAMP_FULL, PlanoValoresQualitativos.DELETED_STAMP_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final String TABLENAME = "plano_valores_qualitativos";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.plano_valores_qualitativos";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "plano_valores_qualitativos.id";
public static final int ID_INDEX = 0;
public static final String DESCRICAO = "descricao";
public static final String DESCRICAO_FULL = "plano_valores_qualitativos.descricao";
public static final int DESCRICAO_INDEX = 1;
public static final String DELETED_STAMP = "deleted_stamp";
public static final String DELETED_STAMP_FULL = "plano_valores_qualitativos.deleted_stamp";
public static final int DELETED_STAMP_INDEX = 2;
public static final String FIELD_NAMES[] = new String[]{
DESCRICAO, DELETED_STAMP, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + DESCRICAO, TABLENAME + "." + DELETED_STAMP, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, DESCRICAO, DELETED_STAMP, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, DESCRICAO, DELETED_STAMP, };
private Integer id;
private String descricao;
private java.sql.Timestamp deleted_stamp;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public PlanoValoresQualitativos()
{
super();
dirtyProperties = new boolean[]{ false, false, false };
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public String getDescricao()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DESCRICAO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.descricao;
}
public void setDescricao( String descricao )
{
try
{
preProcess( DESCRICAO, descricao );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.descricao = descricao;
LAZY_LOADED_OBJECTS.put( DESCRICAO, Boolean.TRUE );
}
public java.sql.Timestamp getDeleted_stamp()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DELETED_STAMP );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.deleted_stamp;
}
public void setDeleted_stamp( java.sql.Timestamp deleted_stamp )
{
try
{
preProcess( DELETED_STAMP, deleted_stamp );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.deleted_stamp = deleted_stamp;
LAZY_LOADED_OBJECTS.put( DELETED_STAMP, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case PlanoValoresQualitativos.ID_INDEX:
value = getId();
break;
case PlanoValoresQualitativos.DESCRICAO_INDEX:
value = getDescricao();
break;
case PlanoValoresQualitativos.DELETED_STAMP_INDEX:
value = getDeleted_stamp();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case PlanoValoresQualitativos.ID_INDEX:
value = this.id;
break;
case PlanoValoresQualitativos.DESCRICAO_INDEX:
value = this.descricao;
break;
case PlanoValoresQualitativos.DELETED_STAMP_INDEX:
value = this.deleted_stamp;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case PlanoValoresQualitativos.ID_INDEX:
setId( ( Integer ) value );
break;
case PlanoValoresQualitativos.DESCRICAO_INDEX:
setDescricao( ( String ) value );
break;
case PlanoValoresQualitativos.DELETED_STAMP_INDEX:
setDeleted_stamp( ( java.sql.Timestamp ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case PlanoValoresQualitativos.ID_INDEX:
this.id = ( Integer ) value;
break;
case PlanoValoresQualitativos.DESCRICAO_INDEX:
this.descricao = ( String ) value;
break;
case PlanoValoresQualitativos.DELETED_STAMP_INDEX:
this.deleted_stamp = ( java.sql.Timestamp ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case PlanoValoresQualitativos.ID_INDEX:
theClass = Integer.class;
break;
case PlanoValoresQualitativos.DESCRICAO_INDEX:
theClass = String.class;
break;
case PlanoValoresQualitativos.DELETED_STAMP_INDEX:
theClass = java.sql.Timestamp.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : PlanoValoresQualitativos._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, PlanoValoresQualitativos.PK_FIELD_NAMES );
primaryKey.set( 0, getId() );
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,178 +0,0 @@
/*
* Properties.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class Properties extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.ObjectPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final String TABLENAME = "properties";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.properties";
public static final int _INVALID__INDEX = -1;
public static final String FIELD_NAMES[] = new String[]{
};
public static final String FIELD_NAMES_FULL[] = new String[]{
};
protected static final String DB_FIELD_NAMES[] = new String[]{
};
protected static final String PK_FIELD_NAMES[] = new String[]{
};
public static final String DEFAULT_LOAD_SET[] = new String[] {
};
protected com.evolute.entity.utils.ObjectPrimaryKey primaryKey;
public Properties()
{
super();
dirtyProperties = new boolean[]{ };
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
throw new RuntimeException( "getPrimaryKeyName on Properties is invalid" );
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : Properties._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.ObjectPrimaryKey( TABLENAME, Properties.PK_FIELD_NAMES );
}
}
@Override
public com.evolute.entity.utils.ObjectPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,393 +0,0 @@
/*
* Recomendacoes.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class Recomendacoes extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( Recomendacoes.ID, Recomendacoes.ID_INDEX );
FIELD_INDEXES.put( Recomendacoes.ID_FULL, Recomendacoes.ID_INDEX );
com.evolute.entity.evo.EvoDataObject.register( Recomendacoes.CLASS_IDENTIFIER, Recomendacoes.ANALISE_ID, Recomendacoes.TO_ANALISE_ID );
FIELD_INDEXES.put( Recomendacoes.ANALISE_ID, Recomendacoes.ANALISE_ID_INDEX );
FIELD_INDEXES.put( Recomendacoes.ANALISE_ID_FULL, Recomendacoes.ANALISE_ID_INDEX );
FIELD_INDEXES.put( Recomendacoes.TO_ANALISE_ID, Recomendacoes.TO_ANALISE_ID_INDEX );
FIELD_INDEXES.put( Recomendacoes.RECOMENDACAO, Recomendacoes.RECOMENDACAO_INDEX );
FIELD_INDEXES.put( Recomendacoes.RECOMENDACAO_FULL, Recomendacoes.RECOMENDACAO_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final com.evolute.entity.ForeignKey ForeignKeyanalise_idToanalises_acidentes =
new com.evolute.entity.ForeignKey( Recomendacoes.class, Recomendacoes.ANALISE_ID, db.data.siprp.outer.AnalisesAcidentesData.class, db.data.siprp.outer.AnalisesAcidentesData.ID );
public static final String TABLENAME = "recomendacoes";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.recomendacoes";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "recomendacoes.id";
public static final int ID_INDEX = 0;
public static final String ANALISE_ID = "analise_id";
public static final String ANALISE_ID_FULL = "recomendacoes.analise_id";
public static final int ANALISE_ID_INDEX = 1;
public static final String TO_ANALISE_ID = "to_analise_id";
public static final String TO_ANALISE_ID_FULL = "recomendacoes.to_analise_id";
public static final int TO_ANALISE_ID_INDEX = 2;
public static final String RECOMENDACAO = "recomendacao";
public static final String RECOMENDACAO_FULL = "recomendacoes.recomendacao";
public static final int RECOMENDACAO_INDEX = 3;
public static final String FIELD_NAMES[] = new String[]{
ANALISE_ID, TO_ANALISE_ID, RECOMENDACAO, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + ANALISE_ID, TABLENAME + "." + TO_ANALISE_ID, TABLENAME + "." + RECOMENDACAO, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, ANALISE_ID, RECOMENDACAO, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, ANALISE_ID, RECOMENDACAO, };
private Integer id;
private Integer analise_id;
private db.data.siprp.outer.AnalisesAcidentesData to_analise_id;
private String recomendacao;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public Recomendacoes()
{
super();
dirtyProperties = new boolean[]{ false, false, false,
false };
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public Integer getAnalise_id()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ANALISE_ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.analise_id;
}
public void setAnalise_id( Integer analise_id )
{
try
{
preProcess( ANALISE_ID, analise_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.analise_id = analise_id;
LAZY_LOADED_OBJECTS.put( ANALISE_ID, Boolean.TRUE );
}
public db.data.siprp.outer.AnalisesAcidentesData toAnalise_id()
{
try
{
prepare( TO_ANALISE_ID );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
return this.to_analise_id;
}
public void setToAnalise_id( db.data.siprp.outer.AnalisesAcidentesData to_analise_id )
{
try
{
preProcess( TO_ANALISE_ID, to_analise_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.to_analise_id = to_analise_id;
}
public String getRecomendacao()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( RECOMENDACAO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.recomendacao;
}
public void setRecomendacao( String recomendacao )
{
try
{
preProcess( RECOMENDACAO, recomendacao );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.recomendacao = recomendacao;
LAZY_LOADED_OBJECTS.put( RECOMENDACAO, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Recomendacoes.ID_INDEX:
value = getId();
break;
case Recomendacoes.ANALISE_ID_INDEX:
value = getAnalise_id();
break;
case Recomendacoes.TO_ANALISE_ID_INDEX:
value = toAnalise_id();
break;
case Recomendacoes.RECOMENDACAO_INDEX:
value = getRecomendacao();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Recomendacoes.ID_INDEX:
value = this.id;
break;
case Recomendacoes.ANALISE_ID_INDEX:
value = this.analise_id;
break;
case Recomendacoes.TO_ANALISE_ID_INDEX:
value = this.to_analise_id;
break;
case Recomendacoes.RECOMENDACAO_INDEX:
value = this.recomendacao;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Recomendacoes.ID_INDEX:
setId( ( Integer ) value );
break;
case Recomendacoes.ANALISE_ID_INDEX:
setAnalise_id( ( Integer ) value );
break;
case Recomendacoes.TO_ANALISE_ID_INDEX:
setToAnalise_id( ( db.data.siprp.outer.AnalisesAcidentesData ) value );
break;
case Recomendacoes.RECOMENDACAO_INDEX:
setRecomendacao( ( String ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Recomendacoes.ID_INDEX:
this.id = ( Integer ) value;
break;
case Recomendacoes.ANALISE_ID_INDEX:
this.analise_id = ( Integer ) value;
break;
case Recomendacoes.TO_ANALISE_ID_INDEX:
this.to_analise_id = ( db.data.siprp.outer.AnalisesAcidentesData ) value;
break;
case Recomendacoes.RECOMENDACAO_INDEX:
this.recomendacao = ( String ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case Recomendacoes.ID_INDEX:
theClass = Integer.class;
break;
case Recomendacoes.ANALISE_ID_INDEX:
theClass = Integer.class;
break;
case Recomendacoes.TO_ANALISE_ID_INDEX:
theClass = db.data.siprp.outer.AnalisesAcidentesData.class;
break;
case Recomendacoes.RECOMENDACAO_INDEX:
theClass = String.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : Recomendacoes._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Recomendacoes.PK_FIELD_NAMES );
Object idObject = array.get( row, col + 0 );
try
{
primaryKey.set( 0, ( Integer ) idObject );
setId( ( Integer ) idObject );
}
catch( ClassCastException ex )
{
if( idObject instanceof Number )
{
primaryKey.set( 0, ((Number)idObject).intValue() );
setId( ((Number)idObject).intValue() );
}
else {
throw ex;
}
}
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,178 +0,0 @@
/*
* RiscoValoresTemp.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class RiscoValoresTemp extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.ObjectPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final String TABLENAME = "risco_valores_temp";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.risco_valores_temp";
public static final int _INVALID__INDEX = -1;
public static final String FIELD_NAMES[] = new String[]{
};
public static final String FIELD_NAMES_FULL[] = new String[]{
};
protected static final String DB_FIELD_NAMES[] = new String[]{
};
protected static final String PK_FIELD_NAMES[] = new String[]{
};
public static final String DEFAULT_LOAD_SET[] = new String[] {
};
protected com.evolute.entity.utils.ObjectPrimaryKey primaryKey;
public RiscoValoresTemp()
{
super();
dirtyProperties = new boolean[]{ };
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
throw new RuntimeException( "getPrimaryKeyName on RiscoValoresTemp is invalid" );
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : RiscoValoresTemp._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.ObjectPrimaryKey( TABLENAME, RiscoValoresTemp.PK_FIELD_NAMES );
}
}
@Override
public com.evolute.entity.utils.ObjectPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,178 +0,0 @@
/*
* Roles.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class Roles extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.ObjectPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final String TABLENAME = "roles";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.roles";
public static final int _INVALID__INDEX = -1;
public static final String FIELD_NAMES[] = new String[]{
};
public static final String FIELD_NAMES_FULL[] = new String[]{
};
protected static final String DB_FIELD_NAMES[] = new String[]{
};
protected static final String PK_FIELD_NAMES[] = new String[]{
};
public static final String DEFAULT_LOAD_SET[] = new String[] {
};
protected com.evolute.entity.utils.ObjectPrimaryKey primaryKey;
public Roles()
{
super();
dirtyProperties = new boolean[]{ };
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
throw new RuntimeException( "getPrimaryKeyName on Roles is invalid" );
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : Roles._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.ObjectPrimaryKey( TABLENAME, Roles.PK_FIELD_NAMES );
}
}
@Override
public com.evolute.entity.utils.ObjectPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,459 +0,0 @@
/*
* Seccoes.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class Seccoes extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( Seccoes.ID, Seccoes.ID_INDEX );
FIELD_INDEXES.put( Seccoes.ID_FULL, Seccoes.ID_INDEX );
FIELD_INDEXES.put( Seccoes.DESCRICAO, Seccoes.DESCRICAO_INDEX );
FIELD_INDEXES.put( Seccoes.DESCRICAO_FULL, Seccoes.DESCRICAO_INDEX );
com.evolute.entity.evo.EvoDataObject.register( Seccoes.CLASS_IDENTIFIER, Seccoes.DEPARTAMENTO_ID, Seccoes.TO_DEPARTAMENTO_ID );
FIELD_INDEXES.put( Seccoes.DEPARTAMENTO_ID, Seccoes.DEPARTAMENTO_ID_INDEX );
FIELD_INDEXES.put( Seccoes.DEPARTAMENTO_ID_FULL, Seccoes.DEPARTAMENTO_ID_INDEX );
FIELD_INDEXES.put( Seccoes.TO_DEPARTAMENTO_ID, Seccoes.TO_DEPARTAMENTO_ID_INDEX );
FIELD_INDEXES.put( Seccoes.ACTIVO, Seccoes.ACTIVO_INDEX );
FIELD_INDEXES.put( Seccoes.ACTIVO_FULL, Seccoes.ACTIVO_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final com.evolute.entity.ForeignKey ForeignKeydepartamento_idTodepartamentos =
new com.evolute.entity.ForeignKey( Seccoes.class, Seccoes.DEPARTAMENTO_ID, db.data.siprp.outer.DepartamentosData.class, db.data.siprp.outer.DepartamentosData.ID );
public static final String TABLENAME = "seccoes";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.seccoes";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "seccoes.id";
public static final int ID_INDEX = 0;
public static final String DESCRICAO = "descricao";
public static final String DESCRICAO_FULL = "seccoes.descricao";
public static final int DESCRICAO_INDEX = 1;
public static final String DEPARTAMENTO_ID = "departamento_id";
public static final String DEPARTAMENTO_ID_FULL = "seccoes.departamento_id";
public static final int DEPARTAMENTO_ID_INDEX = 2;
public static final String TO_DEPARTAMENTO_ID = "to_departamento_id";
public static final String TO_DEPARTAMENTO_ID_FULL = "seccoes.to_departamento_id";
public static final int TO_DEPARTAMENTO_ID_INDEX = 3;
public static final String ACTIVO = "activo";
public static final String ACTIVO_FULL = "seccoes.activo";
public static final int ACTIVO_INDEX = 4;
public static final String FIELD_NAMES[] = new String[]{
DESCRICAO, DEPARTAMENTO_ID, TO_DEPARTAMENTO_ID, ACTIVO, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + DESCRICAO, TABLENAME + "." + DEPARTAMENTO_ID, TABLENAME + "." + TO_DEPARTAMENTO_ID, TABLENAME + "." + ACTIVO, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, DESCRICAO, DEPARTAMENTO_ID, ACTIVO, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, DESCRICAO, DEPARTAMENTO_ID, ACTIVO, };
private Integer id;
private String descricao;
private Integer departamento_id;
private db.data.siprp.outer.DepartamentosData to_departamento_id;
private String activo;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public Seccoes()
{
super();
dirtyProperties = new boolean[]{ false, false, false
, false, false };
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public java.util.List<db.data.siprp.outer.AnalisesAcidentesData>fromAnalisesAcidentes_seccao_id()
{
java.util.List<db.data.siprp.outer.AnalisesAcidentesData> result = new java.util.LinkedList< db.data.siprp.outer.AnalisesAcidentesData >();
if ( getPrimaryKey() != null )
{
try
{
result = fromReference( db.data.siprp.outer.AnalisesAcidentesData.class , getPrimaryKey().getMap().get("id"), "seccao_id" );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
}
return result;
}
public String getDescricao()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DESCRICAO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.descricao;
}
public void setDescricao( String descricao )
{
try
{
preProcess( DESCRICAO, descricao );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.descricao = descricao;
LAZY_LOADED_OBJECTS.put( DESCRICAO, Boolean.TRUE );
}
public Integer getDepartamento_id()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DEPARTAMENTO_ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.departamento_id;
}
public void setDepartamento_id( Integer departamento_id )
{
try
{
preProcess( DEPARTAMENTO_ID, departamento_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.departamento_id = departamento_id;
LAZY_LOADED_OBJECTS.put( DEPARTAMENTO_ID, Boolean.TRUE );
}
public db.data.siprp.outer.DepartamentosData toDepartamento_id()
{
try
{
prepare( TO_DEPARTAMENTO_ID );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
return this.to_departamento_id;
}
public void setToDepartamento_id( db.data.siprp.outer.DepartamentosData to_departamento_id )
{
try
{
preProcess( TO_DEPARTAMENTO_ID, to_departamento_id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.to_departamento_id = to_departamento_id;
}
public String getActivo()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ACTIVO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.activo;
}
public void setActivo( String activo )
{
try
{
preProcess( ACTIVO, activo );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.activo = activo;
LAZY_LOADED_OBJECTS.put( ACTIVO, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Seccoes.ID_INDEX:
value = getId();
break;
case Seccoes.DESCRICAO_INDEX:
value = getDescricao();
break;
case Seccoes.DEPARTAMENTO_ID_INDEX:
value = getDepartamento_id();
break;
case Seccoes.TO_DEPARTAMENTO_ID_INDEX:
value = toDepartamento_id();
break;
case Seccoes.ACTIVO_INDEX:
value = getActivo();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Seccoes.ID_INDEX:
value = this.id;
break;
case Seccoes.DESCRICAO_INDEX:
value = this.descricao;
break;
case Seccoes.DEPARTAMENTO_ID_INDEX:
value = this.departamento_id;
break;
case Seccoes.TO_DEPARTAMENTO_ID_INDEX:
value = this.to_departamento_id;
break;
case Seccoes.ACTIVO_INDEX:
value = this.activo;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Seccoes.ID_INDEX:
setId( ( Integer ) value );
break;
case Seccoes.DESCRICAO_INDEX:
setDescricao( ( String ) value );
break;
case Seccoes.DEPARTAMENTO_ID_INDEX:
setDepartamento_id( ( Integer ) value );
break;
case Seccoes.TO_DEPARTAMENTO_ID_INDEX:
setToDepartamento_id( ( db.data.siprp.outer.DepartamentosData ) value );
break;
case Seccoes.ACTIVO_INDEX:
setActivo( ( String ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Seccoes.ID_INDEX:
this.id = ( Integer ) value;
break;
case Seccoes.DESCRICAO_INDEX:
this.descricao = ( String ) value;
break;
case Seccoes.DEPARTAMENTO_ID_INDEX:
this.departamento_id = ( Integer ) value;
break;
case Seccoes.TO_DEPARTAMENTO_ID_INDEX:
this.to_departamento_id = ( db.data.siprp.outer.DepartamentosData ) value;
break;
case Seccoes.ACTIVO_INDEX:
this.activo = ( String ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case Seccoes.ID_INDEX:
theClass = Integer.class;
break;
case Seccoes.DESCRICAO_INDEX:
theClass = String.class;
break;
case Seccoes.DEPARTAMENTO_ID_INDEX:
theClass = Integer.class;
break;
case Seccoes.TO_DEPARTAMENTO_ID_INDEX:
theClass = db.data.siprp.outer.DepartamentosData.class;
break;
case Seccoes.ACTIVO_INDEX:
theClass = String.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : Seccoes._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Seccoes.PK_FIELD_NAMES );
Object idObject = array.get( row, col + 0 );
try
{
primaryKey.set( 0, ( Integer ) idObject );
setId( ( Integer ) idObject );
}
catch( ClassCastException ex )
{
if( idObject instanceof Number )
{
primaryKey.set( 0, ((Number)idObject).intValue() );
setId( ((Number)idObject).intValue() );
}
else {
throw ex;
}
}
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,343 +0,0 @@
/*
* TiposExamesComp.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class TiposExamesComp extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( TiposExamesComp.ID, TiposExamesComp.ID_INDEX );
FIELD_INDEXES.put( TiposExamesComp.ID_FULL, TiposExamesComp.ID_INDEX );
FIELD_INDEXES.put( TiposExamesComp.ORDEM, TiposExamesComp.ORDEM_INDEX );
FIELD_INDEXES.put( TiposExamesComp.ORDEM_FULL, TiposExamesComp.ORDEM_INDEX );
FIELD_INDEXES.put( TiposExamesComp.DESCRICAO, TiposExamesComp.DESCRICAO_INDEX );
FIELD_INDEXES.put( TiposExamesComp.DESCRICAO_FULL, TiposExamesComp.DESCRICAO_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final String TABLENAME = "tipos_exames_comp";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.tipos_exames_comp";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "tipos_exames_comp.id";
public static final int ID_INDEX = 0;
public static final String ORDEM = "ordem";
public static final String ORDEM_FULL = "tipos_exames_comp.ordem";
public static final int ORDEM_INDEX = 1;
public static final String DESCRICAO = "descricao";
public static final String DESCRICAO_FULL = "tipos_exames_comp.descricao";
public static final int DESCRICAO_INDEX = 2;
public static final String FIELD_NAMES[] = new String[]{
ORDEM, DESCRICAO, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + ORDEM, TABLENAME + "." + DESCRICAO, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, ORDEM, DESCRICAO, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, ORDEM, DESCRICAO, };
private Integer id;
private Integer ordem;
private String descricao;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public TiposExamesComp()
{
super();
dirtyProperties = new boolean[]{ false, false, false };
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public java.util.List<db.data.siprp.outer.ExamesPerfisData>fromExamesPerfis_tipo()
{
java.util.List<db.data.siprp.outer.ExamesPerfisData> result = new java.util.LinkedList< db.data.siprp.outer.ExamesPerfisData >();
if ( getPrimaryKey() != null )
{
try
{
result = fromReference( db.data.siprp.outer.ExamesPerfisData.class , getPrimaryKey().getMap().get("id"), "tipo" );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
}
return result;
}
public Integer getOrdem()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ORDEM );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.ordem;
}
public void setOrdem( Integer ordem )
{
try
{
preProcess( ORDEM, ordem );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.ordem = ordem;
LAZY_LOADED_OBJECTS.put( ORDEM, Boolean.TRUE );
}
public String getDescricao()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DESCRICAO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.descricao;
}
public void setDescricao( String descricao )
{
try
{
preProcess( DESCRICAO, descricao );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.descricao = descricao;
LAZY_LOADED_OBJECTS.put( DESCRICAO, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case TiposExamesComp.ID_INDEX:
value = getId();
break;
case TiposExamesComp.ORDEM_INDEX:
value = getOrdem();
break;
case TiposExamesComp.DESCRICAO_INDEX:
value = getDescricao();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case TiposExamesComp.ID_INDEX:
value = this.id;
break;
case TiposExamesComp.ORDEM_INDEX:
value = this.ordem;
break;
case TiposExamesComp.DESCRICAO_INDEX:
value = this.descricao;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case TiposExamesComp.ID_INDEX:
setId( ( Integer ) value );
break;
case TiposExamesComp.ORDEM_INDEX:
setOrdem( ( Integer ) value );
break;
case TiposExamesComp.DESCRICAO_INDEX:
setDescricao( ( String ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case TiposExamesComp.ID_INDEX:
this.id = ( Integer ) value;
break;
case TiposExamesComp.ORDEM_INDEX:
this.ordem = ( Integer ) value;
break;
case TiposExamesComp.DESCRICAO_INDEX:
this.descricao = ( String ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case TiposExamesComp.ID_INDEX:
theClass = Integer.class;
break;
case TiposExamesComp.ORDEM_INDEX:
theClass = Integer.class;
break;
case TiposExamesComp.DESCRICAO_INDEX:
theClass = String.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : TiposExamesComp._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, TiposExamesComp.PK_FIELD_NAMES );
primaryKey.set( 0, getId() );
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,441 +0,0 @@
/*
* TiposUtilizadores.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class TiposUtilizadores extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( TiposUtilizadores.ID, TiposUtilizadores.ID_INDEX );
FIELD_INDEXES.put( TiposUtilizadores.ID_FULL, TiposUtilizadores.ID_INDEX );
FIELD_INDEXES.put( TiposUtilizadores.TIPO, TiposUtilizadores.TIPO_INDEX );
FIELD_INDEXES.put( TiposUtilizadores.TIPO_FULL, TiposUtilizadores.TIPO_INDEX );
FIELD_INDEXES.put( TiposUtilizadores.DESCRICAO, TiposUtilizadores.DESCRICAO_INDEX );
FIELD_INDEXES.put( TiposUtilizadores.DESCRICAO_FULL, TiposUtilizadores.DESCRICAO_INDEX );
FIELD_INDEXES.put( TiposUtilizadores.ACTIVO, TiposUtilizadores.ACTIVO_INDEX );
FIELD_INDEXES.put( TiposUtilizadores.ACTIVO_FULL, TiposUtilizadores.ACTIVO_INDEX );
FIELD_INDEXES.put( TiposUtilizadores.ORDEM, TiposUtilizadores.ORDEM_INDEX );
FIELD_INDEXES.put( TiposUtilizadores.ORDEM_FULL, TiposUtilizadores.ORDEM_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final String TABLENAME = "tipos_utilizadores";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.tipos_utilizadores";
public static final int _INVALID__INDEX = -1;
public static final String ID = "id";
public static final String ID_FULL = "tipos_utilizadores.id";
public static final int ID_INDEX = 0;
public static final String TIPO = "tipo";
public static final String TIPO_FULL = "tipos_utilizadores.tipo";
public static final int TIPO_INDEX = 1;
public static final String DESCRICAO = "descricao";
public static final String DESCRICAO_FULL = "tipos_utilizadores.descricao";
public static final int DESCRICAO_INDEX = 2;
public static final String ACTIVO = "activo";
public static final String ACTIVO_FULL = "tipos_utilizadores.activo";
public static final int ACTIVO_INDEX = 3;
public static final String ORDEM = "ordem";
public static final String ORDEM_FULL = "tipos_utilizadores.ordem";
public static final int ORDEM_INDEX = 4;
public static final String FIELD_NAMES[] = new String[]{
TIPO, DESCRICAO, ACTIVO, ORDEM, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + TIPO, TABLENAME + "." + DESCRICAO, TABLENAME + "." + ACTIVO, TABLENAME + "." + ORDEM, };
protected static final String DB_FIELD_NAMES[] = new String[]{
ID, TIPO, DESCRICAO, ACTIVO, ORDEM, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
ID, TIPO, DESCRICAO, ACTIVO, ORDEM, };
private Integer id;
private Integer tipo;
private String descricao;
private String activo;
private Integer ordem;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public TiposUtilizadores()
{
super();
dirtyProperties = new boolean[]{ false, false, false,
false, false };
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public Integer getTipo()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( TIPO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.tipo;
}
public void setTipo( Integer tipo )
{
try
{
preProcess( TIPO, tipo );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.tipo = tipo;
LAZY_LOADED_OBJECTS.put( TIPO, Boolean.TRUE );
}
public String getDescricao()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( DESCRICAO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.descricao;
}
public void setDescricao( String descricao )
{
try
{
preProcess( DESCRICAO, descricao );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.descricao = descricao;
LAZY_LOADED_OBJECTS.put( DESCRICAO, Boolean.TRUE );
}
public String getActivo()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ACTIVO );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.activo;
}
public void setActivo( String activo )
{
try
{
preProcess( ACTIVO, activo );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.activo = activo;
LAZY_LOADED_OBJECTS.put( ACTIVO, Boolean.TRUE );
}
public Integer getOrdem()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ORDEM );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.ordem;
}
public void setOrdem( Integer ordem )
{
try
{
preProcess( ORDEM, ordem );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.ordem = ordem;
LAZY_LOADED_OBJECTS.put( ORDEM, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case TiposUtilizadores.ID_INDEX:
value = getId();
break;
case TiposUtilizadores.TIPO_INDEX:
value = getTipo();
break;
case TiposUtilizadores.DESCRICAO_INDEX:
value = getDescricao();
break;
case TiposUtilizadores.ACTIVO_INDEX:
value = getActivo();
break;
case TiposUtilizadores.ORDEM_INDEX:
value = getOrdem();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case TiposUtilizadores.ID_INDEX:
value = this.id;
break;
case TiposUtilizadores.TIPO_INDEX:
value = this.tipo;
break;
case TiposUtilizadores.DESCRICAO_INDEX:
value = this.descricao;
break;
case TiposUtilizadores.ACTIVO_INDEX:
value = this.activo;
break;
case TiposUtilizadores.ORDEM_INDEX:
value = this.ordem;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case TiposUtilizadores.ID_INDEX:
setId( ( Integer ) value );
break;
case TiposUtilizadores.TIPO_INDEX:
setTipo( ( Integer ) value );
break;
case TiposUtilizadores.DESCRICAO_INDEX:
setDescricao( ( String ) value );
break;
case TiposUtilizadores.ACTIVO_INDEX:
setActivo( ( String ) value );
break;
case TiposUtilizadores.ORDEM_INDEX:
setOrdem( ( Integer ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case TiposUtilizadores.ID_INDEX:
this.id = ( Integer ) value;
break;
case TiposUtilizadores.TIPO_INDEX:
this.tipo = ( Integer ) value;
break;
case TiposUtilizadores.DESCRICAO_INDEX:
this.descricao = ( String ) value;
break;
case TiposUtilizadores.ACTIVO_INDEX:
this.activo = ( String ) value;
break;
case TiposUtilizadores.ORDEM_INDEX:
this.ordem = ( Integer ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case TiposUtilizadores.ID_INDEX:
theClass = Integer.class;
break;
case TiposUtilizadores.TIPO_INDEX:
theClass = Integer.class;
break;
case TiposUtilizadores.DESCRICAO_INDEX:
theClass = String.class;
break;
case TiposUtilizadores.ACTIVO_INDEX:
theClass = String.class;
break;
case TiposUtilizadores.ORDEM_INDEX:
theClass = Integer.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : TiposUtilizadores._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, TiposUtilizadores.PK_FIELD_NAMES );
Object idObject = array.get( row, col + 0 );
try
{
primaryKey.set( 0, ( Integer ) idObject );
setId( ( Integer ) idObject );
}
catch( ClassCastException ex )
{
if( idObject instanceof Number )
{
primaryKey.set( 0, ((Number)idObject).intValue() );
setId( ((Number)idObject).intValue() );
}
else {
throw ex;
}
}
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,178 +0,0 @@
/*
* Users.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class Users extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.ObjectPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final String TABLENAME = "users";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.users";
public static final int _INVALID__INDEX = -1;
public static final String FIELD_NAMES[] = new String[]{
};
public static final String FIELD_NAMES_FULL[] = new String[]{
};
protected static final String DB_FIELD_NAMES[] = new String[]{
};
protected static final String PK_FIELD_NAMES[] = new String[]{
};
public static final String DEFAULT_LOAD_SET[] = new String[] {
};
protected com.evolute.entity.utils.ObjectPrimaryKey primaryKey;
public Users()
{
super();
dirtyProperties = new boolean[]{ };
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
throw new RuntimeException( "getPrimaryKeyName on Users is invalid" );
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : Users._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.ObjectPrimaryKey( TABLENAME, Users.PK_FIELD_NAMES );
}
}
@Override
public com.evolute.entity.utils.ObjectPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,342 +0,0 @@
/*
* Version.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Use but DON'T TOUCH
* -> (can't touch this)
*/
package db.data.siprp.inner;
public class Version extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
{
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
static
{
FIELD_INDEXES.put( Version.CURRENT_VERSION, Version.CURRENT_VERSION_INDEX );
FIELD_INDEXES.put( Version.CURRENT_VERSION_FULL, Version.CURRENT_VERSION_INDEX );
FIELD_INDEXES.put( Version.ID, Version.ID_INDEX );
FIELD_INDEXES.put( Version.ID_FULL, Version.ID_INDEX );
FIELD_INDEXES.put( Version.MODULE_NAME, Version.MODULE_NAME_INDEX );
FIELD_INDEXES.put( Version.MODULE_NAME_FULL, Version.MODULE_NAME_INDEX );
}
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
public static final String TABLENAME = "version";
public static final String CLASS_IDENTIFIER = "db.data.siprp.inner.version";
public static final int _INVALID__INDEX = -1;
public static final String CURRENT_VERSION = "current_version";
public static final String CURRENT_VERSION_FULL = "version.current_version";
public static final int CURRENT_VERSION_INDEX = 0;
public static final String ID = "id";
public static final String ID_FULL = "version.id";
public static final int ID_INDEX = 1;
public static final String MODULE_NAME = "module_name";
public static final String MODULE_NAME_FULL = "version.module_name";
public static final int MODULE_NAME_INDEX = 2;
public static final String FIELD_NAMES[] = new String[]{
CURRENT_VERSION, MODULE_NAME, };
public static final String FIELD_NAMES_FULL[] = new String[]{
TABLENAME + "." + CURRENT_VERSION, TABLENAME + "." + MODULE_NAME, };
protected static final String DB_FIELD_NAMES[] = new String[]{
CURRENT_VERSION, ID, MODULE_NAME, };
protected static final String PK_FIELD_NAMES[] = new String[]{
ID, };
public static final String DEFAULT_LOAD_SET[] = new String[] {
CURRENT_VERSION, ID, MODULE_NAME, };
private Double current_version;
private Integer id;
private String module_name;
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
public Version()
{
super();
dirtyProperties = new boolean[]{ false, false, false };
}
public Double getCurrent_version()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( CURRENT_VERSION );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.current_version;
}
public void setCurrent_version( Double current_version )
{
try
{
preProcess( CURRENT_VERSION, current_version );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.current_version = current_version;
LAZY_LOADED_OBJECTS.put( CURRENT_VERSION, Boolean.TRUE );
}
public Integer getId()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( ID );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.id;
}
public void setId( Integer id )
{
try
{
preProcess( ID, id );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.id = id;
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
}
public String getModule_name()
{
try
{
setLastAccess( System.currentTimeMillis() );
prepare( MODULE_NAME );
}
catch( java.lang.Exception ex )
{
throw new RuntimeException( ex );
}
return this.module_name;
}
public void setModule_name( String module_name )
{
try
{
preProcess( MODULE_NAME, module_name );
}
catch( com.evolute.entity.evo.EvoDataException edex )
{
throw new RuntimeException( edex );
}
this.module_name = module_name;
LAZY_LOADED_OBJECTS.put( MODULE_NAME, Boolean.TRUE );
}
public Object get( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Version.CURRENT_VERSION_INDEX:
value = getCurrent_version();
break;
case Version.ID_INDEX:
value = getId();
break;
case Version.MODULE_NAME_INDEX:
value = getModule_name();
break;
}
return value;
}
public Object rawGet( String fieldName )
{
Object value = null;
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Version.CURRENT_VERSION_INDEX:
value = this.current_version;
break;
case Version.ID_INDEX:
value = this.id;
break;
case Version.MODULE_NAME_INDEX:
value = this.module_name;
break;
}
return value;
}
public void set( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Version.CURRENT_VERSION_INDEX:
setCurrent_version( ( Double ) value );
break;
case Version.ID_INDEX:
setId( ( Integer ) value );
break;
case Version.MODULE_NAME_INDEX:
setModule_name( ( String ) value );
break;
}
}
public void rawSet( String fieldName, Object value )
{
Integer index = getFieldIndex( fieldName );
switch( index )
{
case Version.CURRENT_VERSION_INDEX:
this.current_version = ( Double ) value;
break;
case Version.ID_INDEX:
this.id = ( Integer ) value;
break;
case Version.MODULE_NAME_INDEX:
this.module_name = ( String ) value;
break;
}
}
public String []getFieldNames()
{
return FIELD_NAMES;
}
public String []getFieldNamesFull()
{
return FIELD_NAMES_FULL;
}
public String []getDBFieldNames()
{
return DB_FIELD_NAMES;
}
public String []getPrimaryKeyNames()
{
return PK_FIELD_NAMES;
}
public String []getDefaultLoadSet()
{
return DEFAULT_LOAD_SET;
}
public String getPrimaryKeyName()
{
return PK_FIELD_NAMES[ 0 ];
}
public Class<?> getFieldClass( String fieldName )
{
Integer index = getFieldIndex( fieldName );
Class<?> theClass = null;
switch( index )
{
case Version.CURRENT_VERSION_INDEX:
theClass = Double.class;
break;
case Version.ID_INDEX:
theClass = Integer.class;
break;
case Version.MODULE_NAME_INDEX:
theClass = String.class;
break;
}
return theClass;
}
public Integer getFieldIndex( String fieldName )
{
Integer index = FIELD_INDEXES.get( fieldName );
return index != null ? index : Version._INVALID__INDEX;
}
public String getTableName()
{
return TABLENAME;
}
public String getClassIdentifier()
{
return CLASS_IDENTIFIER;
}
@Override
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
{
if( primaryKey == null )
{
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, Version.PK_FIELD_NAMES );
Object idObject = array.get( row, col + 0 );
try
{
primaryKey.set( 0, ( Integer ) idObject );
setId( ( Integer ) idObject );
}
catch( ClassCastException ex )
{
if( idObject instanceof Number )
{
primaryKey.set( 0, ((Number)idObject).intValue() );
setId( ((Number)idObject).intValue() );
}
else {
throw ex;
}
}
}
}
@Override
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
{
return primaryKey;
}
public void initLazyLoadFields()
{
}
public boolean isPropertyLoaded( String fieldName )
{
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
{
return true;
}
else
{
return LAZY_LOADED_OBJECTS.get( fieldName );
}
}
}

@ -1,18 +0,0 @@
/*
* AcidentadosData.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Edit at will
*/
package db.data.siprp.outer;
public final class AcidentadosData extends db.data.siprp.inner.Acidentados
{
public AcidentadosData()
{
super();
}
}

@ -1,18 +0,0 @@
/*
* ActualizacaoData.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Edit at will
*/
package db.data.siprp.outer;
public final class ActualizacaoData extends db.data.siprp.inner.Actualizacao
{
public ActualizacaoData()
{
super();
}
}

@ -1,18 +0,0 @@
/*
* AnalisesAcidentesData.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Edit at will
*/
package db.data.siprp.outer;
public final class AnalisesAcidentesData extends db.data.siprp.inner.AnalisesAcidentes
{
public AnalisesAcidentesData()
{
super();
}
}

@ -1,18 +0,0 @@
/*
* AvisosData.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Edit at will
*/
package db.data.siprp.outer;
public final class AvisosData extends db.data.siprp.inner.Avisos
{
public AvisosData()
{
super();
}
}

@ -1,18 +0,0 @@
/*
* CausasData.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Edit at will
*/
package db.data.siprp.outer;
public final class CausasData extends db.data.siprp.inner.Causas
{
public CausasData()
{
super();
}
}

@ -1,18 +0,0 @@
/*
* ContactosData.java
*
* Generated by com.evutils.codegen.EntityObjectGenerator
*
* Edit at will
*/
package db.data.siprp.outer;
public final class ContactosData extends db.data.siprp.inner.Contactos
{
public ContactosData()
{
super();
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save