diff --git a/trunk/SIPRPSoft/.classpath b/trunk/SIPRPSoft/.classpath index b8a6e6cf..84ce8fd2 100644 --- a/trunk/SIPRPSoft/.classpath +++ b/trunk/SIPRPSoft/.classpath @@ -11,7 +11,7 @@ - + @@ -26,12 +26,13 @@ - + + diff --git a/trunk/SIPRPSoft/ant/common/evo-app-build-common.xml b/trunk/SIPRPSoft/ant/common/evo-app-build-common.xml new file mode 100644 index 00000000..8b7488ea --- /dev/null +++ b/trunk/SIPRPSoft/ant/common/evo-app-build-common.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/trunk/SIPRPSoft/ant/common/evo-app-build-obfuscate-common.xml b/trunk/SIPRPSoft/ant/common/evo-app-build-obfuscate-common.xml new file mode 100644 index 00000000..6bae8003 --- /dev/null +++ b/trunk/SIPRPSoft/ant/common/evo-app-build-obfuscate-common.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + -printseeds + -verbose + -dontskipnonpubliclibraryclasses + + -keepclasseswithmembers public class * { + public static void main(java.lang.String[]); + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/trunk/SIPRPSoft/ant/common/evo-app-compile-common.xml b/trunk/SIPRPSoft/ant/common/evo-app-compile-common.xml new file mode 100644 index 00000000..a7b6edd2 --- /dev/null +++ b/trunk/SIPRPSoft/ant/common/evo-app-compile-common.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/trunk/SIPRPSoft/ant/common/evo-app-deploy-common.xml b/trunk/SIPRPSoft/ant/common/evo-app-deploy-common.xml new file mode 100644 index 00000000..81e43486 --- /dev/null +++ b/trunk/SIPRPSoft/ant/common/evo-app-deploy-common.xml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deploy cancelled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/trunk/SIPRPSoft/ant/common/evo-app-load-properties.xml b/trunk/SIPRPSoft/ant/common/evo-app-load-properties.xml new file mode 100644 index 00000000..219e80f0 --- /dev/null +++ b/trunk/SIPRPSoft/ant/common/evo-app-load-properties.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/trunk/SIPRPSoft/ant/common/evo-app-multiple-client-common.xml b/trunk/SIPRPSoft/ant/common/evo-app-multiple-client-common.xml new file mode 100644 index 00000000..c8db9ba9 --- /dev/null +++ b/trunk/SIPRPSoft/ant/common/evo-app-multiple-client-common.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/trunk/SIPRPSoft/ant/evo-app-build-java5.xml b/trunk/SIPRPSoft/ant/evo-app-build-java5.xml new file mode 100644 index 00000000..24157b47 --- /dev/null +++ b/trunk/SIPRPSoft/ant/evo-app-build-java5.xml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/trunk/SIPRPSoft/ant/evo-app-build-jdo.xml b/trunk/SIPRPSoft/ant/evo-app-build-jdo.xml new file mode 100644 index 00000000..2c947be9 --- /dev/null +++ b/trunk/SIPRPSoft/ant/evo-app-build-jdo.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/trunk/SIPRPSoft/ant/evo-app-build-obfuscate-jdo.xml b/trunk/SIPRPSoft/ant/evo-app-build-obfuscate-jdo.xml new file mode 100644 index 00000000..65193875 --- /dev/null +++ b/trunk/SIPRPSoft/ant/evo-app-build-obfuscate-jdo.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/trunk/SIPRPSoft/ant/evo-app-build-obfuscate.xml b/trunk/SIPRPSoft/ant/evo-app-build-obfuscate.xml new file mode 100644 index 00000000..46a29690 --- /dev/null +++ b/trunk/SIPRPSoft/ant/evo-app-build-obfuscate.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/trunk/SIPRPSoft/ant/evo-app-build.xml b/trunk/SIPRPSoft/ant/evo-app-build.xml new file mode 100644 index 00000000..2fd3da43 --- /dev/null +++ b/trunk/SIPRPSoft/ant/evo-app-build.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/trunk/SIPRPSoft/ant/evo-app-multiple-client-build.xml b/trunk/SIPRPSoft/ant/evo-app-multiple-client-build.xml new file mode 100644 index 00000000..9d6f0cc3 --- /dev/null +++ b/trunk/SIPRPSoft/ant/evo-app-multiple-client-build.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/trunk/SIPRPSoft/ant/evo-app-multiple-client-obfuscated-build.xml b/trunk/SIPRPSoft/ant/evo-app-multiple-client-obfuscated-build.xml new file mode 100644 index 00000000..06a1ac8e --- /dev/null +++ b/trunk/SIPRPSoft/ant/evo-app-multiple-client-obfuscated-build.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/trunk/SIPRPSoft/ant/evo-app-ws-client-build.xml b/trunk/SIPRPSoft/ant/evo-app-ws-client-build.xml new file mode 100644 index 00000000..a499a031 --- /dev/null +++ b/trunk/SIPRPSoft/ant/evo-app-ws-client-build.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/trunk/SIPRPSoft/ant/evo-library-build.xml b/trunk/SIPRPSoft/ant/evo-library-build.xml new file mode 100644 index 00000000..39a2bc19 --- /dev/null +++ b/trunk/SIPRPSoft/ant/evo-library-build.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/trunk/SIPRPSoft/build.xml b/trunk/SIPRPSoft/build.xml new file mode 100644 index 00000000..5a5e6254 --- /dev/null +++ b/trunk/SIPRPSoft/build.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/trunk/SIPRPSoft/lib.tools/ant-classloadertask.jar b/trunk/SIPRPSoft/lib.tools/ant-classloadertask.jar new file mode 100644 index 00000000..d2f58d9f Binary files /dev/null and b/trunk/SIPRPSoft/lib.tools/ant-classloadertask.jar differ diff --git a/trunk/SIPRPSoft/lib.tools/asm-all-3.1.jar b/trunk/SIPRPSoft/lib.tools/asm-all-3.1.jar new file mode 100644 index 00000000..5f37af52 Binary files /dev/null and b/trunk/SIPRPSoft/lib.tools/asm-all-3.1.jar differ diff --git a/trunk/SIPRPSoft/lib.tools/datanucleus-enhancer-1.1.4.jar b/trunk/SIPRPSoft/lib.tools/datanucleus-enhancer-1.1.4.jar new file mode 100644 index 00000000..6f7dd6c3 Binary files /dev/null and b/trunk/SIPRPSoft/lib.tools/datanucleus-enhancer-1.1.4.jar differ diff --git a/trunk/SIPRPSoft/lib.tools/evo-ant.jar b/trunk/SIPRPSoft/lib.tools/evo-ant.jar new file mode 100644 index 00000000..4d3c8dc3 Binary files /dev/null and b/trunk/SIPRPSoft/lib.tools/evo-ant.jar differ diff --git a/trunk/SIPRPSoft/lib.tools/jaxen-1.1.1.jar b/trunk/SIPRPSoft/lib.tools/jaxen-1.1.1.jar new file mode 100644 index 00000000..b6336311 Binary files /dev/null and b/trunk/SIPRPSoft/lib.tools/jaxen-1.1.1.jar differ diff --git a/trunk/SIPRPSoft/lib.tools/jdom.jar b/trunk/SIPRPSoft/lib.tools/jdom.jar new file mode 100644 index 00000000..288e64cb Binary files /dev/null and b/trunk/SIPRPSoft/lib.tools/jdom.jar differ diff --git a/trunk/SIPRPSoft/lib.tools/jsch-0.1.41.jar b/trunk/SIPRPSoft/lib.tools/jsch-0.1.41.jar new file mode 100644 index 00000000..eb1e7647 Binary files /dev/null and b/trunk/SIPRPSoft/lib.tools/jsch-0.1.41.jar differ diff --git a/trunk/SIPRPSoft/lib.tools/proguard.jar b/trunk/SIPRPSoft/lib.tools/proguard.jar new file mode 100644 index 00000000..3a9aebcf Binary files /dev/null and b/trunk/SIPRPSoft/lib.tools/proguard.jar differ diff --git a/trunk/SIPRPSoft/lib.tools/svnClientAdapter.jar b/trunk/SIPRPSoft/lib.tools/svnClientAdapter.jar new file mode 100644 index 00000000..ed37ba46 Binary files /dev/null and b/trunk/SIPRPSoft/lib.tools/svnClientAdapter.jar differ diff --git a/trunk/SIPRPSoft/lib.tools/svnant.jar b/trunk/SIPRPSoft/lib.tools/svnant.jar new file mode 100644 index 00000000..af52be0d Binary files /dev/null and b/trunk/SIPRPSoft/lib.tools/svnant.jar differ diff --git a/trunk/SIPRPSoft/lib.tools/svnjavahl.jar b/trunk/SIPRPSoft/lib.tools/svnjavahl.jar new file mode 100644 index 00000000..71873057 Binary files /dev/null and b/trunk/SIPRPSoft/lib.tools/svnjavahl.jar differ diff --git a/trunk/SIPRPSoft/lib/evolute.jar b/trunk/SIPRPSoft/lib/evolute.jar index 122596d7..e58c1ce5 100644 Binary files a/trunk/SIPRPSoft/lib/evolute.jar and b/trunk/SIPRPSoft/lib/evolute.jar differ diff --git a/trunk/SIPRPSoft/lib/postgresql-8.0-317.jdbc3.jar b/trunk/SIPRPSoft/lib/postgresql-8.0-317.jdbc3.jar deleted file mode 100755 index 7ed63133..00000000 Binary files a/trunk/SIPRPSoft/lib/postgresql-8.0-317.jdbc3.jar and /dev/null differ diff --git a/trunk/SIPRPSoft/lib/postgresql-8.4-701.jdbc4.jar b/trunk/SIPRPSoft/lib/postgresql-8.4-701.jdbc4.jar new file mode 100644 index 00000000..e21beec5 Binary files /dev/null and b/trunk/SIPRPSoft/lib/postgresql-8.4-701.jdbc4.jar differ diff --git a/trunk/SIPRPSoft/lib/swingx.jar b/trunk/SIPRPSoft/lib/swingx.jar new file mode 100644 index 00000000..dec67850 Binary files /dev/null and b/trunk/SIPRPSoft/lib/swingx.jar differ diff --git a/trunk/SIPRPSoft/properties/app.properties b/trunk/SIPRPSoft/properties/app.properties new file mode 100644 index 00000000..5cf730b6 --- /dev/null +++ b/trunk/SIPRPSoft/properties/app.properties @@ -0,0 +1,63 @@ +#APP level +app.appName = SIPRPSoft +app.main-class = siprp.Main +app.main = siprp.Main +#app.max.mem=512M +#app.run.args=test 1 2 3 + +#app.resources.j2se.version = 1.0+ +#app.resources.j2se.initial-heap-size = 4m +#app.resources.j2se.max-heap-size = 8m + +#app.ws.dest.package=com.evolute.test-project.stubs +#app.ws.wsdl.url=https://www.evolute.pt/test-project/test-endpoint?wsdl +#app.ws.wsdl.url.protocol=https +#app.ws.wsdl.url.host=www.evolute.pt +#app.ws.wsdl.url.port=443 +#app.ws.wsdl.url.path=/test-project/test-endpoint?wsdl + +#app.ssl.truststore.file=jssecacerts +#app.ssl.truststore.pass=changeit + +#JNLP level +#jnlp.app.appName = test-project +#jnlp.information.title = jnlp-Test Project +#jnlp.resources.j2se.version = 1.1+ +#jnlp.test.url=http://www.evolute.pt/~software/test-project + + +#JNLP + PRODUCTION level +#jnlp.production.app.main-class = !com.evolute.test-project.TestProject2 +#jnlp.production.app.appName = test-project +#jnlp.production.url=http://www.evolute.pt/~software/test-project + +#jnlp.production.information.title = prod-Test Project +#jnlp.production.information.vendor = prod-Evolute Lda +#jnlp.production.information.description = prod-Tester Project for JNLP Generator +#jnlp.production.information.description.short = prod-JNLP Tester +#jnlp.production.information.icon = prod-logo.png + +#jnlp.production.resources.j2se.version = 1.6.0+ +#jnlp.production.resources.j2se.initial-heap-size = 64m +#jnlp.production.resources.j2se.max-heap-size = 512m + +#jnlp.production.resources.property.jnlp.packEnabled = true +#jnlp.production.resources.property.apple.laf.useScreenMenuBar = true +#jnlp.production.resources.property.swing.defaultlaf = org.jvnet.substance.skin.SubstanceRavenGraphiteGlassLookAndFeel +#jnlp.production.resources.property.evolute.ui.overridePaint = false + + +#JNLP + TEST level +#jnlp.test.app.main-class = com.evolute.test-project.TestProject3 +#jnlp.test.app.appName = project-test +#jnlp.test.url=http://www.evolute.pt/~software/versoes_teste/test-project + +#jnlp.test.information.title = test-Test Project +#jnlp.test.information.vendor = test-Evolute Lda +#jnlp.test.information.description = test-Tester Project for JNLP Generator +#jnlp.test.information.description.short = test-JNLP Tester +#jnlp.test.information.icon = test-logo.png + +#jnlp.test.resources.j2se.version = 1.6.0+ +#jnlp.test.resources.j2se.initial-heap-size = 64m +#jnlp.test.resources.j2se.max-heap-size = 512m diff --git a/trunk/SIPRPSoft/properties/codegen.xml b/trunk/SIPRPSoft/properties/codegen.xml new file mode 100644 index 00000000..6d6006d3 --- /dev/null +++ b/trunk/SIPRPSoft/properties/codegen.xml @@ -0,0 +1,399 @@ + + + + jdbc:postgresql://www.evolute.pt:5436/siprp_local_3 + postgres + Typein + + /home/tsimao/workspace/SIPRPSoft/src + siprp.data.inner + siprp.data.outer + siprp.data.BaseObject + package.xml + + actualizacao + Actualizacao + +
+ + avisos + Avisos + +
+ + contactos + Contactos + +
+ + ecd_oficial + EcdOficial + +
+ + email_plano_de_actuacao + EmailPlanoDeActuacao + +
+ + empresas + Empresas + +
+ + errors + Errors + +
+ + estabelecimentos + Estabelecimentos + +
+ + etiquetas + Etiquetas + +
+ + exames + Exames + +
+ + exames_perfis + ExamesPerfis + +
+ + exames_portaria + ExamesPortaria + +
+ + historico_estabelecimento + HistoricoEstabelecimento + siprp.data.Historico +
+ + hs_area + HsArea + +
+ + hs_email + HsEmail + +
+ + hs_email_empresa + HsEmailEmpresa + +
+ + hs_email_estabelecimento + HsEmailEstabelecimento + +
+ + hs_equipamento + HsEquipamento + +
+ + hs_legislacao + HsLegislacao + +
+ + hs_legislacao_categoria + HsLegislacaoCategoria + +
+ + hs_legislacao_empresa + HsLegislacaoEmpresa + +
+ + hs_legislacao_estabelecimento + HsLegislacaoEstabelecimento + +
+ + hs_medida + HsMedida + +
+ + hs_normalizacao + HsNormalizacao + +
+ + hs_normalizacao_empresa + HsNormalizacaoEmpresa + +
+ + hs_normalizacao_estabelecimento + HsNormalizacaoEstabelecimento + +
+ + hs_posto + HsPosto + +
+ + hs_posto_estabelecimento + HsPostoEstabelecimento + +
+ + hs_posto_medida + HsPostoMedida + +
+ + hs_posto_risco + HsPostoRisco + +
+ + hs_relatorio + HsRelatorio + +
+ + hs_relatorio_area + HsRelatorioArea + +
+ + hs_relatorio_equipamento + HsRelatorioEquipamento + +
+ + hs_relatorio_legislacao + HsRelatorioLegislacao + +
+ + hs_relatorio_medida + HsRelatorioMedida + +
+ + hs_relatorio_normalizacao + HsRelatorioNormalizacao + +
+ + hs_relatorio_posto + HsRelatorioPosto + +
+ + hs_relatorio_posto_medida + HsRelatorioPostoMedida + +
+ + hs_relatorio_posto_risco + HsRelatorioPostoRisco + +
+ + hs_relatorio_risco + HsRelatorioRisco + +
+ + hs_relatorio_risco_valor_qualitativo + HsRelatorioRiscoValorQualitativo + +
+ + hs_risco + HsRisco + +
+ + hs_risco_empresa + HsRiscoEmpresa + +
+ + hs_risco_medida + HsRiscoMedida + +
+ + hs_risco_tema + HsRiscoTema + +
+ + ids + Ids + +
+ + image + Image + +
+ + lembretes + Lembretes + +
+ + lembretes_tipos + LembretesTipos + +
+ + marcacoes_empresa + MarcacoesEmpresa + siprp.data.Marcacao +
+ + marcacoes_estabelecimento + MarcacoesEstabelecimento + siprp.data.Marcacao +
+ + marcacoes_grupos_realizados + MarcacoesGruposRealizados + +
+ + marcacoes_tecnicos_hst + MarcacoesTecnicosHst + +
+ + marcacoes_trabalhador + MarcacoesTrabalhador + siprp.data.Marcacao +
+ + marcacoes_trabalhador_estados + MarcacoesTrabalhadorEstados + +
+ + medicos + Medicos + +
+ + prestadores + Prestadores + +
+ + prestadores_grupos_protocolo + PrestadoresGruposProtocolo + +
+ + prt_elementos_protocolo + PrtElementosProtocolo + +
+ + prt_grupos_protocolo + PrtGruposProtocolo + +
+ + prt_tipos_elementos_protocolo + PrtTiposElementosProtocolo + +
+ + tipos_exames_comp + TiposExamesComp + +
+ + trabalhadores + Trabalhadores + +
+ + trabalhadores_consultas + TrabalhadoresConsultas + +
+ + trabalhadores_consultas_datas + TrabalhadoresConsultasDatas + +
+ + trabalhadores_consultas_datas_emails + TrabalhadoresConsultasDatasEmails + +
+ + trabalhadores_consultas_datas_observacoes + TrabalhadoresConsultasDatasObservacoes + +
+ + trabalhadores_ecd + TrabalhadoresEcd + +
+ + trabalhadores_ecds + TrabalhadoresEcds + +
+ + trabalhadores_ecds_analise + TrabalhadoresEcdsAnalise + +
+ + trabalhadores_ecds_datas + TrabalhadoresEcdsDatas + +
+ + trabalhadores_ecds_datas_emails + TrabalhadoresEcdsDatasEmails + +
+ + trabalhadores_ecds_datas_observacoes + TrabalhadoresEcdsDatasObservacoes + +
+ + trabalhadores_fichas_aptidao + TrabalhadoresFichasAptidao + +
+ + trabalhadores_processo + TrabalhadoresProcesso + +
+ + versao + Versao + +
+ + version + Version + +
+
+ diff --git a/trunk/SIPRPSoft/properties/project.properties b/trunk/SIPRPSoft/properties/project.properties new file mode 100644 index 00000000..5d747fdc --- /dev/null +++ b/trunk/SIPRPSoft/properties/project.properties @@ -0,0 +1,12 @@ +#app.jar.name= +#jnlp.dir= +#jnlp.extensions.dir= +#app.deploy.path= +#app.deploy.jnlp.path= +#app.version.file= +#app.version.comment= +#app.java.version=1.6 +#app.deploy.server=www.evolute.pt +#app.deploy.production.script=/home/software/auto_deploy.sh +#app.deploy.test.script=/home/software/auto_test_deploy.sh +#deploy.prepare.script=/home/software/auto_prepare_deploy.sh diff --git a/trunk/SIPRPSoft/src/com/evolute/adt/OrderedMap.java b/trunk/SIPRPSoft/src/com/evolute/adt/OrderedMap.java deleted file mode 100644 index b33585a4..00000000 --- a/trunk/SIPRPSoft/src/com/evolute/adt/OrderedMap.java +++ /dev/null @@ -1,342 +0,0 @@ -package com.evolute.adt; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Vector; - -public class OrderedMap implements Iterable -{ - private static final long serialVersionUID = 1L; - - private Vector order = new Vector(); - - private HashMap> map = new HashMap>(); - - public OrderedMap() - { - } - - public OrderedMap(Collection allPrestadores) - { - Iterator iterator = allPrestadores.iterator(); - while( iterator.hasNext() ) - { - KeyClass value = iterator.next(); - this.putLast( value, value ); - } - } - - public List getRow( int row ) - { - return map.get( order.get( row ) ); - } - - public List getValues( KeyClass key ) - { - return map.get( key ); - } - - public int rows() - { - return order.size(); - } - - public KeyClass getKeyForValue( Object value ) - { - for( KeyClass key : map.keySet() ) - { - List values = map.get( key ); - if( value.equals( values ) ) - { - return key; - } - else - { - for( Object currentValue : values ) - { - if( currentValue.equals( value ) ) - { - return key; - } - } - } - } - return null; - } - - /** - * returns the length of the biggest line - * - * @return - */ - public int columns() - { - int result = 0; - for( KeyClass key : order ) - { - result = map.get( key ).size() > result ? map.get( key ).size() : result; - } - return result; - } - - public List getColumn( int i ) - { - List result = new ArrayList(); - if( order != null && order.size() > 0 ) - { - for( KeyClass key : order ) - { - List row = map.get( key ); - if( row != null && row.size() > 0 ) - { - result.add( row.get( 0 ) ); - } - else - { - row.add( null ); - } - } - } - return result; - } - - public KeyClass getFirst() - { - return order.isEmpty() ? null : order.get( 0 ); - } - - public Iterator iterator() - { - return order.iterator(); - } - - public boolean containsKey( KeyClass key ) - { - return map.containsKey( key ); - } - - public Object getValueAt( int row, int column ) - { - Object result = null; - if( row < order.size() ) - { - List line = map.get( order.get( row ) ); - if( column < line.size() ) - { - result = line.get( column ); - } - } - return result; - } - - /** - * Adds arguments to the end of the row (on given order) - * - * @param key - * @param values - */ - public void putLast( KeyClass key, Object... values ) - { - if( values != null ) - { - for( Object currentValue : values ) - { - putLast( key, currentValue ); - } - } - } - - /** - * Adds argument to the end of the row - * - * @param key - * @param value - */ - public void putLast( KeyClass key, Object value ) - { - List list; - if( map.containsKey( key ) ) - { - list = map.get( key ); - } - else - { - list = new ArrayList(); - order.add( key ); - } - list.add( value ); - map.put( key, list ); - } - - public List remove( Object key ) - { - order.remove( key ); - return map.remove( key ); - } - - /** - * Orders by first column (rows compared as strings) - */ - public void order() - { - order( 0 ); - } - - public void order( int columnNumber ) - { - order( new int[] { - columnNumber - }, 0, 0, order.size() - 1, order ); - } - - public void order( int[] colNumbers ) - { - order( colNumbers, 0, 0, order.size() - 1, order ); - } - - private void order( int[] colNumbers, int currentColumnIndex, int fromLineNumber, int toLineNumber, List order ) - { - if( colNumbers != null && currentColumnIndex >= 0 && fromLineNumber < toLineNumber && toLineNumber < order.size() && currentColumnIndex < colNumbers.length ) - { - int columnNumber = colNumbers[currentColumnIndex]; - if( order != null && order.size() > 0 ) - { - List> sortedList = new ArrayList>(); - for( int i = fromLineNumber; i < order.size() && i < (toLineNumber + 1); ++i ) - { - KeyClass key = order.get( i ); - List row = map.get( key ); - String value = ""; - if( row != null && row.size() > columnNumber && row.get( columnNumber ) != null ) - { - value = row.get( columnNumber ).toString(); - } - sortedList.add( new Pair( value, key ) ); - } - Collections.sort( sortedList ); - List> equalEntries = new ArrayList>(); - for( int i = 0; i < sortedList.size(); ++i ) - { - Pair entry = sortedList.get( i ); - if( equalEntries.isEmpty() && i < (sortedList.size() - 1) ) - { - equalEntries.add( entry ); - } - else - { - Pair previousEntry = equalEntries.get( 0 ); - if( previousEntry.getLeft().equals( entry.getLeft() ) ) - { - if( i < (sortedList.size() - 1) ) - { - equalEntries.add( entry ); - continue; - } - else - { - equalEntries.add( entry ); - ++i; - } - } - if( equalEntries.size() > 1 ) - { - List toSubOrder = new Vector(); - List DEBUGLIST = new Vector(); - for( Pair pair : equalEntries ) - { - toSubOrder.add( pair.getRight() ); - DEBUGLIST.add( pair.getLeft() ); - } - order( colNumbers, currentColumnIndex + 1, 0, toSubOrder.size() - 1, toSubOrder ); - for( int j = 0; j < toSubOrder.size(); ++j ) - { - sortedList.set( i - toSubOrder.size() + j, new Pair( "", toSubOrder.get( j ) ) ); - } - } - equalEntries.clear(); - if( i < (sortedList.size() - 1) ) - { - equalEntries.add( entry ); - } - } - } - for( int i = 0; i < sortedList.size(); ++i ) - { - Pair value = sortedList.get( i ); - order.set( i, value.getRight() ); - } - } - } - } - - public void addRow( KeyClass key, List grupo ) - { - if( key != null && grupo != null ) - { - order.add( key ); - map.put( key, grupo ); - } - } - - public void clear() - { - order.clear(); - map.clear(); - } - - public void deleteRow( int row ) - { - if( row < order.size() ) - { - KeyClass key = order.get( row ); - order.remove( row ); - map.remove( key ); - } - } - - public KeyClass getKeyForRow( int row ) - { - KeyClass result = null; - if( row < order.size() ) - { - result = order.get( row ); - } - return result; - } - - public void setValueAt( int row, int col, Object obj ) - { - if( row < order.size() ) - { - List line = map.get( order.get( row ) ); - if( col < line.size() ) - { - line.add( col, obj ); - } - } - } - - public Object getFirstValue( KeyClass key ) - { - return getValue( key, 0 ); - } - - public Object getValue( KeyClass key, int i ) - { - Object result = null; - if( key != null && order.contains( key ) ) - { - List row = map.get( key ); - if( row != null && row.size() > i ) - { - result = row.get( i ); - } - } - return result; - } - -} diff --git a/trunk/SIPRPSoft/src/com/evolute/adt/Pair.java b/trunk/SIPRPSoft/src/com/evolute/adt/Pair.java deleted file mode 100644 index ce01de8a..00000000 --- a/trunk/SIPRPSoft/src/com/evolute/adt/Pair.java +++ /dev/null @@ -1,100 +0,0 @@ -package com.evolute.adt; - -public class Pair implements Comparable> -{ - - private final CARCLASS left; - - private final CDRCLASS right; - - public Pair( CARCLASS leftValue, CDRCLASS rightValue ) - { - this.left = leftValue; - this.right = rightValue; - } - - public CARCLASS getLeft() - { - return left; - } - - public CDRCLASS getRight() - { - return right; - } - - @SuppressWarnings("unchecked") - @Override - public boolean equals(Object obj) - { - boolean result = obj != null; - if( result ) - { - if( obj instanceof Pair ) - { - result = ( left == null ? (((Pair) obj).left == null ) : (left.equals(((Pair) obj).left)) ); - result &= ( right == null ? (((Pair) obj).right == null ) : (right.equals(((Pair) obj).right)) ); - } - else - { - result = false; - } - } - return result; - } - - @Override - public int compareTo(Pair pair) - { - int result = compare( left, pair == null ? null : pair.left ); - if( result == 0 ) - { - result = compare( right, pair == null ? null : pair.right ); - } - return result; - } - - @SuppressWarnings("unchecked") - private int compare( Object a, Object b ) - { - int result = a == null ? (b == null ? 0 : -1 ) : ( b == null ? 1 : 0 ); - if( a != null && b != null ) - { - if( a.getClass().equals( b.getClass() ) && (a instanceof Comparable) ) - { - ((Comparable)a).compareTo(b); - } - else - { - result = compare(a.toString(),b.toString()); - } - } - return result; - } - - @Override - public int hashCode() - { - int result = super.hashCode(); - if( left != null ) - { - result = left.hashCode(); - if( right != null ) - { - result ^= right.hashCode(); - } - } - else if( right != null ) - { - result = right.hashCode(); - } - return result; - } - - @Override - public String toString() - { - return "<"+left+","+right+">"; - } - -} diff --git a/trunk/SIPRPSoft/src/com/evolute/adt/Range.java b/trunk/SIPRPSoft/src/com/evolute/adt/Range.java deleted file mode 100644 index b093044a..00000000 --- a/trunk/SIPRPSoft/src/com/evolute/adt/Range.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.evolute.adt; - -public class Range -{ - - private final int start; - - private final int end; - - private final int length; - - public Range( int start, int end ) - { - super(); - this.start = start; - this.end = end; - this.length = 1 + ( Math.max( Math.abs( start ), Math.abs( end ) ) - Math.min( Math.abs( start ), Math.abs( end ) ) ); - } - - public int getStart() - { - return start; - } - - public int getEnd() - { - return end; - } - - /** - * The lenght of the range - * Examples: - * start:end > length - * 0:3 > 4 - * -1:-1 > 1 - * @return - */ - public int getLength() - { - return length; - } - - @Override - public boolean equals( Object obj ) - { - return (obj instanceof Range) && ((Range)obj).start == start && ((Range)obj).end == end; - } - - @Override - public int hashCode() - { - return new Integer( start ).hashCode() ^ new Integer( end ).hashCode(); - } - -} diff --git a/trunk/SIPRPSoft/src/com/evolute/adt/TreeTools.java b/trunk/SIPRPSoft/src/com/evolute/adt/TreeTools.java deleted file mode 100644 index a2802bf5..00000000 --- a/trunk/SIPRPSoft/src/com/evolute/adt/TreeTools.java +++ /dev/null @@ -1,263 +0,0 @@ -package com.evolute.adt; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.LinkedList; -import java.util.List; - -import javax.swing.JTree; -import javax.swing.tree.DefaultMutableTreeNode; -import javax.swing.tree.DefaultTreeModel; -import javax.swing.tree.TreePath; - -import leaf.ui.LeafTree; - -import com.evolute.utils.strings.StringPlainer; - -public class TreeTools -{ - - private static final Comparator comparator = new Comparator() - { - - private int compareObjects( Object o1, Object o2 ) - { - if( o1 == null ) - { - return o2 == null ? 0 : -1; - } - else if( (o1 instanceof Comparable ) && (o2 instanceof Comparable)) - { - return ((Comparable)o1).compareTo( (Comparable) o2 ); - } - else - { - return o2 == null ? 1 : StringPlainer.convertString( o1.toString() ).compareTo( StringPlainer.convertString( o2.toString() ) ); - } - } - - @Override - public int compare( DefaultMutableTreeNode o1, DefaultMutableTreeNode o2 ) - { - if( o1 == null ) - { - return o2 == null ? 0 : -1; - } - else - { - return o2 == null ? 1 : compareObjects( o1.getUserObject(), o2.getUserObject() ); - } - } - }; - - public static void refreshTree( JTree tree, DefaultMutableTreeNode node, boolean expand ) - { - if( tree instanceof LeafTree ) - { - ((LeafTree)tree).saveExpansionState(); - } - ((DefaultTreeModel) tree.getModel()).nodeStructureChanged( node ); - if( expand ) - { - for( int i = 0; i < tree.getRowCount(); ++i) - { - tree.expandPath( tree.getPathForRow( i ) ); - } - } - if( tree instanceof LeafTree ) - { - ((LeafTree)tree).loadExpansionState(); - } - } - - public static boolean userObjectExistsOn( Object object, DefaultMutableTreeNode on ) - { - boolean result = false; - if( object != null && on != null ) - { - result = object.equals( on.getUserObject() ); - for( int i = 0; i < on.getChildCount() && !result; ++i ) - { - result |= userObjectExistsOn( object, (DefaultMutableTreeNode) on.getChildAt( i ) ); - } - } - return result; - } - - public static DefaultMutableTreeNode findNodeWithUserObject( Object object, DefaultMutableTreeNode on ) - { - DefaultMutableTreeNode result = null; - if( object != null && on != null ) - { - result = object.equals( on.getUserObject() ) ? on : null; - for( int i = 0; i < on.getChildCount() && result == null; ++i ) - { - result = object.equals(((DefaultMutableTreeNode) on.getChildAt( i )).getUserObject()) ? (DefaultMutableTreeNode) on.getChildAt( i ) : findNodeWithUserObject( object, (DefaultMutableTreeNode) on.getChildAt( i ) ); - } - } - return result; - } - - public static DefaultMutableTreeNode cloneFullNode( DefaultMutableTreeNode node ) - { - DefaultMutableTreeNode result = (DefaultMutableTreeNode) node.clone(); - for( int i = 0; i < node.getChildCount(); ++i ) - { - DefaultMutableTreeNode child = (DefaultMutableTreeNode) node.getChildAt( i ); - result.add( cloneFullNode(child) ); - } - return result; - } - - public static void merge( DefaultMutableTreeNode with, DefaultMutableTreeNode what ) - { - if( what != null ) - { - for( int i = 0; i < what.getChildCount(); ++i ) - { - DefaultMutableTreeNode child = (DefaultMutableTreeNode) what.getChildAt( i ); - DefaultMutableTreeNode exists = TreeTools.findNodeWithUserObject( child.getUserObject(), with ); - if( exists == null ) - { - with.add( TreeTools.cloneFullNode( child ) ); - } - else - { - merge( exists, child ); - } - } - } - } - - public static void removeAll( DefaultMutableTreeNode from, DefaultMutableTreeNode what ) - { - for( int i = 0; i < what.getChildCount(); ++i ) - { - DefaultMutableTreeNode child = (DefaultMutableTreeNode) what.getChildAt( i ); - removeAll( from, child ); - } - DefaultMutableTreeNode exists = TreeTools.findNodeWithUserObject( what.getUserObject(), from ); - if( exists != null ) - { - exists.removeFromParent(); - } - } - - public static void remove( DefaultMutableTreeNode from, DefaultMutableTreeNode what ) - { - for( int i = 0; i < what.getChildCount(); ++i ) - { - DefaultMutableTreeNode child = (DefaultMutableTreeNode) what.getChildAt( i ); - DefaultMutableTreeNode exists = TreeTools.findNodeWithUserObject( child.getUserObject(), from ); - if( exists != null ) - { - exists.removeFromParent(); - } - } - } - - public static void removeAllLeafs( DefaultMutableTreeNode from, DefaultMutableTreeNode what ) - { - for( int i = 0; i < what.getChildCount(); ++i ) - { - DefaultMutableTreeNode child = (DefaultMutableTreeNode) what.getChildAt( i ); - removeAllLeafs( from, child ); - } - DefaultMutableTreeNode exists = TreeTools.findNodeWithUserObject( what.getUserObject(), from ); - if( exists != null && exists.getChildCount() == 0 ) - { - exists.removeFromParent(); - } - } - - public static void sort( DefaultMutableTreeNode result, boolean useDefaultComparator ) - { - if( result != null ) - { - List children = new ArrayList(result.getChildCount()); - for( int i = 0; i < result.getChildCount(); ++i ) - { - children.add( (DefaultMutableTreeNode) result.getChildAt( i ) ); - } - result.removeAllChildren(); - if( useDefaultComparator ) - { - Collections.sort( children, comparator ); - } - for( DefaultMutableTreeNode child : children ) - { - sort( child ); - result.add( child ); - } - } - } - public static void sort( DefaultMutableTreeNode result ) - { - sort( result, true ); - } - - public static void sort( DefaultMutableTreeNode result, Comparator comparator ) - { - if( result != null ) - { - List children = new ArrayList(result.getChildCount()); - for( int i = 0; i < result.getChildCount(); ++i ) - { - children.add( (DefaultMutableTreeNode) result.getChildAt( i ) ); - } - result.removeAllChildren(); - Collections.sort( children, comparator ); - for( DefaultMutableTreeNode child : children ) - { - sort( child ); - result.add( child ); - } - } - } - - public static TreePath getPathFor( DefaultMutableTreeNode node ) - { - List path = getObjectPathFor( node ); - return new TreePath( path.toArray( new Object[path.size()] ) ); - } - - private static List getObjectPathFor( DefaultMutableTreeNode node ) - { - LinkedList path = new LinkedList(); - if( node != null ) - { - if( node.getParent() != null ) - { - path.addAll( getObjectPathFor( (DefaultMutableTreeNode) node.getParent() ) ); - } - path.add( node ); - } - return path; - } - - private static DefaultMutableTreeNode getRoot( JTree tree ) - { - return (DefaultMutableTreeNode) tree.getModel().getRoot(); - } - - public static void expandNodeForObject(Object userObject, JTree tree ) - { - Object root = getRoot( tree ); - if( tree != null && userObject != null && ( root instanceof DefaultMutableTreeNode ) ) - { - DefaultMutableTreeNode found = findNodeWithUserObject(userObject, (DefaultMutableTreeNode) root); - if( found != null ) - { - TreePath path = getPathFor( found ); - if( path != null ) - { - tree.expandPath( path ); - } - } - } - } - - - -} diff --git a/trunk/SIPRPSoft/src/com/evolute/adt/Validator.java b/trunk/SIPRPSoft/src/com/evolute/adt/Validator.java deleted file mode 100644 index 1cbc5218..00000000 --- a/trunk/SIPRPSoft/src/com/evolute/adt/Validator.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.evolute.adt; - -public interface Validator -{ - - /** - * Tests if given object is valid - * @param object - * @return - */ - public boolean isValid(OBJECT_CLASS object); - -} diff --git a/trunk/SIPRPSoft/src/leaf/ui/LeafTree.java b/trunk/SIPRPSoft/src/leaf/ui/LeafTree.java index b85d87a0..3059f5f6 100644 --- a/trunk/SIPRPSoft/src/leaf/ui/LeafTree.java +++ b/trunk/SIPRPSoft/src/leaf/ui/LeafTree.java @@ -9,7 +9,7 @@ import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.TreeModel; import javax.swing.tree.TreePath; -import com.evolute.adt.TreeTools; +import com.evolute.utils.ui.trees.TreeTools; public class LeafTree extends JTree { diff --git a/trunk/SIPRPSoft/src/leaf/ui/TreeInserterDialog.java b/trunk/SIPRPSoft/src/leaf/ui/TreeInserterDialog.java index 43976b32..38a59dfd 100644 --- a/trunk/SIPRPSoft/src/leaf/ui/TreeInserterDialog.java +++ b/trunk/SIPRPSoft/src/leaf/ui/TreeInserterDialog.java @@ -23,10 +23,10 @@ import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreePath; import javax.swing.tree.TreeSelectionModel; -import com.evolute.adt.TreeTools; import com.evolute.utils.error.ErrorLogger; import com.evolute.utils.images.ImageException; import com.evolute.utils.images.ImageIconLoader; +import com.evolute.utils.ui.trees.TreeTools; diff --git a/trunk/SIPRPSoft/src/siprp/FichaDataProvider.java b/trunk/SIPRPSoft/src/siprp/FichaDataProvider.java index 26bb6f3f..2f117e83 100644 --- a/trunk/SIPRPSoft/src/siprp/FichaDataProvider.java +++ b/trunk/SIPRPSoft/src/siprp/FichaDataProvider.java @@ -12,6 +12,7 @@ import java.util.Hashtable; import siprp.data.AvisoConstants; import siprp.data.Marcacao; +import siprp.data.outer.MarcacoesTrabalhadorData; import com.evolute.utils.Singleton; import com.evolute.utils.arrays.Virtual2DArray; @@ -564,7 +565,7 @@ public class FichaDataProvider new String[]{ "MAX(data)" }, new Field( "trabalhador_id" ).isEqual( trabalhadorID ).and( new Field( "estado" ).isEqual( new Integer( 2 ) ) ).and( - new Field( "tipo" ).isEqual( new Integer( siprp.data.MarcacaoTrabalhadorData.TIPO_CONSULTA ) ) ) ); + new Field( "tipo" ).isEqual( new Integer( MarcacoesTrabalhadorData.TIPO_CONSULTA ) ) ) ); Virtual2DArray realizadaArray = executer.executeQuery( realizadaSelect ); Date realizada = (Date) realizadaArray.get( 0, 0 ); Select select; @@ -574,7 +575,7 @@ public class FichaDataProvider new String[]{ "MIN(id)" }, new Field( "trabalhador_id" ).isEqual( trabalhadorID ).and( new Field( "estado" ).isEqual( new Integer( 0 ) ) ).and( - new Field( "tipo" ).isEqual( new Integer( siprp.data.MarcacaoTrabalhadorData.TIPO_CONSULTA ) ) ) ); + new Field( "tipo" ).isEqual( new Integer( MarcacoesTrabalhadorData.TIPO_CONSULTA ) ) ) ); } else { @@ -583,7 +584,7 @@ public class FichaDataProvider new Field( "trabalhador_id" ).isEqual( trabalhadorID ).and( new Field( "estado" ).isEqual( new Integer( 0 ) ) ).and( new Field( "data" ).isGreater( realizada ) ).and( - new Field( "tipo" ).isEqual( new Integer( siprp.data.MarcacaoTrabalhadorData.TIPO_CONSULTA ) ) ) ); + new Field( "tipo" ).isEqual( new Integer( MarcacoesTrabalhadorData.TIPO_CONSULTA ) ) ) ); } Virtual2DArray array = executer.executeQuery( select ); if( array.columnLength() == 0 || array.get( 0, 0 ) == null ) diff --git a/trunk/SIPRPSoft/src/siprp/JDOInitializer.java b/trunk/SIPRPSoft/src/siprp/JDOInitializer.java deleted file mode 100644 index e91c8f23..00000000 --- a/trunk/SIPRPSoft/src/siprp/JDOInitializer.java +++ /dev/null @@ -1,69 +0,0 @@ -package siprp; - -import java.util.Date; -import java.util.Properties; - -import com.evolute.utils.Singleton; -import com.evolute.utils.jdo.JDOProvider; - -public class JDOInitializer -{ - - public void initializeJDO(String url, String user, String password) - { - Date d = new Date(); - System.out.println( "INIT: " + d ); - - - Properties jpoxProps; - jpoxProps = System.getProperties();//new Properties(); - // Set the PersistenceManagerFactoryClass to the TJDO class. - jpoxProps.setProperty( "javax.jdo.PersistenceManagerFactoryClass", - "org.jpox.PersistenceManagerFactoryImpl" ); - // Set the JDBC driver name. - jpoxProps.setProperty( "javax.jdo.option.ConnectionDriverName", (String) Singleton.getInstance( SingletonConstants.LOCAL_DRIVER_NAME ) ); - jpoxProps.setProperty( "org.jpox.identifier.fullyQualifiedNames", "false" ); - // props.setProperty("com.triactive.jdo.transactionIsolation", - // "read-uncommitted" ); - - // Set the connection URL -// jpoxProps.setProperty( "javax.jdo.option.ConnectionURL", "jdbc:informix-sqli://192.168.0.3:6666" -// + "/apdp_db:informixserver=server" ); - jpoxProps.setProperty( "javax.jdo.option.ConnectionURL", url ); - jpoxProps.setProperty( "javax.jdo.option.ConnectionUserName", user ); - jpoxProps.setProperty( "javax.jdo.option.ConnectionPassword", password ); -// jpoxProps.setProperty( "javax.jdo.option.IgnoreCache", "true" ); -// jpoxProps.setProperty( "javax.jdo.option.NonTransactionalRead", "true" ); - jpoxProps.setProperty( "javax.jdo.option.RetainValues", "true" ); - - jpoxProps.setProperty( "org.jpox.autoCreateTables", "false" ); - jpoxProps.setProperty( "org.jpox.autoCreateSchema", "false" ); - jpoxProps.setProperty( "org.jpox.autoCreateConstraints", "false" ); - jpoxProps.setProperty( "org.jpox.validateTables", "false" ); - jpoxProps.setProperty( "org.jpox.validateConstraints", "false" ); - jpoxProps.setProperty( "org.jpox.autoStartMechanismMode", "Ignored" ); - jpoxProps.setProperty( "org.jpox.autoStartMechanism", "None" ); - -// jpoxProps.setProperty( "javax.jdo.option.RetainValues", "true" ); -// jpoxProps.setProperty( "javax.jdo.option.Optimistic", "true" ); - -// jpoxProps.setProperty( "org.jpox.identifier.defaultSchemaName", "informix" ); - jpoxProps.setProperty( "org.jpox.rdbms.CheckExistTablesOrViews", "false" ); - - System.setProperty( "org.jpox.catalogName", (String)Singleton.getInstance( SingletonConstants.LOCAL_DB_NAME ) ); - System.setProperty( "org.jpox.schemaName", "" ); - -// PersistenceManagerFactory pmf = JDOHelper.getPersistenceManagerFactory( jpoxProps ); -//// pmf.setOptimistic( true ); -//System.out.print( "Loading PM: " + new Date() ); -// // ( ( PersistenceManagerFactoryImpl )pmf ).setTransactionIsolation( Connection.TRANSACTION_READ_UNCOMMITTED ); -// // Retrieve a PersistenceManager from the PersistenceManagerFactory. -// PersistenceManager pm = pmf.getPersistenceManager(); -// JDOObject.setPersistentManager( pm ); -// Singleton.setInstance( Singleton.DEFAULT_PERSISTENCE_MANAGER_FACTORY, pmf ); -// Singleton.setInstance( SingletonConstants.PERSISTENCE_MANAGER, pm ); - JDOProvider jdoProvider = new JDOProvider( jpoxProps ); - Singleton.setInstance( Singleton.DEFAULT_JDO_PROVIDER, jdoProvider ); -System.out.println( "PM done " + new Date() + "JDO: " + jdoProvider ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/Main.java b/trunk/SIPRPSoft/src/siprp/Main.java index 19a9c768..dc046daf 100644 --- a/trunk/SIPRPSoft/src/siprp/Main.java +++ b/trunk/SIPRPSoft/src/siprp/Main.java @@ -31,18 +31,10 @@ import org.apache.cayenne.map.DataMap; import siprp.clientes.AvisosPanel; import siprp.companydataloaders.SIPRPDataLoader; -import siprp.data.ActualizacaoSaveHandler; -import siprp.data.DisableDeleteHandler; -import siprp.data.EmpresaData; -import siprp.data.EstabelecimentoData; -import siprp.data.MarcacaoEmpresaData; -import siprp.data.MarcacaoEstabelecimentoData; -import siprp.data.MarcacaoSaveAndDeleteHandler; -import siprp.data.MarcacaoTrabalhadorData; -import siprp.data.TrabalhadorData; import siprp.lembretes.LembretesDemon; -import siprp.update.UpdateWindow; +import siprp.update.UpdateList; +import com.evolute.module.updater.Updater; import com.evolute.utils.Singleton; import com.evolute.utils.db.DBException; import com.evolute.utils.db.DBManager; @@ -51,7 +43,6 @@ import com.evolute.utils.db.keyretrievers.JDBCAutoKeyRetriever; import com.evolute.utils.error.ErrorLogger; import com.evolute.utils.jdbc.DBStatementExecuter; import com.evolute.utils.jdbc.StatementExecuterFactory; -import com.evolute.utils.jdo.JDOObject; import com.evolute.utils.sql.Insert; import com.evolute.utils.sql.SQLQuery; import com.evolute.utils.strings.UnicodeChecker; @@ -71,17 +62,6 @@ public class Main implements com.evolute.utils.ui.window.Connector static { - JDOObject.registerOperationHandlerForClass( DisableDeleteHandler.INSTANCE, EmpresaData.class ); - JDOObject.registerOperationHandlerForClass( DisableDeleteHandler.INSTANCE, EstabelecimentoData.class ); - JDOObject.registerOperationHandlerForClass( DisableDeleteHandler.INSTANCE, TrabalhadorData.class ); - - JDOObject.registerOperationHandlerForClass( ActualizacaoSaveHandler.INSTANCE, EmpresaData.class ); - JDOObject.registerOperationHandlerForClass( ActualizacaoSaveHandler.INSTANCE, EstabelecimentoData.class ); - JDOObject.registerOperationHandlerForClass( ActualizacaoSaveHandler.INSTANCE, TrabalhadorData.class ); - - JDOObject.registerOperationHandlerForClass( MarcacaoSaveAndDeleteHandler.INSTANCE, MarcacaoEmpresaData.class ); - JDOObject.registerOperationHandlerForClass( MarcacaoSaveAndDeleteHandler.INSTANCE, MarcacaoEstabelecimentoData.class ); - JDOObject.registerOperationHandlerForClass( MarcacaoSaveAndDeleteHandler.INSTANCE, MarcacaoTrabalhadorData.class ); ESTADO_PROCESSO_BY_CODE.put( PROCESSO_ABERTO_CODE, PROCESSO_ABERTO_DESCRIPTION ); ESTADO_PROCESSO_BY_CODE.put( PROCESSO_FECHADO_CODE, PROCESSO_FECHADO_DESCRIPTION ); @@ -172,7 +152,6 @@ public class Main implements com.evolute.utils.ui.window.Connector fopConfigFile = loadFopConfigFile(); - new UpdateWindow().update(); } @@ -220,14 +199,14 @@ public class Main implements com.evolute.utils.ui.window.Connector DBManager dbm = new JDBCManager( url, user, passwd , 10, 8, 8, null ); // UnicodeChecker.setUseDoubleSlash( true ); Singleton.setInstance( Singleton.DEFAULT_DBMANAGER, dbm ); - - StatementExecuterFactory.initialize( - new DBStatementExecuter( dbm.getSharedExecuter() ) ); - new JDOInitializer().initializeJDO( url, user, passwd ); - StatementExecuterFactory.initialize( - new DBStatementExecuter( dbm.getSharedExecuter() ) ); + + Updater.getInstance().executeUpdate(true, true, UpdateList.UPDATE_LIST); + StatementExecuterFactory.initialize( - new DBStatementExecuter( dbm.getSharedExecuter() ) ); + new DBStatementExecuter( dbm.getSharedExecuter(this) ) ); + + new ORMInitializer().initializeORM( url, user, passwd ); + Singleton.setInstance( Singleton.TODAY, new Date() ); initializeCayenne( url, user, passwd); diff --git a/trunk/SIPRPSoft/src/siprp/ORMInitializer.java b/trunk/SIPRPSoft/src/siprp/ORMInitializer.java new file mode 100644 index 00000000..8bae9da6 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/ORMInitializer.java @@ -0,0 +1,82 @@ +package siprp; + +import com.evolute.entity.ProviderInterface; +import com.evolute.entity.ProviderRegistry; +import com.evolute.entity.evo.EvoDataProviderFactory; +import com.evolute.entity.utils.ConnectionIdentity; +import com.evolute.utils.Singleton; +import com.evolute.utils.db.keyretrievers.PostgresqlAutoKeyRetriever; +import com.evolute.utils.sql.Insert; + +public class ORMInitializer +{ + + public void initializeORM(String url, String user, String password) + { +// Date d = new Date(); +// System.out.println( "INIT: " + d ); +// +// +// Properties jpoxProps; +// jpoxProps = System.getProperties();//new Properties(); + // Set the PersistenceManagerFactoryClass to the TJDO class. +// jpoxProps.setProperty( "javax.jdo.PersistenceManagerFactoryClass", +// "org.jpox.PersistenceManagerFactoryImpl" ); + // Set the JDBC driver name. +// jpoxProps.setProperty( "javax.jdo.option.ConnectionDriverName", (String) Singleton.getInstance( SingletonConstants.LOCAL_DRIVER_NAME ) ); +// jpoxProps.setProperty( "org.jpox.identifier.fullyQualifiedNames", "false" ); + // props.setProperty("com.triactive.jdo.transactionIsolation", + // "read-uncommitted" ); + + // Set the connection URL +// jpoxProps.setProperty( "javax.jdo.option.ConnectionURL", "jdbc:informix-sqli://192.168.0.3:6666" +// + "/apdp_db:informixserver=server" ); +// jpoxProps.setProperty( "javax.jdo.option.ConnectionURL", url ); +// jpoxProps.setProperty( "javax.jdo.option.ConnectionUserName", user ); +// jpoxProps.setProperty( "javax.jdo.option.ConnectionPassword", password ); +// jpoxProps.setProperty( "javax.jdo.option.IgnoreCache", "true" ); +// jpoxProps.setProperty( "javax.jdo.option.NonTransactionalRead", "true" ); +// jpoxProps.setProperty( "javax.jdo.option.RetainValues", "true" ); +// +// jpoxProps.setProperty( "org.jpox.autoCreateTables", "false" ); +// jpoxProps.setProperty( "org.jpox.autoCreateSchema", "false" ); +// jpoxProps.setProperty( "org.jpox.autoCreateConstraints", "false" ); +// jpoxProps.setProperty( "org.jpox.validateTables", "false" ); +// jpoxProps.setProperty( "org.jpox.validateConstraints", "false" ); +// jpoxProps.setProperty( "org.jpox.autoStartMechanismMode", "Ignored" ); +// jpoxProps.setProperty( "org.jpox.autoStartMechanism", "None" ); + +// jpoxProps.setProperty( "javax.jdo.option.RetainValues", "true" ); +// jpoxProps.setProperty( "javax.jdo.option.Optimistic", "true" ); + +// jpoxProps.setProperty( "org.jpox.identifier.defaultSchemaName", "informix" ); +// jpoxProps.setProperty( "org.jpox.rdbms.CheckExistTablesOrViews", "false" ); +// +// System.setProperty( "org.jpox.catalogName", (String)Singleton.getInstance( SingletonConstants.LOCAL_DB_NAME ) ); +// System.setProperty( "org.jpox.schemaName", "" ); + +// PersistenceManagerFactory pmf = JDOHelper.getPersistenceManagerFactory( jpoxProps ); +//// pmf.setOptimistic( true ); +//System.out.print( "Loading PM: " + new Date() ); +// // ( ( PersistenceManagerFactoryImpl )pmf ).setTransactionIsolation( Connection.TRANSACTION_READ_UNCOMMITTED ); +// // Retrieve a PersistenceManager from the PersistenceManagerFactory. +// PersistenceManager pm = pmf.getPersistenceManager(); +// JDOObject.setPersistentManager( pm ); +// Singleton.setInstance( Singleton.DEFAULT_PERSISTENCE_MANAGER_FACTORY, pmf ); +// Singleton.setInstance( SingletonConstants.PERSISTENCE_MANAGER, pm ); +// JDOProvider jdoProvider = new JDOProvider( jpoxProps ); +// Singleton.setInstance( Singleton.DEFAULT_JDO_PROVIDER, jdoProvider ); +//System.out.println( "PM done " + new Date() + "JDO: " + jdoProvider ); + + Insert.setDefaultKeyRetriever( PostgresqlAutoKeyRetriever.RETRIEVER ); + ProviderRegistry.registerDefaultProviderFactory( new EvoDataProviderFactory() ); + ConnectionIdentity conn = new ConnectionIdentity( url, user ); + conn.setPassword( password ); + ProviderRegistry.registerDefaultConnection( conn ); + ProviderInterface provider = ProviderRegistry.getDefaultProvider( conn ); + Singleton.setInstance( Singleton.DEFAULT_OBJECT_PROVIDER, provider ); + Singleton.setInstance( Singleton.DEFAULT_JDO_PROVIDER, provider ); + + + } +} diff --git a/trunk/SIPRPSoft/src/siprp/SHSTLogger.java b/trunk/SIPRPSoft/src/siprp/SHSTLogger.java index cdcf37f8..d279ffbf 100644 --- a/trunk/SIPRPSoft/src/siprp/SHSTLogger.java +++ b/trunk/SIPRPSoft/src/siprp/SHSTLogger.java @@ -6,6 +6,8 @@ package siprp; +import org.apache.log4j.Level; + import com.evolute.utils.Singleton; import com.evolute.utils.db.DBManager; import com.evolute.utils.db.Executer; @@ -62,6 +64,7 @@ public class SHSTLogger implements Logger executer = dbm.getExclusiveExecuter( this ); } + @Override public void log( String str ) { String mem = "(" + Runtime.getRuntime().freeMemory() + "/" + @@ -84,6 +87,7 @@ public class SHSTLogger implements Logger } } + @Override public void logException( Throwable ex ) { StackTraceElement ste[] = ex.getStackTrace(); @@ -112,5 +116,20 @@ public class SHSTLogger implements Logger ex.printStackTrace(); } } + + @Override + public void log(String arg0, Level arg1) + { + } + + @Override + public void logException(Throwable arg0, Level arg1) + { + } + + @Override + public void close() { + + } } diff --git a/trunk/SIPRPSoft/src/siprp/clientes/AvisosPanel.java b/trunk/SIPRPSoft/src/siprp/clientes/AvisosPanel.java index a9472388..e4691d98 100644 --- a/trunk/SIPRPSoft/src/siprp/clientes/AvisosPanel.java +++ b/trunk/SIPRPSoft/src/siprp/clientes/AvisosPanel.java @@ -17,6 +17,7 @@ import java.text.DateFormat; import java.util.Calendar; import java.util.Date; import java.util.Hashtable; +import java.util.Map; import java.util.Set; import javax.swing.BorderFactory; @@ -29,14 +30,14 @@ import javax.swing.JScrollPane; import siprp.FichaDataProvider; import siprp.SIPRPTracker; import siprp.data.AvisoConstants; -import siprp.data.AvisoData; -import siprp.data.EmpresaData; -import siprp.data.EstabelecimentoData; -import siprp.data.TrabalhadorData; +import siprp.data.outer.AvisosData; +import siprp.data.outer.EmpresasData; +import siprp.data.outer.EstabelecimentosData; +import siprp.data.outer.TrabalhadoresData; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; import com.evolute.utils.dataui.ControllableComponent; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.ui.DialogException; /** @@ -47,7 +48,7 @@ public class AvisosPanel extends JPanel implements ActionListener, ControllableComponent { private static final DateFormat DATE_FORMAT = DateFormat.getDateInstance( DateFormat.SHORT ); - private JDOProvider JDO; + private ProviderInterface JDO; private FichaDataProvider provider; private SIPRPTracker tracker; @@ -55,10 +56,10 @@ public class AvisosPanel extends JPanel private JPanel estabelecimentosPanel; private JPanel trabalhadoresPanel; -// private AvisoData avisos[]; -// private AvisoData avisosEmpresa[]; -// private AvisoData avisosEstabelecimento[]; -// private AvisoData avisosTrabalhador[]; +// private AvisosData avisos[]; +// private AvisosData avisosEmpresa[]; +// private AvisosData avisosEstabelecimento[]; +// private AvisosData avisosTrabalhador[]; private Object avisosEmpresa[][]; private Object avisosEstabelecimento[][]; @@ -70,16 +71,16 @@ public class AvisosPanel extends JPanel private Hashtable buttonTypeHash; /** Creates a new instance of AvisosPanel */ - public AvisosPanel(/* AvisoData avisosEmpresa[], AvisoData avisosEstabelecimento[], AvisoData avisosTrabalhador[]*/ ) + public AvisosPanel(/* AvisosData avisosEmpresa[], AvisosData avisosEstabelecimento[], AvisosData avisosTrabalhador[]*/ ) throws Exception { -// this.avisosEmpresa = new AvisoData[ 0 ]; -// this.avisosEstabelecimento = new AvisoData[ 0 ]; -// this.avisosTrabalhador = new AvisoData[ 0 ]; +// this.avisosEmpresa = new AvisosData[ 0 ]; +// this.avisosEstabelecimento = new AvisosData[ 0 ]; +// this.avisosTrabalhador = new AvisosData[ 0 ]; // setupComponents(); buttonHash = new Hashtable(); buttonTypeHash = new Hashtable(); - JDO = (JDOProvider) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + JDO = (ProviderInterface) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); // System.out.println( "public AvisosPanel() JDO: " + JDO ); } @@ -99,7 +100,7 @@ public class AvisosPanel extends JPanel JPanel pan = new JPanel(); GridBagLayout gridbag = new GridBagLayout(); pan.setBorder( BorderFactory.createLineBorder( Color.black, 1 ) ); -// EmpresaData empresa = (EmpresaData)avisosEmpresa[ n ].get( AvisoData.EMPRESA ); +// EmpresasData empresa = (EmpresasData)avisosEmpresa[ n ].get( AvisosData.EMPRESA ); pan.setLayout( gridbag ); constraints.gridheight = GridBagConstraints.REMAINDER; constraints.gridx = 0; @@ -110,7 +111,7 @@ public class AvisosPanel extends JPanel pan.add( tratarButton ); //buttonHash.put( tratarButton, avisosEmpresa[ n ] ); // buttonHash.put( tratarButton, new Integer( n ) ); -// buttonHash.put( tratarButton, avisosEmpresa[ n ].get( AvisoData.ID ) ); +// buttonHash.put( tratarButton, avisosEmpresa[ n ].get( AvisosData.ID ) ); buttonHash.put( tratarButton, avisosEmpresa[ n ][ 0 ] ); buttonTypeHash.put( tratarButton, new Integer( AvisoConstants.TIPO_EMPRESA ) ); tratarButton.addActionListener( this ); @@ -119,7 +120,7 @@ public class AvisosPanel extends JPanel constraints.weightx = 1; constraints.gridheight = 1; constraints.gridwidth = GridBagConstraints.REMAINDER; -// JLabel empresaLabel = new JLabel( "" + empresa.get( EmpresaData.DESIGNACAO_SOCIAL ) ); +// JLabel empresaLabel = new JLabel( "" + empresa.get( EmpresasData.DESIGNACAO_SOCIAL ) ); JLabel empresaLabel = new JLabel( "" + avisosEmpresa[ n ][ 3 ] ); gridbag.setConstraints( empresaLabel, constraints ); pan.add( empresaLabel ); @@ -127,7 +128,7 @@ public class AvisosPanel extends JPanel constraints.weightx = 1; constraints.gridwidth = GridBagConstraints.REMAINDER; - //JLabel descricaoLabel = new JLabel( (String)avisosEmpresa[ n ].get( AvisoData.DESCRICAO ) ); + //JLabel descricaoLabel = new JLabel( (String)avisosEmpresa[ n ].get( AvisosData.DESCRICAO ) ); JLabel descricaoLabel = criarDescricao( avisosEmpresa[ n ] ); gridbag.setConstraints( descricaoLabel, constraints ); pan.add( descricaoLabel ); @@ -156,8 +157,8 @@ public class AvisosPanel extends JPanel JPanel pan = new JPanel(); GridBagLayout gridbag = new GridBagLayout(); pan.setBorder( BorderFactory.createLineBorder( Color.black, 1 ) ); -// EstabelecimentoData estabelecimento = (EstabelecimentoData)avisosEstabelecimento[ n ].get( AvisoData.ESTABELECIMENTO ); -// EmpresaData empresa = (EmpresaData)estabelecimento.get( EstabelecimentoData.EMPRESA ); +// EstabelecimentosData estabelecimento = (EstabelecimentosData)avisosEstabelecimento[ n ].get( AvisosData.ESTABELECIMENTO ); +// EmpresasData empresa = (EmpresasData)estabelecimento.get( EstabelecimentosData.EMPRESA ); pan.setLayout( gridbag ); constraints.gridheight = GridBagConstraints.REMAINDER; constraints.gridx = 0; @@ -168,7 +169,7 @@ public class AvisosPanel extends JPanel pan.add( tratarButton ); //buttonHash.put( tratarButton, avisosEstabelecimento[ n ] ); // buttonHash.put( tratarButton, new Integer( n + avisosEmpresa.length ) ); -// buttonHash.put( tratarButton, avisosEstabelecimento[ n ].get( AvisoData.ID ) ); +// buttonHash.put( tratarButton, avisosEstabelecimento[ n ].get( AvisosData.ID ) ); buttonHash.put( tratarButton, avisosEstabelecimento[ n ][ 0 ] ); buttonTypeHash.put( tratarButton, new Integer( AvisoConstants.TIPO_ESTABELECIMENTO ) ); tratarButton.addActionListener( this ); @@ -177,18 +178,18 @@ public class AvisosPanel extends JPanel constraints.weightx = 1; constraints.gridheight = 1; constraints.gridwidth = GridBagConstraints.REMAINDER; -// JLabel empresaLabel = new JLabel( "" + empresa.get( EmpresaData.DESIGNACAO_SOCIAL ) ); +// JLabel empresaLabel = new JLabel( "" + empresa.get( EmpresasData.DESIGNACAO_SOCIAL ) ); JLabel empresaLabel = new JLabel( "" + avisosEstabelecimento[ n ][ 3 ] ); gridbag.setConstraints( empresaLabel, constraints ); pan.add( empresaLabel ); -// JLabel estabelecimentoLabel = new JLabel( "" + estabelecimento.get( EstabelecimentoData.NOME ) ); +// JLabel estabelecimentoLabel = new JLabel( "" + estabelecimento.get( EstabelecimentosData.NOME ) ); JLabel estabelecimentoLabel = new JLabel( "" + avisosEstabelecimento[ n ][ 4 ] ); gridbag.setConstraints( estabelecimentoLabel, constraints ); pan.add( estabelecimentoLabel ); constraints.gridwidth = GridBagConstraints.REMAINDER; - //JLabel descricaoLabel = new JLabel( (String)avisosEstabelecimento[ n ].get( AvisoData.DESCRICAO ) ); + //JLabel descricaoLabel = new JLabel( (String)avisosEstabelecimento[ n ].get( AvisosData.DESCRICAO ) ); JLabel descricaoLabel = criarDescricao( avisosEstabelecimento[ n ] ); gridbag.setConstraints( descricaoLabel, constraints ); pan.add( descricaoLabel ); @@ -217,9 +218,9 @@ public class AvisosPanel extends JPanel JPanel pan = new JPanel(); GridBagLayout gridbag = new GridBagLayout(); pan.setBorder( BorderFactory.createLineBorder( Color.black, 1 ) ); -// TrabalhadorData trabalhador = (TrabalhadorData)avisosTrabalhador[ n ].get( AvisoData.TRABALHADOR ); -// EstabelecimentoData estabelecimento = (EstabelecimentoData)trabalhador.get( TrabalhadorData.ESTABELECIMENTO ); -// EmpresaData empresa = (EmpresaData)estabelecimento.get( EstabelecimentoData.EMPRESA ); +// TrabalhadoresData trabalhador = (TrabalhadoresData)avisosTrabalhador[ n ].get( AvisosData.TRABALHADOR ); +// EstabelecimentosData estabelecimento = (EstabelecimentosData)trabalhador.get( TrabalhadoresData.ESTABELECIMENTO ); +// EmpresasData empresa = (EmpresasData)estabelecimento.get( EstabelecimentosData.EMPRESA ); pan.setLayout( gridbag ); constraints.gridheight = GridBagConstraints.REMAINDER; constraints.gridx = 0; @@ -230,7 +231,7 @@ public class AvisosPanel extends JPanel pan.add( tratarButton ); //buttonHash.put( tratarButton, avisosTrabalhador[ n ] ); // buttonHash.put( tratarButton, new Integer( n + avisosEmpresa.length + avisosEstabelecimento.length ) ); -// buttonHash.put( tratarButton, avisosTrabalhador[ n ].get( AvisoData.ID ) ); +// buttonHash.put( tratarButton, avisosTrabalhador[ n ].get( AvisosData.ID ) ); buttonHash.put( tratarButton, avisosTrabalhador[ n ][ 0 ] ); buttonTypeHash.put( tratarButton, new Integer( AvisoConstants.TIPO_TRABALHADOR ) ); tratarButton.addActionListener( this ); @@ -239,22 +240,22 @@ public class AvisosPanel extends JPanel constraints.weightx = 1; constraints.gridheight = 1; constraints.gridwidth = GridBagConstraints.REMAINDER; -// JLabel empresaLabel = new JLabel( "" + empresa.get( EmpresaData.DESIGNACAO_SOCIAL ) ); +// JLabel empresaLabel = new JLabel( "" + empresa.get( EmpresasData.DESIGNACAO_SOCIAL ) ); JLabel empresaLabel = new JLabel( "" + avisosTrabalhador[ n ][ 3 ] ); gridbag.setConstraints( empresaLabel, constraints ); pan.add( empresaLabel ); -// JLabel estabelecimentoLabel = new JLabel( "" + estabelecimento.get( EstabelecimentoData.NOME ) ); +// JLabel estabelecimentoLabel = new JLabel( "" + estabelecimento.get( EstabelecimentosData.NOME ) ); JLabel estabelecimentoLabel = new JLabel( "" + avisosTrabalhador[ n ][ 4 ] ); gridbag.setConstraints( estabelecimentoLabel, constraints ); pan.add( estabelecimentoLabel ); -// JLabel trabalhadorLabel = new JLabel( "" + trabalhador.get( TrabalhadorData.NOME ) ); +// JLabel trabalhadorLabel = new JLabel( "" + trabalhador.get( TrabalhadoresData.NOME ) ); JLabel trabalhadorLabel = new JLabel( "" + avisosTrabalhador[ n ][ 5 ] ); gridbag.setConstraints( trabalhadorLabel, constraints ); pan.add( trabalhadorLabel ); constraints.gridwidth = GridBagConstraints.REMAINDER; - //JLabel descricaoLabel = new JLabel( (String)avisosTrabalhador[ n ].get( AvisoData.DESCRICAO ) ); + //JLabel descricaoLabel = new JLabel( (String)avisosTrabalhador[ n ].get( AvisosData.DESCRICAO ) ); JLabel descricaoLabel = criarDescricao( avisosTrabalhador[ n ] ); gridbag.setConstraints( descricaoLabel, constraints ); pan.add( descricaoLabel ); @@ -265,7 +266,7 @@ public class AvisosPanel extends JPanel // Vector v = new Vector( Arrays.asList( avisosEmpresa ) ); // v.addAll( Arrays.asList( avisosTrabalhador ) ); // v.addAll( Arrays.asList( avisosEstabelecimento ) ); -// avisos = (AvisoData []) v.toArray( new AvisoData[0] ); +// avisos = (AvisosData []) v.toArray( new AvisosData[0] ); JScrollPane scp = new JScrollPane(); setLayout( new GridLayout( 1, 1 ) ); @@ -312,28 +313,28 @@ public class AvisosPanel extends JPanel try { provider = ( FichaDataProvider ) FichaDataProvider.getProvider(); -// Collection c = AvisoData.load( AvisoData.class, " estabelecimento_id == \"null\" ", -// AvisoData.DATA_EVENTO + " ascending" ); +// Collection c = AvisosData.load( AvisosData.class, " estabelecimento_id == \"null\" ", +// AvisosData.DATA_EVENTO + " ascending" ); -// Collection c = AvisoData.load( AvisoData.class, "(tipo == " + AvisoData.TIPO_EMPRESA+")",// + ") && ( data_aviso <= CURRENT_DATE )", -// AvisoData.DATA_EVENTO + " ascending" ); -// Collection c = AvisoData.load( AvisoData.class, new Object[]{ /*new Integer( AvisoData.TIPO_EMPRESA ), */new Date() }, +// Collection c = AvisosData.load( AvisosData.class, "(tipo == " + AvisosData.TIPO_EMPRESA+")",// + ") && ( data_aviso <= CURRENT_DATE )", +// AvisosData.DATA_EVENTO + " ascending" ); +// Collection c = AvisosData.load( AvisosData.class, new Object[]{ /*new Integer( AvisosData.TIPO_EMPRESA ), */new Date() }, // new String[]{ /*"tipo", */"data_aviso" }, // new String[]{ "=="/*, "==" */}, -// new String[]{ AvisoData.DATA_EVENTO + " ascending" } ); +// new String[]{ AvisosData.DATA_EVENTO + " ascending" } ); // if( c == null ) // { -// avisosEmpresa = new AvisoData[ 0 ]; +// avisosEmpresa = new AvisosData[ 0 ]; // } // else // { // -// avisosEmpresa = ( AvisoData[] )c.toArray( new AvisoData[ c.size() ] ); +// avisosEmpresa = ( AvisosData[] )c.toArray( new AvisosData[ c.size() ] ); // } // Integer ids[] = provider.getAvisosIDByTipoAndDate( new Integer( AvisoConstants.TIPO_EMPRESA ), new Date() ); -// avisosEmpresa = new AvisoData[ ids.length ]; +// avisosEmpresa = new AvisosData[ ids.length ]; // if( JDO == null ) // { // JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); @@ -341,47 +342,47 @@ public class AvisosPanel extends JPanel //// System.out.println( "JDO: " + JDO ); // for( int n = 0; n < avisosEmpresa.length; n++ ) // { -// avisosEmpresa[ n ] = (AvisoData) JDO.load( AvisoData.class, ids[ n ] ); +// avisosEmpresa[ n ] = (AvisosData) JDO.load( AvisosData.class, ids[ n ] ); // } // -////System.out.println( "EmpresaData " + avisosEmpresa.length ); -//// c = AvisoData.load( AvisoData.class, " tipo == " + AvisoData.TIPO_ESTABELECIMENTO,// + ") && ( data_aviso <= new Date() )", -//// AvisoData.DATA_EVENTO + " ascending" ); -//// c = AvisoData.load( AvisoData.class, "estabelecimento_id != \"null\" " -//// + " && trabalhador_id == \"null\"", AvisoData.DATA_EVENTO + " ascending" ); +////System.out.println( "EmpresasData " + avisosEmpresa.length ); +//// c = AvisosData.load( AvisosData.class, " tipo == " + AvisosData.TIPO_ESTABELECIMENTO,// + ") && ( data_aviso <= new Date() )", +//// AvisosData.DATA_EVENTO + " ascending" ); +//// c = AvisosData.load( AvisosData.class, "estabelecimento_id != \"null\" " +//// + " && trabalhador_id == \"null\"", AvisosData.DATA_EVENTO + " ascending" ); //// if( c == null ) //// { -//// avisosEstabelecimento = new AvisoData[ 0 ]; +//// avisosEstabelecimento = new AvisosData[ 0 ]; //// } //// else //// { -//// avisosEstabelecimento = ( AvisoData[] )c.toArray( new AvisoData[ c.size() ] ); +//// avisosEstabelecimento = ( AvisosData[] )c.toArray( new AvisosData[ c.size() ] ); //// } // // ids = provider.getAvisosIDByTipoAndDate( new Integer( AvisoConstants.TIPO_ESTABELECIMENTO ), new Date() ); -// avisosEstabelecimento = new AvisoData[ ids.length ]; +// avisosEstabelecimento = new AvisosData[ ids.length ]; // for( int n = 0; n < avisosEstabelecimento.length; n++ ) // { -// avisosEstabelecimento[ n ] = (AvisoData) JDO.load( AvisoData.class, new Object[]{ids[ n ]}, new String[]{ "id" } ); +// avisosEstabelecimento[ n ] = (AvisosData) JDO.load( AvisosData.class, new Object[]{ids[ n ]}, new String[]{ "id" } ); // } -////System.out.println( "EstabelecimentoData " + avisosEstabelecimento.length ); -//// c = AvisoData.load( AvisoData.class, " tipo == " + AvisoData.TIPO_TRABALHADOR,// + ") && ( data_aviso <= new Date() )", -//// AvisoData.DATA_EVENTO + " ascending" ); -//// c = AvisoData.load( AvisoData.class, "trabalhador_id != \"null\"", AvisoData.DATA_EVENTO + " ascending" ); +////System.out.println( "EstabelecimentosData " + avisosEstabelecimento.length ); +//// c = AvisosData.load( AvisosData.class, " tipo == " + AvisosData.TIPO_TRABALHADOR,// + ") && ( data_aviso <= new Date() )", +//// AvisosData.DATA_EVENTO + " ascending" ); +//// c = AvisosData.load( AvisosData.class, "trabalhador_id != \"null\"", AvisosData.DATA_EVENTO + " ascending" ); //// if( c == null ) //// { -//// avisosTrabalhador = new AvisoData[ 0 ]; +//// avisosTrabalhador = new AvisosData[ 0 ]; //// } //// else //// { -//// avisosTrabalhador = ( AvisoData[] )c.toArray( new AvisoData[ c.size() ] ); +//// avisosTrabalhador = ( AvisosData[] )c.toArray( new AvisosData[ c.size() ] ); //// } // ids = provider.getAvisosIDByTipoAndDate( new Integer( AvisoConstants.TIPO_TRABALHADOR ), new Date() ); // -// avisosTrabalhador = new AvisoData[ ids.length ]; +// avisosTrabalhador = new AvisosData[ ids.length ]; // for( int n = 0; n < avisosTrabalhador.length; n++ ) // { -// avisosTrabalhador[ n ] = (AvisoData) JDO.load( AvisoData.class, ids[ n ] ); +// avisosTrabalhador[ n ] = (AvisosData) JDO.load( AvisosData.class, ids[ n ] ); // } //System.out.println( "trabalhador " + avisosTrabalhador.length ); avisosEmpresa = provider.getAvisosEmpresaByDate( new Date() ); @@ -433,12 +434,12 @@ public class AvisosPanel extends JPanel return descricaoLabel; } -// private JLabel criarDescricao( AvisoData aviso ) +// private JLabel criarDescricao( AvisosData aviso ) // { -// Date dataEvento = ( Date )aviso.get( AvisoData.DATA_EVENTO ); +// Date dataEvento = ( Date )aviso.get( AvisosData.DATA_EVENTO ); // -// String descricao = (String)aviso.get( AvisoData.DESCRICAO ); -// String descricao2 = (String)aviso.get( AvisoData.DESCRICAO ); +// String descricao = (String)aviso.get( AvisosData.DESCRICAO ); +// String descricao2 = (String)aviso.get( AvisosData.DESCRICAO ); // Calendar cal = Calendar.getInstance(); // cal.setTime( dataEvento ); // cal.set( cal.get( Calendar.YEAR ), cal.get( Calendar.MONTH ), cal.get( Calendar.DAY_OF_MONTH ), 0, 0, 0 ); @@ -474,12 +475,12 @@ public class AvisosPanel extends JPanel { if( JDO == null ) { - JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + JDO = ( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); } Object source = e.getSource(); if( source instanceof JButton ) { -// AvisoData aviso = (AvisoData) buttonHash.get( source ); +// AvisosData aviso = (AvisosData) buttonHash.get( source ); try { ( (JButton) source ).setEnabled( false ); @@ -489,15 +490,15 @@ public class AvisosPanel extends JPanel return; } buttonHash.remove( source ); - AvisoData aviso = (AvisoData) JDO.load( AvisoData.class, id ); + AvisosData aviso = (AvisosData) JDO.load( AvisosData.class, id ); if( aviso == null ) { JOptionPane.showMessageDialog( null, "Este aviso j\u00e1 foi tratado.", "J\u00e1 tratado", JOptionPane.WARNING_MESSAGE ); return; } - Hashtable dataHash = aviso.getHashData(); - Date dataEvento = (Date)dataHash.get( AvisoData.DATA_EVENTO ); + Map dataHash = aviso.getHashData(); + Date dataEvento = (Date)dataHash.get( AvisosData.DATA_EVENTO ); Calendar cal = Calendar.getInstance(); cal.setTime( dataEvento ); cal.set( cal.get( Calendar.YEAR ), cal.get( Calendar.MONTH ), cal.get( Calendar.DAY_OF_MONTH ), 0, 0, 0 ); @@ -510,41 +511,41 @@ public class AvisosPanel extends JPanel Date hoje = cal.getTime(); if( hoje.before( dataEvento ) ) { - AvisoData novoAviso = new AvisoData(); + AvisosData novoAviso = new AvisosData(); novoAviso.setHashData( dataHash ); - novoAviso.set( AvisoData.DATA_AVISO, dataEvento ); + novoAviso.set( AvisosData.DATA_AVISO, dataEvento ); novoAviso.save(); } - Integer tipo = (Integer) aviso.get( AvisoData.TIPO ); - TrabalhadorData trabalhador; - EstabelecimentoData estabelecimento; - EmpresaData empresa; + Integer tipo = (Integer) aviso.get( AvisosData.TIPO ); + TrabalhadoresData trabalhador; + EstabelecimentosData estabelecimento; + EmpresasData empresa; switch( tipo.intValue() ) { case AvisoConstants.TIPO_TRABALHADOR: - trabalhador = (TrabalhadorData) aviso.get( AvisoData.TRABALHADOR ); - estabelecimento = (EstabelecimentoData) trabalhador.get( TrabalhadorData.ESTABELECIMENTO ); - empresa = (EmpresaData) estabelecimento.get( EstabelecimentoData.EMPRESA ); + trabalhador = aviso.toTrabalhador_id(); + estabelecimento = trabalhador.toEstabelecimento_id(); + empresa = estabelecimento.toEmpresa_id(); aviso.delete(); tracker.getMedicinaWindow().setVisible( true ); - tracker.getMedicinaWindow().setEmpresaAndEstabelecimentoAndTrabalhador( (Integer) empresa.get( EmpresaData.ID ), - ( Integer ) estabelecimento.get( EstabelecimentoData.ID ), - ( Integer ) trabalhador.get( TrabalhadorData.ID ) ); + tracker.getMedicinaWindow().setEmpresaAndEstabelecimentoAndTrabalhador( (Integer) empresa.get( EmpresasData.ID ), + ( Integer ) estabelecimento.get( EstabelecimentosData.ID ), + ( Integer ) trabalhador.get( TrabalhadoresData.ID ) ); break; case AvisoConstants.TIPO_ESTABELECIMENTO: - estabelecimento = (EstabelecimentoData) aviso.get( AvisoData.ESTABELECIMENTO ); - empresa = (EmpresaData) estabelecimento.get( EstabelecimentoData.EMPRESA ); + estabelecimento = aviso.toEstabelecimento_id(); + empresa = estabelecimento.toEmpresa_id(); aviso.delete(); tracker.getHigieneWindow().setVisible( true ); - tracker.getHigieneWindow().setEmpresaAndEstabelecimento( (Integer) empresa.get( EmpresaData.ID ), - ( Integer ) estabelecimento.get( EstabelecimentoData.ID ) ); + tracker.getHigieneWindow().setEmpresaAndEstabelecimento( (Integer) empresa.get( EmpresasData.ID ), + ( Integer ) estabelecimento.get( EstabelecimentosData.ID ) ); break; case AvisoConstants.TIPO_EMPRESA: - empresa = (EmpresaData) aviso.get( AvisoData.EMPRESA ); + empresa = aviso.toEmpresa_id(); aviso.delete(); ClientesWindow clientesWindow = tracker.getClientesWindow(); clientesWindow.setVisible( true ); @@ -552,9 +553,9 @@ public class AvisosPanel extends JPanel break; } System.out.println( "delete aviso" ); -// aviso.set( AvisoData.TRABALHADOR, null ); -// aviso.set( AvisoData.ESTABELECIMENTO, null ); -// aviso.set( AvisoData.EMPRESA, null ); +// aviso.set( AvisosData.TRABALHADOR, null ); +// aviso.set( AvisosData.ESTABELECIMENTO, null ); +// aviso.set( AvisosData.EMPRESA, null ); } catch( Exception ex ) { diff --git a/trunk/SIPRPSoft/src/siprp/clientes/ClientesWindow.java b/trunk/SIPRPSoft/src/siprp/clientes/ClientesWindow.java index 0f1a58dc..de0d3351 100644 --- a/trunk/SIPRPSoft/src/siprp/clientes/ClientesWindow.java +++ b/trunk/SIPRPSoft/src/siprp/clientes/ClientesWindow.java @@ -36,22 +36,23 @@ import siprp.FichaDataProvider; import siprp.SIPRPTracker; import siprp.SingletonConstants; import siprp.data.AvisoConstants; -import siprp.data.ContactoData; -import siprp.data.EmpresaData; -import siprp.data.EstabelecimentoData; -import siprp.data.EtiquetaData; -import siprp.data.ExameData; import siprp.data.SearchExecuterFactory; -import siprp.data.TrabalhadorData; +import siprp.data.outer.ContactosData; +import siprp.data.outer.EmpresasData; +import siprp.data.outer.EstabelecimentosData; +import siprp.data.outer.EtiquetasData; +import siprp.data.outer.ExamesData; +import siprp.data.outer.TrabalhadoresData; import siprp.ficha.ExamePDF; import siprp.importer.Importer; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; import com.evolute.utils.data.IDObject; +import com.evolute.utils.dataedition.persistence.Persistent; import com.evolute.utils.dataui.ControllableComponent; import com.evolute.utils.date.DateUtils; import com.evolute.utils.jdo.JDOObject; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.strings.StringPlainer; import com.evolute.utils.ui.DialogException; import com.evolute.utils.ui.dialog.ListAction; @@ -81,27 +82,27 @@ public class ClientesWindow extends EditorWindow static { - TR_IMPORT_NAMES_TO_TRAB.put( Importer.NOME, TrabalhadorData.NOME ); - TR_IMPORT_NAMES_TO_TRAB.put( Importer.SEXO, TrabalhadorData.SEXO ); - TR_IMPORT_NAMES_TO_TRAB.put( Importer.NACIONALIDADE, TrabalhadorData.NACIONALIDADE ); - TR_IMPORT_NAMES_TO_TRAB.put( Importer.DATA_NASCIMENTO, TrabalhadorData.DATA_NASCIMENTO ); - TR_IMPORT_NAMES_TO_TRAB.put( Importer.NUMERO_MECANOGRAFICO, TrabalhadorData.NUMERO_MECANOGRAFICO ); - TR_IMPORT_NAMES_TO_TRAB.put( Importer.DATA_ADMISSAO, TrabalhadorData.DATA_ADMISSAO ); - TR_IMPORT_NAMES_TO_TRAB.put( Importer.CATEGORIA, TrabalhadorData.CATEGORIA ); - TR_IMPORT_NAMES_TO_TRAB.put( Importer.LOCAL_TRABALHO, TrabalhadorData.LOCAL_TRABALHO ); - TR_IMPORT_NAMES_TO_TRAB.put( Importer.FUNCAO, TrabalhadorData.FUNCAO_PROPOSTA ); - TR_IMPORT_NAMES_TO_TRAB.put( Importer.DATA_ADMISSAO_FUNCAO, TrabalhadorData.DATA_ADMISSAO_FUNCAO ); + TR_IMPORT_NAMES_TO_TRAB.put( Importer.NOME, TrabalhadoresData.NOME ); + TR_IMPORT_NAMES_TO_TRAB.put( Importer.SEXO, TrabalhadoresData.SEXO ); + TR_IMPORT_NAMES_TO_TRAB.put( Importer.NACIONALIDADE, TrabalhadoresData.NACIONALIDADE ); + TR_IMPORT_NAMES_TO_TRAB.put( Importer.DATA_NASCIMENTO, TrabalhadoresData.DATA_NASCIMENTO ); + TR_IMPORT_NAMES_TO_TRAB.put( Importer.NUMERO_MECANOGRAFICO, TrabalhadoresData.NUMERO_MECANOGRAFICO ); + TR_IMPORT_NAMES_TO_TRAB.put( Importer.DATA_ADMISSAO, TrabalhadoresData.DATA_ADMISSAO ); + TR_IMPORT_NAMES_TO_TRAB.put( Importer.CATEGORIA, TrabalhadoresData.CATEGORIA ); + TR_IMPORT_NAMES_TO_TRAB.put( Importer.LOCAL_TRABALHO, TrabalhadoresData.LOCAL_TRABALHO ); + TR_IMPORT_NAMES_TO_TRAB.put( Importer.FUNCAO, TrabalhadoresData.FUNCAO_PROPOSTA ); + TR_IMPORT_NAMES_TO_TRAB.put( Importer.DATA_ADMISSAO_FUNCAO, TrabalhadoresData.DATA_ADMISSAO_FUNCAO ); - TR_IMPORT_NAMES_TO_DEMISSOES.put( Importer.NOME, TrabalhadorData.NOME ); - TR_IMPORT_NAMES_TO_DEMISSOES.put( Importer.DATA_DEMISSAO, TrabalhadorData.DATA_DEMISSAO ); + TR_IMPORT_NAMES_TO_DEMISSOES.put( Importer.NOME, TrabalhadoresData.NOME ); + TR_IMPORT_NAMES_TO_DEMISSOES.put( Importer.DATA_DEMISSAO, TrabalhadoresData.DATA_DEMISSAO ); -// JDOObject.registerOperationHandlerForClass( DisableDeleteHandler.INSTANCE, EmpresaData.class ); -// JDOObject.registerOperationHandlerForClass( DisableDeleteHandler.INSTANCE, EstabelecimentoData.class ); -// JDOObject.registerOperationHandlerForClass( DisableDeleteHandler.INSTANCE, TrabalhadorData.class ); +// JDOObject.registerOperationHandlerForClass( DisableDeleteHandler.INSTANCE, EmpresasData.class ); +// JDOObject.registerOperationHandlerForClass( DisableDeleteHandler.INSTANCE, EstabelecimentosData.class ); +// JDOObject.registerOperationHandlerForClass( DisableDeleteHandler.INSTANCE, TrabalhadoresData.class ); // -// JDOObject.registerOperationHandlerForClass( MarcacaoSaveAndDeleteHandler.INSTANCE, MarcacaoEmpresaData.class ); -// JDOObject.registerOperationHandlerForClass( MarcacaoSaveAndDeleteHandler.INSTANCE, MarcacaoEstabelecimentoData.class ); -// JDOObject.registerOperationHandlerForClass( MarcacaoSaveAndDeleteHandler.INSTANCE, MarcacaoTrabalhadorData.class ); +// JDOObject.registerOperationHandlerForClass( MarcacaoSaveAndDeleteHandler.INSTANCE, MarcacaoEmpresasData.class ); +// JDOObject.registerOperationHandlerForClass( MarcacaoSaveAndDeleteHandler.INSTANCE, MarcacaoEstabelecimentosData.class ); +// JDOObject.registerOperationHandlerForClass( MarcacaoSaveAndDeleteHandler.INSTANCE, MarcacoesTrabalhadorData.class ); } public static final int INDEX_EMPRESA = 0; @@ -116,7 +117,7 @@ public class ClientesWindow extends EditorWindow { NEW_INDEX, EDIT_INDEX, CANCEL_INDEX, SAVE_INDEX, DELETE_INDEX }, { NEW_INDEX, EDIT_INDEX, CANCEL_INDEX, SAVE_INDEX, DELETE_INDEX } }; - private JDOProvider JDO; + private ProviderInterface JDO; private ClientesDataProvider clientesProvider; private ControllableComponent panels[] = new ControllableComponent[ 4 ]; private EmpresaPanel empresaPanel; @@ -128,10 +129,10 @@ public class ClientesWindow extends EditorWindow private SIPRPTracker tracker; - private EmpresaData empresa; + private EmpresasData empresa; private Integer elementosProtocolo[][]; - private EstabelecimentoData estabelecimento; - private TrabalhadorData trabalhador; + private EstabelecimentosData estabelecimento; + private TrabalhadoresData trabalhador; private AvisosPanel avisos; @@ -153,7 +154,7 @@ public class ClientesWindow extends EditorWindow super( permissions ); this.avisos = avisos; webAware = ( ( Boolean ) Singleton.getInstance( SingletonConstants.WEB_AWARE ) ).booleanValue(); - JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + JDO = ( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); clientesProvider = ( ClientesDataProvider ) ClientesDataProvider.getProvider(); setEditorManagerHierarchy( hierarchy ); setupComponents(); @@ -449,13 +450,13 @@ public class ClientesWindow extends EditorWindow // switch( index ) // { // case INDEX_EMPRESA: - search = new SearchDialog( SearchExecuterFactory.getSearchExecuter( EmpresaData.class ), null, false, null, true ); + search = new SearchDialog( SearchExecuterFactory.getSearchExecuter( EmpresasData.class ), null, false, null, true ); empresaID = ( Integer )search.getSelected(); if( empresaID != null ) { try { - empresa = (EmpresaData) JDO.load( EmpresaData.class, empresaID ); + empresa = (EmpresasData) JDO.load( EmpresasData.class, empresaID ); elementosProtocolo = clientesProvider.getElementosProtocoloForEmpresa( empresaID, 2 ); } catch( Exception ex ) @@ -488,7 +489,7 @@ public class ClientesWindow extends EditorWindow // trabalhadorPanel.fill( null ); estabelecimentoPanel.fill( estabelecimento ); trabalhadorPanel.setEstabelecimento( estabelecimento ); -// planoActuacaoPanel.fill( estabelecimento == null ? null : estabelecimento.get( EstabelecimentoData.ID ) ); +// planoActuacaoPanel.fill( estabelecimento == null ? null : estabelecimento.get( EstabelecimentosData.ID ) ); break; case INDEX_TRABALHADOR: trabalhadorPanel.fill( trabalhador ); @@ -506,32 +507,38 @@ public class ClientesWindow extends EditorWindow switch( index ) { case INDEX_EMPRESA: - empresa = (EmpresaData) ( ( Object [] )object )[ 0 ]; - if( empresa.get( EmpresaData.ID ) == null ) + empresa = (EmpresasData) ( ( Object [] )object )[ 0 ]; + if( empresa.get( EmpresasData.ID ) == null ) { isNew = true; } elementosProtocolo = (Integer [][]) ( ( Object [] )object )[ 1 ]; // System.out.println( empresa.debug() ); - ContactoData c1 = ( ContactoData )empresa.get( EmpresaData.CONTACTO_1 ); - ContactoData c2 = ( ContactoData )empresa.get( EmpresaData.CONTACTO_2 ); -// empresa.set( EmpresaData.CONTACTO_1, null ); -// empresa.set( EmpresaData.CONTACTO_2, null ); + ContactosData c1 = empresa.toContacto_1(); + ContactosData c2 = empresa.toContacto_2(); +// empresa.set( EmpresasData.CONTACTO_1, null ); +// empresa.set( EmpresasData.CONTACTO_2, null ); // empresa.save(); -// empresa.set( EmpresaData.CONTACTO_1, c1 ); +// empresa.set( EmpresasData.CONTACTO_1, c1 ); -// empresa.set( EmpresaData.CONTACTO_2, c2 ); - c1.save(); - c2.save(); +// empresa.set( EmpresasData.CONTACTO_2, c2 ); + if( c1 != null ) + { + c1.save(); + } + if( c2 != null ) + { + c2.save(); + } -// empresa.set( EmpresaData.INACTIVO, "n" ); - empresa.set( EmpresaData.DESIGNACAO_SOCIAL_PLAIN, +// empresa.set( EmpresasData.INACTIVO, "n" ); + empresa.set( EmpresasData.DESIGNACAO_SOCIAL_PLAIN, com.evolute.utils.strings.StringPlainer.convertString( ( String ) - empresa.get( EmpresaData.DESIGNACAO_SOCIAL ) ) ); + empresa.get( EmpresasData.DESIGNACAO_SOCIAL ) ) ); empresa.save(); clientesProvider.setElementosProtocoloForEmpresa( - ( Integer ) empresa.get( EmpresaData.ID ), elementosProtocolo ); + ( Integer ) empresa.get( EmpresasData.ID ), elementosProtocolo ); if( isNew ) { @@ -541,22 +548,22 @@ public class ClientesWindow extends EditorWindow break; case INDEX_ESTABELECIMENTO: - estabelecimento = (EstabelecimentoData) object; - if( estabelecimento.get( EstabelecimentoData.ID ) == null ) + estabelecimento = (EstabelecimentosData) object; + if( estabelecimento.get( EstabelecimentosData.ID ) == null ) { isNew = true; } - ContactoData c = ( ContactoData )estabelecimento.get( EstabelecimentoData.CONTACTO ); + ContactosData c = ( ContactosData )estabelecimento.toContacto_id(); c.save(); - if( estabelecimento.get( EstabelecimentoData.EMPRESA ) == null ) + if( estabelecimento.toEmpresa_id() == null ) { JOptionPane.showMessageDialog( this, "Erro a guardar estabelecimento (NULL).", "Erro...", JOptionPane.ERROR_MESSAGE ); return false; } - estabelecimento.set( EstabelecimentoData.NOME_PLAIN, + estabelecimento.set( EstabelecimentosData.NOME_PLAIN, com.evolute.utils.strings.StringPlainer.convertString( ( String ) - estabelecimento.get( EstabelecimentoData.NOME ) ) ); + estabelecimento.get( EstabelecimentosData.NOME ) ) ); estabelecimento.save(); estabelecimentoPanel.postSave(); if( isNew ) @@ -566,10 +573,10 @@ public class ClientesWindow extends EditorWindow break; case INDEX_TRABALHADOR: - trabalhador = (TrabalhadorData) object; - trabalhador.set( TrabalhadorData.NOME_PLAIN, + trabalhador = (TrabalhadoresData) object; + trabalhador.set( TrabalhadoresData.NOME_PLAIN, com.evolute.utils.strings.StringPlainer.convertString( ( String ) - trabalhador.get( TrabalhadorData.NOME ) ) ); + trabalhador.get( TrabalhadoresData.NOME ) ) ); trabalhador.save(); trabalhadorPanel.postSave(); break; @@ -612,7 +619,7 @@ public class ClientesWindow extends EditorWindow select( INDEX_ESTABELECIMENTO ); try { - estabelecimento = ( EstabelecimentoData ) JDO.load( EstabelecimentoData.class, id ); + estabelecimento = ( EstabelecimentosData ) JDO.load( EstabelecimentosData.class, id ); } catch( Exception ex ) { @@ -635,7 +642,7 @@ public class ClientesWindow extends EditorWindow { try { - trabalhador = (TrabalhadorData) JDO.load( TrabalhadorData.class, id ); + trabalhador = (TrabalhadoresData) JDO.load( TrabalhadoresData.class, id ); } catch( Exception ex ) { @@ -715,7 +722,7 @@ public class ClientesWindow extends EditorWindow { try { - TrabalhadorData trabalhadorAux = trabalhador; + TrabalhadoresData trabalhadorAux = trabalhador; trabalhador = null; trabalhadorAux.delete(); @@ -767,7 +774,7 @@ public class ClientesWindow extends EditorWindow // load all (active) trabalhadores for this company IDObject trab[] = ( ( FichaDataProvider )FichaDataProvider.getProvider() ).getAllTrabalhadoresForEmpresa( - ( Integer )empresa.get( EmpresaData.ID ) ); + ( Integer )empresa.get( EmpresasData.ID ) ); Hashtable trabalhadores = new Hashtable(); for( int i = 0; i < trab.length; ++i ) { @@ -776,7 +783,7 @@ public class ClientesWindow extends EditorWindow // load all active estabelecimentos for this company IDObject estab[] = ( ( FichaDataProvider )FichaDataProvider.getProvider() ).getAllEstabelecimentosForEmpresa( - ( Integer )empresa.get( EmpresaData.ID ) ); + ( Integer )empresa.get( EmpresasData.ID ) ); Hashtable estabelecimentos = new Hashtable(); for( int i = 0; i < estab.length; ++i ) { @@ -805,7 +812,7 @@ public class ClientesWindow extends EditorWindow hash[ i ].put( TR_IMPORT_NAMES_TO_TRAB.get( Importer.NOME ), value.toString().trim() ); - hash[ i ].put( TrabalhadorData.NOME_PLAIN, + hash[ i ].put( TrabalhadoresData.NOME_PLAIN, com.evolute.utils.strings.StringPlainer.convertString( value.toString().trim(), false, false ) ); } else @@ -825,31 +832,29 @@ public class ClientesWindow extends EditorWindow value = "sede"; } Integer eid = ( Integer )estabelecimentos.get( value.toString().trim().toLowerCase() ); - EstabelecimentoData esta; + EstabelecimentosData esta; if( eid == null ) { // save this estab - esta = new EstabelecimentoData(); - esta.set( EstabelecimentoData.EMPRESA, empresa ); - esta.set( EstabelecimentoData.NOME, value.toString().trim() ); - esta.set( EstabelecimentoData.NOME_PLAIN, com.evolute.utils.strings.StringPlainer.convertString( value.toString().trim(), false, false ) ); + esta = new EstabelecimentosData(); + esta.setToEmpresa_id( empresa ); + esta.set( EstabelecimentosData.NOME, value.toString().trim() ); + esta.set( EstabelecimentosData.NOME_PLAIN, com.evolute.utils.strings.StringPlainer.convertString( value.toString().trim(), false, false ) ); esta.save(); estabelecimentos.put( value.toString().trim().toLowerCase(), - esta.get( EstabelecimentoData.ID ) ); + esta.get( EstabelecimentosData.ID ) ); } else { - esta = ( EstabelecimentoData )estabCache.get( value ); + esta = ( EstabelecimentosData )estabCache.get( value ); if( esta == null ) { - esta = (EstabelecimentoData) JDO.load( EstabelecimentoData.class, eid ); + esta = (EstabelecimentosData) JDO.load( EstabelecimentosData.class, eid ); estabCache.put( value, esta ); } } -//System.out.println( "Put " + i + " esta " + esta.debug() ); - hash[ i ].put( TrabalhadorData.ESTABELECIMENTO, - esta ); + hash[ i ].put( TrabalhadoresData.TO_ESTABELECIMENTO_ID, esta ); hash[ i ].put( TR_IMPORT_NAMES_TO_TRAB.get( Importer.LOCAL_TRABALHO ), value.toString().trim() ); } @@ -897,19 +902,18 @@ public class ClientesWindow extends EditorWindow continue; } // save trab - TrabalhadorData tr = new TrabalhadorData(); + TrabalhadoresData tr = new TrabalhadoresData(); tr.setHashData( hash[ i ] ); // o estabelecimento nao faz parte da lista por causa do UI - tr.set( TrabalhadorData.ESTABELECIMENTO, - hash[ i ].get( TrabalhadorData.ESTABELECIMENTO ) ); - tr.set( TrabalhadorData.PERFIL, new Integer( 1 ) ); + tr.set( TrabalhadoresData.TO_ESTABELECIMENTO_ID, hash[ i ].get( TrabalhadoresData.TO_ESTABELECIMENTO_ID ) ); + tr.set( TrabalhadoresData.PERFIL, new Integer( 1 ) ); // System.out.println( "T: " + i + "\n" + tr.debug() ); tr.save(); } for( int i = 0; i < activate.size(); i++ ) { - TrabalhadorData trabalhadorR = (TrabalhadorData)JDO.load( TrabalhadorData.class, ( Integer ) activate.elementAt( i ) ); - trabalhadorR.set( TrabalhadorData.INACTIVO, "n" ); + TrabalhadoresData trabalhadorR = (TrabalhadoresData)JDO.load( TrabalhadoresData.class, ( Integer ) activate.elementAt( i ) ); + trabalhadorR.set( TrabalhadoresData.INACTIVO, "n" ); trabalhadorR.save(); } } @@ -952,7 +956,7 @@ public class ClientesWindow extends EditorWindow // load all (active) trabalhadores for this company IDObject trab[] = ( ( FichaDataProvider )FichaDataProvider.getProvider() ).getAllTrabalhadoresForEmpresa( - ( Integer )empresa.get( EmpresaData.ID ) ); + ( Integer )empresa.get( EmpresasData.ID ) ); Hashtable trabalhadores = new Hashtable(); for( int i = 0; i < trab.length; ++i ) { @@ -986,7 +990,7 @@ System.out.println( "VALUE NOME: " + value ); else if( value != null ) { Integer tID = (Integer) trabalhadores.get( StringPlainer.convertString( value.toString().trim().toLowerCase() ) ); - hash[ i ].put( TrabalhadorData.ID, tID ); + hash[ i ].put( TrabalhadoresData.ID, tID ); validos.add( new String[]{ value.toString().trim(), StringPlainer.convertString( value.toString().trim(), false, false ) } ); } @@ -1023,10 +1027,10 @@ System.out.println( "VALUE NOME: " + value ); continue; } //System.out.println( "TRABALHADOR:not continue" ); - TrabalhadorData tr = (TrabalhadorData)JDO.load( TrabalhadorData.class, ( Integer ) hash[ i ].get( TrabalhadorData.ID ) ); -//System.out.println( "TRABALHADORID: " + tr.get( TrabalhadorData.ID ) ); - tr.set( TrabalhadorData.DATA_DEMISSAO, hash[ i ].get( TrabalhadorData.DATA_DEMISSAO ) ); -//System.out.println( "TRABALHADORDEMISSAO: " + tr.get( TrabalhadorData.DATA_DEMISSAO ) ); + TrabalhadoresData tr = (TrabalhadoresData)JDO.load( TrabalhadoresData.class, ( Integer ) hash[ i ].get( TrabalhadoresData.ID ) ); +//System.out.println( "TRABALHADORID: " + tr.get( TrabalhadoresData.ID ) ); + tr.set( TrabalhadoresData.DATA_DEMISSAO, hash[ i ].get( TrabalhadoresData.DATA_DEMISSAO ) ); +//System.out.println( "TRABALHADORDEMISSAO: " + tr.get( TrabalhadoresData.DATA_DEMISSAO ) ); tr.save(); } StringBuffer buff = new StringBuffer( "" ); @@ -1074,8 +1078,8 @@ System.out.println( "VALUE NOME: " + value ); } try { - EstabelecimentoData eatabelecimentoNovo = (EstabelecimentoData)JDO.load( EstabelecimentoData.class, ( (IDObject)value ).getID() ); - trabalhador.set( TrabalhadorData.ESTABELECIMENTO, eatabelecimentoNovo ); + EstabelecimentosData eatabelecimentoNovo = (EstabelecimentosData)JDO.load( EstabelecimentosData.class, ( (IDObject)value ).getID() ); + trabalhador.set( TrabalhadoresData.TO_ESTABELECIMENTO_ID, eatabelecimentoNovo ); trabalhador.save(); trabalhador = null; reload( INDEX_ESTABELECIMENTO ); @@ -1094,7 +1098,7 @@ System.out.println( "VALUE NOME: " + value ); { IDObject estab[] = ( ( FichaDataProvider )FichaDataProvider.getProvider() ).getAllEstabelecimentosForEmpresa( - ( Integer )empresa.get( EmpresaData.ID ) ); + ( Integer )empresa.get( EmpresasData.ID ) ); ListActionDialog dialog = new ListActionDialog( this, "Escolher Estabelecimento", new String []{ "Designa\u00e7\u00e3o" }, new Vector( Arrays.asList( estab ) ), lAction ); dialog.setSize( 250, 200 ); @@ -1106,28 +1110,28 @@ System.out.println( "VALUE NOME: " + value ); } } - public void setJDOObject( JDOObject object ) + public void setJDOObject( Persistent object ) { empresa = null; estabelecimento = null; trabalhador = null; reload(0); - if( object instanceof TrabalhadorData ) + if( object instanceof TrabalhadoresData ) { tabbedPane.setSelectedIndex( 1 ); - trabalhador = (TrabalhadorData) object; - estabelecimento = (EstabelecimentoData)trabalhador.get( TrabalhadorData.ESTABELECIMENTO ); - empresa = (EmpresaData)estabelecimento.get( EstabelecimentoData.EMPRESA ); + trabalhador = (TrabalhadoresData) object; + estabelecimento = (EstabelecimentosData)trabalhador.toEstabelecimento_id(); + empresa = (EmpresasData)estabelecimento.toEmpresa_id(); } - else if( object instanceof EstabelecimentoData ) + else if( object instanceof EstabelecimentosData ) { tabbedPane.setSelectedIndex( 0 ); - estabelecimento = (EstabelecimentoData)object; - empresa = (EmpresaData)estabelecimento.get( EstabelecimentoData.EMPRESA ); + estabelecimento = (EstabelecimentosData)object; + empresa = (EmpresasData)estabelecimento.toEmpresa_id(); } - else if( object instanceof EmpresaData ) + else if( object instanceof EmpresasData ) { - empresa = (EmpresaData)object; + empresa = (EmpresasData)object; } if( empresa != null ) { @@ -1135,7 +1139,7 @@ System.out.println( "VALUE NOME: " + value ); { elementosProtocolo = clientesProvider.getElementosProtocoloForEmpresa( - ( Integer ) empresa.get( EmpresaData.ID ), 2 ); + ( Integer ) empresa.get( EmpresasData.ID ), 2 ); } catch( Exception ex ) { @@ -1174,8 +1178,8 @@ System.out.println( "VALUE NOME: " + value ); { try { - EmpresaData empresaR = (EmpresaData)JDO.load( EmpresaData.class, ( (IDObject)value ).getID() ); - empresaR.set( EmpresaData.INACTIVO, "n" ); + EmpresasData empresaR = (EmpresasData)JDO.load( EmpresasData.class, ( (IDObject)value ).getID() ); + empresaR.set( EmpresasData.INACTIVO, "n" ); empresaR.save(); } catch( Exception ex ) @@ -1215,8 +1219,8 @@ System.out.println( "VALUE NOME: " + value ); { try { - EstabelecimentoData estabelecimentoR = (EstabelecimentoData)JDO.load( EstabelecimentoData.class, ( (IDObject)value ).getID() ); - estabelecimentoR.set( EstabelecimentoData.INACTIVO, "n" ); + EstabelecimentosData estabelecimentoR = (EstabelecimentosData)JDO.load( EstabelecimentosData.class, ( (IDObject)value ).getID() ); + estabelecimentoR.set( EstabelecimentosData.INACTIVO, "n" ); estabelecimentoR.save(); } catch( Exception ex ) @@ -1234,7 +1238,7 @@ System.out.println( "VALUE NOME: " + value ); try { IDObject estabelecimentos[] = ( ( FichaDataProvider )FichaDataProvider.getProvider() - ).getAllEstabelecimentosDeletedForEmpresa( ( Integer ) empresa.get( EmpresaData.ID ) ); + ).getAllEstabelecimentosDeletedForEmpresa( ( Integer ) empresa.get( EmpresasData.ID ) ); ListActionDialog dialog = new ListActionDialog( this, "Restaurar Estabelecimento", new String []{ "Nome" }, new Vector( Arrays.asList( estabelecimentos ) ), lAction ); dialog.setSize( 250, 200 ); @@ -1259,8 +1263,8 @@ System.out.println( "VALUE NOME: " + value ); { try { - TrabalhadorData trabalhadorR = (TrabalhadorData)JDO.load( TrabalhadorData.class, ( (IDObject)value ).getID() ); - trabalhadorR.set( TrabalhadorData.INACTIVO, "n" ); + TrabalhadoresData trabalhadorR = (TrabalhadoresData)JDO.load( TrabalhadoresData.class, ( (IDObject)value ).getID() ); + trabalhadorR.set( TrabalhadoresData.INACTIVO, "n" ); trabalhadorR.save(); } catch( Exception ex ) @@ -1278,7 +1282,7 @@ System.out.println( "VALUE NOME: " + value ); try { IDObject trabalhadores[] = ( ( FichaDataProvider )FichaDataProvider.getProvider() - ).getAllTrabalhadoresDeletedForEstabelecimento( ( Integer ) estabelecimento.get( EstabelecimentoData.ID ) ); + ).getAllTrabalhadoresDeletedForEstabelecimento( ( Integer ) estabelecimento.get( EstabelecimentosData.ID ) ); ListActionDialog dialog = new ListActionDialog( this, "Restaurar Trabalhador", new String []{ "Nome" }, new Vector( Arrays.asList( trabalhadores ) ), lAction ); dialog.setSize( 250, 200 ); @@ -1302,7 +1306,7 @@ System.out.println( "VALUE NOME: " + value ); try { - UserWindow window = new UserWindow( this, siprp ? null : ( Integer ) empresa.get( EmpresaData.ID ) ); + UserWindow window = new UserWindow( this, siprp ? null : ( Integer ) empresa.get( EmpresasData.ID ) ); window.setVisible( true ); } catch( Exception ex ) @@ -1358,7 +1362,7 @@ System.out.println( "VALUE NOME: " + value ); try { IDObject fichas[] = ( ( FichaDataProvider )FichaDataProvider.getProvider() - ).getAllFichasForTrabalhador( ( Integer ) trabalhador.get( TrabalhadorData.ID ) ); + ).getAllFichasForTrabalhador( ( Integer ) trabalhador.get( TrabalhadoresData.ID ) ); linhas = new Vector( Arrays.asList( fichas ) ); } catch( Exception ex ) @@ -1376,14 +1380,14 @@ System.out.println( "VALUE NOME: " + value ); throws Exception { // MetaObject exame = fdpProvider.load( fdpProvider.EXAMES, new DBKey( exameID ) ); - ExameData exame = (ExameData) JDO.load( ExameData.class, exameID ); - byte pdf[] = (byte []) exame.get( ExameData.PDF ); + ExamesData exame = (ExamesData) JDO.load( ExamesData.class, exameID ); + byte pdf[] = (byte []) exame.get( ExamesData.PDF ); if( exame == null ) { throw new Exception( "N\u00e3o existe exame" ); } - TrabalhadorData trabalhadorExame = ( TrabalhadorData ) exame.get( ExameData.TRABALHADOR ); - String nomeFicheiro = StringPlainer.convertString( ( String ) trabalhadorExame.get( TrabalhadorData.NOME ) ); + TrabalhadoresData trabalhadorExame = exame.toTrabalhador_id(); + String nomeFicheiro = StringPlainer.convertString( ( String ) trabalhadorExame.get( TrabalhadoresData.NOME ) ); nomeFicheiro.replaceAll( " ", "_" ); ExamePDF ePDF = new ExamePDF(); ePDF.print( pdf, nomeFicheiro ); @@ -1402,21 +1406,21 @@ System.out.println( "VALUE NOME: " + value ); { return; } - String nomeEmpresa = ( ( String ) empresa.get( EmpresaData.DESIGNACAO_SOCIAL ) ); - String nomeTrabalhador = ( ( String ) trabalhador.get( TrabalhadorData.NOME ) ); - String numeroMecanografico = ( ( String ) trabalhador.get( TrabalhadorData.NUMERO_MECANOGRAFICO ) ); - String sexo = "m".equals( trabalhador.get( TrabalhadorData.SEXO ) ) ? "M" : "F"; - Date data = ( Date ) trabalhador.get( TrabalhadorData.DATA_NASCIMENTO ); + String nomeEmpresa = ( ( String ) empresa.get( EmpresasData.DESIGNACAO_SOCIAL ) ); + String nomeTrabalhador = ( ( String ) trabalhador.get( TrabalhadoresData.NOME ) ); + String numeroMecanografico = ( ( String ) trabalhador.get( TrabalhadoresData.NUMERO_MECANOGRAFICO ) ); + String sexo = "m".equals( trabalhador.get( TrabalhadoresData.SEXO ) ) ? "M" : "F"; + Date data = ( Date ) trabalhador.get( TrabalhadoresData.DATA_NASCIMENTO ); String dataNascimento = data != null ? DF.format( data ) : "--"; - String nacionalidade = ( String ) trabalhador.get( TrabalhadorData.NACIONALIDADE ); - data = ( Date ) trabalhador.get( TrabalhadorData.DATA_ADMISSAO ); + String nacionalidade = ( String ) trabalhador.get( TrabalhadoresData.NACIONALIDADE ); + data = ( Date ) trabalhador.get( TrabalhadoresData.DATA_ADMISSAO ); String dataAdmissao = data != null ? DF.format( data ) : "--"; - String categoria = ( String ) trabalhador.get( TrabalhadorData.CATEGORIA ); - String funcao = ( String ) trabalhador.get( TrabalhadorData.FUNCAO_PROPOSTA ); + String categoria = ( String ) trabalhador.get( TrabalhadoresData.CATEGORIA ); + String funcao = ( String ) trabalhador.get( TrabalhadoresData.FUNCAO_PROPOSTA ); try { Integer id = clientesProvider.getEtiquetaID(); - EtiquetaData etiqueta = ( EtiquetaData ) JDO.load( EtiquetaData.class, id ); + EtiquetasData etiqueta = (EtiquetasData) JDO.load( EtiquetasData.class, id ); EtiquetaPrinter printer = new EtiquetaPrinter( etiqueta ); Vector linhas = new Vector(); linhas.add( new Object[]{ nomeEmpresa, new Double( 1.0 ) } ); @@ -1442,22 +1446,22 @@ System.out.println( "VALUE NOME: " + value ); { return; } - String nomeEmpresa = ( ( String ) empresa.get( EmpresaData.DESIGNACAO_SOCIAL ) ); - String nomeEstabelecimento = ( ( String ) estabelecimento.get( EstabelecimentoData.NOME ) ); - ContactoData contacto = ( ContactoData )estabelecimento.get( EstabelecimentoData.CONTACTO ); + String nomeEmpresa = ( ( String ) empresa.get( EmpresasData.DESIGNACAO_SOCIAL ) ); + String nomeEstabelecimento = ( ( String ) estabelecimento.get( EstabelecimentosData.NOME ) ); + ContactosData contacto = estabelecimento.toContacto_id(); String nomeContacto = ""; if( contacto != null ) { - nomeContacto = ( String )contacto.get( ContactoData.NOME ); + nomeContacto = ( String )contacto.get( ContactosData.NOME ); } - String morada = ( ( String ) estabelecimento.get( EstabelecimentoData.MORADA ) ); - String codigoPostal = ( ( String ) estabelecimento.get( EstabelecimentoData.CODIGO_POSTAL ) ); - String local = ( ( String ) estabelecimento.get( EstabelecimentoData.LOCALIDADE ) ); + String morada = ( ( String ) estabelecimento.get( EstabelecimentosData.MORADA ) ); + String codigoPostal = ( ( String ) estabelecimento.get( EstabelecimentosData.CODIGO_POSTAL ) ); + String local = ( ( String ) estabelecimento.get( EstabelecimentosData.LOCALIDADE ) ); try { Integer id = clientesProvider.getEtiquetaID(); - EtiquetaData etiqueta = ( EtiquetaData ) JDO.load( EtiquetaData.class, id ); + EtiquetasData etiqueta = ( EtiquetasData ) JDO.load( EtiquetasData.class, id ); EtiquetaPrinter printer = new EtiquetaPrinter( etiqueta ); Vector linhas = new Vector(); linhas.add( new Object[]{ nomeEmpresa, new Double( 1.0 ) } ); diff --git a/trunk/SIPRPSoft/src/siprp/clientes/ContactoPanel.java b/trunk/SIPRPSoft/src/siprp/clientes/ContactoPanel.java index b1f6d1cd..fd79ab1c 100644 --- a/trunk/SIPRPSoft/src/siprp/clientes/ContactoPanel.java +++ b/trunk/SIPRPSoft/src/siprp/clientes/ContactoPanel.java @@ -15,7 +15,7 @@ import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; -import siprp.data.ContactoData; +import siprp.data.outer.ContactosData; import com.evolute.utils.dataui.ComponentController; import com.evolute.utils.dataui.ComponentsHashtable; @@ -28,7 +28,7 @@ import com.evolute.utils.ui.text.CopyPasteHandler; public class ContactoPanel extends JPanel implements ControllableComponent { - private ContactoData contacto; + private ContactosData contacto; private ComponentsHashtable components; private JTextField nomeText; @@ -139,12 +139,12 @@ public class ContactoPanel extends JPanel private void setupComponentsHashtable() { components = new ComponentsHashtable(); - components.putComponent( ContactoData.NOME, nomeText ); - components.putComponent( ContactoData.CARGO, cargoText ); - components.putComponent( ContactoData.TELEFONE, telefoneText ); - components.putComponent( ContactoData.TELEMOVEL, telemovelText ); - components.putComponent( ContactoData.FAX, faxText ); - components.putComponent( ContactoData.EMAIL, emailText ); + components.putComponent( ContactosData.NOME, nomeText ); + components.putComponent( ContactosData.CARGO, cargoText ); + components.putComponent( ContactosData.TELEFONE, telefoneText ); + components.putComponent( ContactosData.TELEMOVEL, telemovelText ); + components.putComponent( ContactosData.FAX, faxText ); + components.putComponent( ContactosData.EMAIL, emailText ); } public void clear() @@ -157,7 +157,7 @@ public class ContactoPanel extends JPanel public void fill(Object value) { clear(); - contacto = ( ContactoData ) value; + contacto = ( ContactosData ) value; if( contacto == null ) { return; @@ -170,7 +170,7 @@ public class ContactoPanel extends JPanel { if( contacto == null ) { - contacto = new ContactoData(); + contacto = new ContactosData(); } String names[] = contacto.getFieldNames(); diff --git a/trunk/SIPRPSoft/src/siprp/clientes/EmpresaPanel.java b/trunk/SIPRPSoft/src/siprp/clientes/EmpresaPanel.java index c02d7165..31179b8c 100644 --- a/trunk/SIPRPSoft/src/siprp/clientes/EmpresaPanel.java +++ b/trunk/SIPRPSoft/src/siprp/clientes/EmpresaPanel.java @@ -18,7 +18,7 @@ import java.awt.GridLayout; import java.awt.Insets; import java.util.Arrays; import java.util.Collection; -import java.util.Hashtable; +import java.util.Map; import java.util.Vector; import javax.swing.BorderFactory; @@ -35,13 +35,13 @@ import javax.swing.event.ListSelectionListener; import siprp.FichaDataProvider; import siprp.SingletonConstants; -import siprp.data.EmpresaData; -import siprp.data.EstabelecimentoData; -import siprp.data.MarcacaoEmpresa; -import siprp.data.MarcacaoEmpresaData; +import siprp.data.outer.EmpresasData; +import siprp.data.outer.EstabelecimentosData; +import siprp.data.outer.MarcacoesEmpresaData; import siprp.database.cayenne.objects.Image; import siprp.database.cayenne.providers.ImageDAO; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; import com.evolute.utils.data.IDObject; import com.evolute.utils.data.MappableObject; @@ -51,7 +51,6 @@ import com.evolute.utils.dataui.ControllableComponent; import com.evolute.utils.documents.DoubleDocument; import com.evolute.utils.documents.IntegerDocument; import com.evolute.utils.documents.MaximumLengthDocument; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.tables.BaseTable; import com.evolute.utils.tables.ColumnizedObject; import com.evolute.utils.tables.VectorTableModel; @@ -72,10 +71,10 @@ public class EmpresaPanel extends JPanel private static final String STRING_TRABALHADORES_ACTIVOS = "Trabalhadores activos"; - private JDOProvider JDO; + private ProviderInterface objectProvider; private FichaDataProvider provider; - private EmpresaData empresa; + private EmpresasData empresa; private ComponentsHashtable components; private Integer id; @@ -136,7 +135,7 @@ public class EmpresaPanel extends JPanel webAware = ( ( Boolean ) Singleton.getInstance( SingletonConstants.WEB_AWARE ) ).booleanValue(); provider = (FichaDataProvider)FichaDataProvider.getProvider(); listSelectionListeners = new Vector(); - JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + objectProvider = ( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); setupComponents(); setupComponentsHashtable(); } @@ -687,7 +686,7 @@ public class EmpresaPanel extends JPanel Object row = ( (VectorTableModel)marcacoesTable.getModel() ).getRowAt( selected ); marcacoesTable.clearSelection(); marcacaoPanel.setEmpresa( empresa ); - if( row != null && row instanceof MarcacaoEmpresaData ) + if( row != null && row instanceof MarcacoesEmpresaData ) { marcacaoPanel.fill( row ); } @@ -729,41 +728,41 @@ public class EmpresaPanel extends JPanel private void setupComponentsHashtable() { components = new ComponentsHashtable(); - components.putComponent( EmpresaData.DESIGNACAO_SOCIAL, designacaoSocialText ); - components.putComponent( EmpresaData.MORADA, moradaText ); - components.putComponent( EmpresaData.CODIGO_POSTAL, codigoPostalText ); - components.putComponent( EmpresaData.LOCALIDADE, localText ); - components.putComponent( EmpresaData.DISTRITO, distritoText ); - components.putComponent( EmpresaData.CONCELHO, concelhoText ); - components.putComponent( EmpresaData.DATA_PROPOSTA, envioPropostaPanel ); - components.putComponent( EmpresaData.DATA_ACEITACAO, aceitacaoPropostaPanel ); - components.putComponent( EmpresaData.INICIO_CONTRATO, inicioContratoPanel ); - components.putComponent( EmpresaData.DURACAO, duracaoContratoText ); - components.putComponent( EmpresaData.DATA_CANCELAMENTO, cancelamentoPanel ); - components.putDummy( EmpresaData.PERFIL_1 ); - components.putDummy( EmpresaData.PERFIL_2); - components.putComponent( EmpresaData.DATA_ENVIO_CONTRATO, envioContratoPanel ); - components.putComponent( EmpresaData.DATA_RECEPCAO_CONTRATO, recepcaoContratoPanel ); - components.putComponent( EmpresaData.DATA_ENVIO_IDICT, envioIdictPanel ); - components.putComponent( EmpresaData.DATA_RELATORIO_ANUAL, relatorioAnualPanel ); - components.putComponent( EmpresaData.CODIGO_1, codigo1Text ); - components.putComponent( EmpresaData.CODIGO_2, codigo2Text ); - components.putComponent( EmpresaData.CODIGO_3, codigo3Text ); - components.putComponent( EmpresaData.CAE, caeText ); - components.putComponent( EmpresaData.ACTIVIDADE, actividadeText ); - components.putComponent( EmpresaData.CONTRIBUINTE, contribuinteText ); - components.putComponent( EmpresaData.SEGURANCA_SOCIAL, segSocialText ); - components.putComponent( EmpresaData.CONTACTO_1, contacto1Panel ); - components.putComponent( EmpresaData.CONTACTO_2, contacto2Panel ); - components.putComponent( EmpresaData.SERVICOS, servicosCombo ); - components.putComponent( EmpresaData.PRECO_HIGIENE, precoHigieneText ); - components.putComponent( EmpresaData.PRECO_MEDICINA, precoMedicinaText ); - components.putComponent( EmpresaData.PERIODICIDADE, modalidadePagamentoText ); - components.putDummy( EmpresaData.SERVICO_SAUDE_TIPO ); - components.putDummy( EmpresaData.SERVICO_SAUDE_DESIGNACAO ); - components.putDummy( EmpresaData.SERVICO_HIGIENE_TIPO ); - components.putDummy( EmpresaData.SERVICO_HIGIENE_DESIGNACAO ); - components.putDummy( EmpresaData.DESIGNACAO_SOCIAL_PLAIN ); + components.putComponent( EmpresasData.DESIGNACAO_SOCIAL, designacaoSocialText ); + components.putComponent( EmpresasData.MORADA, moradaText ); + components.putComponent( EmpresasData.CODIGO_POSTAL, codigoPostalText ); + components.putComponent( EmpresasData.LOCALIDADE, localText ); + components.putComponent( EmpresasData.DISTRITO, distritoText ); + components.putComponent( EmpresasData.CONCELHO, concelhoText ); + components.putComponent( EmpresasData.DATA_PROPOSTA, envioPropostaPanel ); + components.putComponent( EmpresasData.DATA_ACEITACAO, aceitacaoPropostaPanel ); + components.putComponent( EmpresasData.INICIO_CONTRATO, inicioContratoPanel ); + components.putComponent( EmpresasData.DURACAO, duracaoContratoText ); + components.putComponent( EmpresasData.DATA_CANCELAMENTO, cancelamentoPanel ); + components.putDummy( EmpresasData.PERFIL_1 ); + components.putDummy( EmpresasData.PERFIL_2); + components.putComponent( EmpresasData.DATA_ENVIO_CONTRATO, envioContratoPanel ); + components.putComponent( EmpresasData.DATA_RECEPCAO_CONTRATO, recepcaoContratoPanel ); + components.putComponent( EmpresasData.DATA_ENVIO_IDICT, envioIdictPanel ); + components.putComponent( EmpresasData.DATA_RELATORIO_ANUAL, relatorioAnualPanel ); + components.putComponent( EmpresasData.CODIGO_1, codigo1Text ); + components.putComponent( EmpresasData.CODIGO_2, codigo2Text ); + components.putComponent( EmpresasData.CODIGO_3, codigo3Text ); + components.putComponent( EmpresasData.CAE, caeText ); + components.putComponent( EmpresasData.ACTIVIDADE, actividadeText ); + components.putComponent( EmpresasData.CONTRIBUINTE, contribuinteText ); + components.putComponent( EmpresasData.SEGURANCA_SOCIAL, segSocialText ); + components.putComponent( EmpresasData.TO_CONTACTO_1, contacto1Panel ); + components.putComponent( EmpresasData.TO_CONTACTO_2, contacto2Panel ); + components.putComponent( EmpresasData.SERVICOS, servicosCombo ); + components.putComponent( EmpresasData.PRECO_HIGIENE, precoHigieneText ); + components.putComponent( EmpresasData.PRECO_MEDICINA, precoMedicinaText ); + components.putComponent( EmpresasData.PERIODICIDADE, modalidadePagamentoText ); + components.putDummy( EmpresasData.SERVICO_SAUDE_TIPO ); + components.putDummy( EmpresasData.SERVICO_SAUDE_DESIGNACAO ); + components.putDummy( EmpresasData.SERVICO_HIGIENE_TIPO ); + components.putDummy( EmpresasData.SERVICO_HIGIENE_DESIGNACAO ); + components.putDummy( EmpresasData.DESIGNACAO_SOCIAL_PLAIN ); } public void clear() @@ -785,12 +784,12 @@ public class EmpresaPanel extends JPanel // userPanel.setEmpresaID( null ); return; } - empresa = ( EmpresaData ) ( ( Object [] )value )[ 0 ]; + empresa = ( EmpresasData ) ( ( Object [] )value )[ 0 ]; Integer elementosProtocolo[][] = ( Integer [][] ) ( ( Object [] )value )[ 1 ]; String names[] = ( String[] ) components.keySet().toArray( new String[ components.size() ] ); ComponentController.fill( names, empresa.getHashData(), components ); - id = (Integer) empresa.get( EmpresaData.ID ); + id = (Integer) empresa.get( EmpresasData.ID ); IDObject estabelecimentos[]; try { @@ -807,17 +806,17 @@ public class EmpresaPanel extends JPanel Vector dadosProtocolo[] = new Vector[]{ new Vector(), new Vector() }; boolean analisesExamesA[] = new boolean[2]; - analisesExamesA[ 0 ] = "y".equals( empresa.get( EmpresaData.A_CONSULTAS ) ); - analisesExamesA[ 1 ] = "y".equals( empresa.get( EmpresaData.A_EXAMES ) ); + analisesExamesA[ 0 ] = "y".equals( empresa.get( EmpresasData.A_CONSULTAS ) ); + analisesExamesA[ 1 ] = "y".equals( empresa.get( EmpresasData.A_EXAMES ) ); dadosProtocolo[ 0 ].add( analisesExamesA ); dadosProtocolo[ 0 ].add( elementosProtocolo[ 0 ] ); boolean analisesExamesB[] = new boolean[2]; - analisesExamesB[ 0 ] = "y".equals( empresa.get( EmpresaData.B_CONSULTAS ) ); - analisesExamesB[ 1 ] = "y".equals( empresa.get( EmpresaData.B_EXAMES ) ); + analisesExamesB[ 0 ] = "y".equals( empresa.get( EmpresasData.B_CONSULTAS ) ); + analisesExamesB[ 1 ] = "y".equals( empresa.get( EmpresasData.B_EXAMES ) ); dadosProtocolo[ 1 ].add( analisesExamesB ); dadosProtocolo[ 1 ].add( elementosProtocolo[ 1 ] ); protocoloPanel.fill( dadosProtocolo ); - Integer empresaID = empresa == null ? null : (Integer) empresa.get( EmpresaData.ID ); + Integer empresaID = empresa == null ? null : (Integer) empresa.get( EmpresasData.ID ); if( empresaID != null ) { Long numTrabalhadoresActivos = provider.countTrabalhadoresActivosForEmpresa( empresaID ); @@ -827,7 +826,7 @@ public class EmpresaPanel extends JPanel } // if( webAware ) // { -// userPanel.setEmpresaID( (Integer) empresa.get( EmpresaData.ID ) ); +// userPanel.setEmpresaID( (Integer) empresa.get( EmpresasData.ID ) ); // userPanel.setEnabled( id != null ); // } @@ -837,24 +836,24 @@ public class EmpresaPanel extends JPanel { if( empresa == null ) { - empresa = new EmpresaData(); + empresa = new EmpresasData(); } String names[] = ( String[] ) components.keySet().toArray( new String[ components.size() ] ); - Hashtable hash = empresa.getHashData(); + Map hash = empresa.getHashData(); ComponentController.save( names, hash, components ); empresa.setHashData( hash ); Vector dadosProtocolo[] = ( Vector[] ) protocoloPanel.save(); boolean analisesExamesA[] = ( boolean [] ) dadosProtocolo[ 0 ].elementAt( 0 ); - empresa.set( EmpresaData.A_CONSULTAS, analisesExamesA[ 0 ] ? "y" : "n" ); - empresa.set( EmpresaData.A_EXAMES, analisesExamesA[ 1 ] ? "y" : "n" ); + empresa.set( EmpresasData.A_CONSULTAS, analisesExamesA[ 0 ] ? "y" : "n" ); + empresa.set( EmpresasData.A_EXAMES, analisesExamesA[ 1 ] ? "y" : "n" ); boolean analisesExamesB[] = ( boolean [] ) dadosProtocolo[ 1 ].elementAt( 0 ); - empresa.set( EmpresaData.B_CONSULTAS, analisesExamesB[ 0 ] ? "y" : "n" ); - empresa.set( EmpresaData.B_EXAMES, analisesExamesB[ 1 ] ? "y" : "n" ); + empresa.set( EmpresasData.B_CONSULTAS, analisesExamesB[ 0 ] ? "y" : "n" ); + empresa.set( EmpresasData.B_EXAMES, analisesExamesB[ 1 ] ? "y" : "n" ); Integer elementosProtocolo[][] = new Integer[][]{ ( Integer [] ) dadosProtocolo[ 0 ].elementAt( 1 ), ( Integer [] ) dadosProtocolo[ 1 ].elementAt( 1 ) }; - imageDAO.setImageForEmpresaID( (Integer) empresa.get( EmpresaData.ID ), (byte[]) logotipo.save() ); + imageDAO.setImageForEmpresaID( (Integer) empresa.get( EmpresasData.ID ), (byte[]) logotipo.save() ); return new Object[] { empresa, elementosProtocolo }; } @@ -913,10 +912,10 @@ public class EmpresaPanel extends JPanel return estabelecimentosTable; } - public void setSelectedEstabelecimento( EstabelecimentoData estab ) + public void setSelectedEstabelecimento( EstabelecimentosData estab ) { IDObject lista[] = (IDObject [])estabelecimentosModel.getValues().toArray( new IDObject[ 0 ] ); - Integer id = (Integer)estab.get( EstabelecimentoData.ID ); + Integer id = (Integer)estab.get( EstabelecimentosData.ID ); for( int n = 0; n < lista.length; n++ ) { if( lista[ n ].getID().equals( id ) ) @@ -933,8 +932,8 @@ public class EmpresaPanel extends JPanel try { Collection marcacoesCollection = - JDO.listLoad( MarcacaoEmpresa.class, new Object[]{ empresa.get( EmpresaData.ID ) }, - new String []{ "empresa.id" }, new String[]{ "data descending" } ); + objectProvider.listLoad( MarcacoesEmpresaData.class, new Object[]{ empresa.getId() }, + new String []{ MarcacoesEmpresaData.EMPRESA_ID }, new String[]{ "data desc" } ); Vector marcacoes = new Vector(); marcacoes.add( new ColumnizedObject(){ public Object getValue( int col ) diff --git a/trunk/SIPRPSoft/src/siprp/clientes/EstabelecimentoPanel.java b/trunk/SIPRPSoft/src/siprp/clientes/EstabelecimentoPanel.java index 7661b90a..21bbbdfc 100644 --- a/trunk/SIPRPSoft/src/siprp/clientes/EstabelecimentoPanel.java +++ b/trunk/SIPRPSoft/src/siprp/clientes/EstabelecimentoPanel.java @@ -34,12 +34,12 @@ import javax.swing.event.ListSelectionListener; import siprp.SIPRPTracker; import siprp.SingletonConstants; -import siprp.data.EmpresaData; -import siprp.data.EstabelecimentoData; -import siprp.data.HistoricoEstabelecimento; -import siprp.data.HistoricoEstabelecimentoData; +import siprp.data.outer.EmpresasData; +import siprp.data.outer.EstabelecimentosData; +import siprp.data.outer.HistoricoEstabelecimentoData; import siprp.medicina.prestadores.PrestadoresDataProvider; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; import com.evolute.utils.data.IDObject; import com.evolute.utils.data.MappableObject; @@ -48,7 +48,6 @@ import com.evolute.utils.dataui.ComponentsHashtable; import com.evolute.utils.dataui.ControllableComponent; import com.evolute.utils.documents.MaximumLengthDocument; import com.evolute.utils.error.ErrorLogger; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.tables.BaseTable; import com.evolute.utils.tables.ColumnizedObject; import com.evolute.utils.tables.VectorTableModel; @@ -65,12 +64,12 @@ public class EstabelecimentoPanel extends JPanel public static int disables = 0; - private JDOProvider JDO; + private ProviderInterface objectProvider; - private EstabelecimentoData estabelecimento; + private EstabelecimentosData estabelecimento; private ComponentsHashtable components; - private EmpresaData empresa; + private EmpresasData empresa; private JTable estabelecimentosTable; private JPanel toolbarPanel; @@ -104,7 +103,7 @@ public class EstabelecimentoPanel extends JPanel this.toolbarPanel = toolbarPanel; this.designacaoText = designacaoText; this.estabelecimentosTable = estabelecimentosTable; - JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + objectProvider = ( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); prestadoresProvider = PrestadoresDataProvider.getProvider(); setupComponents(); setupComponentsHashtable(); @@ -327,18 +326,18 @@ public class EstabelecimentoPanel extends JPanel private void setupComponentsHashtable() { components = new ComponentsHashtable(); - components.putComponent( EstabelecimentoData.NOME, designacaoText ); - components.putComponent( EstabelecimentoData.MORADA, moradaText ); - components.putComponent( EstabelecimentoData.LOCALIDADE, localText ); - components.putComponent( EstabelecimentoData.CODIGO_POSTAL, codigoPostalText ); - components.putComponent( EstabelecimentoData.CONTACTO, contactoPanel ); -// components.putComponent( EstabelecimentoData.HISTORICO, historicoText ); - components.putComponent( EstabelecimentoData.HISTORICO, historicoText ); - components.putComponent( EstabelecimentoData.PRESTADOR_CONSULTA_ID, prestadorConsultaCombo ); - components.putComponent( EstabelecimentoData.PRESTADOR_ECDS_ID, prestadorEcdsCombo ); - components.putDummy( EstabelecimentoData.EMPRESA ); - components.putDummy( EstabelecimentoData.NOME_PLAIN ); -// components.putDummy( EstabelecimentoData.INACTIVO ); + components.putComponent( EstabelecimentosData.NOME, designacaoText ); + components.putComponent( EstabelecimentosData.MORADA, moradaText ); + components.putComponent( EstabelecimentosData.LOCALIDADE, localText ); + components.putComponent( EstabelecimentosData.CODIGO_POSTAL, codigoPostalText ); + components.putComponent( EstabelecimentosData.CONTACTO_ID, contactoPanel ); +// components.putComponent( EstabelecimentosData.HISTORICO, historicoText ); + components.putComponent( EstabelecimentosData.HISTORICO, historicoText ); + components.putComponent( EstabelecimentosData.PRESTADOR_CONSULTA_ID, prestadorConsultaCombo ); + components.putComponent( EstabelecimentosData.PRESTADOR_ECDS_ID, prestadorEcdsCombo ); + components.putDummy( EstabelecimentosData.EMPRESA_ID ); + components.putDummy( EstabelecimentosData.NOME_PLAIN ); +// components.putDummy( EstabelecimentosData.INACTIVO ); } public void clear() @@ -353,7 +352,7 @@ public class EstabelecimentoPanel extends JPanel public void fill(Object value) { clear(); - estabelecimento = ( EstabelecimentoData ) value; + estabelecimento = ( EstabelecimentosData ) value; // marcacaoPanel.setEnabled( estabelecimento != null ); // marcacaoPanel.fill( estabelecimento ); if( estabelecimento == null ) @@ -370,14 +369,14 @@ public class EstabelecimentoPanel extends JPanel { if( estabelecimento == null ) { - estabelecimento = new EstabelecimentoData(); + estabelecimento = new EstabelecimentosData(); } String names[] = estabelecimento.getFieldNames(); Hashtable hash = new Hashtable(); ComponentController.save( names, hash, components ); estabelecimento.setHashData( hash ); - estabelecimento.set( EstabelecimentoData.EMPRESA, empresa ); + estabelecimento.setToEmpresa_id( empresa ); return estabelecimento; } @@ -386,7 +385,7 @@ public class EstabelecimentoPanel extends JPanel int selected = estabelecimentosTable.getSelectedRow(); if( estabelecimento != null ) { - IDObject obj = new MappableObject( (Integer) estabelecimento.get( EstabelecimentoData.ID ), estabelecimento.get( EstabelecimentoData.NOME ) ); + IDObject obj = new MappableObject( (Integer) estabelecimento.get( EstabelecimentosData.ID ), estabelecimento.get( EstabelecimentosData.NOME ) ); VectorTableModel model = (VectorTableModel)estabelecimentosTable.getModel(); if( selected == -1 ) { @@ -436,7 +435,7 @@ public class EstabelecimentoPanel extends JPanel { try { - EstabelecimentoData estab = ( EstabelecimentoData ) JDO.load( EstabelecimentoData.class, id ); + EstabelecimentosData estab = ( EstabelecimentosData ) objectProvider.load( EstabelecimentosData.class, id ); fill( estab ); } catch( Exception ex ) @@ -457,7 +456,7 @@ public class EstabelecimentoPanel extends JPanel fill( estabelecimento ); } - public void setEmpresa( EmpresaData empresa ) + public void setEmpresa( EmpresasData empresa ) { this.empresa = empresa; } @@ -467,7 +466,7 @@ public class EstabelecimentoPanel extends JPanel try { Collection historicoCollection = - JDO.listLoad( HistoricoEstabelecimento.class, new Object[]{ estabelecimento.get( EstabelecimentoData.ID ) }, + objectProvider.listLoad( HistoricoEstabelecimentoData.class, new Object[]{ estabelecimento.get( EstabelecimentosData.ID ) }, new String []{ "estabelecimento.id" }, new String[]{ "data descending" } ); Vector historico = new Vector(); historico.add( new ColumnizedObject(){ @@ -521,8 +520,8 @@ public class EstabelecimentoPanel extends JPanel try { tracker.getHigieneWindow().setVisible( true ); - tracker.getHigieneWindow().setEmpresaAndEstabelecimento( (Integer) empresa.get( EmpresaData.ID ), - ( Integer ) estabelecimento.get( EstabelecimentoData.ID ) ); + tracker.getHigieneWindow().setEmpresaAndEstabelecimento( (Integer) empresa.get( EmpresasData.ID ), + ( Integer ) estabelecimento.get( EstabelecimentosData.ID ) ); } catch (Exception ex) { ErrorLogger.logException(ex); diff --git a/trunk/SIPRPSoft/src/siprp/clientes/EtiquetaPrinter.java b/trunk/SIPRPSoft/src/siprp/clientes/EtiquetaPrinter.java index 041a83a6..db364bf6 100644 --- a/trunk/SIPRPSoft/src/siprp/clientes/EtiquetaPrinter.java +++ b/trunk/SIPRPSoft/src/siprp/clientes/EtiquetaPrinter.java @@ -18,7 +18,7 @@ import java.util.Hashtable; import java.util.Locale; import java.util.Vector; -import siprp.data.EtiquetaData; +import siprp.data.outer.EtiquetasData; import siprp.util.fop.FOPCreator; import siprp.util.fop.FOPPrinter; @@ -55,19 +55,19 @@ public class EtiquetaPrinter protected Double margemHorizontalFolha; /** Creates a new instance of EtiquetaPrinter */ - public EtiquetaPrinter( EtiquetaData etiqueta ) + public EtiquetaPrinter( EtiquetasData etiqueta ) { - altura = ( Double ) etiqueta.get( EtiquetaData.ALTURA ); - largura = ( Double ) etiqueta.get( EtiquetaData.LARGURA ); - margemEsquerda = ( Double ) etiqueta.get( EtiquetaData.MARGEM_ESQUERDA ); - margemCima = ( Double ) etiqueta.get( EtiquetaData.MARGEM_CIMA ); - colunas = ( Integer ) etiqueta.get( EtiquetaData.COLUNAS ); - linhas = ( Integer ) etiqueta.get( EtiquetaData.LINHAS ); - continua = "y".equals( etiqueta.get( EtiquetaData.CONTINUA ) ); - alturaFolha = ( Double ) etiqueta.get( EtiquetaData.ALTURA_FOLHA ); - larguraFolha = ( Double ) etiqueta.get( EtiquetaData.LARGURA_FOLHA ); - margemVerticalFolha = ( Double ) etiqueta.get( EtiquetaData.MARGEM_VERTICAL_FOLHA ); - margemHorizontalFolha = ( Double ) etiqueta.get( EtiquetaData.MARGEM_HORIZONTAL_FOLHA ); + altura = ( Double ) etiqueta.get( EtiquetasData.ALTURA ); + largura = ( Double ) etiqueta.get( EtiquetasData.LARGURA ); + margemEsquerda = ( Double ) etiqueta.get( EtiquetasData.MARGEM_ESQUERDA ); + margemCima = ( Double ) etiqueta.get( EtiquetasData.MARGEM_CIMA ); + colunas = ( Integer ) etiqueta.get( EtiquetasData.COLUNAS ); + linhas = ( Integer ) etiqueta.get( EtiquetasData.LINHAS ); + continua = "y".equals( etiqueta.get( EtiquetasData.CONTINUA ) ); + alturaFolha = ( Double ) etiqueta.get( EtiquetasData.ALTURA_FOLHA ); + larguraFolha = ( Double ) etiqueta.get( EtiquetasData.LARGURA_FOLHA ); + margemVerticalFolha = ( Double ) etiqueta.get( EtiquetasData.MARGEM_VERTICAL_FOLHA ); + margemHorizontalFolha = ( Double ) etiqueta.get( EtiquetasData.MARGEM_HORIZONTAL_FOLHA ); } public void print( Vector data ) diff --git a/trunk/SIPRPSoft/src/siprp/clientes/HistoricoEstabelecimentoPanel.java b/trunk/SIPRPSoft/src/siprp/clientes/HistoricoEstabelecimentoPanel.java index beb96e7f..ec90aba6 100644 --- a/trunk/SIPRPSoft/src/siprp/clientes/HistoricoEstabelecimentoPanel.java +++ b/trunk/SIPRPSoft/src/siprp/clientes/HistoricoEstabelecimentoPanel.java @@ -26,8 +26,8 @@ import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.event.DocumentListener; -import siprp.data.EstabelecimentoData; -import siprp.data.HistoricoEstabelecimentoData; +import siprp.data.outer.EstabelecimentosData; +import siprp.data.outer.HistoricoEstabelecimentoData; import com.evolute.utils.EVUtilsImageLib; import com.evolute.utils.dataui.ComponentController; @@ -56,7 +56,7 @@ public class HistoricoEstabelecimentoPanel extends JPanel private JButton saveButton; private JButton cancelButton; - private EstabelecimentoData estabelecimento; + private EstabelecimentosData estabelecimento; private boolean changed = false; private boolean filling = false; @@ -125,7 +125,7 @@ public class HistoricoEstabelecimentoPanel extends JPanel components = new ComponentsHashtable(); components.putComponent( HistoricoEstabelecimentoData.DATA, calendarPanel ); components.putComponent( HistoricoEstabelecimentoData.TEXTO, text ); - components.putDummy( HistoricoEstabelecimentoData.ESTABELECIMENTO ); + components.putDummy( HistoricoEstabelecimentoData.ESTABELECIMENTO_ID ); } public void clear() @@ -162,7 +162,7 @@ public class HistoricoEstabelecimentoPanel extends JPanel Hashtable hash = new Hashtable(); ComponentController.save( names, hash, components ); - hash.put( HistoricoEstabelecimentoData.ESTABELECIMENTO, estabelecimento ); + hash.put( HistoricoEstabelecimentoData.TO_ESTABELECIMENTO_ID, estabelecimento ); historico.setHashData( hash ); return historico; } @@ -281,7 +281,7 @@ public class HistoricoEstabelecimentoPanel extends JPanel } - public void setEstabelecimento( EstabelecimentoData estabelecimento ) + public void setEstabelecimento( EstabelecimentosData estabelecimento ) { this.estabelecimento = estabelecimento; } diff --git a/trunk/SIPRPSoft/src/siprp/clientes/MarcacaoEmpresaPanel.java b/trunk/SIPRPSoft/src/siprp/clientes/MarcacaoEmpresaPanel.java index 281cb79b..33307cec 100644 --- a/trunk/SIPRPSoft/src/siprp/clientes/MarcacaoEmpresaPanel.java +++ b/trunk/SIPRPSoft/src/siprp/clientes/MarcacaoEmpresaPanel.java @@ -26,8 +26,8 @@ import javax.swing.JTextArea; import javax.swing.event.ChangeListener; import javax.swing.event.DocumentListener; -import siprp.data.EmpresaData; -import siprp.data.MarcacaoEmpresaData; +import siprp.data.outer.EmpresasData; +import siprp.data.outer.MarcacoesEmpresaData; import com.evolute.utils.EVUtilsImageLib; import com.evolute.utils.dataui.ComponentController; @@ -56,11 +56,11 @@ public class MarcacaoEmpresaPanel extends JPanel private JButton saveButton; private JButton cancelButton; - private EmpresaData empresa; + private EmpresasData empresa; private boolean changed = false; private boolean filling = false; - private MarcacaoEmpresaData marcacao; + private MarcacoesEmpresaData marcacao; /** Creates a new instance of MarcacaoEmpresaPanel */ public MarcacaoEmpresaPanel( EmpresaPanel owner ) @@ -128,10 +128,10 @@ public class MarcacaoEmpresaPanel extends JPanel private void setupComponentsHashtable() { components = new ComponentsHashtable(); - components.putComponent( MarcacaoEmpresaData.DATA, calendarPanel ); - components.putComponent( MarcacaoEmpresaData.TEXTO, text ); - components.putComponent( MarcacaoEmpresaData.REALIZADA, realizadaCheck ); - components.putDummy( MarcacaoEmpresaData.EMPRESA ); + components.putComponent( MarcacoesEmpresaData.DATA, calendarPanel ); + components.putComponent( MarcacoesEmpresaData.TEXTO, text ); + components.putComponent( MarcacoesEmpresaData.REALIZADA, realizadaCheck ); + components.putDummy( MarcacoesEmpresaData.EMPRESA_ID ); } public void clear() @@ -146,7 +146,7 @@ public class MarcacaoEmpresaPanel extends JPanel filling = true; clear(); initButtons(); - marcacao = (MarcacaoEmpresaData)value; + marcacao = (MarcacoesEmpresaData)value; if( marcacao == null ) { filling = false; @@ -161,16 +161,15 @@ public class MarcacaoEmpresaPanel extends JPanel { if( marcacao == null ) { - marcacao = new MarcacaoEmpresaData(); + marcacao = new MarcacoesEmpresaData(); } String names[] = marcacao.getFieldNames(); Hashtable hash = new Hashtable(); ComponentController.save( names, hash, components ); - hash.put( MarcacaoEmpresaData.EMPRESA, empresa ); + hash.put( MarcacoesEmpresaData.TO_EMPRESA_ID, empresa ); marcacao.setHashData( hash ); - System.out.println( "EMPRESA:: " + marcacao.get( MarcacaoEmpresaData.EMPRESA ) ); return marcacao; } @@ -270,7 +269,7 @@ public class MarcacaoEmpresaPanel extends JPanel JOptionPane.showMessageDialog( this, "Tem de escolher uma data", "Erro...", JOptionPane.ERROR_MESSAGE ); return; } - MarcacaoEmpresaData marc = ( MarcacaoEmpresaData ) save(); + MarcacoesEmpresaData marc = ( MarcacoesEmpresaData ) save(); try { @@ -290,7 +289,7 @@ public class MarcacaoEmpresaPanel extends JPanel } - public void setEmpresa( EmpresaData empresa ) + public void setEmpresa( EmpresasData empresa ) { this.empresa = empresa; } diff --git a/trunk/SIPRPSoft/src/siprp/clientes/MarcacaoPanel.java b/trunk/SIPRPSoft/src/siprp/clientes/MarcacaoPanel.java index 230f4271..8f660691 100644 --- a/trunk/SIPRPSoft/src/siprp/clientes/MarcacaoPanel.java +++ b/trunk/SIPRPSoft/src/siprp/clientes/MarcacaoPanel.java @@ -30,14 +30,14 @@ import javax.swing.event.ChangeListener; import siprp.CompanyDataLoader; import siprp.SingletonConstants; -import siprp.data.ContactoData; -import siprp.data.EstabelecimentoData; import siprp.data.Marcacao; -import siprp.data.MarcacaoEstabelecimentoData; import siprp.data.MarcacaoListLoader; import siprp.data.MarcacaoTrabalhadorConstants; -import siprp.data.MarcacaoTrabalhadorData; -import siprp.data.TrabalhadorData; +import siprp.data.outer.ContactosData; +import siprp.data.outer.EstabelecimentosData; +import siprp.data.outer.MarcacoesEstabelecimentoData; +import siprp.data.outer.MarcacoesTrabalhadorData; +import siprp.data.outer.TrabalhadoresData; import com.evolute.utils.Singleton; import com.evolute.utils.dataui.ComponentController; @@ -77,8 +77,8 @@ public class MarcacaoPanel extends JPanel private JLabel dataEnvioMailLabel; private JButton historicoButton; - private TrabalhadorData trabalhador; - private EstabelecimentoData estabelecimento; + private TrabalhadoresData trabalhador; + private EstabelecimentosData estabelecimento; private MarcacaoListLoader loader; private Marcacao current; @@ -264,15 +264,15 @@ System.out.println( "stateChanged2" ); switch( tipo ) { case Marcacao.TIPO_MARCACAO_TRABALHADOR_EXAMES: case Marcacao.TIPO_MARCACAO_TRABALHADOR_CONSULTA: - if( ! ( value instanceof TrabalhadorData ) ) + if( ! ( value instanceof TrabalhadoresData ) ) { filling = false; return ; } - trabalhador = (TrabalhadorData) value; + trabalhador = (TrabalhadoresData) value; try { - marcacoes = loader.load( tipo, (Integer)trabalhador.get( TrabalhadorData.ID ) ); + marcacoes = loader.load( tipo, (Integer)trabalhador.get( TrabalhadoresData.ID ) ); } catch( Exception ex ) { @@ -282,15 +282,15 @@ System.out.println( "stateChanged2" ); break; case Marcacao.TIPO_MARCACAO_ESTABELECIMENTO: - if( ! ( value instanceof EstabelecimentoData ) ) + if( ! ( value instanceof EstabelecimentosData ) ) { filling = false; return ; } - estabelecimento = (EstabelecimentoData) value; + estabelecimento = (EstabelecimentosData) value; try { - marcacoes = loader.load( tipo, (Integer)estabelecimento.get( EstabelecimentoData.ID ) ); + marcacoes = loader.load( tipo, (Integer)estabelecimento.get( EstabelecimentosData.ID ) ); } catch( Exception ex ) { @@ -411,13 +411,13 @@ System.out.println( "stateChanged2" ); current.set( Marcacao.DATA_EMAIL, today ); String subject = "."; String texto = ""; - EstabelecimentoData estab = null; - if( current instanceof MarcacaoTrabalhadorData ) + EstabelecimentosData estab = null; + if( current instanceof MarcacoesTrabalhadorData ) { - TrabalhadorData trab = ( TrabalhadorData )current.get( MarcacaoTrabalhadorData.TRABALHADOR ); - String nome = ( String )trab.get( TrabalhadorData.NOME ); - String data = DateFormat.getDateInstance( DateFormat.SHORT ).format( ( Date )current.get( MarcacaoTrabalhadorData.DATA ) ); - if( ( ( Number )current.get( MarcacaoTrabalhadorData.TIPO ) ).intValue() == MarcacaoTrabalhadorConstants.TIPO_EXAMES ) + TrabalhadoresData trab = ((MarcacoesTrabalhadorData)current).toTrabalhador_id(); + String nome = ( String )trab.get( TrabalhadoresData.NOME ); + String data = DateFormat.getDateInstance( DateFormat.SHORT ).format( ( Date )current.get( MarcacoesTrabalhadorData.DATA ) ); + if( ( ( Number )current.get( MarcacoesTrabalhadorData.TIPO ) ).intValue() == MarcacaoTrabalhadorConstants.TIPO_EXAMES ) { subject = ( String ) Singleton.getInstance( SingletonConstants.SUBJECT_EXAMES ); subject = subject.replaceAll( CompanyDataLoader.NOME, nome ); @@ -467,16 +467,16 @@ System.out.println( "stateChanged2" ); // + "%0A%0APra\u00e7a Duque de Saldanha, 1 - 9\u00BAC" // + "%0A%0A1050-094 Lisboa"; } - estab = ( EstabelecimentoData )trab.get( TrabalhadorData.ESTABELECIMENTO ); + estab = trab.toEstabelecimento_id(); } else { - estab = ( EstabelecimentoData )current.get( MarcacaoEstabelecimentoData.ESTABELECIMENTO ); - String sede = ( String )estab.get( EstabelecimentoData.NOME ); + estab = ( EstabelecimentosData ) current.get( MarcacoesEstabelecimentoData.TO_ESTABELECIMENTO_ID ); + String sede = ( String )estab.get( EstabelecimentosData.NOME ); subject = ( String ) Singleton.getInstance( SingletonConstants.SUBJECT_VISITA ); subject = subject.replaceAll( CompanyDataLoader.NOME, sede ); - String morada = ( String )estab.get( EstabelecimentoData.MORADA ); - String data = DateFormat.getDateInstance( DateFormat.SHORT ).format( ( Date )current.get( MarcacaoEstabelecimentoData.DATA ) ); + String morada = ( String )estab.get( EstabelecimentosData.MORADA ); + String data = DateFormat.getDateInstance( DateFormat.SHORT ).format( ( Date ) current.get( MarcacoesEstabelecimentoData.DATA ) ); texto = ( String ) Singleton.getInstance( SingletonConstants.LETTER_VISITA ); texto = texto.replaceAll( CompanyDataLoader.DATA, data ); texto = texto.replaceAll( CompanyDataLoader.NOME, sede ); @@ -499,11 +499,11 @@ System.out.println( "stateChanged2" ); } - ContactoData cont = ( ContactoData )estab.get( EstabelecimentoData.CONTACTO ); + ContactosData cont = ( ContactosData )estab.toContacto_id(); String mail = ""; if( cont != null ) { - mail = ( String )cont.get( ContactoData.EMAIL ); + mail = cont.getEmail(); } try { @@ -573,12 +573,12 @@ System.out.println( "MARCAR" ); switch( tipo ) { case Marcacao.TIPO_MARCACAO_TRABALHADOR_EXAMES: case Marcacao.TIPO_MARCACAO_TRABALHADOR_CONSULTA: - current.set( MarcacaoTrabalhadorData.TRABALHADOR, trabalhador ); - current.set( MarcacaoTrabalhadorData.TIPO, new Integer( tipo ) ); + current.set( MarcacoesTrabalhadorData.TO_TRABALHADOR_ID, trabalhador ); + current.set( MarcacoesTrabalhadorData.TIPO, new Integer( tipo ) ); break; case Marcacao.TIPO_MARCACAO_ESTABELECIMENTO: - current.set( MarcacaoEstabelecimentoData.ESTABELECIMENTO, estabelecimento ); + current.set( MarcacoesEstabelecimentoData.TO_ESTABELECIMENTO_ID, estabelecimento ); break; } marcacoes = ( Marcacao [])aux.toArray( new Marcacao[0] ); diff --git a/trunk/SIPRPSoft/src/siprp/clientes/TrabalhadorPanel.java b/trunk/SIPRPSoft/src/siprp/clientes/TrabalhadorPanel.java index 88ab5274..40bbae28 100644 --- a/trunk/SIPRPSoft/src/siprp/clientes/TrabalhadorPanel.java +++ b/trunk/SIPRPSoft/src/siprp/clientes/TrabalhadorPanel.java @@ -30,9 +30,9 @@ import javax.swing.event.ListSelectionListener; import siprp.FichaDataProvider; import siprp.SIPRPTracker; -import siprp.data.EmpresaData; -import siprp.data.EstabelecimentoData; -import siprp.data.TrabalhadorData; +import siprp.data.outer.EmpresasData; +import siprp.data.outer.EstabelecimentosData; +import siprp.data.outer.TrabalhadoresData; import com.evolute.utils.data.IDObject; import com.evolute.utils.data.MappableObject; @@ -56,10 +56,10 @@ public class TrabalhadorPanel extends JPanel implements ControllableComponent, ListSelectionListener, ActionListener { private FichaDataProvider provider; - private TrabalhadorData trabalhador; + private TrabalhadoresData trabalhador; private ComponentsHashtable components; - private EstabelecimentoData estabelecimento; + private EstabelecimentosData estabelecimento; private JTable estabelecimentosTable; private JPanel toolbarPanel; @@ -254,8 +254,8 @@ public class TrabalhadorPanel extends JPanel private void setupComponentsHashtable() { components = new ComponentsHashtable(); - components.putComponent( TrabalhadorData.NOME, nomeText ); - components.putComponent( TrabalhadorData.SEXO, new ControllableComponent() + components.putComponent( TrabalhadoresData.NOME, nomeText ); + components.putComponent( TrabalhadoresData.SEXO, new ControllableComponent() { public void fill( Object value ) { @@ -289,22 +289,22 @@ public class TrabalhadorPanel extends JPanel sexoPanel.setEnabled( enable ); } } ); - components.putComponent( TrabalhadorData.BI , biText ); - components.putComponent( TrabalhadorData.DATA_NASCIMENTO, dataNascimentoPanel ); - components.putComponent( TrabalhadorData.NACIONALIDADE, nacionalidadeText ); - components.putComponent( TrabalhadorData.NUMERO_MECANOGRAFICO, numeroMecanograficoText ); - components.putComponent( TrabalhadorData.DATA_ADMISSAO, dataAdmissaoPanel ); - components.putComponent( TrabalhadorData.CATEGORIA, categoriaText ); - components.putComponent( TrabalhadorData.LOCAL_TRABALHO, localText ); - components.putComponent( TrabalhadorData.FUNCAO_PROPOSTA, funcaoText ); - components.putComponent( TrabalhadorData.DATA_ADMISSAO_FUNCAO, dataAdmissaoFuncaoPanel ); - components.putComponent( TrabalhadorData.DATA_DEMISSAO, dataDemissaoPanel ); - components.putDummy( TrabalhadorData.OBSERVACOES ); - components.putComponent( TrabalhadorData.OBSERVACOES_GESTAO, observacoesText ); - components.putComponent( TrabalhadorData.PERFIL, perfilPanel ); -// components.putDummy( TrabalhadorData.INACTIVO ); - components.putDummy( TrabalhadorData.ESTABELECIMENTO ); - components.putDummy( TrabalhadorData.NOME_PLAIN ); + components.putComponent( TrabalhadoresData.BI , biText ); + components.putComponent( TrabalhadoresData.DATA_NASCIMENTO, dataNascimentoPanel ); + components.putComponent( TrabalhadoresData.NACIONALIDADE, nacionalidadeText ); + components.putComponent( TrabalhadoresData.NUMERO_MECANOGRAFICO, numeroMecanograficoText ); + components.putComponent( TrabalhadoresData.DATA_ADMISSAO, dataAdmissaoPanel ); + components.putComponent( TrabalhadoresData.CATEGORIA, categoriaText ); + components.putComponent( TrabalhadoresData.LOCAL_TRABALHO, localText ); + components.putComponent( TrabalhadoresData.FUNCAO_PROPOSTA, funcaoText ); + components.putComponent( TrabalhadoresData.DATA_ADMISSAO_FUNCAO, dataAdmissaoFuncaoPanel ); + components.putComponent( TrabalhadoresData.DATA_DEMISSAO, dataDemissaoPanel ); + components.putDummy( TrabalhadoresData.OBSERVACOES ); + components.putComponent( TrabalhadoresData.OBSERVACOES_GESTAO, observacoesText ); + components.putComponent( TrabalhadoresData.PERFIL, perfilPanel ); +// components.putDummy( TrabalhadoresData.INACTIVO ); + components.putDummy( TrabalhadoresData.ESTABELECIMENTO_ID ); + components.putDummy( TrabalhadoresData.NOME_PLAIN ); } public void clear() @@ -317,7 +317,7 @@ public class TrabalhadorPanel extends JPanel public void fill(Object value) { clear(); - trabalhador = ( TrabalhadorData ) value; + trabalhador = ( TrabalhadoresData ) value; // examesPanel.setEnabled( trabalhador != null ); // examesPanel.fill( trabalhador ); // consultaPanel.setEnabled( trabalhador != null ); @@ -336,14 +336,14 @@ public class TrabalhadorPanel extends JPanel if( trabalhador == null ) { - trabalhador = new TrabalhadorData(); + trabalhador = new TrabalhadoresData(); } String names[] = trabalhador.getFieldNames(); Hashtable hash = new Hashtable(); ComponentController.save( names, hash, components ); trabalhador.setHashData( hash ); - trabalhador.set( TrabalhadorData.ESTABELECIMENTO, estabelecimento ); + trabalhador.set( TrabalhadoresData.TO_ESTABELECIMENTO_ID, estabelecimento ); return trabalhador; } @@ -382,7 +382,7 @@ public class TrabalhadorPanel extends JPanel } else { - Integer id = ( Integer )estabelecimento.get( EstabelecimentoData.ID ); + Integer id = ( Integer )estabelecimento.get( EstabelecimentosData.ID ); IDObject []trabalhadores = provider.getAllTrabalhadoresForEstabelecimento( id ); trabalhadoresModel.setValues( new Vector( Arrays.asList( trabalhadores ) ) ); } @@ -426,7 +426,7 @@ public class TrabalhadorPanel extends JPanel // Integer id = ( ( IDObject ) trabalhadoresModel.getRowAt( selected ) ).getID();; // try // { -// TrabalhadorData trabalhador = (TrabalhadorData) TrabalhadorData.load( TrabalhadorData.class, id ); +// TrabalhadoresData trabalhador = (TrabalhadoresData) TrabalhadoresData.load( TrabalhadoresData.class, id ); // fill( trabalhador ); // } // catch( Exception ex ) @@ -450,7 +450,7 @@ public class TrabalhadorPanel extends JPanel //System.out.println( "postSave TRABALHADOR PANEL " + selected + " : " + ( trabalhador == null ) ); if( trabalhador != null ) { - IDObject obj = new MappableObject( (Integer) trabalhador.get( TrabalhadorData.ID ), trabalhador.get( TrabalhadorData.NOME ) ); + IDObject obj = new MappableObject( (Integer) trabalhador.get( TrabalhadoresData.ID ), trabalhador.get( TrabalhadoresData.NOME ) ); if( selected == -1 ) { trabalhadoresModel.insertRowAt( obj, trabalhadoresTable.getRowCount() ); @@ -490,15 +490,15 @@ public class TrabalhadorPanel extends JPanel return ( (IDObject) trabalhadoresModel.getRowAt( selected ) ).getID(); } - public void setEstabelecimento( EstabelecimentoData estabelecimento ) + public void setEstabelecimento( EstabelecimentosData estabelecimento ) { this.estabelecimento = estabelecimento; } - public void setSelectedTrabalhador( TrabalhadorData trab ) + public void setSelectedTrabalhador( TrabalhadoresData trab ) { IDObject lista[] = (IDObject [])trabalhadoresModel.getValues().toArray( new IDObject[ 0 ] ); - Integer id = (Integer)trab.get( TrabalhadorData.ID ); + Integer id = (Integer)trab.get( TrabalhadoresData.ID ); for( int n = 0; n < lista.length; n++ ) { if( lista[ n ].getID().equals( id ) ) @@ -523,12 +523,12 @@ public class TrabalhadorPanel extends JPanel { try { - EstabelecimentoData estabelecimento = ( EstabelecimentoData ) trabalhador.get( TrabalhadorData.ESTABELECIMENTO ); - EmpresaData empresa = ( EmpresaData ) estabelecimento.get( EstabelecimentoData.EMPRESA ); + EstabelecimentosData estabelecimento = trabalhador.toEstabelecimento_id(); + EmpresasData empresa = estabelecimento.toEmpresa_id(); tracker.getMedicinaWindow().setVisible( true ); - tracker.getMedicinaWindow().setEmpresaAndEstabelecimentoAndTrabalhador( (Integer) empresa.get( EmpresaData.ID ), - ( Integer ) estabelecimento.get( EstabelecimentoData.ID ), - ( Integer ) trabalhador.get( TrabalhadorData.ID ) ); + tracker.getMedicinaWindow().setEmpresaAndEstabelecimentoAndTrabalhador( (Integer) empresa.get( EmpresasData.ID ), + ( Integer ) estabelecimento.get( EstabelecimentosData.ID ), + ( Integer ) trabalhador.get( TrabalhadoresData.ID ) ); } catch (Exception ex) { ErrorLogger.logException(ex); diff --git a/trunk/SIPRPSoft/src/siprp/clientes/UserWindow.java b/trunk/SIPRPSoft/src/siprp/clientes/UserWindow.java index b2cba2b1..5da41f72 100644 --- a/trunk/SIPRPSoft/src/siprp/clientes/UserWindow.java +++ b/trunk/SIPRPSoft/src/siprp/clientes/UserWindow.java @@ -10,10 +10,10 @@ import java.awt.BorderLayout; import javax.swing.JFrame; -import siprp.data.EmpresaData; +import siprp.data.outer.EmpresasData; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.ui.CustomJDialog; /** * @@ -21,7 +21,7 @@ import com.evolute.utils.ui.CustomJDialog; */ public class UserWindow extends CustomJDialog { - protected JDOProvider JDO; + protected ProviderInterface JDO; // protected JTextField empresaText; protected UserPanel userPanel; protected Integer empresaID; @@ -32,7 +32,7 @@ public class UserWindow extends CustomJDialog { super( owner, true ); this.empresaID = empresaID; - JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + JDO = ( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); setupComponents(); centerSuper(); } @@ -54,13 +54,13 @@ public class UserWindow extends CustomJDialog } else { - EmpresaData empresa = ( EmpresaData )JDO.load( EmpresaData.class, empresaID ); + EmpresasData empresa = ( EmpresasData )JDO.load( EmpresasData.class, empresaID ); if( empresa == null ) { return; } -// empresaText.setText( (String)empresa.get( EmpresaData.DESIGNACAO_SOCIAL ) ); - setTitle( (String)empresa.get( EmpresaData.DESIGNACAO_SOCIAL ) ); +// empresaText.setText( (String)empresa.get( EmpresasData.DESIGNACAO_SOCIAL ) ); + setTitle( (String)empresa.get( EmpresasData.DESIGNACAO_SOCIAL ) ); } userPanel.setEmpresaID( empresaID ); } diff --git a/trunk/SIPRPSoft/src/siprp/companydataloaders/SIPRPDataLoader.java b/trunk/SIPRPSoft/src/siprp/companydataloaders/SIPRPDataLoader.java index b1005a3b..ba02f062 100644 --- a/trunk/SIPRPSoft/src/siprp/companydataloaders/SIPRPDataLoader.java +++ b/trunk/SIPRPSoft/src/siprp/companydataloaders/SIPRPDataLoader.java @@ -86,20 +86,20 @@ public class SIPRPDataLoader implements CompanyDataLoader Singleton.setInstance( SingletonConstants.WEB_DB_NAME, "siprp" ); Singleton.setInstance( SingletonConstants.WEB_DRIVER_NAME, "org.postgresql.Driver" ); -// Singleton.setInstance( SingletonConstants.LOCAL_USER, "siprp" ); -// Singleton.setInstance( SingletonConstants.LOCAL_PASSWORD, "rg2h-opksiprp" ); -// Singleton.setInstance( SingletonConstants.LOCAL_URL_PREFIX, "jdbc:postgresql://" ); -// Singleton.setInstance( SingletonConstants.LOCAL_URL, "www.evolute.pt:5436" ); -// Singleton.setInstance( SingletonConstants.LOCAL_DB_NAME, "siprp_local_3" ); -// Singleton.setInstance( SingletonConstants.LOCAL_DRIVER_NAME, "org.postgresql.Driver" ); - - Singleton.setInstance( SingletonConstants.LOCAL_USER, "postgres" ); - Singleton.setInstance( SingletonConstants.LOCAL_PASSWORD, "Typein" ); + Singleton.setInstance( SingletonConstants.LOCAL_USER, "siprp" ); + Singleton.setInstance( SingletonConstants.LOCAL_PASSWORD, "rg2h-opksiprp" ); Singleton.setInstance( SingletonConstants.LOCAL_URL_PREFIX, "jdbc:postgresql://" ); - Singleton.setInstance( SingletonConstants.LOCAL_URL, "10.158.2.2:5432" ); - Singleton.setInstance( SingletonConstants.LOCAL_DB_NAME, "siprp_local" ); + Singleton.setInstance( SingletonConstants.LOCAL_URL, "www.evolute.pt:5436" ); + Singleton.setInstance( SingletonConstants.LOCAL_DB_NAME, "siprp_local_3" ); Singleton.setInstance( SingletonConstants.LOCAL_DRIVER_NAME, "org.postgresql.Driver" ); +// Singleton.setInstance( SingletonConstants.LOCAL_USER, "postgres" ); +// Singleton.setInstance( SingletonConstants.LOCAL_PASSWORD, "Typein" ); +// Singleton.setInstance( SingletonConstants.LOCAL_URL_PREFIX, "jdbc:postgresql://" ); +// Singleton.setInstance( SingletonConstants.LOCAL_URL, "10.158.2.2:5432" ); +// Singleton.setInstance( SingletonConstants.LOCAL_DB_NAME, "siprp_local" ); +// Singleton.setInstance( SingletonConstants.LOCAL_DRIVER_NAME, "org.postgresql.Driver" ); + // Singleton.setInstance( SingletonConstants.LOCAL_USER, "postgres" ); // Singleton.setInstance( SingletonConstants.LOCAL_PASSWORD, "Typein" ); // Singleton.setInstance( SingletonConstants.LOCAL_URL_PREFIX, "jdbc:postgresql://" ); diff --git a/trunk/SIPRPSoft/src/siprp/data/ActualizacaoSaveHandler.java b/trunk/SIPRPSoft/src/siprp/data/ActualizacaoSaveHandler.java deleted file mode 100644 index dbd36fc9..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/ActualizacaoSaveHandler.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * StampSaveHandler.java - * - * Created on 15 de Marco de 2005, 15:00 - */ - -package siprp.data; - -import java.util.Date; - -import com.evolute.utils.jdo.JDOObject; -import com.evolute.utils.jdo.JDOOperationHandlerInterface; -/** - * - * @author fpalma - */ -public class ActualizacaoSaveHandler implements JDOOperationHandlerInterface -{ - public static final ActualizacaoSaveHandler INSTANCE = new ActualizacaoSaveHandler(); - - /** Creates a new instance of StampSaveHandler */ - public ActualizacaoSaveHandler() - { - } - - public boolean handle(JDOObject object, int operation, int moment) throws Exception - { - if( !( object instanceof ActualizacaoSaveable ) ) - { - return false; - } - switch( operation ) - { - case OP_SAVE: - return save( object, moment ); - - case OP_DELETE: - return false; - } - return false; - } - - protected boolean save( JDOObject object, int moment ) - { - if( moment != MOMENT_BEFORE ) - { - return false; - } - object.set( ActualizacaoSaveable.ACTUALIZACAO, new Date() ); - return true; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/ActualizacaoSaveable.java b/trunk/SIPRPSoft/src/siprp/data/ActualizacaoSaveable.java deleted file mode 100644 index 87d79372..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/ActualizacaoSaveable.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * ActualizacaoSaveable.java - * - * Created on 15 de Marco de 2005, 15:32 - */ - -package siprp.data; - -/** - * - * @author fpalma - */ -public interface ActualizacaoSaveable -{ - public static final String ACTUALIZACAO = "actualizacao"; -} diff --git a/trunk/SIPRPSoft/src/siprp/data/Aviso.java b/trunk/SIPRPSoft/src/siprp/data/Aviso.java deleted file mode 100644 index 3d22b137..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/Aviso.java +++ /dev/null @@ -1,187 +0,0 @@ -/* -* Aviso.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on 13/Out/2004 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.util.Date; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class Aviso implements JDOInnerObject -{ - private Integer id; - private Integer tipo; - private Empresa empresa; - private Estabelecimento estabelecimento; - private Trabalhador trabalhador; - private Integer evento_id; - private Date data_aviso; - private Date data_evento; - private String descricao; - - public Aviso() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == AvisoData.ID ) - { - return id; - } - else if( fieldName == AvisoData.TIPO ) - { - return tipo; - } - else if( fieldName == AvisoData.EMPRESA ) - { - return empresa; - } - else if( fieldName == AvisoData.ESTABELECIMENTO ) - { - return estabelecimento; - } - else if( fieldName == AvisoData.TRABALHADOR ) - { - return trabalhador; - } - else if( fieldName == AvisoData.EVENTO_ID ) - { - return evento_id; - } - else if( fieldName == AvisoData.DATA_AVISO ) - { - return data_aviso; - } - else if( fieldName == AvisoData.DATA_EVENTO ) - { - return data_evento; - } - else if( fieldName == AvisoData.DESCRICAO ) - { - return descricao; - } - else if( fieldName.equals( AvisoData.ID ) ) - { - return id; - } - else if( fieldName.equals( AvisoData.TIPO ) ) - { - return tipo; - } - else if( fieldName.equals( AvisoData.EMPRESA ) ) - { - return empresa; - } - else if( fieldName.equals( AvisoData.ESTABELECIMENTO ) ) - { - return estabelecimento; - } - else if( fieldName.equals( AvisoData.TRABALHADOR ) ) - { - return trabalhador; - } - else if( fieldName.equals( AvisoData.EVENTO_ID ) ) - { - return evento_id; - } - else if( fieldName.equals( AvisoData.DATA_AVISO ) ) - { - return data_aviso; - } - else if( fieldName.equals( AvisoData.DATA_EVENTO ) ) - { - return data_evento; - } - else if( fieldName.equals( AvisoData.DESCRICAO ) ) - { - return descricao; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == AvisoData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == AvisoData.TIPO ) - { - tipo = ( Integer ) value; - } - else if( fieldName == AvisoData.EMPRESA ) - { - empresa = ( Empresa ) value; - } - else if( fieldName == AvisoData.ESTABELECIMENTO ) - { - estabelecimento = ( Estabelecimento ) value; - } - else if( fieldName == AvisoData.TRABALHADOR ) - { - trabalhador = ( Trabalhador ) value; - } - else if( fieldName == AvisoData.EVENTO_ID ) - { - evento_id = ( Integer ) value; - } - else if( fieldName == AvisoData.DATA_AVISO ) - { - data_aviso = ( Date ) value; - } - else if( fieldName == AvisoData.DATA_EVENTO ) - { - data_evento = ( Date ) value; - } - else if( fieldName == AvisoData.DESCRICAO ) - { - descricao = ( String ) value; - } - else if( fieldName.equals( AvisoData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( AvisoData.TIPO ) ) - { - tipo = ( Integer ) value; - } - else if( fieldName.equals( AvisoData.EMPRESA ) ) - { - empresa = ( Empresa ) value; - } - else if( fieldName.equals( AvisoData.ESTABELECIMENTO ) ) - { - estabelecimento = ( Estabelecimento ) value; - } - else if( fieldName.equals( AvisoData.TRABALHADOR ) ) - { - trabalhador = ( Trabalhador ) value; - } - else if( fieldName.equals( AvisoData.EVENTO_ID ) ) - { - evento_id = ( Integer ) value; - } - else if( fieldName.equals( AvisoData.DATA_AVISO ) ) - { - data_aviso = ( Date ) value; - } - else if( fieldName.equals( AvisoData.DATA_EVENTO ) ) - { - data_evento = ( Date ) value; - } - else if( fieldName.equals( AvisoData.DESCRICAO ) ) - { - descricao = ( String ) value; - } - } - - public Class getOuterClass() - { - return AvisoData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/AvisoData.java b/trunk/SIPRPSoft/src/siprp/data/AvisoData.java deleted file mode 100644 index 75121ad5..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/AvisoData.java +++ /dev/null @@ -1,69 +0,0 @@ -/* -* AvisoData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on 13/Out/2004 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.util.HashMap; - -import com.evolute.utils.jdo.JDOObject; - -public final class AvisoData extends JDOObject - implements AvisoConstants -{ - public static final String ID = "id"; - public static final String TIPO = "tipo"; - public static final String EMPRESA = "empresa"; - public static final String ESTABELECIMENTO = "estabelecimento"; - public static final String TRABALHADOR = "trabalhador"; - public static final String EVENTO_ID = "evento_id"; - public static final String DATA_AVISO = "data_aviso"; - public static final String DATA_EVENTO = "data_evento"; - public static final String DESCRICAO = "descricao"; - - public static final String FIELD_NAMES[] = new String[]{ - TIPO, EMPRESA, ESTABELECIMENTO, TRABALHADOR, EVENTO_ID, DATA_AVISO, DATA_EVENTO, - DESCRICAO, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, TIPO, EMPRESA, ESTABELECIMENTO, TRABALHADOR, EVENTO_ID, DATA_AVISO, DATA_EVENTO, - DESCRICAO, }; - - private HashMap dataHash; - - public AvisoData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return Aviso.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/AvisoID.java b/trunk/SIPRPSoft/src/siprp/data/AvisoID.java deleted file mode 100644 index c7f0b9d4..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/AvisoID.java +++ /dev/null @@ -1,22 +0,0 @@ -/* -* AvisoID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on 13/Out/2004 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class AvisoID extends IntegerID -{ - public AvisoID() - { - } - - public AvisoID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/BaseObject.java b/trunk/SIPRPSoft/src/siprp/data/BaseObject.java new file mode 100644 index 00000000..9b1177b6 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/BaseObject.java @@ -0,0 +1,45 @@ +package siprp.data; + +import java.text.DateFormat; +import java.util.LinkedList; +import java.util.List; +import java.util.Locale; + +import siprp.database.cayenne.providers.MainDAO; + +import com.evolute.entity.evo.EvoDataException; +import com.evolute.entity.evo.EvoDataObject; +import com.evolute.utils.strings.UnicodeChecker; + +public abstract class BaseObject extends EvoDataObject +{ + + static + { + UnicodeChecker.setUseDoubleSlash( true ); + } + + private static final long serialVersionUID = 1L; + + protected static MainDAO dao = new MainDAO(); + + public static final DateFormat DATE_FORMAT = DateFormat.getDateInstance( DateFormat.SHORT, new Locale( "pt", "PT" ) ); + + protected static final String isNewMessage = " "; + + @Override + protected List fromReference(Class clazz, Integer id, String referingProperty, String... order) throws EvoDataException + { + List result = new LinkedList(); + for( Object o : super.fromReference(clazz, id, referingProperty, order) ) + { + Object value = ((EvoDataObject)o).get("deleted_date"); + if( value == null ) + { + result.add( o ); + } + } + return result; + } + +} diff --git a/trunk/SIPRPSoft/src/siprp/data/Contacto.java b/trunk/SIPRPSoft/src/siprp/data/Contacto.java deleted file mode 100644 index 4fa841b0..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/Contacto.java +++ /dev/null @@ -1,151 +0,0 @@ -/* -* Contacto.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on 13/Out/2004 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class Contacto implements JDOInnerObject -{ - private Integer id; - private String nome; - private String cargo; - private String telefone; - private String telemovel; - private String fax; - private String email; - - public Contacto() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == ContactoData.ID ) - { - return id; - } - else if( fieldName == ContactoData.NOME ) - { - return nome; - } - else if( fieldName == ContactoData.CARGO ) - { - return cargo; - } - else if( fieldName == ContactoData.TELEFONE ) - { - return telefone; - } - else if( fieldName == ContactoData.TELEMOVEL ) - { - return telemovel; - } - else if( fieldName == ContactoData.FAX ) - { - return fax; - } - else if( fieldName == ContactoData.EMAIL ) - { - return email; - } - else if( fieldName.equals( ContactoData.ID ) ) - { - return id; - } - else if( fieldName.equals( ContactoData.NOME ) ) - { - return nome; - } - else if( fieldName.equals( ContactoData.CARGO ) ) - { - return cargo; - } - else if( fieldName.equals( ContactoData.TELEFONE ) ) - { - return telefone; - } - else if( fieldName.equals( ContactoData.TELEMOVEL ) ) - { - return telemovel; - } - else if( fieldName.equals( ContactoData.FAX ) ) - { - return fax; - } - else if( fieldName.equals( ContactoData.EMAIL ) ) - { - return email; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == ContactoData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == ContactoData.NOME ) - { - nome = ( String ) value; - } - else if( fieldName == ContactoData.CARGO ) - { - cargo = ( String ) value; - } - else if( fieldName == ContactoData.TELEFONE ) - { - telefone = ( String ) value; - } - else if( fieldName == ContactoData.TELEMOVEL ) - { - telemovel = ( String ) value; - } - else if( fieldName == ContactoData.FAX ) - { - fax = ( String ) value; - } - else if( fieldName == ContactoData.EMAIL ) - { - email = ( String ) value; - } - else if( fieldName.equals( ContactoData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( ContactoData.NOME ) ) - { - nome = ( String ) value; - } - else if( fieldName.equals( ContactoData.CARGO ) ) - { - cargo = ( String ) value; - } - else if( fieldName.equals( ContactoData.TELEFONE ) ) - { - telefone = ( String ) value; - } - else if( fieldName.equals( ContactoData.TELEMOVEL ) ) - { - telemovel = ( String ) value; - } - else if( fieldName.equals( ContactoData.FAX ) ) - { - fax = ( String ) value; - } - else if( fieldName.equals( ContactoData.EMAIL ) ) - { - email = ( String ) value; - } - } - - public Class getOuterClass() - { - return ContactoData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/ContactoData.java b/trunk/SIPRPSoft/src/siprp/data/ContactoData.java deleted file mode 100644 index 5e06d014..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/ContactoData.java +++ /dev/null @@ -1,64 +0,0 @@ -/* -* ContactoData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on 13/Out/2004 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.util.HashMap; - -import com.evolute.utils.jdo.JDOObject; - -public final class ContactoData extends JDOObject -{ - public static final String ID = "id"; - public static final String NOME = "nome"; - public static final String CARGO = "cargo"; - public static final String TELEFONE = "telefone"; - public static final String TELEMOVEL = "telemovel"; - public static final String FAX = "fax"; - public static final String EMAIL = "email"; - - public static final String FIELD_NAMES[] = new String[]{ - NOME, CARGO, TELEFONE, TELEMOVEL, FAX, EMAIL, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, NOME, CARGO, TELEFONE, TELEMOVEL, FAX, EMAIL, }; - - private HashMap dataHash; - - public ContactoData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return Contacto.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/ContactoID.java b/trunk/SIPRPSoft/src/siprp/data/ContactoID.java deleted file mode 100644 index 52eb7936..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/ContactoID.java +++ /dev/null @@ -1,22 +0,0 @@ -/* -* ContactoID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on 13/Out/2004 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class ContactoID extends IntegerID -{ - public ContactoID() - { - } - - public ContactoID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/DisableDeleteHandler.java b/trunk/SIPRPSoft/src/siprp/data/DisableDeleteHandler.java deleted file mode 100644 index 5663cd4b..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/DisableDeleteHandler.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * DeleteHandler.java - * - * Created on 11 de Outubro de 2004, 16:04 - */ - -package siprp.data; - -import com.evolute.utils.jdo.JDOObject; -import com.evolute.utils.jdo.JDOOperationHandlerInterface; - -/** - * - * @author fpalma - */ -public class DisableDeleteHandler implements JDOOperationHandlerInterface -{ - public static final DisableDeleteHandler INSTANCE = new DisableDeleteHandler(); - - /** Creates a new instance of DeleteHandler */ - public DisableDeleteHandler() - { - } - - public boolean handle( JDOObject object, int operation, int moment ) - throws Exception - { - if( !( object instanceof DisableDeleteable ) ) - { - return false; - } - switch( operation ) - { - case OP_SAVE: - return save( object, moment ); - - case OP_DELETE: - return delete( object, moment ); - - } - return false; - } - - protected boolean save( JDOObject object, int moment ) - throws Exception - { - if( moment != MOMENT_BEFORE ) - { - return false; - } - String old = (String) object.get( DisableDeleteable.INACTIVO ); - if( old == null ) - { - object.set( DisableDeleteable.INACTIVO, "n" ); - } - return true; - } - - protected boolean delete( JDOObject object, int moment ) - throws Exception - { - if( moment != MOMENT_INSTEAD ) - { - return false; - } - object.set( DisableDeleteable.INACTIVO, "y" ); - object.save(); - return true; - } - -} diff --git a/trunk/SIPRPSoft/src/siprp/data/DisableDeleteable.java b/trunk/SIPRPSoft/src/siprp/data/DisableDeleteable.java deleted file mode 100644 index b3ba4e52..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/DisableDeleteable.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * DisableDeleteable.java - * - * Created on 11 de Outubro de 2004, 16:09 - */ - -package siprp.data; - -/** - * - * @author fpalma - */ -public interface DisableDeleteable -{ - public static final String INACTIVO = "inactivo"; -} diff --git a/trunk/SIPRPSoft/src/siprp/data/Empresa.java b/trunk/SIPRPSoft/src/siprp/data/Empresa.java deleted file mode 100644 index 3f99524e..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/Empresa.java +++ /dev/null @@ -1,748 +0,0 @@ -/* -* Empresa.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on 17/Mai/2006 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.util.Date; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class Empresa implements JDOInnerObject -{ - private Integer id; - private String designacao_social; - private String designacao_social_plain; - private Integer servico_saude_tipo; - private String servico_saude_designacao; - private Integer servico_higiene_tipo; - private String servico_higiene_designacao; - private String morada; - private String codigo_postal; - private String localidade; - private String distrito; - private String concelho; - private Date data_proposta; - private Date data_aceitacao; - private Date inicio_contrato; - private Integer duracao; - private Date data_cancelamento; - private String perfil_1; - private String perfil_2; - private Date data_envio_contrato; - private Date data_recepcao_contrato; - private Date data_envio_idict; - private Date data_relatorio_anual; - private String codigo_1; - private String codigo_2; - private String codigo_3; - private String cae; - private String actividade; - private String contribuinte; - private String seguranca_social; - private Double preco_higiene; - private Double preco_medicina; - private String periodicidade; - private Contacto contacto_1; - private Contacto contacto_2; - private Integer servicos; - private String inactivo; - private Date actualizacao; - private String a_consultas; - private String a_exames; - private String b_consultas; - private String b_exames; - - public Empresa() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == EmpresaData.ID ) - { - return id; - } - else if( fieldName == EmpresaData.DESIGNACAO_SOCIAL ) - { - return designacao_social; - } - else if( fieldName == EmpresaData.DESIGNACAO_SOCIAL_PLAIN ) - { - return designacao_social_plain; - } - else if( fieldName == EmpresaData.SERVICO_SAUDE_TIPO ) - { - return servico_saude_tipo; - } - else if( fieldName == EmpresaData.SERVICO_SAUDE_DESIGNACAO ) - { - return servico_saude_designacao; - } - else if( fieldName == EmpresaData.SERVICO_HIGIENE_TIPO ) - { - return servico_higiene_tipo; - } - else if( fieldName == EmpresaData.SERVICO_HIGIENE_DESIGNACAO ) - { - return servico_higiene_designacao; - } - else if( fieldName == EmpresaData.MORADA ) - { - return morada; - } - else if( fieldName == EmpresaData.CODIGO_POSTAL ) - { - return codigo_postal; - } - else if( fieldName == EmpresaData.LOCALIDADE ) - { - return localidade; - } - else if( fieldName == EmpresaData.DISTRITO ) - { - return distrito; - } - else if( fieldName == EmpresaData.CONCELHO ) - { - return concelho; - } - else if( fieldName == EmpresaData.DATA_PROPOSTA ) - { - return data_proposta; - } - else if( fieldName == EmpresaData.DATA_ACEITACAO ) - { - return data_aceitacao; - } - else if( fieldName == EmpresaData.INICIO_CONTRATO ) - { - return inicio_contrato; - } - else if( fieldName == EmpresaData.DURACAO ) - { - return duracao; - } - else if( fieldName == EmpresaData.DATA_CANCELAMENTO ) - { - return data_cancelamento; - } - else if( fieldName == EmpresaData.PERFIL_1 ) - { - return perfil_1; - } - else if( fieldName == EmpresaData.PERFIL_2 ) - { - return perfil_2; - } - else if( fieldName == EmpresaData.DATA_ENVIO_CONTRATO ) - { - return data_envio_contrato; - } - else if( fieldName == EmpresaData.DATA_RECEPCAO_CONTRATO ) - { - return data_recepcao_contrato; - } - else if( fieldName == EmpresaData.DATA_ENVIO_IDICT ) - { - return data_envio_idict; - } - else if( fieldName == EmpresaData.DATA_RELATORIO_ANUAL ) - { - return data_relatorio_anual; - } - else if( fieldName == EmpresaData.CODIGO_1 ) - { - return codigo_1; - } - else if( fieldName == EmpresaData.CODIGO_2 ) - { - return codigo_2; - } - else if( fieldName == EmpresaData.CODIGO_3 ) - { - return codigo_3; - } - else if( fieldName == EmpresaData.CAE ) - { - return cae; - } - else if( fieldName == EmpresaData.ACTIVIDADE ) - { - return actividade; - } - else if( fieldName == EmpresaData.CONTRIBUINTE ) - { - return contribuinte; - } - else if( fieldName == EmpresaData.SEGURANCA_SOCIAL ) - { - return seguranca_social; - } - else if( fieldName == EmpresaData.PRECO_HIGIENE ) - { - return preco_higiene; - } - else if( fieldName == EmpresaData.PRECO_MEDICINA ) - { - return preco_medicina; - } - else if( fieldName == EmpresaData.PERIODICIDADE ) - { - return periodicidade; - } - else if( fieldName == EmpresaData.CONTACTO_1 ) - { - return contacto_1; - } - else if( fieldName == EmpresaData.CONTACTO_2 ) - { - return contacto_2; - } - else if( fieldName == EmpresaData.SERVICOS ) - { - return servicos; - } - else if( fieldName == EmpresaData.INACTIVO ) - { - return inactivo; - } - else if( fieldName == EmpresaData.ACTUALIZACAO ) - { - return actualizacao; - } - else if( fieldName == EmpresaData.A_CONSULTAS ) - { - return a_consultas; - } - else if( fieldName == EmpresaData.A_EXAMES ) - { - return a_exames; - } - else if( fieldName == EmpresaData.B_CONSULTAS ) - { - return b_consultas; - } - else if( fieldName == EmpresaData.B_EXAMES ) - { - return b_exames; - } - else if( fieldName.equals( EmpresaData.ID ) ) - { - return id; - } - else if( fieldName.equals( EmpresaData.DESIGNACAO_SOCIAL ) ) - { - return designacao_social; - } - else if( fieldName.equals( EmpresaData.DESIGNACAO_SOCIAL_PLAIN ) ) - { - return designacao_social_plain; - } - else if( fieldName.equals( EmpresaData.SERVICO_SAUDE_TIPO ) ) - { - return servico_saude_tipo; - } - else if( fieldName.equals( EmpresaData.SERVICO_SAUDE_DESIGNACAO ) ) - { - return servico_saude_designacao; - } - else if( fieldName.equals( EmpresaData.SERVICO_HIGIENE_TIPO ) ) - { - return servico_higiene_tipo; - } - else if( fieldName.equals( EmpresaData.SERVICO_HIGIENE_DESIGNACAO ) ) - { - return servico_higiene_designacao; - } - else if( fieldName.equals( EmpresaData.MORADA ) ) - { - return morada; - } - else if( fieldName.equals( EmpresaData.CODIGO_POSTAL ) ) - { - return codigo_postal; - } - else if( fieldName.equals( EmpresaData.LOCALIDADE ) ) - { - return localidade; - } - else if( fieldName.equals( EmpresaData.DISTRITO ) ) - { - return distrito; - } - else if( fieldName.equals( EmpresaData.CONCELHO ) ) - { - return concelho; - } - else if( fieldName.equals( EmpresaData.DATA_PROPOSTA ) ) - { - return data_proposta; - } - else if( fieldName.equals( EmpresaData.DATA_ACEITACAO ) ) - { - return data_aceitacao; - } - else if( fieldName.equals( EmpresaData.INICIO_CONTRATO ) ) - { - return inicio_contrato; - } - else if( fieldName.equals( EmpresaData.DURACAO ) ) - { - return duracao; - } - else if( fieldName.equals( EmpresaData.DATA_CANCELAMENTO ) ) - { - return data_cancelamento; - } - else if( fieldName.equals( EmpresaData.PERFIL_1 ) ) - { - return perfil_1; - } - else if( fieldName.equals( EmpresaData.PERFIL_2 ) ) - { - return perfil_2; - } - else if( fieldName.equals( EmpresaData.DATA_ENVIO_CONTRATO ) ) - { - return data_envio_contrato; - } - else if( fieldName.equals( EmpresaData.DATA_RECEPCAO_CONTRATO ) ) - { - return data_recepcao_contrato; - } - else if( fieldName.equals( EmpresaData.DATA_ENVIO_IDICT ) ) - { - return data_envio_idict; - } - else if( fieldName.equals( EmpresaData.DATA_RELATORIO_ANUAL ) ) - { - return data_relatorio_anual; - } - else if( fieldName.equals( EmpresaData.CODIGO_1 ) ) - { - return codigo_1; - } - else if( fieldName.equals( EmpresaData.CODIGO_2 ) ) - { - return codigo_2; - } - else if( fieldName.equals( EmpresaData.CODIGO_3 ) ) - { - return codigo_3; - } - else if( fieldName.equals( EmpresaData.CAE ) ) - { - return cae; - } - else if( fieldName.equals( EmpresaData.ACTIVIDADE ) ) - { - return actividade; - } - else if( fieldName.equals( EmpresaData.CONTRIBUINTE ) ) - { - return contribuinte; - } - else if( fieldName.equals( EmpresaData.SEGURANCA_SOCIAL ) ) - { - return seguranca_social; - } - else if( fieldName.equals( EmpresaData.PRECO_HIGIENE ) ) - { - return preco_higiene; - } - else if( fieldName.equals( EmpresaData.PRECO_MEDICINA ) ) - { - return preco_medicina; - } - else if( fieldName.equals( EmpresaData.PERIODICIDADE ) ) - { - return periodicidade; - } - else if( fieldName.equals( EmpresaData.CONTACTO_1 ) ) - { - return contacto_1; - } - else if( fieldName.equals( EmpresaData.CONTACTO_2 ) ) - { - return contacto_2; - } - else if( fieldName.equals( EmpresaData.SERVICOS ) ) - { - return servicos; - } - else if( fieldName.equals( EmpresaData.INACTIVO ) ) - { - return inactivo; - } - else if( fieldName.equals( EmpresaData.ACTUALIZACAO ) ) - { - return actualizacao; - } - else if( fieldName.equals( EmpresaData.A_CONSULTAS ) ) - { - return a_consultas; - } - else if( fieldName.equals( EmpresaData.A_EXAMES ) ) - { - return a_exames; - } - else if( fieldName.equals( EmpresaData.B_CONSULTAS ) ) - { - return b_consultas; - } - else if( fieldName.equals( EmpresaData.B_EXAMES ) ) - { - return b_exames; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == EmpresaData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == EmpresaData.DESIGNACAO_SOCIAL ) - { - designacao_social = ( String ) value; - } - else if( fieldName == EmpresaData.DESIGNACAO_SOCIAL_PLAIN ) - { - designacao_social_plain = ( String ) value; - } - else if( fieldName == EmpresaData.SERVICO_SAUDE_TIPO ) - { - servico_saude_tipo = ( Integer ) value; - } - else if( fieldName == EmpresaData.SERVICO_SAUDE_DESIGNACAO ) - { - servico_saude_designacao = ( String ) value; - } - else if( fieldName == EmpresaData.SERVICO_HIGIENE_TIPO ) - { - servico_higiene_tipo = ( Integer ) value; - } - else if( fieldName == EmpresaData.SERVICO_HIGIENE_DESIGNACAO ) - { - servico_higiene_designacao = ( String ) value; - } - else if( fieldName == EmpresaData.MORADA ) - { - morada = ( String ) value; - } - else if( fieldName == EmpresaData.CODIGO_POSTAL ) - { - codigo_postal = ( String ) value; - } - else if( fieldName == EmpresaData.LOCALIDADE ) - { - localidade = ( String ) value; - } - else if( fieldName == EmpresaData.DISTRITO ) - { - distrito = ( String ) value; - } - else if( fieldName == EmpresaData.CONCELHO ) - { - concelho = ( String ) value; - } - else if( fieldName == EmpresaData.DATA_PROPOSTA ) - { - data_proposta = ( Date ) value; - } - else if( fieldName == EmpresaData.DATA_ACEITACAO ) - { - data_aceitacao = ( Date ) value; - } - else if( fieldName == EmpresaData.INICIO_CONTRATO ) - { - inicio_contrato = ( Date ) value; - } - else if( fieldName == EmpresaData.DURACAO ) - { - duracao = ( Integer ) value; - } - else if( fieldName == EmpresaData.DATA_CANCELAMENTO ) - { - data_cancelamento = ( Date ) value; - } - else if( fieldName == EmpresaData.PERFIL_1 ) - { - perfil_1 = ( String ) value; - } - else if( fieldName == EmpresaData.PERFIL_2 ) - { - perfil_2 = ( String ) value; - } - else if( fieldName == EmpresaData.DATA_ENVIO_CONTRATO ) - { - data_envio_contrato = ( Date ) value; - } - else if( fieldName == EmpresaData.DATA_RECEPCAO_CONTRATO ) - { - data_recepcao_contrato = ( Date ) value; - } - else if( fieldName == EmpresaData.DATA_ENVIO_IDICT ) - { - data_envio_idict = ( Date ) value; - } - else if( fieldName == EmpresaData.DATA_RELATORIO_ANUAL ) - { - data_relatorio_anual = ( Date ) value; - } - else if( fieldName == EmpresaData.CODIGO_1 ) - { - codigo_1 = ( String ) value; - } - else if( fieldName == EmpresaData.CODIGO_2 ) - { - codigo_2 = ( String ) value; - } - else if( fieldName == EmpresaData.CODIGO_3 ) - { - codigo_3 = ( String ) value; - } - else if( fieldName == EmpresaData.CAE ) - { - cae = ( String ) value; - } - else if( fieldName == EmpresaData.ACTIVIDADE ) - { - actividade = ( String ) value; - } - else if( fieldName == EmpresaData.CONTRIBUINTE ) - { - contribuinte = ( String ) value; - } - else if( fieldName == EmpresaData.SEGURANCA_SOCIAL ) - { - seguranca_social = ( String ) value; - } - else if( fieldName == EmpresaData.PRECO_HIGIENE ) - { - preco_higiene = ( Double ) value; - } - else if( fieldName == EmpresaData.PRECO_MEDICINA ) - { - preco_medicina = ( Double ) value; - } - else if( fieldName == EmpresaData.PERIODICIDADE ) - { - periodicidade = ( String ) value; - } - else if( fieldName == EmpresaData.CONTACTO_1 ) - { - contacto_1 = ( Contacto ) value; - } - else if( fieldName == EmpresaData.CONTACTO_2 ) - { - contacto_2 = ( Contacto ) value; - } - else if( fieldName == EmpresaData.SERVICOS ) - { - servicos = ( Integer ) value; - } - else if( fieldName == EmpresaData.INACTIVO ) - { - inactivo = ( String ) value; - } - else if( fieldName == EmpresaData.ACTUALIZACAO ) - { - actualizacao = ( Date ) value; - } - else if( fieldName == EmpresaData.A_CONSULTAS ) - { - a_consultas = ( String ) value; - } - else if( fieldName == EmpresaData.A_EXAMES ) - { - a_exames = ( String ) value; - } - else if( fieldName == EmpresaData.B_CONSULTAS ) - { - b_consultas = ( String ) value; - } - else if( fieldName == EmpresaData.B_EXAMES ) - { - b_exames = ( String ) value; - } - else if( fieldName.equals( EmpresaData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( EmpresaData.DESIGNACAO_SOCIAL ) ) - { - designacao_social = ( String ) value; - } - else if( fieldName.equals( EmpresaData.DESIGNACAO_SOCIAL_PLAIN ) ) - { - designacao_social_plain = ( String ) value; - } - else if( fieldName.equals( EmpresaData.SERVICO_SAUDE_TIPO ) ) - { - servico_saude_tipo = ( Integer ) value; - } - else if( fieldName.equals( EmpresaData.SERVICO_SAUDE_DESIGNACAO ) ) - { - servico_saude_designacao = ( String ) value; - } - else if( fieldName.equals( EmpresaData.SERVICO_HIGIENE_TIPO ) ) - { - servico_higiene_tipo = ( Integer ) value; - } - else if( fieldName.equals( EmpresaData.SERVICO_HIGIENE_DESIGNACAO ) ) - { - servico_higiene_designacao = ( String ) value; - } - else if( fieldName.equals( EmpresaData.MORADA ) ) - { - morada = ( String ) value; - } - else if( fieldName.equals( EmpresaData.CODIGO_POSTAL ) ) - { - codigo_postal = ( String ) value; - } - else if( fieldName.equals( EmpresaData.LOCALIDADE ) ) - { - localidade = ( String ) value; - } - else if( fieldName.equals( EmpresaData.DISTRITO ) ) - { - distrito = ( String ) value; - } - else if( fieldName.equals( EmpresaData.CONCELHO ) ) - { - concelho = ( String ) value; - } - else if( fieldName.equals( EmpresaData.DATA_PROPOSTA ) ) - { - data_proposta = ( Date ) value; - } - else if( fieldName.equals( EmpresaData.DATA_ACEITACAO ) ) - { - data_aceitacao = ( Date ) value; - } - else if( fieldName.equals( EmpresaData.INICIO_CONTRATO ) ) - { - inicio_contrato = ( Date ) value; - } - else if( fieldName.equals( EmpresaData.DURACAO ) ) - { - duracao = ( Integer ) value; - } - else if( fieldName.equals( EmpresaData.DATA_CANCELAMENTO ) ) - { - data_cancelamento = ( Date ) value; - } - else if( fieldName.equals( EmpresaData.PERFIL_1 ) ) - { - perfil_1 = ( String ) value; - } - else if( fieldName.equals( EmpresaData.PERFIL_2 ) ) - { - perfil_2 = ( String ) value; - } - else if( fieldName.equals( EmpresaData.DATA_ENVIO_CONTRATO ) ) - { - data_envio_contrato = ( Date ) value; - } - else if( fieldName.equals( EmpresaData.DATA_RECEPCAO_CONTRATO ) ) - { - data_recepcao_contrato = ( Date ) value; - } - else if( fieldName.equals( EmpresaData.DATA_ENVIO_IDICT ) ) - { - data_envio_idict = ( Date ) value; - } - else if( fieldName.equals( EmpresaData.DATA_RELATORIO_ANUAL ) ) - { - data_relatorio_anual = ( Date ) value; - } - else if( fieldName.equals( EmpresaData.CODIGO_1 ) ) - { - codigo_1 = ( String ) value; - } - else if( fieldName.equals( EmpresaData.CODIGO_2 ) ) - { - codigo_2 = ( String ) value; - } - else if( fieldName.equals( EmpresaData.CODIGO_3 ) ) - { - codigo_3 = ( String ) value; - } - else if( fieldName.equals( EmpresaData.CAE ) ) - { - cae = ( String ) value; - } - else if( fieldName.equals( EmpresaData.ACTIVIDADE ) ) - { - actividade = ( String ) value; - } - else if( fieldName.equals( EmpresaData.CONTRIBUINTE ) ) - { - contribuinte = ( String ) value; - } - else if( fieldName.equals( EmpresaData.SEGURANCA_SOCIAL ) ) - { - seguranca_social = ( String ) value; - } - else if( fieldName.equals( EmpresaData.PRECO_HIGIENE ) ) - { - preco_higiene = ( Double ) value; - } - else if( fieldName.equals( EmpresaData.PRECO_MEDICINA ) ) - { - preco_medicina = ( Double ) value; - } - else if( fieldName.equals( EmpresaData.PERIODICIDADE ) ) - { - periodicidade = ( String ) value; - } - else if( fieldName.equals( EmpresaData.CONTACTO_1 ) ) - { - contacto_1 = ( Contacto ) value; - } - else if( fieldName.equals( EmpresaData.CONTACTO_2 ) ) - { - contacto_2 = ( Contacto ) value; - } - else if( fieldName.equals( EmpresaData.SERVICOS ) ) - { - servicos = ( Integer ) value; - } - else if( fieldName.equals( EmpresaData.INACTIVO ) ) - { - inactivo = ( String ) value; - } - else if( fieldName.equals( EmpresaData.ACTUALIZACAO ) ) - { - actualizacao = ( Date ) value; - } - else if( fieldName.equals( EmpresaData.A_CONSULTAS ) ) - { - a_consultas = ( String ) value; - } - else if( fieldName.equals( EmpresaData.A_EXAMES ) ) - { - a_exames = ( String ) value; - } - else if( fieldName.equals( EmpresaData.B_CONSULTAS ) ) - { - b_consultas = ( String ) value; - } - else if( fieldName.equals( EmpresaData.B_EXAMES ) ) - { - b_exames = ( String ) value; - } - } - - public Class getOuterClass() - { - return EmpresaData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/EmpresaData.java b/trunk/SIPRPSoft/src/siprp/data/EmpresaData.java deleted file mode 100644 index 6a21a31e..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/EmpresaData.java +++ /dev/null @@ -1,115 +0,0 @@ -/* -* EmpresaData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on 17/Mai/2006 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.util.HashMap; - -import com.evolute.utils.jdo.JDOObject; - -public final class EmpresaData extends JDOObject - implements DisableDeleteable, ActualizacaoSaveable -{ - public static final String ID = "id"; - public static final String DESIGNACAO_SOCIAL = "designacao_social"; - public static final String DESIGNACAO_SOCIAL_PLAIN = "designacao_social_plain"; - public static final String SERVICO_SAUDE_TIPO = "servico_saude_tipo"; - public static final String SERVICO_SAUDE_DESIGNACAO = "servico_saude_designacao"; - public static final String SERVICO_HIGIENE_TIPO = "servico_higiene_tipo"; - public static final String SERVICO_HIGIENE_DESIGNACAO = "servico_higiene_designacao"; - public static final String MORADA = "morada"; - public static final String CODIGO_POSTAL = "codigo_postal"; - public static final String LOCALIDADE = "localidade"; - public static final String DISTRITO = "distrito"; - public static final String CONCELHO = "concelho"; - public static final String DATA_PROPOSTA = "data_proposta"; - public static final String DATA_ACEITACAO = "data_aceitacao"; - public static final String INICIO_CONTRATO = "inicio_contrato"; - public static final String DURACAO = "duracao"; - public static final String DATA_CANCELAMENTO = "data_cancelamento"; - public static final String PERFIL_1 = "perfil_1"; - public static final String PERFIL_2 = "perfil_2"; - public static final String DATA_ENVIO_CONTRATO = "data_envio_contrato"; - public static final String DATA_RECEPCAO_CONTRATO = "data_recepcao_contrato"; - public static final String DATA_ENVIO_IDICT = "data_envio_idict"; - public static final String DATA_RELATORIO_ANUAL = "data_relatorio_anual"; - public static final String CODIGO_1 = "codigo_1"; - public static final String CODIGO_2 = "codigo_2"; - public static final String CODIGO_3 = "codigo_3"; - public static final String CAE = "cae"; - public static final String ACTIVIDADE = "actividade"; - public static final String CONTRIBUINTE = "contribuinte"; - public static final String SEGURANCA_SOCIAL = "seguranca_social"; - public static final String PRECO_HIGIENE = "preco_higiene"; - public static final String PRECO_MEDICINA = "preco_medicina"; - public static final String PERIODICIDADE = "periodicidade"; - public static final String CONTACTO_1 = "contacto_1"; - public static final String CONTACTO_2 = "contacto_2"; - public static final String SERVICOS = "servicos"; - public static final String INACTIVO = "inactivo"; - public static final String ACTUALIZACAO = "actualizacao"; - public static final String A_CONSULTAS = "a_consultas"; - public static final String A_EXAMES = "a_exames"; - public static final String B_CONSULTAS = "b_consultas"; - public static final String B_EXAMES = "b_exames"; - - public static final String FIELD_NAMES[] = new String[]{ - DESIGNACAO_SOCIAL, DESIGNACAO_SOCIAL_PLAIN, SERVICO_SAUDE_TIPO, - SERVICO_SAUDE_DESIGNACAO, SERVICO_HIGIENE_TIPO, SERVICO_HIGIENE_DESIGNACAO, - MORADA, CODIGO_POSTAL, LOCALIDADE, DISTRITO, CONCELHO, DATA_PROPOSTA, - DATA_ACEITACAO, INICIO_CONTRATO, DURACAO, DATA_CANCELAMENTO, PERFIL_1, PERFIL_2, - DATA_ENVIO_CONTRATO, DATA_RECEPCAO_CONTRATO, DATA_ENVIO_IDICT, - DATA_RELATORIO_ANUAL, CODIGO_1, CODIGO_2, CODIGO_3, CAE, ACTIVIDADE, CONTRIBUINTE, - SEGURANCA_SOCIAL, PRECO_HIGIENE, PRECO_MEDICINA, PERIODICIDADE, CONTACTO_1, - CONTACTO_2, SERVICOS, A_CONSULTAS, A_EXAMES, B_CONSULTAS, B_EXAMES, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, DESIGNACAO_SOCIAL, DESIGNACAO_SOCIAL_PLAIN, SERVICO_SAUDE_TIPO, - SERVICO_SAUDE_DESIGNACAO, SERVICO_HIGIENE_TIPO, SERVICO_HIGIENE_DESIGNACAO, - MORADA, CODIGO_POSTAL, LOCALIDADE, DISTRITO, CONCELHO, DATA_PROPOSTA, - DATA_ACEITACAO, INICIO_CONTRATO, DURACAO, DATA_CANCELAMENTO, PERFIL_1, PERFIL_2, - DATA_ENVIO_CONTRATO, DATA_RECEPCAO_CONTRATO, DATA_ENVIO_IDICT, - DATA_RELATORIO_ANUAL, CODIGO_1, CODIGO_2, CODIGO_3, CAE, ACTIVIDADE, CONTRIBUINTE, - SEGURANCA_SOCIAL, PRECO_HIGIENE, PRECO_MEDICINA, PERIODICIDADE, CONTACTO_1, - CONTACTO_2, SERVICOS, INACTIVO, ACTUALIZACAO, A_CONSULTAS, A_EXAMES, B_CONSULTAS, - B_EXAMES, }; - - private HashMap dataHash; - - public EmpresaData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return Empresa.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/EmpresaID.java b/trunk/SIPRPSoft/src/siprp/data/EmpresaID.java deleted file mode 100644 index 03737a85..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/EmpresaID.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -* EmpresaID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on 17/Mai/2006 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.io.Serializable; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class EmpresaID extends IntegerID - implements Serializable -{ - public EmpresaID() - { - } - - public EmpresaID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/Estabelecimento.java b/trunk/SIPRPSoft/src/siprp/data/Estabelecimento.java deleted file mode 100644 index 1c526df3..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/Estabelecimento.java +++ /dev/null @@ -1,255 +0,0 @@ -/* -* Estabelecimento.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on 24/Nov/2005 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.util.Date; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class Estabelecimento implements JDOInnerObject -{ - private Integer id; - private String nome; - private String nome_plain; - private String morada; - private String codigo_postal; - private String localidade; - private String historico; - private Empresa empresa; - private Contacto contacto; - private String inactivo; - private Date actualizacao; - private Integer prestador_consulta_id; - private Integer prestador_ecds_id; - - public Estabelecimento() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == EstabelecimentoData.ID ) - { - return id; - } - else if( fieldName == EstabelecimentoData.NOME ) - { - return nome; - } - else if( fieldName == EstabelecimentoData.NOME_PLAIN ) - { - return nome_plain; - } - else if( fieldName == EstabelecimentoData.MORADA ) - { - return morada; - } - else if( fieldName == EstabelecimentoData.CODIGO_POSTAL ) - { - return codigo_postal; - } - else if( fieldName == EstabelecimentoData.LOCALIDADE ) - { - return localidade; - } - else if( fieldName == EstabelecimentoData.HISTORICO ) - { - return historico; - } - else if( fieldName == EstabelecimentoData.EMPRESA ) - { - return empresa; - } - else if( fieldName == EstabelecimentoData.CONTACTO ) - { - return contacto; - } - else if( fieldName == EstabelecimentoData.INACTIVO ) - { - return inactivo; - } - else if( fieldName == EstabelecimentoData.ACTUALIZACAO ) - { - return actualizacao; - } - else if( fieldName == EstabelecimentoData.PRESTADOR_CONSULTA_ID ) - { - return prestador_consulta_id; - } - else if( fieldName == EstabelecimentoData.PRESTADOR_ECDS_ID ) - { - return prestador_ecds_id; - } - else if( fieldName.equals( EstabelecimentoData.ID ) ) - { - return id; - } - else if( fieldName.equals( EstabelecimentoData.NOME ) ) - { - return nome; - } - else if( fieldName.equals( EstabelecimentoData.NOME_PLAIN ) ) - { - return nome_plain; - } - else if( fieldName.equals( EstabelecimentoData.MORADA ) ) - { - return morada; - } - else if( fieldName.equals( EstabelecimentoData.CODIGO_POSTAL ) ) - { - return codigo_postal; - } - else if( fieldName.equals( EstabelecimentoData.LOCALIDADE ) ) - { - return localidade; - } - else if( fieldName.equals( EstabelecimentoData.HISTORICO ) ) - { - return historico; - } - else if( fieldName.equals( EstabelecimentoData.EMPRESA ) ) - { - return empresa; - } - else if( fieldName.equals( EstabelecimentoData.CONTACTO ) ) - { - return contacto; - } - else if( fieldName.equals( EstabelecimentoData.INACTIVO ) ) - { - return inactivo; - } - else if( fieldName.equals( EstabelecimentoData.ACTUALIZACAO ) ) - { - return actualizacao; - } - else if( fieldName.equals( EstabelecimentoData.PRESTADOR_CONSULTA_ID ) ) - { - return prestador_consulta_id; - } - else if( fieldName.equals( EstabelecimentoData.PRESTADOR_ECDS_ID ) ) - { - return prestador_ecds_id; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == EstabelecimentoData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == EstabelecimentoData.NOME ) - { - nome = ( String ) value; - } - else if( fieldName == EstabelecimentoData.NOME_PLAIN ) - { - nome_plain = ( String ) value; - } - else if( fieldName == EstabelecimentoData.MORADA ) - { - morada = ( String ) value; - } - else if( fieldName == EstabelecimentoData.CODIGO_POSTAL ) - { - codigo_postal = ( String ) value; - } - else if( fieldName == EstabelecimentoData.LOCALIDADE ) - { - localidade = ( String ) value; - } - else if( fieldName == EstabelecimentoData.HISTORICO ) - { - historico = ( String ) value; - } - else if( fieldName == EstabelecimentoData.EMPRESA ) - { - empresa = ( Empresa ) value; - } - else if( fieldName == EstabelecimentoData.CONTACTO ) - { - contacto = ( Contacto ) value; - } - else if( fieldName == EstabelecimentoData.INACTIVO ) - { - inactivo = ( String ) value; - } - else if( fieldName == EstabelecimentoData.ACTUALIZACAO ) - { - actualizacao = ( Date ) value; - } - else if( fieldName == EstabelecimentoData.PRESTADOR_CONSULTA_ID ) - { - prestador_consulta_id = ( Integer ) value; - } - else if( fieldName == EstabelecimentoData.PRESTADOR_ECDS_ID ) - { - prestador_ecds_id = ( Integer ) value; - } - else if( fieldName.equals( EstabelecimentoData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( EstabelecimentoData.NOME ) ) - { - nome = ( String ) value; - } - else if( fieldName.equals( EstabelecimentoData.NOME_PLAIN ) ) - { - nome_plain = ( String ) value; - } - else if( fieldName.equals( EstabelecimentoData.MORADA ) ) - { - morada = ( String ) value; - } - else if( fieldName.equals( EstabelecimentoData.CODIGO_POSTAL ) ) - { - codigo_postal = ( String ) value; - } - else if( fieldName.equals( EstabelecimentoData.LOCALIDADE ) ) - { - localidade = ( String ) value; - } - else if( fieldName.equals( EstabelecimentoData.HISTORICO ) ) - { - historico = ( String ) value; - } - else if( fieldName.equals( EstabelecimentoData.EMPRESA ) ) - { - empresa = ( Empresa ) value; - } - else if( fieldName.equals( EstabelecimentoData.CONTACTO ) ) - { - contacto = ( Contacto ) value; - } - else if( fieldName.equals( EstabelecimentoData.INACTIVO ) ) - { - inactivo = ( String ) value; - } - else if( fieldName.equals( EstabelecimentoData.ACTUALIZACAO ) ) - { - actualizacao = ( Date ) value; - } - else if( fieldName.equals( EstabelecimentoData.PRESTADOR_CONSULTA_ID ) ) - { - prestador_consulta_id = ( Integer ) value; - } - else if( fieldName.equals( EstabelecimentoData.PRESTADOR_ECDS_ID ) ) - { - prestador_ecds_id = ( Integer ) value; - } - } - - public Class getOuterClass() - { - return EstabelecimentoData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/EstabelecimentoData.java b/trunk/SIPRPSoft/src/siprp/data/EstabelecimentoData.java deleted file mode 100644 index 6df56420..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/EstabelecimentoData.java +++ /dev/null @@ -1,72 +0,0 @@ -/* -* EstabelecimentoData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on 24/Nov/2005 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.util.HashMap; - -import com.evolute.utils.jdo.JDOObject; - -public final class EstabelecimentoData extends JDOObject - implements DisableDeleteable, ActualizacaoSaveable -{ - public static final String ID = "id"; - public static final String NOME = "nome"; - public static final String NOME_PLAIN = "nome_plain"; - public static final String MORADA = "morada"; - public static final String CODIGO_POSTAL = "codigo_postal"; - public static final String LOCALIDADE = "localidade"; - public static final String HISTORICO = "historico"; - public static final String EMPRESA = "empresa"; - public static final String CONTACTO = "contacto"; - public static final String INACTIVO = "inactivo"; - public static final String ACTUALIZACAO = "actualizacao"; - public static final String PRESTADOR_CONSULTA_ID = "prestador_consulta_id"; - public static final String PRESTADOR_ECDS_ID = "prestador_ecds_id"; - - public static final String FIELD_NAMES[] = new String[]{ - NOME, NOME_PLAIN, MORADA, CODIGO_POSTAL, LOCALIDADE, HISTORICO, EMPRESA, CONTACTO, PRESTADOR_CONSULTA_ID, PRESTADOR_ECDS_ID }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, NOME, NOME_PLAIN, MORADA, CODIGO_POSTAL, LOCALIDADE, HISTORICO, EMPRESA, CONTACTO, - PRESTADOR_CONSULTA_ID, PRESTADOR_ECDS_ID, INACTIVO, ACTUALIZACAO, }; - - private HashMap dataHash; - - public EstabelecimentoData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return Estabelecimento.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/EstabelecimentoID.java b/trunk/SIPRPSoft/src/siprp/data/EstabelecimentoID.java deleted file mode 100644 index fb87c386..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/EstabelecimentoID.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -* EstabelecimentoID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on 24/Nov/2005 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.io.Serializable; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class EstabelecimentoID extends IntegerID - implements Serializable -{ - public EstabelecimentoID() - { - } - - public EstabelecimentoID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/Etiqueta.java b/trunk/SIPRPSoft/src/siprp/data/Etiqueta.java deleted file mode 100644 index 86592fbd..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/Etiqueta.java +++ /dev/null @@ -1,270 +0,0 @@ -/* -* Etiqueta.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on 27/Fev/2006 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class Etiqueta implements JDOInnerObject -{ - private Integer id; - private String descricao; - private String descricao_plain; - private Double altura; - private Double largura; - private Double margem_esquerda; - private Double margem_cima; - private Integer colunas; - private Integer linhas; - private String continua; - private Double altura_folha; - private Double largura_folha; - private Double margem_vertical_folha; - private Double margem_horizontal_folha; - - public Etiqueta() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == EtiquetaData.ID ) - { - return id; - } - else if( fieldName == EtiquetaData.DESCRICAO ) - { - return descricao; - } - else if( fieldName == EtiquetaData.DESCRICAO_PLAIN ) - { - return descricao_plain; - } - else if( fieldName == EtiquetaData.ALTURA ) - { - return altura; - } - else if( fieldName == EtiquetaData.LARGURA ) - { - return largura; - } - else if( fieldName == EtiquetaData.MARGEM_ESQUERDA ) - { - return margem_esquerda; - } - else if( fieldName == EtiquetaData.MARGEM_CIMA ) - { - return margem_cima; - } - else if( fieldName == EtiquetaData.COLUNAS ) - { - return colunas; - } - else if( fieldName == EtiquetaData.LINHAS ) - { - return linhas; - } - else if( fieldName == EtiquetaData.CONTINUA ) - { - return continua; - } - else if( fieldName == EtiquetaData.ALTURA_FOLHA ) - { - return altura_folha; - } - else if( fieldName == EtiquetaData.LARGURA_FOLHA ) - { - return largura_folha; - } - else if( fieldName == EtiquetaData.MARGEM_VERTICAL_FOLHA ) - { - return margem_vertical_folha; - } - else if( fieldName == EtiquetaData.MARGEM_HORIZONTAL_FOLHA ) - { - return margem_horizontal_folha; - } - else if( fieldName.equals( EtiquetaData.ID ) ) - { - return id; - } - else if( fieldName.equals( EtiquetaData.DESCRICAO ) ) - { - return descricao; - } - else if( fieldName.equals( EtiquetaData.DESCRICAO_PLAIN ) ) - { - return descricao_plain; - } - else if( fieldName.equals( EtiquetaData.ALTURA ) ) - { - return altura; - } - else if( fieldName.equals( EtiquetaData.LARGURA ) ) - { - return largura; - } - else if( fieldName.equals( EtiquetaData.MARGEM_ESQUERDA ) ) - { - return margem_esquerda; - } - else if( fieldName.equals( EtiquetaData.MARGEM_CIMA ) ) - { - return margem_cima; - } - else if( fieldName.equals( EtiquetaData.COLUNAS ) ) - { - return colunas; - } - else if( fieldName.equals( EtiquetaData.LINHAS ) ) - { - return linhas; - } - else if( fieldName.equals( EtiquetaData.CONTINUA ) ) - { - return continua; - } - else if( fieldName.equals( EtiquetaData.ALTURA_FOLHA ) ) - { - return altura_folha; - } - else if( fieldName.equals( EtiquetaData.LARGURA_FOLHA ) ) - { - return largura_folha; - } - else if( fieldName.equals( EtiquetaData.MARGEM_VERTICAL_FOLHA ) ) - { - return margem_vertical_folha; - } - else if( fieldName.equals( EtiquetaData.MARGEM_HORIZONTAL_FOLHA ) ) - { - return margem_horizontal_folha; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == EtiquetaData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == EtiquetaData.DESCRICAO ) - { - descricao = ( String ) value; - } - else if( fieldName == EtiquetaData.DESCRICAO_PLAIN ) - { - descricao_plain = ( String ) value; - } - else if( fieldName == EtiquetaData.ALTURA ) - { - altura = ( Double ) value; - } - else if( fieldName == EtiquetaData.LARGURA ) - { - largura = ( Double ) value; - } - else if( fieldName == EtiquetaData.MARGEM_ESQUERDA ) - { - margem_esquerda = ( Double ) value; - } - else if( fieldName == EtiquetaData.MARGEM_CIMA ) - { - margem_cima = ( Double ) value; - } - else if( fieldName == EtiquetaData.COLUNAS ) - { - colunas = ( Integer ) value; - } - else if( fieldName == EtiquetaData.LINHAS ) - { - linhas = ( Integer ) value; - } - else if( fieldName == EtiquetaData.CONTINUA ) - { - continua = ( String ) value; - } - else if( fieldName == EtiquetaData.ALTURA_FOLHA ) - { - altura_folha = ( Double ) value; - } - else if( fieldName == EtiquetaData.LARGURA_FOLHA ) - { - largura_folha = ( Double ) value; - } - else if( fieldName == EtiquetaData.MARGEM_VERTICAL_FOLHA ) - { - margem_vertical_folha = ( Double ) value; - } - else if( fieldName == EtiquetaData.MARGEM_HORIZONTAL_FOLHA ) - { - margem_horizontal_folha = ( Double ) value; - } - else if( fieldName.equals( EtiquetaData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( EtiquetaData.DESCRICAO ) ) - { - descricao = ( String ) value; - } - else if( fieldName.equals( EtiquetaData.DESCRICAO_PLAIN ) ) - { - descricao_plain = ( String ) value; - } - else if( fieldName.equals( EtiquetaData.ALTURA ) ) - { - altura = ( Double ) value; - } - else if( fieldName.equals( EtiquetaData.LARGURA ) ) - { - largura = ( Double ) value; - } - else if( fieldName.equals( EtiquetaData.MARGEM_ESQUERDA ) ) - { - margem_esquerda = ( Double ) value; - } - else if( fieldName.equals( EtiquetaData.MARGEM_CIMA ) ) - { - margem_cima = ( Double ) value; - } - else if( fieldName.equals( EtiquetaData.COLUNAS ) ) - { - colunas = ( Integer ) value; - } - else if( fieldName.equals( EtiquetaData.LINHAS ) ) - { - linhas = ( Integer ) value; - } - else if( fieldName.equals( EtiquetaData.CONTINUA ) ) - { - continua = ( String ) value; - } - else if( fieldName.equals( EtiquetaData.ALTURA_FOLHA ) ) - { - altura_folha = ( Double ) value; - } - else if( fieldName.equals( EtiquetaData.LARGURA_FOLHA ) ) - { - largura_folha = ( Double ) value; - } - else if( fieldName.equals( EtiquetaData.MARGEM_VERTICAL_FOLHA ) ) - { - margem_vertical_folha = ( Double ) value; - } - else if( fieldName.equals( EtiquetaData.MARGEM_HORIZONTAL_FOLHA ) ) - { - margem_horizontal_folha = ( Double ) value; - } - } - - public Class getOuterClass() - { - return EtiquetaData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/EtiquetaData.java b/trunk/SIPRPSoft/src/siprp/data/EtiquetaData.java deleted file mode 100644 index 72f27f05..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/EtiquetaData.java +++ /dev/null @@ -1,75 +0,0 @@ -/* -* EtiquetaData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on 27/Fev/2006 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.util.HashMap; - -import com.evolute.utils.jdo.JDOObject; - -public final class EtiquetaData extends JDOObject -{ - public static final String ID = "id"; - public static final String DESCRICAO = "descricao"; - public static final String DESCRICAO_PLAIN = "descricao_plain"; - public static final String ALTURA = "altura"; - public static final String LARGURA = "largura"; - public static final String MARGEM_ESQUERDA = "margem_esquerda"; - public static final String MARGEM_CIMA = "margem_cima"; - public static final String COLUNAS = "colunas"; - public static final String LINHAS = "linhas"; - public static final String CONTINUA = "continua"; - public static final String ALTURA_FOLHA = "altura_folha"; - public static final String LARGURA_FOLHA = "largura_folha"; - public static final String MARGEM_VERTICAL_FOLHA = "margem_vertical_folha"; - public static final String MARGEM_HORIZONTAL_FOLHA = "margem_horizontal_folha"; - - public static final String FIELD_NAMES[] = new String[]{ - DESCRICAO, DESCRICAO_PLAIN, ALTURA, LARGURA, MARGEM_ESQUERDA, MARGEM_CIMA, COLUNAS, - LINHAS, CONTINUA, ALTURA_FOLHA, LARGURA_FOLHA, MARGEM_VERTICAL_FOLHA, - MARGEM_HORIZONTAL_FOLHA, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, DESCRICAO, DESCRICAO_PLAIN, ALTURA, LARGURA, MARGEM_ESQUERDA, MARGEM_CIMA, - COLUNAS, LINHAS, CONTINUA, ALTURA_FOLHA, LARGURA_FOLHA, MARGEM_VERTICAL_FOLHA, - MARGEM_HORIZONTAL_FOLHA, }; - - private HashMap dataHash; - - public EtiquetaData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return Etiqueta.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/EtiquetaID.java b/trunk/SIPRPSoft/src/siprp/data/EtiquetaID.java deleted file mode 100644 index 1b2b80c6..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/EtiquetaID.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -* EtiquetaID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on 27/Fev/2006 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.io.Serializable; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class EtiquetaID extends IntegerID - implements Serializable -{ - public EtiquetaID() - { - } - - public EtiquetaID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/Exame.java b/trunk/SIPRPSoft/src/siprp/data/Exame.java deleted file mode 100644 index 95b49286..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/Exame.java +++ /dev/null @@ -1,323 +0,0 @@ -/* -* Exame.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on 28/Jan/2005 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.util.Date; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class Exame implements JDOInnerObject -{ - private Integer id; - private Date data; - private Integer tipo; - private Integer ocasional; - private String outro_tipo; - private Integer resultado; - private String outra_funcao_1; - private String outra_funcao_2; - private String outra_funcao_3; - private String outra_funcao_4; - private Date proximo_exame; - private String outras_recomendacoes; - private Trabalhador trabalhador; - private Medico medico; - private byte[] pdf; - private byte[] fo; - private String inactivo; - - public Exame() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == ExameData.ID ) - { - return id; - } - else if( fieldName == ExameData.DATA ) - { - return data; - } - else if( fieldName == ExameData.TIPO ) - { - return tipo; - } - else if( fieldName == ExameData.OCASIONAL ) - { - return ocasional; - } - else if( fieldName == ExameData.OUTRO_TIPO ) - { - return outro_tipo; - } - else if( fieldName == ExameData.RESULTADO ) - { - return resultado; - } - else if( fieldName == ExameData.OUTRA_FUNCAO_1 ) - { - return outra_funcao_1; - } - else if( fieldName == ExameData.OUTRA_FUNCAO_2 ) - { - return outra_funcao_2; - } - else if( fieldName == ExameData.OUTRA_FUNCAO_3 ) - { - return outra_funcao_3; - } - else if( fieldName == ExameData.OUTRA_FUNCAO_4 ) - { - return outra_funcao_4; - } - else if( fieldName == ExameData.PROXIMO_EXAME ) - { - return proximo_exame; - } - else if( fieldName == ExameData.OUTRAS_RECOMENDACOES ) - { - return outras_recomendacoes; - } - else if( fieldName == ExameData.TRABALHADOR ) - { - return trabalhador; - } - else if( fieldName == ExameData.MEDICO ) - { - return medico; - } - else if( fieldName == ExameData.PDF ) - { - return pdf; - } - else if( fieldName == ExameData.FO ) - { - return fo; - } - else if( fieldName == ExameData.INACTIVO ) - { - return inactivo; - } - else if( fieldName.equals( ExameData.ID ) ) - { - return id; - } - else if( fieldName.equals( ExameData.DATA ) ) - { - return data; - } - else if( fieldName.equals( ExameData.TIPO ) ) - { - return tipo; - } - else if( fieldName.equals( ExameData.OCASIONAL ) ) - { - return ocasional; - } - else if( fieldName.equals( ExameData.OUTRO_TIPO ) ) - { - return outro_tipo; - } - else if( fieldName.equals( ExameData.RESULTADO ) ) - { - return resultado; - } - else if( fieldName.equals( ExameData.OUTRA_FUNCAO_1 ) ) - { - return outra_funcao_1; - } - else if( fieldName.equals( ExameData.OUTRA_FUNCAO_2 ) ) - { - return outra_funcao_2; - } - else if( fieldName.equals( ExameData.OUTRA_FUNCAO_3 ) ) - { - return outra_funcao_3; - } - else if( fieldName.equals( ExameData.OUTRA_FUNCAO_4 ) ) - { - return outra_funcao_4; - } - else if( fieldName.equals( ExameData.PROXIMO_EXAME ) ) - { - return proximo_exame; - } - else if( fieldName.equals( ExameData.OUTRAS_RECOMENDACOES ) ) - { - return outras_recomendacoes; - } - else if( fieldName.equals( ExameData.TRABALHADOR ) ) - { - return trabalhador; - } - else if( fieldName.equals( ExameData.MEDICO ) ) - { - return medico; - } - else if( fieldName.equals( ExameData.PDF ) ) - { - return pdf; - } - else if( fieldName.equals( ExameData.FO ) ) - { - return fo; - } - else if( fieldName.equals( ExameData.INACTIVO ) ) - { - return inactivo; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == ExameData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == ExameData.DATA ) - { - data = ( Date ) value; - } - else if( fieldName == ExameData.TIPO ) - { - tipo = ( Integer ) value; - } - else if( fieldName == ExameData.OCASIONAL ) - { - ocasional = ( Integer ) value; - } - else if( fieldName == ExameData.OUTRO_TIPO ) - { - outro_tipo = ( String ) value; - } - else if( fieldName == ExameData.RESULTADO ) - { - resultado = ( Integer ) value; - } - else if( fieldName == ExameData.OUTRA_FUNCAO_1 ) - { - outra_funcao_1 = ( String ) value; - } - else if( fieldName == ExameData.OUTRA_FUNCAO_2 ) - { - outra_funcao_2 = ( String ) value; - } - else if( fieldName == ExameData.OUTRA_FUNCAO_3 ) - { - outra_funcao_3 = ( String ) value; - } - else if( fieldName == ExameData.OUTRA_FUNCAO_4 ) - { - outra_funcao_4 = ( String ) value; - } - else if( fieldName == ExameData.PROXIMO_EXAME ) - { - proximo_exame = ( Date ) value; - } - else if( fieldName == ExameData.OUTRAS_RECOMENDACOES ) - { - outras_recomendacoes = ( String ) value; - } - else if( fieldName == ExameData.TRABALHADOR ) - { - trabalhador = ( Trabalhador ) value; - } - else if( fieldName == ExameData.MEDICO ) - { - medico = ( Medico ) value; - } - else if( fieldName == ExameData.PDF ) - { - pdf = ( byte[] ) value; - } - else if( fieldName == ExameData.FO ) - { - fo = ( byte[] ) value; - } - else if( fieldName == ExameData.INACTIVO ) - { - inactivo = ( String ) value; - } - else if( fieldName.equals( ExameData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( ExameData.DATA ) ) - { - data = ( Date ) value; - } - else if( fieldName.equals( ExameData.TIPO ) ) - { - tipo = ( Integer ) value; - } - else if( fieldName.equals( ExameData.OCASIONAL ) ) - { - ocasional = ( Integer ) value; - } - else if( fieldName.equals( ExameData.OUTRO_TIPO ) ) - { - outro_tipo = ( String ) value; - } - else if( fieldName.equals( ExameData.RESULTADO ) ) - { - resultado = ( Integer ) value; - } - else if( fieldName.equals( ExameData.OUTRA_FUNCAO_1 ) ) - { - outra_funcao_1 = ( String ) value; - } - else if( fieldName.equals( ExameData.OUTRA_FUNCAO_2 ) ) - { - outra_funcao_2 = ( String ) value; - } - else if( fieldName.equals( ExameData.OUTRA_FUNCAO_3 ) ) - { - outra_funcao_3 = ( String ) value; - } - else if( fieldName.equals( ExameData.OUTRA_FUNCAO_4 ) ) - { - outra_funcao_4 = ( String ) value; - } - else if( fieldName.equals( ExameData.PROXIMO_EXAME ) ) - { - proximo_exame = ( Date ) value; - } - else if( fieldName.equals( ExameData.OUTRAS_RECOMENDACOES ) ) - { - outras_recomendacoes = ( String ) value; - } - else if( fieldName.equals( ExameData.TRABALHADOR ) ) - { - trabalhador = ( Trabalhador ) value; - } - else if( fieldName.equals( ExameData.MEDICO ) ) - { - medico = ( Medico ) value; - } - else if( fieldName.equals( ExameData.PDF ) ) - { - pdf = ( byte[] ) value; - } - else if( fieldName.equals( ExameData.FO ) ) - { - fo = ( byte[] ) value; - } - else if( fieldName.equals( ExameData.INACTIVO ) ) - { - inactivo = ( String ) value; - } - } - - public Class getOuterClass() - { - return ExameData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/ExameData.java b/trunk/SIPRPSoft/src/siprp/data/ExameData.java deleted file mode 100644 index 41277465..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/ExameData.java +++ /dev/null @@ -1,79 +0,0 @@ -/* -* ExameData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on 28/Jan/2005 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.util.HashMap; - -import com.evolute.utils.jdo.JDOObject; - -public final class ExameData extends JDOObject - implements DisableDeleteable -{ - public static final String ID = "id"; - public static final String DATA = "data"; - public static final String TIPO = "tipo"; - public static final String OCASIONAL = "ocasional"; - public static final String OUTRO_TIPO = "outro_tipo"; - public static final String RESULTADO = "resultado"; - public static final String OUTRA_FUNCAO_1 = "outra_funcao_1"; - public static final String OUTRA_FUNCAO_2 = "outra_funcao_2"; - public static final String OUTRA_FUNCAO_3 = "outra_funcao_3"; - public static final String OUTRA_FUNCAO_4 = "outra_funcao_4"; - public static final String PROXIMO_EXAME = "proximo_exame"; - public static final String OUTRAS_RECOMENDACOES = "outras_recomendacoes"; - public static final String TRABALHADOR = "trabalhador"; - public static final String MEDICO = "medico"; - public static final String PDF = "pdf"; - public static final String FO = "fo"; - public static final String INACTIVO = "inactivo"; - - public static final String FIELD_NAMES[] = new String[]{ - DATA, TIPO, OCASIONAL, OUTRO_TIPO, RESULTADO, OUTRA_FUNCAO_1, OUTRA_FUNCAO_2, - OUTRA_FUNCAO_3, OUTRA_FUNCAO_4, PROXIMO_EXAME, OUTRAS_RECOMENDACOES, - TRABALHADOR, MEDICO, PDF, FO, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, DATA, TIPO, OCASIONAL, OUTRO_TIPO, RESULTADO, OUTRA_FUNCAO_1, OUTRA_FUNCAO_2, - OUTRA_FUNCAO_3, OUTRA_FUNCAO_4, PROXIMO_EXAME, OUTRAS_RECOMENDACOES, - TRABALHADOR, MEDICO, PDF, FO, INACTIVO, }; - - private HashMap dataHash; - - public ExameData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return Exame.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/ExameID.java b/trunk/SIPRPSoft/src/siprp/data/ExameID.java deleted file mode 100644 index c5a85ba6..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/ExameID.java +++ /dev/null @@ -1,22 +0,0 @@ -/* -* ExameID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on 28/Jan/2005 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class ExameID extends IntegerID -{ - public ExameID() - { - } - - public ExameID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/Historico.java b/trunk/SIPRPSoft/src/siprp/data/Historico.java index fee34bd7..79e41f50 100644 --- a/trunk/SIPRPSoft/src/siprp/data/Historico.java +++ b/trunk/SIPRPSoft/src/siprp/data/Historico.java @@ -9,13 +9,12 @@ package siprp.data; import java.text.DateFormat; import java.util.Date; -import com.evolute.utils.jdo.JDOObject; import com.evolute.utils.tables.ColumnizedObject; /** * * @author fpalma */ -public abstract class Historico extends JDOObject +public abstract class Historico extends BaseObject implements ColumnizedObject { protected static final DateFormat DATE_FORMAT = DateFormat.getDateInstance( DateFormat.SHORT ); diff --git a/trunk/SIPRPSoft/src/siprp/data/HistoricoEstabelecimento.java b/trunk/SIPRPSoft/src/siprp/data/HistoricoEstabelecimento.java deleted file mode 100644 index 627cfb58..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/HistoricoEstabelecimento.java +++ /dev/null @@ -1,102 +0,0 @@ -/* -* HistoricoEstabelecimento.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on 7/Dez/2004 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.util.Date; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class HistoricoEstabelecimento implements JDOInnerObject -{ - private Integer id; - private Date data; - private String texto; - private Estabelecimento estabelecimento; - - public HistoricoEstabelecimento() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == HistoricoEstabelecimentoData.ID ) - { - return id; - } - else if( fieldName == HistoricoEstabelecimentoData.DATA ) - { - return data; - } - else if( fieldName == HistoricoEstabelecimentoData.TEXTO ) - { - return texto; - } - else if( fieldName == HistoricoEstabelecimentoData.ESTABELECIMENTO ) - { - return estabelecimento; - } - else if( fieldName.equals( HistoricoEstabelecimentoData.ID ) ) - { - return id; - } - else if( fieldName.equals( HistoricoEstabelecimentoData.DATA ) ) - { - return data; - } - else if( fieldName.equals( HistoricoEstabelecimentoData.TEXTO ) ) - { - return texto; - } - else if( fieldName.equals( HistoricoEstabelecimentoData.ESTABELECIMENTO ) ) - { - return estabelecimento; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == HistoricoEstabelecimentoData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == HistoricoEstabelecimentoData.DATA ) - { - data = ( Date ) value; - } - else if( fieldName == HistoricoEstabelecimentoData.TEXTO ) - { - texto = ( String ) value; - } - else if( fieldName == HistoricoEstabelecimentoData.ESTABELECIMENTO ) - { - estabelecimento = ( Estabelecimento ) value; - } - else if( fieldName.equals( HistoricoEstabelecimentoData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( HistoricoEstabelecimentoData.DATA ) ) - { - data = ( Date ) value; - } - else if( fieldName.equals( HistoricoEstabelecimentoData.TEXTO ) ) - { - texto = ( String ) value; - } - else if( fieldName.equals( HistoricoEstabelecimentoData.ESTABELECIMENTO ) ) - { - estabelecimento = ( Estabelecimento ) value; - } - } - - public Class getOuterClass() - { - return HistoricoEstabelecimentoData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/HistoricoEstabelecimentoData.java b/trunk/SIPRPSoft/src/siprp/data/HistoricoEstabelecimentoData.java deleted file mode 100644 index fbadf75d..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/HistoricoEstabelecimentoData.java +++ /dev/null @@ -1,59 +0,0 @@ -/* -* HistoricoEstabelecimentoData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on 7/Dez/2004 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.util.HashMap; - -public final class HistoricoEstabelecimentoData extends Historico -{ - public static final String ID = "id"; - public static final String DATA = "data"; - public static final String TEXTO = "texto"; - public static final String ESTABELECIMENTO = "estabelecimento"; - - public static final String FIELD_NAMES[] = new String[]{ - DATA, TEXTO, ESTABELECIMENTO, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, DATA, TEXTO, ESTABELECIMENTO, }; - - private HashMap dataHash; - - public HistoricoEstabelecimentoData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return HistoricoEstabelecimento.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/HistoricoEstabelecimentoID.java b/trunk/SIPRPSoft/src/siprp/data/HistoricoEstabelecimentoID.java deleted file mode 100644 index 393db911..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/HistoricoEstabelecimentoID.java +++ /dev/null @@ -1,22 +0,0 @@ -/* -* HistoricoEstabelecimentoID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on 7/Dez/2004 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class HistoricoEstabelecimentoID extends IntegerID -{ - public HistoricoEstabelecimentoID() - { - } - - public HistoricoEstabelecimentoID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/Marcacao.java b/trunk/SIPRPSoft/src/siprp/data/Marcacao.java index ed260f6d..950d33eb 100644 --- a/trunk/SIPRPSoft/src/siprp/data/Marcacao.java +++ b/trunk/SIPRPSoft/src/siprp/data/Marcacao.java @@ -7,19 +7,28 @@ package siprp.data; import java.text.DateFormat; +import java.util.Calendar; import java.util.Date; import siprp.FichaDataProvider; +import siprp.data.outer.AvisosData; +import siprp.data.outer.EmpresasData; +import siprp.data.outer.EstabelecimentosData; +import siprp.data.outer.MarcacoesEmpresaData; +import siprp.data.outer.MarcacoesEstabelecimentoData; +import siprp.data.outer.MarcacoesTrabalhadorData; +import siprp.data.outer.TrabalhadoresData; +import siprp.medicina.MedicinaDataProvider; +import com.evolute.entity.ProviderInterface; +import com.evolute.entity.evo.EvoDataException; import com.evolute.utils.Singleton; -import com.evolute.utils.jdo.JDOObject; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.tables.ColumnizedObject; /** * * @author fpalma */ -public abstract class Marcacao extends JDOObject +public abstract class Marcacao extends BaseObject implements ColumnizedObject //, JDOOperationHandlerInterface { @@ -42,21 +51,23 @@ public abstract class Marcacao extends JDOObject public static final String ANTECEDENCIA_AVISO = "antecedencia_aviso"; protected static final DateFormat DATE_FORMAT = DateFormat.getDateInstance( DateFormat.SHORT ); - protected static JDOProvider JDO; + protected static ProviderInterface JDO; public static Marcacao getMarcacao( int tipo ) { switch( tipo ) { - case TIPO_MARCACAO_TRABALHADOR_EXAMES: case TIPO_MARCACAO_TRABALHADOR_CONSULTA: - return new MarcacaoTrabalhadorData(); + case TIPO_MARCACAO_TRABALHADOR_EXAMES: + + case TIPO_MARCACAO_TRABALHADOR_CONSULTA: + return new MarcacoesTrabalhadorData(); case TIPO_MARCACAO_ESTABELECIMENTO: - return new MarcacaoEstabelecimentoData(); + return new MarcacoesEstabelecimentoData(); case TIPO_MARCACAO_EMPRESA: - return new MarcacaoEmpresaData(); + return new MarcacoesEmpresaData(); } return null; } @@ -72,7 +83,7 @@ public abstract class Marcacao extends JDOObject case 1: String realizada = (String) get( REALIZADA ); -// if( this instanceof MarcacaoEmpresaData ) +// if( this instanceof MarcacoesEmpresaData ) // { // return new Boolean( "y".equals( realizada ) ); // } @@ -84,9 +95,9 @@ public abstract class Marcacao extends JDOObject // } case 2: - if( this instanceof MarcacaoEmpresaData ) + if( this instanceof MarcacoesEmpresaData ) { - String textoStr = (String ) get( MarcacaoEmpresaData.TEXTO ); + String textoStr = (String ) get( MarcacoesEmpresaData.TEXTO ); if( textoStr == null ) { textoStr = ""; @@ -124,7 +135,7 @@ public abstract class Marcacao extends JDOObject return; } Integer marcacaoID = provider.getMarcacaoIDByTrabalhador( trabalhadorID ); - MarcacaoTrabalhadorData marcacao; + MarcacoesTrabalhadorData marcacao; if( marcacaoID == null ) { marcacao = null; @@ -133,9 +144,9 @@ public abstract class Marcacao extends JDOObject { if( JDO == null ) { - JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + JDO = ( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); } - marcacao = ( MarcacaoTrabalhadorData ) JDO.load( MarcacaoTrabalhadorData.class, marcacaoID ); + marcacao = ( MarcacoesTrabalhadorData ) JDO.load( MarcacoesTrabalhadorData.class, marcacaoID ); } if( date == null && marcacao != null ) { @@ -148,206 +159,236 @@ public abstract class Marcacao extends JDOObject } else if( date != null && marcacao == null ) { - marcacao = new MarcacaoTrabalhadorData(); + marcacao = new MarcacoesTrabalhadorData(); if( JDO == null ) { - JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + JDO = ( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); } - TrabalhadorData trab = (TrabalhadorData)JDO.load( TrabalhadorData.class, trabalhadorID ); - marcacao.set( MarcacaoTrabalhadorData.TRABALHADOR, trab ); - marcacao.set( MarcacaoTrabalhadorData.TIPO, new Integer( MarcacaoTrabalhadorData.TIPO_CONSULTA ) ); + TrabalhadoresData trab = (TrabalhadoresData)JDO.load( TrabalhadoresData.class, trabalhadorID ); + marcacao.set( MarcacoesTrabalhadorData.TO_TRABALHADOR_ID, trab ); + marcacao.set( MarcacoesTrabalhadorData.TIPO, new Integer( MarcacoesTrabalhadorData.TIPO_CONSULTA ) ); marcacao.set( Marcacao.DATA, date ); marcacao.set( Marcacao.REALIZADA, "n" ); - marcacao.set( MarcacaoTrabalhadorData.ESTADO, new Integer( siprp.medicina.MedicinaDataProvider.ESTADO_POR_REALIZAR ) ); - marcacao.set( MarcacaoTrabalhadorData.MOTIVO, new Integer( 2 ) ); + marcacao.set( MarcacoesTrabalhadorData.ESTADO, new Integer( siprp.medicina.MedicinaDataProvider.ESTADO_POR_REALIZAR ) ); + marcacao.set( MarcacoesTrabalhadorData.MOTIVO, new Integer( 2 ) ); marcacao.save(); } } -// -// public boolean handle( JDOObject object, int operation, int moment ) -// throws Exception -// { -// switch( operation ) -// { -// case JDOOperationHandlerInterface.OP_SAVE: -// switch( moment ) -// { -// case JDOOperationHandlerInterface.MOMENT_BEFORE: -// return preSave( (Marcacao) object ); -// -// case JDOOperationHandlerInterface.MOMENT_AFTER: -// return postSave( (Marcacao) object ); -// } -// return false; -// -// case JDOOperationHandlerInterface.OP_DELETE: -// switch( moment ) -// { -// case JDOOperationHandlerInterface.MOMENT_BEFORE: -// return preDelete( (Marcacao) object ); -// -// case JDOOperationHandlerInterface.MOMENT_AFTER: -// return postDelete( (Marcacao) object ); -// } -// return false; -// } -// return false; -// } -// -// protected boolean preSave( Marcacao object ) -// throws Exception -// { -// return false; -// } -// -// protected boolean postSave( Marcacao object ) -// throws Exception -// { -// if( object instanceof MarcacaoEmpresaData ) -// { -// AvisoData aviso = (AvisoData) load( AvisoData.class, new Object[]{ get( MarcacaoEmpresaData.ID ), new Integer( AvisoData.TIPO_EMPRESA ) }, new String[]{ AvisoData.EVENTO_ID, AvisoData.TIPO } ); -// if( aviso == null ) -// { -// aviso = new AvisoData(); -// } -// aviso.set( AvisoData.TIPO, new Integer( AvisoData.TIPO_EMPRESA ) ); -// EmpresaData empresa = ( EmpresaData ) object.get( MarcacaoEmpresaData.EMPRESA ); -// aviso.set( AvisoData.EMPRESA, empresa ); -// aviso.set( AvisoData.EVENTO_ID, object.get( MarcacaoEmpresaData.ID ) ); -// Date dataEvento = (Date) object.get( DATA ); -// aviso.set( AvisoData.DATA_EVENTO, dataEvento ); -// aviso.set( AvisoData.DATA_AVISO, dataEvento ); -// String descricao = "Tarefa "; -// aviso.set( AvisoData.DESCRICAO, descricao ); -// aviso.save(); -// } -// else if( object instanceof MarcacaoEstabelecimentoData ) -// { -// AvisoData aviso = (AvisoData) load( AvisoData.class, new Object[]{ get( MarcacaoEstabelecimentoData.ID ), new Integer( AvisoData.TIPO_ESTABELECIMENTO ) }, new String[]{ AvisoData.EVENTO_ID, AvisoData.TIPO } ); -// if( aviso == null ) -// { -// aviso = new AvisoData(); -// } -// aviso.set( AvisoData.TIPO, new Integer( AvisoData.TIPO_ESTABELECIMENTO ) ); -// EstabelecimentoData estabelecimento = ( EstabelecimentoData ) object.get( MarcacaoEstabelecimentoData.ESTABELECIMENTO ); -// aviso.set( AvisoData.ESTABELECIMENTO, estabelecimento ); -// EmpresaData empresa = ( EmpresaData )estabelecimento.get( EstabelecimentoData.EMPRESA ); -// aviso.set( AvisoData.EMPRESA, empresa ); -// aviso.set( AvisoData.EVENTO_ID, object.get( MarcacaoEstabelecimentoData.ID ) ); -// Date dataEvento = (Date) object.get( DATA ); -// Date dataAviso = new Date( dataEvento.getTime() ); -// Calendar cal = Calendar.getInstance(); -// cal.setTime( dataAviso ); -// cal.add( Calendar.DAY_OF_MONTH, -14 ); -// dataAviso = cal.getTime(); -// aviso.set( AvisoData.DATA_AVISO, dataAviso ); -// aviso.set( AvisoData.DATA_EVENTO, dataEvento ); -// String descricao = "Visita "; -// aviso.set( AvisoData.DESCRICAO, descricao ); -// cal = Calendar.getInstance(); -// cal.setTime( dataEvento ); -// cal.set( cal.get( Calendar.YEAR ), cal.get( Calendar.MONTH ), cal.get( Calendar.DAY_OF_MONTH ), 0, 0, 0 ); -// cal.set( Calendar.MILLISECOND, 0 ); -// dataEvento = cal.getTime(); -// -// cal = Calendar.getInstance(); -// cal.set( cal.get( Calendar.YEAR ), cal.get( Calendar.MONTH ), cal.get( Calendar.DAY_OF_MONTH ), 10, 0, 0 ); -// cal.set( Calendar.MILLISECOND, 0 ); -// Date hoje = cal.getTime(); -// if( hoje.before( dataEvento ) ) -// { -// aviso.save(); -// } -// } -// if( object instanceof MarcacaoTrabalhadorData ) -// { -// AvisoData aviso = (AvisoData) load( AvisoData.class, new Object[]{ object.get( MarcacaoTrabalhadorData.ID ), new Integer( AvisoData.TIPO_TRABALHADOR ) }, new String[]{ AvisoData.EVENTO_ID, AvisoData.TIPO } ); -// if( aviso == null ) -// { -// aviso = new AvisoData(); -// } -// aviso.set( AvisoData.TIPO, new Integer( AvisoData.TIPO_TRABALHADOR ) ); -// TrabalhadorData trab = ( TrabalhadorData ) object.get( MarcacaoTrabalhadorData.TRABALHADOR ); -// aviso.set( AvisoData.TRABALHADOR, trab ); -// EstabelecimentoData estabelecimento = ( EstabelecimentoData ) trab.get( TrabalhadorData.ESTABELECIMENTO ); -// aviso.set( AvisoData.ESTABELECIMENTO, estabelecimento ); -// EmpresaData empresa = ( EmpresaData ) estabelecimento.get( EstabelecimentoData.EMPRESA ); -// aviso.set( AvisoData.EMPRESA, empresa ); -// aviso.set( AvisoData.EVENTO_ID, object.get( MarcacaoTrabalhadorData.ID ) ); -// Date dataEvento = (Date) object.get( DATA ); -// Date dataAviso = new Date( dataEvento.getTime() ); -// Calendar cal = Calendar.getInstance(); -// cal.setTime( dataAviso ); -// cal.add( Calendar.DAY_OF_MONTH, -14 ); -// dataAviso = cal.getTime(); -// aviso.set( AvisoData.DATA_AVISO, dataAviso ); -// aviso.set( AvisoData.DATA_EVENTO, dataEvento ); -// String descricao = ""; -// switch( ( ( Integer ) object.get( MarcacaoTrabalhadorData.TIPO ) ).intValue() ) -// { -// case MarcacaoTrabalhadorData.TIPO_EXAMES: -// descricao = "Exames "; -// break; -// -// case MarcacaoTrabalhadorData.TIPO_CONSULTA: -// descricao = "Consulta "; -// break; -// } -// aviso.set( AvisoData.DESCRICAO, descricao ); -// cal = Calendar.getInstance(); -// cal.setTime( dataEvento ); -// cal.set( cal.get( Calendar.YEAR ), cal.get( Calendar.MONTH ), cal.get( Calendar.DAY_OF_MONTH ), 0, 0, 0 ); -// cal.set( Calendar.MILLISECOND, 0 ); -// dataEvento = cal.getTime(); -// -// cal = Calendar.getInstance(); -// cal.set( cal.get( Calendar.YEAR ), cal.get( Calendar.MONTH ), cal.get( Calendar.DAY_OF_MONTH ), 10, 0, 0 ); -// cal.set( Calendar.MILLISECOND, 0 ); -// Date hoje = cal.getTime(); -// if( hoje.before( dataEvento ) ) -// { -// aviso.save(); -// } -// } -// else -// { -// return false; -// } -// return true; -// } -// -// protected boolean preDelete( Marcacao object ) -// throws Exception -// { -// return false; -// } -// -// protected boolean postDelete( Marcacao object ) -// throws Exception -// { -// Integer tipo; -// if( object instanceof MarcacaoEmpresaData ) -// { -// tipo = new Integer( AvisoData.TIPO_EMPRESA ); -// } -// else if( object instanceof MarcacaoEstabelecimentoData ) -// { -// tipo = new Integer( AvisoData.TIPO_ESTABELECIMENTO ); -// } -// if( object instanceof MarcacaoTrabalhadorData ) -// { -// tipo = new Integer( AvisoData.TIPO_TRABALHADOR ); -// } -// else -// { -// return false; -// } -// AvisoData aviso = (AvisoData) load( AvisoData.class, new Object[]{ object.get( "id" ), tipo }, new String[]{ AvisoData.EVENTO_ID, AvisoData.TIPO } ); -// if( aviso != null ) -// { -// aviso.delete(); -// } -// -// return true; -// } + + @Override + public void save() throws EvoDataException + { + super.save(); + postSave(this); + } + + @Override + public void delete() throws EvoDataException + { + if( preDelete(this) ) + { + super.delete(); + postDelete(this); + } + } + + protected boolean postSave( Marcacao object ) + throws EvoDataException + { + boolean result = false; + try + { + if( object instanceof MarcacoesEmpresaData ) + { + AvisosData aviso = (AvisosData) JDO.load( AvisosData.class, + new Object[]{ object.get( MarcacoesEmpresaData.ID ), new Integer( AvisosData.TIPO_EMPRESA ) }, + new String[]{ AvisosData.EVENTO_ID, AvisosData.TIPO } ); + if( aviso == null ) + { + aviso = new AvisosData(); + } + aviso.setTipo( AvisosData.TIPO_EMPRESA ); + EmpresasData empresa = ((MarcacoesEmpresaData)object).toEmpresa_id(); + aviso.setToEmpresa_id( empresa ); + aviso.set( AvisosData.EVENTO_ID, object.get( MarcacoesEmpresaData.ID ) ); + Date dataEvento = (Date) object.get( Marcacao.DATA ); + aviso.set( AvisosData.DATA_EVENTO, dataEvento ); + aviso.set( AvisosData.DATA_AVISO, dataEvento ); + String descricao = "Tarefa "; + aviso.set( AvisosData.DESCRICAO, descricao ); + aviso.save(); + + empresa.save(); + } + else if( object instanceof MarcacoesEstabelecimentoData ) + { + AvisosData aviso = (AvisosData) JDO.load( AvisosData.class, + new Object[]{ object.get( MarcacoesEstabelecimentoData.ID ), new Integer( AvisosData.TIPO_ESTABELECIMENTO ) }, + new String[]{ AvisosData.EVENTO_ID, AvisosData.TIPO } ); + if( aviso == null ) + { + aviso = new AvisosData(); + } + aviso.set( AvisosData.TIPO, new Integer( AvisosData.TIPO_ESTABELECIMENTO ) ); + EstabelecimentosData estabelecimento = ((MarcacoesEstabelecimentoData)object).toEstabelecimento_id(); + aviso.setToEstabelecimento_id( estabelecimento ); + EmpresasData empresa = estabelecimento.toEmpresa_id(); + aviso.setToEmpresa_id( empresa ); + aviso.set( AvisosData.EVENTO_ID, object.get( MarcacoesEstabelecimentoData.ID ) ); + Date dataEvento = (Date) object.get( Marcacao.DATA ); + Date dataAviso = new Date( dataEvento.getTime() ); + Calendar cal = Calendar.getInstance(); + cal.setTime( dataAviso ); + cal.add( Calendar.DAY_OF_MONTH, -14 ); + dataAviso = cal.getTime(); + aviso.set( AvisosData.DATA_AVISO, dataAviso ); + aviso.set( AvisosData.DATA_EVENTO, dataEvento ); + String descricao = "Visita "; + aviso.set( AvisosData.DESCRICAO, descricao ); + cal = Calendar.getInstance(); + cal.setTime( dataEvento ); + cal.set( cal.get( Calendar.YEAR ), cal.get( Calendar.MONTH ), cal.get( Calendar.DAY_OF_MONTH ), 0, 0, 0 ); + cal.set( Calendar.MILLISECOND, 0 ); + dataEvento = cal.getTime(); + + cal = Calendar.getInstance(); + cal.set( cal.get( Calendar.YEAR ), cal.get( Calendar.MONTH ), cal.get( Calendar.DAY_OF_MONTH ), 10, 0, 0 ); + cal.set( Calendar.MILLISECOND, 0 ); + Date hoje = cal.getTime(); + if( hoje.before( dataEvento ) ) + { + aviso.save(); + } + + estabelecimento.save(); + } + if( object instanceof MarcacoesTrabalhadorData ) + { + AvisosData aviso = (AvisosData) JDO.load( AvisosData.class, + new Object[]{ object.get( MarcacoesTrabalhadorData.ID ), new Integer( AvisosData.TIPO_TRABALHADOR ) }, + new String[]{ AvisosData.EVENTO_ID, AvisosData.TIPO } ); + if( aviso == null ) + { + aviso = new AvisosData(); + } + aviso.set( AvisosData.TIPO, new Integer( AvisosData.TIPO_TRABALHADOR ) ); + TrabalhadoresData trab = ((MarcacoesTrabalhadorData)object).toTrabalhador_id(); + aviso.setToTrabalhador_id( trab ); + EstabelecimentosData estabelecimento = trab.toEstabelecimento_id(); + aviso.setToEstabelecimento_id( estabelecimento ); + EmpresasData empresa = estabelecimento.toEmpresa_id(); + aviso.setToEmpresa_id( empresa ); + aviso.set( AvisosData.EVENTO_ID, object.get( MarcacoesTrabalhadorData.ID ) ); + Date dataEvento = (Date) object.get( Marcacao.DATA ); + Date dataAviso = new Date( dataEvento.getTime() ); + Calendar cal = Calendar.getInstance(); + cal.setTime( dataAviso ); + cal.add( Calendar.DAY_OF_MONTH, -14 ); + dataAviso = cal.getTime(); + aviso.set( AvisosData.DATA_AVISO, dataAviso ); + aviso.set( AvisosData.DATA_EVENTO, dataEvento.clone() ); + String descricao = ""; + switch( ( ( Integer ) object.get( MarcacoesTrabalhadorData.TIPO ) ).intValue() ) + { + case MarcacoesTrabalhadorData.TIPO_EXAMES: + descricao = "Exames"; + break; + + case MarcacoesTrabalhadorData.TIPO_CONSULTA: + Integer motivo = ( ( Integer ) object.get( MarcacoesTrabalhadorData.MOTIVO ) ); + descricao = "Consulta " + ( motivo == null ? "" : ("(" + MedicinaDataProvider.TIPOS_CONSULTAS[ motivo.intValue() ] + ")" ) ); + break; + } + aviso.set( AvisosData.DESCRICAO, descricao ); + cal = Calendar.getInstance(); + cal.setTime( dataEvento ); + cal.set( cal.get( Calendar.YEAR ), cal.get( Calendar.MONTH ), cal.get( Calendar.DAY_OF_MONTH ), 0, 0, 0 ); + cal.set( Calendar.MILLISECOND, 0 ); + dataEvento = cal.getTime(); + + cal = Calendar.getInstance(); + cal.set( cal.get( Calendar.YEAR ), cal.get( Calendar.MONTH ), cal.get( Calendar.DAY_OF_MONTH ), 10, 0, 0 ); + cal.set( Calendar.MILLISECOND, 0 ); + Date hoje = cal.getTime(); + if( hoje.before( dataEvento ) ) + { + if( !hoje.before( dataAviso ) ) + { + aviso.set( AvisosData.DATA_AVISO, dataEvento.clone() ); + } + aviso.save(); + } + + trab.save(); + } + else + { + result = false; + } + result = true; + } + catch (Exception e) + { + throw new EvoDataException( e ); + } + return result; + } + + protected boolean preDelete( Marcacao object ) + throws EvoDataException + { + try + { + if( object instanceof MarcacoesTrabalhadorData && + ( ( Integer ) object.get( MarcacoesTrabalhadorData.TIPO ) ).intValue() == MarcacoesTrabalhadorData.TIPO_EXAMES ) + { + ((MedicinaDataProvider)MedicinaDataProvider.getProvider()).deleteDetalhesRealizadosForMarcacao( ( Integer ) object.get( MarcacoesTrabalhadorData.ID ) ); + return true; + } + } + catch (Exception e) + { + throw new EvoDataException( e ); + } + return false; + } + + protected boolean postDelete( Marcacao object ) + throws EvoDataException + { + try + { + Integer tipo; + if( object instanceof MarcacoesEmpresaData ) + { + tipo = new Integer( AvisosData.TIPO_EMPRESA ); + } + else if( object instanceof MarcacoesEstabelecimentoData ) + { + tipo = new Integer( AvisosData.TIPO_ESTABELECIMENTO ); + } + if( object instanceof MarcacoesTrabalhadorData ) + { + tipo = new Integer( AvisosData.TIPO_TRABALHADOR ); + } + else + { + return false; + } + AvisosData aviso = (AvisosData) JDO.load( AvisosData.class, + new Object[]{ object.get( "id" ), tipo }, + new String[]{ AvisosData.EVENTO_ID, AvisosData.TIPO } ); + if( aviso != null ) + { + aviso.delete(); + } + + return true; + } + catch (Exception e) + { + throw new EvoDataException( e ); + } + } + } diff --git a/trunk/SIPRPSoft/src/siprp/data/MarcacaoEmpresa.java b/trunk/SIPRPSoft/src/siprp/data/MarcacaoEmpresa.java deleted file mode 100644 index 9288e111..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/MarcacaoEmpresa.java +++ /dev/null @@ -1,119 +0,0 @@ -/* -* MarcacaoEmpresa.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on 7/Dez/2004 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.util.Date; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class MarcacaoEmpresa implements JDOInnerObject -{ - private Integer id; - private Date data; - private String texto; - private String realizada; - private Empresa empresa; - - public MarcacaoEmpresa() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == MarcacaoEmpresaData.ID ) - { - return id; - } - else if( fieldName == MarcacaoEmpresaData.DATA ) - { - return data; - } - else if( fieldName == MarcacaoEmpresaData.TEXTO ) - { - return texto; - } - else if( fieldName == MarcacaoEmpresaData.REALIZADA ) - { - return realizada; - } - else if( fieldName == MarcacaoEmpresaData.EMPRESA ) - { - return empresa; - } - else if( fieldName.equals( MarcacaoEmpresaData.ID ) ) - { - return id; - } - else if( fieldName.equals( MarcacaoEmpresaData.DATA ) ) - { - return data; - } - else if( fieldName.equals( MarcacaoEmpresaData.TEXTO ) ) - { - return texto; - } - else if( fieldName.equals( MarcacaoEmpresaData.REALIZADA ) ) - { - return realizada; - } - else if( fieldName.equals( MarcacaoEmpresaData.EMPRESA ) ) - { - return empresa; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == MarcacaoEmpresaData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == MarcacaoEmpresaData.DATA ) - { - data = ( Date ) value; - } - else if( fieldName == MarcacaoEmpresaData.TEXTO ) - { - texto = ( String ) value; - } - else if( fieldName == MarcacaoEmpresaData.REALIZADA ) - { - realizada = ( String ) value; - } - else if( fieldName == MarcacaoEmpresaData.EMPRESA ) - { - empresa = ( Empresa ) value; - } - else if( fieldName.equals( MarcacaoEmpresaData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( MarcacaoEmpresaData.DATA ) ) - { - data = ( Date ) value; - } - else if( fieldName.equals( MarcacaoEmpresaData.TEXTO ) ) - { - texto = ( String ) value; - } - else if( fieldName.equals( MarcacaoEmpresaData.REALIZADA ) ) - { - realizada = ( String ) value; - } - else if( fieldName.equals( MarcacaoEmpresaData.EMPRESA ) ) - { - empresa = ( Empresa ) value; - } - } - - public Class getOuterClass() - { - return MarcacaoEmpresaData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/MarcacaoEmpresaData.java b/trunk/SIPRPSoft/src/siprp/data/MarcacaoEmpresaData.java deleted file mode 100644 index 95d12903..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/MarcacaoEmpresaData.java +++ /dev/null @@ -1,60 +0,0 @@ -/* -* MarcacaoEmpresaData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on 7/Dez/2004 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.util.HashMap; - -public final class MarcacaoEmpresaData extends Marcacao -{ - public static final String ID = "id"; - public static final String DATA = "data"; - public static final String TEXTO = "texto"; - public static final String REALIZADA = "realizada"; - public static final String EMPRESA = "empresa"; - - public static final String FIELD_NAMES[] = new String[]{ - DATA, TEXTO, REALIZADA, EMPRESA, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, DATA, TEXTO, REALIZADA, EMPRESA, }; - - private HashMap dataHash; - - public MarcacaoEmpresaData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return MarcacaoEmpresa.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/MarcacaoEmpresaID.java b/trunk/SIPRPSoft/src/siprp/data/MarcacaoEmpresaID.java deleted file mode 100644 index cc7f8c1e..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/MarcacaoEmpresaID.java +++ /dev/null @@ -1,22 +0,0 @@ -/* -* MarcacaoEmpresaID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on 7/Dez/2004 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class MarcacaoEmpresaID extends IntegerID -{ - public MarcacaoEmpresaID() - { - } - - public MarcacaoEmpresaID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/MarcacaoEstabelecimento.java b/trunk/SIPRPSoft/src/siprp/data/MarcacaoEstabelecimento.java deleted file mode 100644 index 4ed9c9cf..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/MarcacaoEstabelecimento.java +++ /dev/null @@ -1,204 +0,0 @@ -/* -* MarcacaoEstabelecimento.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Feb 1, 2006 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.util.Date; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class MarcacaoEstabelecimento implements JDOInnerObject -{ - private Integer id; - private Date data; - private String realizada; - private Integer estado; - private Integer tecnico_hst; - private Integer tecnico_superior_hst; - private Date data_email; - private Date data_relatorio; - private Estabelecimento estabelecimento; - private String observacoes; - - public MarcacaoEstabelecimento() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == MarcacaoEstabelecimentoData.ID ) - { - return id; - } - else if( fieldName == MarcacaoEstabelecimentoData.DATA ) - { - return data; - } - else if( fieldName == MarcacaoEstabelecimentoData.REALIZADA ) - { - return realizada; - } - else if( fieldName == MarcacaoEstabelecimentoData.ESTADO ) - { - return estado; - } - else if( fieldName == MarcacaoEstabelecimentoData.TECNICO_HST ) - { - return tecnico_hst; - } - else if( fieldName == MarcacaoEstabelecimentoData.DATA_EMAIL ) - { - return data_email; - } - else if( fieldName == MarcacaoEstabelecimentoData.DATA_RELATORIO ) - { - return data_relatorio; - } - else if( fieldName == MarcacaoEstabelecimentoData.ESTABELECIMENTO ) - { - return estabelecimento; - } - else if( fieldName == MarcacaoEstabelecimentoData.OBSERVACOES ) - { - return observacoes; - } - else if( fieldName == MarcacaoEstabelecimentoData.TECNICO_SUPERIOR_HST ) - { - return tecnico_superior_hst; - } - else if( fieldName.equals( MarcacaoEstabelecimentoData.ID ) ) - { - return id; - } - else if( fieldName.equals( MarcacaoEstabelecimentoData.DATA ) ) - { - return data; - } - else if( fieldName.equals( MarcacaoEstabelecimentoData.REALIZADA ) ) - { - return realizada; - } - else if( fieldName.equals( MarcacaoEstabelecimentoData.ESTADO ) ) - { - return estado; - } - else if( fieldName.equals( MarcacaoEstabelecimentoData.TECNICO_HST ) ) - { - return tecnico_hst; - } - else if( fieldName.equals( MarcacaoEstabelecimentoData.DATA_EMAIL ) ) - { - return data_email; - } - else if( fieldName.equals( MarcacaoEstabelecimentoData.DATA_RELATORIO ) ) - { - return data_relatorio; - } - else if( fieldName.equals( MarcacaoEstabelecimentoData.ESTABELECIMENTO ) ) - { - return estabelecimento; - } - else if( fieldName.equals( MarcacaoEstabelecimentoData.OBSERVACOES ) ) - { - return observacoes; - } - else if( fieldName.equals( MarcacaoEstabelecimentoData.TECNICO_SUPERIOR_HST ) ) - { - return tecnico_superior_hst; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == MarcacaoEstabelecimentoData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == MarcacaoEstabelecimentoData.DATA ) - { - data = ( Date ) value; - } - else if( fieldName == MarcacaoEstabelecimentoData.REALIZADA ) - { - realizada = ( String ) value; - } - else if( fieldName == MarcacaoEstabelecimentoData.ESTADO ) - { - estado = ( Integer ) value; - } - else if( fieldName == MarcacaoEstabelecimentoData.TECNICO_HST ) - { - tecnico_hst = ( Integer ) value; - } - else if( fieldName == MarcacaoEstabelecimentoData.TECNICO_SUPERIOR_HST ) - { - tecnico_superior_hst = ( Integer ) value; - } - else if( fieldName == MarcacaoEstabelecimentoData.DATA_EMAIL ) - { - data_email = ( Date ) value; - } - else if( fieldName == MarcacaoEstabelecimentoData.DATA_RELATORIO ) - { - data_relatorio = ( Date ) value; - } - else if( fieldName == MarcacaoEstabelecimentoData.ESTABELECIMENTO ) - { - estabelecimento = ( Estabelecimento ) value; - } - else if( fieldName == MarcacaoEstabelecimentoData.OBSERVACOES ) - { - observacoes = ( String ) value; - } - else if( fieldName.equals( MarcacaoEstabelecimentoData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( MarcacaoEstabelecimentoData.DATA ) ) - { - data = ( Date ) value; - } - else if( fieldName.equals( MarcacaoEstabelecimentoData.REALIZADA ) ) - { - realizada = ( String ) value; - } - else if( fieldName.equals( MarcacaoEstabelecimentoData.ESTADO ) ) - { - estado = ( Integer ) value; - } - else if( fieldName.equals( MarcacaoEstabelecimentoData.TECNICO_HST ) ) - { - tecnico_hst = ( Integer ) value; - } - else if( fieldName.equals( MarcacaoEstabelecimentoData.TECNICO_SUPERIOR_HST ) ) - { - tecnico_superior_hst = ( Integer ) value; - } - else if( fieldName.equals( MarcacaoEstabelecimentoData.DATA_EMAIL ) ) - { - data_email = ( Date ) value; - } - else if( fieldName.equals( MarcacaoEstabelecimentoData.DATA_RELATORIO ) ) - { - data_relatorio = ( Date ) value; - } - else if( fieldName.equals( MarcacaoEstabelecimentoData.ESTABELECIMENTO ) ) - { - estabelecimento = ( Estabelecimento ) value; - } - else if( fieldName.equals( MarcacaoEstabelecimentoData.OBSERVACOES ) ) - { - observacoes = ( String ) value; - } - } - - public Class getOuterClass() - { - return MarcacaoEstabelecimentoData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/MarcacaoEstabelecimentoData.java b/trunk/SIPRPSoft/src/siprp/data/MarcacaoEstabelecimentoData.java deleted file mode 100644 index 059aa94a..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/MarcacaoEstabelecimentoData.java +++ /dev/null @@ -1,67 +0,0 @@ -/* -* MarcacaoEstabelecimentoData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Feb 1, 2006 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.util.HashMap; - -public final class MarcacaoEstabelecimentoData extends Marcacao -{ - public static final String ID = "id"; - public static final String DATA = "data"; - public static final String REALIZADA = "realizada"; - public static final String ESTADO = "estado"; - public static final String TECNICO_HST = "tecnico_hst"; - public static final String TECNICO_SUPERIOR_HST = "tecnico_superior_hst"; - public static final String DATA_EMAIL = "data_email"; - public static final String DATA_RELATORIO = "data_relatorio"; - public static final String ESTABELECIMENTO = "estabelecimento"; - public static final String OBSERVACOES = "observacoes"; - - public static final String FIELD_NAMES[] = new String[]{ - DATA, REALIZADA, ESTADO, TECNICO_HST, TECNICO_SUPERIOR_HST, DATA_EMAIL, DATA_RELATORIO, ESTABELECIMENTO, - OBSERVACOES, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, DATA, REALIZADA, ESTADO, TECNICO_HST, TECNICO_SUPERIOR_HST, DATA_EMAIL, DATA_RELATORIO, - ESTABELECIMENTO, OBSERVACOES, }; - - private HashMap dataHash; - - public MarcacaoEstabelecimentoData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return MarcacaoEstabelecimento.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/MarcacaoEstabelecimentoID.java b/trunk/SIPRPSoft/src/siprp/data/MarcacaoEstabelecimentoID.java deleted file mode 100644 index 5fc5f25d..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/MarcacaoEstabelecimentoID.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -* MarcacaoEstabelecimentoID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Feb 1, 2006 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.io.Serializable; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class MarcacaoEstabelecimentoID extends IntegerID - implements Serializable -{ - public MarcacaoEstabelecimentoID() - { - } - - public MarcacaoEstabelecimentoID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/MarcacaoListLoader.java b/trunk/SIPRPSoft/src/siprp/data/MarcacaoListLoader.java index ee594e50..279d9a26 100644 --- a/trunk/SIPRPSoft/src/siprp/data/MarcacaoListLoader.java +++ b/trunk/SIPRPSoft/src/siprp/data/MarcacaoListLoader.java @@ -6,13 +6,13 @@ package siprp.data; -import java.util.Collection; +import java.util.List; -import javax.jdo.Query; +import siprp.data.outer.MarcacoesEstabelecimentoData; +import siprp.data.outer.MarcacoesTrabalhadorData; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; -import com.evolute.utils.jdo.JDOInnerObject; -import com.evolute.utils.jdo.JDOProvider; /** * * @author fpalma @@ -20,61 +20,63 @@ import com.evolute.utils.jdo.JDOProvider; public class MarcacaoListLoader { // private static PersistenceManager MANAGER = null; - private JDOProvider JDO; + private ProviderInterface JDO; /** Creates a new instance of MarcacaoListLoader */ public MarcacaoListLoader() { - JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + JDO = ( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); } - public Marcacao[] load( int tipo, Integer targetID ) - throws Exception + public Marcacao[] load( int tipo, Integer targetID ) throws Exception { - Class theClass; - String filterString; + List result = null; + Class theClass = null; + Object[] values = null; + String[] keys = null; switch( tipo ) { case Marcacao.TIPO_MARCACAO_TRABALHADOR_EXAMES: case Marcacao.TIPO_MARCACAO_TRABALHADOR_CONSULTA: - theClass = MarcacaoTrabalhador.class; - filterString = "(trabalhador.id == " + targetID + ") && (tipo == " + tipo + ")"; + theClass = MarcacoesTrabalhadorData.class; + //"(trabalhador.id == " + targetID + ") && (tipo == " + tipo + ")"; + keys = new String[]{ MarcacoesTrabalhadorData.TRABALHADOR_ID_FULL, MarcacoesTrabalhadorData.TIPO_FULL }; + values = new Object[]{ targetID, tipo }; break; case Marcacao.TIPO_MARCACAO_ESTABELECIMENTO: - theClass = MarcacaoEstabelecimento.class; - filterString = "estabelecimento.id == " + targetID; + theClass = MarcacoesEstabelecimentoData.class; + //"estabelecimento.id == " + targetID; + keys = new String[]{ MarcacoesEstabelecimentoData.ESTABELECIMENTO_ID_FULL }; + values = new Object[]{ targetID }; break; - - default: - return new Marcacao[ 0 ]; } -// if( MANAGER == null ) -// { -// MANAGER = (PersistenceManager) Singleton.getInstance( SingletonConstants.PERSISTENCE_MANAGER ); -// } -// Transaction tx = MANAGER.currentTransaction(); - Object sessionID = null; - try + if( theClass != null ) { - sessionID = JDO.begin(); - Query q = JDO.getManager().newQuery( theClass, filterString ); - q.setOrdering( Marcacao.DATA + " descending" ); - Collection c = ( Collection )q.execute(); - JDOInnerObject innerObjects[] = ( JDOInnerObject [] ) c.toArray( new JDOInnerObject[0] ); - JDO.commit( sessionID ); - Marcacao marcacoes[] = new Marcacao[ innerObjects.length ]; - for( int n = 0; n < marcacoes.length; n++ ) - { - marcacoes[ n ] = ( Marcacao ) innerObjects[ n ].getOuterClass().newInstance(); - marcacoes[ n ].setInnerObject( innerObjects[ n ] ); - } - return marcacoes; + result = JDO.listLoad( theClass, values, keys, new String[]{ Marcacao.DATA + " descending" } ); } - catch( RuntimeException ex ) - { - JDO.rollback( sessionID ); +// Object sessionID = null; +// try +// { +// sessionID = JDO.begin(); +// Query q = JDO.getManager().newQuery( theClass, filterString ); +// q.setOrdering( Marcacao.DATA + " descending" ); +// Collection c = ( Collection )q.execute(); +// JDOInnerObject innerObjects[] = ( JDOInnerObject [] ) c.toArray( new JDOInnerObject[0] ); +// JDO.commit( sessionID ); +// Marcacao marcacoes[] = new Marcacao[ innerObjects.length ]; +// for( int n = 0; n < marcacoes.length; n++ ) +// { +// marcacoes[ n ] = ( Marcacao ) innerObjects[ n ].getOuterClass().newInstance(); +// marcacoes[ n ].setInnerObject( innerObjects[ n ] ); +// } +// return marcacoes; +// } +// catch( RuntimeException ex ) +// { +// JDO.rollback( sessionID ); // Main.reconnectJDO(); - throw ex; - } +// throw ex; +// } + return result == null ? new Marcacao[0] : result.toArray( new Marcacao[result.size()] ); } } diff --git a/trunk/SIPRPSoft/src/siprp/data/MarcacaoSaveAndDeleteHandler.java b/trunk/SIPRPSoft/src/siprp/data/MarcacaoSaveAndDeleteHandler.java deleted file mode 100644 index 6bc6a08b..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/MarcacaoSaveAndDeleteHandler.java +++ /dev/null @@ -1,261 +0,0 @@ -/* -* MarcacaoSaveAndDeleteHandler.java - * - * Created on 13 de Outubro de 2004, 18:31 - */ - -package siprp.data; - -import java.util.Calendar; -import java.util.Date; - -import siprp.medicina.MedicinaDataProvider; - -import com.evolute.utils.Singleton; -import com.evolute.utils.jdo.JDOObject; -import com.evolute.utils.jdo.JDOOperationHandlerInterface; -import com.evolute.utils.jdo.JDOProvider; - -/** - * - * @author fpalma - */ -public class MarcacaoSaveAndDeleteHandler - implements JDOOperationHandlerInterface -{ - public static final MarcacaoSaveAndDeleteHandler INSTANCE = new MarcacaoSaveAndDeleteHandler(); - - public JDOProvider JDO; - protected MedicinaDataProvider medicinaProvider; - - /** Creates a new instance of MarcacaoSaveAndDeleteHandler */ - public MarcacaoSaveAndDeleteHandler() - { - JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); - } - - public boolean handle( JDOObject object, int operation, int moment ) - throws Exception - { - if( JDO == null ) - { - JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); - } - switch( operation ) - { - case JDOOperationHandlerInterface.OP_SAVE: - switch( moment ) - { - case JDOOperationHandlerInterface.MOMENT_BEFORE: - return preSave( (Marcacao) object ); - - case JDOOperationHandlerInterface.MOMENT_AFTER: - return postSave( (Marcacao) object ); - } - return false; - - case JDOOperationHandlerInterface.OP_DELETE: - switch( moment ) - { - case JDOOperationHandlerInterface.MOMENT_BEFORE: - return preDelete( (Marcacao) object ); - - case JDOOperationHandlerInterface.MOMENT_AFTER: - return postDelete( (Marcacao) object ); - } - return false; - } - return false; - } - - protected boolean preSave( Marcacao object ) - throws Exception - { - return false; - } - - protected boolean postSave( Marcacao object ) - throws Exception - { - if( object instanceof MarcacaoEmpresaData ) - { - AvisoData aviso = (AvisoData) JDO.load( AvisoData.class, - new Object[]{ object.get( MarcacaoEmpresaData.ID ), new Integer( AvisoData.TIPO_EMPRESA ) }, - new String[]{ AvisoData.EVENTO_ID, AvisoData.TIPO } ); - if( aviso == null ) - { - aviso = new AvisoData(); - } - aviso.set( AvisoData.TIPO, new Integer( AvisoData.TIPO_EMPRESA ) ); - EmpresaData empresa = ( EmpresaData ) object.get( MarcacaoEmpresaData.EMPRESA ); - aviso.set( AvisoData.EMPRESA, empresa ); - aviso.set( AvisoData.EVENTO_ID, object.get( MarcacaoEmpresaData.ID ) ); - Date dataEvento = (Date) object.get( Marcacao.DATA ); - aviso.set( AvisoData.DATA_EVENTO, dataEvento ); - aviso.set( AvisoData.DATA_AVISO, dataEvento ); - String descricao = "Tarefa "; - aviso.set( AvisoData.DESCRICAO, descricao ); - aviso.save(); - - empresa.save(); - } - else if( object instanceof MarcacaoEstabelecimentoData ) - { - AvisoData aviso = (AvisoData) JDO.load( AvisoData.class, - new Object[]{ object.get( MarcacaoEstabelecimentoData.ID ), new Integer( AvisoData.TIPO_ESTABELECIMENTO ) }, - new String[]{ AvisoData.EVENTO_ID, AvisoData.TIPO } ); - if( aviso == null ) - { - aviso = new AvisoData(); - } - aviso.set( AvisoData.TIPO, new Integer( AvisoData.TIPO_ESTABELECIMENTO ) ); - EstabelecimentoData estabelecimento = ( EstabelecimentoData ) object.get( MarcacaoEstabelecimentoData.ESTABELECIMENTO ); - aviso.set( AvisoData.ESTABELECIMENTO, estabelecimento ); - EmpresaData empresa = ( EmpresaData )estabelecimento.get( EstabelecimentoData.EMPRESA ); - aviso.set( AvisoData.EMPRESA, empresa ); - aviso.set( AvisoData.EVENTO_ID, object.get( MarcacaoEstabelecimentoData.ID ) ); - Date dataEvento = (Date) object.get( Marcacao.DATA ); - Date dataAviso = new Date( dataEvento.getTime() ); - Calendar cal = Calendar.getInstance(); - cal.setTime( dataAviso ); - cal.add( Calendar.DAY_OF_MONTH, -14 ); - dataAviso = cal.getTime(); - aviso.set( AvisoData.DATA_AVISO, dataAviso ); - aviso.set( AvisoData.DATA_EVENTO, dataEvento ); - String descricao = "Visita "; - aviso.set( AvisoData.DESCRICAO, descricao ); - cal = Calendar.getInstance(); - cal.setTime( dataEvento ); - cal.set( cal.get( Calendar.YEAR ), cal.get( Calendar.MONTH ), cal.get( Calendar.DAY_OF_MONTH ), 0, 0, 0 ); - cal.set( Calendar.MILLISECOND, 0 ); - dataEvento = cal.getTime(); - - cal = Calendar.getInstance(); - cal.set( cal.get( Calendar.YEAR ), cal.get( Calendar.MONTH ), cal.get( Calendar.DAY_OF_MONTH ), 10, 0, 0 ); - cal.set( Calendar.MILLISECOND, 0 ); - Date hoje = cal.getTime(); - if( hoje.before( dataEvento ) ) - { - aviso.save(); - } - - estabelecimento.save(); - } - if( object instanceof MarcacaoTrabalhadorData ) - { - AvisoData aviso = (AvisoData) JDO.load( AvisoData.class, - new Object[]{ object.get( MarcacaoTrabalhadorData.ID ), new Integer( AvisoData.TIPO_TRABALHADOR ) }, - new String[]{ AvisoData.EVENTO_ID, AvisoData.TIPO } ); - System.out.println( "AVISO LOADED: " + aviso + " id: " + ( aviso != null ? aviso.get( AvisoData.ID ) : "n/a" ) - + " MT.ID: " + object.get( MarcacaoTrabalhadorData.ID ) - + " AD.TIPO: " + new Integer( AvisoData.TIPO_TRABALHADOR ) ); - if( aviso == null ) - { - System.out.println( "novo aviso" ); - aviso = new AvisoData(); - } - aviso.set( AvisoData.TIPO, new Integer( AvisoData.TIPO_TRABALHADOR ) ); - TrabalhadorData trab = ( TrabalhadorData ) object.get( MarcacaoTrabalhadorData.TRABALHADOR ); - aviso.set( AvisoData.TRABALHADOR, trab ); - EstabelecimentoData estabelecimento = ( EstabelecimentoData ) trab.get( TrabalhadorData.ESTABELECIMENTO ); - aviso.set( AvisoData.ESTABELECIMENTO, estabelecimento ); - EmpresaData empresa = ( EmpresaData ) estabelecimento.get( EstabelecimentoData.EMPRESA ); - aviso.set( AvisoData.EMPRESA, empresa ); - aviso.set( AvisoData.EVENTO_ID, object.get( MarcacaoTrabalhadorData.ID ) ); - Date dataEvento = (Date) object.get( Marcacao.DATA ); - Date dataAviso = new Date( dataEvento.getTime() ); - Calendar cal = Calendar.getInstance(); - cal.setTime( dataAviso ); - cal.add( Calendar.DAY_OF_MONTH, -14 ); - dataAviso = cal.getTime(); - aviso.set( AvisoData.DATA_AVISO, dataAviso ); - aviso.set( AvisoData.DATA_EVENTO, dataEvento.clone() ); - String descricao = ""; - switch( ( ( Integer ) object.get( MarcacaoTrabalhadorData.TIPO ) ).intValue() ) - { - case MarcacaoTrabalhadorData.TIPO_EXAMES: - descricao = "Exames"; - break; - - case MarcacaoTrabalhadorData.TIPO_CONSULTA: - Integer motivo = ( ( Integer ) object.get( MarcacaoTrabalhadorData.MOTIVO ) ); - descricao = "Consulta " + ( motivo == null ? "" : ("(" + MedicinaDataProvider.TIPOS_CONSULTAS[ motivo.intValue() ] + ")" ) ); - break; - } - aviso.set( AvisoData.DESCRICAO, descricao ); - cal = Calendar.getInstance(); - cal.setTime( dataEvento ); - cal.set( cal.get( Calendar.YEAR ), cal.get( Calendar.MONTH ), cal.get( Calendar.DAY_OF_MONTH ), 0, 0, 0 ); - cal.set( Calendar.MILLISECOND, 0 ); - dataEvento = cal.getTime(); - - cal = Calendar.getInstance(); - cal.set( cal.get( Calendar.YEAR ), cal.get( Calendar.MONTH ), cal.get( Calendar.DAY_OF_MONTH ), 10, 0, 0 ); - cal.set( Calendar.MILLISECOND, 0 ); - Date hoje = cal.getTime(); - if( hoje.before( dataEvento ) ) - { - if( !hoje.before( dataAviso ) ) - { - aviso.set( AvisoData.DATA_AVISO, dataEvento.clone() ); - } - aviso.save(); - } - - trab.save(); - } - else - { - return false; - } - return true; - } - - protected boolean preDelete( Marcacao object ) - throws Exception - { - if( object instanceof MarcacaoTrabalhadorData && - ( ( Integer ) object.get( MarcacaoTrabalhadorData.TIPO ) ).intValue() == MarcacaoTrabalhadorData.TIPO_EXAMES ) - { - if( medicinaProvider == null ) - { - medicinaProvider = (MedicinaDataProvider)MedicinaDataProvider.getProvider(); - } - medicinaProvider.deleteDetalhesRealizadosForMarcacao( ( Integer ) object.get( MarcacaoTrabalhadorData.ID ) ); - return true; - } - return false; - } - - protected boolean postDelete( Marcacao object ) - throws Exception - { -System.out.println( "!delete!" ); - Integer tipo; - if( object instanceof MarcacaoEmpresaData ) - { - tipo = new Integer( AvisoData.TIPO_EMPRESA ); - } - else if( object instanceof MarcacaoEstabelecimentoData ) - { - tipo = new Integer( AvisoData.TIPO_ESTABELECIMENTO ); - } - if( object instanceof MarcacaoTrabalhadorData ) - { - tipo = new Integer( AvisoData.TIPO_TRABALHADOR ); - } - else - { - return false; - } - AvisoData aviso = (AvisoData) JDO.load( AvisoData.class, - new Object[]{ object.get( "id" ), tipo }, - new String[]{ AvisoData.EVENTO_ID, AvisoData.TIPO } ); - if( aviso != null ) - { - aviso.delete(); - } - - return true; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/MarcacaoTrabalhador.java b/trunk/SIPRPSoft/src/siprp/data/MarcacaoTrabalhador.java deleted file mode 100644 index 8835ae31..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/MarcacaoTrabalhador.java +++ /dev/null @@ -1,204 +0,0 @@ -/* -* MarcacaoTrabalhador.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 28, 2006 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.util.Date; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class MarcacaoTrabalhador implements JDOInnerObject -{ - private Integer id; - private Date data; - private String realizada; - private Integer estado; - private Integer motivo; - private Date data_email; - private Date data_relatorio; - private Integer tipo; - private Trabalhador trabalhador; - private String observacoes; - - public MarcacaoTrabalhador() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == MarcacaoTrabalhadorData.ID ) - { - return id; - } - else if( fieldName == MarcacaoTrabalhadorData.DATA ) - { - return data; - } - else if( fieldName == MarcacaoTrabalhadorData.REALIZADA ) - { - return realizada; - } - else if( fieldName == MarcacaoTrabalhadorData.ESTADO ) - { - return estado; - } - else if( fieldName == MarcacaoTrabalhadorData.MOTIVO ) - { - return motivo; - } - else if( fieldName == MarcacaoTrabalhadorData.DATA_EMAIL ) - { - return data_email; - } - else if( fieldName == MarcacaoTrabalhadorData.DATA_RELATORIO ) - { - return data_relatorio; - } - else if( fieldName == MarcacaoTrabalhadorData.TIPO ) - { - return tipo; - } - else if( fieldName == MarcacaoTrabalhadorData.TRABALHADOR ) - { - return trabalhador; - } - else if( fieldName == MarcacaoTrabalhadorData.OBSERVACOES ) - { - return observacoes; - } - else if( fieldName.equals( MarcacaoTrabalhadorData.ID ) ) - { - return id; - } - else if( fieldName.equals( MarcacaoTrabalhadorData.DATA ) ) - { - return data; - } - else if( fieldName.equals( MarcacaoTrabalhadorData.REALIZADA ) ) - { - return realizada; - } - else if( fieldName.equals( MarcacaoTrabalhadorData.ESTADO ) ) - { - return estado; - } - else if( fieldName.equals( MarcacaoTrabalhadorData.MOTIVO ) ) - { - return motivo; - } - else if( fieldName.equals( MarcacaoTrabalhadorData.DATA_EMAIL ) ) - { - return data_email; - } - else if( fieldName.equals( MarcacaoTrabalhadorData.DATA_RELATORIO ) ) - { - return data_relatorio; - } - else if( fieldName.equals( MarcacaoTrabalhadorData.TIPO ) ) - { - return tipo; - } - else if( fieldName.equals( MarcacaoTrabalhadorData.TRABALHADOR ) ) - { - return trabalhador; - } - else if( fieldName.equals( MarcacaoTrabalhadorData.OBSERVACOES ) ) - { - return observacoes; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == MarcacaoTrabalhadorData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == MarcacaoTrabalhadorData.DATA ) - { - data = ( Date ) value; - } - else if( fieldName == MarcacaoTrabalhadorData.REALIZADA ) - { - realizada = ( String ) value; - } - else if( fieldName == MarcacaoTrabalhadorData.ESTADO ) - { - estado = ( Integer ) value; - } - else if( fieldName == MarcacaoTrabalhadorData.MOTIVO ) - { - motivo = ( Integer ) value; - } - else if( fieldName == MarcacaoTrabalhadorData.DATA_EMAIL ) - { - data_email = ( Date ) value; - } - else if( fieldName == MarcacaoTrabalhadorData.DATA_RELATORIO ) - { - data_relatorio = ( Date ) value; - } - else if( fieldName == MarcacaoTrabalhadorData.TIPO ) - { - tipo = ( Integer ) value; - } - else if( fieldName == MarcacaoTrabalhadorData.TRABALHADOR ) - { - trabalhador = ( Trabalhador ) value; - } - else if( fieldName == MarcacaoTrabalhadorData.OBSERVACOES ) - { - observacoes = ( String ) value; - } - else if( fieldName.equals( MarcacaoTrabalhadorData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( MarcacaoTrabalhadorData.DATA ) ) - { - data = ( Date ) value; - } - else if( fieldName.equals( MarcacaoTrabalhadorData.REALIZADA ) ) - { - realizada = ( String ) value; - } - else if( fieldName.equals( MarcacaoTrabalhadorData.ESTADO ) ) - { - estado = ( Integer ) value; - } - else if( fieldName.equals( MarcacaoTrabalhadorData.MOTIVO ) ) - { - motivo = ( Integer ) value; - } - else if( fieldName.equals( MarcacaoTrabalhadorData.DATA_EMAIL ) ) - { - data_email = ( Date ) value; - } - else if( fieldName.equals( MarcacaoTrabalhadorData.DATA_RELATORIO ) ) - { - data_relatorio = ( Date ) value; - } - else if( fieldName.equals( MarcacaoTrabalhadorData.TIPO ) ) - { - tipo = ( Integer ) value; - } - else if( fieldName.equals( MarcacaoTrabalhadorData.TRABALHADOR ) ) - { - trabalhador = ( Trabalhador ) value; - } - else if( fieldName.equals( MarcacaoTrabalhadorData.OBSERVACOES ) ) - { - observacoes = ( String ) value; - } - } - - public Class getOuterClass() - { - return MarcacaoTrabalhadorData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/MarcacaoTrabalhadorData.java b/trunk/SIPRPSoft/src/siprp/data/MarcacaoTrabalhadorData.java deleted file mode 100644 index 0919c0ae..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/MarcacaoTrabalhadorData.java +++ /dev/null @@ -1,68 +0,0 @@ -/* -* MarcacaoTrabalhadorData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 28, 2006 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.util.HashMap; - -public final class MarcacaoTrabalhadorData extends Marcacao - implements MarcacaoTrabalhadorConstants -{ - public static final String ID = "id"; - public static final String DATA = "data"; - public static final String REALIZADA = "realizada"; - public static final String ESTADO = "estado"; - public static final String MOTIVO = "motivo"; - public static final String DATA_EMAIL = "data_email"; - public static final String DATA_RELATORIO = "data_relatorio"; - public static final String TIPO = "tipo"; - public static final String TRABALHADOR = "trabalhador"; - public static final String OBSERVACOES = "observacoes"; - - public static final String FIELD_NAMES[] = new String[]{ - DATA, REALIZADA, ESTADO, MOTIVO, DATA_EMAIL, DATA_RELATORIO, TIPO, TRABALHADOR, - OBSERVACOES, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, DATA, REALIZADA, ESTADO, MOTIVO, DATA_EMAIL, DATA_RELATORIO, TIPO, TRABALHADOR, - OBSERVACOES, }; - - private HashMap dataHash; - - public MarcacaoTrabalhadorData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return MarcacaoTrabalhador.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/MarcacaoTrabalhadorID.java b/trunk/SIPRPSoft/src/siprp/data/MarcacaoTrabalhadorID.java deleted file mode 100644 index abd9163c..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/MarcacaoTrabalhadorID.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -* MarcacaoTrabalhadorID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Jan 28, 2006 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.io.Serializable; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class MarcacaoTrabalhadorID extends IntegerID - implements Serializable -{ - public MarcacaoTrabalhadorID() - { - } - - public MarcacaoTrabalhadorID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/Medico.java b/trunk/SIPRPSoft/src/siprp/data/Medico.java deleted file mode 100644 index 178429b1..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/Medico.java +++ /dev/null @@ -1,100 +0,0 @@ -/* -* Medico.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on 27/Jan/2005 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class Medico implements JDOInnerObject -{ - private Integer id; - private String nome; - private String numero_cedula; - private String inactivo; - - public Medico() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == MedicoData.ID ) - { - return id; - } - else if( fieldName == MedicoData.NOME ) - { - return nome; - } - else if( fieldName == MedicoData.NUMERO_CEDULA ) - { - return numero_cedula; - } - else if( fieldName == MedicoData.INACTIVO ) - { - return inactivo; - } - else if( fieldName.equals( MedicoData.ID ) ) - { - return id; - } - else if( fieldName.equals( MedicoData.NOME ) ) - { - return nome; - } - else if( fieldName.equals( MedicoData.NUMERO_CEDULA ) ) - { - return numero_cedula; - } - else if( fieldName.equals( MedicoData.INACTIVO ) ) - { - return inactivo; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == MedicoData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == MedicoData.NOME ) - { - nome = ( String ) value; - } - else if( fieldName == MedicoData.NUMERO_CEDULA ) - { - numero_cedula = ( String ) value; - } - else if( fieldName == MedicoData.INACTIVO ) - { - inactivo = ( String ) value; - } - else if( fieldName.equals( MedicoData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( MedicoData.NOME ) ) - { - nome = ( String ) value; - } - else if( fieldName.equals( MedicoData.NUMERO_CEDULA ) ) - { - numero_cedula = ( String ) value; - } - else if( fieldName.equals( MedicoData.INACTIVO ) ) - { - inactivo = ( String ) value; - } - } - - public Class getOuterClass() - { - return MedicoData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/MedicoData.java b/trunk/SIPRPSoft/src/siprp/data/MedicoData.java deleted file mode 100644 index 9c18e5f9..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/MedicoData.java +++ /dev/null @@ -1,62 +0,0 @@ -/* -* MedicoData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on 27/Jan/2005 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.util.HashMap; - -import com.evolute.utils.jdo.JDOObject; - -public final class MedicoData extends JDOObject - implements DisableDeleteable -{ - public static final String ID = "id"; - public static final String NOME = "nome"; - public static final String NUMERO_CEDULA = "numero_cedula"; - public static final String INACTIVO = "inactivo"; - - public static final String FIELD_NAMES[] = new String[]{ - NOME, NUMERO_CEDULA, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, NOME, NUMERO_CEDULA, INACTIVO, }; - - private HashMap dataHash; - - public MedicoData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return Medico.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/MedicoID.java b/trunk/SIPRPSoft/src/siprp/data/MedicoID.java deleted file mode 100644 index 3b34b83d..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/MedicoID.java +++ /dev/null @@ -1,22 +0,0 @@ -/* -* MedicoID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on 27/Jan/2005 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class MedicoID extends IntegerID -{ - public MedicoID() - { - } - - public MedicoID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/SearchExecuterFactory.java b/trunk/SIPRPSoft/src/siprp/data/SearchExecuterFactory.java index 6080dd16..3c7ff165 100644 --- a/trunk/SIPRPSoft/src/siprp/data/SearchExecuterFactory.java +++ b/trunk/SIPRPSoft/src/siprp/data/SearchExecuterFactory.java @@ -6,6 +6,10 @@ package siprp.data; +import siprp.data.outer.EmpresasData; +import siprp.data.outer.EstabelecimentosData; +import siprp.data.outer.TrabalhadoresData; + import com.evolute.utils.Singleton; import com.evolute.utils.arrays.Virtual2DArray; import com.evolute.utils.db.DBManager; @@ -34,16 +38,15 @@ public class SearchExecuterFactory public static SearchExecuter getSearchExecuter( Class objectClass ) { - if( objectClass.equals( EmpresaData.class ) ) + if( objectClass.equals( EmpresasData.class ) ) { -System.out.println( "Empresa" ); return getEmpresaSearchExecuter(); } - else if( objectClass == EstabelecimentoData.class ) + else if( objectClass == EstabelecimentosData.class ) { return getEstabelecimentoSearchExecuter(); } - else if( objectClass == TrabalhadorData.class ) + else if( objectClass == TrabalhadoresData.class ) { return getTrabalhadorSearchExecuter(); } @@ -64,10 +67,10 @@ System.out.println( "Empresa" ); Executer executer = dbm.getSharedExecuter( this ); Select select = new Select( new String[]{ "empresas" }, - new String[]{ EmpresaData.ID, EmpresaData.DESIGNACAO_SOCIAL, EmpresaData.DESIGNACAO_SOCIAL_PLAIN }, - new Field( EmpresaData.DESIGNACAO_SOCIAL_PLAIN ).isLike( "%" + com.evolute.utils.strings.StringPlainer.convertString( pattern, false, false ) + "%" ).and( - new Field( EmpresaData.INACTIVO ).isDifferent( "y" ) ), - new String[]{ EmpresaData.DESIGNACAO_SOCIAL_PLAIN }, null ); + new String[]{ EmpresasData.ID, EmpresasData.DESIGNACAO_SOCIAL, EmpresasData.DESIGNACAO_SOCIAL_PLAIN }, + new Field( EmpresasData.DESIGNACAO_SOCIAL_PLAIN ).isLike( "%" + com.evolute.utils.strings.StringPlainer.convertString( pattern, false, false ) + "%" ).and( + new Field( EmpresasData.INACTIVO ).isDifferent( "y" ) ), + new String[]{ EmpresasData.DESIGNACAO_SOCIAL_PLAIN }, null ); System.out.println( "SELECT : " + select ); return executer.executeQuery( select ); } @@ -108,9 +111,9 @@ System.out.println( "SELECT : " + select ); { Executer executer = dbm.getSharedExecuter( this ); Select select = new Select( new String[]{ "estabelecimentos" }, - new String[]{ EstabelecimentoData.ID, EstabelecimentoData.NOME, EstabelecimentoData.NOME_PLAIN }, - new Field( EstabelecimentoData.NOME_PLAIN ).isLike( "%" + com.evolute.utils.strings.StringPlainer.convertString( pattern, false, false ) + "%" ), - new String[]{ EstabelecimentoData.NOME_PLAIN }, null ); + new String[]{ EstabelecimentosData.ID, EstabelecimentosData.NOME, EstabelecimentosData.NOME_PLAIN }, + new Field( EstabelecimentosData.NOME_PLAIN ).isLike( "%" + com.evolute.utils.strings.StringPlainer.convertString( pattern, false, false ) + "%" ), + new String[]{ EstabelecimentosData.NOME_PLAIN }, null ); return executer.executeQuery( select ); } @@ -151,9 +154,9 @@ System.out.println( "SELECT : " + select ); { Executer executer = dbm.getSharedExecuter( this ); Select select = new Select( new String[]{ "trabalhadores" }, - new String[]{ TrabalhadorData.ID, TrabalhadorData.NOME, TrabalhadorData.NOME_PLAIN }, - new Field( TrabalhadorData.NOME_PLAIN ).isLike( "%" + com.evolute.utils.strings.StringPlainer.convertString( pattern, false, false ) + "%" ), - new String[]{ TrabalhadorData.NOME_PLAIN }, null ); + new String[]{ TrabalhadoresData.ID, TrabalhadoresData.NOME, TrabalhadoresData.NOME_PLAIN }, + new Field( TrabalhadoresData.NOME_PLAIN ).isLike( "%" + com.evolute.utils.strings.StringPlainer.convertString( pattern, false, false ) + "%" ), + new String[]{ TrabalhadoresData.NOME_PLAIN }, null ); return executer.executeQuery( select ); } diff --git a/trunk/SIPRPSoft/src/siprp/data/TecnicoHST.java b/trunk/SIPRPSoft/src/siprp/data/TecnicoHST.java deleted file mode 100644 index 578302f0..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/TecnicoHST.java +++ /dev/null @@ -1,151 +0,0 @@ -/* -* TecnicoHST.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Feb 1, 2006 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class TecnicoHST implements JDOInnerObject -{ - private Integer id; - private String nome; - private String nome_plain; - private String iniciais; - private Integer identificador; - private String inactivo; - private String is_superior; - - public TecnicoHST() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == TecnicoHSTData.ID ) - { - return id; - } - else if( fieldName == TecnicoHSTData.NOME ) - { - return nome; - } - else if( fieldName == TecnicoHSTData.NOME_PLAIN ) - { - return nome_plain; - } - else if( fieldName == TecnicoHSTData.INICIAIS ) - { - return iniciais; - } - else if( fieldName == TecnicoHSTData.IDENTIFICADOR ) - { - return identificador; - } - else if( fieldName == TecnicoHSTData.INACTIVO ) - { - return inactivo; - } - else if( fieldName == TecnicoHSTData.IS_SUPERIOR ) - { - return is_superior; - } - else if( fieldName.equals( TecnicoHSTData.ID ) ) - { - return id; - } - else if( fieldName.equals( TecnicoHSTData.NOME ) ) - { - return nome; - } - else if( fieldName.equals( TecnicoHSTData.NOME_PLAIN ) ) - { - return nome_plain; - } - else if( fieldName.equals( TecnicoHSTData.INICIAIS ) ) - { - return iniciais; - } - else if( fieldName.equals( TecnicoHSTData.IDENTIFICADOR ) ) - { - return identificador; - } - else if( fieldName.equals( TecnicoHSTData.INACTIVO ) ) - { - return inactivo; - } - else if( fieldName.equals( TecnicoHSTData.IS_SUPERIOR ) ) - { - return is_superior; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == TecnicoHSTData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == TecnicoHSTData.NOME ) - { - nome = ( String ) value; - } - else if( fieldName == TecnicoHSTData.NOME_PLAIN ) - { - nome_plain = ( String ) value; - } - else if( fieldName == TecnicoHSTData.INICIAIS ) - { - iniciais = ( String ) value; - } - else if( fieldName == TecnicoHSTData.IDENTIFICADOR ) - { - identificador = ( Integer ) value; - } - else if( fieldName == TecnicoHSTData.INACTIVO ) - { - inactivo = ( String ) value; - } - else if( fieldName == TecnicoHSTData.IS_SUPERIOR ) - { - is_superior = ( String ) value; - } - else if( fieldName.equals( TecnicoHSTData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( TecnicoHSTData.NOME ) ) - { - nome = ( String ) value; - } - else if( fieldName.equals( TecnicoHSTData.NOME_PLAIN ) ) - { - nome_plain = ( String ) value; - } - else if( fieldName.equals( TecnicoHSTData.INICIAIS ) ) - { - iniciais = ( String ) value; - } - else if( fieldName.equals( TecnicoHSTData.IDENTIFICADOR ) ) - { - identificador = ( Integer ) value; - } - else if( fieldName.equals( TecnicoHSTData.INACTIVO ) ) - { - inactivo = ( String ) value; - } - else if( fieldName.equals( TecnicoHSTData.IS_SUPERIOR ) ) - { - is_superior = ( String ) value; - } - } - - public Class getOuterClass() - { - return TecnicoHSTData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/TecnicoHSTData.java b/trunk/SIPRPSoft/src/siprp/data/TecnicoHSTData.java deleted file mode 100644 index 52cfd269..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/TecnicoHSTData.java +++ /dev/null @@ -1,65 +0,0 @@ -/* -* TecnicoHSTData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Feb 1, 2006 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.util.HashMap; - -import com.evolute.utils.jdo.JDOObject; - -public final class TecnicoHSTData extends JDOObject - implements DisableDeleteable -{ - public static final String ID = "id"; - public static final String NOME = "nome"; - public static final String NOME_PLAIN = "nome_plain"; - public static final String INICIAIS = "iniciais"; - public static final String IDENTIFICADOR = "identificador"; - public static final String INACTIVO = "inactivo"; - public static final String IS_SUPERIOR = "is_superior"; - - public static final String FIELD_NAMES[] = new String[]{ - NOME, NOME_PLAIN, INICIAIS, IDENTIFICADOR, IS_SUPERIOR, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, NOME, NOME_PLAIN, INICIAIS, IDENTIFICADOR, INACTIVO, IS_SUPERIOR }; - - private HashMap dataHash; - - public TecnicoHSTData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return TecnicoHST.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/TecnicoHSTID.java b/trunk/SIPRPSoft/src/siprp/data/TecnicoHSTID.java deleted file mode 100644 index c578ee65..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/TecnicoHSTID.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -* TecnicoHSTID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Feb 1, 2006 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.io.Serializable; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class TecnicoHSTID extends IntegerID - implements Serializable -{ - public TecnicoHSTID() - { - } - - public TecnicoHSTID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/Trabalhador.java b/trunk/SIPRPSoft/src/siprp/data/Trabalhador.java deleted file mode 100644 index a60fda4c..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/Trabalhador.java +++ /dev/null @@ -1,374 +0,0 @@ -/* -* Trabalhador.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on 24/Nov/2005 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.util.Date; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class Trabalhador implements JDOInnerObject -{ - private Integer id; - private String nome; - private String nome_plain; - private String sexo; - private Date data_nascimento; - private String nacionalidade; - private String numero_mecanografico; - private Date data_admissao; - private String categoria; - private String local_trabalho; - private String funcao_proposta; - private Date data_admissao_funcao; - private String observacoes; - private Estabelecimento estabelecimento; - private Date data_demissao; - private String observacoes_gestao; - private Integer perfil; - private String bi; - private String inactivo; - private Date actualizacao; - - public Trabalhador() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == TrabalhadorData.ID ) - { - return id; - } - else if( fieldName == TrabalhadorData.NOME ) - { - return nome; - } - else if( fieldName == TrabalhadorData.NOME_PLAIN ) - { - return nome_plain; - } - else if( fieldName == TrabalhadorData.SEXO ) - { - return sexo; - } - else if( fieldName == TrabalhadorData.DATA_NASCIMENTO ) - { - return data_nascimento; - } - else if( fieldName == TrabalhadorData.NACIONALIDADE ) - { - return nacionalidade; - } - else if( fieldName == TrabalhadorData.NUMERO_MECANOGRAFICO ) - { - return numero_mecanografico; - } - else if( fieldName == TrabalhadorData.DATA_ADMISSAO ) - { - return data_admissao; - } - else if( fieldName == TrabalhadorData.CATEGORIA ) - { - return categoria; - } - else if( fieldName == TrabalhadorData.LOCAL_TRABALHO ) - { - return local_trabalho; - } - else if( fieldName == TrabalhadorData.FUNCAO_PROPOSTA ) - { - return funcao_proposta; - } - else if( fieldName == TrabalhadorData.DATA_ADMISSAO_FUNCAO ) - { - return data_admissao_funcao; - } - else if( fieldName == TrabalhadorData.OBSERVACOES ) - { - return observacoes; - } - else if( fieldName == TrabalhadorData.ESTABELECIMENTO ) - { - return estabelecimento; - } - else if( fieldName == TrabalhadorData.DATA_DEMISSAO ) - { - return data_demissao; - } - else if( fieldName == TrabalhadorData.OBSERVACOES_GESTAO ) - { - return observacoes_gestao; - } - else if( fieldName == TrabalhadorData.PERFIL ) - { - return perfil; - } - else if( fieldName == TrabalhadorData.INACTIVO ) - { - return inactivo; - } - else if( fieldName == TrabalhadorData.ACTUALIZACAO ) - { - return actualizacao; - } - else if( fieldName == TrabalhadorData.BI ) - { - return bi; - } - else if( fieldName.equals( TrabalhadorData.ID ) ) - { - return id; - } - else if( fieldName.equals( TrabalhadorData.NOME ) ) - { - return nome; - } - else if( fieldName.equals( TrabalhadorData.NOME_PLAIN ) ) - { - return nome_plain; - } - else if( fieldName.equals( TrabalhadorData.SEXO ) ) - { - return sexo; - } - else if( fieldName.equals( TrabalhadorData.DATA_NASCIMENTO ) ) - { - return data_nascimento; - } - else if( fieldName.equals( TrabalhadorData.NACIONALIDADE ) ) - { - return nacionalidade; - } - else if( fieldName.equals( TrabalhadorData.NUMERO_MECANOGRAFICO ) ) - { - return numero_mecanografico; - } - else if( fieldName.equals( TrabalhadorData.DATA_ADMISSAO ) ) - { - return data_admissao; - } - else if( fieldName.equals( TrabalhadorData.CATEGORIA ) ) - { - return categoria; - } - else if( fieldName.equals( TrabalhadorData.LOCAL_TRABALHO ) ) - { - return local_trabalho; - } - else if( fieldName.equals( TrabalhadorData.FUNCAO_PROPOSTA ) ) - { - return funcao_proposta; - } - else if( fieldName.equals( TrabalhadorData.DATA_ADMISSAO_FUNCAO ) ) - { - return data_admissao_funcao; - } - else if( fieldName.equals( TrabalhadorData.OBSERVACOES ) ) - { - return observacoes; - } - else if( fieldName.equals( TrabalhadorData.ESTABELECIMENTO ) ) - { - return estabelecimento; - } - else if( fieldName.equals( TrabalhadorData.DATA_DEMISSAO ) ) - { - return data_demissao; - } - else if( fieldName.equals( TrabalhadorData.OBSERVACOES_GESTAO ) ) - { - return observacoes_gestao; - } - else if( fieldName.equals( TrabalhadorData.PERFIL ) ) - { - return perfil; - } - else if( fieldName.equals( TrabalhadorData.INACTIVO ) ) - { - return inactivo; - } - else if( fieldName.equals( TrabalhadorData.ACTUALIZACAO ) ) - { - return actualizacao; - } - else if( fieldName.equals( TrabalhadorData.BI ) ) - { - return bi; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == TrabalhadorData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == TrabalhadorData.NOME ) - { - nome = ( String ) value; - } - else if( fieldName == TrabalhadorData.NOME_PLAIN ) - { - nome_plain = ( String ) value; - } - else if( fieldName == TrabalhadorData.SEXO ) - { - sexo = ( String ) value; - } - else if( fieldName == TrabalhadorData.DATA_NASCIMENTO ) - { - data_nascimento = ( Date ) value; - } - else if( fieldName == TrabalhadorData.NACIONALIDADE ) - { - nacionalidade = ( String ) value; - } - else if( fieldName == TrabalhadorData.NUMERO_MECANOGRAFICO ) - { - numero_mecanografico = ( String ) value; - } - else if( fieldName == TrabalhadorData.DATA_ADMISSAO ) - { - data_admissao = ( Date ) value; - } - else if( fieldName == TrabalhadorData.CATEGORIA ) - { - categoria = ( String ) value; - } - else if( fieldName == TrabalhadorData.LOCAL_TRABALHO ) - { - local_trabalho = ( String ) value; - } - else if( fieldName == TrabalhadorData.FUNCAO_PROPOSTA ) - { - funcao_proposta = ( String ) value; - } - else if( fieldName == TrabalhadorData.DATA_ADMISSAO_FUNCAO ) - { - data_admissao_funcao = ( Date ) value; - } - else if( fieldName == TrabalhadorData.OBSERVACOES ) - { - observacoes = ( String ) value; - } - else if( fieldName == TrabalhadorData.ESTABELECIMENTO ) - { - estabelecimento = ( Estabelecimento ) value; - } - else if( fieldName == TrabalhadorData.DATA_DEMISSAO ) - { - data_demissao = ( Date ) value; - } - else if( fieldName == TrabalhadorData.OBSERVACOES_GESTAO ) - { - observacoes_gestao = ( String ) value; - } - else if( fieldName == TrabalhadorData.PERFIL ) - { - perfil = ( Integer ) value; - } - else if( fieldName == TrabalhadorData.INACTIVO ) - { - inactivo = ( String ) value; - } - else if( fieldName == TrabalhadorData.ACTUALIZACAO ) - { - actualizacao = ( Date ) value; - } - else if( fieldName == TrabalhadorData.BI ) - { - bi = ( String ) value; - } - else if( fieldName.equals( TrabalhadorData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadorData.NOME ) ) - { - nome = ( String ) value; - } - else if( fieldName.equals( TrabalhadorData.NOME_PLAIN ) ) - { - nome_plain = ( String ) value; - } - else if( fieldName.equals( TrabalhadorData.SEXO ) ) - { - sexo = ( String ) value; - } - else if( fieldName.equals( TrabalhadorData.DATA_NASCIMENTO ) ) - { - data_nascimento = ( Date ) value; - } - else if( fieldName.equals( TrabalhadorData.NACIONALIDADE ) ) - { - nacionalidade = ( String ) value; - } - else if( fieldName.equals( TrabalhadorData.NUMERO_MECANOGRAFICO ) ) - { - numero_mecanografico = ( String ) value; - } - else if( fieldName.equals( TrabalhadorData.DATA_ADMISSAO ) ) - { - data_admissao = ( Date ) value; - } - else if( fieldName.equals( TrabalhadorData.CATEGORIA ) ) - { - categoria = ( String ) value; - } - else if( fieldName.equals( TrabalhadorData.LOCAL_TRABALHO ) ) - { - local_trabalho = ( String ) value; - } - else if( fieldName.equals( TrabalhadorData.FUNCAO_PROPOSTA ) ) - { - funcao_proposta = ( String ) value; - } - else if( fieldName.equals( TrabalhadorData.DATA_ADMISSAO_FUNCAO ) ) - { - data_admissao_funcao = ( Date ) value; - } - else if( fieldName.equals( TrabalhadorData.OBSERVACOES ) ) - { - observacoes = ( String ) value; - } - else if( fieldName.equals( TrabalhadorData.ESTABELECIMENTO ) ) - { - estabelecimento = ( Estabelecimento ) value; - } - else if( fieldName.equals( TrabalhadorData.DATA_DEMISSAO ) ) - { - data_demissao = ( Date ) value; - } - else if( fieldName.equals( TrabalhadorData.OBSERVACOES_GESTAO ) ) - { - observacoes_gestao = ( String ) value; - } - else if( fieldName.equals( TrabalhadorData.PERFIL ) ) - { - perfil = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadorData.INACTIVO ) ) - { - inactivo = ( String ) value; - } - else if( fieldName.equals( TrabalhadorData.ACTUALIZACAO ) ) - { - actualizacao = ( Date ) value; - } - else if( fieldName.equals( TrabalhadorData.BI ) ) - { - bi = ( String ) value; - } - } - - public Class getOuterClass() - { - return TrabalhadorData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/TrabalhadorData.java b/trunk/SIPRPSoft/src/siprp/data/TrabalhadorData.java deleted file mode 100644 index e907b82a..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/TrabalhadorData.java +++ /dev/null @@ -1,84 +0,0 @@ -/* -* TrabalhadorData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on 24/Nov/2005 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.util.HashMap; - -import com.evolute.utils.jdo.JDOObject; - -public final class TrabalhadorData extends JDOObject - implements DisableDeleteable, ActualizacaoSaveable -{ - public static final String ID = "id"; - public static final String NOME = "nome"; - public static final String NOME_PLAIN = "nome_plain"; - public static final String SEXO = "sexo"; - public static final String DATA_NASCIMENTO = "data_nascimento"; - public static final String NACIONALIDADE = "nacionalidade"; - public static final String NUMERO_MECANOGRAFICO = "numero_mecanografico"; - public static final String DATA_ADMISSAO = "data_admissao"; - public static final String CATEGORIA = "categoria"; - public static final String LOCAL_TRABALHO = "local_trabalho"; - public static final String FUNCAO_PROPOSTA = "funcao_proposta"; - public static final String DATA_ADMISSAO_FUNCAO = "data_admissao_funcao"; - public static final String OBSERVACOES = "observacoes"; - public static final String ESTABELECIMENTO = "estabelecimento"; - public static final String DATA_DEMISSAO = "data_demissao"; - public static final String OBSERVACOES_GESTAO = "observacoes_gestao"; - public static final String PERFIL = "perfil"; - public static final String BI = "bi"; - public static final String INACTIVO = "inactivo"; - public static final String ACTUALIZACAO = "actualizacao"; - - public static final String FIELD_NAMES[] = new String[]{ - NOME, NOME_PLAIN, SEXO, DATA_NASCIMENTO, NACIONALIDADE, NUMERO_MECANOGRAFICO, - DATA_ADMISSAO, CATEGORIA, LOCAL_TRABALHO, FUNCAO_PROPOSTA, - DATA_ADMISSAO_FUNCAO, OBSERVACOES, ESTABELECIMENTO, DATA_DEMISSAO, - BI, OBSERVACOES_GESTAO, PERFIL, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, NOME, NOME_PLAIN, SEXO, DATA_NASCIMENTO, NACIONALIDADE, NUMERO_MECANOGRAFICO, - DATA_ADMISSAO, CATEGORIA, LOCAL_TRABALHO, FUNCAO_PROPOSTA, - DATA_ADMISSAO_FUNCAO, OBSERVACOES, ESTABELECIMENTO, DATA_DEMISSAO, - BI, OBSERVACOES_GESTAO, PERFIL, INACTIVO, ACTUALIZACAO, }; - - private HashMap dataHash; - - public TrabalhadorData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return Trabalhador.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/TrabalhadorID.java b/trunk/SIPRPSoft/src/siprp/data/TrabalhadorID.java deleted file mode 100644 index 9560a787..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/TrabalhadorID.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -* TrabalhadorID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on 24/Nov/2005 -* -* Use but DON'T TOUCH -*/ -package siprp.data; - -import java.io.Serializable; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class TrabalhadorID extends IntegerID - implements Serializable -{ - public TrabalhadorID() - { - } - - public TrabalhadorID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/Actualizacao.java b/trunk/SIPRPSoft/src/siprp/data/inner/Actualizacao.java new file mode 100644 index 00000000..2ddbe6b4 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/Actualizacao.java @@ -0,0 +1,280 @@ +/* +* Actualizacao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class Actualizacao extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Actualizacao.HORA, Actualizacao.HORA_INDEX ); + FIELD_INDEXES.put( Actualizacao.HORA_FULL, Actualizacao.HORA_INDEX ); + FIELD_INDEXES.put( Actualizacao.ID, Actualizacao.ID_INDEX ); + FIELD_INDEXES.put( Actualizacao.ID_FULL, Actualizacao.ID_INDEX ); + } + + 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 = "actualizacao1277401737153"; + + public static final int _INVALID__INDEX = -1; + public static final String HORA = "hora"; + public static final String HORA_FULL = "actualizacao.hora"; + public static final int HORA_INDEX = 0; + public static final String ID = "id"; + public static final String ID_FULL = "actualizacao.id"; + public static final int ID_INDEX = 1; + + public static final String FIELD_NAMES[] = new String[]{ + HORA, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + HORA, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + HORA, ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + HORA, ID, }; + + private java.sql.Timestamp hora; + private Integer id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Actualizacao() + { + super(); + dirtyProperties = new boolean[]{ false, false }; + } + + public java.sql.Timestamp getHora() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HORA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.hora; + } + + public void setHora( java.sql.Timestamp hora ) + { + try + { + setLockedForRefresh( true ); + preProcess( HORA, hora ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.hora = hora; + LAZY_LOADED_OBJECTS.put( HORA, 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 + { + setLockedForRefresh( true ); + 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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Actualizacao.HORA_INDEX: + value = getHora(); + break; + case Actualizacao.ID_INDEX: + value = getId(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Actualizacao.HORA_INDEX: + value = this.hora; + break; + case Actualizacao.ID_INDEX: + value = this.id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Actualizacao.HORA_INDEX: + setHora( ( java.sql.Timestamp ) value ); + break; + case Actualizacao.ID_INDEX: + setId( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Actualizacao.HORA_INDEX: + this.hora = ( java.sql.Timestamp ) value; + break; + case Actualizacao.ID_INDEX: + this.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 Actualizacao.HORA_INDEX: + theClass = java.sql.Timestamp.class; + break; + case Actualizacao.ID_INDEX: + theClass = Integer.class; + break; + } + 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.IntegerPrimaryKey( TABLENAME, Actualizacao.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/Avisos.java b/trunk/SIPRPSoft/src/siprp/data/inner/Avisos.java new file mode 100644 index 00000000..c1a2e3a3 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/Avisos.java @@ -0,0 +1,782 @@ +/* +* Avisos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class Avisos extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + 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, siprp.data.outer.EmpresasData.class, siprp.data.outer.EmpresasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( Avisos.class, Avisos.ESTABELECIMENTO_ID, siprp.data.outer.EstabelecimentosData.class, siprp.data.outer.EstabelecimentosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeytrabalhador_idTotrabalhadores = + new com.evolute.entity.ForeignKey( Avisos.class, Avisos.TRABALHADOR_ID, siprp.data.outer.TrabalhadoresData.class, siprp.data.outer.TrabalhadoresData.ID ); + + public static final String TABLENAME = "avisos"; + + + public static final String CLASS_IDENTIFIER = "avisos1277401737154"; + + 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 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 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 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 siprp.data.outer.EmpresasData to_empresa_id; + private Integer estabelecimento_id; + private siprp.data.outer.EstabelecimentosData to_estabelecimento_id; + private Integer trabalhador_id; + private siprp.data.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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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( ( siprp.data.outer.EmpresasData ) value ); + break; + case Avisos.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case Avisos.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( siprp.data.outer.EstabelecimentosData ) value ); + break; + case Avisos.TRABALHADOR_ID_INDEX: + setTrabalhador_id( ( Integer ) value ); + break; + case Avisos.TO_TRABALHADOR_ID_INDEX: + setToTrabalhador_id( ( siprp.data.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 = ( siprp.data.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 = ( siprp.data.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 = ( siprp.data.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 = siprp.data.outer.EmpresasData.class; + break; + case Avisos.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case Avisos.TO_ESTABELECIMENTO_ID_INDEX: + theClass = siprp.data.outer.EstabelecimentosData.class; + break; + case Avisos.TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case Avisos.TO_TRABALHADOR_ID_INDEX: + theClass = siprp.data.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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/Contactos.java b/trunk/SIPRPSoft/src/siprp/data/inner/Contactos.java new file mode 100644 index 00000000..4326298a --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/Contactos.java @@ -0,0 +1,586 @@ +/* +* Contactos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class Contactos extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + 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 = "contactos1277401737155"; + + 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 + { + setLockedForRefresh( true ); + 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.ListfromEmpresas_contacto_1() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.EmpresasData.class , getPrimaryKey().getMap().get("id"), "contacto_1" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromEmpresas_contacto_2() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.EmpresasData.class , getPrimaryKey().getMap().get("id"), "contacto_2" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromEstabelecimentos_contacto_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.EstabelecimentosData.class , getPrimaryKey().getMap().get("id"), "contacto_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromPrestadores_contacto_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.PrestadoresData.class , getPrimaryKey().getMap().get("id"), "contacto_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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/EcdOficial.java b/trunk/SIPRPSoft/src/siprp/data/inner/EcdOficial.java new file mode 100644 index 00000000..85eb0b74 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/EcdOficial.java @@ -0,0 +1,445 @@ +/* +* EcdOficial.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class EcdOficial extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( EcdOficial.ID, EcdOficial.ID_INDEX ); + FIELD_INDEXES.put( EcdOficial.ID_FULL, EcdOficial.ID_INDEX ); + FIELD_INDEXES.put( EcdOficial.DESCRICAO, EcdOficial.DESCRICAO_INDEX ); + FIELD_INDEXES.put( EcdOficial.DESCRICAO_FULL, EcdOficial.DESCRICAO_INDEX ); + FIELD_INDEXES.put( EcdOficial.DESCRICAO_PLAIN, EcdOficial.DESCRICAO_PLAIN_INDEX ); + FIELD_INDEXES.put( EcdOficial.DESCRICAO_PLAIN_FULL, EcdOficial.DESCRICAO_PLAIN_INDEX ); + FIELD_INDEXES.put( EcdOficial.ORDEM, EcdOficial.ORDEM_INDEX ); + FIELD_INDEXES.put( EcdOficial.ORDEM_FULL, EcdOficial.ORDEM_INDEX ); + FIELD_INDEXES.put( EcdOficial.ACTIVO, EcdOficial.ACTIVO_INDEX ); + FIELD_INDEXES.put( EcdOficial.ACTIVO_FULL, EcdOficial.ACTIVO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "ecd_oficial"; + + + public static final String CLASS_IDENTIFIER = "ecd_oficial1277401737155"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "ecd_oficial.id"; + public static final int ID_INDEX = 0; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "ecd_oficial.descricao"; + public static final int DESCRICAO_INDEX = 1; + public static final String DESCRICAO_PLAIN = "descricao_plain"; + public static final String DESCRICAO_PLAIN_FULL = "ecd_oficial.descricao_plain"; + public static final int DESCRICAO_PLAIN_INDEX = 2; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "ecd_oficial.ordem"; + public static final int ORDEM_INDEX = 3; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "ecd_oficial.activo"; + public static final int ACTIVO_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, DESCRICAO_PLAIN, ORDEM, ACTIVO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO, TABLENAME + "." + DESCRICAO_PLAIN, TABLENAME + "." + ORDEM, TABLENAME + "." + ACTIVO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRICAO, DESCRICAO_PLAIN, ORDEM, ACTIVO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DESCRICAO, DESCRICAO_PLAIN, ORDEM, ACTIVO, }; + + private Integer id; + private String descricao; + private String descricao_plain; + private Integer ordem; + private String activo; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EcdOficial() + { + 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 + { + setLockedForRefresh( true ); + 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.ListfromTrabalhadoresEcd_ecd_oficial_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresEcdData.class , getPrimaryKey().getMap().get("id"), "ecd_oficial_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 + { + setLockedForRefresh( true ); + 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 getDescricao_plain() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESCRICAO_PLAIN ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.descricao_plain; + } + + public void setDescricao_plain( String descricao_plain ) + { + try + { + setLockedForRefresh( true ); + preProcess( DESCRICAO_PLAIN, descricao_plain ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.descricao_plain = descricao_plain; + LAZY_LOADED_OBJECTS.put( DESCRICAO_PLAIN, 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 EcdOficial.ID_INDEX: + value = getId(); + break; + case EcdOficial.DESCRICAO_INDEX: + value = getDescricao(); + break; + case EcdOficial.DESCRICAO_PLAIN_INDEX: + value = getDescricao_plain(); + break; + case EcdOficial.ORDEM_INDEX: + value = getOrdem(); + break; + case EcdOficial.ACTIVO_INDEX: + value = getActivo(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EcdOficial.ID_INDEX: + value = this.id; + break; + case EcdOficial.DESCRICAO_INDEX: + value = this.descricao; + break; + case EcdOficial.DESCRICAO_PLAIN_INDEX: + value = this.descricao_plain; + break; + case EcdOficial.ORDEM_INDEX: + value = this.ordem; + break; + case EcdOficial.ACTIVO_INDEX: + value = this.activo; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EcdOficial.ID_INDEX: + setId( ( Integer ) value ); + break; + case EcdOficial.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case EcdOficial.DESCRICAO_PLAIN_INDEX: + setDescricao_plain( ( String ) value ); + break; + case EcdOficial.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + case EcdOficial.ACTIVO_INDEX: + setActivo( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EcdOficial.ID_INDEX: + this.id = ( Integer ) value; + break; + case EcdOficial.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case EcdOficial.DESCRICAO_PLAIN_INDEX: + this.descricao_plain = ( String ) value; + break; + case EcdOficial.ORDEM_INDEX: + this.ordem = ( Integer ) value; + break; + case EcdOficial.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 EcdOficial.ID_INDEX: + theClass = Integer.class; + break; + case EcdOficial.DESCRICAO_INDEX: + theClass = String.class; + break; + case EcdOficial.DESCRICAO_PLAIN_INDEX: + theClass = String.class; + break; + case EcdOficial.ORDEM_INDEX: + theClass = Integer.class; + break; + case EcdOficial.ACTIVO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EcdOficial._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, EcdOficial.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/EmailPlanoDeActuacao.java b/trunk/SIPRPSoft/src/siprp/data/inner/EmailPlanoDeActuacao.java new file mode 100644 index 00000000..b0f6628d --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/EmailPlanoDeActuacao.java @@ -0,0 +1,380 @@ +/* +* EmailPlanoDeActuacao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class EmailPlanoDeActuacao extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( EmailPlanoDeActuacao.ID, EmailPlanoDeActuacao.ID_INDEX ); + FIELD_INDEXES.put( EmailPlanoDeActuacao.ID_FULL, EmailPlanoDeActuacao.ID_INDEX ); + FIELD_INDEXES.put( EmailPlanoDeActuacao.DESCRIPTION, EmailPlanoDeActuacao.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( EmailPlanoDeActuacao.DESCRIPTION_FULL, EmailPlanoDeActuacao.DESCRIPTION_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( EmailPlanoDeActuacao.CLASS_IDENTIFIER, EmailPlanoDeActuacao.ESTABELECIMENTO_ID, EmailPlanoDeActuacao.TO_ESTABELECIMENTO_ID ); + FIELD_INDEXES.put( EmailPlanoDeActuacao.ESTABELECIMENTO_ID, EmailPlanoDeActuacao.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( EmailPlanoDeActuacao.ESTABELECIMENTO_ID_FULL, EmailPlanoDeActuacao.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( EmailPlanoDeActuacao.TO_ESTABELECIMENTO_ID, EmailPlanoDeActuacao.TO_ESTABELECIMENTO_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 ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( EmailPlanoDeActuacao.class, EmailPlanoDeActuacao.ESTABELECIMENTO_ID, siprp.data.outer.EstabelecimentosData.class, siprp.data.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "email_plano_de_actuacao"; + + + public static final String CLASS_IDENTIFIER = "email_plano_de_actuacao1277401737155"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "email_plano_de_actuacao.id"; + public static final int ID_INDEX = 0; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "email_plano_de_actuacao.description"; + public static final int DESCRIPTION_INDEX = 1; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "email_plano_de_actuacao.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 2; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final int TO_ESTABELECIMENTO_ID_INDEX = 3; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRIPTION, ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRIPTION, TABLENAME + "." + ESTABELECIMENTO_ID, TABLENAME + "." + TO_ESTABELECIMENTO_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRIPTION, ESTABELECIMENTO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DESCRIPTION, ESTABELECIMENTO_ID, }; + + private Integer id; + private String description; + private Integer estabelecimento_id; + private siprp.data.outer.EstabelecimentosData to_estabelecimento_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public EmailPlanoDeActuacao() + { + 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 + { + setLockedForRefresh( true ); + 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 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 + { + setLockedForRefresh( true ); + 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 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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmailPlanoDeActuacao.ID_INDEX: + value = getId(); + break; + case EmailPlanoDeActuacao.DESCRIPTION_INDEX: + value = getDescription(); + break; + case EmailPlanoDeActuacao.ESTABELECIMENTO_ID_INDEX: + value = getEstabelecimento_id(); + break; + case EmailPlanoDeActuacao.TO_ESTABELECIMENTO_ID_INDEX: + value = toEstabelecimento_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmailPlanoDeActuacao.ID_INDEX: + value = this.id; + break; + case EmailPlanoDeActuacao.DESCRIPTION_INDEX: + value = this.description; + break; + case EmailPlanoDeActuacao.ESTABELECIMENTO_ID_INDEX: + value = this.estabelecimento_id; + break; + case EmailPlanoDeActuacao.TO_ESTABELECIMENTO_ID_INDEX: + value = this.to_estabelecimento_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmailPlanoDeActuacao.ID_INDEX: + setId( ( Integer ) value ); + break; + case EmailPlanoDeActuacao.DESCRIPTION_INDEX: + setDescription( ( String ) value ); + break; + case EmailPlanoDeActuacao.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case EmailPlanoDeActuacao.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( siprp.data.outer.EstabelecimentosData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case EmailPlanoDeActuacao.ID_INDEX: + this.id = ( Integer ) value; + break; + case EmailPlanoDeActuacao.DESCRIPTION_INDEX: + this.description = ( String ) value; + break; + case EmailPlanoDeActuacao.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case EmailPlanoDeActuacao.TO_ESTABELECIMENTO_ID_INDEX: + this.to_estabelecimento_id = ( siprp.data.outer.EstabelecimentosData ) 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 EmailPlanoDeActuacao.ID_INDEX: + theClass = Integer.class; + break; + case EmailPlanoDeActuacao.DESCRIPTION_INDEX: + theClass = String.class; + break; + case EmailPlanoDeActuacao.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case EmailPlanoDeActuacao.TO_ESTABELECIMENTO_ID_INDEX: + theClass = siprp.data.outer.EstabelecimentosData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : EmailPlanoDeActuacao._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, EmailPlanoDeActuacao.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/Empresas.java b/trunk/SIPRPSoft/src/siprp/data/inner/Empresas.java new file mode 100644 index 00000000..448f358b --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/Empresas.java @@ -0,0 +1,2758 @@ +/* +* Empresas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class Empresas extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Empresas.ID, Empresas.ID_INDEX ); + FIELD_INDEXES.put( Empresas.ID_FULL, Empresas.ID_INDEX ); + FIELD_INDEXES.put( Empresas.DESIGNACAO_SOCIAL, Empresas.DESIGNACAO_SOCIAL_INDEX ); + FIELD_INDEXES.put( Empresas.DESIGNACAO_SOCIAL_FULL, Empresas.DESIGNACAO_SOCIAL_INDEX ); + FIELD_INDEXES.put( Empresas.SERVICO_SAUDE_TIPO, Empresas.SERVICO_SAUDE_TIPO_INDEX ); + FIELD_INDEXES.put( Empresas.SERVICO_SAUDE_TIPO_FULL, Empresas.SERVICO_SAUDE_TIPO_INDEX ); + FIELD_INDEXES.put( Empresas.SERVICO_SAUDE_DESIGNACAO, Empresas.SERVICO_SAUDE_DESIGNACAO_INDEX ); + FIELD_INDEXES.put( Empresas.SERVICO_SAUDE_DESIGNACAO_FULL, Empresas.SERVICO_SAUDE_DESIGNACAO_INDEX ); + FIELD_INDEXES.put( Empresas.SERVICO_HIGIENE_TIPO, Empresas.SERVICO_HIGIENE_TIPO_INDEX ); + FIELD_INDEXES.put( Empresas.SERVICO_HIGIENE_TIPO_FULL, Empresas.SERVICO_HIGIENE_TIPO_INDEX ); + FIELD_INDEXES.put( Empresas.SERVICO_HIGIENE_DESIGNACAO, Empresas.SERVICO_HIGIENE_DESIGNACAO_INDEX ); + FIELD_INDEXES.put( Empresas.SERVICO_HIGIENE_DESIGNACAO_FULL, Empresas.SERVICO_HIGIENE_DESIGNACAO_INDEX ); + FIELD_INDEXES.put( Empresas.INACTIVO, Empresas.INACTIVO_INDEX ); + FIELD_INDEXES.put( Empresas.INACTIVO_FULL, Empresas.INACTIVO_INDEX ); + FIELD_INDEXES.put( Empresas.MORADA, Empresas.MORADA_INDEX ); + FIELD_INDEXES.put( Empresas.MORADA_FULL, Empresas.MORADA_INDEX ); + FIELD_INDEXES.put( Empresas.CODIGO_POSTAL, Empresas.CODIGO_POSTAL_INDEX ); + FIELD_INDEXES.put( Empresas.CODIGO_POSTAL_FULL, Empresas.CODIGO_POSTAL_INDEX ); + FIELD_INDEXES.put( Empresas.LOCALIDADE, Empresas.LOCALIDADE_INDEX ); + FIELD_INDEXES.put( Empresas.LOCALIDADE_FULL, Empresas.LOCALIDADE_INDEX ); + FIELD_INDEXES.put( Empresas.DISTRITO, Empresas.DISTRITO_INDEX ); + FIELD_INDEXES.put( Empresas.DISTRITO_FULL, Empresas.DISTRITO_INDEX ); + FIELD_INDEXES.put( Empresas.CONCELHO, Empresas.CONCELHO_INDEX ); + FIELD_INDEXES.put( Empresas.CONCELHO_FULL, Empresas.CONCELHO_INDEX ); + FIELD_INDEXES.put( Empresas.NUMERO_TRABALHADORES, Empresas.NUMERO_TRABALHADORES_INDEX ); + FIELD_INDEXES.put( Empresas.NUMERO_TRABALHADORES_FULL, Empresas.NUMERO_TRABALHADORES_INDEX ); + FIELD_INDEXES.put( Empresas.DATA_PROPOSTA, Empresas.DATA_PROPOSTA_INDEX ); + FIELD_INDEXES.put( Empresas.DATA_PROPOSTA_FULL, Empresas.DATA_PROPOSTA_INDEX ); + FIELD_INDEXES.put( Empresas.DATA_ACEITACAO, Empresas.DATA_ACEITACAO_INDEX ); + FIELD_INDEXES.put( Empresas.DATA_ACEITACAO_FULL, Empresas.DATA_ACEITACAO_INDEX ); + FIELD_INDEXES.put( Empresas.PERFIL_1, Empresas.PERFIL_1_INDEX ); + FIELD_INDEXES.put( Empresas.PERFIL_1_FULL, Empresas.PERFIL_1_INDEX ); + FIELD_INDEXES.put( Empresas.PERFIL_2, Empresas.PERFIL_2_INDEX ); + FIELD_INDEXES.put( Empresas.PERFIL_2_FULL, Empresas.PERFIL_2_INDEX ); + FIELD_INDEXES.put( Empresas.DATA_ENVIO_CONTRATO, Empresas.DATA_ENVIO_CONTRATO_INDEX ); + FIELD_INDEXES.put( Empresas.DATA_ENVIO_CONTRATO_FULL, Empresas.DATA_ENVIO_CONTRATO_INDEX ); + FIELD_INDEXES.put( Empresas.DATA_RECEPCAO_CONTRATO, Empresas.DATA_RECEPCAO_CONTRATO_INDEX ); + FIELD_INDEXES.put( Empresas.DATA_RECEPCAO_CONTRATO_FULL, Empresas.DATA_RECEPCAO_CONTRATO_INDEX ); + FIELD_INDEXES.put( Empresas.DATA_ENVIO_IDICT, Empresas.DATA_ENVIO_IDICT_INDEX ); + FIELD_INDEXES.put( Empresas.DATA_ENVIO_IDICT_FULL, Empresas.DATA_ENVIO_IDICT_INDEX ); + FIELD_INDEXES.put( Empresas.CAE, Empresas.CAE_INDEX ); + FIELD_INDEXES.put( Empresas.CAE_FULL, Empresas.CAE_INDEX ); + FIELD_INDEXES.put( Empresas.CONTRIBUINTE, Empresas.CONTRIBUINTE_INDEX ); + FIELD_INDEXES.put( Empresas.CONTRIBUINTE_FULL, Empresas.CONTRIBUINTE_INDEX ); + FIELD_INDEXES.put( Empresas.SEGURANCA_SOCIAL, Empresas.SEGURANCA_SOCIAL_INDEX ); + FIELD_INDEXES.put( Empresas.SEGURANCA_SOCIAL_FULL, Empresas.SEGURANCA_SOCIAL_INDEX ); + FIELD_INDEXES.put( Empresas.CODIGO_1, Empresas.CODIGO_1_INDEX ); + FIELD_INDEXES.put( Empresas.CODIGO_1_FULL, Empresas.CODIGO_1_INDEX ); + FIELD_INDEXES.put( Empresas.CODIGO_2, Empresas.CODIGO_2_INDEX ); + FIELD_INDEXES.put( Empresas.CODIGO_2_FULL, Empresas.CODIGO_2_INDEX ); + FIELD_INDEXES.put( Empresas.CODIGO_3, Empresas.CODIGO_3_INDEX ); + FIELD_INDEXES.put( Empresas.CODIGO_3_FULL, Empresas.CODIGO_3_INDEX ); + FIELD_INDEXES.put( Empresas.SERVICOS, Empresas.SERVICOS_INDEX ); + FIELD_INDEXES.put( Empresas.SERVICOS_FULL, Empresas.SERVICOS_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Empresas.CLASS_IDENTIFIER, Empresas.CONTACTO_1, Empresas.TO_CONTACTO_1 ); + FIELD_INDEXES.put( Empresas.CONTACTO_1, Empresas.CONTACTO_1_INDEX ); + FIELD_INDEXES.put( Empresas.CONTACTO_1_FULL, Empresas.CONTACTO_1_INDEX ); + FIELD_INDEXES.put( Empresas.TO_CONTACTO_1, Empresas.TO_CONTACTO_1_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Empresas.CLASS_IDENTIFIER, Empresas.CONTACTO_2, Empresas.TO_CONTACTO_2 ); + FIELD_INDEXES.put( Empresas.CONTACTO_2, Empresas.CONTACTO_2_INDEX ); + FIELD_INDEXES.put( Empresas.CONTACTO_2_FULL, Empresas.CONTACTO_2_INDEX ); + FIELD_INDEXES.put( Empresas.TO_CONTACTO_2, Empresas.TO_CONTACTO_2_INDEX ); + FIELD_INDEXES.put( Empresas.DATA_RELATORIO_ANUAL, Empresas.DATA_RELATORIO_ANUAL_INDEX ); + FIELD_INDEXES.put( Empresas.DATA_RELATORIO_ANUAL_FULL, Empresas.DATA_RELATORIO_ANUAL_INDEX ); + FIELD_INDEXES.put( Empresas.PRECO_HIGIENE, Empresas.PRECO_HIGIENE_INDEX ); + FIELD_INDEXES.put( Empresas.PRECO_HIGIENE_FULL, Empresas.PRECO_HIGIENE_INDEX ); + FIELD_INDEXES.put( Empresas.PRECO_MEDICINA, Empresas.PRECO_MEDICINA_INDEX ); + FIELD_INDEXES.put( Empresas.PRECO_MEDICINA_FULL, Empresas.PRECO_MEDICINA_INDEX ); + FIELD_INDEXES.put( Empresas.PERIODICIDADE, Empresas.PERIODICIDADE_INDEX ); + FIELD_INDEXES.put( Empresas.PERIODICIDADE_FULL, Empresas.PERIODICIDADE_INDEX ); + FIELD_INDEXES.put( Empresas.ACTIVIDADE, Empresas.ACTIVIDADE_INDEX ); + FIELD_INDEXES.put( Empresas.ACTIVIDADE_FULL, Empresas.ACTIVIDADE_INDEX ); + FIELD_INDEXES.put( Empresas.ACTUALIZACAO, Empresas.ACTUALIZACAO_INDEX ); + FIELD_INDEXES.put( Empresas.ACTUALIZACAO_FULL, Empresas.ACTUALIZACAO_INDEX ); + FIELD_INDEXES.put( Empresas.DESIGNACAO_SOCIAL_PLAIN, Empresas.DESIGNACAO_SOCIAL_PLAIN_INDEX ); + FIELD_INDEXES.put( Empresas.DESIGNACAO_SOCIAL_PLAIN_FULL, Empresas.DESIGNACAO_SOCIAL_PLAIN_INDEX ); + FIELD_INDEXES.put( Empresas.A_CONSULTAS, Empresas.A_CONSULTAS_INDEX ); + FIELD_INDEXES.put( Empresas.A_CONSULTAS_FULL, Empresas.A_CONSULTAS_INDEX ); + FIELD_INDEXES.put( Empresas.A_EXAMES, Empresas.A_EXAMES_INDEX ); + FIELD_INDEXES.put( Empresas.A_EXAMES_FULL, Empresas.A_EXAMES_INDEX ); + FIELD_INDEXES.put( Empresas.B_CONSULTAS, Empresas.B_CONSULTAS_INDEX ); + FIELD_INDEXES.put( Empresas.B_CONSULTAS_FULL, Empresas.B_CONSULTAS_INDEX ); + FIELD_INDEXES.put( Empresas.B_EXAMES, Empresas.B_EXAMES_INDEX ); + FIELD_INDEXES.put( Empresas.B_EXAMES_FULL, Empresas.B_EXAMES_INDEX ); + FIELD_INDEXES.put( Empresas.DATA_CANCELAMENTO, Empresas.DATA_CANCELAMENTO_INDEX ); + FIELD_INDEXES.put( Empresas.DATA_CANCELAMENTO_FULL, Empresas.DATA_CANCELAMENTO_INDEX ); + FIELD_INDEXES.put( Empresas.DURACAO, Empresas.DURACAO_INDEX ); + FIELD_INDEXES.put( Empresas.DURACAO_FULL, Empresas.DURACAO_INDEX ); + FIELD_INDEXES.put( Empresas.INICIO_CONTRATO, Empresas.INICIO_CONTRATO_INDEX ); + FIELD_INDEXES.put( Empresas.INICIO_CONTRATO_FULL, Empresas.INICIO_CONTRATO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Empresas.CLASS_IDENTIFIER, Empresas.EMPRESA_LOGO_ID, Empresas.TO_EMPRESA_LOGO_ID ); + FIELD_INDEXES.put( Empresas.EMPRESA_LOGO_ID, Empresas.EMPRESA_LOGO_ID_INDEX ); + FIELD_INDEXES.put( Empresas.EMPRESA_LOGO_ID_FULL, Empresas.EMPRESA_LOGO_ID_INDEX ); + FIELD_INDEXES.put( Empresas.TO_EMPRESA_LOGO_ID, Empresas.TO_EMPRESA_LOGO_ID_INDEX ); + FIELD_INDEXES.put( Empresas.IMPRIMIR_TABELA_ALARGADA, Empresas.IMPRIMIR_TABELA_ALARGADA_INDEX ); + FIELD_INDEXES.put( Empresas.IMPRIMIR_TABELA_ALARGADA_FULL, Empresas.IMPRIMIR_TABELA_ALARGADA_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeycontacto_1Tocontactos = + new com.evolute.entity.ForeignKey( Empresas.class, Empresas.CONTACTO_1, siprp.data.outer.ContactosData.class, siprp.data.outer.ContactosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeycontacto_2Tocontactos = + new com.evolute.entity.ForeignKey( Empresas.class, Empresas.CONTACTO_2, siprp.data.outer.ContactosData.class, siprp.data.outer.ContactosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_logo_idToimage = + new com.evolute.entity.ForeignKey( Empresas.class, Empresas.EMPRESA_LOGO_ID, siprp.data.outer.ImageData.class, siprp.data.outer.ImageData.ID ); + + public static final String TABLENAME = "empresas"; + + + public static final String CLASS_IDENTIFIER = "empresas1277401737156"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "empresas.id"; + public static final int ID_INDEX = 0; + public static final String DESIGNACAO_SOCIAL = "designacao_social"; + public static final String DESIGNACAO_SOCIAL_FULL = "empresas.designacao_social"; + public static final int DESIGNACAO_SOCIAL_INDEX = 1; + public static final String SERVICO_SAUDE_TIPO = "servico_saude_tipo"; + public static final String SERVICO_SAUDE_TIPO_FULL = "empresas.servico_saude_tipo"; + public static final int SERVICO_SAUDE_TIPO_INDEX = 2; + public static final String SERVICO_SAUDE_DESIGNACAO = "servico_saude_designacao"; + public static final String SERVICO_SAUDE_DESIGNACAO_FULL = "empresas.servico_saude_designacao"; + public static final int SERVICO_SAUDE_DESIGNACAO_INDEX = 3; + public static final String SERVICO_HIGIENE_TIPO = "servico_higiene_tipo"; + public static final String SERVICO_HIGIENE_TIPO_FULL = "empresas.servico_higiene_tipo"; + public static final int SERVICO_HIGIENE_TIPO_INDEX = 4; + public static final String SERVICO_HIGIENE_DESIGNACAO = "servico_higiene_designacao"; + public static final String SERVICO_HIGIENE_DESIGNACAO_FULL = "empresas.servico_higiene_designacao"; + public static final int SERVICO_HIGIENE_DESIGNACAO_INDEX = 5; + public static final String INACTIVO = "inactivo"; + public static final String INACTIVO_FULL = "empresas.inactivo"; + public static final int INACTIVO_INDEX = 6; + public static final String MORADA = "morada"; + public static final String MORADA_FULL = "empresas.morada"; + public static final int MORADA_INDEX = 7; + public static final String CODIGO_POSTAL = "codigo_postal"; + public static final String CODIGO_POSTAL_FULL = "empresas.codigo_postal"; + public static final int CODIGO_POSTAL_INDEX = 8; + public static final String LOCALIDADE = "localidade"; + public static final String LOCALIDADE_FULL = "empresas.localidade"; + public static final int LOCALIDADE_INDEX = 9; + public static final String DISTRITO = "distrito"; + public static final String DISTRITO_FULL = "empresas.distrito"; + public static final int DISTRITO_INDEX = 10; + public static final String CONCELHO = "concelho"; + public static final String CONCELHO_FULL = "empresas.concelho"; + public static final int CONCELHO_INDEX = 11; + public static final String NUMERO_TRABALHADORES = "numero_trabalhadores"; + public static final String NUMERO_TRABALHADORES_FULL = "empresas.numero_trabalhadores"; + public static final int NUMERO_TRABALHADORES_INDEX = 12; + public static final String DATA_PROPOSTA = "data_proposta"; + public static final String DATA_PROPOSTA_FULL = "empresas.data_proposta"; + public static final int DATA_PROPOSTA_INDEX = 13; + public static final String DATA_ACEITACAO = "data_aceitacao"; + public static final String DATA_ACEITACAO_FULL = "empresas.data_aceitacao"; + public static final int DATA_ACEITACAO_INDEX = 14; + public static final String PERFIL_1 = "perfil_1"; + public static final String PERFIL_1_FULL = "empresas.perfil_1"; + public static final int PERFIL_1_INDEX = 15; + public static final String PERFIL_2 = "perfil_2"; + public static final String PERFIL_2_FULL = "empresas.perfil_2"; + public static final int PERFIL_2_INDEX = 16; + public static final String DATA_ENVIO_CONTRATO = "data_envio_contrato"; + public static final String DATA_ENVIO_CONTRATO_FULL = "empresas.data_envio_contrato"; + public static final int DATA_ENVIO_CONTRATO_INDEX = 17; + public static final String DATA_RECEPCAO_CONTRATO = "data_recepcao_contrato"; + public static final String DATA_RECEPCAO_CONTRATO_FULL = "empresas.data_recepcao_contrato"; + public static final int DATA_RECEPCAO_CONTRATO_INDEX = 18; + public static final String DATA_ENVIO_IDICT = "data_envio_idict"; + public static final String DATA_ENVIO_IDICT_FULL = "empresas.data_envio_idict"; + public static final int DATA_ENVIO_IDICT_INDEX = 19; + public static final String CAE = "cae"; + public static final String CAE_FULL = "empresas.cae"; + public static final int CAE_INDEX = 20; + public static final String CONTRIBUINTE = "contribuinte"; + public static final String CONTRIBUINTE_FULL = "empresas.contribuinte"; + public static final int CONTRIBUINTE_INDEX = 21; + public static final String SEGURANCA_SOCIAL = "seguranca_social"; + public static final String SEGURANCA_SOCIAL_FULL = "empresas.seguranca_social"; + public static final int SEGURANCA_SOCIAL_INDEX = 22; + public static final String CODIGO_1 = "codigo_1"; + public static final String CODIGO_1_FULL = "empresas.codigo_1"; + public static final int CODIGO_1_INDEX = 23; + public static final String CODIGO_2 = "codigo_2"; + public static final String CODIGO_2_FULL = "empresas.codigo_2"; + public static final int CODIGO_2_INDEX = 24; + public static final String CODIGO_3 = "codigo_3"; + public static final String CODIGO_3_FULL = "empresas.codigo_3"; + public static final int CODIGO_3_INDEX = 25; + public static final String SERVICOS = "servicos"; + public static final String SERVICOS_FULL = "empresas.servicos"; + public static final int SERVICOS_INDEX = 26; + public static final String CONTACTO_1 = "contacto_1"; + public static final String CONTACTO_1_FULL = "empresas.contacto_1"; + public static final int CONTACTO_1_INDEX = 27; + public static final String TO_CONTACTO_1 = "to_contacto_1"; + public static final int TO_CONTACTO_1_INDEX = 28; + public static final String CONTACTO_2 = "contacto_2"; + public static final String CONTACTO_2_FULL = "empresas.contacto_2"; + public static final int CONTACTO_2_INDEX = 29; + public static final String TO_CONTACTO_2 = "to_contacto_2"; + public static final int TO_CONTACTO_2_INDEX = 30; + public static final String DATA_RELATORIO_ANUAL = "data_relatorio_anual"; + public static final String DATA_RELATORIO_ANUAL_FULL = "empresas.data_relatorio_anual"; + public static final int DATA_RELATORIO_ANUAL_INDEX = 31; + public static final String PRECO_HIGIENE = "preco_higiene"; + public static final String PRECO_HIGIENE_FULL = "empresas.preco_higiene"; + public static final int PRECO_HIGIENE_INDEX = 32; + public static final String PRECO_MEDICINA = "preco_medicina"; + public static final String PRECO_MEDICINA_FULL = "empresas.preco_medicina"; + public static final int PRECO_MEDICINA_INDEX = 33; + public static final String PERIODICIDADE = "periodicidade"; + public static final String PERIODICIDADE_FULL = "empresas.periodicidade"; + public static final int PERIODICIDADE_INDEX = 34; + public static final String ACTIVIDADE = "actividade"; + public static final String ACTIVIDADE_FULL = "empresas.actividade"; + public static final int ACTIVIDADE_INDEX = 35; + public static final String ACTUALIZACAO = "actualizacao"; + public static final String ACTUALIZACAO_FULL = "empresas.actualizacao"; + public static final int ACTUALIZACAO_INDEX = 36; + public static final String DESIGNACAO_SOCIAL_PLAIN = "designacao_social_plain"; + public static final String DESIGNACAO_SOCIAL_PLAIN_FULL = "empresas.designacao_social_plain"; + public static final int DESIGNACAO_SOCIAL_PLAIN_INDEX = 37; + public static final String A_CONSULTAS = "a_consultas"; + public static final String A_CONSULTAS_FULL = "empresas.a_consultas"; + public static final int A_CONSULTAS_INDEX = 38; + public static final String A_EXAMES = "a_exames"; + public static final String A_EXAMES_FULL = "empresas.a_exames"; + public static final int A_EXAMES_INDEX = 39; + public static final String B_CONSULTAS = "b_consultas"; + public static final String B_CONSULTAS_FULL = "empresas.b_consultas"; + public static final int B_CONSULTAS_INDEX = 40; + public static final String B_EXAMES = "b_exames"; + public static final String B_EXAMES_FULL = "empresas.b_exames"; + public static final int B_EXAMES_INDEX = 41; + public static final String DATA_CANCELAMENTO = "data_cancelamento"; + public static final String DATA_CANCELAMENTO_FULL = "empresas.data_cancelamento"; + public static final int DATA_CANCELAMENTO_INDEX = 42; + public static final String DURACAO = "duracao"; + public static final String DURACAO_FULL = "empresas.duracao"; + public static final int DURACAO_INDEX = 43; + public static final String INICIO_CONTRATO = "inicio_contrato"; + public static final String INICIO_CONTRATO_FULL = "empresas.inicio_contrato"; + public static final int INICIO_CONTRATO_INDEX = 44; + public static final String EMPRESA_LOGO_ID = "empresa_logo_id"; + public static final String EMPRESA_LOGO_ID_FULL = "empresas.empresa_logo_id"; + public static final int EMPRESA_LOGO_ID_INDEX = 45; + public static final String TO_EMPRESA_LOGO_ID = "to_empresa_logo_id"; + public static final int TO_EMPRESA_LOGO_ID_INDEX = 46; + public static final String IMPRIMIR_TABELA_ALARGADA = "imprimir_tabela_alargada"; + public static final String IMPRIMIR_TABELA_ALARGADA_FULL = "empresas.imprimir_tabela_alargada"; + public static final int IMPRIMIR_TABELA_ALARGADA_INDEX = 47; + + public static final String FIELD_NAMES[] = new String[]{ + DESIGNACAO_SOCIAL, SERVICO_SAUDE_TIPO, SERVICO_SAUDE_DESIGNACAO, + SERVICO_HIGIENE_TIPO, SERVICO_HIGIENE_DESIGNACAO, INACTIVO, MORADA, + CODIGO_POSTAL, LOCALIDADE, DISTRITO, CONCELHO, NUMERO_TRABALHADORES, + DATA_PROPOSTA, DATA_ACEITACAO, PERFIL_1, PERFIL_2, DATA_ENVIO_CONTRATO, + DATA_RECEPCAO_CONTRATO, DATA_ENVIO_IDICT, CAE, CONTRIBUINTE, SEGURANCA_SOCIAL, + CODIGO_1, CODIGO_2, CODIGO_3, SERVICOS, CONTACTO_1, TO_CONTACTO_1, CONTACTO_2, + TO_CONTACTO_2, DATA_RELATORIO_ANUAL, PRECO_HIGIENE, PRECO_MEDICINA, + PERIODICIDADE, ACTIVIDADE, ACTUALIZACAO, DESIGNACAO_SOCIAL_PLAIN, A_CONSULTAS, + A_EXAMES, B_CONSULTAS, B_EXAMES, DATA_CANCELAMENTO, DURACAO, INICIO_CONTRATO, + EMPRESA_LOGO_ID, TO_EMPRESA_LOGO_ID, IMPRIMIR_TABELA_ALARGADA, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESIGNACAO_SOCIAL, TABLENAME + "." + SERVICO_SAUDE_TIPO, TABLENAME + "." + SERVICO_SAUDE_DESIGNACAO, + TABLENAME + "." + SERVICO_HIGIENE_TIPO, TABLENAME + "." + SERVICO_HIGIENE_DESIGNACAO, TABLENAME + "." + INACTIVO, TABLENAME + "." + MORADA, + TABLENAME + "." + CODIGO_POSTAL, TABLENAME + "." + LOCALIDADE, TABLENAME + "." + DISTRITO, TABLENAME + "." + CONCELHO, TABLENAME + "." + NUMERO_TRABALHADORES, + TABLENAME + "." + DATA_PROPOSTA, TABLENAME + "." + DATA_ACEITACAO, TABLENAME + "." + PERFIL_1, TABLENAME + "." + PERFIL_2, TABLENAME + "." + DATA_ENVIO_CONTRATO, + TABLENAME + "." + DATA_RECEPCAO_CONTRATO, TABLENAME + "." + DATA_ENVIO_IDICT, TABLENAME + "." + CAE, TABLENAME + "." + CONTRIBUINTE, TABLENAME + "." + SEGURANCA_SOCIAL, + TABLENAME + "." + CODIGO_1, TABLENAME + "." + CODIGO_2, TABLENAME + "." + CODIGO_3, TABLENAME + "." + SERVICOS, TABLENAME + "." + CONTACTO_1, TABLENAME + "." + TO_CONTACTO_1, TABLENAME + "." + CONTACTO_2, + TABLENAME + "." + TO_CONTACTO_2, TABLENAME + "." + DATA_RELATORIO_ANUAL, TABLENAME + "." + PRECO_HIGIENE, TABLENAME + "." + PRECO_MEDICINA, + TABLENAME + "." + PERIODICIDADE, TABLENAME + "." + ACTIVIDADE, TABLENAME + "." + ACTUALIZACAO, TABLENAME + "." + DESIGNACAO_SOCIAL_PLAIN, TABLENAME + "." + A_CONSULTAS, + TABLENAME + "." + A_EXAMES, TABLENAME + "." + B_CONSULTAS, TABLENAME + "." + B_EXAMES, TABLENAME + "." + DATA_CANCELAMENTO, TABLENAME + "." + DURACAO, TABLENAME + "." + INICIO_CONTRATO, + TABLENAME + "." + EMPRESA_LOGO_ID, TABLENAME + "." + TO_EMPRESA_LOGO_ID, TABLENAME + "." + IMPRIMIR_TABELA_ALARGADA, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESIGNACAO_SOCIAL, SERVICO_SAUDE_TIPO, SERVICO_SAUDE_DESIGNACAO, + SERVICO_HIGIENE_TIPO, SERVICO_HIGIENE_DESIGNACAO, INACTIVO, MORADA, + CODIGO_POSTAL, LOCALIDADE, DISTRITO, CONCELHO, NUMERO_TRABALHADORES, + DATA_PROPOSTA, DATA_ACEITACAO, PERFIL_1, PERFIL_2, DATA_ENVIO_CONTRATO, + DATA_RECEPCAO_CONTRATO, DATA_ENVIO_IDICT, CAE, CONTRIBUINTE, SEGURANCA_SOCIAL, + CODIGO_1, CODIGO_2, CODIGO_3, SERVICOS, CONTACTO_1, CONTACTO_2, + DATA_RELATORIO_ANUAL, PRECO_HIGIENE, PRECO_MEDICINA, PERIODICIDADE, ACTIVIDADE, + ACTUALIZACAO, DESIGNACAO_SOCIAL_PLAIN, A_CONSULTAS, A_EXAMES, B_CONSULTAS, + B_EXAMES, DATA_CANCELAMENTO, DURACAO, INICIO_CONTRATO, EMPRESA_LOGO_ID, + IMPRIMIR_TABELA_ALARGADA, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DESIGNACAO_SOCIAL, SERVICO_SAUDE_TIPO, SERVICO_SAUDE_DESIGNACAO, + SERVICO_HIGIENE_TIPO, SERVICO_HIGIENE_DESIGNACAO, INACTIVO, MORADA, + CODIGO_POSTAL, LOCALIDADE, DISTRITO, CONCELHO, NUMERO_TRABALHADORES, + DATA_PROPOSTA, DATA_ACEITACAO, PERFIL_1, PERFIL_2, DATA_ENVIO_CONTRATO, + DATA_RECEPCAO_CONTRATO, DATA_ENVIO_IDICT, CAE, CONTRIBUINTE, SEGURANCA_SOCIAL, + CODIGO_1, CODIGO_2, CODIGO_3, SERVICOS, CONTACTO_1, CONTACTO_2, + DATA_RELATORIO_ANUAL, PRECO_HIGIENE, PRECO_MEDICINA, PERIODICIDADE, ACTIVIDADE, + ACTUALIZACAO, DESIGNACAO_SOCIAL_PLAIN, A_CONSULTAS, A_EXAMES, B_CONSULTAS, + B_EXAMES, DATA_CANCELAMENTO, DURACAO, INICIO_CONTRATO, EMPRESA_LOGO_ID, + IMPRIMIR_TABELA_ALARGADA, }; + + private Integer id; + private String designacao_social; + private Integer servico_saude_tipo; + private String servico_saude_designacao; + private Integer servico_higiene_tipo; + private String servico_higiene_designacao; + private String inactivo; + private String morada; + private String codigo_postal; + private String localidade; + private String distrito; + private String concelho; + private Integer numero_trabalhadores; + private java.util.Date data_proposta; + private java.util.Date data_aceitacao; + private String perfil_1; + private String perfil_2; + private java.util.Date data_envio_contrato; + private java.util.Date data_recepcao_contrato; + private java.util.Date data_envio_idict; + private String cae; + private String contribuinte; + private String seguranca_social; + private String codigo_1; + private String codigo_2; + private String codigo_3; + private Integer servicos; + private Integer contacto_1; + private siprp.data.outer.ContactosData to_contacto_1; + private Integer contacto_2; + private siprp.data.outer.ContactosData to_contacto_2; + private java.util.Date data_relatorio_anual; + private Double preco_higiene; + private Double preco_medicina; + private String periodicidade; + private String actividade; + private java.sql.Timestamp actualizacao; + private String designacao_social_plain; + private String a_consultas; + private String a_exames; + private String b_consultas; + private String b_exames; + private java.util.Date data_cancelamento; + private Integer duracao; + private java.util.Date inicio_contrato; + private Integer empresa_logo_id; + private siprp.data.outer.ImageData to_empresa_logo_id; + private Boolean imprimir_tabela_alargada; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Empresas() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, 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 + { + setLockedForRefresh( true ); + 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.ListfromAvisos_empresa_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.AvisosData.class , getPrimaryKey().getMap().get("id"), "empresa_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromEstabelecimentos_empresa_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.EstabelecimentosData.class , getPrimaryKey().getMap().get("id"), "empresa_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsArea_empresa_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsAreaData.class , getPrimaryKey().getMap().get("id"), "empresa_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsEmailEmpresa_empresa_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsEmailEmpresaData.class , getPrimaryKey().getMap().get("id"), "empresa_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsLegislacaoEmpresa_empresa_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsLegislacaoEmpresaData.class , getPrimaryKey().getMap().get("id"), "empresa_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsNormalizacaoEmpresa_empresa_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsNormalizacaoEmpresaData.class , getPrimaryKey().getMap().get("id"), "empresa_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsRiscoEmpresa_empresa_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsRiscoEmpresaData.class , getPrimaryKey().getMap().get("id"), "empresa_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromLembretes_empresa_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.LembretesData.class , getPrimaryKey().getMap().get("id"), "empresa_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromMarcacoesEmpresa_empresa_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.MarcacoesEmpresaData.class , getPrimaryKey().getMap().get("id"), "empresa_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromPrtElementosProtocolo_empresa_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.PrtElementosProtocoloData.class , getPrimaryKey().getMap().get("id"), "empresa_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public String getDesignacao_social() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESIGNACAO_SOCIAL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.designacao_social; + } + + public void setDesignacao_social( String designacao_social ) + { + try + { + setLockedForRefresh( true ); + preProcess( DESIGNACAO_SOCIAL, designacao_social ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.designacao_social = designacao_social; + LAZY_LOADED_OBJECTS.put( DESIGNACAO_SOCIAL, Boolean.TRUE ); + } + + public Integer getServico_saude_tipo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( SERVICO_SAUDE_TIPO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.servico_saude_tipo; + } + + public void setServico_saude_tipo( Integer servico_saude_tipo ) + { + try + { + setLockedForRefresh( true ); + preProcess( SERVICO_SAUDE_TIPO, servico_saude_tipo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.servico_saude_tipo = servico_saude_tipo; + LAZY_LOADED_OBJECTS.put( SERVICO_SAUDE_TIPO, Boolean.TRUE ); + } + + public String getServico_saude_designacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( SERVICO_SAUDE_DESIGNACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.servico_saude_designacao; + } + + public void setServico_saude_designacao( String servico_saude_designacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( SERVICO_SAUDE_DESIGNACAO, servico_saude_designacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.servico_saude_designacao = servico_saude_designacao; + LAZY_LOADED_OBJECTS.put( SERVICO_SAUDE_DESIGNACAO, Boolean.TRUE ); + } + + public Integer getServico_higiene_tipo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( SERVICO_HIGIENE_TIPO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.servico_higiene_tipo; + } + + public void setServico_higiene_tipo( Integer servico_higiene_tipo ) + { + try + { + setLockedForRefresh( true ); + preProcess( SERVICO_HIGIENE_TIPO, servico_higiene_tipo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.servico_higiene_tipo = servico_higiene_tipo; + LAZY_LOADED_OBJECTS.put( SERVICO_HIGIENE_TIPO, Boolean.TRUE ); + } + + public String getServico_higiene_designacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( SERVICO_HIGIENE_DESIGNACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.servico_higiene_designacao; + } + + public void setServico_higiene_designacao( String servico_higiene_designacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( SERVICO_HIGIENE_DESIGNACAO, servico_higiene_designacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.servico_higiene_designacao = servico_higiene_designacao; + LAZY_LOADED_OBJECTS.put( SERVICO_HIGIENE_DESIGNACAO, 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 + { + setLockedForRefresh( true ); + 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 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 String getDistrito() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DISTRITO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.distrito; + } + + public void setDistrito( String distrito ) + { + try + { + setLockedForRefresh( true ); + preProcess( DISTRITO, distrito ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.distrito = distrito; + LAZY_LOADED_OBJECTS.put( DISTRITO, Boolean.TRUE ); + } + + public String getConcelho() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CONCELHO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.concelho; + } + + public void setConcelho( String concelho ) + { + try + { + setLockedForRefresh( true ); + preProcess( CONCELHO, concelho ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.concelho = concelho; + LAZY_LOADED_OBJECTS.put( CONCELHO, Boolean.TRUE ); + } + + public Integer getNumero_trabalhadores() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NUMERO_TRABALHADORES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.numero_trabalhadores; + } + + public void setNumero_trabalhadores( Integer numero_trabalhadores ) + { + try + { + setLockedForRefresh( true ); + preProcess( NUMERO_TRABALHADORES, numero_trabalhadores ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.numero_trabalhadores = numero_trabalhadores; + LAZY_LOADED_OBJECTS.put( NUMERO_TRABALHADORES, Boolean.TRUE ); + } + + public java.util.Date getData_proposta() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_PROPOSTA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_proposta; + } + + public void setData_proposta( java.util.Date data_proposta ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_PROPOSTA, data_proposta ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_proposta = data_proposta; + LAZY_LOADED_OBJECTS.put( DATA_PROPOSTA, Boolean.TRUE ); + } + + public java.util.Date getData_aceitacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_ACEITACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_aceitacao; + } + + public void setData_aceitacao( java.util.Date data_aceitacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_ACEITACAO, data_aceitacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_aceitacao = data_aceitacao; + LAZY_LOADED_OBJECTS.put( DATA_ACEITACAO, Boolean.TRUE ); + } + + public String getPerfil_1() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PERFIL_1 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.perfil_1; + } + + public void setPerfil_1( String perfil_1 ) + { + try + { + setLockedForRefresh( true ); + preProcess( PERFIL_1, perfil_1 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.perfil_1 = perfil_1; + LAZY_LOADED_OBJECTS.put( PERFIL_1, Boolean.TRUE ); + } + + public String getPerfil_2() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PERFIL_2 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.perfil_2; + } + + public void setPerfil_2( String perfil_2 ) + { + try + { + setLockedForRefresh( true ); + preProcess( PERFIL_2, perfil_2 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.perfil_2 = perfil_2; + LAZY_LOADED_OBJECTS.put( PERFIL_2, Boolean.TRUE ); + } + + public java.util.Date getData_envio_contrato() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_ENVIO_CONTRATO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_envio_contrato; + } + + public void setData_envio_contrato( java.util.Date data_envio_contrato ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_ENVIO_CONTRATO, data_envio_contrato ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_envio_contrato = data_envio_contrato; + LAZY_LOADED_OBJECTS.put( DATA_ENVIO_CONTRATO, Boolean.TRUE ); + } + + public java.util.Date getData_recepcao_contrato() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_RECEPCAO_CONTRATO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_recepcao_contrato; + } + + public void setData_recepcao_contrato( java.util.Date data_recepcao_contrato ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_RECEPCAO_CONTRATO, data_recepcao_contrato ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_recepcao_contrato = data_recepcao_contrato; + LAZY_LOADED_OBJECTS.put( DATA_RECEPCAO_CONTRATO, Boolean.TRUE ); + } + + public java.util.Date getData_envio_idict() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_ENVIO_IDICT ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_envio_idict; + } + + public void setData_envio_idict( java.util.Date data_envio_idict ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_ENVIO_IDICT, data_envio_idict ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_envio_idict = data_envio_idict; + LAZY_LOADED_OBJECTS.put( DATA_ENVIO_IDICT, Boolean.TRUE ); + } + + public String getCae() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CAE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.cae; + } + + public void setCae( String cae ) + { + try + { + setLockedForRefresh( true ); + preProcess( CAE, cae ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.cae = cae; + LAZY_LOADED_OBJECTS.put( CAE, Boolean.TRUE ); + } + + public String getContribuinte() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CONTRIBUINTE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.contribuinte; + } + + public void setContribuinte( String contribuinte ) + { + try + { + setLockedForRefresh( true ); + preProcess( CONTRIBUINTE, contribuinte ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.contribuinte = contribuinte; + LAZY_LOADED_OBJECTS.put( CONTRIBUINTE, Boolean.TRUE ); + } + + public String getSeguranca_social() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( SEGURANCA_SOCIAL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.seguranca_social; + } + + public void setSeguranca_social( String seguranca_social ) + { + try + { + setLockedForRefresh( true ); + preProcess( SEGURANCA_SOCIAL, seguranca_social ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.seguranca_social = seguranca_social; + LAZY_LOADED_OBJECTS.put( SEGURANCA_SOCIAL, Boolean.TRUE ); + } + + public String getCodigo_1() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CODIGO_1 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.codigo_1; + } + + public void setCodigo_1( String codigo_1 ) + { + try + { + setLockedForRefresh( true ); + preProcess( CODIGO_1, codigo_1 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.codigo_1 = codigo_1; + LAZY_LOADED_OBJECTS.put( CODIGO_1, Boolean.TRUE ); + } + + public String getCodigo_2() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CODIGO_2 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.codigo_2; + } + + public void setCodigo_2( String codigo_2 ) + { + try + { + setLockedForRefresh( true ); + preProcess( CODIGO_2, codigo_2 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.codigo_2 = codigo_2; + LAZY_LOADED_OBJECTS.put( CODIGO_2, Boolean.TRUE ); + } + + public String getCodigo_3() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CODIGO_3 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.codigo_3; + } + + public void setCodigo_3( String codigo_3 ) + { + try + { + setLockedForRefresh( true ); + preProcess( CODIGO_3, codigo_3 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.codigo_3 = codigo_3; + LAZY_LOADED_OBJECTS.put( CODIGO_3, Boolean.TRUE ); + } + + public Integer getServicos() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( SERVICOS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.servicos; + } + + public void setServicos( Integer servicos ) + { + try + { + setLockedForRefresh( true ); + preProcess( SERVICOS, servicos ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.servicos = servicos; + LAZY_LOADED_OBJECTS.put( SERVICOS, Boolean.TRUE ); + } + + public Integer getContacto_1() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CONTACTO_1 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.contacto_1; + } + + public void setContacto_1( Integer contacto_1 ) + { + try + { + setLockedForRefresh( true ); + preProcess( CONTACTO_1, contacto_1 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.contacto_1 = contacto_1; + LAZY_LOADED_OBJECTS.put( CONTACTO_1, Boolean.TRUE ); + } + + public siprp.data.outer.ContactosData toContacto_1() + { + try + { + prepare( TO_CONTACTO_1 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_contacto_1; + } + + public void setToContacto_1( siprp.data.outer.ContactosData to_contacto_1 ) + { + try + { + preProcess( TO_CONTACTO_1, to_contacto_1 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_contacto_1 = to_contacto_1; + } + + public Integer getContacto_2() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CONTACTO_2 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.contacto_2; + } + + public void setContacto_2( Integer contacto_2 ) + { + try + { + setLockedForRefresh( true ); + preProcess( CONTACTO_2, contacto_2 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.contacto_2 = contacto_2; + LAZY_LOADED_OBJECTS.put( CONTACTO_2, Boolean.TRUE ); + } + + public siprp.data.outer.ContactosData toContacto_2() + { + try + { + prepare( TO_CONTACTO_2 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_contacto_2; + } + + public void setToContacto_2( siprp.data.outer.ContactosData to_contacto_2 ) + { + try + { + preProcess( TO_CONTACTO_2, to_contacto_2 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_contacto_2 = to_contacto_2; + } + + public java.util.Date getData_relatorio_anual() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_RELATORIO_ANUAL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_relatorio_anual; + } + + public void setData_relatorio_anual( java.util.Date data_relatorio_anual ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_RELATORIO_ANUAL, data_relatorio_anual ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_relatorio_anual = data_relatorio_anual; + LAZY_LOADED_OBJECTS.put( DATA_RELATORIO_ANUAL, Boolean.TRUE ); + } + + public Double getPreco_higiene() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PRECO_HIGIENE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.preco_higiene; + } + + public void setPreco_higiene( Double preco_higiene ) + { + try + { + setLockedForRefresh( true ); + preProcess( PRECO_HIGIENE, preco_higiene ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.preco_higiene = preco_higiene; + LAZY_LOADED_OBJECTS.put( PRECO_HIGIENE, Boolean.TRUE ); + } + + public Double getPreco_medicina() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PRECO_MEDICINA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.preco_medicina; + } + + public void setPreco_medicina( Double preco_medicina ) + { + try + { + setLockedForRefresh( true ); + preProcess( PRECO_MEDICINA, preco_medicina ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.preco_medicina = preco_medicina; + LAZY_LOADED_OBJECTS.put( PRECO_MEDICINA, Boolean.TRUE ); + } + + public String getPeriodicidade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PERIODICIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.periodicidade; + } + + public void setPeriodicidade( String periodicidade ) + { + try + { + setLockedForRefresh( true ); + preProcess( PERIODICIDADE, periodicidade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.periodicidade = periodicidade; + LAZY_LOADED_OBJECTS.put( PERIODICIDADE, Boolean.TRUE ); + } + + public String getActividade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ACTIVIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.actividade; + } + + public void setActividade( String actividade ) + { + try + { + setLockedForRefresh( true ); + preProcess( ACTIVIDADE, actividade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.actividade = actividade; + LAZY_LOADED_OBJECTS.put( ACTIVIDADE, Boolean.TRUE ); + } + + public java.sql.Timestamp getActualizacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ACTUALIZACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.actualizacao; + } + + public void setActualizacao( java.sql.Timestamp actualizacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( ACTUALIZACAO, actualizacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.actualizacao = actualizacao; + LAZY_LOADED_OBJECTS.put( ACTUALIZACAO, Boolean.TRUE ); + } + + public String getDesignacao_social_plain() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESIGNACAO_SOCIAL_PLAIN ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.designacao_social_plain; + } + + public void setDesignacao_social_plain( String designacao_social_plain ) + { + try + { + setLockedForRefresh( true ); + preProcess( DESIGNACAO_SOCIAL_PLAIN, designacao_social_plain ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.designacao_social_plain = designacao_social_plain; + LAZY_LOADED_OBJECTS.put( DESIGNACAO_SOCIAL_PLAIN, Boolean.TRUE ); + } + + public String getA_consultas() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( A_CONSULTAS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.a_consultas; + } + + public void setA_consultas( String a_consultas ) + { + try + { + setLockedForRefresh( true ); + preProcess( A_CONSULTAS, a_consultas ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.a_consultas = a_consultas; + LAZY_LOADED_OBJECTS.put( A_CONSULTAS, Boolean.TRUE ); + } + + public String getA_exames() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( A_EXAMES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.a_exames; + } + + public void setA_exames( String a_exames ) + { + try + { + setLockedForRefresh( true ); + preProcess( A_EXAMES, a_exames ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.a_exames = a_exames; + LAZY_LOADED_OBJECTS.put( A_EXAMES, Boolean.TRUE ); + } + + public String getB_consultas() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( B_CONSULTAS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.b_consultas; + } + + public void setB_consultas( String b_consultas ) + { + try + { + setLockedForRefresh( true ); + preProcess( B_CONSULTAS, b_consultas ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.b_consultas = b_consultas; + LAZY_LOADED_OBJECTS.put( B_CONSULTAS, Boolean.TRUE ); + } + + public String getB_exames() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( B_EXAMES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.b_exames; + } + + public void setB_exames( String b_exames ) + { + try + { + setLockedForRefresh( true ); + preProcess( B_EXAMES, b_exames ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.b_exames = b_exames; + LAZY_LOADED_OBJECTS.put( B_EXAMES, Boolean.TRUE ); + } + + public java.util.Date getData_cancelamento() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_CANCELAMENTO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_cancelamento; + } + + public void setData_cancelamento( java.util.Date data_cancelamento ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_CANCELAMENTO, data_cancelamento ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_cancelamento = data_cancelamento; + LAZY_LOADED_OBJECTS.put( DATA_CANCELAMENTO, Boolean.TRUE ); + } + + public Integer getDuracao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DURACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.duracao; + } + + public void setDuracao( Integer duracao ) + { + try + { + setLockedForRefresh( true ); + preProcess( DURACAO, duracao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.duracao = duracao; + LAZY_LOADED_OBJECTS.put( DURACAO, Boolean.TRUE ); + } + + public java.util.Date getInicio_contrato() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( INICIO_CONTRATO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.inicio_contrato; + } + + public void setInicio_contrato( java.util.Date inicio_contrato ) + { + try + { + setLockedForRefresh( true ); + preProcess( INICIO_CONTRATO, inicio_contrato ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.inicio_contrato = inicio_contrato; + LAZY_LOADED_OBJECTS.put( INICIO_CONTRATO, Boolean.TRUE ); + } + + public Integer getEmpresa_logo_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( EMPRESA_LOGO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.empresa_logo_id; + } + + public void setEmpresa_logo_id( Integer empresa_logo_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( EMPRESA_LOGO_ID, empresa_logo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.empresa_logo_id = empresa_logo_id; + LAZY_LOADED_OBJECTS.put( EMPRESA_LOGO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.ImageData toEmpresa_logo_id() + { + try + { + prepare( TO_EMPRESA_LOGO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_empresa_logo_id; + } + + public void setToEmpresa_logo_id( siprp.data.outer.ImageData to_empresa_logo_id ) + { + try + { + preProcess( TO_EMPRESA_LOGO_ID, to_empresa_logo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_empresa_logo_id = to_empresa_logo_id; + } + + public Boolean getImprimir_tabela_alargada() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMPRIMIR_TABELA_ALARGADA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.imprimir_tabela_alargada; + } + + public void setImprimir_tabela_alargada( Boolean imprimir_tabela_alargada ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMPRIMIR_TABELA_ALARGADA, imprimir_tabela_alargada ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.imprimir_tabela_alargada = imprimir_tabela_alargada; + LAZY_LOADED_OBJECTS.put( IMPRIMIR_TABELA_ALARGADA, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Empresas.ID_INDEX: + value = getId(); + break; + case Empresas.DESIGNACAO_SOCIAL_INDEX: + value = getDesignacao_social(); + break; + case Empresas.SERVICO_SAUDE_TIPO_INDEX: + value = getServico_saude_tipo(); + break; + case Empresas.SERVICO_SAUDE_DESIGNACAO_INDEX: + value = getServico_saude_designacao(); + break; + case Empresas.SERVICO_HIGIENE_TIPO_INDEX: + value = getServico_higiene_tipo(); + break; + case Empresas.SERVICO_HIGIENE_DESIGNACAO_INDEX: + value = getServico_higiene_designacao(); + break; + case Empresas.INACTIVO_INDEX: + value = getInactivo(); + break; + case Empresas.MORADA_INDEX: + value = getMorada(); + break; + case Empresas.CODIGO_POSTAL_INDEX: + value = getCodigo_postal(); + break; + case Empresas.LOCALIDADE_INDEX: + value = getLocalidade(); + break; + case Empresas.DISTRITO_INDEX: + value = getDistrito(); + break; + case Empresas.CONCELHO_INDEX: + value = getConcelho(); + break; + case Empresas.NUMERO_TRABALHADORES_INDEX: + value = getNumero_trabalhadores(); + break; + case Empresas.DATA_PROPOSTA_INDEX: + value = getData_proposta(); + break; + case Empresas.DATA_ACEITACAO_INDEX: + value = getData_aceitacao(); + break; + case Empresas.PERFIL_1_INDEX: + value = getPerfil_1(); + break; + case Empresas.PERFIL_2_INDEX: + value = getPerfil_2(); + break; + case Empresas.DATA_ENVIO_CONTRATO_INDEX: + value = getData_envio_contrato(); + break; + case Empresas.DATA_RECEPCAO_CONTRATO_INDEX: + value = getData_recepcao_contrato(); + break; + case Empresas.DATA_ENVIO_IDICT_INDEX: + value = getData_envio_idict(); + break; + case Empresas.CAE_INDEX: + value = getCae(); + break; + case Empresas.CONTRIBUINTE_INDEX: + value = getContribuinte(); + break; + case Empresas.SEGURANCA_SOCIAL_INDEX: + value = getSeguranca_social(); + break; + case Empresas.CODIGO_1_INDEX: + value = getCodigo_1(); + break; + case Empresas.CODIGO_2_INDEX: + value = getCodigo_2(); + break; + case Empresas.CODIGO_3_INDEX: + value = getCodigo_3(); + break; + case Empresas.SERVICOS_INDEX: + value = getServicos(); + break; + case Empresas.CONTACTO_1_INDEX: + value = getContacto_1(); + break; + case Empresas.TO_CONTACTO_1_INDEX: + value = toContacto_1(); + break; + case Empresas.CONTACTO_2_INDEX: + value = getContacto_2(); + break; + case Empresas.TO_CONTACTO_2_INDEX: + value = toContacto_2(); + break; + case Empresas.DATA_RELATORIO_ANUAL_INDEX: + value = getData_relatorio_anual(); + break; + case Empresas.PRECO_HIGIENE_INDEX: + value = getPreco_higiene(); + break; + case Empresas.PRECO_MEDICINA_INDEX: + value = getPreco_medicina(); + break; + case Empresas.PERIODICIDADE_INDEX: + value = getPeriodicidade(); + break; + case Empresas.ACTIVIDADE_INDEX: + value = getActividade(); + break; + case Empresas.ACTUALIZACAO_INDEX: + value = getActualizacao(); + break; + case Empresas.DESIGNACAO_SOCIAL_PLAIN_INDEX: + value = getDesignacao_social_plain(); + break; + case Empresas.A_CONSULTAS_INDEX: + value = getA_consultas(); + break; + case Empresas.A_EXAMES_INDEX: + value = getA_exames(); + break; + case Empresas.B_CONSULTAS_INDEX: + value = getB_consultas(); + break; + case Empresas.B_EXAMES_INDEX: + value = getB_exames(); + break; + case Empresas.DATA_CANCELAMENTO_INDEX: + value = getData_cancelamento(); + break; + case Empresas.DURACAO_INDEX: + value = getDuracao(); + break; + case Empresas.INICIO_CONTRATO_INDEX: + value = getInicio_contrato(); + break; + case Empresas.EMPRESA_LOGO_ID_INDEX: + value = getEmpresa_logo_id(); + break; + case Empresas.TO_EMPRESA_LOGO_ID_INDEX: + value = toEmpresa_logo_id(); + break; + case Empresas.IMPRIMIR_TABELA_ALARGADA_INDEX: + value = getImprimir_tabela_alargada(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Empresas.ID_INDEX: + value = this.id; + break; + case Empresas.DESIGNACAO_SOCIAL_INDEX: + value = this.designacao_social; + break; + case Empresas.SERVICO_SAUDE_TIPO_INDEX: + value = this.servico_saude_tipo; + break; + case Empresas.SERVICO_SAUDE_DESIGNACAO_INDEX: + value = this.servico_saude_designacao; + break; + case Empresas.SERVICO_HIGIENE_TIPO_INDEX: + value = this.servico_higiene_tipo; + break; + case Empresas.SERVICO_HIGIENE_DESIGNACAO_INDEX: + value = this.servico_higiene_designacao; + break; + case Empresas.INACTIVO_INDEX: + value = this.inactivo; + break; + case Empresas.MORADA_INDEX: + value = this.morada; + break; + case Empresas.CODIGO_POSTAL_INDEX: + value = this.codigo_postal; + break; + case Empresas.LOCALIDADE_INDEX: + value = this.localidade; + break; + case Empresas.DISTRITO_INDEX: + value = this.distrito; + break; + case Empresas.CONCELHO_INDEX: + value = this.concelho; + break; + case Empresas.NUMERO_TRABALHADORES_INDEX: + value = this.numero_trabalhadores; + break; + case Empresas.DATA_PROPOSTA_INDEX: + value = this.data_proposta; + break; + case Empresas.DATA_ACEITACAO_INDEX: + value = this.data_aceitacao; + break; + case Empresas.PERFIL_1_INDEX: + value = this.perfil_1; + break; + case Empresas.PERFIL_2_INDEX: + value = this.perfil_2; + break; + case Empresas.DATA_ENVIO_CONTRATO_INDEX: + value = this.data_envio_contrato; + break; + case Empresas.DATA_RECEPCAO_CONTRATO_INDEX: + value = this.data_recepcao_contrato; + break; + case Empresas.DATA_ENVIO_IDICT_INDEX: + value = this.data_envio_idict; + break; + case Empresas.CAE_INDEX: + value = this.cae; + break; + case Empresas.CONTRIBUINTE_INDEX: + value = this.contribuinte; + break; + case Empresas.SEGURANCA_SOCIAL_INDEX: + value = this.seguranca_social; + break; + case Empresas.CODIGO_1_INDEX: + value = this.codigo_1; + break; + case Empresas.CODIGO_2_INDEX: + value = this.codigo_2; + break; + case Empresas.CODIGO_3_INDEX: + value = this.codigo_3; + break; + case Empresas.SERVICOS_INDEX: + value = this.servicos; + break; + case Empresas.CONTACTO_1_INDEX: + value = this.contacto_1; + break; + case Empresas.TO_CONTACTO_1_INDEX: + value = this.to_contacto_1; + break; + case Empresas.CONTACTO_2_INDEX: + value = this.contacto_2; + break; + case Empresas.TO_CONTACTO_2_INDEX: + value = this.to_contacto_2; + break; + case Empresas.DATA_RELATORIO_ANUAL_INDEX: + value = this.data_relatorio_anual; + break; + case Empresas.PRECO_HIGIENE_INDEX: + value = this.preco_higiene; + break; + case Empresas.PRECO_MEDICINA_INDEX: + value = this.preco_medicina; + break; + case Empresas.PERIODICIDADE_INDEX: + value = this.periodicidade; + break; + case Empresas.ACTIVIDADE_INDEX: + value = this.actividade; + break; + case Empresas.ACTUALIZACAO_INDEX: + value = this.actualizacao; + break; + case Empresas.DESIGNACAO_SOCIAL_PLAIN_INDEX: + value = this.designacao_social_plain; + break; + case Empresas.A_CONSULTAS_INDEX: + value = this.a_consultas; + break; + case Empresas.A_EXAMES_INDEX: + value = this.a_exames; + break; + case Empresas.B_CONSULTAS_INDEX: + value = this.b_consultas; + break; + case Empresas.B_EXAMES_INDEX: + value = this.b_exames; + break; + case Empresas.DATA_CANCELAMENTO_INDEX: + value = this.data_cancelamento; + break; + case Empresas.DURACAO_INDEX: + value = this.duracao; + break; + case Empresas.INICIO_CONTRATO_INDEX: + value = this.inicio_contrato; + break; + case Empresas.EMPRESA_LOGO_ID_INDEX: + value = this.empresa_logo_id; + break; + case Empresas.TO_EMPRESA_LOGO_ID_INDEX: + value = this.to_empresa_logo_id; + break; + case Empresas.IMPRIMIR_TABELA_ALARGADA_INDEX: + value = this.imprimir_tabela_alargada; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Empresas.ID_INDEX: + setId( ( Integer ) value ); + break; + case Empresas.DESIGNACAO_SOCIAL_INDEX: + setDesignacao_social( ( String ) value ); + break; + case Empresas.SERVICO_SAUDE_TIPO_INDEX: + setServico_saude_tipo( ( Integer ) value ); + break; + case Empresas.SERVICO_SAUDE_DESIGNACAO_INDEX: + setServico_saude_designacao( ( String ) value ); + break; + case Empresas.SERVICO_HIGIENE_TIPO_INDEX: + setServico_higiene_tipo( ( Integer ) value ); + break; + case Empresas.SERVICO_HIGIENE_DESIGNACAO_INDEX: + setServico_higiene_designacao( ( String ) value ); + break; + case Empresas.INACTIVO_INDEX: + setInactivo( ( String ) value ); + break; + case Empresas.MORADA_INDEX: + setMorada( ( String ) value ); + break; + case Empresas.CODIGO_POSTAL_INDEX: + setCodigo_postal( ( String ) value ); + break; + case Empresas.LOCALIDADE_INDEX: + setLocalidade( ( String ) value ); + break; + case Empresas.DISTRITO_INDEX: + setDistrito( ( String ) value ); + break; + case Empresas.CONCELHO_INDEX: + setConcelho( ( String ) value ); + break; + case Empresas.NUMERO_TRABALHADORES_INDEX: + setNumero_trabalhadores( ( Integer ) value ); + break; + case Empresas.DATA_PROPOSTA_INDEX: + setData_proposta( ( java.util.Date ) value ); + break; + case Empresas.DATA_ACEITACAO_INDEX: + setData_aceitacao( ( java.util.Date ) value ); + break; + case Empresas.PERFIL_1_INDEX: + setPerfil_1( ( String ) value ); + break; + case Empresas.PERFIL_2_INDEX: + setPerfil_2( ( String ) value ); + break; + case Empresas.DATA_ENVIO_CONTRATO_INDEX: + setData_envio_contrato( ( java.util.Date ) value ); + break; + case Empresas.DATA_RECEPCAO_CONTRATO_INDEX: + setData_recepcao_contrato( ( java.util.Date ) value ); + break; + case Empresas.DATA_ENVIO_IDICT_INDEX: + setData_envio_idict( ( java.util.Date ) value ); + break; + case Empresas.CAE_INDEX: + setCae( ( String ) value ); + break; + case Empresas.CONTRIBUINTE_INDEX: + setContribuinte( ( String ) value ); + break; + case Empresas.SEGURANCA_SOCIAL_INDEX: + setSeguranca_social( ( String ) value ); + break; + case Empresas.CODIGO_1_INDEX: + setCodigo_1( ( String ) value ); + break; + case Empresas.CODIGO_2_INDEX: + setCodigo_2( ( String ) value ); + break; + case Empresas.CODIGO_3_INDEX: + setCodigo_3( ( String ) value ); + break; + case Empresas.SERVICOS_INDEX: + setServicos( ( Integer ) value ); + break; + case Empresas.CONTACTO_1_INDEX: + setContacto_1( ( Integer ) value ); + break; + case Empresas.TO_CONTACTO_1_INDEX: + setToContacto_1( ( siprp.data.outer.ContactosData ) value ); + break; + case Empresas.CONTACTO_2_INDEX: + setContacto_2( ( Integer ) value ); + break; + case Empresas.TO_CONTACTO_2_INDEX: + setToContacto_2( ( siprp.data.outer.ContactosData ) value ); + break; + case Empresas.DATA_RELATORIO_ANUAL_INDEX: + setData_relatorio_anual( ( java.util.Date ) value ); + break; + case Empresas.PRECO_HIGIENE_INDEX: + setPreco_higiene( ( Double ) value ); + break; + case Empresas.PRECO_MEDICINA_INDEX: + setPreco_medicina( ( Double ) value ); + break; + case Empresas.PERIODICIDADE_INDEX: + setPeriodicidade( ( String ) value ); + break; + case Empresas.ACTIVIDADE_INDEX: + setActividade( ( String ) value ); + break; + case Empresas.ACTUALIZACAO_INDEX: + setActualizacao( ( java.sql.Timestamp ) value ); + break; + case Empresas.DESIGNACAO_SOCIAL_PLAIN_INDEX: + setDesignacao_social_plain( ( String ) value ); + break; + case Empresas.A_CONSULTAS_INDEX: + setA_consultas( ( String ) value ); + break; + case Empresas.A_EXAMES_INDEX: + setA_exames( ( String ) value ); + break; + case Empresas.B_CONSULTAS_INDEX: + setB_consultas( ( String ) value ); + break; + case Empresas.B_EXAMES_INDEX: + setB_exames( ( String ) value ); + break; + case Empresas.DATA_CANCELAMENTO_INDEX: + setData_cancelamento( ( java.util.Date ) value ); + break; + case Empresas.DURACAO_INDEX: + setDuracao( ( Integer ) value ); + break; + case Empresas.INICIO_CONTRATO_INDEX: + setInicio_contrato( ( java.util.Date ) value ); + break; + case Empresas.EMPRESA_LOGO_ID_INDEX: + setEmpresa_logo_id( ( Integer ) value ); + break; + case Empresas.TO_EMPRESA_LOGO_ID_INDEX: + setToEmpresa_logo_id( ( siprp.data.outer.ImageData ) value ); + break; + case Empresas.IMPRIMIR_TABELA_ALARGADA_INDEX: + setImprimir_tabela_alargada( ( Boolean ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Empresas.ID_INDEX: + this.id = ( Integer ) value; + break; + case Empresas.DESIGNACAO_SOCIAL_INDEX: + this.designacao_social = ( String ) value; + break; + case Empresas.SERVICO_SAUDE_TIPO_INDEX: + this.servico_saude_tipo = ( Integer ) value; + break; + case Empresas.SERVICO_SAUDE_DESIGNACAO_INDEX: + this.servico_saude_designacao = ( String ) value; + break; + case Empresas.SERVICO_HIGIENE_TIPO_INDEX: + this.servico_higiene_tipo = ( Integer ) value; + break; + case Empresas.SERVICO_HIGIENE_DESIGNACAO_INDEX: + this.servico_higiene_designacao = ( String ) value; + break; + case Empresas.INACTIVO_INDEX: + this.inactivo = ( String ) value; + break; + case Empresas.MORADA_INDEX: + this.morada = ( String ) value; + break; + case Empresas.CODIGO_POSTAL_INDEX: + this.codigo_postal = ( String ) value; + break; + case Empresas.LOCALIDADE_INDEX: + this.localidade = ( String ) value; + break; + case Empresas.DISTRITO_INDEX: + this.distrito = ( String ) value; + break; + case Empresas.CONCELHO_INDEX: + this.concelho = ( String ) value; + break; + case Empresas.NUMERO_TRABALHADORES_INDEX: + this.numero_trabalhadores = ( Integer ) value; + break; + case Empresas.DATA_PROPOSTA_INDEX: + this.data_proposta = ( java.util.Date ) value; + break; + case Empresas.DATA_ACEITACAO_INDEX: + this.data_aceitacao = ( java.util.Date ) value; + break; + case Empresas.PERFIL_1_INDEX: + this.perfil_1 = ( String ) value; + break; + case Empresas.PERFIL_2_INDEX: + this.perfil_2 = ( String ) value; + break; + case Empresas.DATA_ENVIO_CONTRATO_INDEX: + this.data_envio_contrato = ( java.util.Date ) value; + break; + case Empresas.DATA_RECEPCAO_CONTRATO_INDEX: + this.data_recepcao_contrato = ( java.util.Date ) value; + break; + case Empresas.DATA_ENVIO_IDICT_INDEX: + this.data_envio_idict = ( java.util.Date ) value; + break; + case Empresas.CAE_INDEX: + this.cae = ( String ) value; + break; + case Empresas.CONTRIBUINTE_INDEX: + this.contribuinte = ( String ) value; + break; + case Empresas.SEGURANCA_SOCIAL_INDEX: + this.seguranca_social = ( String ) value; + break; + case Empresas.CODIGO_1_INDEX: + this.codigo_1 = ( String ) value; + break; + case Empresas.CODIGO_2_INDEX: + this.codigo_2 = ( String ) value; + break; + case Empresas.CODIGO_3_INDEX: + this.codigo_3 = ( String ) value; + break; + case Empresas.SERVICOS_INDEX: + this.servicos = ( Integer ) value; + break; + case Empresas.CONTACTO_1_INDEX: + this.contacto_1 = ( Integer ) value; + break; + case Empresas.TO_CONTACTO_1_INDEX: + this.to_contacto_1 = ( siprp.data.outer.ContactosData ) value; + break; + case Empresas.CONTACTO_2_INDEX: + this.contacto_2 = ( Integer ) value; + break; + case Empresas.TO_CONTACTO_2_INDEX: + this.to_contacto_2 = ( siprp.data.outer.ContactosData ) value; + break; + case Empresas.DATA_RELATORIO_ANUAL_INDEX: + this.data_relatorio_anual = ( java.util.Date ) value; + break; + case Empresas.PRECO_HIGIENE_INDEX: + this.preco_higiene = ( Double ) value; + break; + case Empresas.PRECO_MEDICINA_INDEX: + this.preco_medicina = ( Double ) value; + break; + case Empresas.PERIODICIDADE_INDEX: + this.periodicidade = ( String ) value; + break; + case Empresas.ACTIVIDADE_INDEX: + this.actividade = ( String ) value; + break; + case Empresas.ACTUALIZACAO_INDEX: + this.actualizacao = ( java.sql.Timestamp ) value; + break; + case Empresas.DESIGNACAO_SOCIAL_PLAIN_INDEX: + this.designacao_social_plain = ( String ) value; + break; + case Empresas.A_CONSULTAS_INDEX: + this.a_consultas = ( String ) value; + break; + case Empresas.A_EXAMES_INDEX: + this.a_exames = ( String ) value; + break; + case Empresas.B_CONSULTAS_INDEX: + this.b_consultas = ( String ) value; + break; + case Empresas.B_EXAMES_INDEX: + this.b_exames = ( String ) value; + break; + case Empresas.DATA_CANCELAMENTO_INDEX: + this.data_cancelamento = ( java.util.Date ) value; + break; + case Empresas.DURACAO_INDEX: + this.duracao = ( Integer ) value; + break; + case Empresas.INICIO_CONTRATO_INDEX: + this.inicio_contrato = ( java.util.Date ) value; + break; + case Empresas.EMPRESA_LOGO_ID_INDEX: + this.empresa_logo_id = ( Integer ) value; + break; + case Empresas.TO_EMPRESA_LOGO_ID_INDEX: + this.to_empresa_logo_id = ( siprp.data.outer.ImageData ) value; + break; + case Empresas.IMPRIMIR_TABELA_ALARGADA_INDEX: + this.imprimir_tabela_alargada = ( 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 Empresas.ID_INDEX: + theClass = Integer.class; + break; + case Empresas.DESIGNACAO_SOCIAL_INDEX: + theClass = String.class; + break; + case Empresas.SERVICO_SAUDE_TIPO_INDEX: + theClass = Integer.class; + break; + case Empresas.SERVICO_SAUDE_DESIGNACAO_INDEX: + theClass = String.class; + break; + case Empresas.SERVICO_HIGIENE_TIPO_INDEX: + theClass = Integer.class; + break; + case Empresas.SERVICO_HIGIENE_DESIGNACAO_INDEX: + theClass = String.class; + break; + case Empresas.INACTIVO_INDEX: + theClass = String.class; + break; + case Empresas.MORADA_INDEX: + theClass = String.class; + break; + case Empresas.CODIGO_POSTAL_INDEX: + theClass = String.class; + break; + case Empresas.LOCALIDADE_INDEX: + theClass = String.class; + break; + case Empresas.DISTRITO_INDEX: + theClass = String.class; + break; + case Empresas.CONCELHO_INDEX: + theClass = String.class; + break; + case Empresas.NUMERO_TRABALHADORES_INDEX: + theClass = Integer.class; + break; + case Empresas.DATA_PROPOSTA_INDEX: + theClass = java.util.Date.class; + break; + case Empresas.DATA_ACEITACAO_INDEX: + theClass = java.util.Date.class; + break; + case Empresas.PERFIL_1_INDEX: + theClass = String.class; + break; + case Empresas.PERFIL_2_INDEX: + theClass = String.class; + break; + case Empresas.DATA_ENVIO_CONTRATO_INDEX: + theClass = java.util.Date.class; + break; + case Empresas.DATA_RECEPCAO_CONTRATO_INDEX: + theClass = java.util.Date.class; + break; + case Empresas.DATA_ENVIO_IDICT_INDEX: + theClass = java.util.Date.class; + break; + case Empresas.CAE_INDEX: + theClass = String.class; + break; + case Empresas.CONTRIBUINTE_INDEX: + theClass = String.class; + break; + case Empresas.SEGURANCA_SOCIAL_INDEX: + theClass = String.class; + break; + case Empresas.CODIGO_1_INDEX: + theClass = String.class; + break; + case Empresas.CODIGO_2_INDEX: + theClass = String.class; + break; + case Empresas.CODIGO_3_INDEX: + theClass = String.class; + break; + case Empresas.SERVICOS_INDEX: + theClass = Integer.class; + break; + case Empresas.CONTACTO_1_INDEX: + theClass = Integer.class; + break; + case Empresas.TO_CONTACTO_1_INDEX: + theClass = siprp.data.outer.ContactosData.class; + break; + case Empresas.CONTACTO_2_INDEX: + theClass = Integer.class; + break; + case Empresas.TO_CONTACTO_2_INDEX: + theClass = siprp.data.outer.ContactosData.class; + break; + case Empresas.DATA_RELATORIO_ANUAL_INDEX: + theClass = java.util.Date.class; + break; + case Empresas.PRECO_HIGIENE_INDEX: + theClass = Double.class; + break; + case Empresas.PRECO_MEDICINA_INDEX: + theClass = Double.class; + break; + case Empresas.PERIODICIDADE_INDEX: + theClass = String.class; + break; + case Empresas.ACTIVIDADE_INDEX: + theClass = String.class; + break; + case Empresas.ACTUALIZACAO_INDEX: + theClass = java.sql.Timestamp.class; + break; + case Empresas.DESIGNACAO_SOCIAL_PLAIN_INDEX: + theClass = String.class; + break; + case Empresas.A_CONSULTAS_INDEX: + theClass = String.class; + break; + case Empresas.A_EXAMES_INDEX: + theClass = String.class; + break; + case Empresas.B_CONSULTAS_INDEX: + theClass = String.class; + break; + case Empresas.B_EXAMES_INDEX: + theClass = String.class; + break; + case Empresas.DATA_CANCELAMENTO_INDEX: + theClass = java.util.Date.class; + break; + case Empresas.DURACAO_INDEX: + theClass = Integer.class; + break; + case Empresas.INICIO_CONTRATO_INDEX: + theClass = java.util.Date.class; + break; + case Empresas.EMPRESA_LOGO_ID_INDEX: + theClass = Integer.class; + break; + case Empresas.TO_EMPRESA_LOGO_ID_INDEX: + theClass = siprp.data.outer.ImageData.class; + break; + case Empresas.IMPRIMIR_TABELA_ALARGADA_INDEX: + theClass = Boolean.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Empresas._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, Empresas.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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/Errors.java b/trunk/SIPRPSoft/src/siprp/data/inner/Errors.java new file mode 100644 index 00000000..572dd76a --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/Errors.java @@ -0,0 +1,431 @@ +/* +* Errors.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class Errors extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + 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 = "errors1277401737157"; + + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/Estabelecimentos.java b/trunk/SIPRPSoft/src/siprp/data/inner/Estabelecimentos.java new file mode 100644 index 00000000..64496362 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/Estabelecimentos.java @@ -0,0 +1,1327 @@ +/* +* Estabelecimentos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class Estabelecimentos extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Estabelecimentos.ID, Estabelecimentos.ID_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.ID_FULL, Estabelecimentos.ID_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.NOME, Estabelecimentos.NOME_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.NOME_FULL, Estabelecimentos.NOME_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.LOCALIDADE, Estabelecimentos.LOCALIDADE_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.LOCALIDADE_FULL, Estabelecimentos.LOCALIDADE_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.INACTIVO, Estabelecimentos.INACTIVO_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.INACTIVO_FULL, Estabelecimentos.INACTIVO_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.CONTACTO_BACKUP, Estabelecimentos.CONTACTO_BACKUP_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.CONTACTO_BACKUP_FULL, Estabelecimentos.CONTACTO_BACKUP_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.HISTORICO, Estabelecimentos.HISTORICO_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.HISTORICO_FULL, Estabelecimentos.HISTORICO_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.ACTUALIZACAO, Estabelecimentos.ACTUALIZACAO_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.ACTUALIZACAO_FULL, Estabelecimentos.ACTUALIZACAO_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.NOME_PLAIN, Estabelecimentos.NOME_PLAIN_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.NOME_PLAIN_FULL, Estabelecimentos.NOME_PLAIN_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Estabelecimentos.CLASS_IDENTIFIER, Estabelecimentos.MEDICO_ID, Estabelecimentos.TO_MEDICO_ID ); + FIELD_INDEXES.put( Estabelecimentos.MEDICO_ID, Estabelecimentos.MEDICO_ID_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.MEDICO_ID_FULL, Estabelecimentos.MEDICO_ID_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.TO_MEDICO_ID, Estabelecimentos.TO_MEDICO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Estabelecimentos.CLASS_IDENTIFIER, Estabelecimentos.PRESTADOR_CONSULTA_ID, Estabelecimentos.TO_PRESTADOR_CONSULTA_ID ); + FIELD_INDEXES.put( Estabelecimentos.PRESTADOR_CONSULTA_ID, Estabelecimentos.PRESTADOR_CONSULTA_ID_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.PRESTADOR_CONSULTA_ID_FULL, Estabelecimentos.PRESTADOR_CONSULTA_ID_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.TO_PRESTADOR_CONSULTA_ID, Estabelecimentos.TO_PRESTADOR_CONSULTA_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Estabelecimentos.CLASS_IDENTIFIER, Estabelecimentos.PRESTADOR_ECDS_ID, Estabelecimentos.TO_PRESTADOR_ECDS_ID ); + FIELD_INDEXES.put( Estabelecimentos.PRESTADOR_ECDS_ID, Estabelecimentos.PRESTADOR_ECDS_ID_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.PRESTADOR_ECDS_ID_FULL, Estabelecimentos.PRESTADOR_ECDS_ID_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.TO_PRESTADOR_ECDS_ID, Estabelecimentos.TO_PRESTADOR_ECDS_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Estabelecimentos.CLASS_IDENTIFIER, Estabelecimentos.CONTACTO_ID, Estabelecimentos.TO_CONTACTO_ID ); + FIELD_INDEXES.put( Estabelecimentos.CONTACTO_ID, Estabelecimentos.CONTACTO_ID_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.CONTACTO_ID_FULL, Estabelecimentos.CONTACTO_ID_INDEX ); + FIELD_INDEXES.put( Estabelecimentos.TO_CONTACTO_ID, Estabelecimentos.TO_CONTACTO_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, siprp.data.outer.EmpresasData.class, siprp.data.outer.EmpresasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeymedico_idTomedicos = + new com.evolute.entity.ForeignKey( Estabelecimentos.class, Estabelecimentos.MEDICO_ID, siprp.data.outer.MedicosData.class, siprp.data.outer.MedicosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprestador_consulta_idToprestadores = + new com.evolute.entity.ForeignKey( Estabelecimentos.class, Estabelecimentos.PRESTADOR_CONSULTA_ID, siprp.data.outer.PrestadoresData.class, siprp.data.outer.PrestadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprestador_ecds_idToprestadores = + new com.evolute.entity.ForeignKey( Estabelecimentos.class, Estabelecimentos.PRESTADOR_ECDS_ID, siprp.data.outer.PrestadoresData.class, siprp.data.outer.PrestadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeycontacto_idTocontactos = + new com.evolute.entity.ForeignKey( Estabelecimentos.class, Estabelecimentos.CONTACTO_ID, siprp.data.outer.ContactosData.class, siprp.data.outer.ContactosData.ID ); + + public static final String TABLENAME = "estabelecimentos"; + + + public static final String CLASS_IDENTIFIER = "estabelecimentos1277401737158"; + + 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 NOME = "nome"; + public static final String NOME_FULL = "estabelecimentos.nome"; + public static final int NOME_INDEX = 1; + public static final String LOCALIDADE = "localidade"; + public static final String LOCALIDADE_FULL = "estabelecimentos.localidade"; + public static final int LOCALIDADE_INDEX = 2; + public static final String INACTIVO = "inactivo"; + public static final String INACTIVO_FULL = "estabelecimentos.inactivo"; + public static final int INACTIVO_INDEX = 3; + 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 = 4; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 5; + public static final String MORADA = "morada"; + public static final String MORADA_FULL = "estabelecimentos.morada"; + public static final int MORADA_INDEX = 6; + 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 = 7; + public static final String CONTACTO_BACKUP = "contacto_backup"; + public static final String CONTACTO_BACKUP_FULL = "estabelecimentos.contacto_backup"; + public static final int CONTACTO_BACKUP_INDEX = 8; + public static final String HISTORICO = "historico"; + public static final String HISTORICO_FULL = "estabelecimentos.historico"; + public static final int HISTORICO_INDEX = 9; + public static final String ACTUALIZACAO = "actualizacao"; + public static final String ACTUALIZACAO_FULL = "estabelecimentos.actualizacao"; + public static final int ACTUALIZACAO_INDEX = 10; + public static final String NOME_PLAIN = "nome_plain"; + public static final String NOME_PLAIN_FULL = "estabelecimentos.nome_plain"; + public static final int NOME_PLAIN_INDEX = 11; + 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 = 12; + public static final String TO_MEDICO_ID = "to_medico_id"; + public static final int TO_MEDICO_ID_INDEX = 13; + public static final String PRESTADOR_CONSULTA_ID = "prestador_consulta_id"; + public static final String PRESTADOR_CONSULTA_ID_FULL = "estabelecimentos.prestador_consulta_id"; + public static final int PRESTADOR_CONSULTA_ID_INDEX = 14; + public static final String TO_PRESTADOR_CONSULTA_ID = "to_prestador_consulta_id"; + public static final int TO_PRESTADOR_CONSULTA_ID_INDEX = 15; + public static final String PRESTADOR_ECDS_ID = "prestador_ecds_id"; + public static final String PRESTADOR_ECDS_ID_FULL = "estabelecimentos.prestador_ecds_id"; + public static final int PRESTADOR_ECDS_ID_INDEX = 16; + public static final String TO_PRESTADOR_ECDS_ID = "to_prestador_ecds_id"; + public static final int TO_PRESTADOR_ECDS_ID_INDEX = 17; + public static final String CONTACTO_ID = "contacto_id"; + public static final String CONTACTO_ID_FULL = "estabelecimentos.contacto_id"; + public static final int CONTACTO_ID_INDEX = 18; + public static final String TO_CONTACTO_ID = "to_contacto_id"; + public static final int TO_CONTACTO_ID_INDEX = 19; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, LOCALIDADE, INACTIVO, EMPRESA_ID, TO_EMPRESA_ID, MORADA, CODIGO_POSTAL, + CONTACTO_BACKUP, HISTORICO, ACTUALIZACAO, NOME_PLAIN, MEDICO_ID, TO_MEDICO_ID, + PRESTADOR_CONSULTA_ID, TO_PRESTADOR_CONSULTA_ID, PRESTADOR_ECDS_ID, + TO_PRESTADOR_ECDS_ID, CONTACTO_ID, TO_CONTACTO_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, TABLENAME + "." + LOCALIDADE, TABLENAME + "." + INACTIVO, TABLENAME + "." + EMPRESA_ID, TABLENAME + "." + TO_EMPRESA_ID, TABLENAME + "." + MORADA, TABLENAME + "." + CODIGO_POSTAL, + TABLENAME + "." + CONTACTO_BACKUP, TABLENAME + "." + HISTORICO, TABLENAME + "." + ACTUALIZACAO, TABLENAME + "." + NOME_PLAIN, TABLENAME + "." + MEDICO_ID, TABLENAME + "." + TO_MEDICO_ID, + TABLENAME + "." + PRESTADOR_CONSULTA_ID, TABLENAME + "." + TO_PRESTADOR_CONSULTA_ID, TABLENAME + "." + PRESTADOR_ECDS_ID, + TABLENAME + "." + TO_PRESTADOR_ECDS_ID, TABLENAME + "." + CONTACTO_ID, TABLENAME + "." + TO_CONTACTO_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, LOCALIDADE, INACTIVO, EMPRESA_ID, MORADA, CODIGO_POSTAL, CONTACTO_BACKUP, + HISTORICO, ACTUALIZACAO, NOME_PLAIN, MEDICO_ID, PRESTADOR_CONSULTA_ID, + PRESTADOR_ECDS_ID, CONTACTO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, LOCALIDADE, INACTIVO, EMPRESA_ID, MORADA, CODIGO_POSTAL, CONTACTO_BACKUP, + HISTORICO, ACTUALIZACAO, NOME_PLAIN, MEDICO_ID, PRESTADOR_CONSULTA_ID, + PRESTADOR_ECDS_ID, CONTACTO_ID, }; + + private Integer id; + private String nome; + private String localidade; + private String inactivo; + private Integer empresa_id; + private siprp.data.outer.EmpresasData to_empresa_id; + private String morada; + private String codigo_postal; + private String contacto_backup; + private String historico; + private java.sql.Timestamp actualizacao; + private String nome_plain; + private Integer medico_id; + private siprp.data.outer.MedicosData to_medico_id; + private Integer prestador_consulta_id; + private siprp.data.outer.PrestadoresData to_prestador_consulta_id; + private Integer prestador_ecds_id; + private siprp.data.outer.PrestadoresData to_prestador_ecds_id; + private Integer contacto_id; + private siprp.data.outer.ContactosData to_contacto_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, + 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 + { + setLockedForRefresh( true ); + 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.ListfromAvisos_estabelecimento_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.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.ListfromEmailPlanoDeActuacao_estabelecimento_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.EmailPlanoDeActuacaoData.class , getPrimaryKey().getMap().get("id"), "estabelecimento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHistoricoEstabelecimento_estabelecimento_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.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.ListfromHsEmailEstabelecimento_estabelecimento_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsEmailEstabelecimentoData.class , getPrimaryKey().getMap().get("id"), "estabelecimento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsLegislacaoEstabelecimento_estabelecimento_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsLegislacaoEstabelecimentoData.class , getPrimaryKey().getMap().get("id"), "estabelecimento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsNormalizacaoEstabelecimento_estabelecimento_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsNormalizacaoEstabelecimentoData.class , getPrimaryKey().getMap().get("id"), "estabelecimento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsPostoEstabelecimento_estabelecimento_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsPostoEstabelecimentoData.class , getPrimaryKey().getMap().get("id"), "estabelecimento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromLembretes_estabelecimento_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.LembretesData.class , getPrimaryKey().getMap().get("id"), "estabelecimento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromMarcacoesEstabelecimento_estabelecimento_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.MarcacoesEstabelecimentoData.class , getPrimaryKey().getMap().get("id"), "estabelecimento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromTrabalhadores_estabelecimento_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresData.class , getPrimaryKey().getMap().get("id"), "estabelecimento_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 + { + setLockedForRefresh( true ); + 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 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 + { + setLockedForRefresh( true ); + 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 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 + { + setLockedForRefresh( true ); + 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 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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 getContacto_backup() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CONTACTO_BACKUP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.contacto_backup; + } + + public void setContacto_backup( String contacto_backup ) + { + try + { + setLockedForRefresh( true ); + preProcess( CONTACTO_BACKUP, contacto_backup ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.contacto_backup = contacto_backup; + LAZY_LOADED_OBJECTS.put( CONTACTO_BACKUP, Boolean.TRUE ); + } + + public String getHistorico() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HISTORICO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.historico; + } + + public void setHistorico( String historico ) + { + try + { + setLockedForRefresh( true ); + preProcess( HISTORICO, historico ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.historico = historico; + LAZY_LOADED_OBJECTS.put( HISTORICO, Boolean.TRUE ); + } + + public java.sql.Timestamp getActualizacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ACTUALIZACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.actualizacao; + } + + public void setActualizacao( java.sql.Timestamp actualizacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( ACTUALIZACAO, actualizacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.actualizacao = actualizacao; + LAZY_LOADED_OBJECTS.put( ACTUALIZACAO, Boolean.TRUE ); + } + + public String getNome_plain() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME_PLAIN ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome_plain; + } + + public void setNome_plain( String nome_plain ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOME_PLAIN, nome_plain ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nome_plain = nome_plain; + LAZY_LOADED_OBJECTS.put( NOME_PLAIN, 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 + { + setLockedForRefresh( true ); + 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 siprp.data.outer.MedicosData toMedico_id() + { + try + { + prepare( TO_MEDICO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_medico_id; + } + + public void setToMedico_id( siprp.data.outer.MedicosData to_medico_id ) + { + try + { + preProcess( TO_MEDICO_ID, to_medico_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_medico_id = to_medico_id; + } + + public Integer getPrestador_consulta_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PRESTADOR_CONSULTA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.prestador_consulta_id; + } + + public void setPrestador_consulta_id( Integer prestador_consulta_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PRESTADOR_CONSULTA_ID, prestador_consulta_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.prestador_consulta_id = prestador_consulta_id; + LAZY_LOADED_OBJECTS.put( PRESTADOR_CONSULTA_ID, Boolean.TRUE ); + } + + public siprp.data.outer.PrestadoresData toPrestador_consulta_id() + { + try + { + prepare( TO_PRESTADOR_CONSULTA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_prestador_consulta_id; + } + + public void setToPrestador_consulta_id( siprp.data.outer.PrestadoresData to_prestador_consulta_id ) + { + try + { + preProcess( TO_PRESTADOR_CONSULTA_ID, to_prestador_consulta_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_prestador_consulta_id = to_prestador_consulta_id; + } + + public Integer getPrestador_ecds_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PRESTADOR_ECDS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.prestador_ecds_id; + } + + public void setPrestador_ecds_id( Integer prestador_ecds_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PRESTADOR_ECDS_ID, prestador_ecds_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.prestador_ecds_id = prestador_ecds_id; + LAZY_LOADED_OBJECTS.put( PRESTADOR_ECDS_ID, Boolean.TRUE ); + } + + public siprp.data.outer.PrestadoresData toPrestador_ecds_id() + { + try + { + prepare( TO_PRESTADOR_ECDS_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_prestador_ecds_id; + } + + public void setToPrestador_ecds_id( siprp.data.outer.PrestadoresData to_prestador_ecds_id ) + { + try + { + preProcess( TO_PRESTADOR_ECDS_ID, to_prestador_ecds_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_prestador_ecds_id = to_prestador_ecds_id; + } + + public Integer getContacto_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CONTACTO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.contacto_id; + } + + public void setContacto_id( Integer contacto_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( CONTACTO_ID, contacto_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.contacto_id = contacto_id; + LAZY_LOADED_OBJECTS.put( CONTACTO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.ContactosData toContacto_id() + { + try + { + prepare( TO_CONTACTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_contacto_id; + } + + public void setToContacto_id( siprp.data.outer.ContactosData to_contacto_id ) + { + try + { + preProcess( TO_CONTACTO_ID, to_contacto_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_contacto_id = to_contacto_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Estabelecimentos.ID_INDEX: + value = getId(); + break; + case Estabelecimentos.NOME_INDEX: + value = getNome(); + break; + case Estabelecimentos.LOCALIDADE_INDEX: + value = getLocalidade(); + break; + case Estabelecimentos.INACTIVO_INDEX: + value = getInactivo(); + 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.CONTACTO_BACKUP_INDEX: + value = getContacto_backup(); + break; + case Estabelecimentos.HISTORICO_INDEX: + value = getHistorico(); + break; + case Estabelecimentos.ACTUALIZACAO_INDEX: + value = getActualizacao(); + break; + case Estabelecimentos.NOME_PLAIN_INDEX: + value = getNome_plain(); + break; + case Estabelecimentos.MEDICO_ID_INDEX: + value = getMedico_id(); + break; + case Estabelecimentos.TO_MEDICO_ID_INDEX: + value = toMedico_id(); + break; + case Estabelecimentos.PRESTADOR_CONSULTA_ID_INDEX: + value = getPrestador_consulta_id(); + break; + case Estabelecimentos.TO_PRESTADOR_CONSULTA_ID_INDEX: + value = toPrestador_consulta_id(); + break; + case Estabelecimentos.PRESTADOR_ECDS_ID_INDEX: + value = getPrestador_ecds_id(); + break; + case Estabelecimentos.TO_PRESTADOR_ECDS_ID_INDEX: + value = toPrestador_ecds_id(); + break; + case Estabelecimentos.CONTACTO_ID_INDEX: + value = getContacto_id(); + break; + case Estabelecimentos.TO_CONTACTO_ID_INDEX: + value = toContacto_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.NOME_INDEX: + value = this.nome; + break; + case Estabelecimentos.LOCALIDADE_INDEX: + value = this.localidade; + break; + case Estabelecimentos.INACTIVO_INDEX: + value = this.inactivo; + 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.CONTACTO_BACKUP_INDEX: + value = this.contacto_backup; + break; + case Estabelecimentos.HISTORICO_INDEX: + value = this.historico; + break; + case Estabelecimentos.ACTUALIZACAO_INDEX: + value = this.actualizacao; + break; + case Estabelecimentos.NOME_PLAIN_INDEX: + value = this.nome_plain; + break; + case Estabelecimentos.MEDICO_ID_INDEX: + value = this.medico_id; + break; + case Estabelecimentos.TO_MEDICO_ID_INDEX: + value = this.to_medico_id; + break; + case Estabelecimentos.PRESTADOR_CONSULTA_ID_INDEX: + value = this.prestador_consulta_id; + break; + case Estabelecimentos.TO_PRESTADOR_CONSULTA_ID_INDEX: + value = this.to_prestador_consulta_id; + break; + case Estabelecimentos.PRESTADOR_ECDS_ID_INDEX: + value = this.prestador_ecds_id; + break; + case Estabelecimentos.TO_PRESTADOR_ECDS_ID_INDEX: + value = this.to_prestador_ecds_id; + break; + case Estabelecimentos.CONTACTO_ID_INDEX: + value = this.contacto_id; + break; + case Estabelecimentos.TO_CONTACTO_ID_INDEX: + value = this.to_contacto_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.NOME_INDEX: + setNome( ( String ) value ); + break; + case Estabelecimentos.LOCALIDADE_INDEX: + setLocalidade( ( String ) value ); + break; + case Estabelecimentos.INACTIVO_INDEX: + setInactivo( ( String ) value ); + break; + case Estabelecimentos.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case Estabelecimentos.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( siprp.data.outer.EmpresasData ) value ); + break; + case Estabelecimentos.MORADA_INDEX: + setMorada( ( String ) value ); + break; + case Estabelecimentos.CODIGO_POSTAL_INDEX: + setCodigo_postal( ( String ) value ); + break; + case Estabelecimentos.CONTACTO_BACKUP_INDEX: + setContacto_backup( ( String ) value ); + break; + case Estabelecimentos.HISTORICO_INDEX: + setHistorico( ( String ) value ); + break; + case Estabelecimentos.ACTUALIZACAO_INDEX: + setActualizacao( ( java.sql.Timestamp ) value ); + break; + case Estabelecimentos.NOME_PLAIN_INDEX: + setNome_plain( ( String ) value ); + break; + case Estabelecimentos.MEDICO_ID_INDEX: + setMedico_id( ( Integer ) value ); + break; + case Estabelecimentos.TO_MEDICO_ID_INDEX: + setToMedico_id( ( siprp.data.outer.MedicosData ) value ); + break; + case Estabelecimentos.PRESTADOR_CONSULTA_ID_INDEX: + setPrestador_consulta_id( ( Integer ) value ); + break; + case Estabelecimentos.TO_PRESTADOR_CONSULTA_ID_INDEX: + setToPrestador_consulta_id( ( siprp.data.outer.PrestadoresData ) value ); + break; + case Estabelecimentos.PRESTADOR_ECDS_ID_INDEX: + setPrestador_ecds_id( ( Integer ) value ); + break; + case Estabelecimentos.TO_PRESTADOR_ECDS_ID_INDEX: + setToPrestador_ecds_id( ( siprp.data.outer.PrestadoresData ) value ); + break; + case Estabelecimentos.CONTACTO_ID_INDEX: + setContacto_id( ( Integer ) value ); + break; + case Estabelecimentos.TO_CONTACTO_ID_INDEX: + setToContacto_id( ( siprp.data.outer.ContactosData ) 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.NOME_INDEX: + this.nome = ( String ) value; + break; + case Estabelecimentos.LOCALIDADE_INDEX: + this.localidade = ( String ) value; + break; + case Estabelecimentos.INACTIVO_INDEX: + this.inactivo = ( String ) value; + break; + case Estabelecimentos.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case Estabelecimentos.TO_EMPRESA_ID_INDEX: + this.to_empresa_id = ( siprp.data.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.CONTACTO_BACKUP_INDEX: + this.contacto_backup = ( String ) value; + break; + case Estabelecimentos.HISTORICO_INDEX: + this.historico = ( String ) value; + break; + case Estabelecimentos.ACTUALIZACAO_INDEX: + this.actualizacao = ( java.sql.Timestamp ) value; + break; + case Estabelecimentos.NOME_PLAIN_INDEX: + this.nome_plain = ( String ) value; + break; + case Estabelecimentos.MEDICO_ID_INDEX: + this.medico_id = ( Integer ) value; + break; + case Estabelecimentos.TO_MEDICO_ID_INDEX: + this.to_medico_id = ( siprp.data.outer.MedicosData ) value; + break; + case Estabelecimentos.PRESTADOR_CONSULTA_ID_INDEX: + this.prestador_consulta_id = ( Integer ) value; + break; + case Estabelecimentos.TO_PRESTADOR_CONSULTA_ID_INDEX: + this.to_prestador_consulta_id = ( siprp.data.outer.PrestadoresData ) value; + break; + case Estabelecimentos.PRESTADOR_ECDS_ID_INDEX: + this.prestador_ecds_id = ( Integer ) value; + break; + case Estabelecimentos.TO_PRESTADOR_ECDS_ID_INDEX: + this.to_prestador_ecds_id = ( siprp.data.outer.PrestadoresData ) value; + break; + case Estabelecimentos.CONTACTO_ID_INDEX: + this.contacto_id = ( Integer ) value; + break; + case Estabelecimentos.TO_CONTACTO_ID_INDEX: + this.to_contacto_id = ( siprp.data.outer.ContactosData ) 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.NOME_INDEX: + theClass = String.class; + break; + case Estabelecimentos.LOCALIDADE_INDEX: + theClass = String.class; + break; + case Estabelecimentos.INACTIVO_INDEX: + theClass = String.class; + break; + case Estabelecimentos.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case Estabelecimentos.TO_EMPRESA_ID_INDEX: + theClass = siprp.data.outer.EmpresasData.class; + break; + case Estabelecimentos.MORADA_INDEX: + theClass = String.class; + break; + case Estabelecimentos.CODIGO_POSTAL_INDEX: + theClass = String.class; + break; + case Estabelecimentos.CONTACTO_BACKUP_INDEX: + theClass = String.class; + break; + case Estabelecimentos.HISTORICO_INDEX: + theClass = String.class; + break; + case Estabelecimentos.ACTUALIZACAO_INDEX: + theClass = java.sql.Timestamp.class; + break; + case Estabelecimentos.NOME_PLAIN_INDEX: + theClass = String.class; + break; + case Estabelecimentos.MEDICO_ID_INDEX: + theClass = Integer.class; + break; + case Estabelecimentos.TO_MEDICO_ID_INDEX: + theClass = siprp.data.outer.MedicosData.class; + break; + case Estabelecimentos.PRESTADOR_CONSULTA_ID_INDEX: + theClass = Integer.class; + break; + case Estabelecimentos.TO_PRESTADOR_CONSULTA_ID_INDEX: + theClass = siprp.data.outer.PrestadoresData.class; + break; + case Estabelecimentos.PRESTADOR_ECDS_ID_INDEX: + theClass = Integer.class; + break; + case Estabelecimentos.TO_PRESTADOR_ECDS_ID_INDEX: + theClass = siprp.data.outer.PrestadoresData.class; + break; + case Estabelecimentos.CONTACTO_ID_INDEX: + theClass = Integer.class; + break; + case Estabelecimentos.TO_CONTACTO_ID_INDEX: + theClass = siprp.data.outer.ContactosData.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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/Etiquetas.java b/trunk/SIPRPSoft/src/siprp/data/inner/Etiquetas.java new file mode 100644 index 00000000..6814fa23 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/Etiquetas.java @@ -0,0 +1,890 @@ +/* +* Etiquetas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class Etiquetas extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Etiquetas.ID, Etiquetas.ID_INDEX ); + FIELD_INDEXES.put( Etiquetas.ID_FULL, Etiquetas.ID_INDEX ); + FIELD_INDEXES.put( Etiquetas.DESCRICAO, Etiquetas.DESCRICAO_INDEX ); + FIELD_INDEXES.put( Etiquetas.DESCRICAO_FULL, Etiquetas.DESCRICAO_INDEX ); + FIELD_INDEXES.put( Etiquetas.DESCRICAO_PLAIN, Etiquetas.DESCRICAO_PLAIN_INDEX ); + FIELD_INDEXES.put( Etiquetas.DESCRICAO_PLAIN_FULL, Etiquetas.DESCRICAO_PLAIN_INDEX ); + FIELD_INDEXES.put( Etiquetas.ALTURA, Etiquetas.ALTURA_INDEX ); + FIELD_INDEXES.put( Etiquetas.ALTURA_FULL, Etiquetas.ALTURA_INDEX ); + FIELD_INDEXES.put( Etiquetas.LARGURA, Etiquetas.LARGURA_INDEX ); + FIELD_INDEXES.put( Etiquetas.LARGURA_FULL, Etiquetas.LARGURA_INDEX ); + FIELD_INDEXES.put( Etiquetas.MARGEM_ESQUERDA, Etiquetas.MARGEM_ESQUERDA_INDEX ); + FIELD_INDEXES.put( Etiquetas.MARGEM_ESQUERDA_FULL, Etiquetas.MARGEM_ESQUERDA_INDEX ); + FIELD_INDEXES.put( Etiquetas.MARGEM_CIMA, Etiquetas.MARGEM_CIMA_INDEX ); + FIELD_INDEXES.put( Etiquetas.MARGEM_CIMA_FULL, Etiquetas.MARGEM_CIMA_INDEX ); + FIELD_INDEXES.put( Etiquetas.COLUNAS, Etiquetas.COLUNAS_INDEX ); + FIELD_INDEXES.put( Etiquetas.COLUNAS_FULL, Etiquetas.COLUNAS_INDEX ); + FIELD_INDEXES.put( Etiquetas.LINHAS, Etiquetas.LINHAS_INDEX ); + FIELD_INDEXES.put( Etiquetas.LINHAS_FULL, Etiquetas.LINHAS_INDEX ); + FIELD_INDEXES.put( Etiquetas.CONTINUA, Etiquetas.CONTINUA_INDEX ); + FIELD_INDEXES.put( Etiquetas.CONTINUA_FULL, Etiquetas.CONTINUA_INDEX ); + FIELD_INDEXES.put( Etiquetas.ALTURA_FOLHA, Etiquetas.ALTURA_FOLHA_INDEX ); + FIELD_INDEXES.put( Etiquetas.ALTURA_FOLHA_FULL, Etiquetas.ALTURA_FOLHA_INDEX ); + FIELD_INDEXES.put( Etiquetas.LARGURA_FOLHA, Etiquetas.LARGURA_FOLHA_INDEX ); + FIELD_INDEXES.put( Etiquetas.LARGURA_FOLHA_FULL, Etiquetas.LARGURA_FOLHA_INDEX ); + FIELD_INDEXES.put( Etiquetas.MARGEM_VERTICAL_FOLHA, Etiquetas.MARGEM_VERTICAL_FOLHA_INDEX ); + FIELD_INDEXES.put( Etiquetas.MARGEM_VERTICAL_FOLHA_FULL, Etiquetas.MARGEM_VERTICAL_FOLHA_INDEX ); + FIELD_INDEXES.put( Etiquetas.MARGEM_HORIZONTAL_FOLHA, Etiquetas.MARGEM_HORIZONTAL_FOLHA_INDEX ); + FIELD_INDEXES.put( Etiquetas.MARGEM_HORIZONTAL_FOLHA_FULL, Etiquetas.MARGEM_HORIZONTAL_FOLHA_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "etiquetas"; + + + public static final String CLASS_IDENTIFIER = "etiquetas1277401737158"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "etiquetas.id"; + public static final int ID_INDEX = 0; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "etiquetas.descricao"; + public static final int DESCRICAO_INDEX = 1; + public static final String DESCRICAO_PLAIN = "descricao_plain"; + public static final String DESCRICAO_PLAIN_FULL = "etiquetas.descricao_plain"; + public static final int DESCRICAO_PLAIN_INDEX = 2; + public static final String ALTURA = "altura"; + public static final String ALTURA_FULL = "etiquetas.altura"; + public static final int ALTURA_INDEX = 3; + public static final String LARGURA = "largura"; + public static final String LARGURA_FULL = "etiquetas.largura"; + public static final int LARGURA_INDEX = 4; + public static final String MARGEM_ESQUERDA = "margem_esquerda"; + public static final String MARGEM_ESQUERDA_FULL = "etiquetas.margem_esquerda"; + public static final int MARGEM_ESQUERDA_INDEX = 5; + public static final String MARGEM_CIMA = "margem_cima"; + public static final String MARGEM_CIMA_FULL = "etiquetas.margem_cima"; + public static final int MARGEM_CIMA_INDEX = 6; + public static final String COLUNAS = "colunas"; + public static final String COLUNAS_FULL = "etiquetas.colunas"; + public static final int COLUNAS_INDEX = 7; + public static final String LINHAS = "linhas"; + public static final String LINHAS_FULL = "etiquetas.linhas"; + public static final int LINHAS_INDEX = 8; + public static final String CONTINUA = "continua"; + public static final String CONTINUA_FULL = "etiquetas.continua"; + public static final int CONTINUA_INDEX = 9; + public static final String ALTURA_FOLHA = "altura_folha"; + public static final String ALTURA_FOLHA_FULL = "etiquetas.altura_folha"; + public static final int ALTURA_FOLHA_INDEX = 10; + public static final String LARGURA_FOLHA = "largura_folha"; + public static final String LARGURA_FOLHA_FULL = "etiquetas.largura_folha"; + public static final int LARGURA_FOLHA_INDEX = 11; + public static final String MARGEM_VERTICAL_FOLHA = "margem_vertical_folha"; + public static final String MARGEM_VERTICAL_FOLHA_FULL = "etiquetas.margem_vertical_folha"; + public static final int MARGEM_VERTICAL_FOLHA_INDEX = 12; + public static final String MARGEM_HORIZONTAL_FOLHA = "margem_horizontal_folha"; + public static final String MARGEM_HORIZONTAL_FOLHA_FULL = "etiquetas.margem_horizontal_folha"; + public static final int MARGEM_HORIZONTAL_FOLHA_INDEX = 13; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, DESCRICAO_PLAIN, ALTURA, LARGURA, MARGEM_ESQUERDA, MARGEM_CIMA, COLUNAS, + LINHAS, CONTINUA, ALTURA_FOLHA, LARGURA_FOLHA, MARGEM_VERTICAL_FOLHA, + MARGEM_HORIZONTAL_FOLHA, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO, TABLENAME + "." + DESCRICAO_PLAIN, TABLENAME + "." + ALTURA, TABLENAME + "." + LARGURA, TABLENAME + "." + MARGEM_ESQUERDA, TABLENAME + "." + MARGEM_CIMA, TABLENAME + "." + COLUNAS, + TABLENAME + "." + LINHAS, TABLENAME + "." + CONTINUA, TABLENAME + "." + ALTURA_FOLHA, TABLENAME + "." + LARGURA_FOLHA, TABLENAME + "." + MARGEM_VERTICAL_FOLHA, + TABLENAME + "." + MARGEM_HORIZONTAL_FOLHA, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRICAO, DESCRICAO_PLAIN, ALTURA, LARGURA, MARGEM_ESQUERDA, MARGEM_CIMA, + COLUNAS, LINHAS, CONTINUA, ALTURA_FOLHA, LARGURA_FOLHA, MARGEM_VERTICAL_FOLHA, + MARGEM_HORIZONTAL_FOLHA, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DESCRICAO, DESCRICAO_PLAIN, ALTURA, LARGURA, MARGEM_ESQUERDA, MARGEM_CIMA, + COLUNAS, LINHAS, CONTINUA, ALTURA_FOLHA, LARGURA_FOLHA, MARGEM_VERTICAL_FOLHA, + MARGEM_HORIZONTAL_FOLHA, }; + + private Integer id; + private String descricao; + private String descricao_plain; + private Float altura; + private Float largura; + private Float margem_esquerda; + private Float margem_cima; + private Integer colunas; + private Integer linhas; + private String continua; + private Float altura_folha; + private Float largura_folha; + private Float margem_vertical_folha; + private Float margem_horizontal_folha; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Etiquetas() + { + super(); + dirtyProperties = new boolean[]{ false, false, 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 getDescricao_plain() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESCRICAO_PLAIN ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.descricao_plain; + } + + public void setDescricao_plain( String descricao_plain ) + { + try + { + setLockedForRefresh( true ); + preProcess( DESCRICAO_PLAIN, descricao_plain ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.descricao_plain = descricao_plain; + LAZY_LOADED_OBJECTS.put( DESCRICAO_PLAIN, Boolean.TRUE ); + } + + public Float getAltura() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ALTURA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.altura; + } + + public void setAltura( Float altura ) + { + try + { + setLockedForRefresh( true ); + preProcess( ALTURA, altura ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.altura = altura; + LAZY_LOADED_OBJECTS.put( ALTURA, Boolean.TRUE ); + } + + public Float getLargura() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LARGURA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.largura; + } + + public void setLargura( Float largura ) + { + try + { + setLockedForRefresh( true ); + preProcess( LARGURA, largura ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.largura = largura; + LAZY_LOADED_OBJECTS.put( LARGURA, Boolean.TRUE ); + } + + public Float getMargem_esquerda() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MARGEM_ESQUERDA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.margem_esquerda; + } + + public void setMargem_esquerda( Float margem_esquerda ) + { + try + { + setLockedForRefresh( true ); + preProcess( MARGEM_ESQUERDA, margem_esquerda ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.margem_esquerda = margem_esquerda; + LAZY_LOADED_OBJECTS.put( MARGEM_ESQUERDA, Boolean.TRUE ); + } + + public Float getMargem_cima() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MARGEM_CIMA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.margem_cima; + } + + public void setMargem_cima( Float margem_cima ) + { + try + { + setLockedForRefresh( true ); + preProcess( MARGEM_CIMA, margem_cima ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.margem_cima = margem_cima; + LAZY_LOADED_OBJECTS.put( MARGEM_CIMA, Boolean.TRUE ); + } + + public Integer getColunas() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( COLUNAS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.colunas; + } + + public void setColunas( Integer colunas ) + { + try + { + setLockedForRefresh( true ); + preProcess( COLUNAS, colunas ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.colunas = colunas; + LAZY_LOADED_OBJECTS.put( COLUNAS, Boolean.TRUE ); + } + + public Integer getLinhas() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LINHAS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.linhas; + } + + public void setLinhas( Integer linhas ) + { + try + { + setLockedForRefresh( true ); + preProcess( LINHAS, linhas ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.linhas = linhas; + LAZY_LOADED_OBJECTS.put( LINHAS, Boolean.TRUE ); + } + + public String getContinua() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CONTINUA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.continua; + } + + public void setContinua( String continua ) + { + try + { + setLockedForRefresh( true ); + preProcess( CONTINUA, continua ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.continua = continua; + LAZY_LOADED_OBJECTS.put( CONTINUA, Boolean.TRUE ); + } + + public Float getAltura_folha() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ALTURA_FOLHA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.altura_folha; + } + + public void setAltura_folha( Float altura_folha ) + { + try + { + setLockedForRefresh( true ); + preProcess( ALTURA_FOLHA, altura_folha ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.altura_folha = altura_folha; + LAZY_LOADED_OBJECTS.put( ALTURA_FOLHA, Boolean.TRUE ); + } + + public Float getLargura_folha() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LARGURA_FOLHA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.largura_folha; + } + + public void setLargura_folha( Float largura_folha ) + { + try + { + setLockedForRefresh( true ); + preProcess( LARGURA_FOLHA, largura_folha ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.largura_folha = largura_folha; + LAZY_LOADED_OBJECTS.put( LARGURA_FOLHA, Boolean.TRUE ); + } + + public Float getMargem_vertical_folha() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MARGEM_VERTICAL_FOLHA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.margem_vertical_folha; + } + + public void setMargem_vertical_folha( Float margem_vertical_folha ) + { + try + { + setLockedForRefresh( true ); + preProcess( MARGEM_VERTICAL_FOLHA, margem_vertical_folha ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.margem_vertical_folha = margem_vertical_folha; + LAZY_LOADED_OBJECTS.put( MARGEM_VERTICAL_FOLHA, Boolean.TRUE ); + } + + public Float getMargem_horizontal_folha() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MARGEM_HORIZONTAL_FOLHA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.margem_horizontal_folha; + } + + public void setMargem_horizontal_folha( Float margem_horizontal_folha ) + { + try + { + setLockedForRefresh( true ); + preProcess( MARGEM_HORIZONTAL_FOLHA, margem_horizontal_folha ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.margem_horizontal_folha = margem_horizontal_folha; + LAZY_LOADED_OBJECTS.put( MARGEM_HORIZONTAL_FOLHA, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Etiquetas.ID_INDEX: + value = getId(); + break; + case Etiquetas.DESCRICAO_INDEX: + value = getDescricao(); + break; + case Etiquetas.DESCRICAO_PLAIN_INDEX: + value = getDescricao_plain(); + break; + case Etiquetas.ALTURA_INDEX: + value = getAltura(); + break; + case Etiquetas.LARGURA_INDEX: + value = getLargura(); + break; + case Etiquetas.MARGEM_ESQUERDA_INDEX: + value = getMargem_esquerda(); + break; + case Etiquetas.MARGEM_CIMA_INDEX: + value = getMargem_cima(); + break; + case Etiquetas.COLUNAS_INDEX: + value = getColunas(); + break; + case Etiquetas.LINHAS_INDEX: + value = getLinhas(); + break; + case Etiquetas.CONTINUA_INDEX: + value = getContinua(); + break; + case Etiquetas.ALTURA_FOLHA_INDEX: + value = getAltura_folha(); + break; + case Etiquetas.LARGURA_FOLHA_INDEX: + value = getLargura_folha(); + break; + case Etiquetas.MARGEM_VERTICAL_FOLHA_INDEX: + value = getMargem_vertical_folha(); + break; + case Etiquetas.MARGEM_HORIZONTAL_FOLHA_INDEX: + value = getMargem_horizontal_folha(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Etiquetas.ID_INDEX: + value = this.id; + break; + case Etiquetas.DESCRICAO_INDEX: + value = this.descricao; + break; + case Etiquetas.DESCRICAO_PLAIN_INDEX: + value = this.descricao_plain; + break; + case Etiquetas.ALTURA_INDEX: + value = this.altura; + break; + case Etiquetas.LARGURA_INDEX: + value = this.largura; + break; + case Etiquetas.MARGEM_ESQUERDA_INDEX: + value = this.margem_esquerda; + break; + case Etiquetas.MARGEM_CIMA_INDEX: + value = this.margem_cima; + break; + case Etiquetas.COLUNAS_INDEX: + value = this.colunas; + break; + case Etiquetas.LINHAS_INDEX: + value = this.linhas; + break; + case Etiquetas.CONTINUA_INDEX: + value = this.continua; + break; + case Etiquetas.ALTURA_FOLHA_INDEX: + value = this.altura_folha; + break; + case Etiquetas.LARGURA_FOLHA_INDEX: + value = this.largura_folha; + break; + case Etiquetas.MARGEM_VERTICAL_FOLHA_INDEX: + value = this.margem_vertical_folha; + break; + case Etiquetas.MARGEM_HORIZONTAL_FOLHA_INDEX: + value = this.margem_horizontal_folha; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Etiquetas.ID_INDEX: + setId( ( Integer ) value ); + break; + case Etiquetas.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case Etiquetas.DESCRICAO_PLAIN_INDEX: + setDescricao_plain( ( String ) value ); + break; + case Etiquetas.ALTURA_INDEX: + setAltura( ( Float ) value ); + break; + case Etiquetas.LARGURA_INDEX: + setLargura( ( Float ) value ); + break; + case Etiquetas.MARGEM_ESQUERDA_INDEX: + setMargem_esquerda( ( Float ) value ); + break; + case Etiquetas.MARGEM_CIMA_INDEX: + setMargem_cima( ( Float ) value ); + break; + case Etiquetas.COLUNAS_INDEX: + setColunas( ( Integer ) value ); + break; + case Etiquetas.LINHAS_INDEX: + setLinhas( ( Integer ) value ); + break; + case Etiquetas.CONTINUA_INDEX: + setContinua( ( String ) value ); + break; + case Etiquetas.ALTURA_FOLHA_INDEX: + setAltura_folha( ( Float ) value ); + break; + case Etiquetas.LARGURA_FOLHA_INDEX: + setLargura_folha( ( Float ) value ); + break; + case Etiquetas.MARGEM_VERTICAL_FOLHA_INDEX: + setMargem_vertical_folha( ( Float ) value ); + break; + case Etiquetas.MARGEM_HORIZONTAL_FOLHA_INDEX: + setMargem_horizontal_folha( ( Float ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Etiquetas.ID_INDEX: + this.id = ( Integer ) value; + break; + case Etiquetas.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case Etiquetas.DESCRICAO_PLAIN_INDEX: + this.descricao_plain = ( String ) value; + break; + case Etiquetas.ALTURA_INDEX: + this.altura = ( Float ) value; + break; + case Etiquetas.LARGURA_INDEX: + this.largura = ( Float ) value; + break; + case Etiquetas.MARGEM_ESQUERDA_INDEX: + this.margem_esquerda = ( Float ) value; + break; + case Etiquetas.MARGEM_CIMA_INDEX: + this.margem_cima = ( Float ) value; + break; + case Etiquetas.COLUNAS_INDEX: + this.colunas = ( Integer ) value; + break; + case Etiquetas.LINHAS_INDEX: + this.linhas = ( Integer ) value; + break; + case Etiquetas.CONTINUA_INDEX: + this.continua = ( String ) value; + break; + case Etiquetas.ALTURA_FOLHA_INDEX: + this.altura_folha = ( Float ) value; + break; + case Etiquetas.LARGURA_FOLHA_INDEX: + this.largura_folha = ( Float ) value; + break; + case Etiquetas.MARGEM_VERTICAL_FOLHA_INDEX: + this.margem_vertical_folha = ( Float ) value; + break; + case Etiquetas.MARGEM_HORIZONTAL_FOLHA_INDEX: + this.margem_horizontal_folha = ( Float ) 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 Etiquetas.ID_INDEX: + theClass = Integer.class; + break; + case Etiquetas.DESCRICAO_INDEX: + theClass = String.class; + break; + case Etiquetas.DESCRICAO_PLAIN_INDEX: + theClass = String.class; + break; + case Etiquetas.ALTURA_INDEX: + theClass = Float.class; + break; + case Etiquetas.LARGURA_INDEX: + theClass = Float.class; + break; + case Etiquetas.MARGEM_ESQUERDA_INDEX: + theClass = Float.class; + break; + case Etiquetas.MARGEM_CIMA_INDEX: + theClass = Float.class; + break; + case Etiquetas.COLUNAS_INDEX: + theClass = Integer.class; + break; + case Etiquetas.LINHAS_INDEX: + theClass = Integer.class; + break; + case Etiquetas.CONTINUA_INDEX: + theClass = String.class; + break; + case Etiquetas.ALTURA_FOLHA_INDEX: + theClass = Float.class; + break; + case Etiquetas.LARGURA_FOLHA_INDEX: + theClass = Float.class; + break; + case Etiquetas.MARGEM_VERTICAL_FOLHA_INDEX: + theClass = Float.class; + break; + case Etiquetas.MARGEM_HORIZONTAL_FOLHA_INDEX: + theClass = Float.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Etiquetas._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, Etiquetas.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/Exames.java b/trunk/SIPRPSoft/src/siprp/data/inner/Exames.java new file mode 100644 index 00000000..dc4e1aeb --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/Exames.java @@ -0,0 +1,1165 @@ +/* +* Exames.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class Exames extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Exames.ID, Exames.ID_INDEX ); + FIELD_INDEXES.put( Exames.ID_FULL, Exames.ID_INDEX ); + FIELD_INDEXES.put( Exames.DATA, Exames.DATA_INDEX ); + FIELD_INDEXES.put( Exames.DATA_FULL, Exames.DATA_INDEX ); + FIELD_INDEXES.put( Exames.TIPO, Exames.TIPO_INDEX ); + FIELD_INDEXES.put( Exames.TIPO_FULL, Exames.TIPO_INDEX ); + FIELD_INDEXES.put( Exames.OCASIONAL, Exames.OCASIONAL_INDEX ); + FIELD_INDEXES.put( Exames.OCASIONAL_FULL, Exames.OCASIONAL_INDEX ); + FIELD_INDEXES.put( Exames.OUTRO_TIPO, Exames.OUTRO_TIPO_INDEX ); + FIELD_INDEXES.put( Exames.OUTRO_TIPO_FULL, Exames.OUTRO_TIPO_INDEX ); + FIELD_INDEXES.put( Exames.RESULTADO, Exames.RESULTADO_INDEX ); + FIELD_INDEXES.put( Exames.RESULTADO_FULL, Exames.RESULTADO_INDEX ); + FIELD_INDEXES.put( Exames.OUTRA_FUNCAO_1, Exames.OUTRA_FUNCAO_1_INDEX ); + FIELD_INDEXES.put( Exames.OUTRA_FUNCAO_1_FULL, Exames.OUTRA_FUNCAO_1_INDEX ); + FIELD_INDEXES.put( Exames.OUTRA_FUNCAO_2, Exames.OUTRA_FUNCAO_2_INDEX ); + FIELD_INDEXES.put( Exames.OUTRA_FUNCAO_2_FULL, Exames.OUTRA_FUNCAO_2_INDEX ); + FIELD_INDEXES.put( Exames.OUTRA_FUNCAO_3, Exames.OUTRA_FUNCAO_3_INDEX ); + FIELD_INDEXES.put( Exames.OUTRA_FUNCAO_3_FULL, Exames.OUTRA_FUNCAO_3_INDEX ); + FIELD_INDEXES.put( Exames.OUTRA_FUNCAO_4, Exames.OUTRA_FUNCAO_4_INDEX ); + FIELD_INDEXES.put( Exames.OUTRA_FUNCAO_4_FULL, Exames.OUTRA_FUNCAO_4_INDEX ); + FIELD_INDEXES.put( Exames.PROXIMO_EXAME, Exames.PROXIMO_EXAME_INDEX ); + FIELD_INDEXES.put( Exames.PROXIMO_EXAME_FULL, Exames.PROXIMO_EXAME_INDEX ); + FIELD_INDEXES.put( Exames.OUTRAS_RECOMENDACOES, Exames.OUTRAS_RECOMENDACOES_INDEX ); + FIELD_INDEXES.put( Exames.OUTRAS_RECOMENDACOES_FULL, Exames.OUTRAS_RECOMENDACOES_INDEX ); + FIELD_INDEXES.put( Exames.INACTIVO, Exames.INACTIVO_INDEX ); + FIELD_INDEXES.put( Exames.INACTIVO_FULL, Exames.INACTIVO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Exames.CLASS_IDENTIFIER, Exames.TRABALHADOR_ID, Exames.TO_TRABALHADOR_ID ); + FIELD_INDEXES.put( Exames.TRABALHADOR_ID, Exames.TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( Exames.TRABALHADOR_ID_FULL, Exames.TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( Exames.TO_TRABALHADOR_ID, Exames.TO_TRABALHADOR_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Exames.CLASS_IDENTIFIER, Exames.MEDICO_ID, Exames.TO_MEDICO_ID ); + FIELD_INDEXES.put( Exames.MEDICO_ID, Exames.MEDICO_ID_INDEX ); + FIELD_INDEXES.put( Exames.MEDICO_ID_FULL, Exames.MEDICO_ID_INDEX ); + FIELD_INDEXES.put( Exames.TO_MEDICO_ID, Exames.TO_MEDICO_ID_INDEX ); + FIELD_INDEXES.put( Exames.PDF, Exames.PDF_INDEX ); + FIELD_INDEXES.put( Exames.PDF_FULL, Exames.PDF_INDEX ); + FIELD_INDEXES.put( Exames.FO, Exames.FO_INDEX ); + FIELD_INDEXES.put( Exames.FO_FULL, Exames.FO_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( Exames.class, Exames.TRABALHADOR_ID, siprp.data.outer.TrabalhadoresData.class, siprp.data.outer.TrabalhadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeymedico_idTomedicos = + new com.evolute.entity.ForeignKey( Exames.class, Exames.MEDICO_ID, siprp.data.outer.MedicosData.class, siprp.data.outer.MedicosData.ID ); + + public static final String TABLENAME = "exames"; + + + public static final String CLASS_IDENTIFIER = "exames1277401737159"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "exames.id"; + public static final int ID_INDEX = 0; + public static final String DATA = "data"; + public static final String DATA_FULL = "exames.data"; + public static final int DATA_INDEX = 1; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "exames.tipo"; + public static final int TIPO_INDEX = 2; + public static final String OCASIONAL = "ocasional"; + public static final String OCASIONAL_FULL = "exames.ocasional"; + public static final int OCASIONAL_INDEX = 3; + public static final String OUTRO_TIPO = "outro_tipo"; + public static final String OUTRO_TIPO_FULL = "exames.outro_tipo"; + public static final int OUTRO_TIPO_INDEX = 4; + public static final String RESULTADO = "resultado"; + public static final String RESULTADO_FULL = "exames.resultado"; + public static final int RESULTADO_INDEX = 5; + public static final String OUTRA_FUNCAO_1 = "outra_funcao_1"; + public static final String OUTRA_FUNCAO_1_FULL = "exames.outra_funcao_1"; + public static final int OUTRA_FUNCAO_1_INDEX = 6; + public static final String OUTRA_FUNCAO_2 = "outra_funcao_2"; + public static final String OUTRA_FUNCAO_2_FULL = "exames.outra_funcao_2"; + public static final int OUTRA_FUNCAO_2_INDEX = 7; + public static final String OUTRA_FUNCAO_3 = "outra_funcao_3"; + public static final String OUTRA_FUNCAO_3_FULL = "exames.outra_funcao_3"; + public static final int OUTRA_FUNCAO_3_INDEX = 8; + public static final String OUTRA_FUNCAO_4 = "outra_funcao_4"; + public static final String OUTRA_FUNCAO_4_FULL = "exames.outra_funcao_4"; + public static final int OUTRA_FUNCAO_4_INDEX = 9; + public static final String PROXIMO_EXAME = "proximo_exame"; + public static final String PROXIMO_EXAME_FULL = "exames.proximo_exame"; + public static final int PROXIMO_EXAME_INDEX = 10; + public static final String OUTRAS_RECOMENDACOES = "outras_recomendacoes"; + public static final String OUTRAS_RECOMENDACOES_FULL = "exames.outras_recomendacoes"; + public static final int OUTRAS_RECOMENDACOES_INDEX = 11; + public static final String INACTIVO = "inactivo"; + public static final String INACTIVO_FULL = "exames.inactivo"; + public static final int INACTIVO_INDEX = 12; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "exames.trabalhador_id"; + public static final int TRABALHADOR_ID_INDEX = 13; + public static final String TO_TRABALHADOR_ID = "to_trabalhador_id"; + public static final int TO_TRABALHADOR_ID_INDEX = 14; + public static final String MEDICO_ID = "medico_id"; + public static final String MEDICO_ID_FULL = "exames.medico_id"; + public static final int MEDICO_ID_INDEX = 15; + public static final String TO_MEDICO_ID = "to_medico_id"; + public static final int TO_MEDICO_ID_INDEX = 16; + public static final String PDF = "pdf"; + public static final String PDF_FULL = "exames.pdf"; + public static final int PDF_INDEX = 17; + public static final String FO = "fo"; + public static final String FO_FULL = "exames.fo"; + public static final int FO_INDEX = 18; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, TIPO, OCASIONAL, OUTRO_TIPO, RESULTADO, OUTRA_FUNCAO_1, OUTRA_FUNCAO_2, + OUTRA_FUNCAO_3, OUTRA_FUNCAO_4, PROXIMO_EXAME, OUTRAS_RECOMENDACOES, INACTIVO, + TRABALHADOR_ID, TO_TRABALHADOR_ID, MEDICO_ID, TO_MEDICO_ID, PDF, FO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DATA, TABLENAME + "." + TIPO, TABLENAME + "." + OCASIONAL, TABLENAME + "." + OUTRO_TIPO, TABLENAME + "." + RESULTADO, TABLENAME + "." + OUTRA_FUNCAO_1, TABLENAME + "." + OUTRA_FUNCAO_2, + TABLENAME + "." + OUTRA_FUNCAO_3, TABLENAME + "." + OUTRA_FUNCAO_4, TABLENAME + "." + PROXIMO_EXAME, TABLENAME + "." + OUTRAS_RECOMENDACOES, TABLENAME + "." + INACTIVO, + TABLENAME + "." + TRABALHADOR_ID, TABLENAME + "." + TO_TRABALHADOR_ID, TABLENAME + "." + MEDICO_ID, TABLENAME + "." + TO_MEDICO_ID, TABLENAME + "." + PDF, TABLENAME + "." + FO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATA, TIPO, OCASIONAL, OUTRO_TIPO, RESULTADO, OUTRA_FUNCAO_1, OUTRA_FUNCAO_2, + OUTRA_FUNCAO_3, OUTRA_FUNCAO_4, PROXIMO_EXAME, OUTRAS_RECOMENDACOES, INACTIVO, + TRABALHADOR_ID, MEDICO_ID, PDF, FO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DATA, TIPO, OCASIONAL, OUTRO_TIPO, RESULTADO, OUTRA_FUNCAO_1, OUTRA_FUNCAO_2, + OUTRA_FUNCAO_3, OUTRA_FUNCAO_4, PROXIMO_EXAME, OUTRAS_RECOMENDACOES, INACTIVO, + TRABALHADOR_ID, MEDICO_ID, }; + + private Integer id; + private java.util.Date data; + private Integer tipo; + private Integer ocasional; + private String outro_tipo; + private Integer resultado; + private String outra_funcao_1; + private String outra_funcao_2; + private String outra_funcao_3; + private String outra_funcao_4; + private java.util.Date proximo_exame; + private String outras_recomendacoes; + private String inactivo; + private Integer trabalhador_id; + private siprp.data.outer.TrabalhadoresData to_trabalhador_id; + private Integer medico_id; + private siprp.data.outer.MedicosData to_medico_id; + private byte[] pdf; + private byte[] fo; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Exames() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false, 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 + { + setLockedForRefresh( true ); + 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.ListfromTrabalhadoresFichasAptidao_exame_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresFichasAptidaoData.class , getPrimaryKey().getMap().get("id"), "exame_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + 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 + { + setLockedForRefresh( true ); + 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 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 + { + setLockedForRefresh( true ); + 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 getOcasional() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OCASIONAL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ocasional; + } + + public void setOcasional( Integer ocasional ) + { + try + { + setLockedForRefresh( true ); + preProcess( OCASIONAL, ocasional ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ocasional = ocasional; + LAZY_LOADED_OBJECTS.put( OCASIONAL, Boolean.TRUE ); + } + + public String getOutro_tipo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OUTRO_TIPO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.outro_tipo; + } + + public void setOutro_tipo( String outro_tipo ) + { + try + { + setLockedForRefresh( true ); + preProcess( OUTRO_TIPO, outro_tipo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.outro_tipo = outro_tipo; + LAZY_LOADED_OBJECTS.put( OUTRO_TIPO, Boolean.TRUE ); + } + + public Integer getResultado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RESULTADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.resultado; + } + + public void setResultado( Integer resultado ) + { + try + { + setLockedForRefresh( true ); + preProcess( RESULTADO, resultado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.resultado = resultado; + LAZY_LOADED_OBJECTS.put( RESULTADO, Boolean.TRUE ); + } + + public String getOutra_funcao_1() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OUTRA_FUNCAO_1 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.outra_funcao_1; + } + + public void setOutra_funcao_1( String outra_funcao_1 ) + { + try + { + setLockedForRefresh( true ); + preProcess( OUTRA_FUNCAO_1, outra_funcao_1 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.outra_funcao_1 = outra_funcao_1; + LAZY_LOADED_OBJECTS.put( OUTRA_FUNCAO_1, Boolean.TRUE ); + } + + public String getOutra_funcao_2() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OUTRA_FUNCAO_2 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.outra_funcao_2; + } + + public void setOutra_funcao_2( String outra_funcao_2 ) + { + try + { + setLockedForRefresh( true ); + preProcess( OUTRA_FUNCAO_2, outra_funcao_2 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.outra_funcao_2 = outra_funcao_2; + LAZY_LOADED_OBJECTS.put( OUTRA_FUNCAO_2, Boolean.TRUE ); + } + + public String getOutra_funcao_3() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OUTRA_FUNCAO_3 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.outra_funcao_3; + } + + public void setOutra_funcao_3( String outra_funcao_3 ) + { + try + { + setLockedForRefresh( true ); + preProcess( OUTRA_FUNCAO_3, outra_funcao_3 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.outra_funcao_3 = outra_funcao_3; + LAZY_LOADED_OBJECTS.put( OUTRA_FUNCAO_3, Boolean.TRUE ); + } + + public String getOutra_funcao_4() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OUTRA_FUNCAO_4 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.outra_funcao_4; + } + + public void setOutra_funcao_4( String outra_funcao_4 ) + { + try + { + setLockedForRefresh( true ); + preProcess( OUTRA_FUNCAO_4, outra_funcao_4 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.outra_funcao_4 = outra_funcao_4; + LAZY_LOADED_OBJECTS.put( OUTRA_FUNCAO_4, Boolean.TRUE ); + } + + public java.util.Date getProximo_exame() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PROXIMO_EXAME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.proximo_exame; + } + + public void setProximo_exame( java.util.Date proximo_exame ) + { + try + { + setLockedForRefresh( true ); + preProcess( PROXIMO_EXAME, proximo_exame ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.proximo_exame = proximo_exame; + LAZY_LOADED_OBJECTS.put( PROXIMO_EXAME, Boolean.TRUE ); + } + + public String getOutras_recomendacoes() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OUTRAS_RECOMENDACOES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.outras_recomendacoes; + } + + public void setOutras_recomendacoes( String outras_recomendacoes ) + { + try + { + setLockedForRefresh( true ); + preProcess( OUTRAS_RECOMENDACOES, outras_recomendacoes ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.outras_recomendacoes = outras_recomendacoes; + LAZY_LOADED_OBJECTS.put( OUTRAS_RECOMENDACOES, 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 + { + setLockedForRefresh( true ); + 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 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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 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 + { + setLockedForRefresh( true ); + 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 siprp.data.outer.MedicosData toMedico_id() + { + try + { + prepare( TO_MEDICO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_medico_id; + } + + public void setToMedico_id( siprp.data.outer.MedicosData to_medico_id ) + { + try + { + preProcess( TO_MEDICO_ID, to_medico_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_medico_id = to_medico_id; + } + + public byte[] getPdf() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PDF ); + Boolean isLazyLoaded = isPropertyLoaded( PDF ); + if ( ! isLazyLoaded ) + { + this.pdf = ( byte[] ) getProvider().loadFieldFromDatabase( PDF, this ); + LAZY_LOADED_OBJECTS.put( PDF, Boolean.TRUE ); + } + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.pdf; + } + + public void setPdf( byte[] pdf ) + { + try + { + setLockedForRefresh( true ); + preProcess( PDF, pdf ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.pdf = pdf; + LAZY_LOADED_OBJECTS.put( PDF, Boolean.TRUE ); + } + + public byte[] getFo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FO ); + Boolean isLazyLoaded = isPropertyLoaded( FO ); + if ( ! isLazyLoaded ) + { + this.fo = ( byte[] ) getProvider().loadFieldFromDatabase( FO, this ); + LAZY_LOADED_OBJECTS.put( FO, Boolean.TRUE ); + } + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.fo; + } + + public void setFo( byte[] fo ) + { + try + { + setLockedForRefresh( true ); + preProcess( FO, fo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.fo = fo; + LAZY_LOADED_OBJECTS.put( FO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Exames.ID_INDEX: + value = getId(); + break; + case Exames.DATA_INDEX: + value = getData(); + break; + case Exames.TIPO_INDEX: + value = getTipo(); + break; + case Exames.OCASIONAL_INDEX: + value = getOcasional(); + break; + case Exames.OUTRO_TIPO_INDEX: + value = getOutro_tipo(); + break; + case Exames.RESULTADO_INDEX: + value = getResultado(); + break; + case Exames.OUTRA_FUNCAO_1_INDEX: + value = getOutra_funcao_1(); + break; + case Exames.OUTRA_FUNCAO_2_INDEX: + value = getOutra_funcao_2(); + break; + case Exames.OUTRA_FUNCAO_3_INDEX: + value = getOutra_funcao_3(); + break; + case Exames.OUTRA_FUNCAO_4_INDEX: + value = getOutra_funcao_4(); + break; + case Exames.PROXIMO_EXAME_INDEX: + value = getProximo_exame(); + break; + case Exames.OUTRAS_RECOMENDACOES_INDEX: + value = getOutras_recomendacoes(); + break; + case Exames.INACTIVO_INDEX: + value = getInactivo(); + break; + case Exames.TRABALHADOR_ID_INDEX: + value = getTrabalhador_id(); + break; + case Exames.TO_TRABALHADOR_ID_INDEX: + value = toTrabalhador_id(); + break; + case Exames.MEDICO_ID_INDEX: + value = getMedico_id(); + break; + case Exames.TO_MEDICO_ID_INDEX: + value = toMedico_id(); + break; + case Exames.PDF_INDEX: + value = getPdf(); + break; + case Exames.FO_INDEX: + value = getFo(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Exames.ID_INDEX: + value = this.id; + break; + case Exames.DATA_INDEX: + value = this.data; + break; + case Exames.TIPO_INDEX: + value = this.tipo; + break; + case Exames.OCASIONAL_INDEX: + value = this.ocasional; + break; + case Exames.OUTRO_TIPO_INDEX: + value = this.outro_tipo; + break; + case Exames.RESULTADO_INDEX: + value = this.resultado; + break; + case Exames.OUTRA_FUNCAO_1_INDEX: + value = this.outra_funcao_1; + break; + case Exames.OUTRA_FUNCAO_2_INDEX: + value = this.outra_funcao_2; + break; + case Exames.OUTRA_FUNCAO_3_INDEX: + value = this.outra_funcao_3; + break; + case Exames.OUTRA_FUNCAO_4_INDEX: + value = this.outra_funcao_4; + break; + case Exames.PROXIMO_EXAME_INDEX: + value = this.proximo_exame; + break; + case Exames.OUTRAS_RECOMENDACOES_INDEX: + value = this.outras_recomendacoes; + break; + case Exames.INACTIVO_INDEX: + value = this.inactivo; + break; + case Exames.TRABALHADOR_ID_INDEX: + value = this.trabalhador_id; + break; + case Exames.TO_TRABALHADOR_ID_INDEX: + value = this.to_trabalhador_id; + break; + case Exames.MEDICO_ID_INDEX: + value = this.medico_id; + break; + case Exames.TO_MEDICO_ID_INDEX: + value = this.to_medico_id; + break; + case Exames.PDF_INDEX: + value = this.pdf; + break; + case Exames.FO_INDEX: + value = this.fo; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Exames.ID_INDEX: + setId( ( Integer ) value ); + break; + case Exames.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case Exames.TIPO_INDEX: + setTipo( ( Integer ) value ); + break; + case Exames.OCASIONAL_INDEX: + setOcasional( ( Integer ) value ); + break; + case Exames.OUTRO_TIPO_INDEX: + setOutro_tipo( ( String ) value ); + break; + case Exames.RESULTADO_INDEX: + setResultado( ( Integer ) value ); + break; + case Exames.OUTRA_FUNCAO_1_INDEX: + setOutra_funcao_1( ( String ) value ); + break; + case Exames.OUTRA_FUNCAO_2_INDEX: + setOutra_funcao_2( ( String ) value ); + break; + case Exames.OUTRA_FUNCAO_3_INDEX: + setOutra_funcao_3( ( String ) value ); + break; + case Exames.OUTRA_FUNCAO_4_INDEX: + setOutra_funcao_4( ( String ) value ); + break; + case Exames.PROXIMO_EXAME_INDEX: + setProximo_exame( ( java.util.Date ) value ); + break; + case Exames.OUTRAS_RECOMENDACOES_INDEX: + setOutras_recomendacoes( ( String ) value ); + break; + case Exames.INACTIVO_INDEX: + setInactivo( ( String ) value ); + break; + case Exames.TRABALHADOR_ID_INDEX: + setTrabalhador_id( ( Integer ) value ); + break; + case Exames.TO_TRABALHADOR_ID_INDEX: + setToTrabalhador_id( ( siprp.data.outer.TrabalhadoresData ) value ); + break; + case Exames.MEDICO_ID_INDEX: + setMedico_id( ( Integer ) value ); + break; + case Exames.TO_MEDICO_ID_INDEX: + setToMedico_id( ( siprp.data.outer.MedicosData ) value ); + break; + case Exames.PDF_INDEX: + setPdf( ( byte[] ) value ); + break; + case Exames.FO_INDEX: + setFo( ( byte[] ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Exames.ID_INDEX: + this.id = ( Integer ) value; + break; + case Exames.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case Exames.TIPO_INDEX: + this.tipo = ( Integer ) value; + break; + case Exames.OCASIONAL_INDEX: + this.ocasional = ( Integer ) value; + break; + case Exames.OUTRO_TIPO_INDEX: + this.outro_tipo = ( String ) value; + break; + case Exames.RESULTADO_INDEX: + this.resultado = ( Integer ) value; + break; + case Exames.OUTRA_FUNCAO_1_INDEX: + this.outra_funcao_1 = ( String ) value; + break; + case Exames.OUTRA_FUNCAO_2_INDEX: + this.outra_funcao_2 = ( String ) value; + break; + case Exames.OUTRA_FUNCAO_3_INDEX: + this.outra_funcao_3 = ( String ) value; + break; + case Exames.OUTRA_FUNCAO_4_INDEX: + this.outra_funcao_4 = ( String ) value; + break; + case Exames.PROXIMO_EXAME_INDEX: + this.proximo_exame = ( java.util.Date ) value; + break; + case Exames.OUTRAS_RECOMENDACOES_INDEX: + this.outras_recomendacoes = ( String ) value; + break; + case Exames.INACTIVO_INDEX: + this.inactivo = ( String ) value; + break; + case Exames.TRABALHADOR_ID_INDEX: + this.trabalhador_id = ( Integer ) value; + break; + case Exames.TO_TRABALHADOR_ID_INDEX: + this.to_trabalhador_id = ( siprp.data.outer.TrabalhadoresData ) value; + break; + case Exames.MEDICO_ID_INDEX: + this.medico_id = ( Integer ) value; + break; + case Exames.TO_MEDICO_ID_INDEX: + this.to_medico_id = ( siprp.data.outer.MedicosData ) value; + break; + case Exames.PDF_INDEX: + this.pdf = ( byte[] ) value; + break; + case Exames.FO_INDEX: + this.fo = ( byte[] ) 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 Exames.ID_INDEX: + theClass = Integer.class; + break; + case Exames.DATA_INDEX: + theClass = java.util.Date.class; + break; + case Exames.TIPO_INDEX: + theClass = Integer.class; + break; + case Exames.OCASIONAL_INDEX: + theClass = Integer.class; + break; + case Exames.OUTRO_TIPO_INDEX: + theClass = String.class; + break; + case Exames.RESULTADO_INDEX: + theClass = Integer.class; + break; + case Exames.OUTRA_FUNCAO_1_INDEX: + theClass = String.class; + break; + case Exames.OUTRA_FUNCAO_2_INDEX: + theClass = String.class; + break; + case Exames.OUTRA_FUNCAO_3_INDEX: + theClass = String.class; + break; + case Exames.OUTRA_FUNCAO_4_INDEX: + theClass = String.class; + break; + case Exames.PROXIMO_EXAME_INDEX: + theClass = java.util.Date.class; + break; + case Exames.OUTRAS_RECOMENDACOES_INDEX: + theClass = String.class; + break; + case Exames.INACTIVO_INDEX: + theClass = String.class; + break; + case Exames.TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case Exames.TO_TRABALHADOR_ID_INDEX: + theClass = siprp.data.outer.TrabalhadoresData.class; + break; + case Exames.MEDICO_ID_INDEX: + theClass = Integer.class; + break; + case Exames.TO_MEDICO_ID_INDEX: + theClass = siprp.data.outer.MedicosData.class; + break; + case Exames.PDF_INDEX: + theClass = byte[].class; + break; + case Exames.FO_INDEX: + theClass = byte[].class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Exames._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, Exames.PK_FIELD_NAMES ); + primaryKey.set( 0, getId() ); + } + } + + @Override + public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + LAZY_LOADED_OBJECTS.put( PDF, Boolean.FALSE ); + LAZY_LOADED_OBJECTS.put( FO, Boolean.FALSE ); + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/ExamesPerfis.java b/trunk/SIPRPSoft/src/siprp/data/inner/ExamesPerfis.java new file mode 100644 index 00000000..2cf98615 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/ExamesPerfis.java @@ -0,0 +1,429 @@ +/* +* ExamesPerfis.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class ExamesPerfis extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + 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, siprp.data.outer.TiposExamesCompData.class, siprp.data.outer.TiposExamesCompData.ID ); + + public static final String TABLENAME = "exames_perfis"; + + + public static final String CLASS_IDENTIFIER = "exames_perfis1277401737159"; + + 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 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 siprp.data.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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 + { + setLockedForRefresh( true ); + 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( ( siprp.data.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 = ( siprp.data.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 = siprp.data.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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/ExamesPortaria.java b/trunk/SIPRPSoft/src/siprp/data/inner/ExamesPortaria.java new file mode 100644 index 00000000..1acaa015 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/ExamesPortaria.java @@ -0,0 +1,330 @@ +/* +* ExamesPortaria.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class ExamesPortaria extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( ExamesPortaria.ID, ExamesPortaria.ID_INDEX ); + FIELD_INDEXES.put( ExamesPortaria.ID_FULL, ExamesPortaria.ID_INDEX ); + FIELD_INDEXES.put( ExamesPortaria.PORTARIA, ExamesPortaria.PORTARIA_INDEX ); + FIELD_INDEXES.put( ExamesPortaria.PORTARIA_FULL, ExamesPortaria.PORTARIA_INDEX ); + FIELD_INDEXES.put( ExamesPortaria.DATA_ENTRADA, ExamesPortaria.DATA_ENTRADA_INDEX ); + FIELD_INDEXES.put( ExamesPortaria.DATA_ENTRADA_FULL, ExamesPortaria.DATA_ENTRADA_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "exames_portaria"; + + + public static final String CLASS_IDENTIFIER = "exames_portaria1277401737160"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "exames_portaria.id"; + public static final int ID_INDEX = 0; + public static final String PORTARIA = "portaria"; + public static final String PORTARIA_FULL = "exames_portaria.portaria"; + public static final int PORTARIA_INDEX = 1; + public static final String DATA_ENTRADA = "data_entrada"; + public static final String DATA_ENTRADA_FULL = "exames_portaria.data_entrada"; + public static final int DATA_ENTRADA_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + PORTARIA, DATA_ENTRADA, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + PORTARIA, TABLENAME + "." + DATA_ENTRADA, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, PORTARIA, DATA_ENTRADA, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, PORTARIA, DATA_ENTRADA, }; + + private Integer id; + private String portaria; + private java.sql.Timestamp data_entrada; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public ExamesPortaria() + { + 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 + { + setLockedForRefresh( true ); + 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 getPortaria() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PORTARIA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.portaria; + } + + public void setPortaria( String portaria ) + { + try + { + setLockedForRefresh( true ); + preProcess( PORTARIA, portaria ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.portaria = portaria; + LAZY_LOADED_OBJECTS.put( PORTARIA, Boolean.TRUE ); + } + + public java.sql.Timestamp getData_entrada() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_ENTRADA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_entrada; + } + + public void setData_entrada( java.sql.Timestamp data_entrada ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_ENTRADA, data_entrada ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_entrada = data_entrada; + LAZY_LOADED_OBJECTS.put( DATA_ENTRADA, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case ExamesPortaria.ID_INDEX: + value = getId(); + break; + case ExamesPortaria.PORTARIA_INDEX: + value = getPortaria(); + break; + case ExamesPortaria.DATA_ENTRADA_INDEX: + value = getData_entrada(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case ExamesPortaria.ID_INDEX: + value = this.id; + break; + case ExamesPortaria.PORTARIA_INDEX: + value = this.portaria; + break; + case ExamesPortaria.DATA_ENTRADA_INDEX: + value = this.data_entrada; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case ExamesPortaria.ID_INDEX: + setId( ( Integer ) value ); + break; + case ExamesPortaria.PORTARIA_INDEX: + setPortaria( ( String ) value ); + break; + case ExamesPortaria.DATA_ENTRADA_INDEX: + setData_entrada( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case ExamesPortaria.ID_INDEX: + this.id = ( Integer ) value; + break; + case ExamesPortaria.PORTARIA_INDEX: + this.portaria = ( String ) value; + break; + case ExamesPortaria.DATA_ENTRADA_INDEX: + this.data_entrada = ( 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 ExamesPortaria.ID_INDEX: + theClass = Integer.class; + break; + case ExamesPortaria.PORTARIA_INDEX: + theClass = String.class; + break; + case ExamesPortaria.DATA_ENTRADA_INDEX: + theClass = java.sql.Timestamp.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : ExamesPortaria._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, ExamesPortaria.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HistoricoEstabelecimento.java b/trunk/SIPRPSoft/src/siprp/data/inner/HistoricoEstabelecimento.java new file mode 100644 index 00000000..085033b1 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HistoricoEstabelecimento.java @@ -0,0 +1,429 @@ +/* +* HistoricoEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HistoricoEstabelecimento extends siprp.data.Historico +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + 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, siprp.data.outer.EstabelecimentosData.class, siprp.data.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "historico_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "historico_estabelecimento1277401737160"; + + 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 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 siprp.data.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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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( ( siprp.data.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 = ( siprp.data.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 = siprp.data.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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsArea.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsArea.java new file mode 100644 index 00000000..12fe842b --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsArea.java @@ -0,0 +1,494 @@ +/* +* HsArea.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsArea extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( HsArea.ID, HsArea.ID_INDEX ); + FIELD_INDEXES.put( HsArea.ID_FULL, HsArea.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsArea.CLASS_IDENTIFIER, HsArea.EMPRESA_ID, HsArea.TO_EMPRESA_ID ); + FIELD_INDEXES.put( HsArea.EMPRESA_ID, HsArea.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( HsArea.EMPRESA_ID_FULL, HsArea.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( HsArea.TO_EMPRESA_ID, HsArea.TO_EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( HsArea.DESCRIPTION, HsArea.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( HsArea.DESCRIPTION_FULL, HsArea.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( HsArea.DELETED_DATE, HsArea.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( HsArea.DELETED_DATE_FULL, HsArea.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( HsArea.ORDEM, HsArea.ORDEM_INDEX ); + FIELD_INDEXES.put( HsArea.ORDEM_FULL, HsArea.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 ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( HsArea.class, HsArea.EMPRESA_ID, siprp.data.outer.EmpresasData.class, siprp.data.outer.EmpresasData.ID ); + + public static final String TABLENAME = "hs_area"; + + + public static final String CLASS_IDENTIFIER = "hs_area1277401737160"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "hs_area.id"; + public static final int ID_INDEX = 0; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "hs_area.empresa_id"; + public static final int EMPRESA_ID_INDEX = 1; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 2; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_area.description"; + public static final int DESCRIPTION_INDEX = 3; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_area.deleted_date"; + public static final int DELETED_DATE_INDEX = 4; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "hs_area.ordem"; + public static final int ORDEM_INDEX = 5; + + public static final String FIELD_NAMES[] = new String[]{ + EMPRESA_ID, TO_EMPRESA_ID, DESCRIPTION, DELETED_DATE, ORDEM, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + EMPRESA_ID, TABLENAME + "." + TO_EMPRESA_ID, TABLENAME + "." + DESCRIPTION, TABLENAME + "." + DELETED_DATE, TABLENAME + "." + ORDEM, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, EMPRESA_ID, DESCRIPTION, DELETED_DATE, ORDEM, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, EMPRESA_ID, DESCRIPTION, DELETED_DATE, ORDEM, }; + + private Integer id; + private Integer empresa_id; + private siprp.data.outer.EmpresasData to_empresa_id; + private String description; + private java.sql.Timestamp deleted_date; + private Integer ordem; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsArea() + { + 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 + { + setLockedForRefresh( true ); + 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.ListfromHsPosto_area_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsPostoData.class , getPrimaryKey().getMap().get("id"), "area_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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 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 + { + setLockedForRefresh( true ); + 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 java.sql.Timestamp getDeleted_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_date; + } + + public void setDeleted_date( java.sql.Timestamp deleted_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_DATE, deleted_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_date = deleted_date; + LAZY_LOADED_OBJECTS.put( DELETED_DATE, 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 + { + setLockedForRefresh( true ); + 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 HsArea.ID_INDEX: + value = getId(); + break; + case HsArea.EMPRESA_ID_INDEX: + value = getEmpresa_id(); + break; + case HsArea.TO_EMPRESA_ID_INDEX: + value = toEmpresa_id(); + break; + case HsArea.DESCRIPTION_INDEX: + value = getDescription(); + break; + case HsArea.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + case HsArea.ORDEM_INDEX: + value = getOrdem(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsArea.ID_INDEX: + value = this.id; + break; + case HsArea.EMPRESA_ID_INDEX: + value = this.empresa_id; + break; + case HsArea.TO_EMPRESA_ID_INDEX: + value = this.to_empresa_id; + break; + case HsArea.DESCRIPTION_INDEX: + value = this.description; + break; + case HsArea.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + case HsArea.ORDEM_INDEX: + value = this.ordem; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsArea.ID_INDEX: + setId( ( Integer ) value ); + break; + case HsArea.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case HsArea.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( siprp.data.outer.EmpresasData ) value ); + break; + case HsArea.DESCRIPTION_INDEX: + setDescription( ( String ) value ); + break; + case HsArea.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + case HsArea.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsArea.ID_INDEX: + this.id = ( Integer ) value; + break; + case HsArea.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case HsArea.TO_EMPRESA_ID_INDEX: + this.to_empresa_id = ( siprp.data.outer.EmpresasData ) value; + break; + case HsArea.DESCRIPTION_INDEX: + this.description = ( String ) value; + break; + case HsArea.DELETED_DATE_INDEX: + this.deleted_date = ( java.sql.Timestamp ) value; + break; + case HsArea.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 HsArea.ID_INDEX: + theClass = Integer.class; + break; + case HsArea.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case HsArea.TO_EMPRESA_ID_INDEX: + theClass = siprp.data.outer.EmpresasData.class; + break; + case HsArea.DESCRIPTION_INDEX: + theClass = String.class; + break; + case HsArea.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case HsArea.ORDEM_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsArea._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, HsArea.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsEmail.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsEmail.java new file mode 100644 index 00000000..c889ee7b --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsEmail.java @@ -0,0 +1,308 @@ +/* +* HsEmail.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsEmail extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( HsEmail.ID, HsEmail.ID_INDEX ); + FIELD_INDEXES.put( HsEmail.ID_FULL, HsEmail.ID_INDEX ); + FIELD_INDEXES.put( HsEmail.EMAIL, HsEmail.EMAIL_INDEX ); + FIELD_INDEXES.put( HsEmail.EMAIL_FULL, HsEmail.EMAIL_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "hs_email"; + + + public static final String CLASS_IDENTIFIER = "hs_email1277401737161"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "hs_email.id"; + public static final int ID_INDEX = 0; + public static final String EMAIL = "email"; + public static final String EMAIL_FULL = "hs_email.email"; + public static final int EMAIL_INDEX = 1; + + public static final String FIELD_NAMES[] = new String[]{ + EMAIL, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + EMAIL, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, EMAIL, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, EMAIL, }; + + private Integer id; + private String email; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsEmail() + { + super(); + dirtyProperties = new boolean[]{ 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 + { + setLockedForRefresh( true ); + 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.ListfromHsEmailEmpresa_email_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsEmailEmpresaData.class , getPrimaryKey().getMap().get("id"), "email_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsEmailEstabelecimento_email_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsEmailEstabelecimentoData.class , getPrimaryKey().getMap().get("id"), "email_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + 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 + { + setLockedForRefresh( true ); + 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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsEmail.ID_INDEX: + value = getId(); + break; + case HsEmail.EMAIL_INDEX: + value = getEmail(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsEmail.ID_INDEX: + value = this.id; + break; + case HsEmail.EMAIL_INDEX: + value = this.email; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsEmail.ID_INDEX: + setId( ( Integer ) value ); + break; + case HsEmail.EMAIL_INDEX: + setEmail( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsEmail.ID_INDEX: + this.id = ( Integer ) value; + break; + case HsEmail.EMAIL_INDEX: + this.email = ( 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 HsEmail.ID_INDEX: + theClass = Integer.class; + break; + case HsEmail.EMAIL_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsEmail._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, HsEmail.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsEmailEmpresa.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsEmailEmpresa.java new file mode 100644 index 00000000..e4112f97 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsEmailEmpresa.java @@ -0,0 +1,379 @@ +/* +* HsEmailEmpresa.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsEmailEmpresa extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( HsEmailEmpresa.CLASS_IDENTIFIER, HsEmailEmpresa.EMAIL_ID, HsEmailEmpresa.TO_EMAIL_ID ); + FIELD_INDEXES.put( HsEmailEmpresa.EMAIL_ID, HsEmailEmpresa.EMAIL_ID_INDEX ); + FIELD_INDEXES.put( HsEmailEmpresa.EMAIL_ID_FULL, HsEmailEmpresa.EMAIL_ID_INDEX ); + FIELD_INDEXES.put( HsEmailEmpresa.TO_EMAIL_ID, HsEmailEmpresa.TO_EMAIL_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsEmailEmpresa.CLASS_IDENTIFIER, HsEmailEmpresa.EMPRESA_ID, HsEmailEmpresa.TO_EMPRESA_ID ); + FIELD_INDEXES.put( HsEmailEmpresa.EMPRESA_ID, HsEmailEmpresa.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( HsEmailEmpresa.EMPRESA_ID_FULL, HsEmailEmpresa.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( HsEmailEmpresa.TO_EMPRESA_ID, HsEmailEmpresa.TO_EMPRESA_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 ForeignKeyemail_idTohs_email = + new com.evolute.entity.ForeignKey( HsEmailEmpresa.class, HsEmailEmpresa.EMAIL_ID, siprp.data.outer.HsEmailData.class, siprp.data.outer.HsEmailData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( HsEmailEmpresa.class, HsEmailEmpresa.EMPRESA_ID, siprp.data.outer.EmpresasData.class, siprp.data.outer.EmpresasData.ID ); + + public static final String TABLENAME = "hs_email_empresa"; + + + public static final String CLASS_IDENTIFIER = "hs_email_empresa1277401737161"; + + public static final int _INVALID__INDEX = -1; + public static final String EMAIL_ID = "email_id"; + public static final String EMAIL_ID_FULL = "hs_email_empresa.email_id"; + public static final int EMAIL_ID_INDEX = 0; + public static final String TO_EMAIL_ID = "to_email_id"; + public static final int TO_EMAIL_ID_INDEX = 1; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "hs_email_empresa.empresa_id"; + public static final int EMPRESA_ID_INDEX = 2; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 3; + + 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[]{ + EMAIL_ID, EMPRESA_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + EMAIL_ID, EMPRESA_ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + EMAIL_ID, EMPRESA_ID, }; + + private Integer email_id; + private siprp.data.outer.HsEmailData to_email_id; + private Integer empresa_id; + private siprp.data.outer.EmpresasData to_empresa_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsEmailEmpresa() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false }; + } + + public Integer getEmail_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( EMAIL_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.email_id; + } + + public void setEmail_id( Integer email_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( EMAIL_ID, email_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.email_id = email_id; + LAZY_LOADED_OBJECTS.put( EMAIL_ID, Boolean.TRUE ); + } + + public siprp.data.outer.HsEmailData toEmail_id() + { + try + { + prepare( TO_EMAIL_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_email_id; + } + + public void setToEmail_id( siprp.data.outer.HsEmailData to_email_id ) + { + try + { + preProcess( TO_EMAIL_ID, to_email_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_email_id = to_email_id; + } + + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsEmailEmpresa.EMAIL_ID_INDEX: + value = getEmail_id(); + break; + case HsEmailEmpresa.TO_EMAIL_ID_INDEX: + value = toEmail_id(); + break; + case HsEmailEmpresa.EMPRESA_ID_INDEX: + value = getEmpresa_id(); + break; + case HsEmailEmpresa.TO_EMPRESA_ID_INDEX: + value = toEmpresa_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsEmailEmpresa.EMAIL_ID_INDEX: + value = this.email_id; + break; + case HsEmailEmpresa.TO_EMAIL_ID_INDEX: + value = this.to_email_id; + break; + case HsEmailEmpresa.EMPRESA_ID_INDEX: + value = this.empresa_id; + break; + case HsEmailEmpresa.TO_EMPRESA_ID_INDEX: + value = this.to_empresa_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsEmailEmpresa.EMAIL_ID_INDEX: + setEmail_id( ( Integer ) value ); + break; + case HsEmailEmpresa.TO_EMAIL_ID_INDEX: + setToEmail_id( ( siprp.data.outer.HsEmailData ) value ); + break; + case HsEmailEmpresa.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case HsEmailEmpresa.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( siprp.data.outer.EmpresasData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsEmailEmpresa.EMAIL_ID_INDEX: + this.email_id = ( Integer ) value; + break; + case HsEmailEmpresa.TO_EMAIL_ID_INDEX: + this.to_email_id = ( siprp.data.outer.HsEmailData ) value; + break; + case HsEmailEmpresa.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case HsEmailEmpresa.TO_EMPRESA_ID_INDEX: + this.to_empresa_id = ( siprp.data.outer.EmpresasData ) 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() + { + throw new RuntimeException( "getPrimaryKeyName on HsEmailEmpresa is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case HsEmailEmpresa.EMAIL_ID_INDEX: + theClass = Integer.class; + break; + case HsEmailEmpresa.TO_EMAIL_ID_INDEX: + theClass = siprp.data.outer.HsEmailData.class; + break; + case HsEmailEmpresa.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case HsEmailEmpresa.TO_EMPRESA_ID_INDEX: + theClass = siprp.data.outer.EmpresasData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsEmailEmpresa._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, HsEmailEmpresa.PK_FIELD_NAMES ); + primaryKey.set( 0, getEmail_id() ); + primaryKey.set( 1, getEmpresa_id() ); + } + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsEmailEstabelecimento.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsEmailEstabelecimento.java new file mode 100644 index 00000000..cc26944c --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsEmailEstabelecimento.java @@ -0,0 +1,379 @@ +/* +* HsEmailEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsEmailEstabelecimento extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( HsEmailEstabelecimento.CLASS_IDENTIFIER, HsEmailEstabelecimento.EMAIL_ID, HsEmailEstabelecimento.TO_EMAIL_ID ); + FIELD_INDEXES.put( HsEmailEstabelecimento.EMAIL_ID, HsEmailEstabelecimento.EMAIL_ID_INDEX ); + FIELD_INDEXES.put( HsEmailEstabelecimento.EMAIL_ID_FULL, HsEmailEstabelecimento.EMAIL_ID_INDEX ); + FIELD_INDEXES.put( HsEmailEstabelecimento.TO_EMAIL_ID, HsEmailEstabelecimento.TO_EMAIL_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsEmailEstabelecimento.CLASS_IDENTIFIER, HsEmailEstabelecimento.ESTABELECIMENTO_ID, HsEmailEstabelecimento.TO_ESTABELECIMENTO_ID ); + FIELD_INDEXES.put( HsEmailEstabelecimento.ESTABELECIMENTO_ID, HsEmailEstabelecimento.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( HsEmailEstabelecimento.ESTABELECIMENTO_ID_FULL, HsEmailEstabelecimento.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( HsEmailEstabelecimento.TO_ESTABELECIMENTO_ID, HsEmailEstabelecimento.TO_ESTABELECIMENTO_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 ForeignKeyemail_idTohs_email = + new com.evolute.entity.ForeignKey( HsEmailEstabelecimento.class, HsEmailEstabelecimento.EMAIL_ID, siprp.data.outer.HsEmailData.class, siprp.data.outer.HsEmailData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( HsEmailEstabelecimento.class, HsEmailEstabelecimento.ESTABELECIMENTO_ID, siprp.data.outer.EstabelecimentosData.class, siprp.data.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "hs_email_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "hs_email_estabelecimento1277401737161"; + + public static final int _INVALID__INDEX = -1; + public static final String EMAIL_ID = "email_id"; + public static final String EMAIL_ID_FULL = "hs_email_estabelecimento.email_id"; + public static final int EMAIL_ID_INDEX = 0; + public static final String TO_EMAIL_ID = "to_email_id"; + public static final int TO_EMAIL_ID_INDEX = 1; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "hs_email_estabelecimento.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 2; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final int TO_ESTABELECIMENTO_ID_INDEX = 3; + + 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[]{ + EMAIL_ID, ESTABELECIMENTO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + EMAIL_ID, ESTABELECIMENTO_ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + EMAIL_ID, ESTABELECIMENTO_ID, }; + + private Integer email_id; + private siprp.data.outer.HsEmailData to_email_id; + private Integer estabelecimento_id; + private siprp.data.outer.EstabelecimentosData to_estabelecimento_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsEmailEstabelecimento() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false }; + } + + public Integer getEmail_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( EMAIL_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.email_id; + } + + public void setEmail_id( Integer email_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( EMAIL_ID, email_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.email_id = email_id; + LAZY_LOADED_OBJECTS.put( EMAIL_ID, Boolean.TRUE ); + } + + public siprp.data.outer.HsEmailData toEmail_id() + { + try + { + prepare( TO_EMAIL_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_email_id; + } + + public void setToEmail_id( siprp.data.outer.HsEmailData to_email_id ) + { + try + { + preProcess( TO_EMAIL_ID, to_email_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_email_id = to_email_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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsEmailEstabelecimento.EMAIL_ID_INDEX: + value = getEmail_id(); + break; + case HsEmailEstabelecimento.TO_EMAIL_ID_INDEX: + value = toEmail_id(); + break; + case HsEmailEstabelecimento.ESTABELECIMENTO_ID_INDEX: + value = getEstabelecimento_id(); + break; + case HsEmailEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + value = toEstabelecimento_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsEmailEstabelecimento.EMAIL_ID_INDEX: + value = this.email_id; + break; + case HsEmailEstabelecimento.TO_EMAIL_ID_INDEX: + value = this.to_email_id; + break; + case HsEmailEstabelecimento.ESTABELECIMENTO_ID_INDEX: + value = this.estabelecimento_id; + break; + case HsEmailEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + value = this.to_estabelecimento_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsEmailEstabelecimento.EMAIL_ID_INDEX: + setEmail_id( ( Integer ) value ); + break; + case HsEmailEstabelecimento.TO_EMAIL_ID_INDEX: + setToEmail_id( ( siprp.data.outer.HsEmailData ) value ); + break; + case HsEmailEstabelecimento.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case HsEmailEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( siprp.data.outer.EstabelecimentosData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsEmailEstabelecimento.EMAIL_ID_INDEX: + this.email_id = ( Integer ) value; + break; + case HsEmailEstabelecimento.TO_EMAIL_ID_INDEX: + this.to_email_id = ( siprp.data.outer.HsEmailData ) value; + break; + case HsEmailEstabelecimento.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case HsEmailEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + this.to_estabelecimento_id = ( siprp.data.outer.EstabelecimentosData ) 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() + { + throw new RuntimeException( "getPrimaryKeyName on HsEmailEstabelecimento is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case HsEmailEstabelecimento.EMAIL_ID_INDEX: + theClass = Integer.class; + break; + case HsEmailEstabelecimento.TO_EMAIL_ID_INDEX: + theClass = siprp.data.outer.HsEmailData.class; + break; + case HsEmailEstabelecimento.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case HsEmailEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + theClass = siprp.data.outer.EstabelecimentosData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsEmailEstabelecimento._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, HsEmailEstabelecimento.PK_FIELD_NAMES ); + primaryKey.set( 0, getEmail_id() ); + primaryKey.set( 1, getEstabelecimento_id() ); + } + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsEquipamento.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsEquipamento.java new file mode 100644 index 00000000..1eb05f58 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsEquipamento.java @@ -0,0 +1,431 @@ +/* +* HsEquipamento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsEquipamento extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( HsEquipamento.ID, HsEquipamento.ID_INDEX ); + FIELD_INDEXES.put( HsEquipamento.ID_FULL, HsEquipamento.ID_INDEX ); + FIELD_INDEXES.put( HsEquipamento.TIPO, HsEquipamento.TIPO_INDEX ); + FIELD_INDEXES.put( HsEquipamento.TIPO_FULL, HsEquipamento.TIPO_INDEX ); + FIELD_INDEXES.put( HsEquipamento.MARCA, HsEquipamento.MARCA_INDEX ); + FIELD_INDEXES.put( HsEquipamento.MARCA_FULL, HsEquipamento.MARCA_INDEX ); + FIELD_INDEXES.put( HsEquipamento.MODELO, HsEquipamento.MODELO_INDEX ); + FIELD_INDEXES.put( HsEquipamento.MODELO_FULL, HsEquipamento.MODELO_INDEX ); + FIELD_INDEXES.put( HsEquipamento.DELETED_DATE, HsEquipamento.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( HsEquipamento.DELETED_DATE_FULL, HsEquipamento.DELETED_DATE_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "hs_equipamento"; + + + public static final String CLASS_IDENTIFIER = "hs_equipamento1277401737162"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "hs_equipamento.id"; + public static final int ID_INDEX = 0; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "hs_equipamento.tipo"; + public static final int TIPO_INDEX = 1; + public static final String MARCA = "marca"; + public static final String MARCA_FULL = "hs_equipamento.marca"; + public static final int MARCA_INDEX = 2; + public static final String MODELO = "modelo"; + public static final String MODELO_FULL = "hs_equipamento.modelo"; + public static final int MODELO_INDEX = 3; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_equipamento.deleted_date"; + public static final int DELETED_DATE_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + TIPO, MARCA, MODELO, DELETED_DATE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TIPO, TABLENAME + "." + MARCA, TABLENAME + "." + MODELO, TABLENAME + "." + DELETED_DATE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TIPO, MARCA, MODELO, DELETED_DATE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, TIPO, MARCA, MODELO, DELETED_DATE, }; + + private Integer id; + private String tipo; + private String marca; + private String modelo; + private java.sql.Timestamp deleted_date; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsEquipamento() + { + 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 + { + setLockedForRefresh( true ); + 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 getTipo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TIPO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tipo; + } + + public void setTipo( String tipo ) + { + try + { + setLockedForRefresh( true ); + 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 getMarca() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MARCA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.marca; + } + + public void setMarca( String marca ) + { + try + { + setLockedForRefresh( true ); + preProcess( MARCA, marca ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.marca = marca; + LAZY_LOADED_OBJECTS.put( MARCA, Boolean.TRUE ); + } + + public String getModelo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MODELO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.modelo; + } + + public void setModelo( String modelo ) + { + try + { + setLockedForRefresh( true ); + preProcess( MODELO, modelo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.modelo = modelo; + LAZY_LOADED_OBJECTS.put( MODELO, Boolean.TRUE ); + } + + public java.sql.Timestamp getDeleted_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_date; + } + + public void setDeleted_date( java.sql.Timestamp deleted_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_DATE, deleted_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_date = deleted_date; + LAZY_LOADED_OBJECTS.put( DELETED_DATE, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsEquipamento.ID_INDEX: + value = getId(); + break; + case HsEquipamento.TIPO_INDEX: + value = getTipo(); + break; + case HsEquipamento.MARCA_INDEX: + value = getMarca(); + break; + case HsEquipamento.MODELO_INDEX: + value = getModelo(); + break; + case HsEquipamento.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsEquipamento.ID_INDEX: + value = this.id; + break; + case HsEquipamento.TIPO_INDEX: + value = this.tipo; + break; + case HsEquipamento.MARCA_INDEX: + value = this.marca; + break; + case HsEquipamento.MODELO_INDEX: + value = this.modelo; + break; + case HsEquipamento.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsEquipamento.ID_INDEX: + setId( ( Integer ) value ); + break; + case HsEquipamento.TIPO_INDEX: + setTipo( ( String ) value ); + break; + case HsEquipamento.MARCA_INDEX: + setMarca( ( String ) value ); + break; + case HsEquipamento.MODELO_INDEX: + setModelo( ( String ) value ); + break; + case HsEquipamento.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsEquipamento.ID_INDEX: + this.id = ( Integer ) value; + break; + case HsEquipamento.TIPO_INDEX: + this.tipo = ( String ) value; + break; + case HsEquipamento.MARCA_INDEX: + this.marca = ( String ) value; + break; + case HsEquipamento.MODELO_INDEX: + this.modelo = ( String ) value; + break; + case HsEquipamento.DELETED_DATE_INDEX: + this.deleted_date = ( 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 HsEquipamento.ID_INDEX: + theClass = Integer.class; + break; + case HsEquipamento.TIPO_INDEX: + theClass = String.class; + break; + case HsEquipamento.MARCA_INDEX: + theClass = String.class; + break; + case HsEquipamento.MODELO_INDEX: + theClass = String.class; + break; + case HsEquipamento.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsEquipamento._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, HsEquipamento.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsLegislacao.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsLegislacao.java new file mode 100644 index 00000000..893f5659 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsLegislacao.java @@ -0,0 +1,458 @@ +/* +* HsLegislacao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsLegislacao extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( HsLegislacao.ID, HsLegislacao.ID_INDEX ); + FIELD_INDEXES.put( HsLegislacao.ID_FULL, HsLegislacao.ID_INDEX ); + FIELD_INDEXES.put( HsLegislacao.DESCRIPTION, HsLegislacao.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( HsLegislacao.DESCRIPTION_FULL, HsLegislacao.DESCRIPTION_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsLegislacao.CLASS_IDENTIFIER, HsLegislacao.CATEGORIA_ID, HsLegislacao.TO_CATEGORIA_ID ); + FIELD_INDEXES.put( HsLegislacao.CATEGORIA_ID, HsLegislacao.CATEGORIA_ID_INDEX ); + FIELD_INDEXES.put( HsLegislacao.CATEGORIA_ID_FULL, HsLegislacao.CATEGORIA_ID_INDEX ); + FIELD_INDEXES.put( HsLegislacao.TO_CATEGORIA_ID, HsLegislacao.TO_CATEGORIA_ID_INDEX ); + FIELD_INDEXES.put( HsLegislacao.DELETED_DATE, HsLegislacao.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( HsLegislacao.DELETED_DATE_FULL, HsLegislacao.DELETED_DATE_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeycategoria_idTohs_legislacao_categoria = + new com.evolute.entity.ForeignKey( HsLegislacao.class, HsLegislacao.CATEGORIA_ID, siprp.data.outer.HsLegislacaoCategoriaData.class, siprp.data.outer.HsLegislacaoCategoriaData.ID ); + + public static final String TABLENAME = "hs_legislacao"; + + + public static final String CLASS_IDENTIFIER = "hs_legislacao1277401737162"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "hs_legislacao.id"; + public static final int ID_INDEX = 0; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_legislacao.description"; + public static final int DESCRIPTION_INDEX = 1; + public static final String CATEGORIA_ID = "categoria_id"; + public static final String CATEGORIA_ID_FULL = "hs_legislacao.categoria_id"; + public static final int CATEGORIA_ID_INDEX = 2; + public static final String TO_CATEGORIA_ID = "to_categoria_id"; + public static final int TO_CATEGORIA_ID_INDEX = 3; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_legislacao.deleted_date"; + public static final int DELETED_DATE_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRIPTION, CATEGORIA_ID, TO_CATEGORIA_ID, DELETED_DATE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRIPTION, TABLENAME + "." + CATEGORIA_ID, TABLENAME + "." + TO_CATEGORIA_ID, TABLENAME + "." + DELETED_DATE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRIPTION, CATEGORIA_ID, DELETED_DATE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DESCRIPTION, CATEGORIA_ID, DELETED_DATE, }; + + private Integer id; + private String description; + private Integer categoria_id; + private siprp.data.outer.HsLegislacaoCategoriaData to_categoria_id; + private java.sql.Timestamp deleted_date; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsLegislacao() + { + 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 + { + setLockedForRefresh( true ); + 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.ListfromHsLegislacaoEmpresa_legislacao_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsLegislacaoEmpresaData.class , getPrimaryKey().getMap().get("id"), "legislacao_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsLegislacaoEstabelecimento_legislacao_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsLegislacaoEstabelecimentoData.class , getPrimaryKey().getMap().get("id"), "legislacao_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + 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 + { + setLockedForRefresh( true ); + 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 Integer getCategoria_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CATEGORIA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.categoria_id; + } + + public void setCategoria_id( Integer categoria_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( CATEGORIA_ID, categoria_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.categoria_id = categoria_id; + LAZY_LOADED_OBJECTS.put( CATEGORIA_ID, Boolean.TRUE ); + } + + public siprp.data.outer.HsLegislacaoCategoriaData toCategoria_id() + { + try + { + prepare( TO_CATEGORIA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_categoria_id; + } + + public void setToCategoria_id( siprp.data.outer.HsLegislacaoCategoriaData to_categoria_id ) + { + try + { + preProcess( TO_CATEGORIA_ID, to_categoria_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_categoria_id = to_categoria_id; + } + + public java.sql.Timestamp getDeleted_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_date; + } + + public void setDeleted_date( java.sql.Timestamp deleted_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_DATE, deleted_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_date = deleted_date; + LAZY_LOADED_OBJECTS.put( DELETED_DATE, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsLegislacao.ID_INDEX: + value = getId(); + break; + case HsLegislacao.DESCRIPTION_INDEX: + value = getDescription(); + break; + case HsLegislacao.CATEGORIA_ID_INDEX: + value = getCategoria_id(); + break; + case HsLegislacao.TO_CATEGORIA_ID_INDEX: + value = toCategoria_id(); + break; + case HsLegislacao.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsLegislacao.ID_INDEX: + value = this.id; + break; + case HsLegislacao.DESCRIPTION_INDEX: + value = this.description; + break; + case HsLegislacao.CATEGORIA_ID_INDEX: + value = this.categoria_id; + break; + case HsLegislacao.TO_CATEGORIA_ID_INDEX: + value = this.to_categoria_id; + break; + case HsLegislacao.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsLegislacao.ID_INDEX: + setId( ( Integer ) value ); + break; + case HsLegislacao.DESCRIPTION_INDEX: + setDescription( ( String ) value ); + break; + case HsLegislacao.CATEGORIA_ID_INDEX: + setCategoria_id( ( Integer ) value ); + break; + case HsLegislacao.TO_CATEGORIA_ID_INDEX: + setToCategoria_id( ( siprp.data.outer.HsLegislacaoCategoriaData ) value ); + break; + case HsLegislacao.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsLegislacao.ID_INDEX: + this.id = ( Integer ) value; + break; + case HsLegislacao.DESCRIPTION_INDEX: + this.description = ( String ) value; + break; + case HsLegislacao.CATEGORIA_ID_INDEX: + this.categoria_id = ( Integer ) value; + break; + case HsLegislacao.TO_CATEGORIA_ID_INDEX: + this.to_categoria_id = ( siprp.data.outer.HsLegislacaoCategoriaData ) value; + break; + case HsLegislacao.DELETED_DATE_INDEX: + this.deleted_date = ( 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 HsLegislacao.ID_INDEX: + theClass = Integer.class; + break; + case HsLegislacao.DESCRIPTION_INDEX: + theClass = String.class; + break; + case HsLegislacao.CATEGORIA_ID_INDEX: + theClass = Integer.class; + break; + case HsLegislacao.TO_CATEGORIA_ID_INDEX: + theClass = siprp.data.outer.HsLegislacaoCategoriaData.class; + break; + case HsLegislacao.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsLegislacao._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, HsLegislacao.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsLegislacaoCategoria.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsLegislacaoCategoria.java new file mode 100644 index 00000000..4ee11264 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsLegislacaoCategoria.java @@ -0,0 +1,344 @@ +/* +* HsLegislacaoCategoria.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsLegislacaoCategoria extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( HsLegislacaoCategoria.ID, HsLegislacaoCategoria.ID_INDEX ); + FIELD_INDEXES.put( HsLegislacaoCategoria.ID_FULL, HsLegislacaoCategoria.ID_INDEX ); + FIELD_INDEXES.put( HsLegislacaoCategoria.DESCRIPTION, HsLegislacaoCategoria.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( HsLegislacaoCategoria.DESCRIPTION_FULL, HsLegislacaoCategoria.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( HsLegislacaoCategoria.DELETED_DATE, HsLegislacaoCategoria.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( HsLegislacaoCategoria.DELETED_DATE_FULL, HsLegislacaoCategoria.DELETED_DATE_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "hs_legislacao_categoria"; + + + public static final String CLASS_IDENTIFIER = "hs_legislacao_categoria1277401737163"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "hs_legislacao_categoria.id"; + public static final int ID_INDEX = 0; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_legislacao_categoria.description"; + public static final int DESCRIPTION_INDEX = 1; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_legislacao_categoria.deleted_date"; + public static final int DELETED_DATE_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRIPTION, DELETED_DATE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRIPTION, TABLENAME + "." + DELETED_DATE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRIPTION, DELETED_DATE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DESCRIPTION, DELETED_DATE, }; + + private Integer id; + private String description; + private java.sql.Timestamp deleted_date; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsLegislacaoCategoria() + { + 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 + { + setLockedForRefresh( true ); + 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.ListfromHsLegislacao_categoria_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsLegislacaoData.class , getPrimaryKey().getMap().get("id"), "categoria_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + 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 + { + setLockedForRefresh( true ); + 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 java.sql.Timestamp getDeleted_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_date; + } + + public void setDeleted_date( java.sql.Timestamp deleted_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_DATE, deleted_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_date = deleted_date; + LAZY_LOADED_OBJECTS.put( DELETED_DATE, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsLegislacaoCategoria.ID_INDEX: + value = getId(); + break; + case HsLegislacaoCategoria.DESCRIPTION_INDEX: + value = getDescription(); + break; + case HsLegislacaoCategoria.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsLegislacaoCategoria.ID_INDEX: + value = this.id; + break; + case HsLegislacaoCategoria.DESCRIPTION_INDEX: + value = this.description; + break; + case HsLegislacaoCategoria.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsLegislacaoCategoria.ID_INDEX: + setId( ( Integer ) value ); + break; + case HsLegislacaoCategoria.DESCRIPTION_INDEX: + setDescription( ( String ) value ); + break; + case HsLegislacaoCategoria.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsLegislacaoCategoria.ID_INDEX: + this.id = ( Integer ) value; + break; + case HsLegislacaoCategoria.DESCRIPTION_INDEX: + this.description = ( String ) value; + break; + case HsLegislacaoCategoria.DELETED_DATE_INDEX: + this.deleted_date = ( 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 HsLegislacaoCategoria.ID_INDEX: + theClass = Integer.class; + break; + case HsLegislacaoCategoria.DESCRIPTION_INDEX: + theClass = String.class; + break; + case HsLegislacaoCategoria.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsLegislacaoCategoria._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, HsLegislacaoCategoria.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsLegislacaoEmpresa.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsLegislacaoEmpresa.java new file mode 100644 index 00000000..54398582 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsLegislacaoEmpresa.java @@ -0,0 +1,379 @@ +/* +* HsLegislacaoEmpresa.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsLegislacaoEmpresa extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( HsLegislacaoEmpresa.CLASS_IDENTIFIER, HsLegislacaoEmpresa.LEGISLACAO_ID, HsLegislacaoEmpresa.TO_LEGISLACAO_ID ); + FIELD_INDEXES.put( HsLegislacaoEmpresa.LEGISLACAO_ID, HsLegislacaoEmpresa.LEGISLACAO_ID_INDEX ); + FIELD_INDEXES.put( HsLegislacaoEmpresa.LEGISLACAO_ID_FULL, HsLegislacaoEmpresa.LEGISLACAO_ID_INDEX ); + FIELD_INDEXES.put( HsLegislacaoEmpresa.TO_LEGISLACAO_ID, HsLegislacaoEmpresa.TO_LEGISLACAO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsLegislacaoEmpresa.CLASS_IDENTIFIER, HsLegislacaoEmpresa.EMPRESA_ID, HsLegislacaoEmpresa.TO_EMPRESA_ID ); + FIELD_INDEXES.put( HsLegislacaoEmpresa.EMPRESA_ID, HsLegislacaoEmpresa.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( HsLegislacaoEmpresa.EMPRESA_ID_FULL, HsLegislacaoEmpresa.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( HsLegislacaoEmpresa.TO_EMPRESA_ID, HsLegislacaoEmpresa.TO_EMPRESA_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 ForeignKeylegislacao_idTohs_legislacao = + new com.evolute.entity.ForeignKey( HsLegislacaoEmpresa.class, HsLegislacaoEmpresa.LEGISLACAO_ID, siprp.data.outer.HsLegislacaoData.class, siprp.data.outer.HsLegislacaoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( HsLegislacaoEmpresa.class, HsLegislacaoEmpresa.EMPRESA_ID, siprp.data.outer.EmpresasData.class, siprp.data.outer.EmpresasData.ID ); + + public static final String TABLENAME = "hs_legislacao_empresa"; + + + public static final String CLASS_IDENTIFIER = "hs_legislacao_empresa1277401737163"; + + public static final int _INVALID__INDEX = -1; + public static final String LEGISLACAO_ID = "legislacao_id"; + public static final String LEGISLACAO_ID_FULL = "hs_legislacao_empresa.legislacao_id"; + public static final int LEGISLACAO_ID_INDEX = 0; + public static final String TO_LEGISLACAO_ID = "to_legislacao_id"; + public static final int TO_LEGISLACAO_ID_INDEX = 1; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "hs_legislacao_empresa.empresa_id"; + public static final int EMPRESA_ID_INDEX = 2; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 3; + + 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[]{ + LEGISLACAO_ID, EMPRESA_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + LEGISLACAO_ID, EMPRESA_ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + LEGISLACAO_ID, EMPRESA_ID, }; + + private Integer legislacao_id; + private siprp.data.outer.HsLegislacaoData to_legislacao_id; + private Integer empresa_id; + private siprp.data.outer.EmpresasData to_empresa_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsLegislacaoEmpresa() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false }; + } + + public Integer getLegislacao_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LEGISLACAO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.legislacao_id; + } + + public void setLegislacao_id( Integer legislacao_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( LEGISLACAO_ID, legislacao_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.legislacao_id = legislacao_id; + LAZY_LOADED_OBJECTS.put( LEGISLACAO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.HsLegislacaoData toLegislacao_id() + { + try + { + prepare( TO_LEGISLACAO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_legislacao_id; + } + + public void setToLegislacao_id( siprp.data.outer.HsLegislacaoData to_legislacao_id ) + { + try + { + preProcess( TO_LEGISLACAO_ID, to_legislacao_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_legislacao_id = to_legislacao_id; + } + + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsLegislacaoEmpresa.LEGISLACAO_ID_INDEX: + value = getLegislacao_id(); + break; + case HsLegislacaoEmpresa.TO_LEGISLACAO_ID_INDEX: + value = toLegislacao_id(); + break; + case HsLegislacaoEmpresa.EMPRESA_ID_INDEX: + value = getEmpresa_id(); + break; + case HsLegislacaoEmpresa.TO_EMPRESA_ID_INDEX: + value = toEmpresa_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsLegislacaoEmpresa.LEGISLACAO_ID_INDEX: + value = this.legislacao_id; + break; + case HsLegislacaoEmpresa.TO_LEGISLACAO_ID_INDEX: + value = this.to_legislacao_id; + break; + case HsLegislacaoEmpresa.EMPRESA_ID_INDEX: + value = this.empresa_id; + break; + case HsLegislacaoEmpresa.TO_EMPRESA_ID_INDEX: + value = this.to_empresa_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsLegislacaoEmpresa.LEGISLACAO_ID_INDEX: + setLegislacao_id( ( Integer ) value ); + break; + case HsLegislacaoEmpresa.TO_LEGISLACAO_ID_INDEX: + setToLegislacao_id( ( siprp.data.outer.HsLegislacaoData ) value ); + break; + case HsLegislacaoEmpresa.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case HsLegislacaoEmpresa.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( siprp.data.outer.EmpresasData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsLegislacaoEmpresa.LEGISLACAO_ID_INDEX: + this.legislacao_id = ( Integer ) value; + break; + case HsLegislacaoEmpresa.TO_LEGISLACAO_ID_INDEX: + this.to_legislacao_id = ( siprp.data.outer.HsLegislacaoData ) value; + break; + case HsLegislacaoEmpresa.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case HsLegislacaoEmpresa.TO_EMPRESA_ID_INDEX: + this.to_empresa_id = ( siprp.data.outer.EmpresasData ) 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() + { + throw new RuntimeException( "getPrimaryKeyName on HsLegislacaoEmpresa is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case HsLegislacaoEmpresa.LEGISLACAO_ID_INDEX: + theClass = Integer.class; + break; + case HsLegislacaoEmpresa.TO_LEGISLACAO_ID_INDEX: + theClass = siprp.data.outer.HsLegislacaoData.class; + break; + case HsLegislacaoEmpresa.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case HsLegislacaoEmpresa.TO_EMPRESA_ID_INDEX: + theClass = siprp.data.outer.EmpresasData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsLegislacaoEmpresa._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, HsLegislacaoEmpresa.PK_FIELD_NAMES ); + primaryKey.set( 0, getLegislacao_id() ); + primaryKey.set( 1, getEmpresa_id() ); + } + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsLegislacaoEstabelecimento.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsLegislacaoEstabelecimento.java new file mode 100644 index 00000000..47994158 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsLegislacaoEstabelecimento.java @@ -0,0 +1,429 @@ +/* +* HsLegislacaoEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsLegislacaoEstabelecimento extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( HsLegislacaoEstabelecimento.CLASS_IDENTIFIER, HsLegislacaoEstabelecimento.LEGISLACAO_ID, HsLegislacaoEstabelecimento.TO_LEGISLACAO_ID ); + FIELD_INDEXES.put( HsLegislacaoEstabelecimento.LEGISLACAO_ID, HsLegislacaoEstabelecimento.LEGISLACAO_ID_INDEX ); + FIELD_INDEXES.put( HsLegislacaoEstabelecimento.LEGISLACAO_ID_FULL, HsLegislacaoEstabelecimento.LEGISLACAO_ID_INDEX ); + FIELD_INDEXES.put( HsLegislacaoEstabelecimento.TO_LEGISLACAO_ID, HsLegislacaoEstabelecimento.TO_LEGISLACAO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsLegislacaoEstabelecimento.CLASS_IDENTIFIER, HsLegislacaoEstabelecimento.ESTABELECIMENTO_ID, HsLegislacaoEstabelecimento.TO_ESTABELECIMENTO_ID ); + FIELD_INDEXES.put( HsLegislacaoEstabelecimento.ESTABELECIMENTO_ID, HsLegislacaoEstabelecimento.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( HsLegislacaoEstabelecimento.ESTABELECIMENTO_ID_FULL, HsLegislacaoEstabelecimento.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( HsLegislacaoEstabelecimento.TO_ESTABELECIMENTO_ID, HsLegislacaoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( HsLegislacaoEstabelecimento.ORDEM, HsLegislacaoEstabelecimento.ORDEM_INDEX ); + FIELD_INDEXES.put( HsLegislacaoEstabelecimento.ORDEM_FULL, HsLegislacaoEstabelecimento.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 ForeignKeylegislacao_idTohs_legislacao = + new com.evolute.entity.ForeignKey( HsLegislacaoEstabelecimento.class, HsLegislacaoEstabelecimento.LEGISLACAO_ID, siprp.data.outer.HsLegislacaoData.class, siprp.data.outer.HsLegislacaoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( HsLegislacaoEstabelecimento.class, HsLegislacaoEstabelecimento.ESTABELECIMENTO_ID, siprp.data.outer.EstabelecimentosData.class, siprp.data.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "hs_legislacao_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "hs_legislacao_estabelecimento1277401737163"; + + public static final int _INVALID__INDEX = -1; + public static final String LEGISLACAO_ID = "legislacao_id"; + public static final String LEGISLACAO_ID_FULL = "hs_legislacao_estabelecimento.legislacao_id"; + public static final int LEGISLACAO_ID_INDEX = 0; + public static final String TO_LEGISLACAO_ID = "to_legislacao_id"; + public static final int TO_LEGISLACAO_ID_INDEX = 1; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "hs_legislacao_estabelecimento.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 2; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final int TO_ESTABELECIMENTO_ID_INDEX = 3; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "hs_legislacao_estabelecimento.ordem"; + public static final int ORDEM_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + ORDEM, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ORDEM, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + LEGISLACAO_ID, ESTABELECIMENTO_ID, ORDEM, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + LEGISLACAO_ID, ESTABELECIMENTO_ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + LEGISLACAO_ID, ESTABELECIMENTO_ID, ORDEM, }; + + private Integer legislacao_id; + private siprp.data.outer.HsLegislacaoData to_legislacao_id; + private Integer estabelecimento_id; + private siprp.data.outer.EstabelecimentosData to_estabelecimento_id; + private Integer ordem; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsLegislacaoEstabelecimento() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false }; + } + + public Integer getLegislacao_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LEGISLACAO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.legislacao_id; + } + + public void setLegislacao_id( Integer legislacao_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( LEGISLACAO_ID, legislacao_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.legislacao_id = legislacao_id; + LAZY_LOADED_OBJECTS.put( LEGISLACAO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.HsLegislacaoData toLegislacao_id() + { + try + { + prepare( TO_LEGISLACAO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_legislacao_id; + } + + public void setToLegislacao_id( siprp.data.outer.HsLegislacaoData to_legislacao_id ) + { + try + { + preProcess( TO_LEGISLACAO_ID, to_legislacao_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_legislacao_id = to_legislacao_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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 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 + { + setLockedForRefresh( true ); + 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 HsLegislacaoEstabelecimento.LEGISLACAO_ID_INDEX: + value = getLegislacao_id(); + break; + case HsLegislacaoEstabelecimento.TO_LEGISLACAO_ID_INDEX: + value = toLegislacao_id(); + break; + case HsLegislacaoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + value = getEstabelecimento_id(); + break; + case HsLegislacaoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + value = toEstabelecimento_id(); + break; + case HsLegislacaoEstabelecimento.ORDEM_INDEX: + value = getOrdem(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsLegislacaoEstabelecimento.LEGISLACAO_ID_INDEX: + value = this.legislacao_id; + break; + case HsLegislacaoEstabelecimento.TO_LEGISLACAO_ID_INDEX: + value = this.to_legislacao_id; + break; + case HsLegislacaoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + value = this.estabelecimento_id; + break; + case HsLegislacaoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + value = this.to_estabelecimento_id; + break; + case HsLegislacaoEstabelecimento.ORDEM_INDEX: + value = this.ordem; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsLegislacaoEstabelecimento.LEGISLACAO_ID_INDEX: + setLegislacao_id( ( Integer ) value ); + break; + case HsLegislacaoEstabelecimento.TO_LEGISLACAO_ID_INDEX: + setToLegislacao_id( ( siprp.data.outer.HsLegislacaoData ) value ); + break; + case HsLegislacaoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case HsLegislacaoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( siprp.data.outer.EstabelecimentosData ) value ); + break; + case HsLegislacaoEstabelecimento.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsLegislacaoEstabelecimento.LEGISLACAO_ID_INDEX: + this.legislacao_id = ( Integer ) value; + break; + case HsLegislacaoEstabelecimento.TO_LEGISLACAO_ID_INDEX: + this.to_legislacao_id = ( siprp.data.outer.HsLegislacaoData ) value; + break; + case HsLegislacaoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case HsLegislacaoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + this.to_estabelecimento_id = ( siprp.data.outer.EstabelecimentosData ) value; + break; + case HsLegislacaoEstabelecimento.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() + { + throw new RuntimeException( "getPrimaryKeyName on HsLegislacaoEstabelecimento is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case HsLegislacaoEstabelecimento.LEGISLACAO_ID_INDEX: + theClass = Integer.class; + break; + case HsLegislacaoEstabelecimento.TO_LEGISLACAO_ID_INDEX: + theClass = siprp.data.outer.HsLegislacaoData.class; + break; + case HsLegislacaoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case HsLegislacaoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + theClass = siprp.data.outer.EstabelecimentosData.class; + break; + case HsLegislacaoEstabelecimento.ORDEM_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsLegislacaoEstabelecimento._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, HsLegislacaoEstabelecimento.PK_FIELD_NAMES ); + primaryKey.set( 0, getLegislacao_id() ); + primaryKey.set( 1, getEstabelecimento_id() ); + } + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsMedida.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsMedida.java new file mode 100644 index 00000000..cce2c37d --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsMedida.java @@ -0,0 +1,409 @@ +/* +* HsMedida.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsMedida extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( HsMedida.ID, HsMedida.ID_INDEX ); + FIELD_INDEXES.put( HsMedida.ID_FULL, HsMedida.ID_INDEX ); + FIELD_INDEXES.put( HsMedida.DESCRIPTION, HsMedida.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( HsMedida.DESCRIPTION_FULL, HsMedida.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( HsMedida.REQUESITOS_LEGAIS, HsMedida.REQUESITOS_LEGAIS_INDEX ); + FIELD_INDEXES.put( HsMedida.REQUESITOS_LEGAIS_FULL, HsMedida.REQUESITOS_LEGAIS_INDEX ); + FIELD_INDEXES.put( HsMedida.DELETED_DATE, HsMedida.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( HsMedida.DELETED_DATE_FULL, HsMedida.DELETED_DATE_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "hs_medida"; + + + public static final String CLASS_IDENTIFIER = "hs_medida1277401737164"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "hs_medida.id"; + public static final int ID_INDEX = 0; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_medida.description"; + public static final int DESCRIPTION_INDEX = 1; + public static final String REQUESITOS_LEGAIS = "requesitos_legais"; + public static final String REQUESITOS_LEGAIS_FULL = "hs_medida.requesitos_legais"; + public static final int REQUESITOS_LEGAIS_INDEX = 2; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_medida.deleted_date"; + public static final int DELETED_DATE_INDEX = 3; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRIPTION, REQUESITOS_LEGAIS, DELETED_DATE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRIPTION, TABLENAME + "." + REQUESITOS_LEGAIS, TABLENAME + "." + DELETED_DATE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRIPTION, REQUESITOS_LEGAIS, DELETED_DATE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DESCRIPTION, REQUESITOS_LEGAIS, DELETED_DATE, }; + + private Integer id; + private String description; + private String requesitos_legais; + private java.sql.Timestamp deleted_date; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsMedida() + { + 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 + { + setLockedForRefresh( true ); + 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.ListfromHsPostoMedida_medida_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsPostoMedidaData.class , getPrimaryKey().getMap().get("id"), "medida_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsRiscoMedida_medida_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsRiscoMedidaData.class , getPrimaryKey().getMap().get("id"), "medida_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + 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 + { + setLockedForRefresh( true ); + 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 String getRequesitos_legais() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( REQUESITOS_LEGAIS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.requesitos_legais; + } + + public void setRequesitos_legais( String requesitos_legais ) + { + try + { + setLockedForRefresh( true ); + preProcess( REQUESITOS_LEGAIS, requesitos_legais ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.requesitos_legais = requesitos_legais; + LAZY_LOADED_OBJECTS.put( REQUESITOS_LEGAIS, Boolean.TRUE ); + } + + public java.sql.Timestamp getDeleted_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_date; + } + + public void setDeleted_date( java.sql.Timestamp deleted_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_DATE, deleted_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_date = deleted_date; + LAZY_LOADED_OBJECTS.put( DELETED_DATE, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsMedida.ID_INDEX: + value = getId(); + break; + case HsMedida.DESCRIPTION_INDEX: + value = getDescription(); + break; + case HsMedida.REQUESITOS_LEGAIS_INDEX: + value = getRequesitos_legais(); + break; + case HsMedida.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsMedida.ID_INDEX: + value = this.id; + break; + case HsMedida.DESCRIPTION_INDEX: + value = this.description; + break; + case HsMedida.REQUESITOS_LEGAIS_INDEX: + value = this.requesitos_legais; + break; + case HsMedida.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsMedida.ID_INDEX: + setId( ( Integer ) value ); + break; + case HsMedida.DESCRIPTION_INDEX: + setDescription( ( String ) value ); + break; + case HsMedida.REQUESITOS_LEGAIS_INDEX: + setRequesitos_legais( ( String ) value ); + break; + case HsMedida.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsMedida.ID_INDEX: + this.id = ( Integer ) value; + break; + case HsMedida.DESCRIPTION_INDEX: + this.description = ( String ) value; + break; + case HsMedida.REQUESITOS_LEGAIS_INDEX: + this.requesitos_legais = ( String ) value; + break; + case HsMedida.DELETED_DATE_INDEX: + this.deleted_date = ( 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 HsMedida.ID_INDEX: + theClass = Integer.class; + break; + case HsMedida.DESCRIPTION_INDEX: + theClass = String.class; + break; + case HsMedida.REQUESITOS_LEGAIS_INDEX: + theClass = String.class; + break; + case HsMedida.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsMedida._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, HsMedida.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsNormalizacao.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsNormalizacao.java new file mode 100644 index 00000000..637afdd4 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsNormalizacao.java @@ -0,0 +1,459 @@ +/* +* HsNormalizacao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsNormalizacao extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( HsNormalizacao.ID, HsNormalizacao.ID_INDEX ); + FIELD_INDEXES.put( HsNormalizacao.ID_FULL, HsNormalizacao.ID_INDEX ); + FIELD_INDEXES.put( HsNormalizacao.CODIGO, HsNormalizacao.CODIGO_INDEX ); + FIELD_INDEXES.put( HsNormalizacao.CODIGO_FULL, HsNormalizacao.CODIGO_INDEX ); + FIELD_INDEXES.put( HsNormalizacao.DESCRICAO, HsNormalizacao.DESCRICAO_INDEX ); + FIELD_INDEXES.put( HsNormalizacao.DESCRICAO_FULL, HsNormalizacao.DESCRICAO_INDEX ); + FIELD_INDEXES.put( HsNormalizacao.PORTUGUESA, HsNormalizacao.PORTUGUESA_INDEX ); + FIELD_INDEXES.put( HsNormalizacao.PORTUGUESA_FULL, HsNormalizacao.PORTUGUESA_INDEX ); + FIELD_INDEXES.put( HsNormalizacao.DELETED_DATE, HsNormalizacao.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( HsNormalizacao.DELETED_DATE_FULL, HsNormalizacao.DELETED_DATE_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "hs_normalizacao"; + + + public static final String CLASS_IDENTIFIER = "hs_normalizacao1277401737164"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "hs_normalizacao.id"; + public static final int ID_INDEX = 0; + public static final String CODIGO = "codigo"; + public static final String CODIGO_FULL = "hs_normalizacao.codigo"; + public static final int CODIGO_INDEX = 1; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "hs_normalizacao.descricao"; + public static final int DESCRICAO_INDEX = 2; + public static final String PORTUGUESA = "portuguesa"; + public static final String PORTUGUESA_FULL = "hs_normalizacao.portuguesa"; + public static final int PORTUGUESA_INDEX = 3; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_normalizacao.deleted_date"; + public static final int DELETED_DATE_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + CODIGO, DESCRICAO, PORTUGUESA, DELETED_DATE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + CODIGO, TABLENAME + "." + DESCRICAO, TABLENAME + "." + PORTUGUESA, TABLENAME + "." + DELETED_DATE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, CODIGO, DESCRICAO, PORTUGUESA, DELETED_DATE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, CODIGO, DESCRICAO, PORTUGUESA, DELETED_DATE, }; + + private Integer id; + private String codigo; + private String descricao; + private Boolean portuguesa; + private java.sql.Timestamp deleted_date; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsNormalizacao() + { + 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 + { + setLockedForRefresh( true ); + 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.ListfromHsNormalizacaoEmpresa_normalizacao_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsNormalizacaoEmpresaData.class , getPrimaryKey().getMap().get("id"), "normalizacao_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsNormalizacaoEstabelecimento_normalizacao_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsNormalizacaoEstabelecimentoData.class , getPrimaryKey().getMap().get("id"), "normalizacao_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public String getCodigo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CODIGO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.codigo; + } + + public void setCodigo( String codigo ) + { + try + { + setLockedForRefresh( true ); + preProcess( CODIGO, codigo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.codigo = codigo; + LAZY_LOADED_OBJECTS.put( CODIGO, 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 + { + setLockedForRefresh( true ); + 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 Boolean getPortuguesa() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PORTUGUESA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.portuguesa; + } + + public void setPortuguesa( Boolean portuguesa ) + { + try + { + setLockedForRefresh( true ); + preProcess( PORTUGUESA, portuguesa ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.portuguesa = portuguesa; + LAZY_LOADED_OBJECTS.put( PORTUGUESA, Boolean.TRUE ); + } + + public java.sql.Timestamp getDeleted_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_date; + } + + public void setDeleted_date( java.sql.Timestamp deleted_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_DATE, deleted_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_date = deleted_date; + LAZY_LOADED_OBJECTS.put( DELETED_DATE, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsNormalizacao.ID_INDEX: + value = getId(); + break; + case HsNormalizacao.CODIGO_INDEX: + value = getCodigo(); + break; + case HsNormalizacao.DESCRICAO_INDEX: + value = getDescricao(); + break; + case HsNormalizacao.PORTUGUESA_INDEX: + value = getPortuguesa(); + break; + case HsNormalizacao.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsNormalizacao.ID_INDEX: + value = this.id; + break; + case HsNormalizacao.CODIGO_INDEX: + value = this.codigo; + break; + case HsNormalizacao.DESCRICAO_INDEX: + value = this.descricao; + break; + case HsNormalizacao.PORTUGUESA_INDEX: + value = this.portuguesa; + break; + case HsNormalizacao.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsNormalizacao.ID_INDEX: + setId( ( Integer ) value ); + break; + case HsNormalizacao.CODIGO_INDEX: + setCodigo( ( String ) value ); + break; + case HsNormalizacao.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case HsNormalizacao.PORTUGUESA_INDEX: + setPortuguesa( ( Boolean ) value ); + break; + case HsNormalizacao.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsNormalizacao.ID_INDEX: + this.id = ( Integer ) value; + break; + case HsNormalizacao.CODIGO_INDEX: + this.codigo = ( String ) value; + break; + case HsNormalizacao.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case HsNormalizacao.PORTUGUESA_INDEX: + this.portuguesa = ( Boolean ) value; + break; + case HsNormalizacao.DELETED_DATE_INDEX: + this.deleted_date = ( 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 HsNormalizacao.ID_INDEX: + theClass = Integer.class; + break; + case HsNormalizacao.CODIGO_INDEX: + theClass = String.class; + break; + case HsNormalizacao.DESCRICAO_INDEX: + theClass = String.class; + break; + case HsNormalizacao.PORTUGUESA_INDEX: + theClass = Boolean.class; + break; + case HsNormalizacao.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsNormalizacao._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, HsNormalizacao.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsNormalizacaoEmpresa.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsNormalizacaoEmpresa.java new file mode 100644 index 00000000..3a701257 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsNormalizacaoEmpresa.java @@ -0,0 +1,379 @@ +/* +* HsNormalizacaoEmpresa.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsNormalizacaoEmpresa extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( HsNormalizacaoEmpresa.CLASS_IDENTIFIER, HsNormalizacaoEmpresa.NORMALIZACAO_ID, HsNormalizacaoEmpresa.TO_NORMALIZACAO_ID ); + FIELD_INDEXES.put( HsNormalizacaoEmpresa.NORMALIZACAO_ID, HsNormalizacaoEmpresa.NORMALIZACAO_ID_INDEX ); + FIELD_INDEXES.put( HsNormalizacaoEmpresa.NORMALIZACAO_ID_FULL, HsNormalizacaoEmpresa.NORMALIZACAO_ID_INDEX ); + FIELD_INDEXES.put( HsNormalizacaoEmpresa.TO_NORMALIZACAO_ID, HsNormalizacaoEmpresa.TO_NORMALIZACAO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsNormalizacaoEmpresa.CLASS_IDENTIFIER, HsNormalizacaoEmpresa.EMPRESA_ID, HsNormalizacaoEmpresa.TO_EMPRESA_ID ); + FIELD_INDEXES.put( HsNormalizacaoEmpresa.EMPRESA_ID, HsNormalizacaoEmpresa.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( HsNormalizacaoEmpresa.EMPRESA_ID_FULL, HsNormalizacaoEmpresa.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( HsNormalizacaoEmpresa.TO_EMPRESA_ID, HsNormalizacaoEmpresa.TO_EMPRESA_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 ForeignKeynormalizacao_idTohs_normalizacao = + new com.evolute.entity.ForeignKey( HsNormalizacaoEmpresa.class, HsNormalizacaoEmpresa.NORMALIZACAO_ID, siprp.data.outer.HsNormalizacaoData.class, siprp.data.outer.HsNormalizacaoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( HsNormalizacaoEmpresa.class, HsNormalizacaoEmpresa.EMPRESA_ID, siprp.data.outer.EmpresasData.class, siprp.data.outer.EmpresasData.ID ); + + public static final String TABLENAME = "hs_normalizacao_empresa"; + + + public static final String CLASS_IDENTIFIER = "hs_normalizacao_empresa1277401737165"; + + public static final int _INVALID__INDEX = -1; + public static final String NORMALIZACAO_ID = "normalizacao_id"; + public static final String NORMALIZACAO_ID_FULL = "hs_normalizacao_empresa.normalizacao_id"; + public static final int NORMALIZACAO_ID_INDEX = 0; + public static final String TO_NORMALIZACAO_ID = "to_normalizacao_id"; + public static final int TO_NORMALIZACAO_ID_INDEX = 1; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "hs_normalizacao_empresa.empresa_id"; + public static final int EMPRESA_ID_INDEX = 2; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 3; + + 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[]{ + NORMALIZACAO_ID, EMPRESA_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + NORMALIZACAO_ID, EMPRESA_ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + NORMALIZACAO_ID, EMPRESA_ID, }; + + private Integer normalizacao_id; + private siprp.data.outer.HsNormalizacaoData to_normalizacao_id; + private Integer empresa_id; + private siprp.data.outer.EmpresasData to_empresa_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsNormalizacaoEmpresa() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false }; + } + + public Integer getNormalizacao_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NORMALIZACAO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.normalizacao_id; + } + + public void setNormalizacao_id( Integer normalizacao_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( NORMALIZACAO_ID, normalizacao_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.normalizacao_id = normalizacao_id; + LAZY_LOADED_OBJECTS.put( NORMALIZACAO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.HsNormalizacaoData toNormalizacao_id() + { + try + { + prepare( TO_NORMALIZACAO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_normalizacao_id; + } + + public void setToNormalizacao_id( siprp.data.outer.HsNormalizacaoData to_normalizacao_id ) + { + try + { + preProcess( TO_NORMALIZACAO_ID, to_normalizacao_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_normalizacao_id = to_normalizacao_id; + } + + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsNormalizacaoEmpresa.NORMALIZACAO_ID_INDEX: + value = getNormalizacao_id(); + break; + case HsNormalizacaoEmpresa.TO_NORMALIZACAO_ID_INDEX: + value = toNormalizacao_id(); + break; + case HsNormalizacaoEmpresa.EMPRESA_ID_INDEX: + value = getEmpresa_id(); + break; + case HsNormalizacaoEmpresa.TO_EMPRESA_ID_INDEX: + value = toEmpresa_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsNormalizacaoEmpresa.NORMALIZACAO_ID_INDEX: + value = this.normalizacao_id; + break; + case HsNormalizacaoEmpresa.TO_NORMALIZACAO_ID_INDEX: + value = this.to_normalizacao_id; + break; + case HsNormalizacaoEmpresa.EMPRESA_ID_INDEX: + value = this.empresa_id; + break; + case HsNormalizacaoEmpresa.TO_EMPRESA_ID_INDEX: + value = this.to_empresa_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsNormalizacaoEmpresa.NORMALIZACAO_ID_INDEX: + setNormalizacao_id( ( Integer ) value ); + break; + case HsNormalizacaoEmpresa.TO_NORMALIZACAO_ID_INDEX: + setToNormalizacao_id( ( siprp.data.outer.HsNormalizacaoData ) value ); + break; + case HsNormalizacaoEmpresa.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case HsNormalizacaoEmpresa.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( siprp.data.outer.EmpresasData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsNormalizacaoEmpresa.NORMALIZACAO_ID_INDEX: + this.normalizacao_id = ( Integer ) value; + break; + case HsNormalizacaoEmpresa.TO_NORMALIZACAO_ID_INDEX: + this.to_normalizacao_id = ( siprp.data.outer.HsNormalizacaoData ) value; + break; + case HsNormalizacaoEmpresa.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case HsNormalizacaoEmpresa.TO_EMPRESA_ID_INDEX: + this.to_empresa_id = ( siprp.data.outer.EmpresasData ) 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() + { + throw new RuntimeException( "getPrimaryKeyName on HsNormalizacaoEmpresa is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case HsNormalizacaoEmpresa.NORMALIZACAO_ID_INDEX: + theClass = Integer.class; + break; + case HsNormalizacaoEmpresa.TO_NORMALIZACAO_ID_INDEX: + theClass = siprp.data.outer.HsNormalizacaoData.class; + break; + case HsNormalizacaoEmpresa.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case HsNormalizacaoEmpresa.TO_EMPRESA_ID_INDEX: + theClass = siprp.data.outer.EmpresasData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsNormalizacaoEmpresa._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, HsNormalizacaoEmpresa.PK_FIELD_NAMES ); + primaryKey.set( 0, getNormalizacao_id() ); + primaryKey.set( 1, getEmpresa_id() ); + } + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsNormalizacaoEstabelecimento.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsNormalizacaoEstabelecimento.java new file mode 100644 index 00000000..b0f41117 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsNormalizacaoEstabelecimento.java @@ -0,0 +1,379 @@ +/* +* HsNormalizacaoEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsNormalizacaoEstabelecimento extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( HsNormalizacaoEstabelecimento.CLASS_IDENTIFIER, HsNormalizacaoEstabelecimento.NORMALIZACAO_ID, HsNormalizacaoEstabelecimento.TO_NORMALIZACAO_ID ); + FIELD_INDEXES.put( HsNormalizacaoEstabelecimento.NORMALIZACAO_ID, HsNormalizacaoEstabelecimento.NORMALIZACAO_ID_INDEX ); + FIELD_INDEXES.put( HsNormalizacaoEstabelecimento.NORMALIZACAO_ID_FULL, HsNormalizacaoEstabelecimento.NORMALIZACAO_ID_INDEX ); + FIELD_INDEXES.put( HsNormalizacaoEstabelecimento.TO_NORMALIZACAO_ID, HsNormalizacaoEstabelecimento.TO_NORMALIZACAO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsNormalizacaoEstabelecimento.CLASS_IDENTIFIER, HsNormalizacaoEstabelecimento.ESTABELECIMENTO_ID, HsNormalizacaoEstabelecimento.TO_ESTABELECIMENTO_ID ); + FIELD_INDEXES.put( HsNormalizacaoEstabelecimento.ESTABELECIMENTO_ID, HsNormalizacaoEstabelecimento.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( HsNormalizacaoEstabelecimento.ESTABELECIMENTO_ID_FULL, HsNormalizacaoEstabelecimento.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( HsNormalizacaoEstabelecimento.TO_ESTABELECIMENTO_ID, HsNormalizacaoEstabelecimento.TO_ESTABELECIMENTO_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 ForeignKeynormalizacao_idTohs_normalizacao = + new com.evolute.entity.ForeignKey( HsNormalizacaoEstabelecimento.class, HsNormalizacaoEstabelecimento.NORMALIZACAO_ID, siprp.data.outer.HsNormalizacaoData.class, siprp.data.outer.HsNormalizacaoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( HsNormalizacaoEstabelecimento.class, HsNormalizacaoEstabelecimento.ESTABELECIMENTO_ID, siprp.data.outer.EstabelecimentosData.class, siprp.data.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "hs_normalizacao_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "hs_normalizacao_estabelecimento1277401737165"; + + public static final int _INVALID__INDEX = -1; + public static final String NORMALIZACAO_ID = "normalizacao_id"; + public static final String NORMALIZACAO_ID_FULL = "hs_normalizacao_estabelecimento.normalizacao_id"; + public static final int NORMALIZACAO_ID_INDEX = 0; + public static final String TO_NORMALIZACAO_ID = "to_normalizacao_id"; + public static final int TO_NORMALIZACAO_ID_INDEX = 1; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "hs_normalizacao_estabelecimento.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 2; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final int TO_ESTABELECIMENTO_ID_INDEX = 3; + + 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[]{ + NORMALIZACAO_ID, ESTABELECIMENTO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + NORMALIZACAO_ID, ESTABELECIMENTO_ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + NORMALIZACAO_ID, ESTABELECIMENTO_ID, }; + + private Integer normalizacao_id; + private siprp.data.outer.HsNormalizacaoData to_normalizacao_id; + private Integer estabelecimento_id; + private siprp.data.outer.EstabelecimentosData to_estabelecimento_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsNormalizacaoEstabelecimento() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false }; + } + + public Integer getNormalizacao_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NORMALIZACAO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.normalizacao_id; + } + + public void setNormalizacao_id( Integer normalizacao_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( NORMALIZACAO_ID, normalizacao_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.normalizacao_id = normalizacao_id; + LAZY_LOADED_OBJECTS.put( NORMALIZACAO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.HsNormalizacaoData toNormalizacao_id() + { + try + { + prepare( TO_NORMALIZACAO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_normalizacao_id; + } + + public void setToNormalizacao_id( siprp.data.outer.HsNormalizacaoData to_normalizacao_id ) + { + try + { + preProcess( TO_NORMALIZACAO_ID, to_normalizacao_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_normalizacao_id = to_normalizacao_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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsNormalizacaoEstabelecimento.NORMALIZACAO_ID_INDEX: + value = getNormalizacao_id(); + break; + case HsNormalizacaoEstabelecimento.TO_NORMALIZACAO_ID_INDEX: + value = toNormalizacao_id(); + break; + case HsNormalizacaoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + value = getEstabelecimento_id(); + break; + case HsNormalizacaoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + value = toEstabelecimento_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsNormalizacaoEstabelecimento.NORMALIZACAO_ID_INDEX: + value = this.normalizacao_id; + break; + case HsNormalizacaoEstabelecimento.TO_NORMALIZACAO_ID_INDEX: + value = this.to_normalizacao_id; + break; + case HsNormalizacaoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + value = this.estabelecimento_id; + break; + case HsNormalizacaoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + value = this.to_estabelecimento_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsNormalizacaoEstabelecimento.NORMALIZACAO_ID_INDEX: + setNormalizacao_id( ( Integer ) value ); + break; + case HsNormalizacaoEstabelecimento.TO_NORMALIZACAO_ID_INDEX: + setToNormalizacao_id( ( siprp.data.outer.HsNormalizacaoData ) value ); + break; + case HsNormalizacaoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case HsNormalizacaoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( siprp.data.outer.EstabelecimentosData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsNormalizacaoEstabelecimento.NORMALIZACAO_ID_INDEX: + this.normalizacao_id = ( Integer ) value; + break; + case HsNormalizacaoEstabelecimento.TO_NORMALIZACAO_ID_INDEX: + this.to_normalizacao_id = ( siprp.data.outer.HsNormalizacaoData ) value; + break; + case HsNormalizacaoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case HsNormalizacaoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + this.to_estabelecimento_id = ( siprp.data.outer.EstabelecimentosData ) 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() + { + throw new RuntimeException( "getPrimaryKeyName on HsNormalizacaoEstabelecimento is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case HsNormalizacaoEstabelecimento.NORMALIZACAO_ID_INDEX: + theClass = Integer.class; + break; + case HsNormalizacaoEstabelecimento.TO_NORMALIZACAO_ID_INDEX: + theClass = siprp.data.outer.HsNormalizacaoData.class; + break; + case HsNormalizacaoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case HsNormalizacaoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + theClass = siprp.data.outer.EstabelecimentosData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsNormalizacaoEstabelecimento._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, HsNormalizacaoEstabelecimento.PK_FIELD_NAMES ); + primaryKey.set( 0, getNormalizacao_id() ); + primaryKey.set( 1, getEstabelecimento_id() ); + } + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsPosto.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsPosto.java new file mode 100644 index 00000000..ddc33914 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsPosto.java @@ -0,0 +1,522 @@ +/* +* HsPosto.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsPosto extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( HsPosto.ID, HsPosto.ID_INDEX ); + FIELD_INDEXES.put( HsPosto.ID_FULL, HsPosto.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsPosto.CLASS_IDENTIFIER, HsPosto.AREA_ID, HsPosto.TO_AREA_ID ); + FIELD_INDEXES.put( HsPosto.AREA_ID, HsPosto.AREA_ID_INDEX ); + FIELD_INDEXES.put( HsPosto.AREA_ID_FULL, HsPosto.AREA_ID_INDEX ); + FIELD_INDEXES.put( HsPosto.TO_AREA_ID, HsPosto.TO_AREA_ID_INDEX ); + FIELD_INDEXES.put( HsPosto.DESCRIPTION, HsPosto.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( HsPosto.DESCRIPTION_FULL, HsPosto.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( HsPosto.DELETED_DATE, HsPosto.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( HsPosto.DELETED_DATE_FULL, HsPosto.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( HsPosto.IS_PRINCIPAL, HsPosto.IS_PRINCIPAL_INDEX ); + FIELD_INDEXES.put( HsPosto.IS_PRINCIPAL_FULL, HsPosto.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 ForeignKeyarea_idTohs_area = + new com.evolute.entity.ForeignKey( HsPosto.class, HsPosto.AREA_ID, siprp.data.outer.HsAreaData.class, siprp.data.outer.HsAreaData.ID ); + + public static final String TABLENAME = "hs_posto"; + + + public static final String CLASS_IDENTIFIER = "hs_posto1277401737165"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "hs_posto.id"; + public static final int ID_INDEX = 0; + public static final String AREA_ID = "area_id"; + public static final String AREA_ID_FULL = "hs_posto.area_id"; + public static final int AREA_ID_INDEX = 1; + public static final String TO_AREA_ID = "to_area_id"; + public static final int TO_AREA_ID_INDEX = 2; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_posto.description"; + public static final int DESCRIPTION_INDEX = 3; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_posto.deleted_date"; + public static final int DELETED_DATE_INDEX = 4; + public static final String IS_PRINCIPAL = "is_principal"; + public static final String IS_PRINCIPAL_FULL = "hs_posto.is_principal"; + public static final int IS_PRINCIPAL_INDEX = 5; + + public static final String FIELD_NAMES[] = new String[]{ + AREA_ID, TO_AREA_ID, DESCRIPTION, DELETED_DATE, IS_PRINCIPAL, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + AREA_ID, TABLENAME + "." + TO_AREA_ID, TABLENAME + "." + DESCRIPTION, TABLENAME + "." + DELETED_DATE, TABLENAME + "." + IS_PRINCIPAL, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, AREA_ID, DESCRIPTION, DELETED_DATE, IS_PRINCIPAL, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, AREA_ID, DESCRIPTION, DELETED_DATE, IS_PRINCIPAL, }; + + private Integer id; + private Integer area_id; + private siprp.data.outer.HsAreaData to_area_id; + private String description; + private java.sql.Timestamp deleted_date; + private Boolean is_principal; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsPosto() + { + 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 + { + setLockedForRefresh( true ); + 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.ListfromHsPostoEstabelecimento_posto_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsPostoEstabelecimentoData.class , getPrimaryKey().getMap().get("id"), "posto_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsPostoMedida_posto_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsPostoMedidaData.class , getPrimaryKey().getMap().get("id"), "posto_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsPostoRisco_posto_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsPostoRiscoData.class , getPrimaryKey().getMap().get("id"), "posto_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 + { + setLockedForRefresh( true ); + 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 siprp.data.outer.HsAreaData toArea_id() + { + try + { + prepare( TO_AREA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_area_id; + } + + public void setToArea_id( siprp.data.outer.HsAreaData to_area_id ) + { + try + { + preProcess( TO_AREA_ID, to_area_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_area_id = to_area_id; + } + + 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 + { + setLockedForRefresh( true ); + 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 java.sql.Timestamp getDeleted_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_date; + } + + public void setDeleted_date( java.sql.Timestamp deleted_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_DATE, deleted_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_date = deleted_date; + LAZY_LOADED_OBJECTS.put( DELETED_DATE, 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 + { + setLockedForRefresh( true ); + 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 HsPosto.ID_INDEX: + value = getId(); + break; + case HsPosto.AREA_ID_INDEX: + value = getArea_id(); + break; + case HsPosto.TO_AREA_ID_INDEX: + value = toArea_id(); + break; + case HsPosto.DESCRIPTION_INDEX: + value = getDescription(); + break; + case HsPosto.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + case HsPosto.IS_PRINCIPAL_INDEX: + value = getIs_principal(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsPosto.ID_INDEX: + value = this.id; + break; + case HsPosto.AREA_ID_INDEX: + value = this.area_id; + break; + case HsPosto.TO_AREA_ID_INDEX: + value = this.to_area_id; + break; + case HsPosto.DESCRIPTION_INDEX: + value = this.description; + break; + case HsPosto.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + case HsPosto.IS_PRINCIPAL_INDEX: + value = this.is_principal; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsPosto.ID_INDEX: + setId( ( Integer ) value ); + break; + case HsPosto.AREA_ID_INDEX: + setArea_id( ( Integer ) value ); + break; + case HsPosto.TO_AREA_ID_INDEX: + setToArea_id( ( siprp.data.outer.HsAreaData ) value ); + break; + case HsPosto.DESCRIPTION_INDEX: + setDescription( ( String ) value ); + break; + case HsPosto.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + case HsPosto.IS_PRINCIPAL_INDEX: + setIs_principal( ( Boolean ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsPosto.ID_INDEX: + this.id = ( Integer ) value; + break; + case HsPosto.AREA_ID_INDEX: + this.area_id = ( Integer ) value; + break; + case HsPosto.TO_AREA_ID_INDEX: + this.to_area_id = ( siprp.data.outer.HsAreaData ) value; + break; + case HsPosto.DESCRIPTION_INDEX: + this.description = ( String ) value; + break; + case HsPosto.DELETED_DATE_INDEX: + this.deleted_date = ( java.sql.Timestamp ) value; + break; + case HsPosto.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 HsPosto.ID_INDEX: + theClass = Integer.class; + break; + case HsPosto.AREA_ID_INDEX: + theClass = Integer.class; + break; + case HsPosto.TO_AREA_ID_INDEX: + theClass = siprp.data.outer.HsAreaData.class; + break; + case HsPosto.DESCRIPTION_INDEX: + theClass = String.class; + break; + case HsPosto.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case HsPosto.IS_PRINCIPAL_INDEX: + theClass = Boolean.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsPosto._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, HsPosto.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsPostoEstabelecimento.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsPostoEstabelecimento.java new file mode 100644 index 00000000..1e65e542 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsPostoEstabelecimento.java @@ -0,0 +1,379 @@ +/* +* HsPostoEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsPostoEstabelecimento extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( HsPostoEstabelecimento.CLASS_IDENTIFIER, HsPostoEstabelecimento.POSTO_ID, HsPostoEstabelecimento.TO_POSTO_ID ); + FIELD_INDEXES.put( HsPostoEstabelecimento.POSTO_ID, HsPostoEstabelecimento.POSTO_ID_INDEX ); + FIELD_INDEXES.put( HsPostoEstabelecimento.POSTO_ID_FULL, HsPostoEstabelecimento.POSTO_ID_INDEX ); + FIELD_INDEXES.put( HsPostoEstabelecimento.TO_POSTO_ID, HsPostoEstabelecimento.TO_POSTO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsPostoEstabelecimento.CLASS_IDENTIFIER, HsPostoEstabelecimento.ESTABELECIMENTO_ID, HsPostoEstabelecimento.TO_ESTABELECIMENTO_ID ); + FIELD_INDEXES.put( HsPostoEstabelecimento.ESTABELECIMENTO_ID, HsPostoEstabelecimento.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( HsPostoEstabelecimento.ESTABELECIMENTO_ID_FULL, HsPostoEstabelecimento.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( HsPostoEstabelecimento.TO_ESTABELECIMENTO_ID, HsPostoEstabelecimento.TO_ESTABELECIMENTO_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 ForeignKeyposto_idTohs_posto = + new com.evolute.entity.ForeignKey( HsPostoEstabelecimento.class, HsPostoEstabelecimento.POSTO_ID, siprp.data.outer.HsPostoData.class, siprp.data.outer.HsPostoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( HsPostoEstabelecimento.class, HsPostoEstabelecimento.ESTABELECIMENTO_ID, siprp.data.outer.EstabelecimentosData.class, siprp.data.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "hs_posto_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "hs_posto_estabelecimento1277401737166"; + + public static final int _INVALID__INDEX = -1; + public static final String POSTO_ID = "posto_id"; + public static final String POSTO_ID_FULL = "hs_posto_estabelecimento.posto_id"; + public static final int POSTO_ID_INDEX = 0; + public static final String TO_POSTO_ID = "to_posto_id"; + public static final int TO_POSTO_ID_INDEX = 1; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "hs_posto_estabelecimento.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 2; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final int TO_ESTABELECIMENTO_ID_INDEX = 3; + + 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[]{ + POSTO_ID, ESTABELECIMENTO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + POSTO_ID, ESTABELECIMENTO_ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + POSTO_ID, ESTABELECIMENTO_ID, }; + + private Integer posto_id; + private siprp.data.outer.HsPostoData to_posto_id; + private Integer estabelecimento_id; + private siprp.data.outer.EstabelecimentosData to_estabelecimento_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsPostoEstabelecimento() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false }; + } + + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.outer.HsPostoData toPosto_id() + { + try + { + prepare( TO_POSTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_posto_id; + } + + public void setToPosto_id( siprp.data.outer.HsPostoData to_posto_id ) + { + try + { + preProcess( TO_POSTO_ID, to_posto_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_posto_id = to_posto_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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsPostoEstabelecimento.POSTO_ID_INDEX: + value = getPosto_id(); + break; + case HsPostoEstabelecimento.TO_POSTO_ID_INDEX: + value = toPosto_id(); + break; + case HsPostoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + value = getEstabelecimento_id(); + break; + case HsPostoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + value = toEstabelecimento_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsPostoEstabelecimento.POSTO_ID_INDEX: + value = this.posto_id; + break; + case HsPostoEstabelecimento.TO_POSTO_ID_INDEX: + value = this.to_posto_id; + break; + case HsPostoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + value = this.estabelecimento_id; + break; + case HsPostoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + value = this.to_estabelecimento_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsPostoEstabelecimento.POSTO_ID_INDEX: + setPosto_id( ( Integer ) value ); + break; + case HsPostoEstabelecimento.TO_POSTO_ID_INDEX: + setToPosto_id( ( siprp.data.outer.HsPostoData ) value ); + break; + case HsPostoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case HsPostoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( siprp.data.outer.EstabelecimentosData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsPostoEstabelecimento.POSTO_ID_INDEX: + this.posto_id = ( Integer ) value; + break; + case HsPostoEstabelecimento.TO_POSTO_ID_INDEX: + this.to_posto_id = ( siprp.data.outer.HsPostoData ) value; + break; + case HsPostoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case HsPostoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + this.to_estabelecimento_id = ( siprp.data.outer.EstabelecimentosData ) 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() + { + throw new RuntimeException( "getPrimaryKeyName on HsPostoEstabelecimento is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case HsPostoEstabelecimento.POSTO_ID_INDEX: + theClass = Integer.class; + break; + case HsPostoEstabelecimento.TO_POSTO_ID_INDEX: + theClass = siprp.data.outer.HsPostoData.class; + break; + case HsPostoEstabelecimento.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case HsPostoEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + theClass = siprp.data.outer.EstabelecimentosData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsPostoEstabelecimento._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, HsPostoEstabelecimento.PK_FIELD_NAMES ); + primaryKey.set( 0, getPosto_id() ); + primaryKey.set( 1, getEstabelecimento_id() ); + } + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsPostoMedida.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsPostoMedida.java new file mode 100644 index 00000000..76c9cfb3 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsPostoMedida.java @@ -0,0 +1,379 @@ +/* +* HsPostoMedida.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsPostoMedida extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( HsPostoMedida.CLASS_IDENTIFIER, HsPostoMedida.POSTO_ID, HsPostoMedida.TO_POSTO_ID ); + FIELD_INDEXES.put( HsPostoMedida.POSTO_ID, HsPostoMedida.POSTO_ID_INDEX ); + FIELD_INDEXES.put( HsPostoMedida.POSTO_ID_FULL, HsPostoMedida.POSTO_ID_INDEX ); + FIELD_INDEXES.put( HsPostoMedida.TO_POSTO_ID, HsPostoMedida.TO_POSTO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsPostoMedida.CLASS_IDENTIFIER, HsPostoMedida.MEDIDA_ID, HsPostoMedida.TO_MEDIDA_ID ); + FIELD_INDEXES.put( HsPostoMedida.MEDIDA_ID, HsPostoMedida.MEDIDA_ID_INDEX ); + FIELD_INDEXES.put( HsPostoMedida.MEDIDA_ID_FULL, HsPostoMedida.MEDIDA_ID_INDEX ); + FIELD_INDEXES.put( HsPostoMedida.TO_MEDIDA_ID, HsPostoMedida.TO_MEDIDA_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 ForeignKeyposto_idTohs_posto = + new com.evolute.entity.ForeignKey( HsPostoMedida.class, HsPostoMedida.POSTO_ID, siprp.data.outer.HsPostoData.class, siprp.data.outer.HsPostoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeymedida_idTohs_medida = + new com.evolute.entity.ForeignKey( HsPostoMedida.class, HsPostoMedida.MEDIDA_ID, siprp.data.outer.HsMedidaData.class, siprp.data.outer.HsMedidaData.ID ); + + public static final String TABLENAME = "hs_posto_medida"; + + + public static final String CLASS_IDENTIFIER = "hs_posto_medida1277401737166"; + + public static final int _INVALID__INDEX = -1; + public static final String POSTO_ID = "posto_id"; + public static final String POSTO_ID_FULL = "hs_posto_medida.posto_id"; + public static final int POSTO_ID_INDEX = 0; + public static final String TO_POSTO_ID = "to_posto_id"; + public static final int TO_POSTO_ID_INDEX = 1; + public static final String MEDIDA_ID = "medida_id"; + public static final String MEDIDA_ID_FULL = "hs_posto_medida.medida_id"; + public static final int MEDIDA_ID_INDEX = 2; + public static final String TO_MEDIDA_ID = "to_medida_id"; + public static final int TO_MEDIDA_ID_INDEX = 3; + + 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[]{ + POSTO_ID, MEDIDA_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + POSTO_ID, MEDIDA_ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + POSTO_ID, MEDIDA_ID, }; + + private Integer posto_id; + private siprp.data.outer.HsPostoData to_posto_id; + private Integer medida_id; + private siprp.data.outer.HsMedidaData to_medida_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsPostoMedida() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false }; + } + + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.outer.HsPostoData toPosto_id() + { + try + { + prepare( TO_POSTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_posto_id; + } + + public void setToPosto_id( siprp.data.outer.HsPostoData to_posto_id ) + { + try + { + preProcess( TO_POSTO_ID, to_posto_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_posto_id = to_posto_id; + } + + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.outer.HsMedidaData 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( siprp.data.outer.HsMedidaData 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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsPostoMedida.POSTO_ID_INDEX: + value = getPosto_id(); + break; + case HsPostoMedida.TO_POSTO_ID_INDEX: + value = toPosto_id(); + break; + case HsPostoMedida.MEDIDA_ID_INDEX: + value = getMedida_id(); + break; + case HsPostoMedida.TO_MEDIDA_ID_INDEX: + value = toMedida_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsPostoMedida.POSTO_ID_INDEX: + value = this.posto_id; + break; + case HsPostoMedida.TO_POSTO_ID_INDEX: + value = this.to_posto_id; + break; + case HsPostoMedida.MEDIDA_ID_INDEX: + value = this.medida_id; + break; + case HsPostoMedida.TO_MEDIDA_ID_INDEX: + value = this.to_medida_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsPostoMedida.POSTO_ID_INDEX: + setPosto_id( ( Integer ) value ); + break; + case HsPostoMedida.TO_POSTO_ID_INDEX: + setToPosto_id( ( siprp.data.outer.HsPostoData ) value ); + break; + case HsPostoMedida.MEDIDA_ID_INDEX: + setMedida_id( ( Integer ) value ); + break; + case HsPostoMedida.TO_MEDIDA_ID_INDEX: + setToMedida_id( ( siprp.data.outer.HsMedidaData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsPostoMedida.POSTO_ID_INDEX: + this.posto_id = ( Integer ) value; + break; + case HsPostoMedida.TO_POSTO_ID_INDEX: + this.to_posto_id = ( siprp.data.outer.HsPostoData ) value; + break; + case HsPostoMedida.MEDIDA_ID_INDEX: + this.medida_id = ( Integer ) value; + break; + case HsPostoMedida.TO_MEDIDA_ID_INDEX: + this.to_medida_id = ( siprp.data.outer.HsMedidaData ) 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() + { + throw new RuntimeException( "getPrimaryKeyName on HsPostoMedida is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case HsPostoMedida.POSTO_ID_INDEX: + theClass = Integer.class; + break; + case HsPostoMedida.TO_POSTO_ID_INDEX: + theClass = siprp.data.outer.HsPostoData.class; + break; + case HsPostoMedida.MEDIDA_ID_INDEX: + theClass = Integer.class; + break; + case HsPostoMedida.TO_MEDIDA_ID_INDEX: + theClass = siprp.data.outer.HsMedidaData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsPostoMedida._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, HsPostoMedida.PK_FIELD_NAMES ); + primaryKey.set( 0, getPosto_id() ); + primaryKey.set( 1, getMedida_id() ); + } + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsPostoRisco.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsPostoRisco.java new file mode 100644 index 00000000..00bc6451 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsPostoRisco.java @@ -0,0 +1,682 @@ +/* +* HsPostoRisco.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsPostoRisco extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( HsPostoRisco.CLASS_IDENTIFIER, HsPostoRisco.POSTO_ID, HsPostoRisco.TO_POSTO_ID ); + FIELD_INDEXES.put( HsPostoRisco.POSTO_ID, HsPostoRisco.POSTO_ID_INDEX ); + FIELD_INDEXES.put( HsPostoRisco.POSTO_ID_FULL, HsPostoRisco.POSTO_ID_INDEX ); + FIELD_INDEXES.put( HsPostoRisco.TO_POSTO_ID, HsPostoRisco.TO_POSTO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsPostoRisco.CLASS_IDENTIFIER, HsPostoRisco.RISCO_ID, HsPostoRisco.TO_RISCO_ID ); + FIELD_INDEXES.put( HsPostoRisco.RISCO_ID, HsPostoRisco.RISCO_ID_INDEX ); + FIELD_INDEXES.put( HsPostoRisco.RISCO_ID_FULL, HsPostoRisco.RISCO_ID_INDEX ); + FIELD_INDEXES.put( HsPostoRisco.TO_RISCO_ID, HsPostoRisco.TO_RISCO_ID_INDEX ); + FIELD_INDEXES.put( HsPostoRisco.PROBABILIDADE, HsPostoRisco.PROBABILIDADE_INDEX ); + FIELD_INDEXES.put( HsPostoRisco.PROBABILIDADE_FULL, HsPostoRisco.PROBABILIDADE_INDEX ); + FIELD_INDEXES.put( HsPostoRisco.SEVERIDADE, HsPostoRisco.SEVERIDADE_INDEX ); + FIELD_INDEXES.put( HsPostoRisco.SEVERIDADE_FULL, HsPostoRisco.SEVERIDADE_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsPostoRisco.CLASS_IDENTIFIER, HsPostoRisco.VALOR_QUALITATIVO, HsPostoRisco.TO_VALOR_QUALITATIVO ); + FIELD_INDEXES.put( HsPostoRisco.VALOR_QUALITATIVO, HsPostoRisco.VALOR_QUALITATIVO_INDEX ); + FIELD_INDEXES.put( HsPostoRisco.VALOR_QUALITATIVO_FULL, HsPostoRisco.VALOR_QUALITATIVO_INDEX ); + FIELD_INDEXES.put( HsPostoRisco.TO_VALOR_QUALITATIVO, HsPostoRisco.TO_VALOR_QUALITATIVO_INDEX ); + FIELD_INDEXES.put( HsPostoRisco.IS_PLANO_ACTUACAO, HsPostoRisco.IS_PLANO_ACTUACAO_INDEX ); + FIELD_INDEXES.put( HsPostoRisco.IS_PLANO_ACTUACAO_FULL, HsPostoRisco.IS_PLANO_ACTUACAO_INDEX ); + FIELD_INDEXES.put( HsPostoRisco.ORDEM, HsPostoRisco.ORDEM_INDEX ); + FIELD_INDEXES.put( HsPostoRisco.ORDEM_FULL, HsPostoRisco.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 ForeignKeyposto_idTohs_posto = + new com.evolute.entity.ForeignKey( HsPostoRisco.class, HsPostoRisco.POSTO_ID, siprp.data.outer.HsPostoData.class, siprp.data.outer.HsPostoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyrisco_idTohs_risco = + new com.evolute.entity.ForeignKey( HsPostoRisco.class, HsPostoRisco.RISCO_ID, siprp.data.outer.HsRiscoData.class, siprp.data.outer.HsRiscoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyvalor_qualitativoTohs_relatorio_risco_valor_qualitativo = + new com.evolute.entity.ForeignKey( HsPostoRisco.class, HsPostoRisco.VALOR_QUALITATIVO, siprp.data.outer.HsRelatorioRiscoValorQualitativoData.class, siprp.data.outer.HsRelatorioRiscoValorQualitativoData.ID ); + + public static final String TABLENAME = "hs_posto_risco"; + + + public static final String CLASS_IDENTIFIER = "hs_posto_risco1277401737166"; + + public static final int _INVALID__INDEX = -1; + public static final String POSTO_ID = "posto_id"; + public static final String POSTO_ID_FULL = "hs_posto_risco.posto_id"; + public static final int POSTO_ID_INDEX = 0; + public static final String TO_POSTO_ID = "to_posto_id"; + public static final int TO_POSTO_ID_INDEX = 1; + public static final String RISCO_ID = "risco_id"; + public static final String RISCO_ID_FULL = "hs_posto_risco.risco_id"; + public static final int RISCO_ID_INDEX = 2; + public static final String TO_RISCO_ID = "to_risco_id"; + public static final int TO_RISCO_ID_INDEX = 3; + public static final String PROBABILIDADE = "probabilidade"; + public static final String PROBABILIDADE_FULL = "hs_posto_risco.probabilidade"; + public static final int PROBABILIDADE_INDEX = 4; + public static final String SEVERIDADE = "severidade"; + public static final String SEVERIDADE_FULL = "hs_posto_risco.severidade"; + public static final int SEVERIDADE_INDEX = 5; + public static final String VALOR_QUALITATIVO = "valor_qualitativo"; + public static final String VALOR_QUALITATIVO_FULL = "hs_posto_risco.valor_qualitativo"; + public static final int VALOR_QUALITATIVO_INDEX = 6; + public static final String TO_VALOR_QUALITATIVO = "to_valor_qualitativo"; + public static final int TO_VALOR_QUALITATIVO_INDEX = 7; + public static final String IS_PLANO_ACTUACAO = "is_plano_actuacao"; + public static final String IS_PLANO_ACTUACAO_FULL = "hs_posto_risco.is_plano_actuacao"; + public static final int IS_PLANO_ACTUACAO_INDEX = 8; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "hs_posto_risco.ordem"; + public static final int ORDEM_INDEX = 9; + + public static final String FIELD_NAMES[] = new String[]{ + PROBABILIDADE, SEVERIDADE, VALOR_QUALITATIVO, TO_VALOR_QUALITATIVO, + IS_PLANO_ACTUACAO, ORDEM, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + PROBABILIDADE, TABLENAME + "." + SEVERIDADE, TABLENAME + "." + VALOR_QUALITATIVO, TABLENAME + "." + TO_VALOR_QUALITATIVO, + TABLENAME + "." + IS_PLANO_ACTUACAO, TABLENAME + "." + ORDEM, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + POSTO_ID, RISCO_ID, PROBABILIDADE, SEVERIDADE, VALOR_QUALITATIVO, + IS_PLANO_ACTUACAO, ORDEM, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + POSTO_ID, RISCO_ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + POSTO_ID, RISCO_ID, PROBABILIDADE, SEVERIDADE, VALOR_QUALITATIVO, + IS_PLANO_ACTUACAO, ORDEM, }; + + private Integer posto_id; + private siprp.data.outer.HsPostoData to_posto_id; + private Integer risco_id; + private siprp.data.outer.HsRiscoData to_risco_id; + private Integer probabilidade; + private Integer severidade; + private Integer valor_qualitativo; + private siprp.data.outer.HsRelatorioRiscoValorQualitativoData to_valor_qualitativo; + private String is_plano_actuacao; + private Integer ordem; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsPostoRisco() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false, false, false, false, false, false }; + } + + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.outer.HsPostoData toPosto_id() + { + try + { + prepare( TO_POSTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_posto_id; + } + + public void setToPosto_id( siprp.data.outer.HsPostoData to_posto_id ) + { + try + { + preProcess( TO_POSTO_ID, to_posto_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_posto_id = to_posto_id; + } + + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.outer.HsRiscoData 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( siprp.data.outer.HsRiscoData 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 getProbabilidade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PROBABILIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.probabilidade; + } + + public void setProbabilidade( Integer probabilidade ) + { + try + { + setLockedForRefresh( true ); + preProcess( PROBABILIDADE, probabilidade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.probabilidade = probabilidade; + LAZY_LOADED_OBJECTS.put( PROBABILIDADE, Boolean.TRUE ); + } + + public Integer getSeveridade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( SEVERIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.severidade; + } + + public void setSeveridade( Integer severidade ) + { + try + { + setLockedForRefresh( true ); + preProcess( SEVERIDADE, severidade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.severidade = severidade; + LAZY_LOADED_OBJECTS.put( SEVERIDADE, Boolean.TRUE ); + } + + public Integer getValor_qualitativo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( VALOR_QUALITATIVO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.valor_qualitativo; + } + + public void setValor_qualitativo( Integer valor_qualitativo ) + { + try + { + setLockedForRefresh( true ); + preProcess( VALOR_QUALITATIVO, valor_qualitativo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.valor_qualitativo = valor_qualitativo; + LAZY_LOADED_OBJECTS.put( VALOR_QUALITATIVO, Boolean.TRUE ); + } + + public siprp.data.outer.HsRelatorioRiscoValorQualitativoData toValor_qualitativo() + { + try + { + prepare( TO_VALOR_QUALITATIVO ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_valor_qualitativo; + } + + public void setToValor_qualitativo( siprp.data.outer.HsRelatorioRiscoValorQualitativoData to_valor_qualitativo ) + { + try + { + preProcess( TO_VALOR_QUALITATIVO, to_valor_qualitativo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_valor_qualitativo = to_valor_qualitativo; + } + + public String getIs_plano_actuacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IS_PLANO_ACTUACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.is_plano_actuacao; + } + + public void setIs_plano_actuacao( String is_plano_actuacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( IS_PLANO_ACTUACAO, is_plano_actuacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.is_plano_actuacao = is_plano_actuacao; + LAZY_LOADED_OBJECTS.put( IS_PLANO_ACTUACAO, 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 + { + setLockedForRefresh( true ); + 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 HsPostoRisco.POSTO_ID_INDEX: + value = getPosto_id(); + break; + case HsPostoRisco.TO_POSTO_ID_INDEX: + value = toPosto_id(); + break; + case HsPostoRisco.RISCO_ID_INDEX: + value = getRisco_id(); + break; + case HsPostoRisco.TO_RISCO_ID_INDEX: + value = toRisco_id(); + break; + case HsPostoRisco.PROBABILIDADE_INDEX: + value = getProbabilidade(); + break; + case HsPostoRisco.SEVERIDADE_INDEX: + value = getSeveridade(); + break; + case HsPostoRisco.VALOR_QUALITATIVO_INDEX: + value = getValor_qualitativo(); + break; + case HsPostoRisco.TO_VALOR_QUALITATIVO_INDEX: + value = toValor_qualitativo(); + break; + case HsPostoRisco.IS_PLANO_ACTUACAO_INDEX: + value = getIs_plano_actuacao(); + break; + case HsPostoRisco.ORDEM_INDEX: + value = getOrdem(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsPostoRisco.POSTO_ID_INDEX: + value = this.posto_id; + break; + case HsPostoRisco.TO_POSTO_ID_INDEX: + value = this.to_posto_id; + break; + case HsPostoRisco.RISCO_ID_INDEX: + value = this.risco_id; + break; + case HsPostoRisco.TO_RISCO_ID_INDEX: + value = this.to_risco_id; + break; + case HsPostoRisco.PROBABILIDADE_INDEX: + value = this.probabilidade; + break; + case HsPostoRisco.SEVERIDADE_INDEX: + value = this.severidade; + break; + case HsPostoRisco.VALOR_QUALITATIVO_INDEX: + value = this.valor_qualitativo; + break; + case HsPostoRisco.TO_VALOR_QUALITATIVO_INDEX: + value = this.to_valor_qualitativo; + break; + case HsPostoRisco.IS_PLANO_ACTUACAO_INDEX: + value = this.is_plano_actuacao; + break; + case HsPostoRisco.ORDEM_INDEX: + value = this.ordem; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsPostoRisco.POSTO_ID_INDEX: + setPosto_id( ( Integer ) value ); + break; + case HsPostoRisco.TO_POSTO_ID_INDEX: + setToPosto_id( ( siprp.data.outer.HsPostoData ) value ); + break; + case HsPostoRisco.RISCO_ID_INDEX: + setRisco_id( ( Integer ) value ); + break; + case HsPostoRisco.TO_RISCO_ID_INDEX: + setToRisco_id( ( siprp.data.outer.HsRiscoData ) value ); + break; + case HsPostoRisco.PROBABILIDADE_INDEX: + setProbabilidade( ( Integer ) value ); + break; + case HsPostoRisco.SEVERIDADE_INDEX: + setSeveridade( ( Integer ) value ); + break; + case HsPostoRisco.VALOR_QUALITATIVO_INDEX: + setValor_qualitativo( ( Integer ) value ); + break; + case HsPostoRisco.TO_VALOR_QUALITATIVO_INDEX: + setToValor_qualitativo( ( siprp.data.outer.HsRelatorioRiscoValorQualitativoData ) value ); + break; + case HsPostoRisco.IS_PLANO_ACTUACAO_INDEX: + setIs_plano_actuacao( ( String ) value ); + break; + case HsPostoRisco.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsPostoRisco.POSTO_ID_INDEX: + this.posto_id = ( Integer ) value; + break; + case HsPostoRisco.TO_POSTO_ID_INDEX: + this.to_posto_id = ( siprp.data.outer.HsPostoData ) value; + break; + case HsPostoRisco.RISCO_ID_INDEX: + this.risco_id = ( Integer ) value; + break; + case HsPostoRisco.TO_RISCO_ID_INDEX: + this.to_risco_id = ( siprp.data.outer.HsRiscoData ) value; + break; + case HsPostoRisco.PROBABILIDADE_INDEX: + this.probabilidade = ( Integer ) value; + break; + case HsPostoRisco.SEVERIDADE_INDEX: + this.severidade = ( Integer ) value; + break; + case HsPostoRisco.VALOR_QUALITATIVO_INDEX: + this.valor_qualitativo = ( Integer ) value; + break; + case HsPostoRisco.TO_VALOR_QUALITATIVO_INDEX: + this.to_valor_qualitativo = ( siprp.data.outer.HsRelatorioRiscoValorQualitativoData ) value; + break; + case HsPostoRisco.IS_PLANO_ACTUACAO_INDEX: + this.is_plano_actuacao = ( String ) value; + break; + case HsPostoRisco.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() + { + throw new RuntimeException( "getPrimaryKeyName on HsPostoRisco is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case HsPostoRisco.POSTO_ID_INDEX: + theClass = Integer.class; + break; + case HsPostoRisco.TO_POSTO_ID_INDEX: + theClass = siprp.data.outer.HsPostoData.class; + break; + case HsPostoRisco.RISCO_ID_INDEX: + theClass = Integer.class; + break; + case HsPostoRisco.TO_RISCO_ID_INDEX: + theClass = siprp.data.outer.HsRiscoData.class; + break; + case HsPostoRisco.PROBABILIDADE_INDEX: + theClass = Integer.class; + break; + case HsPostoRisco.SEVERIDADE_INDEX: + theClass = Integer.class; + break; + case HsPostoRisco.VALOR_QUALITATIVO_INDEX: + theClass = Integer.class; + break; + case HsPostoRisco.TO_VALOR_QUALITATIVO_INDEX: + theClass = siprp.data.outer.HsRelatorioRiscoValorQualitativoData.class; + break; + case HsPostoRisco.IS_PLANO_ACTUACAO_INDEX: + theClass = String.class; + break; + case HsPostoRisco.ORDEM_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsPostoRisco._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, HsPostoRisco.PK_FIELD_NAMES ); + primaryKey.set( 0, getPosto_id() ); + primaryKey.set( 1, getRisco_id() ); + } + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorio.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorio.java new file mode 100644 index 00000000..bd934468 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorio.java @@ -0,0 +1,959 @@ +/* +* HsRelatorio.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsRelatorio extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( HsRelatorio.ID, HsRelatorio.ID_INDEX ); + FIELD_INDEXES.put( HsRelatorio.ID_FULL, HsRelatorio.ID_INDEX ); + FIELD_INDEXES.put( HsRelatorio.DATA, HsRelatorio.DATA_INDEX ); + FIELD_INDEXES.put( HsRelatorio.DATA_FULL, HsRelatorio.DATA_INDEX ); + FIELD_INDEXES.put( HsRelatorio.DELETED_DATE, HsRelatorio.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( HsRelatorio.DELETED_DATE_FULL, HsRelatorio.DELETED_DATE_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsRelatorio.CLASS_IDENTIFIER, HsRelatorio.MARCACAO_ID, HsRelatorio.TO_MARCACAO_ID ); + FIELD_INDEXES.put( HsRelatorio.MARCACAO_ID, HsRelatorio.MARCACAO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorio.MARCACAO_ID_FULL, HsRelatorio.MARCACAO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorio.TO_MARCACAO_ID, HsRelatorio.TO_MARCACAO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorio.IS_SUBMETIDO, HsRelatorio.IS_SUBMETIDO_INDEX ); + FIELD_INDEXES.put( HsRelatorio.IS_SUBMETIDO_FULL, HsRelatorio.IS_SUBMETIDO_INDEX ); + FIELD_INDEXES.put( HsRelatorio.AVALIACAO_INICIAL, HsRelatorio.AVALIACAO_INICIAL_INDEX ); + FIELD_INDEXES.put( HsRelatorio.AVALIACAO_INICIAL_FULL, HsRelatorio.AVALIACAO_INICIAL_INDEX ); + FIELD_INDEXES.put( HsRelatorio.ACOMPANHANTE1, HsRelatorio.ACOMPANHANTE1_INDEX ); + FIELD_INDEXES.put( HsRelatorio.ACOMPANHANTE1_FULL, HsRelatorio.ACOMPANHANTE1_INDEX ); + FIELD_INDEXES.put( HsRelatorio.FUNCAO_ACOMPANHANTE1, HsRelatorio.FUNCAO_ACOMPANHANTE1_INDEX ); + FIELD_INDEXES.put( HsRelatorio.FUNCAO_ACOMPANHANTE1_FULL, HsRelatorio.FUNCAO_ACOMPANHANTE1_INDEX ); + FIELD_INDEXES.put( HsRelatorio.ACOMPANHANTE2, HsRelatorio.ACOMPANHANTE2_INDEX ); + FIELD_INDEXES.put( HsRelatorio.ACOMPANHANTE2_FULL, HsRelatorio.ACOMPANHANTE2_INDEX ); + FIELD_INDEXES.put( HsRelatorio.FUNCAO_ACOMPANHANTE2, HsRelatorio.FUNCAO_ACOMPANHANTE2_INDEX ); + FIELD_INDEXES.put( HsRelatorio.FUNCAO_ACOMPANHANTE2_FULL, HsRelatorio.FUNCAO_ACOMPANHANTE2_INDEX ); + FIELD_INDEXES.put( HsRelatorio.ACOMPANHANTE3, HsRelatorio.ACOMPANHANTE3_INDEX ); + FIELD_INDEXES.put( HsRelatorio.ACOMPANHANTE3_FULL, HsRelatorio.ACOMPANHANTE3_INDEX ); + FIELD_INDEXES.put( HsRelatorio.FUNCAO_ACOMPANHANTE3, HsRelatorio.FUNCAO_ACOMPANHANTE3_INDEX ); + FIELD_INDEXES.put( HsRelatorio.FUNCAO_ACOMPANHANTE3_FULL, HsRelatorio.FUNCAO_ACOMPANHANTE3_INDEX ); + FIELD_INDEXES.put( HsRelatorio.FUNCIONARIOS, HsRelatorio.FUNCIONARIOS_INDEX ); + FIELD_INDEXES.put( HsRelatorio.FUNCIONARIOS_FULL, HsRelatorio.FUNCIONARIOS_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeymarcacao_idTomarcacoes_estabelecimento = + new com.evolute.entity.ForeignKey( HsRelatorio.class, HsRelatorio.MARCACAO_ID, siprp.data.outer.MarcacoesEstabelecimentoData.class, siprp.data.outer.MarcacoesEstabelecimentoData.ID ); + + public static final String TABLENAME = "hs_relatorio"; + + + public static final String CLASS_IDENTIFIER = "hs_relatorio1277401737167"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "hs_relatorio.id"; + public static final int ID_INDEX = 0; + public static final String DATA = "data"; + public static final String DATA_FULL = "hs_relatorio.data"; + public static final int DATA_INDEX = 1; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_relatorio.deleted_date"; + public static final int DELETED_DATE_INDEX = 2; + public static final String MARCACAO_ID = "marcacao_id"; + public static final String MARCACAO_ID_FULL = "hs_relatorio.marcacao_id"; + public static final int MARCACAO_ID_INDEX = 3; + public static final String TO_MARCACAO_ID = "to_marcacao_id"; + public static final int TO_MARCACAO_ID_INDEX = 4; + public static final String IS_SUBMETIDO = "is_submetido"; + public static final String IS_SUBMETIDO_FULL = "hs_relatorio.is_submetido"; + public static final int IS_SUBMETIDO_INDEX = 5; + public static final String AVALIACAO_INICIAL = "avaliacao_inicial"; + public static final String AVALIACAO_INICIAL_FULL = "hs_relatorio.avaliacao_inicial"; + public static final int AVALIACAO_INICIAL_INDEX = 6; + public static final String ACOMPANHANTE1 = "acompanhante1"; + public static final String ACOMPANHANTE1_FULL = "hs_relatorio.acompanhante1"; + public static final int ACOMPANHANTE1_INDEX = 7; + public static final String FUNCAO_ACOMPANHANTE1 = "funcao_acompanhante1"; + public static final String FUNCAO_ACOMPANHANTE1_FULL = "hs_relatorio.funcao_acompanhante1"; + public static final int FUNCAO_ACOMPANHANTE1_INDEX = 8; + public static final String ACOMPANHANTE2 = "acompanhante2"; + public static final String ACOMPANHANTE2_FULL = "hs_relatorio.acompanhante2"; + public static final int ACOMPANHANTE2_INDEX = 9; + public static final String FUNCAO_ACOMPANHANTE2 = "funcao_acompanhante2"; + public static final String FUNCAO_ACOMPANHANTE2_FULL = "hs_relatorio.funcao_acompanhante2"; + public static final int FUNCAO_ACOMPANHANTE2_INDEX = 10; + public static final String ACOMPANHANTE3 = "acompanhante3"; + public static final String ACOMPANHANTE3_FULL = "hs_relatorio.acompanhante3"; + public static final int ACOMPANHANTE3_INDEX = 11; + public static final String FUNCAO_ACOMPANHANTE3 = "funcao_acompanhante3"; + public static final String FUNCAO_ACOMPANHANTE3_FULL = "hs_relatorio.funcao_acompanhante3"; + public static final int FUNCAO_ACOMPANHANTE3_INDEX = 12; + public static final String FUNCIONARIOS = "funcionarios"; + public static final String FUNCIONARIOS_FULL = "hs_relatorio.funcionarios"; + public static final int FUNCIONARIOS_INDEX = 13; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, DELETED_DATE, MARCACAO_ID, TO_MARCACAO_ID, IS_SUBMETIDO, AVALIACAO_INICIAL, + ACOMPANHANTE1, FUNCAO_ACOMPANHANTE1, ACOMPANHANTE2, FUNCAO_ACOMPANHANTE2, + ACOMPANHANTE3, FUNCAO_ACOMPANHANTE3, FUNCIONARIOS, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DATA, TABLENAME + "." + DELETED_DATE, TABLENAME + "." + MARCACAO_ID, TABLENAME + "." + TO_MARCACAO_ID, TABLENAME + "." + IS_SUBMETIDO, TABLENAME + "." + AVALIACAO_INICIAL, + TABLENAME + "." + ACOMPANHANTE1, TABLENAME + "." + FUNCAO_ACOMPANHANTE1, TABLENAME + "." + ACOMPANHANTE2, TABLENAME + "." + FUNCAO_ACOMPANHANTE2, + TABLENAME + "." + ACOMPANHANTE3, TABLENAME + "." + FUNCAO_ACOMPANHANTE3, TABLENAME + "." + FUNCIONARIOS, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATA, DELETED_DATE, MARCACAO_ID, IS_SUBMETIDO, AVALIACAO_INICIAL, + ACOMPANHANTE1, FUNCAO_ACOMPANHANTE1, ACOMPANHANTE2, FUNCAO_ACOMPANHANTE2, + ACOMPANHANTE3, FUNCAO_ACOMPANHANTE3, FUNCIONARIOS, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DATA, DELETED_DATE, MARCACAO_ID, IS_SUBMETIDO, AVALIACAO_INICIAL, + ACOMPANHANTE1, FUNCAO_ACOMPANHANTE1, ACOMPANHANTE2, FUNCAO_ACOMPANHANTE2, + ACOMPANHANTE3, FUNCAO_ACOMPANHANTE3, FUNCIONARIOS, }; + + private Integer id; + private java.util.Date data; + private java.sql.Timestamp deleted_date; + private Integer marcacao_id; + private siprp.data.outer.MarcacoesEstabelecimentoData to_marcacao_id; + private java.sql.Timestamp is_submetido; + private Boolean avaliacao_inicial; + private String acompanhante1; + private String funcao_acompanhante1; + private String acompanhante2; + private String funcao_acompanhante2; + private String acompanhante3; + private String funcao_acompanhante3; + private String funcionarios; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsRelatorio() + { + super(); + dirtyProperties = new boolean[]{ false, false, 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 + { + setLockedForRefresh( true ); + 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.ListfromHsRelatorioArea_relatorio_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsRelatorioAreaData.class , getPrimaryKey().getMap().get("id"), "relatorio_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsRelatorioEquipamento_hs_relatorio_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsRelatorioEquipamentoData.class , getPrimaryKey().getMap().get("id"), "hs_relatorio_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsRelatorioLegislacao_hs_relatorio_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsRelatorioLegislacaoData.class , getPrimaryKey().getMap().get("id"), "hs_relatorio_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsRelatorioNormalizacao_hs_relatorio_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsRelatorioNormalizacaoData.class , getPrimaryKey().getMap().get("id"), "hs_relatorio_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsRelatorioRisco_relatorio_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsRelatorioRiscoData.class , getPrimaryKey().getMap().get("id"), "relatorio_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + 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 + { + setLockedForRefresh( true ); + 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 getDeleted_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_date; + } + + public void setDeleted_date( java.sql.Timestamp deleted_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_DATE, deleted_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_date = deleted_date; + LAZY_LOADED_OBJECTS.put( DELETED_DATE, Boolean.TRUE ); + } + + public Integer getMarcacao_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MARCACAO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.marcacao_id; + } + + public void setMarcacao_id( Integer marcacao_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( MARCACAO_ID, marcacao_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.marcacao_id = marcacao_id; + LAZY_LOADED_OBJECTS.put( MARCACAO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.MarcacoesEstabelecimentoData toMarcacao_id() + { + try + { + prepare( TO_MARCACAO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_marcacao_id; + } + + public void setToMarcacao_id( siprp.data.outer.MarcacoesEstabelecimentoData to_marcacao_id ) + { + try + { + preProcess( TO_MARCACAO_ID, to_marcacao_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_marcacao_id = to_marcacao_id; + } + + public java.sql.Timestamp getIs_submetido() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IS_SUBMETIDO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.is_submetido; + } + + public void setIs_submetido( java.sql.Timestamp is_submetido ) + { + try + { + setLockedForRefresh( true ); + preProcess( IS_SUBMETIDO, is_submetido ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.is_submetido = is_submetido; + LAZY_LOADED_OBJECTS.put( IS_SUBMETIDO, Boolean.TRUE ); + } + + public Boolean getAvaliacao_inicial() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( AVALIACAO_INICIAL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.avaliacao_inicial; + } + + public void setAvaliacao_inicial( Boolean avaliacao_inicial ) + { + try + { + setLockedForRefresh( true ); + preProcess( AVALIACAO_INICIAL, avaliacao_inicial ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.avaliacao_inicial = avaliacao_inicial; + LAZY_LOADED_OBJECTS.put( AVALIACAO_INICIAL, Boolean.TRUE ); + } + + public String getAcompanhante1() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ACOMPANHANTE1 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.acompanhante1; + } + + public void setAcompanhante1( String acompanhante1 ) + { + try + { + setLockedForRefresh( true ); + preProcess( ACOMPANHANTE1, acompanhante1 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.acompanhante1 = acompanhante1; + LAZY_LOADED_OBJECTS.put( ACOMPANHANTE1, Boolean.TRUE ); + } + + public String getFuncao_acompanhante1() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FUNCAO_ACOMPANHANTE1 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.funcao_acompanhante1; + } + + public void setFuncao_acompanhante1( String funcao_acompanhante1 ) + { + try + { + setLockedForRefresh( true ); + preProcess( FUNCAO_ACOMPANHANTE1, funcao_acompanhante1 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.funcao_acompanhante1 = funcao_acompanhante1; + LAZY_LOADED_OBJECTS.put( FUNCAO_ACOMPANHANTE1, Boolean.TRUE ); + } + + public String getAcompanhante2() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ACOMPANHANTE2 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.acompanhante2; + } + + public void setAcompanhante2( String acompanhante2 ) + { + try + { + setLockedForRefresh( true ); + preProcess( ACOMPANHANTE2, acompanhante2 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.acompanhante2 = acompanhante2; + LAZY_LOADED_OBJECTS.put( ACOMPANHANTE2, Boolean.TRUE ); + } + + public String getFuncao_acompanhante2() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FUNCAO_ACOMPANHANTE2 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.funcao_acompanhante2; + } + + public void setFuncao_acompanhante2( String funcao_acompanhante2 ) + { + try + { + setLockedForRefresh( true ); + preProcess( FUNCAO_ACOMPANHANTE2, funcao_acompanhante2 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.funcao_acompanhante2 = funcao_acompanhante2; + LAZY_LOADED_OBJECTS.put( FUNCAO_ACOMPANHANTE2, Boolean.TRUE ); + } + + public String getAcompanhante3() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ACOMPANHANTE3 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.acompanhante3; + } + + public void setAcompanhante3( String acompanhante3 ) + { + try + { + setLockedForRefresh( true ); + preProcess( ACOMPANHANTE3, acompanhante3 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.acompanhante3 = acompanhante3; + LAZY_LOADED_OBJECTS.put( ACOMPANHANTE3, Boolean.TRUE ); + } + + public String getFuncao_acompanhante3() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FUNCAO_ACOMPANHANTE3 ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.funcao_acompanhante3; + } + + public void setFuncao_acompanhante3( String funcao_acompanhante3 ) + { + try + { + setLockedForRefresh( true ); + preProcess( FUNCAO_ACOMPANHANTE3, funcao_acompanhante3 ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.funcao_acompanhante3 = funcao_acompanhante3; + LAZY_LOADED_OBJECTS.put( FUNCAO_ACOMPANHANTE3, Boolean.TRUE ); + } + + public String getFuncionarios() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FUNCIONARIOS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.funcionarios; + } + + public void setFuncionarios( String funcionarios ) + { + try + { + setLockedForRefresh( true ); + preProcess( FUNCIONARIOS, funcionarios ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.funcionarios = funcionarios; + LAZY_LOADED_OBJECTS.put( FUNCIONARIOS, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorio.ID_INDEX: + value = getId(); + break; + case HsRelatorio.DATA_INDEX: + value = getData(); + break; + case HsRelatorio.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + case HsRelatorio.MARCACAO_ID_INDEX: + value = getMarcacao_id(); + break; + case HsRelatorio.TO_MARCACAO_ID_INDEX: + value = toMarcacao_id(); + break; + case HsRelatorio.IS_SUBMETIDO_INDEX: + value = getIs_submetido(); + break; + case HsRelatorio.AVALIACAO_INICIAL_INDEX: + value = getAvaliacao_inicial(); + break; + case HsRelatorio.ACOMPANHANTE1_INDEX: + value = getAcompanhante1(); + break; + case HsRelatorio.FUNCAO_ACOMPANHANTE1_INDEX: + value = getFuncao_acompanhante1(); + break; + case HsRelatorio.ACOMPANHANTE2_INDEX: + value = getAcompanhante2(); + break; + case HsRelatorio.FUNCAO_ACOMPANHANTE2_INDEX: + value = getFuncao_acompanhante2(); + break; + case HsRelatorio.ACOMPANHANTE3_INDEX: + value = getAcompanhante3(); + break; + case HsRelatorio.FUNCAO_ACOMPANHANTE3_INDEX: + value = getFuncao_acompanhante3(); + break; + case HsRelatorio.FUNCIONARIOS_INDEX: + value = getFuncionarios(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorio.ID_INDEX: + value = this.id; + break; + case HsRelatorio.DATA_INDEX: + value = this.data; + break; + case HsRelatorio.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + case HsRelatorio.MARCACAO_ID_INDEX: + value = this.marcacao_id; + break; + case HsRelatorio.TO_MARCACAO_ID_INDEX: + value = this.to_marcacao_id; + break; + case HsRelatorio.IS_SUBMETIDO_INDEX: + value = this.is_submetido; + break; + case HsRelatorio.AVALIACAO_INICIAL_INDEX: + value = this.avaliacao_inicial; + break; + case HsRelatorio.ACOMPANHANTE1_INDEX: + value = this.acompanhante1; + break; + case HsRelatorio.FUNCAO_ACOMPANHANTE1_INDEX: + value = this.funcao_acompanhante1; + break; + case HsRelatorio.ACOMPANHANTE2_INDEX: + value = this.acompanhante2; + break; + case HsRelatorio.FUNCAO_ACOMPANHANTE2_INDEX: + value = this.funcao_acompanhante2; + break; + case HsRelatorio.ACOMPANHANTE3_INDEX: + value = this.acompanhante3; + break; + case HsRelatorio.FUNCAO_ACOMPANHANTE3_INDEX: + value = this.funcao_acompanhante3; + break; + case HsRelatorio.FUNCIONARIOS_INDEX: + value = this.funcionarios; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorio.ID_INDEX: + setId( ( Integer ) value ); + break; + case HsRelatorio.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case HsRelatorio.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + case HsRelatorio.MARCACAO_ID_INDEX: + setMarcacao_id( ( Integer ) value ); + break; + case HsRelatorio.TO_MARCACAO_ID_INDEX: + setToMarcacao_id( ( siprp.data.outer.MarcacoesEstabelecimentoData ) value ); + break; + case HsRelatorio.IS_SUBMETIDO_INDEX: + setIs_submetido( ( java.sql.Timestamp ) value ); + break; + case HsRelatorio.AVALIACAO_INICIAL_INDEX: + setAvaliacao_inicial( ( Boolean ) value ); + break; + case HsRelatorio.ACOMPANHANTE1_INDEX: + setAcompanhante1( ( String ) value ); + break; + case HsRelatorio.FUNCAO_ACOMPANHANTE1_INDEX: + setFuncao_acompanhante1( ( String ) value ); + break; + case HsRelatorio.ACOMPANHANTE2_INDEX: + setAcompanhante2( ( String ) value ); + break; + case HsRelatorio.FUNCAO_ACOMPANHANTE2_INDEX: + setFuncao_acompanhante2( ( String ) value ); + break; + case HsRelatorio.ACOMPANHANTE3_INDEX: + setAcompanhante3( ( String ) value ); + break; + case HsRelatorio.FUNCAO_ACOMPANHANTE3_INDEX: + setFuncao_acompanhante3( ( String ) value ); + break; + case HsRelatorio.FUNCIONARIOS_INDEX: + setFuncionarios( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorio.ID_INDEX: + this.id = ( Integer ) value; + break; + case HsRelatorio.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case HsRelatorio.DELETED_DATE_INDEX: + this.deleted_date = ( java.sql.Timestamp ) value; + break; + case HsRelatorio.MARCACAO_ID_INDEX: + this.marcacao_id = ( Integer ) value; + break; + case HsRelatorio.TO_MARCACAO_ID_INDEX: + this.to_marcacao_id = ( siprp.data.outer.MarcacoesEstabelecimentoData ) value; + break; + case HsRelatorio.IS_SUBMETIDO_INDEX: + this.is_submetido = ( java.sql.Timestamp ) value; + break; + case HsRelatorio.AVALIACAO_INICIAL_INDEX: + this.avaliacao_inicial = ( Boolean ) value; + break; + case HsRelatorio.ACOMPANHANTE1_INDEX: + this.acompanhante1 = ( String ) value; + break; + case HsRelatorio.FUNCAO_ACOMPANHANTE1_INDEX: + this.funcao_acompanhante1 = ( String ) value; + break; + case HsRelatorio.ACOMPANHANTE2_INDEX: + this.acompanhante2 = ( String ) value; + break; + case HsRelatorio.FUNCAO_ACOMPANHANTE2_INDEX: + this.funcao_acompanhante2 = ( String ) value; + break; + case HsRelatorio.ACOMPANHANTE3_INDEX: + this.acompanhante3 = ( String ) value; + break; + case HsRelatorio.FUNCAO_ACOMPANHANTE3_INDEX: + this.funcao_acompanhante3 = ( String ) value; + break; + case HsRelatorio.FUNCIONARIOS_INDEX: + this.funcionarios = ( 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 HsRelatorio.ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorio.DATA_INDEX: + theClass = java.util.Date.class; + break; + case HsRelatorio.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case HsRelatorio.MARCACAO_ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorio.TO_MARCACAO_ID_INDEX: + theClass = siprp.data.outer.MarcacoesEstabelecimentoData.class; + break; + case HsRelatorio.IS_SUBMETIDO_INDEX: + theClass = java.sql.Timestamp.class; + break; + case HsRelatorio.AVALIACAO_INICIAL_INDEX: + theClass = Boolean.class; + break; + case HsRelatorio.ACOMPANHANTE1_INDEX: + theClass = String.class; + break; + case HsRelatorio.FUNCAO_ACOMPANHANTE1_INDEX: + theClass = String.class; + break; + case HsRelatorio.ACOMPANHANTE2_INDEX: + theClass = String.class; + break; + case HsRelatorio.FUNCAO_ACOMPANHANTE2_INDEX: + theClass = String.class; + break; + case HsRelatorio.ACOMPANHANTE3_INDEX: + theClass = String.class; + break; + case HsRelatorio.FUNCAO_ACOMPANHANTE3_INDEX: + theClass = String.class; + break; + case HsRelatorio.FUNCIONARIOS_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsRelatorio._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, HsRelatorio.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioArea.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioArea.java new file mode 100644 index 00000000..7865ad03 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioArea.java @@ -0,0 +1,544 @@ +/* +* HsRelatorioArea.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsRelatorioArea extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( HsRelatorioArea.ID, HsRelatorioArea.ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioArea.ID_FULL, HsRelatorioArea.ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioArea.DESCRIPTION, HsRelatorioArea.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( HsRelatorioArea.DESCRIPTION_FULL, HsRelatorioArea.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( HsRelatorioArea.DELETED_DATE, HsRelatorioArea.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( HsRelatorioArea.DELETED_DATE_FULL, HsRelatorioArea.DELETED_DATE_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsRelatorioArea.CLASS_IDENTIFIER, HsRelatorioArea.RELATORIO_ID, HsRelatorioArea.TO_RELATORIO_ID ); + FIELD_INDEXES.put( HsRelatorioArea.RELATORIO_ID, HsRelatorioArea.RELATORIO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioArea.RELATORIO_ID_FULL, HsRelatorioArea.RELATORIO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioArea.TO_RELATORIO_ID, HsRelatorioArea.TO_RELATORIO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioArea.ORDEM, HsRelatorioArea.ORDEM_INDEX ); + FIELD_INDEXES.put( HsRelatorioArea.ORDEM_FULL, HsRelatorioArea.ORDEM_INDEX ); + FIELD_INDEXES.put( HsRelatorioArea.HS_AREA_ID, HsRelatorioArea.HS_AREA_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioArea.HS_AREA_ID_FULL, HsRelatorioArea.HS_AREA_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 ForeignKeyrelatorio_idTohs_relatorio = + new com.evolute.entity.ForeignKey( HsRelatorioArea.class, HsRelatorioArea.RELATORIO_ID, siprp.data.outer.HsRelatorioData.class, siprp.data.outer.HsRelatorioData.ID ); + + public static final String TABLENAME = "hs_relatorio_area"; + + + public static final String CLASS_IDENTIFIER = "hs_relatorio_area1277401737168"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "hs_relatorio_area.id"; + public static final int ID_INDEX = 0; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_relatorio_area.description"; + public static final int DESCRIPTION_INDEX = 1; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_relatorio_area.deleted_date"; + public static final int DELETED_DATE_INDEX = 2; + public static final String RELATORIO_ID = "relatorio_id"; + public static final String RELATORIO_ID_FULL = "hs_relatorio_area.relatorio_id"; + public static final int RELATORIO_ID_INDEX = 3; + public static final String TO_RELATORIO_ID = "to_relatorio_id"; + public static final int TO_RELATORIO_ID_INDEX = 4; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "hs_relatorio_area.ordem"; + public static final int ORDEM_INDEX = 5; + public static final String HS_AREA_ID = "hs_area_id"; + public static final String HS_AREA_ID_FULL = "hs_relatorio_area.hs_area_id"; + public static final int HS_AREA_ID_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRIPTION, DELETED_DATE, RELATORIO_ID, TO_RELATORIO_ID, ORDEM, HS_AREA_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRIPTION, TABLENAME + "." + DELETED_DATE, TABLENAME + "." + RELATORIO_ID, TABLENAME + "." + TO_RELATORIO_ID, TABLENAME + "." + ORDEM, TABLENAME + "." + HS_AREA_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRIPTION, DELETED_DATE, RELATORIO_ID, ORDEM, HS_AREA_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DESCRIPTION, DELETED_DATE, RELATORIO_ID, ORDEM, HS_AREA_ID, }; + + private Integer id; + private String description; + private java.sql.Timestamp deleted_date; + private Integer relatorio_id; + private siprp.data.outer.HsRelatorioData to_relatorio_id; + private Integer ordem; + private Integer hs_area_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsRelatorioArea() + { + 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 + { + setLockedForRefresh( true ); + 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.ListfromHsRelatorioPosto_area_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsRelatorioPostoData.class , getPrimaryKey().getMap().get("id"), "area_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + 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 + { + setLockedForRefresh( true ); + 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 java.sql.Timestamp getDeleted_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_date; + } + + public void setDeleted_date( java.sql.Timestamp deleted_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_DATE, deleted_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_date = deleted_date; + LAZY_LOADED_OBJECTS.put( DELETED_DATE, Boolean.TRUE ); + } + + public Integer getRelatorio_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RELATORIO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.relatorio_id; + } + + public void setRelatorio_id( Integer relatorio_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( RELATORIO_ID, relatorio_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.relatorio_id = relatorio_id; + LAZY_LOADED_OBJECTS.put( RELATORIO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.HsRelatorioData toRelatorio_id() + { + try + { + prepare( TO_RELATORIO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_relatorio_id; + } + + public void setToRelatorio_id( siprp.data.outer.HsRelatorioData to_relatorio_id ) + { + try + { + preProcess( TO_RELATORIO_ID, to_relatorio_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_relatorio_id = to_relatorio_id; + } + + 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 + { + setLockedForRefresh( true ); + 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 Integer getHs_area_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HS_AREA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.hs_area_id; + } + + public void setHs_area_id( Integer hs_area_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( HS_AREA_ID, hs_area_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.hs_area_id = hs_area_id; + LAZY_LOADED_OBJECTS.put( HS_AREA_ID, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioArea.ID_INDEX: + value = getId(); + break; + case HsRelatorioArea.DESCRIPTION_INDEX: + value = getDescription(); + break; + case HsRelatorioArea.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + case HsRelatorioArea.RELATORIO_ID_INDEX: + value = getRelatorio_id(); + break; + case HsRelatorioArea.TO_RELATORIO_ID_INDEX: + value = toRelatorio_id(); + break; + case HsRelatorioArea.ORDEM_INDEX: + value = getOrdem(); + break; + case HsRelatorioArea.HS_AREA_ID_INDEX: + value = getHs_area_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioArea.ID_INDEX: + value = this.id; + break; + case HsRelatorioArea.DESCRIPTION_INDEX: + value = this.description; + break; + case HsRelatorioArea.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + case HsRelatorioArea.RELATORIO_ID_INDEX: + value = this.relatorio_id; + break; + case HsRelatorioArea.TO_RELATORIO_ID_INDEX: + value = this.to_relatorio_id; + break; + case HsRelatorioArea.ORDEM_INDEX: + value = this.ordem; + break; + case HsRelatorioArea.HS_AREA_ID_INDEX: + value = this.hs_area_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioArea.ID_INDEX: + setId( ( Integer ) value ); + break; + case HsRelatorioArea.DESCRIPTION_INDEX: + setDescription( ( String ) value ); + break; + case HsRelatorioArea.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + case HsRelatorioArea.RELATORIO_ID_INDEX: + setRelatorio_id( ( Integer ) value ); + break; + case HsRelatorioArea.TO_RELATORIO_ID_INDEX: + setToRelatorio_id( ( siprp.data.outer.HsRelatorioData ) value ); + break; + case HsRelatorioArea.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + case HsRelatorioArea.HS_AREA_ID_INDEX: + setHs_area_id( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioArea.ID_INDEX: + this.id = ( Integer ) value; + break; + case HsRelatorioArea.DESCRIPTION_INDEX: + this.description = ( String ) value; + break; + case HsRelatorioArea.DELETED_DATE_INDEX: + this.deleted_date = ( java.sql.Timestamp ) value; + break; + case HsRelatorioArea.RELATORIO_ID_INDEX: + this.relatorio_id = ( Integer ) value; + break; + case HsRelatorioArea.TO_RELATORIO_ID_INDEX: + this.to_relatorio_id = ( siprp.data.outer.HsRelatorioData ) value; + break; + case HsRelatorioArea.ORDEM_INDEX: + this.ordem = ( Integer ) value; + break; + case HsRelatorioArea.HS_AREA_ID_INDEX: + this.hs_area_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 HsRelatorioArea.ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioArea.DESCRIPTION_INDEX: + theClass = String.class; + break; + case HsRelatorioArea.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case HsRelatorioArea.RELATORIO_ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioArea.TO_RELATORIO_ID_INDEX: + theClass = siprp.data.outer.HsRelatorioData.class; + break; + case HsRelatorioArea.ORDEM_INDEX: + theClass = Integer.class; + break; + case HsRelatorioArea.HS_AREA_ID_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsRelatorioArea._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, HsRelatorioArea.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioEquipamento.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioEquipamento.java new file mode 100644 index 00000000..2e026d5d --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioEquipamento.java @@ -0,0 +1,582 @@ +/* +* HsRelatorioEquipamento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsRelatorioEquipamento extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( HsRelatorioEquipamento.CLASS_IDENTIFIER, HsRelatorioEquipamento.HS_RELATORIO_ID, HsRelatorioEquipamento.TO_HS_RELATORIO_ID ); + FIELD_INDEXES.put( HsRelatorioEquipamento.HS_RELATORIO_ID, HsRelatorioEquipamento.HS_RELATORIO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioEquipamento.HS_RELATORIO_ID_FULL, HsRelatorioEquipamento.HS_RELATORIO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioEquipamento.TO_HS_RELATORIO_ID, HsRelatorioEquipamento.TO_HS_RELATORIO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioEquipamento.HS_EQUIPAMENTO, HsRelatorioEquipamento.HS_EQUIPAMENTO_INDEX ); + FIELD_INDEXES.put( HsRelatorioEquipamento.HS_EQUIPAMENTO_FULL, HsRelatorioEquipamento.HS_EQUIPAMENTO_INDEX ); + FIELD_INDEXES.put( HsRelatorioEquipamento.ID, HsRelatorioEquipamento.ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioEquipamento.ID_FULL, HsRelatorioEquipamento.ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioEquipamento.TIPO, HsRelatorioEquipamento.TIPO_INDEX ); + FIELD_INDEXES.put( HsRelatorioEquipamento.TIPO_FULL, HsRelatorioEquipamento.TIPO_INDEX ); + FIELD_INDEXES.put( HsRelatorioEquipamento.MARCA, HsRelatorioEquipamento.MARCA_INDEX ); + FIELD_INDEXES.put( HsRelatorioEquipamento.MARCA_FULL, HsRelatorioEquipamento.MARCA_INDEX ); + FIELD_INDEXES.put( HsRelatorioEquipamento.MODELO, HsRelatorioEquipamento.MODELO_INDEX ); + FIELD_INDEXES.put( HsRelatorioEquipamento.MODELO_FULL, HsRelatorioEquipamento.MODELO_INDEX ); + FIELD_INDEXES.put( HsRelatorioEquipamento.HS_EQUIPAMENTO_ID, HsRelatorioEquipamento.HS_EQUIPAMENTO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioEquipamento.HS_EQUIPAMENTO_ID_FULL, HsRelatorioEquipamento.HS_EQUIPAMENTO_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 ForeignKeyhs_relatorio_idTohs_relatorio = + new com.evolute.entity.ForeignKey( HsRelatorioEquipamento.class, HsRelatorioEquipamento.HS_RELATORIO_ID, siprp.data.outer.HsRelatorioData.class, siprp.data.outer.HsRelatorioData.ID ); + + public static final String TABLENAME = "hs_relatorio_equipamento"; + + + public static final String CLASS_IDENTIFIER = "hs_relatorio_equipamento1277401737168"; + + public static final int _INVALID__INDEX = -1; + public static final String HS_RELATORIO_ID = "hs_relatorio_id"; + public static final String HS_RELATORIO_ID_FULL = "hs_relatorio_equipamento.hs_relatorio_id"; + public static final int HS_RELATORIO_ID_INDEX = 0; + public static final String TO_HS_RELATORIO_ID = "to_hs_relatorio_id"; + public static final int TO_HS_RELATORIO_ID_INDEX = 1; + public static final String HS_EQUIPAMENTO = "hs_equipamento"; + public static final String HS_EQUIPAMENTO_FULL = "hs_relatorio_equipamento.hs_equipamento"; + public static final int HS_EQUIPAMENTO_INDEX = 2; + public static final String ID = "id"; + public static final String ID_FULL = "hs_relatorio_equipamento.id"; + public static final int ID_INDEX = 3; + public static final String TIPO = "tipo"; + public static final String TIPO_FULL = "hs_relatorio_equipamento.tipo"; + public static final int TIPO_INDEX = 4; + public static final String MARCA = "marca"; + public static final String MARCA_FULL = "hs_relatorio_equipamento.marca"; + public static final int MARCA_INDEX = 5; + public static final String MODELO = "modelo"; + public static final String MODELO_FULL = "hs_relatorio_equipamento.modelo"; + public static final int MODELO_INDEX = 6; + public static final String HS_EQUIPAMENTO_ID = "hs_equipamento_id"; + public static final String HS_EQUIPAMENTO_ID_FULL = "hs_relatorio_equipamento.hs_equipamento_id"; + public static final int HS_EQUIPAMENTO_ID_INDEX = 7; + + public static final String FIELD_NAMES[] = new String[]{ + HS_RELATORIO_ID, TO_HS_RELATORIO_ID, HS_EQUIPAMENTO, TIPO, MARCA, MODELO, + HS_EQUIPAMENTO_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + HS_RELATORIO_ID, TABLENAME + "." + TO_HS_RELATORIO_ID, TABLENAME + "." + HS_EQUIPAMENTO, TABLENAME + "." + TIPO, TABLENAME + "." + MARCA, TABLENAME + "." + MODELO, + TABLENAME + "." + HS_EQUIPAMENTO_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + HS_RELATORIO_ID, HS_EQUIPAMENTO, ID, TIPO, MARCA, MODELO, HS_EQUIPAMENTO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + HS_RELATORIO_ID, HS_EQUIPAMENTO, ID, TIPO, MARCA, MODELO, HS_EQUIPAMENTO_ID, }; + + private Integer hs_relatorio_id; + private siprp.data.outer.HsRelatorioData to_hs_relatorio_id; + private Integer hs_equipamento; + private Integer id; + private String tipo; + private String marca; + private String modelo; + private Integer hs_equipamento_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsRelatorioEquipamento() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false, false }; + } + + public Integer getHs_relatorio_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HS_RELATORIO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.hs_relatorio_id; + } + + public void setHs_relatorio_id( Integer hs_relatorio_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( HS_RELATORIO_ID, hs_relatorio_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.hs_relatorio_id = hs_relatorio_id; + LAZY_LOADED_OBJECTS.put( HS_RELATORIO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.HsRelatorioData toHs_relatorio_id() + { + try + { + prepare( TO_HS_RELATORIO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_hs_relatorio_id; + } + + public void setToHs_relatorio_id( siprp.data.outer.HsRelatorioData to_hs_relatorio_id ) + { + try + { + preProcess( TO_HS_RELATORIO_ID, to_hs_relatorio_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_hs_relatorio_id = to_hs_relatorio_id; + } + + public Integer getHs_equipamento() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HS_EQUIPAMENTO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.hs_equipamento; + } + + public void setHs_equipamento( Integer hs_equipamento ) + { + try + { + setLockedForRefresh( true ); + preProcess( HS_EQUIPAMENTO, hs_equipamento ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.hs_equipamento = hs_equipamento; + LAZY_LOADED_OBJECTS.put( HS_EQUIPAMENTO, 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 + { + setLockedForRefresh( true ); + 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 getTipo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TIPO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tipo; + } + + public void setTipo( String tipo ) + { + try + { + setLockedForRefresh( true ); + 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 getMarca() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MARCA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.marca; + } + + public void setMarca( String marca ) + { + try + { + setLockedForRefresh( true ); + preProcess( MARCA, marca ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.marca = marca; + LAZY_LOADED_OBJECTS.put( MARCA, Boolean.TRUE ); + } + + public String getModelo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MODELO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.modelo; + } + + public void setModelo( String modelo ) + { + try + { + setLockedForRefresh( true ); + preProcess( MODELO, modelo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.modelo = modelo; + LAZY_LOADED_OBJECTS.put( MODELO, Boolean.TRUE ); + } + + public Integer getHs_equipamento_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HS_EQUIPAMENTO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.hs_equipamento_id; + } + + public void setHs_equipamento_id( Integer hs_equipamento_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( HS_EQUIPAMENTO_ID, hs_equipamento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.hs_equipamento_id = hs_equipamento_id; + LAZY_LOADED_OBJECTS.put( HS_EQUIPAMENTO_ID, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioEquipamento.HS_RELATORIO_ID_INDEX: + value = getHs_relatorio_id(); + break; + case HsRelatorioEquipamento.TO_HS_RELATORIO_ID_INDEX: + value = toHs_relatorio_id(); + break; + case HsRelatorioEquipamento.HS_EQUIPAMENTO_INDEX: + value = getHs_equipamento(); + break; + case HsRelatorioEquipamento.ID_INDEX: + value = getId(); + break; + case HsRelatorioEquipamento.TIPO_INDEX: + value = getTipo(); + break; + case HsRelatorioEquipamento.MARCA_INDEX: + value = getMarca(); + break; + case HsRelatorioEquipamento.MODELO_INDEX: + value = getModelo(); + break; + case HsRelatorioEquipamento.HS_EQUIPAMENTO_ID_INDEX: + value = getHs_equipamento_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioEquipamento.HS_RELATORIO_ID_INDEX: + value = this.hs_relatorio_id; + break; + case HsRelatorioEquipamento.TO_HS_RELATORIO_ID_INDEX: + value = this.to_hs_relatorio_id; + break; + case HsRelatorioEquipamento.HS_EQUIPAMENTO_INDEX: + value = this.hs_equipamento; + break; + case HsRelatorioEquipamento.ID_INDEX: + value = this.id; + break; + case HsRelatorioEquipamento.TIPO_INDEX: + value = this.tipo; + break; + case HsRelatorioEquipamento.MARCA_INDEX: + value = this.marca; + break; + case HsRelatorioEquipamento.MODELO_INDEX: + value = this.modelo; + break; + case HsRelatorioEquipamento.HS_EQUIPAMENTO_ID_INDEX: + value = this.hs_equipamento_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioEquipamento.HS_RELATORIO_ID_INDEX: + setHs_relatorio_id( ( Integer ) value ); + break; + case HsRelatorioEquipamento.TO_HS_RELATORIO_ID_INDEX: + setToHs_relatorio_id( ( siprp.data.outer.HsRelatorioData ) value ); + break; + case HsRelatorioEquipamento.HS_EQUIPAMENTO_INDEX: + setHs_equipamento( ( Integer ) value ); + break; + case HsRelatorioEquipamento.ID_INDEX: + setId( ( Integer ) value ); + break; + case HsRelatorioEquipamento.TIPO_INDEX: + setTipo( ( String ) value ); + break; + case HsRelatorioEquipamento.MARCA_INDEX: + setMarca( ( String ) value ); + break; + case HsRelatorioEquipamento.MODELO_INDEX: + setModelo( ( String ) value ); + break; + case HsRelatorioEquipamento.HS_EQUIPAMENTO_ID_INDEX: + setHs_equipamento_id( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioEquipamento.HS_RELATORIO_ID_INDEX: + this.hs_relatorio_id = ( Integer ) value; + break; + case HsRelatorioEquipamento.TO_HS_RELATORIO_ID_INDEX: + this.to_hs_relatorio_id = ( siprp.data.outer.HsRelatorioData ) value; + break; + case HsRelatorioEquipamento.HS_EQUIPAMENTO_INDEX: + this.hs_equipamento = ( Integer ) value; + break; + case HsRelatorioEquipamento.ID_INDEX: + this.id = ( Integer ) value; + break; + case HsRelatorioEquipamento.TIPO_INDEX: + this.tipo = ( String ) value; + break; + case HsRelatorioEquipamento.MARCA_INDEX: + this.marca = ( String ) value; + break; + case HsRelatorioEquipamento.MODELO_INDEX: + this.modelo = ( String ) value; + break; + case HsRelatorioEquipamento.HS_EQUIPAMENTO_ID_INDEX: + this.hs_equipamento_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 HsRelatorioEquipamento.HS_RELATORIO_ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioEquipamento.TO_HS_RELATORIO_ID_INDEX: + theClass = siprp.data.outer.HsRelatorioData.class; + break; + case HsRelatorioEquipamento.HS_EQUIPAMENTO_INDEX: + theClass = Integer.class; + break; + case HsRelatorioEquipamento.ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioEquipamento.TIPO_INDEX: + theClass = String.class; + break; + case HsRelatorioEquipamento.MARCA_INDEX: + theClass = String.class; + break; + case HsRelatorioEquipamento.MODELO_INDEX: + theClass = String.class; + break; + case HsRelatorioEquipamento.HS_EQUIPAMENTO_ID_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsRelatorioEquipamento._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, HsRelatorioEquipamento.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioLegislacao.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioLegislacao.java new file mode 100644 index 00000000..4c8241fd --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioLegislacao.java @@ -0,0 +1,532 @@ +/* +* HsRelatorioLegislacao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsRelatorioLegislacao extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( HsRelatorioLegislacao.CLASS_IDENTIFIER, HsRelatorioLegislacao.HS_RELATORIO_ID, HsRelatorioLegislacao.TO_HS_RELATORIO_ID ); + FIELD_INDEXES.put( HsRelatorioLegislacao.HS_RELATORIO_ID, HsRelatorioLegislacao.HS_RELATORIO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioLegislacao.HS_RELATORIO_ID_FULL, HsRelatorioLegislacao.HS_RELATORIO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioLegislacao.TO_HS_RELATORIO_ID, HsRelatorioLegislacao.TO_HS_RELATORIO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioLegislacao.HS_LEGISLACAO_ID, HsRelatorioLegislacao.HS_LEGISLACAO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioLegislacao.HS_LEGISLACAO_ID_FULL, HsRelatorioLegislacao.HS_LEGISLACAO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioLegislacao.ID, HsRelatorioLegislacao.ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioLegislacao.ID_FULL, HsRelatorioLegislacao.ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioLegislacao.CATEGORIA, HsRelatorioLegislacao.CATEGORIA_INDEX ); + FIELD_INDEXES.put( HsRelatorioLegislacao.CATEGORIA_FULL, HsRelatorioLegislacao.CATEGORIA_INDEX ); + FIELD_INDEXES.put( HsRelatorioLegislacao.DESCRICAO, HsRelatorioLegislacao.DESCRICAO_INDEX ); + FIELD_INDEXES.put( HsRelatorioLegislacao.DESCRICAO_FULL, HsRelatorioLegislacao.DESCRICAO_INDEX ); + FIELD_INDEXES.put( HsRelatorioLegislacao.ORDEM, HsRelatorioLegislacao.ORDEM_INDEX ); + FIELD_INDEXES.put( HsRelatorioLegislacao.ORDEM_FULL, HsRelatorioLegislacao.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 ForeignKeyhs_relatorio_idTohs_relatorio = + new com.evolute.entity.ForeignKey( HsRelatorioLegislacao.class, HsRelatorioLegislacao.HS_RELATORIO_ID, siprp.data.outer.HsRelatorioData.class, siprp.data.outer.HsRelatorioData.ID ); + + public static final String TABLENAME = "hs_relatorio_legislacao"; + + + public static final String CLASS_IDENTIFIER = "hs_relatorio_legislacao1277401737168"; + + public static final int _INVALID__INDEX = -1; + public static final String HS_RELATORIO_ID = "hs_relatorio_id"; + public static final String HS_RELATORIO_ID_FULL = "hs_relatorio_legislacao.hs_relatorio_id"; + public static final int HS_RELATORIO_ID_INDEX = 0; + public static final String TO_HS_RELATORIO_ID = "to_hs_relatorio_id"; + public static final int TO_HS_RELATORIO_ID_INDEX = 1; + public static final String HS_LEGISLACAO_ID = "hs_legislacao_id"; + public static final String HS_LEGISLACAO_ID_FULL = "hs_relatorio_legislacao.hs_legislacao_id"; + public static final int HS_LEGISLACAO_ID_INDEX = 2; + public static final String ID = "id"; + public static final String ID_FULL = "hs_relatorio_legislacao.id"; + public static final int ID_INDEX = 3; + public static final String CATEGORIA = "categoria"; + public static final String CATEGORIA_FULL = "hs_relatorio_legislacao.categoria"; + public static final int CATEGORIA_INDEX = 4; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "hs_relatorio_legislacao.descricao"; + public static final int DESCRICAO_INDEX = 5; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "hs_relatorio_legislacao.ordem"; + public static final int ORDEM_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + HS_RELATORIO_ID, TO_HS_RELATORIO_ID, HS_LEGISLACAO_ID, CATEGORIA, DESCRICAO, + ORDEM, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + HS_RELATORIO_ID, TABLENAME + "." + TO_HS_RELATORIO_ID, TABLENAME + "." + HS_LEGISLACAO_ID, TABLENAME + "." + CATEGORIA, TABLENAME + "." + DESCRICAO, + TABLENAME + "." + ORDEM, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + HS_RELATORIO_ID, HS_LEGISLACAO_ID, ID, CATEGORIA, DESCRICAO, ORDEM, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + HS_RELATORIO_ID, HS_LEGISLACAO_ID, ID, CATEGORIA, DESCRICAO, ORDEM, }; + + private Integer hs_relatorio_id; + private siprp.data.outer.HsRelatorioData to_hs_relatorio_id; + private Integer hs_legislacao_id; + private Integer id; + private String categoria; + private String descricao; + private Integer ordem; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsRelatorioLegislacao() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false }; + } + + public Integer getHs_relatorio_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HS_RELATORIO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.hs_relatorio_id; + } + + public void setHs_relatorio_id( Integer hs_relatorio_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( HS_RELATORIO_ID, hs_relatorio_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.hs_relatorio_id = hs_relatorio_id; + LAZY_LOADED_OBJECTS.put( HS_RELATORIO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.HsRelatorioData toHs_relatorio_id() + { + try + { + prepare( TO_HS_RELATORIO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_hs_relatorio_id; + } + + public void setToHs_relatorio_id( siprp.data.outer.HsRelatorioData to_hs_relatorio_id ) + { + try + { + preProcess( TO_HS_RELATORIO_ID, to_hs_relatorio_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_hs_relatorio_id = to_hs_relatorio_id; + } + + public Integer getHs_legislacao_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HS_LEGISLACAO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.hs_legislacao_id; + } + + public void setHs_legislacao_id( Integer hs_legislacao_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( HS_LEGISLACAO_ID, hs_legislacao_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.hs_legislacao_id = hs_legislacao_id; + LAZY_LOADED_OBJECTS.put( HS_LEGISLACAO_ID, 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 + { + setLockedForRefresh( true ); + 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 getCategoria() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CATEGORIA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.categoria; + } + + public void setCategoria( String categoria ) + { + try + { + setLockedForRefresh( true ); + preProcess( CATEGORIA, categoria ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.categoria = categoria; + LAZY_LOADED_OBJECTS.put( CATEGORIA, 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 HsRelatorioLegislacao.HS_RELATORIO_ID_INDEX: + value = getHs_relatorio_id(); + break; + case HsRelatorioLegislacao.TO_HS_RELATORIO_ID_INDEX: + value = toHs_relatorio_id(); + break; + case HsRelatorioLegislacao.HS_LEGISLACAO_ID_INDEX: + value = getHs_legislacao_id(); + break; + case HsRelatorioLegislacao.ID_INDEX: + value = getId(); + break; + case HsRelatorioLegislacao.CATEGORIA_INDEX: + value = getCategoria(); + break; + case HsRelatorioLegislacao.DESCRICAO_INDEX: + value = getDescricao(); + break; + case HsRelatorioLegislacao.ORDEM_INDEX: + value = getOrdem(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioLegislacao.HS_RELATORIO_ID_INDEX: + value = this.hs_relatorio_id; + break; + case HsRelatorioLegislacao.TO_HS_RELATORIO_ID_INDEX: + value = this.to_hs_relatorio_id; + break; + case HsRelatorioLegislacao.HS_LEGISLACAO_ID_INDEX: + value = this.hs_legislacao_id; + break; + case HsRelatorioLegislacao.ID_INDEX: + value = this.id; + break; + case HsRelatorioLegislacao.CATEGORIA_INDEX: + value = this.categoria; + break; + case HsRelatorioLegislacao.DESCRICAO_INDEX: + value = this.descricao; + break; + case HsRelatorioLegislacao.ORDEM_INDEX: + value = this.ordem; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioLegislacao.HS_RELATORIO_ID_INDEX: + setHs_relatorio_id( ( Integer ) value ); + break; + case HsRelatorioLegislacao.TO_HS_RELATORIO_ID_INDEX: + setToHs_relatorio_id( ( siprp.data.outer.HsRelatorioData ) value ); + break; + case HsRelatorioLegislacao.HS_LEGISLACAO_ID_INDEX: + setHs_legislacao_id( ( Integer ) value ); + break; + case HsRelatorioLegislacao.ID_INDEX: + setId( ( Integer ) value ); + break; + case HsRelatorioLegislacao.CATEGORIA_INDEX: + setCategoria( ( String ) value ); + break; + case HsRelatorioLegislacao.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case HsRelatorioLegislacao.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioLegislacao.HS_RELATORIO_ID_INDEX: + this.hs_relatorio_id = ( Integer ) value; + break; + case HsRelatorioLegislacao.TO_HS_RELATORIO_ID_INDEX: + this.to_hs_relatorio_id = ( siprp.data.outer.HsRelatorioData ) value; + break; + case HsRelatorioLegislacao.HS_LEGISLACAO_ID_INDEX: + this.hs_legislacao_id = ( Integer ) value; + break; + case HsRelatorioLegislacao.ID_INDEX: + this.id = ( Integer ) value; + break; + case HsRelatorioLegislacao.CATEGORIA_INDEX: + this.categoria = ( String ) value; + break; + case HsRelatorioLegislacao.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case HsRelatorioLegislacao.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 HsRelatorioLegislacao.HS_RELATORIO_ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioLegislacao.TO_HS_RELATORIO_ID_INDEX: + theClass = siprp.data.outer.HsRelatorioData.class; + break; + case HsRelatorioLegislacao.HS_LEGISLACAO_ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioLegislacao.ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioLegislacao.CATEGORIA_INDEX: + theClass = String.class; + break; + case HsRelatorioLegislacao.DESCRICAO_INDEX: + theClass = String.class; + break; + case HsRelatorioLegislacao.ORDEM_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsRelatorioLegislacao._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, HsRelatorioLegislacao.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioMedida.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioMedida.java new file mode 100644 index 00000000..03fd7828 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioMedida.java @@ -0,0 +1,546 @@ +/* +* HsRelatorioMedida.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsRelatorioMedida extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( HsRelatorioMedida.ID, HsRelatorioMedida.ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioMedida.ID_FULL, HsRelatorioMedida.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsRelatorioMedida.CLASS_IDENTIFIER, HsRelatorioMedida.RISCO_ID, HsRelatorioMedida.TO_RISCO_ID ); + FIELD_INDEXES.put( HsRelatorioMedida.RISCO_ID, HsRelatorioMedida.RISCO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioMedida.RISCO_ID_FULL, HsRelatorioMedida.RISCO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioMedida.TO_RISCO_ID, HsRelatorioMedida.TO_RISCO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioMedida.DESCRIPTION, HsRelatorioMedida.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( HsRelatorioMedida.DESCRIPTION_FULL, HsRelatorioMedida.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( HsRelatorioMedida.REQUESITOS_LEGAIS, HsRelatorioMedida.REQUESITOS_LEGAIS_INDEX ); + FIELD_INDEXES.put( HsRelatorioMedida.REQUESITOS_LEGAIS_FULL, HsRelatorioMedida.REQUESITOS_LEGAIS_INDEX ); + FIELD_INDEXES.put( HsRelatorioMedida.DELETED_DATE, HsRelatorioMedida.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( HsRelatorioMedida.DELETED_DATE_FULL, HsRelatorioMedida.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( HsRelatorioMedida.HS_MEDIDA_ID, HsRelatorioMedida.HS_MEDIDA_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioMedida.HS_MEDIDA_ID_FULL, HsRelatorioMedida.HS_MEDIDA_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_idTohs_relatorio_risco = + new com.evolute.entity.ForeignKey( HsRelatorioMedida.class, HsRelatorioMedida.RISCO_ID, siprp.data.outer.HsRelatorioRiscoData.class, siprp.data.outer.HsRelatorioRiscoData.ID ); + + public static final String TABLENAME = "hs_relatorio_medida"; + + + public static final String CLASS_IDENTIFIER = "hs_relatorio_medida1277401737169"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "hs_relatorio_medida.id"; + public static final int ID_INDEX = 0; + public static final String RISCO_ID = "risco_id"; + public static final String RISCO_ID_FULL = "hs_relatorio_medida.risco_id"; + public static final int RISCO_ID_INDEX = 1; + public static final String TO_RISCO_ID = "to_risco_id"; + public static final int TO_RISCO_ID_INDEX = 2; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_relatorio_medida.description"; + public static final int DESCRIPTION_INDEX = 3; + public static final String REQUESITOS_LEGAIS = "requesitos_legais"; + public static final String REQUESITOS_LEGAIS_FULL = "hs_relatorio_medida.requesitos_legais"; + public static final int REQUESITOS_LEGAIS_INDEX = 4; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_relatorio_medida.deleted_date"; + public static final int DELETED_DATE_INDEX = 5; + public static final String HS_MEDIDA_ID = "hs_medida_id"; + public static final String HS_MEDIDA_ID_FULL = "hs_relatorio_medida.hs_medida_id"; + public static final int HS_MEDIDA_ID_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + RISCO_ID, TO_RISCO_ID, DESCRIPTION, REQUESITOS_LEGAIS, DELETED_DATE, + HS_MEDIDA_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + RISCO_ID, TABLENAME + "." + TO_RISCO_ID, TABLENAME + "." + DESCRIPTION, TABLENAME + "." + REQUESITOS_LEGAIS, TABLENAME + "." + DELETED_DATE, + TABLENAME + "." + HS_MEDIDA_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, RISCO_ID, DESCRIPTION, REQUESITOS_LEGAIS, DELETED_DATE, HS_MEDIDA_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, RISCO_ID, DESCRIPTION, REQUESITOS_LEGAIS, DELETED_DATE, HS_MEDIDA_ID, }; + + private Integer id; + private Integer risco_id; + private siprp.data.outer.HsRelatorioRiscoData to_risco_id; + private String description; + private String requesitos_legais; + private java.sql.Timestamp deleted_date; + private Integer hs_medida_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsRelatorioMedida() + { + 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 + { + setLockedForRefresh( true ); + 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.ListfromHsRelatorioPostoMedida_medida_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsRelatorioPostoMedidaData.class , getPrimaryKey().getMap().get("id"), "medida_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.outer.HsRelatorioRiscoData 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( siprp.data.outer.HsRelatorioRiscoData 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 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 + { + setLockedForRefresh( true ); + 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 String getRequesitos_legais() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( REQUESITOS_LEGAIS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.requesitos_legais; + } + + public void setRequesitos_legais( String requesitos_legais ) + { + try + { + setLockedForRefresh( true ); + preProcess( REQUESITOS_LEGAIS, requesitos_legais ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.requesitos_legais = requesitos_legais; + LAZY_LOADED_OBJECTS.put( REQUESITOS_LEGAIS, Boolean.TRUE ); + } + + public java.sql.Timestamp getDeleted_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_date; + } + + public void setDeleted_date( java.sql.Timestamp deleted_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_DATE, deleted_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_date = deleted_date; + LAZY_LOADED_OBJECTS.put( DELETED_DATE, Boolean.TRUE ); + } + + public Integer getHs_medida_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HS_MEDIDA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.hs_medida_id; + } + + public void setHs_medida_id( Integer hs_medida_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( HS_MEDIDA_ID, hs_medida_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.hs_medida_id = hs_medida_id; + LAZY_LOADED_OBJECTS.put( HS_MEDIDA_ID, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioMedida.ID_INDEX: + value = getId(); + break; + case HsRelatorioMedida.RISCO_ID_INDEX: + value = getRisco_id(); + break; + case HsRelatorioMedida.TO_RISCO_ID_INDEX: + value = toRisco_id(); + break; + case HsRelatorioMedida.DESCRIPTION_INDEX: + value = getDescription(); + break; + case HsRelatorioMedida.REQUESITOS_LEGAIS_INDEX: + value = getRequesitos_legais(); + break; + case HsRelatorioMedida.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + case HsRelatorioMedida.HS_MEDIDA_ID_INDEX: + value = getHs_medida_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioMedida.ID_INDEX: + value = this.id; + break; + case HsRelatorioMedida.RISCO_ID_INDEX: + value = this.risco_id; + break; + case HsRelatorioMedida.TO_RISCO_ID_INDEX: + value = this.to_risco_id; + break; + case HsRelatorioMedida.DESCRIPTION_INDEX: + value = this.description; + break; + case HsRelatorioMedida.REQUESITOS_LEGAIS_INDEX: + value = this.requesitos_legais; + break; + case HsRelatorioMedida.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + case HsRelatorioMedida.HS_MEDIDA_ID_INDEX: + value = this.hs_medida_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioMedida.ID_INDEX: + setId( ( Integer ) value ); + break; + case HsRelatorioMedida.RISCO_ID_INDEX: + setRisco_id( ( Integer ) value ); + break; + case HsRelatorioMedida.TO_RISCO_ID_INDEX: + setToRisco_id( ( siprp.data.outer.HsRelatorioRiscoData ) value ); + break; + case HsRelatorioMedida.DESCRIPTION_INDEX: + setDescription( ( String ) value ); + break; + case HsRelatorioMedida.REQUESITOS_LEGAIS_INDEX: + setRequesitos_legais( ( String ) value ); + break; + case HsRelatorioMedida.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + case HsRelatorioMedida.HS_MEDIDA_ID_INDEX: + setHs_medida_id( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioMedida.ID_INDEX: + this.id = ( Integer ) value; + break; + case HsRelatorioMedida.RISCO_ID_INDEX: + this.risco_id = ( Integer ) value; + break; + case HsRelatorioMedida.TO_RISCO_ID_INDEX: + this.to_risco_id = ( siprp.data.outer.HsRelatorioRiscoData ) value; + break; + case HsRelatorioMedida.DESCRIPTION_INDEX: + this.description = ( String ) value; + break; + case HsRelatorioMedida.REQUESITOS_LEGAIS_INDEX: + this.requesitos_legais = ( String ) value; + break; + case HsRelatorioMedida.DELETED_DATE_INDEX: + this.deleted_date = ( java.sql.Timestamp ) value; + break; + case HsRelatorioMedida.HS_MEDIDA_ID_INDEX: + this.hs_medida_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 HsRelatorioMedida.ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioMedida.RISCO_ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioMedida.TO_RISCO_ID_INDEX: + theClass = siprp.data.outer.HsRelatorioRiscoData.class; + break; + case HsRelatorioMedida.DESCRIPTION_INDEX: + theClass = String.class; + break; + case HsRelatorioMedida.REQUESITOS_LEGAIS_INDEX: + theClass = String.class; + break; + case HsRelatorioMedida.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case HsRelatorioMedida.HS_MEDIDA_ID_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsRelatorioMedida._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, HsRelatorioMedida.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioNormalizacao.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioNormalizacao.java new file mode 100644 index 00000000..ddb54ae1 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioNormalizacao.java @@ -0,0 +1,532 @@ +/* +* HsRelatorioNormalizacao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsRelatorioNormalizacao extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( HsRelatorioNormalizacao.CLASS_IDENTIFIER, HsRelatorioNormalizacao.HS_RELATORIO_ID, HsRelatorioNormalizacao.TO_HS_RELATORIO_ID ); + FIELD_INDEXES.put( HsRelatorioNormalizacao.HS_RELATORIO_ID, HsRelatorioNormalizacao.HS_RELATORIO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioNormalizacao.HS_RELATORIO_ID_FULL, HsRelatorioNormalizacao.HS_RELATORIO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioNormalizacao.TO_HS_RELATORIO_ID, HsRelatorioNormalizacao.TO_HS_RELATORIO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioNormalizacao.HS_NORMALIZACAO_ID, HsRelatorioNormalizacao.HS_NORMALIZACAO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioNormalizacao.HS_NORMALIZACAO_ID_FULL, HsRelatorioNormalizacao.HS_NORMALIZACAO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioNormalizacao.ID, HsRelatorioNormalizacao.ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioNormalizacao.ID_FULL, HsRelatorioNormalizacao.ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioNormalizacao.CODIGO, HsRelatorioNormalizacao.CODIGO_INDEX ); + FIELD_INDEXES.put( HsRelatorioNormalizacao.CODIGO_FULL, HsRelatorioNormalizacao.CODIGO_INDEX ); + FIELD_INDEXES.put( HsRelatorioNormalizacao.DESCRICAO, HsRelatorioNormalizacao.DESCRICAO_INDEX ); + FIELD_INDEXES.put( HsRelatorioNormalizacao.DESCRICAO_FULL, HsRelatorioNormalizacao.DESCRICAO_INDEX ); + FIELD_INDEXES.put( HsRelatorioNormalizacao.PORTUGUESA, HsRelatorioNormalizacao.PORTUGUESA_INDEX ); + FIELD_INDEXES.put( HsRelatorioNormalizacao.PORTUGUESA_FULL, HsRelatorioNormalizacao.PORTUGUESA_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyhs_relatorio_idTohs_relatorio = + new com.evolute.entity.ForeignKey( HsRelatorioNormalizacao.class, HsRelatorioNormalizacao.HS_RELATORIO_ID, siprp.data.outer.HsRelatorioData.class, siprp.data.outer.HsRelatorioData.ID ); + + public static final String TABLENAME = "hs_relatorio_normalizacao"; + + + public static final String CLASS_IDENTIFIER = "hs_relatorio_normalizacao1277401737169"; + + public static final int _INVALID__INDEX = -1; + public static final String HS_RELATORIO_ID = "hs_relatorio_id"; + public static final String HS_RELATORIO_ID_FULL = "hs_relatorio_normalizacao.hs_relatorio_id"; + public static final int HS_RELATORIO_ID_INDEX = 0; + public static final String TO_HS_RELATORIO_ID = "to_hs_relatorio_id"; + public static final int TO_HS_RELATORIO_ID_INDEX = 1; + public static final String HS_NORMALIZACAO_ID = "hs_normalizacao_id"; + public static final String HS_NORMALIZACAO_ID_FULL = "hs_relatorio_normalizacao.hs_normalizacao_id"; + public static final int HS_NORMALIZACAO_ID_INDEX = 2; + public static final String ID = "id"; + public static final String ID_FULL = "hs_relatorio_normalizacao.id"; + public static final int ID_INDEX = 3; + public static final String CODIGO = "codigo"; + public static final String CODIGO_FULL = "hs_relatorio_normalizacao.codigo"; + public static final int CODIGO_INDEX = 4; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "hs_relatorio_normalizacao.descricao"; + public static final int DESCRICAO_INDEX = 5; + public static final String PORTUGUESA = "portuguesa"; + public static final String PORTUGUESA_FULL = "hs_relatorio_normalizacao.portuguesa"; + public static final int PORTUGUESA_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + HS_RELATORIO_ID, TO_HS_RELATORIO_ID, HS_NORMALIZACAO_ID, CODIGO, DESCRICAO, + PORTUGUESA, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + HS_RELATORIO_ID, TABLENAME + "." + TO_HS_RELATORIO_ID, TABLENAME + "." + HS_NORMALIZACAO_ID, TABLENAME + "." + CODIGO, TABLENAME + "." + DESCRICAO, + TABLENAME + "." + PORTUGUESA, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + HS_RELATORIO_ID, HS_NORMALIZACAO_ID, ID, CODIGO, DESCRICAO, PORTUGUESA, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + HS_RELATORIO_ID, HS_NORMALIZACAO_ID, ID, CODIGO, DESCRICAO, PORTUGUESA, }; + + private Integer hs_relatorio_id; + private siprp.data.outer.HsRelatorioData to_hs_relatorio_id; + private Integer hs_normalizacao_id; + private Integer id; + private String codigo; + private String descricao; + private Boolean portuguesa; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsRelatorioNormalizacao() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false }; + } + + public Integer getHs_relatorio_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HS_RELATORIO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.hs_relatorio_id; + } + + public void setHs_relatorio_id( Integer hs_relatorio_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( HS_RELATORIO_ID, hs_relatorio_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.hs_relatorio_id = hs_relatorio_id; + LAZY_LOADED_OBJECTS.put( HS_RELATORIO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.HsRelatorioData toHs_relatorio_id() + { + try + { + prepare( TO_HS_RELATORIO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_hs_relatorio_id; + } + + public void setToHs_relatorio_id( siprp.data.outer.HsRelatorioData to_hs_relatorio_id ) + { + try + { + preProcess( TO_HS_RELATORIO_ID, to_hs_relatorio_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_hs_relatorio_id = to_hs_relatorio_id; + } + + public Integer getHs_normalizacao_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HS_NORMALIZACAO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.hs_normalizacao_id; + } + + public void setHs_normalizacao_id( Integer hs_normalizacao_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( HS_NORMALIZACAO_ID, hs_normalizacao_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.hs_normalizacao_id = hs_normalizacao_id; + LAZY_LOADED_OBJECTS.put( HS_NORMALIZACAO_ID, 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 + { + setLockedForRefresh( true ); + 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 getCodigo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CODIGO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.codigo; + } + + public void setCodigo( String codigo ) + { + try + { + setLockedForRefresh( true ); + preProcess( CODIGO, codigo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.codigo = codigo; + LAZY_LOADED_OBJECTS.put( CODIGO, 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 + { + setLockedForRefresh( true ); + 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 Boolean getPortuguesa() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PORTUGUESA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.portuguesa; + } + + public void setPortuguesa( Boolean portuguesa ) + { + try + { + setLockedForRefresh( true ); + preProcess( PORTUGUESA, portuguesa ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.portuguesa = portuguesa; + LAZY_LOADED_OBJECTS.put( PORTUGUESA, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioNormalizacao.HS_RELATORIO_ID_INDEX: + value = getHs_relatorio_id(); + break; + case HsRelatorioNormalizacao.TO_HS_RELATORIO_ID_INDEX: + value = toHs_relatorio_id(); + break; + case HsRelatorioNormalizacao.HS_NORMALIZACAO_ID_INDEX: + value = getHs_normalizacao_id(); + break; + case HsRelatorioNormalizacao.ID_INDEX: + value = getId(); + break; + case HsRelatorioNormalizacao.CODIGO_INDEX: + value = getCodigo(); + break; + case HsRelatorioNormalizacao.DESCRICAO_INDEX: + value = getDescricao(); + break; + case HsRelatorioNormalizacao.PORTUGUESA_INDEX: + value = getPortuguesa(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioNormalizacao.HS_RELATORIO_ID_INDEX: + value = this.hs_relatorio_id; + break; + case HsRelatorioNormalizacao.TO_HS_RELATORIO_ID_INDEX: + value = this.to_hs_relatorio_id; + break; + case HsRelatorioNormalizacao.HS_NORMALIZACAO_ID_INDEX: + value = this.hs_normalizacao_id; + break; + case HsRelatorioNormalizacao.ID_INDEX: + value = this.id; + break; + case HsRelatorioNormalizacao.CODIGO_INDEX: + value = this.codigo; + break; + case HsRelatorioNormalizacao.DESCRICAO_INDEX: + value = this.descricao; + break; + case HsRelatorioNormalizacao.PORTUGUESA_INDEX: + value = this.portuguesa; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioNormalizacao.HS_RELATORIO_ID_INDEX: + setHs_relatorio_id( ( Integer ) value ); + break; + case HsRelatorioNormalizacao.TO_HS_RELATORIO_ID_INDEX: + setToHs_relatorio_id( ( siprp.data.outer.HsRelatorioData ) value ); + break; + case HsRelatorioNormalizacao.HS_NORMALIZACAO_ID_INDEX: + setHs_normalizacao_id( ( Integer ) value ); + break; + case HsRelatorioNormalizacao.ID_INDEX: + setId( ( Integer ) value ); + break; + case HsRelatorioNormalizacao.CODIGO_INDEX: + setCodigo( ( String ) value ); + break; + case HsRelatorioNormalizacao.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case HsRelatorioNormalizacao.PORTUGUESA_INDEX: + setPortuguesa( ( Boolean ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioNormalizacao.HS_RELATORIO_ID_INDEX: + this.hs_relatorio_id = ( Integer ) value; + break; + case HsRelatorioNormalizacao.TO_HS_RELATORIO_ID_INDEX: + this.to_hs_relatorio_id = ( siprp.data.outer.HsRelatorioData ) value; + break; + case HsRelatorioNormalizacao.HS_NORMALIZACAO_ID_INDEX: + this.hs_normalizacao_id = ( Integer ) value; + break; + case HsRelatorioNormalizacao.ID_INDEX: + this.id = ( Integer ) value; + break; + case HsRelatorioNormalizacao.CODIGO_INDEX: + this.codigo = ( String ) value; + break; + case HsRelatorioNormalizacao.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case HsRelatorioNormalizacao.PORTUGUESA_INDEX: + this.portuguesa = ( 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 HsRelatorioNormalizacao.HS_RELATORIO_ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioNormalizacao.TO_HS_RELATORIO_ID_INDEX: + theClass = siprp.data.outer.HsRelatorioData.class; + break; + case HsRelatorioNormalizacao.HS_NORMALIZACAO_ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioNormalizacao.ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioNormalizacao.CODIGO_INDEX: + theClass = String.class; + break; + case HsRelatorioNormalizacao.DESCRICAO_INDEX: + theClass = String.class; + break; + case HsRelatorioNormalizacao.PORTUGUESA_INDEX: + theClass = Boolean.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsRelatorioNormalizacao._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, HsRelatorioNormalizacao.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioPosto.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioPosto.java new file mode 100644 index 00000000..506beb1c --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioPosto.java @@ -0,0 +1,558 @@ +/* +* HsRelatorioPosto.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsRelatorioPosto extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( HsRelatorioPosto.ID, HsRelatorioPosto.ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioPosto.ID_FULL, HsRelatorioPosto.ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioPosto.DESCRIPTION, HsRelatorioPosto.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( HsRelatorioPosto.DESCRIPTION_FULL, HsRelatorioPosto.DESCRIPTION_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsRelatorioPosto.CLASS_IDENTIFIER, HsRelatorioPosto.AREA_ID, HsRelatorioPosto.TO_AREA_ID ); + FIELD_INDEXES.put( HsRelatorioPosto.AREA_ID, HsRelatorioPosto.AREA_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioPosto.AREA_ID_FULL, HsRelatorioPosto.AREA_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioPosto.TO_AREA_ID, HsRelatorioPosto.TO_AREA_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioPosto.DELETED_DATE, HsRelatorioPosto.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( HsRelatorioPosto.DELETED_DATE_FULL, HsRelatorioPosto.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( HsRelatorioPosto.IS_PRINCIPAL, HsRelatorioPosto.IS_PRINCIPAL_INDEX ); + FIELD_INDEXES.put( HsRelatorioPosto.IS_PRINCIPAL_FULL, HsRelatorioPosto.IS_PRINCIPAL_INDEX ); + FIELD_INDEXES.put( HsRelatorioPosto.HS_POSTO_ID, HsRelatorioPosto.HS_POSTO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioPosto.HS_POSTO_ID_FULL, HsRelatorioPosto.HS_POSTO_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 ForeignKeyarea_idTohs_relatorio_area = + new com.evolute.entity.ForeignKey( HsRelatorioPosto.class, HsRelatorioPosto.AREA_ID, siprp.data.outer.HsRelatorioAreaData.class, siprp.data.outer.HsRelatorioAreaData.ID ); + + public static final String TABLENAME = "hs_relatorio_posto"; + + + public static final String CLASS_IDENTIFIER = "hs_relatorio_posto1277401737170"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "hs_relatorio_posto.id"; + public static final int ID_INDEX = 0; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_relatorio_posto.description"; + public static final int DESCRIPTION_INDEX = 1; + public static final String AREA_ID = "area_id"; + public static final String AREA_ID_FULL = "hs_relatorio_posto.area_id"; + public static final int AREA_ID_INDEX = 2; + public static final String TO_AREA_ID = "to_area_id"; + public static final int TO_AREA_ID_INDEX = 3; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_relatorio_posto.deleted_date"; + public static final int DELETED_DATE_INDEX = 4; + public static final String IS_PRINCIPAL = "is_principal"; + public static final String IS_PRINCIPAL_FULL = "hs_relatorio_posto.is_principal"; + public static final int IS_PRINCIPAL_INDEX = 5; + public static final String HS_POSTO_ID = "hs_posto_id"; + public static final String HS_POSTO_ID_FULL = "hs_relatorio_posto.hs_posto_id"; + public static final int HS_POSTO_ID_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRIPTION, AREA_ID, TO_AREA_ID, DELETED_DATE, IS_PRINCIPAL, HS_POSTO_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRIPTION, TABLENAME + "." + AREA_ID, TABLENAME + "." + TO_AREA_ID, TABLENAME + "." + DELETED_DATE, TABLENAME + "." + IS_PRINCIPAL, TABLENAME + "." + HS_POSTO_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRIPTION, AREA_ID, DELETED_DATE, IS_PRINCIPAL, HS_POSTO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DESCRIPTION, AREA_ID, DELETED_DATE, IS_PRINCIPAL, HS_POSTO_ID, }; + + private Integer id; + private String description; + private Integer area_id; + private siprp.data.outer.HsRelatorioAreaData to_area_id; + private java.sql.Timestamp deleted_date; + private Boolean is_principal; + private Integer hs_posto_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsRelatorioPosto() + { + 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 + { + setLockedForRefresh( true ); + 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.ListfromHsRelatorioPostoMedida_posto_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsRelatorioPostoMedidaData.class , getPrimaryKey().getMap().get("id"), "posto_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsRelatorioPostoRisco_posto_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsRelatorioPostoRiscoData.class , getPrimaryKey().getMap().get("id"), "posto_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + 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 + { + setLockedForRefresh( true ); + 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 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 + { + setLockedForRefresh( true ); + 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 siprp.data.outer.HsRelatorioAreaData toArea_id() + { + try + { + prepare( TO_AREA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_area_id; + } + + public void setToArea_id( siprp.data.outer.HsRelatorioAreaData to_area_id ) + { + try + { + preProcess( TO_AREA_ID, to_area_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_area_id = to_area_id; + } + + public java.sql.Timestamp getDeleted_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_date; + } + + public void setDeleted_date( java.sql.Timestamp deleted_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_DATE, deleted_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_date = deleted_date; + LAZY_LOADED_OBJECTS.put( DELETED_DATE, 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 + { + setLockedForRefresh( true ); + 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 getHs_posto_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HS_POSTO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.hs_posto_id; + } + + public void setHs_posto_id( Integer hs_posto_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( HS_POSTO_ID, hs_posto_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.hs_posto_id = hs_posto_id; + LAZY_LOADED_OBJECTS.put( HS_POSTO_ID, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioPosto.ID_INDEX: + value = getId(); + break; + case HsRelatorioPosto.DESCRIPTION_INDEX: + value = getDescription(); + break; + case HsRelatorioPosto.AREA_ID_INDEX: + value = getArea_id(); + break; + case HsRelatorioPosto.TO_AREA_ID_INDEX: + value = toArea_id(); + break; + case HsRelatorioPosto.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + case HsRelatorioPosto.IS_PRINCIPAL_INDEX: + value = getIs_principal(); + break; + case HsRelatorioPosto.HS_POSTO_ID_INDEX: + value = getHs_posto_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioPosto.ID_INDEX: + value = this.id; + break; + case HsRelatorioPosto.DESCRIPTION_INDEX: + value = this.description; + break; + case HsRelatorioPosto.AREA_ID_INDEX: + value = this.area_id; + break; + case HsRelatorioPosto.TO_AREA_ID_INDEX: + value = this.to_area_id; + break; + case HsRelatorioPosto.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + case HsRelatorioPosto.IS_PRINCIPAL_INDEX: + value = this.is_principal; + break; + case HsRelatorioPosto.HS_POSTO_ID_INDEX: + value = this.hs_posto_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioPosto.ID_INDEX: + setId( ( Integer ) value ); + break; + case HsRelatorioPosto.DESCRIPTION_INDEX: + setDescription( ( String ) value ); + break; + case HsRelatorioPosto.AREA_ID_INDEX: + setArea_id( ( Integer ) value ); + break; + case HsRelatorioPosto.TO_AREA_ID_INDEX: + setToArea_id( ( siprp.data.outer.HsRelatorioAreaData ) value ); + break; + case HsRelatorioPosto.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + case HsRelatorioPosto.IS_PRINCIPAL_INDEX: + setIs_principal( ( Boolean ) value ); + break; + case HsRelatorioPosto.HS_POSTO_ID_INDEX: + setHs_posto_id( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioPosto.ID_INDEX: + this.id = ( Integer ) value; + break; + case HsRelatorioPosto.DESCRIPTION_INDEX: + this.description = ( String ) value; + break; + case HsRelatorioPosto.AREA_ID_INDEX: + this.area_id = ( Integer ) value; + break; + case HsRelatorioPosto.TO_AREA_ID_INDEX: + this.to_area_id = ( siprp.data.outer.HsRelatorioAreaData ) value; + break; + case HsRelatorioPosto.DELETED_DATE_INDEX: + this.deleted_date = ( java.sql.Timestamp ) value; + break; + case HsRelatorioPosto.IS_PRINCIPAL_INDEX: + this.is_principal = ( Boolean ) value; + break; + case HsRelatorioPosto.HS_POSTO_ID_INDEX: + this.hs_posto_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 HsRelatorioPosto.ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioPosto.DESCRIPTION_INDEX: + theClass = String.class; + break; + case HsRelatorioPosto.AREA_ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioPosto.TO_AREA_ID_INDEX: + theClass = siprp.data.outer.HsRelatorioAreaData.class; + break; + case HsRelatorioPosto.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case HsRelatorioPosto.IS_PRINCIPAL_INDEX: + theClass = Boolean.class; + break; + case HsRelatorioPosto.HS_POSTO_ID_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsRelatorioPosto._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, HsRelatorioPosto.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioPostoMedida.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioPostoMedida.java new file mode 100644 index 00000000..085ed406 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioPostoMedida.java @@ -0,0 +1,429 @@ +/* +* HsRelatorioPostoMedida.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsRelatorioPostoMedida extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( HsRelatorioPostoMedida.CLASS_IDENTIFIER, HsRelatorioPostoMedida.POSTO_ID, HsRelatorioPostoMedida.TO_POSTO_ID ); + FIELD_INDEXES.put( HsRelatorioPostoMedida.POSTO_ID, HsRelatorioPostoMedida.POSTO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioPostoMedida.POSTO_ID_FULL, HsRelatorioPostoMedida.POSTO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioPostoMedida.TO_POSTO_ID, HsRelatorioPostoMedida.TO_POSTO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsRelatorioPostoMedida.CLASS_IDENTIFIER, HsRelatorioPostoMedida.MEDIDA_ID, HsRelatorioPostoMedida.TO_MEDIDA_ID ); + FIELD_INDEXES.put( HsRelatorioPostoMedida.MEDIDA_ID, HsRelatorioPostoMedida.MEDIDA_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioPostoMedida.MEDIDA_ID_FULL, HsRelatorioPostoMedida.MEDIDA_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioPostoMedida.TO_MEDIDA_ID, HsRelatorioPostoMedida.TO_MEDIDA_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioPostoMedida.IS_PLANO_ACTUACAO, HsRelatorioPostoMedida.IS_PLANO_ACTUACAO_INDEX ); + FIELD_INDEXES.put( HsRelatorioPostoMedida.IS_PLANO_ACTUACAO_FULL, HsRelatorioPostoMedida.IS_PLANO_ACTUACAO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyposto_idTohs_relatorio_posto = + new com.evolute.entity.ForeignKey( HsRelatorioPostoMedida.class, HsRelatorioPostoMedida.POSTO_ID, siprp.data.outer.HsRelatorioPostoData.class, siprp.data.outer.HsRelatorioPostoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeymedida_idTohs_relatorio_medida = + new com.evolute.entity.ForeignKey( HsRelatorioPostoMedida.class, HsRelatorioPostoMedida.MEDIDA_ID, siprp.data.outer.HsRelatorioMedidaData.class, siprp.data.outer.HsRelatorioMedidaData.ID ); + + public static final String TABLENAME = "hs_relatorio_posto_medida"; + + + public static final String CLASS_IDENTIFIER = "hs_relatorio_posto_medida1277401737170"; + + public static final int _INVALID__INDEX = -1; + public static final String POSTO_ID = "posto_id"; + public static final String POSTO_ID_FULL = "hs_relatorio_posto_medida.posto_id"; + public static final int POSTO_ID_INDEX = 0; + public static final String TO_POSTO_ID = "to_posto_id"; + public static final int TO_POSTO_ID_INDEX = 1; + public static final String MEDIDA_ID = "medida_id"; + public static final String MEDIDA_ID_FULL = "hs_relatorio_posto_medida.medida_id"; + public static final int MEDIDA_ID_INDEX = 2; + public static final String TO_MEDIDA_ID = "to_medida_id"; + public static final int TO_MEDIDA_ID_INDEX = 3; + public static final String IS_PLANO_ACTUACAO = "is_plano_actuacao"; + public static final String IS_PLANO_ACTUACAO_FULL = "hs_relatorio_posto_medida.is_plano_actuacao"; + public static final int IS_PLANO_ACTUACAO_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + IS_PLANO_ACTUACAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + IS_PLANO_ACTUACAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + POSTO_ID, MEDIDA_ID, IS_PLANO_ACTUACAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + POSTO_ID, MEDIDA_ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + POSTO_ID, MEDIDA_ID, IS_PLANO_ACTUACAO, }; + + private Integer posto_id; + private siprp.data.outer.HsRelatorioPostoData to_posto_id; + private Integer medida_id; + private siprp.data.outer.HsRelatorioMedidaData to_medida_id; + private Boolean is_plano_actuacao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsRelatorioPostoMedida() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false }; + } + + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.outer.HsRelatorioPostoData toPosto_id() + { + try + { + prepare( TO_POSTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_posto_id; + } + + public void setToPosto_id( siprp.data.outer.HsRelatorioPostoData to_posto_id ) + { + try + { + preProcess( TO_POSTO_ID, to_posto_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_posto_id = to_posto_id; + } + + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.outer.HsRelatorioMedidaData 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( siprp.data.outer.HsRelatorioMedidaData 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 Boolean getIs_plano_actuacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IS_PLANO_ACTUACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.is_plano_actuacao; + } + + public void setIs_plano_actuacao( Boolean is_plano_actuacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( IS_PLANO_ACTUACAO, is_plano_actuacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.is_plano_actuacao = is_plano_actuacao; + LAZY_LOADED_OBJECTS.put( IS_PLANO_ACTUACAO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioPostoMedida.POSTO_ID_INDEX: + value = getPosto_id(); + break; + case HsRelatorioPostoMedida.TO_POSTO_ID_INDEX: + value = toPosto_id(); + break; + case HsRelatorioPostoMedida.MEDIDA_ID_INDEX: + value = getMedida_id(); + break; + case HsRelatorioPostoMedida.TO_MEDIDA_ID_INDEX: + value = toMedida_id(); + break; + case HsRelatorioPostoMedida.IS_PLANO_ACTUACAO_INDEX: + value = getIs_plano_actuacao(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioPostoMedida.POSTO_ID_INDEX: + value = this.posto_id; + break; + case HsRelatorioPostoMedida.TO_POSTO_ID_INDEX: + value = this.to_posto_id; + break; + case HsRelatorioPostoMedida.MEDIDA_ID_INDEX: + value = this.medida_id; + break; + case HsRelatorioPostoMedida.TO_MEDIDA_ID_INDEX: + value = this.to_medida_id; + break; + case HsRelatorioPostoMedida.IS_PLANO_ACTUACAO_INDEX: + value = this.is_plano_actuacao; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioPostoMedida.POSTO_ID_INDEX: + setPosto_id( ( Integer ) value ); + break; + case HsRelatorioPostoMedida.TO_POSTO_ID_INDEX: + setToPosto_id( ( siprp.data.outer.HsRelatorioPostoData ) value ); + break; + case HsRelatorioPostoMedida.MEDIDA_ID_INDEX: + setMedida_id( ( Integer ) value ); + break; + case HsRelatorioPostoMedida.TO_MEDIDA_ID_INDEX: + setToMedida_id( ( siprp.data.outer.HsRelatorioMedidaData ) value ); + break; + case HsRelatorioPostoMedida.IS_PLANO_ACTUACAO_INDEX: + setIs_plano_actuacao( ( Boolean ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioPostoMedida.POSTO_ID_INDEX: + this.posto_id = ( Integer ) value; + break; + case HsRelatorioPostoMedida.TO_POSTO_ID_INDEX: + this.to_posto_id = ( siprp.data.outer.HsRelatorioPostoData ) value; + break; + case HsRelatorioPostoMedida.MEDIDA_ID_INDEX: + this.medida_id = ( Integer ) value; + break; + case HsRelatorioPostoMedida.TO_MEDIDA_ID_INDEX: + this.to_medida_id = ( siprp.data.outer.HsRelatorioMedidaData ) value; + break; + case HsRelatorioPostoMedida.IS_PLANO_ACTUACAO_INDEX: + this.is_plano_actuacao = ( 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() + { + throw new RuntimeException( "getPrimaryKeyName on HsRelatorioPostoMedida is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case HsRelatorioPostoMedida.POSTO_ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioPostoMedida.TO_POSTO_ID_INDEX: + theClass = siprp.data.outer.HsRelatorioPostoData.class; + break; + case HsRelatorioPostoMedida.MEDIDA_ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioPostoMedida.TO_MEDIDA_ID_INDEX: + theClass = siprp.data.outer.HsRelatorioMedidaData.class; + break; + case HsRelatorioPostoMedida.IS_PLANO_ACTUACAO_INDEX: + theClass = Boolean.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsRelatorioPostoMedida._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, HsRelatorioPostoMedida.PK_FIELD_NAMES ); + primaryKey.set( 0, getPosto_id() ); + primaryKey.set( 1, getMedida_id() ); + } + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioPostoRisco.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioPostoRisco.java new file mode 100644 index 00000000..3db7a8a6 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioPostoRisco.java @@ -0,0 +1,630 @@ +/* +* HsRelatorioPostoRisco.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsRelatorioPostoRisco extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( HsRelatorioPostoRisco.CLASS_IDENTIFIER, HsRelatorioPostoRisco.POSTO_ID, HsRelatorioPostoRisco.TO_POSTO_ID ); + FIELD_INDEXES.put( HsRelatorioPostoRisco.POSTO_ID, HsRelatorioPostoRisco.POSTO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioPostoRisco.POSTO_ID_FULL, HsRelatorioPostoRisco.POSTO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioPostoRisco.TO_POSTO_ID, HsRelatorioPostoRisco.TO_POSTO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsRelatorioPostoRisco.CLASS_IDENTIFIER, HsRelatorioPostoRisco.RISCO_ID, HsRelatorioPostoRisco.TO_RISCO_ID ); + FIELD_INDEXES.put( HsRelatorioPostoRisco.RISCO_ID, HsRelatorioPostoRisco.RISCO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioPostoRisco.RISCO_ID_FULL, HsRelatorioPostoRisco.RISCO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioPostoRisco.TO_RISCO_ID, HsRelatorioPostoRisco.TO_RISCO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioPostoRisco.PROBABILIDADE, HsRelatorioPostoRisco.PROBABILIDADE_INDEX ); + FIELD_INDEXES.put( HsRelatorioPostoRisco.PROBABILIDADE_FULL, HsRelatorioPostoRisco.PROBABILIDADE_INDEX ); + FIELD_INDEXES.put( HsRelatorioPostoRisco.SEVERIDADE, HsRelatorioPostoRisco.SEVERIDADE_INDEX ); + FIELD_INDEXES.put( HsRelatorioPostoRisco.SEVERIDADE_FULL, HsRelatorioPostoRisco.SEVERIDADE_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsRelatorioPostoRisco.CLASS_IDENTIFIER, HsRelatorioPostoRisco.VALOR_QUALITATIVO_ID, HsRelatorioPostoRisco.TO_VALOR_QUALITATIVO_ID ); + FIELD_INDEXES.put( HsRelatorioPostoRisco.VALOR_QUALITATIVO_ID, HsRelatorioPostoRisco.VALOR_QUALITATIVO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioPostoRisco.VALOR_QUALITATIVO_ID_FULL, HsRelatorioPostoRisco.VALOR_QUALITATIVO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioPostoRisco.TO_VALOR_QUALITATIVO_ID, HsRelatorioPostoRisco.TO_VALOR_QUALITATIVO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioPostoRisco.ORDEM, HsRelatorioPostoRisco.ORDEM_INDEX ); + FIELD_INDEXES.put( HsRelatorioPostoRisco.ORDEM_FULL, HsRelatorioPostoRisco.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 ForeignKeyposto_idTohs_relatorio_posto = + new com.evolute.entity.ForeignKey( HsRelatorioPostoRisco.class, HsRelatorioPostoRisco.POSTO_ID, siprp.data.outer.HsRelatorioPostoData.class, siprp.data.outer.HsRelatorioPostoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyrisco_idTohs_relatorio_risco = + new com.evolute.entity.ForeignKey( HsRelatorioPostoRisco.class, HsRelatorioPostoRisco.RISCO_ID, siprp.data.outer.HsRelatorioRiscoData.class, siprp.data.outer.HsRelatorioRiscoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyvalor_qualitativo_idTohs_relatorio_risco_valor_qualitativo = + new com.evolute.entity.ForeignKey( HsRelatorioPostoRisco.class, HsRelatorioPostoRisco.VALOR_QUALITATIVO_ID, siprp.data.outer.HsRelatorioRiscoValorQualitativoData.class, siprp.data.outer.HsRelatorioRiscoValorQualitativoData.ID ); + + public static final String TABLENAME = "hs_relatorio_posto_risco"; + + + public static final String CLASS_IDENTIFIER = "hs_relatorio_posto_risco1277401737171"; + + public static final int _INVALID__INDEX = -1; + public static final String POSTO_ID = "posto_id"; + public static final String POSTO_ID_FULL = "hs_relatorio_posto_risco.posto_id"; + public static final int POSTO_ID_INDEX = 0; + public static final String TO_POSTO_ID = "to_posto_id"; + public static final int TO_POSTO_ID_INDEX = 1; + public static final String RISCO_ID = "risco_id"; + public static final String RISCO_ID_FULL = "hs_relatorio_posto_risco.risco_id"; + public static final int RISCO_ID_INDEX = 2; + public static final String TO_RISCO_ID = "to_risco_id"; + public static final int TO_RISCO_ID_INDEX = 3; + public static final String PROBABILIDADE = "probabilidade"; + public static final String PROBABILIDADE_FULL = "hs_relatorio_posto_risco.probabilidade"; + public static final int PROBABILIDADE_INDEX = 4; + public static final String SEVERIDADE = "severidade"; + public static final String SEVERIDADE_FULL = "hs_relatorio_posto_risco.severidade"; + public static final int SEVERIDADE_INDEX = 5; + public static final String VALOR_QUALITATIVO_ID = "valor_qualitativo_id"; + public static final String VALOR_QUALITATIVO_ID_FULL = "hs_relatorio_posto_risco.valor_qualitativo_id"; + public static final int VALOR_QUALITATIVO_ID_INDEX = 6; + public static final String TO_VALOR_QUALITATIVO_ID = "to_valor_qualitativo_id"; + public static final int TO_VALOR_QUALITATIVO_ID_INDEX = 7; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "hs_relatorio_posto_risco.ordem"; + public static final int ORDEM_INDEX = 8; + + public static final String FIELD_NAMES[] = new String[]{ + PROBABILIDADE, SEVERIDADE, VALOR_QUALITATIVO_ID, TO_VALOR_QUALITATIVO_ID, + ORDEM, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + PROBABILIDADE, TABLENAME + "." + SEVERIDADE, TABLENAME + "." + VALOR_QUALITATIVO_ID, TABLENAME + "." + TO_VALOR_QUALITATIVO_ID, + TABLENAME + "." + ORDEM, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + POSTO_ID, RISCO_ID, PROBABILIDADE, SEVERIDADE, VALOR_QUALITATIVO_ID, ORDEM, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + POSTO_ID, RISCO_ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + POSTO_ID, RISCO_ID, PROBABILIDADE, SEVERIDADE, VALOR_QUALITATIVO_ID, ORDEM, }; + + private Integer posto_id; + private siprp.data.outer.HsRelatorioPostoData to_posto_id; + private Integer risco_id; + private siprp.data.outer.HsRelatorioRiscoData to_risco_id; + private Integer probabilidade; + private Integer severidade; + private Integer valor_qualitativo_id; + private siprp.data.outer.HsRelatorioRiscoValorQualitativoData to_valor_qualitativo_id; + private Integer ordem; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsRelatorioPostoRisco() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false, false, false, false, false, false }; + } + + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.outer.HsRelatorioPostoData toPosto_id() + { + try + { + prepare( TO_POSTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_posto_id; + } + + public void setToPosto_id( siprp.data.outer.HsRelatorioPostoData to_posto_id ) + { + try + { + preProcess( TO_POSTO_ID, to_posto_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_posto_id = to_posto_id; + } + + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.outer.HsRelatorioRiscoData 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( siprp.data.outer.HsRelatorioRiscoData 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 getProbabilidade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PROBABILIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.probabilidade; + } + + public void setProbabilidade( Integer probabilidade ) + { + try + { + setLockedForRefresh( true ); + preProcess( PROBABILIDADE, probabilidade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.probabilidade = probabilidade; + LAZY_LOADED_OBJECTS.put( PROBABILIDADE, Boolean.TRUE ); + } + + public Integer getSeveridade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( SEVERIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.severidade; + } + + public void setSeveridade( Integer severidade ) + { + try + { + setLockedForRefresh( true ); + preProcess( SEVERIDADE, severidade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.severidade = severidade; + LAZY_LOADED_OBJECTS.put( SEVERIDADE, Boolean.TRUE ); + } + + public Integer getValor_qualitativo_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( VALOR_QUALITATIVO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.valor_qualitativo_id; + } + + public void setValor_qualitativo_id( Integer valor_qualitativo_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( VALOR_QUALITATIVO_ID, valor_qualitativo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.valor_qualitativo_id = valor_qualitativo_id; + LAZY_LOADED_OBJECTS.put( VALOR_QUALITATIVO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.HsRelatorioRiscoValorQualitativoData toValor_qualitativo_id() + { + try + { + prepare( TO_VALOR_QUALITATIVO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_valor_qualitativo_id; + } + + public void setToValor_qualitativo_id( siprp.data.outer.HsRelatorioRiscoValorQualitativoData to_valor_qualitativo_id ) + { + try + { + preProcess( TO_VALOR_QUALITATIVO_ID, to_valor_qualitativo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_valor_qualitativo_id = to_valor_qualitativo_id; + } + + 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 + { + setLockedForRefresh( true ); + 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 HsRelatorioPostoRisco.POSTO_ID_INDEX: + value = getPosto_id(); + break; + case HsRelatorioPostoRisco.TO_POSTO_ID_INDEX: + value = toPosto_id(); + break; + case HsRelatorioPostoRisco.RISCO_ID_INDEX: + value = getRisco_id(); + break; + case HsRelatorioPostoRisco.TO_RISCO_ID_INDEX: + value = toRisco_id(); + break; + case HsRelatorioPostoRisco.PROBABILIDADE_INDEX: + value = getProbabilidade(); + break; + case HsRelatorioPostoRisco.SEVERIDADE_INDEX: + value = getSeveridade(); + break; + case HsRelatorioPostoRisco.VALOR_QUALITATIVO_ID_INDEX: + value = getValor_qualitativo_id(); + break; + case HsRelatorioPostoRisco.TO_VALOR_QUALITATIVO_ID_INDEX: + value = toValor_qualitativo_id(); + break; + case HsRelatorioPostoRisco.ORDEM_INDEX: + value = getOrdem(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioPostoRisco.POSTO_ID_INDEX: + value = this.posto_id; + break; + case HsRelatorioPostoRisco.TO_POSTO_ID_INDEX: + value = this.to_posto_id; + break; + case HsRelatorioPostoRisco.RISCO_ID_INDEX: + value = this.risco_id; + break; + case HsRelatorioPostoRisco.TO_RISCO_ID_INDEX: + value = this.to_risco_id; + break; + case HsRelatorioPostoRisco.PROBABILIDADE_INDEX: + value = this.probabilidade; + break; + case HsRelatorioPostoRisco.SEVERIDADE_INDEX: + value = this.severidade; + break; + case HsRelatorioPostoRisco.VALOR_QUALITATIVO_ID_INDEX: + value = this.valor_qualitativo_id; + break; + case HsRelatorioPostoRisco.TO_VALOR_QUALITATIVO_ID_INDEX: + value = this.to_valor_qualitativo_id; + break; + case HsRelatorioPostoRisco.ORDEM_INDEX: + value = this.ordem; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioPostoRisco.POSTO_ID_INDEX: + setPosto_id( ( Integer ) value ); + break; + case HsRelatorioPostoRisco.TO_POSTO_ID_INDEX: + setToPosto_id( ( siprp.data.outer.HsRelatorioPostoData ) value ); + break; + case HsRelatorioPostoRisco.RISCO_ID_INDEX: + setRisco_id( ( Integer ) value ); + break; + case HsRelatorioPostoRisco.TO_RISCO_ID_INDEX: + setToRisco_id( ( siprp.data.outer.HsRelatorioRiscoData ) value ); + break; + case HsRelatorioPostoRisco.PROBABILIDADE_INDEX: + setProbabilidade( ( Integer ) value ); + break; + case HsRelatorioPostoRisco.SEVERIDADE_INDEX: + setSeveridade( ( Integer ) value ); + break; + case HsRelatorioPostoRisco.VALOR_QUALITATIVO_ID_INDEX: + setValor_qualitativo_id( ( Integer ) value ); + break; + case HsRelatorioPostoRisco.TO_VALOR_QUALITATIVO_ID_INDEX: + setToValor_qualitativo_id( ( siprp.data.outer.HsRelatorioRiscoValorQualitativoData ) value ); + break; + case HsRelatorioPostoRisco.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioPostoRisco.POSTO_ID_INDEX: + this.posto_id = ( Integer ) value; + break; + case HsRelatorioPostoRisco.TO_POSTO_ID_INDEX: + this.to_posto_id = ( siprp.data.outer.HsRelatorioPostoData ) value; + break; + case HsRelatorioPostoRisco.RISCO_ID_INDEX: + this.risco_id = ( Integer ) value; + break; + case HsRelatorioPostoRisco.TO_RISCO_ID_INDEX: + this.to_risco_id = ( siprp.data.outer.HsRelatorioRiscoData ) value; + break; + case HsRelatorioPostoRisco.PROBABILIDADE_INDEX: + this.probabilidade = ( Integer ) value; + break; + case HsRelatorioPostoRisco.SEVERIDADE_INDEX: + this.severidade = ( Integer ) value; + break; + case HsRelatorioPostoRisco.VALOR_QUALITATIVO_ID_INDEX: + this.valor_qualitativo_id = ( Integer ) value; + break; + case HsRelatorioPostoRisco.TO_VALOR_QUALITATIVO_ID_INDEX: + this.to_valor_qualitativo_id = ( siprp.data.outer.HsRelatorioRiscoValorQualitativoData ) value; + break; + case HsRelatorioPostoRisco.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() + { + throw new RuntimeException( "getPrimaryKeyName on HsRelatorioPostoRisco is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case HsRelatorioPostoRisco.POSTO_ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioPostoRisco.TO_POSTO_ID_INDEX: + theClass = siprp.data.outer.HsRelatorioPostoData.class; + break; + case HsRelatorioPostoRisco.RISCO_ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioPostoRisco.TO_RISCO_ID_INDEX: + theClass = siprp.data.outer.HsRelatorioRiscoData.class; + break; + case HsRelatorioPostoRisco.PROBABILIDADE_INDEX: + theClass = Integer.class; + break; + case HsRelatorioPostoRisco.SEVERIDADE_INDEX: + theClass = Integer.class; + break; + case HsRelatorioPostoRisco.VALOR_QUALITATIVO_ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioPostoRisco.TO_VALOR_QUALITATIVO_ID_INDEX: + theClass = siprp.data.outer.HsRelatorioRiscoValorQualitativoData.class; + break; + case HsRelatorioPostoRisco.ORDEM_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsRelatorioPostoRisco._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, HsRelatorioPostoRisco.PK_FIELD_NAMES ); + primaryKey.set( 0, getPosto_id() ); + primaryKey.set( 1, getRisco_id() ); + } + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioRisco.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioRisco.java new file mode 100644 index 00000000..5bebcbde --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioRisco.java @@ -0,0 +1,508 @@ +/* +* HsRelatorioRisco.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsRelatorioRisco extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( HsRelatorioRisco.ID, HsRelatorioRisco.ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioRisco.ID_FULL, HsRelatorioRisco.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsRelatorioRisco.CLASS_IDENTIFIER, HsRelatorioRisco.RELATORIO_ID, HsRelatorioRisco.TO_RELATORIO_ID ); + FIELD_INDEXES.put( HsRelatorioRisco.RELATORIO_ID, HsRelatorioRisco.RELATORIO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioRisco.RELATORIO_ID_FULL, HsRelatorioRisco.RELATORIO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioRisco.TO_RELATORIO_ID, HsRelatorioRisco.TO_RELATORIO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioRisco.DESCRIPTION, HsRelatorioRisco.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( HsRelatorioRisco.DESCRIPTION_FULL, HsRelatorioRisco.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( HsRelatorioRisco.DELETED_DATE, HsRelatorioRisco.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( HsRelatorioRisco.DELETED_DATE_FULL, HsRelatorioRisco.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( HsRelatorioRisco.HS_RISCO_ID, HsRelatorioRisco.HS_RISCO_ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioRisco.HS_RISCO_ID_FULL, HsRelatorioRisco.HS_RISCO_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 ForeignKeyrelatorio_idTohs_relatorio = + new com.evolute.entity.ForeignKey( HsRelatorioRisco.class, HsRelatorioRisco.RELATORIO_ID, siprp.data.outer.HsRelatorioData.class, siprp.data.outer.HsRelatorioData.ID ); + + public static final String TABLENAME = "hs_relatorio_risco"; + + + public static final String CLASS_IDENTIFIER = "hs_relatorio_risco1277401737171"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "hs_relatorio_risco.id"; + public static final int ID_INDEX = 0; + public static final String RELATORIO_ID = "relatorio_id"; + public static final String RELATORIO_ID_FULL = "hs_relatorio_risco.relatorio_id"; + public static final int RELATORIO_ID_INDEX = 1; + public static final String TO_RELATORIO_ID = "to_relatorio_id"; + public static final int TO_RELATORIO_ID_INDEX = 2; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_relatorio_risco.description"; + public static final int DESCRIPTION_INDEX = 3; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_relatorio_risco.deleted_date"; + public static final int DELETED_DATE_INDEX = 4; + public static final String HS_RISCO_ID = "hs_risco_id"; + public static final String HS_RISCO_ID_FULL = "hs_relatorio_risco.hs_risco_id"; + public static final int HS_RISCO_ID_INDEX = 5; + + public static final String FIELD_NAMES[] = new String[]{ + RELATORIO_ID, TO_RELATORIO_ID, DESCRIPTION, DELETED_DATE, HS_RISCO_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + RELATORIO_ID, TABLENAME + "." + TO_RELATORIO_ID, TABLENAME + "." + DESCRIPTION, TABLENAME + "." + DELETED_DATE, TABLENAME + "." + HS_RISCO_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, RELATORIO_ID, DESCRIPTION, DELETED_DATE, HS_RISCO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, RELATORIO_ID, DESCRIPTION, DELETED_DATE, HS_RISCO_ID, }; + + private Integer id; + private Integer relatorio_id; + private siprp.data.outer.HsRelatorioData to_relatorio_id; + private String description; + private java.sql.Timestamp deleted_date; + private Integer hs_risco_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsRelatorioRisco() + { + 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 + { + setLockedForRefresh( true ); + 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.ListfromHsRelatorioMedida_risco_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsRelatorioMedidaData.class , getPrimaryKey().getMap().get("id"), "risco_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsRelatorioPostoRisco_risco_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsRelatorioPostoRiscoData.class , getPrimaryKey().getMap().get("id"), "risco_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public Integer getRelatorio_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( RELATORIO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.relatorio_id; + } + + public void setRelatorio_id( Integer relatorio_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( RELATORIO_ID, relatorio_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.relatorio_id = relatorio_id; + LAZY_LOADED_OBJECTS.put( RELATORIO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.HsRelatorioData toRelatorio_id() + { + try + { + prepare( TO_RELATORIO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_relatorio_id; + } + + public void setToRelatorio_id( siprp.data.outer.HsRelatorioData to_relatorio_id ) + { + try + { + preProcess( TO_RELATORIO_ID, to_relatorio_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_relatorio_id = to_relatorio_id; + } + + 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 + { + setLockedForRefresh( true ); + 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 java.sql.Timestamp getDeleted_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_date; + } + + public void setDeleted_date( java.sql.Timestamp deleted_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_DATE, deleted_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_date = deleted_date; + LAZY_LOADED_OBJECTS.put( DELETED_DATE, Boolean.TRUE ); + } + + public Integer getHs_risco_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( HS_RISCO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.hs_risco_id; + } + + public void setHs_risco_id( Integer hs_risco_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( HS_RISCO_ID, hs_risco_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.hs_risco_id = hs_risco_id; + LAZY_LOADED_OBJECTS.put( HS_RISCO_ID, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioRisco.ID_INDEX: + value = getId(); + break; + case HsRelatorioRisco.RELATORIO_ID_INDEX: + value = getRelatorio_id(); + break; + case HsRelatorioRisco.TO_RELATORIO_ID_INDEX: + value = toRelatorio_id(); + break; + case HsRelatorioRisco.DESCRIPTION_INDEX: + value = getDescription(); + break; + case HsRelatorioRisco.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + case HsRelatorioRisco.HS_RISCO_ID_INDEX: + value = getHs_risco_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioRisco.ID_INDEX: + value = this.id; + break; + case HsRelatorioRisco.RELATORIO_ID_INDEX: + value = this.relatorio_id; + break; + case HsRelatorioRisco.TO_RELATORIO_ID_INDEX: + value = this.to_relatorio_id; + break; + case HsRelatorioRisco.DESCRIPTION_INDEX: + value = this.description; + break; + case HsRelatorioRisco.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + case HsRelatorioRisco.HS_RISCO_ID_INDEX: + value = this.hs_risco_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioRisco.ID_INDEX: + setId( ( Integer ) value ); + break; + case HsRelatorioRisco.RELATORIO_ID_INDEX: + setRelatorio_id( ( Integer ) value ); + break; + case HsRelatorioRisco.TO_RELATORIO_ID_INDEX: + setToRelatorio_id( ( siprp.data.outer.HsRelatorioData ) value ); + break; + case HsRelatorioRisco.DESCRIPTION_INDEX: + setDescription( ( String ) value ); + break; + case HsRelatorioRisco.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + case HsRelatorioRisco.HS_RISCO_ID_INDEX: + setHs_risco_id( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioRisco.ID_INDEX: + this.id = ( Integer ) value; + break; + case HsRelatorioRisco.RELATORIO_ID_INDEX: + this.relatorio_id = ( Integer ) value; + break; + case HsRelatorioRisco.TO_RELATORIO_ID_INDEX: + this.to_relatorio_id = ( siprp.data.outer.HsRelatorioData ) value; + break; + case HsRelatorioRisco.DESCRIPTION_INDEX: + this.description = ( String ) value; + break; + case HsRelatorioRisco.DELETED_DATE_INDEX: + this.deleted_date = ( java.sql.Timestamp ) value; + break; + case HsRelatorioRisco.HS_RISCO_ID_INDEX: + this.hs_risco_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 HsRelatorioRisco.ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioRisco.RELATORIO_ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioRisco.TO_RELATORIO_ID_INDEX: + theClass = siprp.data.outer.HsRelatorioData.class; + break; + case HsRelatorioRisco.DESCRIPTION_INDEX: + theClass = String.class; + break; + case HsRelatorioRisco.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + case HsRelatorioRisco.HS_RISCO_ID_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsRelatorioRisco._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, HsRelatorioRisco.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioRiscoValorQualitativo.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioRiscoValorQualitativo.java new file mode 100644 index 00000000..28babdd7 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsRelatorioRiscoValorQualitativo.java @@ -0,0 +1,308 @@ +/* +* HsRelatorioRiscoValorQualitativo.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsRelatorioRiscoValorQualitativo extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( HsRelatorioRiscoValorQualitativo.ID, HsRelatorioRiscoValorQualitativo.ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioRiscoValorQualitativo.ID_FULL, HsRelatorioRiscoValorQualitativo.ID_INDEX ); + FIELD_INDEXES.put( HsRelatorioRiscoValorQualitativo.DESCRIPTION, HsRelatorioRiscoValorQualitativo.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( HsRelatorioRiscoValorQualitativo.DESCRIPTION_FULL, HsRelatorioRiscoValorQualitativo.DESCRIPTION_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "hs_relatorio_risco_valor_qualitativo"; + + + public static final String CLASS_IDENTIFIER = "hs_relatorio_risco_valor_qualitativo1277401737172"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "hs_relatorio_risco_valor_qualitativo.id"; + public static final int ID_INDEX = 0; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_relatorio_risco_valor_qualitativo.description"; + public static final int DESCRIPTION_INDEX = 1; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRIPTION, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRIPTION, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRIPTION, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DESCRIPTION, }; + + private Integer id; + private String description; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsRelatorioRiscoValorQualitativo() + { + super(); + dirtyProperties = new boolean[]{ 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 + { + setLockedForRefresh( true ); + 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.ListfromHsPostoRisco_valor_qualitativo() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsPostoRiscoData.class , getPrimaryKey().getMap().get("id"), "valor_qualitativo" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsRelatorioPostoRisco_valor_qualitativo_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsRelatorioPostoRiscoData.class , getPrimaryKey().getMap().get("id"), "valor_qualitativo_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + 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 + { + setLockedForRefresh( true ); + 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 HsRelatorioRiscoValorQualitativo.ID_INDEX: + value = getId(); + break; + case HsRelatorioRiscoValorQualitativo.DESCRIPTION_INDEX: + value = getDescription(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioRiscoValorQualitativo.ID_INDEX: + value = this.id; + break; + case HsRelatorioRiscoValorQualitativo.DESCRIPTION_INDEX: + value = this.description; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioRiscoValorQualitativo.ID_INDEX: + setId( ( Integer ) value ); + break; + case HsRelatorioRiscoValorQualitativo.DESCRIPTION_INDEX: + setDescription( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRelatorioRiscoValorQualitativo.ID_INDEX: + this.id = ( Integer ) value; + break; + case HsRelatorioRiscoValorQualitativo.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 HsRelatorioRiscoValorQualitativo.ID_INDEX: + theClass = Integer.class; + break; + case HsRelatorioRiscoValorQualitativo.DESCRIPTION_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsRelatorioRiscoValorQualitativo._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, HsRelatorioRiscoValorQualitativo.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsRisco.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsRisco.java new file mode 100644 index 00000000..2e31620e --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsRisco.java @@ -0,0 +1,472 @@ +/* +* HsRisco.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsRisco extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( HsRisco.ID, HsRisco.ID_INDEX ); + FIELD_INDEXES.put( HsRisco.ID_FULL, HsRisco.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsRisco.CLASS_IDENTIFIER, HsRisco.TEMA_ID, HsRisco.TO_TEMA_ID ); + FIELD_INDEXES.put( HsRisco.TEMA_ID, HsRisco.TEMA_ID_INDEX ); + FIELD_INDEXES.put( HsRisco.TEMA_ID_FULL, HsRisco.TEMA_ID_INDEX ); + FIELD_INDEXES.put( HsRisco.TO_TEMA_ID, HsRisco.TO_TEMA_ID_INDEX ); + FIELD_INDEXES.put( HsRisco.DESCRIPTION, HsRisco.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( HsRisco.DESCRIPTION_FULL, HsRisco.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( HsRisco.DELETED_DATE, HsRisco.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( HsRisco.DELETED_DATE_FULL, HsRisco.DELETED_DATE_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeytema_idTohs_risco_tema = + new com.evolute.entity.ForeignKey( HsRisco.class, HsRisco.TEMA_ID, siprp.data.outer.HsRiscoTemaData.class, siprp.data.outer.HsRiscoTemaData.ID ); + + public static final String TABLENAME = "hs_risco"; + + + public static final String CLASS_IDENTIFIER = "hs_risco1277401737172"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "hs_risco.id"; + public static final int ID_INDEX = 0; + public static final String TEMA_ID = "tema_id"; + public static final String TEMA_ID_FULL = "hs_risco.tema_id"; + public static final int TEMA_ID_INDEX = 1; + public static final String TO_TEMA_ID = "to_tema_id"; + public static final int TO_TEMA_ID_INDEX = 2; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_risco.description"; + public static final int DESCRIPTION_INDEX = 3; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_risco.deleted_date"; + public static final int DELETED_DATE_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + TEMA_ID, TO_TEMA_ID, DESCRIPTION, DELETED_DATE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TEMA_ID, TABLENAME + "." + TO_TEMA_ID, TABLENAME + "." + DESCRIPTION, TABLENAME + "." + DELETED_DATE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TEMA_ID, DESCRIPTION, DELETED_DATE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, TEMA_ID, DESCRIPTION, DELETED_DATE, }; + + private Integer id; + private Integer tema_id; + private siprp.data.outer.HsRiscoTemaData to_tema_id; + private String description; + private java.sql.Timestamp deleted_date; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsRisco() + { + 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 + { + setLockedForRefresh( true ); + 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.ListfromHsPostoRisco_risco_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsPostoRiscoData.class , getPrimaryKey().getMap().get("id"), "risco_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsRiscoEmpresa_risco_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsRiscoEmpresaData.class , getPrimaryKey().getMap().get("id"), "risco_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromHsRiscoMedida_risco_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsRiscoMedidaData.class , getPrimaryKey().getMap().get("id"), "risco_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public Integer getTema_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TEMA_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tema_id; + } + + public void setTema_id( Integer tema_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( TEMA_ID, tema_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tema_id = tema_id; + LAZY_LOADED_OBJECTS.put( TEMA_ID, Boolean.TRUE ); + } + + public siprp.data.outer.HsRiscoTemaData toTema_id() + { + try + { + prepare( TO_TEMA_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_tema_id; + } + + public void setToTema_id( siprp.data.outer.HsRiscoTemaData to_tema_id ) + { + try + { + preProcess( TO_TEMA_ID, to_tema_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_tema_id = to_tema_id; + } + + 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 + { + setLockedForRefresh( true ); + 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 java.sql.Timestamp getDeleted_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_date; + } + + public void setDeleted_date( java.sql.Timestamp deleted_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_DATE, deleted_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_date = deleted_date; + LAZY_LOADED_OBJECTS.put( DELETED_DATE, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRisco.ID_INDEX: + value = getId(); + break; + case HsRisco.TEMA_ID_INDEX: + value = getTema_id(); + break; + case HsRisco.TO_TEMA_ID_INDEX: + value = toTema_id(); + break; + case HsRisco.DESCRIPTION_INDEX: + value = getDescription(); + break; + case HsRisco.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRisco.ID_INDEX: + value = this.id; + break; + case HsRisco.TEMA_ID_INDEX: + value = this.tema_id; + break; + case HsRisco.TO_TEMA_ID_INDEX: + value = this.to_tema_id; + break; + case HsRisco.DESCRIPTION_INDEX: + value = this.description; + break; + case HsRisco.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRisco.ID_INDEX: + setId( ( Integer ) value ); + break; + case HsRisco.TEMA_ID_INDEX: + setTema_id( ( Integer ) value ); + break; + case HsRisco.TO_TEMA_ID_INDEX: + setToTema_id( ( siprp.data.outer.HsRiscoTemaData ) value ); + break; + case HsRisco.DESCRIPTION_INDEX: + setDescription( ( String ) value ); + break; + case HsRisco.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRisco.ID_INDEX: + this.id = ( Integer ) value; + break; + case HsRisco.TEMA_ID_INDEX: + this.tema_id = ( Integer ) value; + break; + case HsRisco.TO_TEMA_ID_INDEX: + this.to_tema_id = ( siprp.data.outer.HsRiscoTemaData ) value; + break; + case HsRisco.DESCRIPTION_INDEX: + this.description = ( String ) value; + break; + case HsRisco.DELETED_DATE_INDEX: + this.deleted_date = ( 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 HsRisco.ID_INDEX: + theClass = Integer.class; + break; + case HsRisco.TEMA_ID_INDEX: + theClass = Integer.class; + break; + case HsRisco.TO_TEMA_ID_INDEX: + theClass = siprp.data.outer.HsRiscoTemaData.class; + break; + case HsRisco.DESCRIPTION_INDEX: + theClass = String.class; + break; + case HsRisco.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsRisco._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, HsRisco.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsRiscoEmpresa.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsRiscoEmpresa.java new file mode 100644 index 00000000..417ea71b --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsRiscoEmpresa.java @@ -0,0 +1,379 @@ +/* +* HsRiscoEmpresa.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsRiscoEmpresa extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( HsRiscoEmpresa.CLASS_IDENTIFIER, HsRiscoEmpresa.RISCO_ID, HsRiscoEmpresa.TO_RISCO_ID ); + FIELD_INDEXES.put( HsRiscoEmpresa.RISCO_ID, HsRiscoEmpresa.RISCO_ID_INDEX ); + FIELD_INDEXES.put( HsRiscoEmpresa.RISCO_ID_FULL, HsRiscoEmpresa.RISCO_ID_INDEX ); + FIELD_INDEXES.put( HsRiscoEmpresa.TO_RISCO_ID, HsRiscoEmpresa.TO_RISCO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsRiscoEmpresa.CLASS_IDENTIFIER, HsRiscoEmpresa.EMPRESA_ID, HsRiscoEmpresa.TO_EMPRESA_ID ); + FIELD_INDEXES.put( HsRiscoEmpresa.EMPRESA_ID, HsRiscoEmpresa.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( HsRiscoEmpresa.EMPRESA_ID_FULL, HsRiscoEmpresa.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( HsRiscoEmpresa.TO_EMPRESA_ID, HsRiscoEmpresa.TO_EMPRESA_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_idTohs_risco = + new com.evolute.entity.ForeignKey( HsRiscoEmpresa.class, HsRiscoEmpresa.RISCO_ID, siprp.data.outer.HsRiscoData.class, siprp.data.outer.HsRiscoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( HsRiscoEmpresa.class, HsRiscoEmpresa.EMPRESA_ID, siprp.data.outer.EmpresasData.class, siprp.data.outer.EmpresasData.ID ); + + public static final String TABLENAME = "hs_risco_empresa"; + + + public static final String CLASS_IDENTIFIER = "hs_risco_empresa1277401737174"; + + public static final int _INVALID__INDEX = -1; + public static final String RISCO_ID = "risco_id"; + public static final String RISCO_ID_FULL = "hs_risco_empresa.risco_id"; + public static final int RISCO_ID_INDEX = 0; + public static final String TO_RISCO_ID = "to_risco_id"; + public static final int TO_RISCO_ID_INDEX = 1; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "hs_risco_empresa.empresa_id"; + public static final int EMPRESA_ID_INDEX = 2; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 3; + + 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[]{ + RISCO_ID, EMPRESA_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + RISCO_ID, EMPRESA_ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + RISCO_ID, EMPRESA_ID, }; + + private Integer risco_id; + private siprp.data.outer.HsRiscoData to_risco_id; + private Integer empresa_id; + private siprp.data.outer.EmpresasData to_empresa_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsRiscoEmpresa() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false }; + } + + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.outer.HsRiscoData 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( siprp.data.outer.HsRiscoData 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 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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRiscoEmpresa.RISCO_ID_INDEX: + value = getRisco_id(); + break; + case HsRiscoEmpresa.TO_RISCO_ID_INDEX: + value = toRisco_id(); + break; + case HsRiscoEmpresa.EMPRESA_ID_INDEX: + value = getEmpresa_id(); + break; + case HsRiscoEmpresa.TO_EMPRESA_ID_INDEX: + value = toEmpresa_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRiscoEmpresa.RISCO_ID_INDEX: + value = this.risco_id; + break; + case HsRiscoEmpresa.TO_RISCO_ID_INDEX: + value = this.to_risco_id; + break; + case HsRiscoEmpresa.EMPRESA_ID_INDEX: + value = this.empresa_id; + break; + case HsRiscoEmpresa.TO_EMPRESA_ID_INDEX: + value = this.to_empresa_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRiscoEmpresa.RISCO_ID_INDEX: + setRisco_id( ( Integer ) value ); + break; + case HsRiscoEmpresa.TO_RISCO_ID_INDEX: + setToRisco_id( ( siprp.data.outer.HsRiscoData ) value ); + break; + case HsRiscoEmpresa.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case HsRiscoEmpresa.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( siprp.data.outer.EmpresasData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRiscoEmpresa.RISCO_ID_INDEX: + this.risco_id = ( Integer ) value; + break; + case HsRiscoEmpresa.TO_RISCO_ID_INDEX: + this.to_risco_id = ( siprp.data.outer.HsRiscoData ) value; + break; + case HsRiscoEmpresa.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case HsRiscoEmpresa.TO_EMPRESA_ID_INDEX: + this.to_empresa_id = ( siprp.data.outer.EmpresasData ) 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() + { + throw new RuntimeException( "getPrimaryKeyName on HsRiscoEmpresa is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case HsRiscoEmpresa.RISCO_ID_INDEX: + theClass = Integer.class; + break; + case HsRiscoEmpresa.TO_RISCO_ID_INDEX: + theClass = siprp.data.outer.HsRiscoData.class; + break; + case HsRiscoEmpresa.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case HsRiscoEmpresa.TO_EMPRESA_ID_INDEX: + theClass = siprp.data.outer.EmpresasData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsRiscoEmpresa._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, HsRiscoEmpresa.PK_FIELD_NAMES ); + primaryKey.set( 0, getRisco_id() ); + primaryKey.set( 1, getEmpresa_id() ); + } + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsRiscoMedida.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsRiscoMedida.java new file mode 100644 index 00000000..4e5fb371 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsRiscoMedida.java @@ -0,0 +1,379 @@ +/* +* HsRiscoMedida.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsRiscoMedida extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + com.evolute.entity.evo.EvoDataObject.register( HsRiscoMedida.CLASS_IDENTIFIER, HsRiscoMedida.RISCO_ID, HsRiscoMedida.TO_RISCO_ID ); + FIELD_INDEXES.put( HsRiscoMedida.RISCO_ID, HsRiscoMedida.RISCO_ID_INDEX ); + FIELD_INDEXES.put( HsRiscoMedida.RISCO_ID_FULL, HsRiscoMedida.RISCO_ID_INDEX ); + FIELD_INDEXES.put( HsRiscoMedida.TO_RISCO_ID, HsRiscoMedida.TO_RISCO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( HsRiscoMedida.CLASS_IDENTIFIER, HsRiscoMedida.MEDIDA_ID, HsRiscoMedida.TO_MEDIDA_ID ); + FIELD_INDEXES.put( HsRiscoMedida.MEDIDA_ID, HsRiscoMedida.MEDIDA_ID_INDEX ); + FIELD_INDEXES.put( HsRiscoMedida.MEDIDA_ID_FULL, HsRiscoMedida.MEDIDA_ID_INDEX ); + FIELD_INDEXES.put( HsRiscoMedida.TO_MEDIDA_ID, HsRiscoMedida.TO_MEDIDA_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_idTohs_risco = + new com.evolute.entity.ForeignKey( HsRiscoMedida.class, HsRiscoMedida.RISCO_ID, siprp.data.outer.HsRiscoData.class, siprp.data.outer.HsRiscoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeymedida_idTohs_medida = + new com.evolute.entity.ForeignKey( HsRiscoMedida.class, HsRiscoMedida.MEDIDA_ID, siprp.data.outer.HsMedidaData.class, siprp.data.outer.HsMedidaData.ID ); + + public static final String TABLENAME = "hs_risco_medida"; + + + public static final String CLASS_IDENTIFIER = "hs_risco_medida1277401737174"; + + public static final int _INVALID__INDEX = -1; + public static final String RISCO_ID = "risco_id"; + public static final String RISCO_ID_FULL = "hs_risco_medida.risco_id"; + public static final int RISCO_ID_INDEX = 0; + public static final String TO_RISCO_ID = "to_risco_id"; + public static final int TO_RISCO_ID_INDEX = 1; + public static final String MEDIDA_ID = "medida_id"; + public static final String MEDIDA_ID_FULL = "hs_risco_medida.medida_id"; + public static final int MEDIDA_ID_INDEX = 2; + public static final String TO_MEDIDA_ID = "to_medida_id"; + public static final int TO_MEDIDA_ID_INDEX = 3; + + 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[]{ + RISCO_ID, MEDIDA_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + RISCO_ID, MEDIDA_ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + RISCO_ID, MEDIDA_ID, }; + + private Integer risco_id; + private siprp.data.outer.HsRiscoData to_risco_id; + private Integer medida_id; + private siprp.data.outer.HsMedidaData to_medida_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsRiscoMedida() + { + super(); + dirtyProperties = new boolean[]{ false, false, false + , false }; + } + + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.outer.HsRiscoData 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( siprp.data.outer.HsRiscoData 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 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 + { + setLockedForRefresh( true ); + 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 siprp.data.outer.HsMedidaData 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( siprp.data.outer.HsMedidaData 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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRiscoMedida.RISCO_ID_INDEX: + value = getRisco_id(); + break; + case HsRiscoMedida.TO_RISCO_ID_INDEX: + value = toRisco_id(); + break; + case HsRiscoMedida.MEDIDA_ID_INDEX: + value = getMedida_id(); + break; + case HsRiscoMedida.TO_MEDIDA_ID_INDEX: + value = toMedida_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRiscoMedida.RISCO_ID_INDEX: + value = this.risco_id; + break; + case HsRiscoMedida.TO_RISCO_ID_INDEX: + value = this.to_risco_id; + break; + case HsRiscoMedida.MEDIDA_ID_INDEX: + value = this.medida_id; + break; + case HsRiscoMedida.TO_MEDIDA_ID_INDEX: + value = this.to_medida_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRiscoMedida.RISCO_ID_INDEX: + setRisco_id( ( Integer ) value ); + break; + case HsRiscoMedida.TO_RISCO_ID_INDEX: + setToRisco_id( ( siprp.data.outer.HsRiscoData ) value ); + break; + case HsRiscoMedida.MEDIDA_ID_INDEX: + setMedida_id( ( Integer ) value ); + break; + case HsRiscoMedida.TO_MEDIDA_ID_INDEX: + setToMedida_id( ( siprp.data.outer.HsMedidaData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRiscoMedida.RISCO_ID_INDEX: + this.risco_id = ( Integer ) value; + break; + case HsRiscoMedida.TO_RISCO_ID_INDEX: + this.to_risco_id = ( siprp.data.outer.HsRiscoData ) value; + break; + case HsRiscoMedida.MEDIDA_ID_INDEX: + this.medida_id = ( Integer ) value; + break; + case HsRiscoMedida.TO_MEDIDA_ID_INDEX: + this.to_medida_id = ( siprp.data.outer.HsMedidaData ) 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() + { + throw new RuntimeException( "getPrimaryKeyName on HsRiscoMedida is invalid" ); + } + + public Class getFieldClass( String fieldName ) + { + Integer index = getFieldIndex( fieldName ); + Class theClass = null; + switch( index ) + { + case HsRiscoMedida.RISCO_ID_INDEX: + theClass = Integer.class; + break; + case HsRiscoMedida.TO_RISCO_ID_INDEX: + theClass = siprp.data.outer.HsRiscoData.class; + break; + case HsRiscoMedida.MEDIDA_ID_INDEX: + theClass = Integer.class; + break; + case HsRiscoMedida.TO_MEDIDA_ID_INDEX: + theClass = siprp.data.outer.HsMedidaData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsRiscoMedida._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, HsRiscoMedida.PK_FIELD_NAMES ); + primaryKey.set( 0, getRisco_id() ); + primaryKey.set( 1, getMedida_id() ); + } + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/HsRiscoTema.java b/trunk/SIPRPSoft/src/siprp/data/inner/HsRiscoTema.java new file mode 100644 index 00000000..b435acac --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/HsRiscoTema.java @@ -0,0 +1,344 @@ +/* +* HsRiscoTema.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class HsRiscoTema extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( HsRiscoTema.ID, HsRiscoTema.ID_INDEX ); + FIELD_INDEXES.put( HsRiscoTema.ID_FULL, HsRiscoTema.ID_INDEX ); + FIELD_INDEXES.put( HsRiscoTema.DESCRIPTION, HsRiscoTema.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( HsRiscoTema.DESCRIPTION_FULL, HsRiscoTema.DESCRIPTION_INDEX ); + FIELD_INDEXES.put( HsRiscoTema.DELETED_DATE, HsRiscoTema.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( HsRiscoTema.DELETED_DATE_FULL, HsRiscoTema.DELETED_DATE_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "hs_risco_tema"; + + + public static final String CLASS_IDENTIFIER = "hs_risco_tema1277401737174"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "hs_risco_tema.id"; + public static final int ID_INDEX = 0; + public static final String DESCRIPTION = "description"; + public static final String DESCRIPTION_FULL = "hs_risco_tema.description"; + public static final int DESCRIPTION_INDEX = 1; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "hs_risco_tema.deleted_date"; + public static final int DELETED_DATE_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRIPTION, DELETED_DATE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRIPTION, TABLENAME + "." + DELETED_DATE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRIPTION, DELETED_DATE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DESCRIPTION, DELETED_DATE, }; + + private Integer id; + private String description; + private java.sql.Timestamp deleted_date; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public HsRiscoTema() + { + 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 + { + setLockedForRefresh( true ); + 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.ListfromHsRisco_tema_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsRiscoData.class , getPrimaryKey().getMap().get("id"), "tema_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + 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 + { + setLockedForRefresh( true ); + 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 java.sql.Timestamp getDeleted_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_date; + } + + public void setDeleted_date( java.sql.Timestamp deleted_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_DATE, deleted_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_date = deleted_date; + LAZY_LOADED_OBJECTS.put( DELETED_DATE, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRiscoTema.ID_INDEX: + value = getId(); + break; + case HsRiscoTema.DESCRIPTION_INDEX: + value = getDescription(); + break; + case HsRiscoTema.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRiscoTema.ID_INDEX: + value = this.id; + break; + case HsRiscoTema.DESCRIPTION_INDEX: + value = this.description; + break; + case HsRiscoTema.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRiscoTema.ID_INDEX: + setId( ( Integer ) value ); + break; + case HsRiscoTema.DESCRIPTION_INDEX: + setDescription( ( String ) value ); + break; + case HsRiscoTema.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case HsRiscoTema.ID_INDEX: + this.id = ( Integer ) value; + break; + case HsRiscoTema.DESCRIPTION_INDEX: + this.description = ( String ) value; + break; + case HsRiscoTema.DELETED_DATE_INDEX: + this.deleted_date = ( 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 HsRiscoTema.ID_INDEX: + theClass = Integer.class; + break; + case HsRiscoTema.DESCRIPTION_INDEX: + theClass = String.class; + break; + case HsRiscoTema.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : HsRiscoTema._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, HsRiscoTema.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/Ids.java b/trunk/SIPRPSoft/src/siprp/data/inner/Ids.java new file mode 100644 index 00000000..3b43f18b --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/Ids.java @@ -0,0 +1,229 @@ +/* +* Ids.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class Ids extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Ids.ID, Ids.ID_INDEX ); + FIELD_INDEXES.put( Ids.ID_FULL, Ids.ID_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "ids"; + + + public static final String CLASS_IDENTIFIER = "ids1277401737175"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "ids.id"; + public static final int ID_INDEX = 0; + + 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[]{ + ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, }; + + private Integer id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Ids() + { + super(); + dirtyProperties = new boolean[]{ 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 + { + setLockedForRefresh( true ); + 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 Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Ids.ID_INDEX: + value = getId(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Ids.ID_INDEX: + value = this.id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Ids.ID_INDEX: + setId( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Ids.ID_INDEX: + this.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 Ids.ID_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Ids._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, Ids.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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/Image.java b/trunk/SIPRPSoft/src/siprp/data/inner/Image.java new file mode 100644 index 00000000..6f3208a6 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/Image.java @@ -0,0 +1,365 @@ +/* +* Image.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class Image extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Image.ID, Image.ID_INDEX ); + FIELD_INDEXES.put( Image.ID_FULL, Image.ID_INDEX ); + FIELD_INDEXES.put( Image.NAME, Image.NAME_INDEX ); + FIELD_INDEXES.put( Image.NAME_FULL, Image.NAME_INDEX ); + FIELD_INDEXES.put( Image.IMAGE_DATA, Image.IMAGE_DATA_INDEX ); + FIELD_INDEXES.put( Image.IMAGE_DATA_FULL, Image.IMAGE_DATA_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "image"; + + + public static final String CLASS_IDENTIFIER = "image1277401737175"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "image.id"; + public static final int ID_INDEX = 0; + public static final String NAME = "name"; + public static final String NAME_FULL = "image.name"; + public static final int NAME_INDEX = 1; + public static final String IMAGE_DATA = "image_data"; + public static final String IMAGE_DATA_FULL = "image.image_data"; + public static final int IMAGE_DATA_INDEX = 2; + + public static final String FIELD_NAMES[] = new String[]{ + NAME, IMAGE_DATA, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NAME, TABLENAME + "." + IMAGE_DATA, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NAME, IMAGE_DATA, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NAME, }; + + private Integer id; + private String name; + private byte[] image_data; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Image() + { + 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 + { + setLockedForRefresh( true ); + 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.ListfromEmpresas_empresa_logo_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.EmpresasData.class , getPrimaryKey().getMap().get("id"), "empresa_logo_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromMarcacoesTecnicosHst_assinatura() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.MarcacoesTecnicosHstData.class , getPrimaryKey().getMap().get("id"), "assinatura" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public String getName() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NAME ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.name; + } + + public void setName( String name ) + { + try + { + setLockedForRefresh( true ); + preProcess( NAME, name ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.name = name; + LAZY_LOADED_OBJECTS.put( NAME, Boolean.TRUE ); + } + + public byte[] getImage_data() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IMAGE_DATA ); + Boolean isLazyLoaded = isPropertyLoaded( IMAGE_DATA ); + if ( ! isLazyLoaded ) + { + this.image_data = ( byte[] ) getProvider().loadFieldFromDatabase( IMAGE_DATA, this ); + LAZY_LOADED_OBJECTS.put( IMAGE_DATA, Boolean.TRUE ); + } + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.image_data; + } + + public void setImage_data( byte[] image_data ) + { + try + { + setLockedForRefresh( true ); + preProcess( IMAGE_DATA, image_data ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.image_data = image_data; + LAZY_LOADED_OBJECTS.put( IMAGE_DATA, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Image.ID_INDEX: + value = getId(); + break; + case Image.NAME_INDEX: + value = getName(); + break; + case Image.IMAGE_DATA_INDEX: + value = getImage_data(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Image.ID_INDEX: + value = this.id; + break; + case Image.NAME_INDEX: + value = this.name; + break; + case Image.IMAGE_DATA_INDEX: + value = this.image_data; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Image.ID_INDEX: + setId( ( Integer ) value ); + break; + case Image.NAME_INDEX: + setName( ( String ) value ); + break; + case Image.IMAGE_DATA_INDEX: + setImage_data( ( byte[] ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Image.ID_INDEX: + this.id = ( Integer ) value; + break; + case Image.NAME_INDEX: + this.name = ( String ) value; + break; + case Image.IMAGE_DATA_INDEX: + this.image_data = ( byte[] ) 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 Image.ID_INDEX: + theClass = Integer.class; + break; + case Image.NAME_INDEX: + theClass = String.class; + break; + case Image.IMAGE_DATA_INDEX: + theClass = byte[].class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Image._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, Image.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @Override + public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey() + { + return primaryKey; + } + + public void initLazyLoadFields() + { + LAZY_LOADED_OBJECTS.put( IMAGE_DATA, Boolean.FALSE ); + } + + public boolean isPropertyLoaded( String fieldName ) + { + if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null ) + { + return true; + } + else + { + return LAZY_LOADED_OBJECTS.get( fieldName ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/Lembretes.java b/trunk/SIPRPSoft/src/siprp/data/inner/Lembretes.java new file mode 100644 index 00000000..a04bed35 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/Lembretes.java @@ -0,0 +1,1445 @@ +/* +* Lembretes.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class Lembretes extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Lembretes.ID, Lembretes.ID_INDEX ); + FIELD_INDEXES.put( Lembretes.ID_FULL, Lembretes.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Lembretes.CLASS_IDENTIFIER, Lembretes.TIPO_ID, Lembretes.TO_TIPO_ID ); + FIELD_INDEXES.put( Lembretes.TIPO_ID, Lembretes.TIPO_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.TIPO_ID_FULL, Lembretes.TIPO_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.TO_TIPO_ID, Lembretes.TO_TIPO_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.DATA, Lembretes.DATA_INDEX ); + FIELD_INDEXES.put( Lembretes.DATA_FULL, Lembretes.DATA_INDEX ); + FIELD_INDEXES.put( Lembretes.DESCRICAO, Lembretes.DESCRICAO_INDEX ); + FIELD_INDEXES.put( Lembretes.DESCRICAO_FULL, Lembretes.DESCRICAO_INDEX ); + FIELD_INDEXES.put( Lembretes.TEXTO, Lembretes.TEXTO_INDEX ); + FIELD_INDEXES.put( Lembretes.TEXTO_FULL, Lembretes.TEXTO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Lembretes.CLASS_IDENTIFIER, Lembretes.EMPRESA_ID, Lembretes.TO_EMPRESA_ID ); + FIELD_INDEXES.put( Lembretes.EMPRESA_ID, Lembretes.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.EMPRESA_ID_FULL, Lembretes.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.TO_EMPRESA_ID, Lembretes.TO_EMPRESA_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Lembretes.CLASS_IDENTIFIER, Lembretes.ESTABELECIMENTO_ID, Lembretes.TO_ESTABELECIMENTO_ID ); + FIELD_INDEXES.put( Lembretes.ESTABELECIMENTO_ID, Lembretes.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.ESTABELECIMENTO_ID_FULL, Lembretes.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.TO_ESTABELECIMENTO_ID, Lembretes.TO_ESTABELECIMENTO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Lembretes.CLASS_IDENTIFIER, Lembretes.TRABALHADOR_ID, Lembretes.TO_TRABALHADOR_ID ); + FIELD_INDEXES.put( Lembretes.TRABALHADOR_ID, Lembretes.TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.TRABALHADOR_ID_FULL, Lembretes.TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.TO_TRABALHADOR_ID, Lembretes.TO_TRABALHADOR_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Lembretes.CLASS_IDENTIFIER, Lembretes.MARCACAO_ESTABELECIMENTO_ID, Lembretes.TO_MARCACAO_ESTABELECIMENTO_ID ); + FIELD_INDEXES.put( Lembretes.MARCACAO_ESTABELECIMENTO_ID, Lembretes.MARCACAO_ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.MARCACAO_ESTABELECIMENTO_ID_FULL, Lembretes.MARCACAO_ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.TO_MARCACAO_ESTABELECIMENTO_ID, Lembretes.TO_MARCACAO_ESTABELECIMENTO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Lembretes.CLASS_IDENTIFIER, Lembretes.MARCACAO_TRABALHADOR_ID, Lembretes.TO_MARCACAO_TRABALHADOR_ID ); + FIELD_INDEXES.put( Lembretes.MARCACAO_TRABALHADOR_ID, Lembretes.MARCACAO_TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.MARCACAO_TRABALHADOR_ID_FULL, Lembretes.MARCACAO_TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.TO_MARCACAO_TRABALHADOR_ID, Lembretes.TO_MARCACAO_TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.ENVIAR_EMAIL, Lembretes.ENVIAR_EMAIL_INDEX ); + FIELD_INDEXES.put( Lembretes.ENVIAR_EMAIL_FULL, Lembretes.ENVIAR_EMAIL_INDEX ); + FIELD_INDEXES.put( Lembretes.PERIODICIDADE_DIAS, Lembretes.PERIODICIDADE_DIAS_INDEX ); + FIELD_INDEXES.put( Lembretes.PERIODICIDADE_DIAS_FULL, Lembretes.PERIODICIDADE_DIAS_INDEX ); + FIELD_INDEXES.put( Lembretes.PERIODICIDADE_MESES, Lembretes.PERIODICIDADE_MESES_INDEX ); + FIELD_INDEXES.put( Lembretes.PERIODICIDADE_MESES_FULL, Lembretes.PERIODICIDADE_MESES_INDEX ); + FIELD_INDEXES.put( Lembretes.ULTIMO_ENVIO, Lembretes.ULTIMO_ENVIO_INDEX ); + FIELD_INDEXES.put( Lembretes.ULTIMO_ENVIO_FULL, Lembretes.ULTIMO_ENVIO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Lembretes.CLASS_IDENTIFIER, Lembretes.TRABALHADORES_CONSULTAS_DATAS_ID, Lembretes.TO_TRABALHADORES_CONSULTAS_DATAS_ID ); + FIELD_INDEXES.put( Lembretes.TRABALHADORES_CONSULTAS_DATAS_ID, Lembretes.TRABALHADORES_CONSULTAS_DATAS_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.TRABALHADORES_CONSULTAS_DATAS_ID_FULL, Lembretes.TRABALHADORES_CONSULTAS_DATAS_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.TO_TRABALHADORES_CONSULTAS_DATAS_ID, Lembretes.TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Lembretes.CLASS_IDENTIFIER, Lembretes.TRABALHADORES_ECDS_DATAS_ID, Lembretes.TO_TRABALHADORES_ECDS_DATAS_ID ); + FIELD_INDEXES.put( Lembretes.TRABALHADORES_ECDS_DATAS_ID, Lembretes.TRABALHADORES_ECDS_DATAS_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.TRABALHADORES_ECDS_DATAS_ID_FULL, Lembretes.TRABALHADORES_ECDS_DATAS_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.TO_TRABALHADORES_ECDS_DATAS_ID, Lembretes.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX ); + FIELD_INDEXES.put( Lembretes.DELETED_DATE, Lembretes.DELETED_DATE_INDEX ); + FIELD_INDEXES.put( Lembretes.DELETED_DATE_FULL, Lembretes.DELETED_DATE_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeytipo_idTolembretes_tipos = + new com.evolute.entity.ForeignKey( Lembretes.class, Lembretes.TIPO_ID, siprp.data.outer.LembretesTiposData.class, siprp.data.outer.LembretesTiposData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( Lembretes.class, Lembretes.EMPRESA_ID, siprp.data.outer.EmpresasData.class, siprp.data.outer.EmpresasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyestabelecimento_idToestabelecimentos = + new com.evolute.entity.ForeignKey( Lembretes.class, Lembretes.ESTABELECIMENTO_ID, siprp.data.outer.EstabelecimentosData.class, siprp.data.outer.EstabelecimentosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeytrabalhador_idTotrabalhadores = + new com.evolute.entity.ForeignKey( Lembretes.class, Lembretes.TRABALHADOR_ID, siprp.data.outer.TrabalhadoresData.class, siprp.data.outer.TrabalhadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeymarcacao_estabelecimento_idTomarcacoes_estabelecimento = + new com.evolute.entity.ForeignKey( Lembretes.class, Lembretes.MARCACAO_ESTABELECIMENTO_ID, siprp.data.outer.MarcacoesEstabelecimentoData.class, siprp.data.outer.MarcacoesEstabelecimentoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeymarcacao_trabalhador_idTomarcacoes_trabalhador = + new com.evolute.entity.ForeignKey( Lembretes.class, Lembretes.MARCACAO_TRABALHADOR_ID, siprp.data.outer.MarcacoesTrabalhadorData.class, siprp.data.outer.MarcacoesTrabalhadorData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeytrabalhadores_consultas_datas_idTotrabalhadores_consultas_datas = + new com.evolute.entity.ForeignKey( Lembretes.class, Lembretes.TRABALHADORES_CONSULTAS_DATAS_ID, siprp.data.outer.TrabalhadoresConsultasDatasData.class, siprp.data.outer.TrabalhadoresConsultasDatasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeytrabalhadores_ecds_datas_idTotrabalhadores_ecds_datas = + new com.evolute.entity.ForeignKey( Lembretes.class, Lembretes.TRABALHADORES_ECDS_DATAS_ID, siprp.data.outer.TrabalhadoresEcdsDatasData.class, siprp.data.outer.TrabalhadoresEcdsDatasData.ID ); + + public static final String TABLENAME = "lembretes"; + + + public static final String CLASS_IDENTIFIER = "lembretes1277401737175"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "lembretes.id"; + public static final int ID_INDEX = 0; + public static final String TIPO_ID = "tipo_id"; + public static final String TIPO_ID_FULL = "lembretes.tipo_id"; + public static final int TIPO_ID_INDEX = 1; + public static final String TO_TIPO_ID = "to_tipo_id"; + public static final int TO_TIPO_ID_INDEX = 2; + public static final String DATA = "data"; + public static final String DATA_FULL = "lembretes.data"; + public static final int DATA_INDEX = 3; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "lembretes.descricao"; + public static final int DESCRICAO_INDEX = 4; + public static final String TEXTO = "texto"; + public static final String TEXTO_FULL = "lembretes.texto"; + public static final int TEXTO_INDEX = 5; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "lembretes.empresa_id"; + public static final int EMPRESA_ID_INDEX = 6; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 7; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "lembretes.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 8; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final int TO_ESTABELECIMENTO_ID_INDEX = 9; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "lembretes.trabalhador_id"; + public static final int TRABALHADOR_ID_INDEX = 10; + public static final String TO_TRABALHADOR_ID = "to_trabalhador_id"; + public static final int TO_TRABALHADOR_ID_INDEX = 11; + public static final String MARCACAO_ESTABELECIMENTO_ID = "marcacao_estabelecimento_id"; + public static final String MARCACAO_ESTABELECIMENTO_ID_FULL = "lembretes.marcacao_estabelecimento_id"; + public static final int MARCACAO_ESTABELECIMENTO_ID_INDEX = 12; + public static final String TO_MARCACAO_ESTABELECIMENTO_ID = "to_marcacao_estabelecimento_id"; + public static final int TO_MARCACAO_ESTABELECIMENTO_ID_INDEX = 13; + public static final String MARCACAO_TRABALHADOR_ID = "marcacao_trabalhador_id"; + public static final String MARCACAO_TRABALHADOR_ID_FULL = "lembretes.marcacao_trabalhador_id"; + public static final int MARCACAO_TRABALHADOR_ID_INDEX = 14; + public static final String TO_MARCACAO_TRABALHADOR_ID = "to_marcacao_trabalhador_id"; + public static final int TO_MARCACAO_TRABALHADOR_ID_INDEX = 15; + public static final String ENVIAR_EMAIL = "enviar_email"; + public static final String ENVIAR_EMAIL_FULL = "lembretes.enviar_email"; + public static final int ENVIAR_EMAIL_INDEX = 16; + public static final String PERIODICIDADE_DIAS = "periodicidade_dias"; + public static final String PERIODICIDADE_DIAS_FULL = "lembretes.periodicidade_dias"; + public static final int PERIODICIDADE_DIAS_INDEX = 17; + public static final String PERIODICIDADE_MESES = "periodicidade_meses"; + public static final String PERIODICIDADE_MESES_FULL = "lembretes.periodicidade_meses"; + public static final int PERIODICIDADE_MESES_INDEX = 18; + public static final String ULTIMO_ENVIO = "ultimo_envio"; + public static final String ULTIMO_ENVIO_FULL = "lembretes.ultimo_envio"; + public static final int ULTIMO_ENVIO_INDEX = 19; + public static final String TRABALHADORES_CONSULTAS_DATAS_ID = "trabalhadores_consultas_datas_id"; + public static final String TRABALHADORES_CONSULTAS_DATAS_ID_FULL = "lembretes.trabalhadores_consultas_datas_id"; + public static final int TRABALHADORES_CONSULTAS_DATAS_ID_INDEX = 20; + public static final String TO_TRABALHADORES_CONSULTAS_DATAS_ID = "to_trabalhadores_consultas_datas_id"; + public static final int TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX = 21; + public static final String TRABALHADORES_ECDS_DATAS_ID = "trabalhadores_ecds_datas_id"; + public static final String TRABALHADORES_ECDS_DATAS_ID_FULL = "lembretes.trabalhadores_ecds_datas_id"; + public static final int TRABALHADORES_ECDS_DATAS_ID_INDEX = 22; + public static final String TO_TRABALHADORES_ECDS_DATAS_ID = "to_trabalhadores_ecds_datas_id"; + public static final int TO_TRABALHADORES_ECDS_DATAS_ID_INDEX = 23; + public static final String DELETED_DATE = "deleted_date"; + public static final String DELETED_DATE_FULL = "lembretes.deleted_date"; + public static final int DELETED_DATE_INDEX = 24; + + public static final String FIELD_NAMES[] = new String[]{ + TIPO_ID, TO_TIPO_ID, DATA, DESCRICAO, TEXTO, EMPRESA_ID, TO_EMPRESA_ID, + ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID, TRABALHADOR_ID, TO_TRABALHADOR_ID, + MARCACAO_ESTABELECIMENTO_ID, TO_MARCACAO_ESTABELECIMENTO_ID, + MARCACAO_TRABALHADOR_ID, TO_MARCACAO_TRABALHADOR_ID, ENVIAR_EMAIL, + PERIODICIDADE_DIAS, PERIODICIDADE_MESES, ULTIMO_ENVIO, + TRABALHADORES_CONSULTAS_DATAS_ID, TO_TRABALHADORES_CONSULTAS_DATAS_ID, + TRABALHADORES_ECDS_DATAS_ID, TO_TRABALHADORES_ECDS_DATAS_ID, DELETED_DATE, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TIPO_ID, TABLENAME + "." + TO_TIPO_ID, TABLENAME + "." + DATA, TABLENAME + "." + DESCRICAO, TABLENAME + "." + TEXTO, TABLENAME + "." + EMPRESA_ID, TABLENAME + "." + TO_EMPRESA_ID, + TABLENAME + "." + ESTABELECIMENTO_ID, TABLENAME + "." + TO_ESTABELECIMENTO_ID, TABLENAME + "." + TRABALHADOR_ID, TABLENAME + "." + TO_TRABALHADOR_ID, + TABLENAME + "." + MARCACAO_ESTABELECIMENTO_ID, TABLENAME + "." + TO_MARCACAO_ESTABELECIMENTO_ID, + TABLENAME + "." + MARCACAO_TRABALHADOR_ID, TABLENAME + "." + TO_MARCACAO_TRABALHADOR_ID, TABLENAME + "." + ENVIAR_EMAIL, + TABLENAME + "." + PERIODICIDADE_DIAS, TABLENAME + "." + PERIODICIDADE_MESES, TABLENAME + "." + ULTIMO_ENVIO, + TABLENAME + "." + TRABALHADORES_CONSULTAS_DATAS_ID, TABLENAME + "." + TO_TRABALHADORES_CONSULTAS_DATAS_ID, + TABLENAME + "." + TRABALHADORES_ECDS_DATAS_ID, TABLENAME + "." + TO_TRABALHADORES_ECDS_DATAS_ID, TABLENAME + "." + DELETED_DATE, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TIPO_ID, DATA, DESCRICAO, TEXTO, EMPRESA_ID, ESTABELECIMENTO_ID, TRABALHADOR_ID, + MARCACAO_ESTABELECIMENTO_ID, MARCACAO_TRABALHADOR_ID, ENVIAR_EMAIL, + PERIODICIDADE_DIAS, PERIODICIDADE_MESES, ULTIMO_ENVIO, + TRABALHADORES_CONSULTAS_DATAS_ID, TRABALHADORES_ECDS_DATAS_ID, + DELETED_DATE, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, TIPO_ID, DATA, DESCRICAO, TEXTO, EMPRESA_ID, ESTABELECIMENTO_ID, TRABALHADOR_ID, + MARCACAO_ESTABELECIMENTO_ID, MARCACAO_TRABALHADOR_ID, ENVIAR_EMAIL, + PERIODICIDADE_DIAS, PERIODICIDADE_MESES, ULTIMO_ENVIO, + TRABALHADORES_CONSULTAS_DATAS_ID, TRABALHADORES_ECDS_DATAS_ID, + DELETED_DATE, }; + + private Integer id; + private Integer tipo_id; + private siprp.data.outer.LembretesTiposData to_tipo_id; + private java.util.Date data; + private String descricao; + private String texto; + private Integer empresa_id; + private siprp.data.outer.EmpresasData to_empresa_id; + private Integer estabelecimento_id; + private siprp.data.outer.EstabelecimentosData to_estabelecimento_id; + private Integer trabalhador_id; + private siprp.data.outer.TrabalhadoresData to_trabalhador_id; + private Integer marcacao_estabelecimento_id; + private siprp.data.outer.MarcacoesEstabelecimentoData to_marcacao_estabelecimento_id; + private Integer marcacao_trabalhador_id; + private siprp.data.outer.MarcacoesTrabalhadorData to_marcacao_trabalhador_id; + private String enviar_email; + private Integer periodicidade_dias; + private Integer periodicidade_meses; + private java.util.Date ultimo_envio; + private Integer trabalhadores_consultas_datas_id; + private siprp.data.outer.TrabalhadoresConsultasDatasData to_trabalhadores_consultas_datas_id; + private Integer trabalhadores_ecds_datas_id; + private siprp.data.outer.TrabalhadoresEcdsDatasData to_trabalhadores_ecds_datas_id; + private java.sql.Timestamp deleted_date; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Lembretes() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false, false, false, false, false + , false, false, 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 + { + setLockedForRefresh( true ); + 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_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TIPO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tipo_id; + } + + public void setTipo_id( Integer tipo_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( TIPO_ID, tipo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tipo_id = tipo_id; + LAZY_LOADED_OBJECTS.put( TIPO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.LembretesTiposData toTipo_id() + { + try + { + prepare( TO_TIPO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_tipo_id; + } + + public void setToTipo_id( siprp.data.outer.LembretesTiposData to_tipo_id ) + { + try + { + preProcess( TO_TIPO_ID, to_tipo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_tipo_id = to_tipo_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 + { + setLockedForRefresh( true ); + 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 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 + { + setLockedForRefresh( true ); + 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 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 getMarcacao_estabelecimento_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MARCACAO_ESTABELECIMENTO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.marcacao_estabelecimento_id; + } + + public void setMarcacao_estabelecimento_id( Integer marcacao_estabelecimento_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( MARCACAO_ESTABELECIMENTO_ID, marcacao_estabelecimento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.marcacao_estabelecimento_id = marcacao_estabelecimento_id; + LAZY_LOADED_OBJECTS.put( MARCACAO_ESTABELECIMENTO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.MarcacoesEstabelecimentoData toMarcacao_estabelecimento_id() + { + try + { + prepare( TO_MARCACAO_ESTABELECIMENTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_marcacao_estabelecimento_id; + } + + public void setToMarcacao_estabelecimento_id( siprp.data.outer.MarcacoesEstabelecimentoData to_marcacao_estabelecimento_id ) + { + try + { + preProcess( TO_MARCACAO_ESTABELECIMENTO_ID, to_marcacao_estabelecimento_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_marcacao_estabelecimento_id = to_marcacao_estabelecimento_id; + } + + public Integer getMarcacao_trabalhador_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MARCACAO_TRABALHADOR_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.marcacao_trabalhador_id; + } + + public void setMarcacao_trabalhador_id( Integer marcacao_trabalhador_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( MARCACAO_TRABALHADOR_ID, marcacao_trabalhador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.marcacao_trabalhador_id = marcacao_trabalhador_id; + LAZY_LOADED_OBJECTS.put( MARCACAO_TRABALHADOR_ID, Boolean.TRUE ); + } + + public siprp.data.outer.MarcacoesTrabalhadorData toMarcacao_trabalhador_id() + { + try + { + prepare( TO_MARCACAO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_marcacao_trabalhador_id; + } + + public void setToMarcacao_trabalhador_id( siprp.data.outer.MarcacoesTrabalhadorData to_marcacao_trabalhador_id ) + { + try + { + preProcess( TO_MARCACAO_TRABALHADOR_ID, to_marcacao_trabalhador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_marcacao_trabalhador_id = to_marcacao_trabalhador_id; + } + + public String getEnviar_email() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ENVIAR_EMAIL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.enviar_email; + } + + public void setEnviar_email( String enviar_email ) + { + try + { + setLockedForRefresh( true ); + preProcess( ENVIAR_EMAIL, enviar_email ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.enviar_email = enviar_email; + LAZY_LOADED_OBJECTS.put( ENVIAR_EMAIL, Boolean.TRUE ); + } + + public Integer getPeriodicidade_dias() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PERIODICIDADE_DIAS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.periodicidade_dias; + } + + public void setPeriodicidade_dias( Integer periodicidade_dias ) + { + try + { + setLockedForRefresh( true ); + preProcess( PERIODICIDADE_DIAS, periodicidade_dias ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.periodicidade_dias = periodicidade_dias; + LAZY_LOADED_OBJECTS.put( PERIODICIDADE_DIAS, Boolean.TRUE ); + } + + public Integer getPeriodicidade_meses() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PERIODICIDADE_MESES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.periodicidade_meses; + } + + public void setPeriodicidade_meses( Integer periodicidade_meses ) + { + try + { + setLockedForRefresh( true ); + preProcess( PERIODICIDADE_MESES, periodicidade_meses ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.periodicidade_meses = periodicidade_meses; + LAZY_LOADED_OBJECTS.put( PERIODICIDADE_MESES, Boolean.TRUE ); + } + + public java.util.Date getUltimo_envio() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ULTIMO_ENVIO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ultimo_envio; + } + + public void setUltimo_envio( java.util.Date ultimo_envio ) + { + try + { + setLockedForRefresh( true ); + preProcess( ULTIMO_ENVIO, ultimo_envio ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ultimo_envio = ultimo_envio; + LAZY_LOADED_OBJECTS.put( ULTIMO_ENVIO, Boolean.TRUE ); + } + + public Integer getTrabalhadores_consultas_datas_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TRABALHADORES_CONSULTAS_DATAS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.trabalhadores_consultas_datas_id; + } + + public void setTrabalhadores_consultas_datas_id( Integer trabalhadores_consultas_datas_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( TRABALHADORES_CONSULTAS_DATAS_ID, trabalhadores_consultas_datas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.trabalhadores_consultas_datas_id = trabalhadores_consultas_datas_id; + LAZY_LOADED_OBJECTS.put( TRABALHADORES_CONSULTAS_DATAS_ID, Boolean.TRUE ); + } + + public siprp.data.outer.TrabalhadoresConsultasDatasData toTrabalhadores_consultas_datas_id() + { + try + { + prepare( TO_TRABALHADORES_CONSULTAS_DATAS_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhadores_consultas_datas_id; + } + + public void setToTrabalhadores_consultas_datas_id( siprp.data.outer.TrabalhadoresConsultasDatasData to_trabalhadores_consultas_datas_id ) + { + try + { + preProcess( TO_TRABALHADORES_CONSULTAS_DATAS_ID, to_trabalhadores_consultas_datas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_trabalhadores_consultas_datas_id = to_trabalhadores_consultas_datas_id; + } + + public Integer getTrabalhadores_ecds_datas_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TRABALHADORES_ECDS_DATAS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.trabalhadores_ecds_datas_id; + } + + public void setTrabalhadores_ecds_datas_id( Integer trabalhadores_ecds_datas_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( TRABALHADORES_ECDS_DATAS_ID, trabalhadores_ecds_datas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.trabalhadores_ecds_datas_id = trabalhadores_ecds_datas_id; + LAZY_LOADED_OBJECTS.put( TRABALHADORES_ECDS_DATAS_ID, Boolean.TRUE ); + } + + public siprp.data.outer.TrabalhadoresEcdsDatasData toTrabalhadores_ecds_datas_id() + { + try + { + prepare( TO_TRABALHADORES_ECDS_DATAS_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhadores_ecds_datas_id; + } + + public void setToTrabalhadores_ecds_datas_id( siprp.data.outer.TrabalhadoresEcdsDatasData to_trabalhadores_ecds_datas_id ) + { + try + { + preProcess( TO_TRABALHADORES_ECDS_DATAS_ID, to_trabalhadores_ecds_datas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_trabalhadores_ecds_datas_id = to_trabalhadores_ecds_datas_id; + } + + public java.sql.Timestamp getDeleted_date() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DELETED_DATE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.deleted_date; + } + + public void setDeleted_date( java.sql.Timestamp deleted_date ) + { + try + { + setLockedForRefresh( true ); + preProcess( DELETED_DATE, deleted_date ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.deleted_date = deleted_date; + LAZY_LOADED_OBJECTS.put( DELETED_DATE, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Lembretes.ID_INDEX: + value = getId(); + break; + case Lembretes.TIPO_ID_INDEX: + value = getTipo_id(); + break; + case Lembretes.TO_TIPO_ID_INDEX: + value = toTipo_id(); + break; + case Lembretes.DATA_INDEX: + value = getData(); + break; + case Lembretes.DESCRICAO_INDEX: + value = getDescricao(); + break; + case Lembretes.TEXTO_INDEX: + value = getTexto(); + break; + case Lembretes.EMPRESA_ID_INDEX: + value = getEmpresa_id(); + break; + case Lembretes.TO_EMPRESA_ID_INDEX: + value = toEmpresa_id(); + break; + case Lembretes.ESTABELECIMENTO_ID_INDEX: + value = getEstabelecimento_id(); + break; + case Lembretes.TO_ESTABELECIMENTO_ID_INDEX: + value = toEstabelecimento_id(); + break; + case Lembretes.TRABALHADOR_ID_INDEX: + value = getTrabalhador_id(); + break; + case Lembretes.TO_TRABALHADOR_ID_INDEX: + value = toTrabalhador_id(); + break; + case Lembretes.MARCACAO_ESTABELECIMENTO_ID_INDEX: + value = getMarcacao_estabelecimento_id(); + break; + case Lembretes.TO_MARCACAO_ESTABELECIMENTO_ID_INDEX: + value = toMarcacao_estabelecimento_id(); + break; + case Lembretes.MARCACAO_TRABALHADOR_ID_INDEX: + value = getMarcacao_trabalhador_id(); + break; + case Lembretes.TO_MARCACAO_TRABALHADOR_ID_INDEX: + value = toMarcacao_trabalhador_id(); + break; + case Lembretes.ENVIAR_EMAIL_INDEX: + value = getEnviar_email(); + break; + case Lembretes.PERIODICIDADE_DIAS_INDEX: + value = getPeriodicidade_dias(); + break; + case Lembretes.PERIODICIDADE_MESES_INDEX: + value = getPeriodicidade_meses(); + break; + case Lembretes.ULTIMO_ENVIO_INDEX: + value = getUltimo_envio(); + break; + case Lembretes.TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + value = getTrabalhadores_consultas_datas_id(); + break; + case Lembretes.TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + value = toTrabalhadores_consultas_datas_id(); + break; + case Lembretes.TRABALHADORES_ECDS_DATAS_ID_INDEX: + value = getTrabalhadores_ecds_datas_id(); + break; + case Lembretes.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX: + value = toTrabalhadores_ecds_datas_id(); + break; + case Lembretes.DELETED_DATE_INDEX: + value = getDeleted_date(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Lembretes.ID_INDEX: + value = this.id; + break; + case Lembretes.TIPO_ID_INDEX: + value = this.tipo_id; + break; + case Lembretes.TO_TIPO_ID_INDEX: + value = this.to_tipo_id; + break; + case Lembretes.DATA_INDEX: + value = this.data; + break; + case Lembretes.DESCRICAO_INDEX: + value = this.descricao; + break; + case Lembretes.TEXTO_INDEX: + value = this.texto; + break; + case Lembretes.EMPRESA_ID_INDEX: + value = this.empresa_id; + break; + case Lembretes.TO_EMPRESA_ID_INDEX: + value = this.to_empresa_id; + break; + case Lembretes.ESTABELECIMENTO_ID_INDEX: + value = this.estabelecimento_id; + break; + case Lembretes.TO_ESTABELECIMENTO_ID_INDEX: + value = this.to_estabelecimento_id; + break; + case Lembretes.TRABALHADOR_ID_INDEX: + value = this.trabalhador_id; + break; + case Lembretes.TO_TRABALHADOR_ID_INDEX: + value = this.to_trabalhador_id; + break; + case Lembretes.MARCACAO_ESTABELECIMENTO_ID_INDEX: + value = this.marcacao_estabelecimento_id; + break; + case Lembretes.TO_MARCACAO_ESTABELECIMENTO_ID_INDEX: + value = this.to_marcacao_estabelecimento_id; + break; + case Lembretes.MARCACAO_TRABALHADOR_ID_INDEX: + value = this.marcacao_trabalhador_id; + break; + case Lembretes.TO_MARCACAO_TRABALHADOR_ID_INDEX: + value = this.to_marcacao_trabalhador_id; + break; + case Lembretes.ENVIAR_EMAIL_INDEX: + value = this.enviar_email; + break; + case Lembretes.PERIODICIDADE_DIAS_INDEX: + value = this.periodicidade_dias; + break; + case Lembretes.PERIODICIDADE_MESES_INDEX: + value = this.periodicidade_meses; + break; + case Lembretes.ULTIMO_ENVIO_INDEX: + value = this.ultimo_envio; + break; + case Lembretes.TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + value = this.trabalhadores_consultas_datas_id; + break; + case Lembretes.TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + value = this.to_trabalhadores_consultas_datas_id; + break; + case Lembretes.TRABALHADORES_ECDS_DATAS_ID_INDEX: + value = this.trabalhadores_ecds_datas_id; + break; + case Lembretes.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX: + value = this.to_trabalhadores_ecds_datas_id; + break; + case Lembretes.DELETED_DATE_INDEX: + value = this.deleted_date; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Lembretes.ID_INDEX: + setId( ( Integer ) value ); + break; + case Lembretes.TIPO_ID_INDEX: + setTipo_id( ( Integer ) value ); + break; + case Lembretes.TO_TIPO_ID_INDEX: + setToTipo_id( ( siprp.data.outer.LembretesTiposData ) value ); + break; + case Lembretes.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case Lembretes.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case Lembretes.TEXTO_INDEX: + setTexto( ( String ) value ); + break; + case Lembretes.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case Lembretes.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( siprp.data.outer.EmpresasData ) value ); + break; + case Lembretes.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case Lembretes.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( siprp.data.outer.EstabelecimentosData ) value ); + break; + case Lembretes.TRABALHADOR_ID_INDEX: + setTrabalhador_id( ( Integer ) value ); + break; + case Lembretes.TO_TRABALHADOR_ID_INDEX: + setToTrabalhador_id( ( siprp.data.outer.TrabalhadoresData ) value ); + break; + case Lembretes.MARCACAO_ESTABELECIMENTO_ID_INDEX: + setMarcacao_estabelecimento_id( ( Integer ) value ); + break; + case Lembretes.TO_MARCACAO_ESTABELECIMENTO_ID_INDEX: + setToMarcacao_estabelecimento_id( ( siprp.data.outer.MarcacoesEstabelecimentoData ) value ); + break; + case Lembretes.MARCACAO_TRABALHADOR_ID_INDEX: + setMarcacao_trabalhador_id( ( Integer ) value ); + break; + case Lembretes.TO_MARCACAO_TRABALHADOR_ID_INDEX: + setToMarcacao_trabalhador_id( ( siprp.data.outer.MarcacoesTrabalhadorData ) value ); + break; + case Lembretes.ENVIAR_EMAIL_INDEX: + setEnviar_email( ( String ) value ); + break; + case Lembretes.PERIODICIDADE_DIAS_INDEX: + setPeriodicidade_dias( ( Integer ) value ); + break; + case Lembretes.PERIODICIDADE_MESES_INDEX: + setPeriodicidade_meses( ( Integer ) value ); + break; + case Lembretes.ULTIMO_ENVIO_INDEX: + setUltimo_envio( ( java.util.Date ) value ); + break; + case Lembretes.TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + setTrabalhadores_consultas_datas_id( ( Integer ) value ); + break; + case Lembretes.TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + setToTrabalhadores_consultas_datas_id( ( siprp.data.outer.TrabalhadoresConsultasDatasData ) value ); + break; + case Lembretes.TRABALHADORES_ECDS_DATAS_ID_INDEX: + setTrabalhadores_ecds_datas_id( ( Integer ) value ); + break; + case Lembretes.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX: + setToTrabalhadores_ecds_datas_id( ( siprp.data.outer.TrabalhadoresEcdsDatasData ) value ); + break; + case Lembretes.DELETED_DATE_INDEX: + setDeleted_date( ( java.sql.Timestamp ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Lembretes.ID_INDEX: + this.id = ( Integer ) value; + break; + case Lembretes.TIPO_ID_INDEX: + this.tipo_id = ( Integer ) value; + break; + case Lembretes.TO_TIPO_ID_INDEX: + this.to_tipo_id = ( siprp.data.outer.LembretesTiposData ) value; + break; + case Lembretes.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case Lembretes.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case Lembretes.TEXTO_INDEX: + this.texto = ( String ) value; + break; + case Lembretes.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case Lembretes.TO_EMPRESA_ID_INDEX: + this.to_empresa_id = ( siprp.data.outer.EmpresasData ) value; + break; + case Lembretes.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case Lembretes.TO_ESTABELECIMENTO_ID_INDEX: + this.to_estabelecimento_id = ( siprp.data.outer.EstabelecimentosData ) value; + break; + case Lembretes.TRABALHADOR_ID_INDEX: + this.trabalhador_id = ( Integer ) value; + break; + case Lembretes.TO_TRABALHADOR_ID_INDEX: + this.to_trabalhador_id = ( siprp.data.outer.TrabalhadoresData ) value; + break; + case Lembretes.MARCACAO_ESTABELECIMENTO_ID_INDEX: + this.marcacao_estabelecimento_id = ( Integer ) value; + break; + case Lembretes.TO_MARCACAO_ESTABELECIMENTO_ID_INDEX: + this.to_marcacao_estabelecimento_id = ( siprp.data.outer.MarcacoesEstabelecimentoData ) value; + break; + case Lembretes.MARCACAO_TRABALHADOR_ID_INDEX: + this.marcacao_trabalhador_id = ( Integer ) value; + break; + case Lembretes.TO_MARCACAO_TRABALHADOR_ID_INDEX: + this.to_marcacao_trabalhador_id = ( siprp.data.outer.MarcacoesTrabalhadorData ) value; + break; + case Lembretes.ENVIAR_EMAIL_INDEX: + this.enviar_email = ( String ) value; + break; + case Lembretes.PERIODICIDADE_DIAS_INDEX: + this.periodicidade_dias = ( Integer ) value; + break; + case Lembretes.PERIODICIDADE_MESES_INDEX: + this.periodicidade_meses = ( Integer ) value; + break; + case Lembretes.ULTIMO_ENVIO_INDEX: + this.ultimo_envio = ( java.util.Date ) value; + break; + case Lembretes.TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + this.trabalhadores_consultas_datas_id = ( Integer ) value; + break; + case Lembretes.TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + this.to_trabalhadores_consultas_datas_id = ( siprp.data.outer.TrabalhadoresConsultasDatasData ) value; + break; + case Lembretes.TRABALHADORES_ECDS_DATAS_ID_INDEX: + this.trabalhadores_ecds_datas_id = ( Integer ) value; + break; + case Lembretes.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX: + this.to_trabalhadores_ecds_datas_id = ( siprp.data.outer.TrabalhadoresEcdsDatasData ) value; + break; + case Lembretes.DELETED_DATE_INDEX: + this.deleted_date = ( 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 Lembretes.ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TIPO_ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TO_TIPO_ID_INDEX: + theClass = siprp.data.outer.LembretesTiposData.class; + break; + case Lembretes.DATA_INDEX: + theClass = java.util.Date.class; + break; + case Lembretes.DESCRICAO_INDEX: + theClass = String.class; + break; + case Lembretes.TEXTO_INDEX: + theClass = String.class; + break; + case Lembretes.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TO_EMPRESA_ID_INDEX: + theClass = siprp.data.outer.EmpresasData.class; + break; + case Lembretes.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TO_ESTABELECIMENTO_ID_INDEX: + theClass = siprp.data.outer.EstabelecimentosData.class; + break; + case Lembretes.TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TO_TRABALHADOR_ID_INDEX: + theClass = siprp.data.outer.TrabalhadoresData.class; + break; + case Lembretes.MARCACAO_ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TO_MARCACAO_ESTABELECIMENTO_ID_INDEX: + theClass = siprp.data.outer.MarcacoesEstabelecimentoData.class; + break; + case Lembretes.MARCACAO_TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TO_MARCACAO_TRABALHADOR_ID_INDEX: + theClass = siprp.data.outer.MarcacoesTrabalhadorData.class; + break; + case Lembretes.ENVIAR_EMAIL_INDEX: + theClass = String.class; + break; + case Lembretes.PERIODICIDADE_DIAS_INDEX: + theClass = Integer.class; + break; + case Lembretes.PERIODICIDADE_MESES_INDEX: + theClass = Integer.class; + break; + case Lembretes.ULTIMO_ENVIO_INDEX: + theClass = java.util.Date.class; + break; + case Lembretes.TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + theClass = siprp.data.outer.TrabalhadoresConsultasDatasData.class; + break; + case Lembretes.TRABALHADORES_ECDS_DATAS_ID_INDEX: + theClass = Integer.class; + break; + case Lembretes.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX: + theClass = siprp.data.outer.TrabalhadoresEcdsDatasData.class; + break; + case Lembretes.DELETED_DATE_INDEX: + theClass = java.sql.Timestamp.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Lembretes._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, Lembretes.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/LembretesTipos.java b/trunk/SIPRPSoft/src/siprp/data/inner/LembretesTipos.java new file mode 100644 index 00000000..f671a7a0 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/LembretesTipos.java @@ -0,0 +1,445 @@ +/* +* LembretesTipos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class LembretesTipos extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( LembretesTipos.ID, LembretesTipos.ID_INDEX ); + FIELD_INDEXES.put( LembretesTipos.ID_FULL, LembretesTipos.ID_INDEX ); + FIELD_INDEXES.put( LembretesTipos.CODIGO, LembretesTipos.CODIGO_INDEX ); + FIELD_INDEXES.put( LembretesTipos.CODIGO_FULL, LembretesTipos.CODIGO_INDEX ); + FIELD_INDEXES.put( LembretesTipos.DESCRICAO, LembretesTipos.DESCRICAO_INDEX ); + FIELD_INDEXES.put( LembretesTipos.DESCRICAO_FULL, LembretesTipos.DESCRICAO_INDEX ); + FIELD_INDEXES.put( LembretesTipos.ORDEM, LembretesTipos.ORDEM_INDEX ); + FIELD_INDEXES.put( LembretesTipos.ORDEM_FULL, LembretesTipos.ORDEM_INDEX ); + FIELD_INDEXES.put( LembretesTipos.ACTIVO, LembretesTipos.ACTIVO_INDEX ); + FIELD_INDEXES.put( LembretesTipos.ACTIVO_FULL, LembretesTipos.ACTIVO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "lembretes_tipos"; + + + public static final String CLASS_IDENTIFIER = "lembretes_tipos1277401737176"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "lembretes_tipos.id"; + public static final int ID_INDEX = 0; + public static final String CODIGO = "codigo"; + public static final String CODIGO_FULL = "lembretes_tipos.codigo"; + public static final int CODIGO_INDEX = 1; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "lembretes_tipos.descricao"; + public static final int DESCRICAO_INDEX = 2; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "lembretes_tipos.ordem"; + public static final int ORDEM_INDEX = 3; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "lembretes_tipos.activo"; + public static final int ACTIVO_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + CODIGO, DESCRICAO, ORDEM, ACTIVO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + CODIGO, TABLENAME + "." + DESCRICAO, TABLENAME + "." + ORDEM, TABLENAME + "." + ACTIVO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, CODIGO, DESCRICAO, ORDEM, ACTIVO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, CODIGO, DESCRICAO, ORDEM, ACTIVO, }; + + private Integer id; + private String codigo; + private String descricao; + private Integer ordem; + private String activo; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public LembretesTipos() + { + 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 + { + setLockedForRefresh( true ); + 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.ListfromLembretes_tipo_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.LembretesData.class , getPrimaryKey().getMap().get("id"), "tipo_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public String getCodigo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CODIGO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.codigo; + } + + public void setCodigo( String codigo ) + { + try + { + setLockedForRefresh( true ); + preProcess( CODIGO, codigo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.codigo = codigo; + LAZY_LOADED_OBJECTS.put( CODIGO, 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 LembretesTipos.ID_INDEX: + value = getId(); + break; + case LembretesTipos.CODIGO_INDEX: + value = getCodigo(); + break; + case LembretesTipos.DESCRICAO_INDEX: + value = getDescricao(); + break; + case LembretesTipos.ORDEM_INDEX: + value = getOrdem(); + break; + case LembretesTipos.ACTIVO_INDEX: + value = getActivo(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case LembretesTipos.ID_INDEX: + value = this.id; + break; + case LembretesTipos.CODIGO_INDEX: + value = this.codigo; + break; + case LembretesTipos.DESCRICAO_INDEX: + value = this.descricao; + break; + case LembretesTipos.ORDEM_INDEX: + value = this.ordem; + break; + case LembretesTipos.ACTIVO_INDEX: + value = this.activo; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case LembretesTipos.ID_INDEX: + setId( ( Integer ) value ); + break; + case LembretesTipos.CODIGO_INDEX: + setCodigo( ( String ) value ); + break; + case LembretesTipos.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case LembretesTipos.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + case LembretesTipos.ACTIVO_INDEX: + setActivo( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case LembretesTipos.ID_INDEX: + this.id = ( Integer ) value; + break; + case LembretesTipos.CODIGO_INDEX: + this.codigo = ( String ) value; + break; + case LembretesTipos.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case LembretesTipos.ORDEM_INDEX: + this.ordem = ( Integer ) value; + break; + case LembretesTipos.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 LembretesTipos.ID_INDEX: + theClass = Integer.class; + break; + case LembretesTipos.CODIGO_INDEX: + theClass = String.class; + break; + case LembretesTipos.DESCRICAO_INDEX: + theClass = String.class; + break; + case LembretesTipos.ORDEM_INDEX: + theClass = Integer.class; + break; + case LembretesTipos.ACTIVO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : LembretesTipos._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, LembretesTipos.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/MarcacoesEmpresa.java b/trunk/SIPRPSoft/src/siprp/data/inner/MarcacoesEmpresa.java new file mode 100644 index 00000000..ce9c1aa6 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/MarcacoesEmpresa.java @@ -0,0 +1,479 @@ +/* +* MarcacoesEmpresa.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class MarcacoesEmpresa extends siprp.data.Marcacao +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + 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, siprp.data.outer.EmpresasData.class, siprp.data.outer.EmpresasData.ID ); + + public static final String TABLENAME = "marcacoes_empresa"; + + + public static final String CLASS_IDENTIFIER = "marcacoes_empresa1277401737177"; + + 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 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 siprp.data.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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 + { + setLockedForRefresh( true ); + 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( ( siprp.data.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 = ( siprp.data.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 = siprp.data.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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/MarcacoesEstabelecimento.java b/trunk/SIPRPSoft/src/siprp/data/inner/MarcacoesEstabelecimento.java new file mode 100644 index 00000000..6669781a --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/MarcacoesEstabelecimento.java @@ -0,0 +1,862 @@ +/* +* MarcacoesEstabelecimento.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class MarcacoesEstabelecimento extends siprp.data.Marcacao +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + 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 ); + com.evolute.entity.evo.EvoDataObject.register( MarcacoesEstabelecimento.CLASS_IDENTIFIER, MarcacoesEstabelecimento.ESTABELECIMENTO_ID, MarcacoesEstabelecimento.TO_ESTABELECIMENTO_ID ); + FIELD_INDEXES.put( MarcacoesEstabelecimento.ESTABELECIMENTO_ID, MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesEstabelecimento.ESTABELECIMENTO_ID_FULL, MarcacoesEstabelecimento.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesEstabelecimento.TO_ESTABELECIMENTO_ID, MarcacoesEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesEstabelecimento.ESTADO, MarcacoesEstabelecimento.ESTADO_INDEX ); + FIELD_INDEXES.put( MarcacoesEstabelecimento.ESTADO_FULL, MarcacoesEstabelecimento.ESTADO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( MarcacoesEstabelecimento.CLASS_IDENTIFIER, MarcacoesEstabelecimento.TECNICO_HST, MarcacoesEstabelecimento.TO_TECNICO_HST ); + FIELD_INDEXES.put( MarcacoesEstabelecimento.TECNICO_HST, MarcacoesEstabelecimento.TECNICO_HST_INDEX ); + FIELD_INDEXES.put( MarcacoesEstabelecimento.TECNICO_HST_FULL, MarcacoesEstabelecimento.TECNICO_HST_INDEX ); + FIELD_INDEXES.put( MarcacoesEstabelecimento.TO_TECNICO_HST, MarcacoesEstabelecimento.TO_TECNICO_HST_INDEX ); + FIELD_INDEXES.put( MarcacoesEstabelecimento.OBSERVACOES, MarcacoesEstabelecimento.OBSERVACOES_INDEX ); + FIELD_INDEXES.put( MarcacoesEstabelecimento.OBSERVACOES_FULL, MarcacoesEstabelecimento.OBSERVACOES_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( MarcacoesEstabelecimento.CLASS_IDENTIFIER, MarcacoesEstabelecimento.TECNICO_SUPERIOR_HST, MarcacoesEstabelecimento.TO_TECNICO_SUPERIOR_HST ); + FIELD_INDEXES.put( MarcacoesEstabelecimento.TECNICO_SUPERIOR_HST, MarcacoesEstabelecimento.TECNICO_SUPERIOR_HST_INDEX ); + FIELD_INDEXES.put( MarcacoesEstabelecimento.TECNICO_SUPERIOR_HST_FULL, MarcacoesEstabelecimento.TECNICO_SUPERIOR_HST_INDEX ); + FIELD_INDEXES.put( MarcacoesEstabelecimento.TO_TECNICO_SUPERIOR_HST, MarcacoesEstabelecimento.TO_TECNICO_SUPERIOR_HST_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( MarcacoesEstabelecimento.class, MarcacoesEstabelecimento.ESTABELECIMENTO_ID, siprp.data.outer.EstabelecimentosData.class, siprp.data.outer.EstabelecimentosData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeytecnico_hstTomarcacoes_tecnicos_hst = + new com.evolute.entity.ForeignKey( MarcacoesEstabelecimento.class, MarcacoesEstabelecimento.TECNICO_HST, siprp.data.outer.MarcacoesTecnicosHstData.class, siprp.data.outer.MarcacoesTecnicosHstData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeytecnico_superior_hstTomarcacoes_tecnicos_hst = + new com.evolute.entity.ForeignKey( MarcacoesEstabelecimento.class, MarcacoesEstabelecimento.TECNICO_SUPERIOR_HST, siprp.data.outer.MarcacoesTecnicosHstData.class, siprp.data.outer.MarcacoesTecnicosHstData.ID ); + + public static final String TABLENAME = "marcacoes_estabelecimento"; + + + public static final String CLASS_IDENTIFIER = "marcacoes_estabelecimento1277401737177"; + + 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 TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final int TO_ESTABELECIMENTO_ID_INDEX = 6; + public static final String ESTADO = "estado"; + public static final String ESTADO_FULL = "marcacoes_estabelecimento.estado"; + public static final int ESTADO_INDEX = 7; + public static final String TECNICO_HST = "tecnico_hst"; + public static final String TECNICO_HST_FULL = "marcacoes_estabelecimento.tecnico_hst"; + public static final int TECNICO_HST_INDEX = 8; + public static final String TO_TECNICO_HST = "to_tecnico_hst"; + public static final int TO_TECNICO_HST_INDEX = 9; + public static final String OBSERVACOES = "observacoes"; + public static final String OBSERVACOES_FULL = "marcacoes_estabelecimento.observacoes"; + public static final int OBSERVACOES_INDEX = 10; + public static final String TECNICO_SUPERIOR_HST = "tecnico_superior_hst"; + public static final String TECNICO_SUPERIOR_HST_FULL = "marcacoes_estabelecimento.tecnico_superior_hst"; + public static final int TECNICO_SUPERIOR_HST_INDEX = 11; + public static final String TO_TECNICO_SUPERIOR_HST = "to_tecnico_superior_hst"; + public static final int TO_TECNICO_SUPERIOR_HST_INDEX = 12; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, ESTABELECIMENTO_ID, + TO_ESTABELECIMENTO_ID, ESTADO, TECNICO_HST, TO_TECNICO_HST, OBSERVACOES, + TECNICO_SUPERIOR_HST, TO_TECNICO_SUPERIOR_HST, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DATA, TABLENAME + "." + REALIZADA, TABLENAME + "." + DATA_EMAIL, TABLENAME + "." + DATA_RELATORIO, TABLENAME + "." + ESTABELECIMENTO_ID, + TABLENAME + "." + TO_ESTABELECIMENTO_ID, TABLENAME + "." + ESTADO, TABLENAME + "." + TECNICO_HST, TABLENAME + "." + TO_TECNICO_HST, TABLENAME + "." + OBSERVACOES, + TABLENAME + "." + TECNICO_SUPERIOR_HST, TABLENAME + "." + TO_TECNICO_SUPERIOR_HST, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, ESTABELECIMENTO_ID, ESTADO, + TECNICO_HST, OBSERVACOES, TECNICO_SUPERIOR_HST, }; + + + 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, ESTADO, + TECNICO_HST, OBSERVACOES, TECNICO_SUPERIOR_HST, }; + + 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; + private siprp.data.outer.EstabelecimentosData to_estabelecimento_id; + private Integer estado; + private Integer tecnico_hst; + private siprp.data.outer.MarcacoesTecnicosHstData to_tecnico_hst; + private String observacoes; + private Integer tecnico_superior_hst; + private siprp.data.outer.MarcacoesTecnicosHstData to_tecnico_superior_hst; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public MarcacoesEstabelecimento() + { + super(); + dirtyProperties = new boolean[]{ false, 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 + { + setLockedForRefresh( true ); + 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.ListfromHsRelatorio_marcacao_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.HsRelatorioData.class , getPrimaryKey().getMap().get("id"), "marcacao_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromLembretes_marcacao_estabelecimento_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.LembretesData.class , getPrimaryKey().getMap().get("id"), "marcacao_estabelecimento_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 getEstado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESTADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.estado; + } + + public void setEstado( Integer estado ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESTADO, estado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.estado = estado; + LAZY_LOADED_OBJECTS.put( ESTADO, Boolean.TRUE ); + } + + public Integer getTecnico_hst() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TECNICO_HST ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tecnico_hst; + } + + public void setTecnico_hst( Integer tecnico_hst ) + { + try + { + setLockedForRefresh( true ); + preProcess( TECNICO_HST, tecnico_hst ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tecnico_hst = tecnico_hst; + LAZY_LOADED_OBJECTS.put( TECNICO_HST, Boolean.TRUE ); + } + + public siprp.data.outer.MarcacoesTecnicosHstData toTecnico_hst() + { + try + { + prepare( TO_TECNICO_HST ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_tecnico_hst; + } + + public void setToTecnico_hst( siprp.data.outer.MarcacoesTecnicosHstData to_tecnico_hst ) + { + try + { + preProcess( TO_TECNICO_HST, to_tecnico_hst ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_tecnico_hst = to_tecnico_hst; + } + + public String getObservacoes() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OBSERVACOES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.observacoes; + } + + public void setObservacoes( String observacoes ) + { + try + { + setLockedForRefresh( true ); + preProcess( OBSERVACOES, observacoes ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.observacoes = observacoes; + LAZY_LOADED_OBJECTS.put( OBSERVACOES, Boolean.TRUE ); + } + + public Integer getTecnico_superior_hst() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TECNICO_SUPERIOR_HST ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tecnico_superior_hst; + } + + public void setTecnico_superior_hst( Integer tecnico_superior_hst ) + { + try + { + setLockedForRefresh( true ); + preProcess( TECNICO_SUPERIOR_HST, tecnico_superior_hst ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tecnico_superior_hst = tecnico_superior_hst; + LAZY_LOADED_OBJECTS.put( TECNICO_SUPERIOR_HST, Boolean.TRUE ); + } + + public siprp.data.outer.MarcacoesTecnicosHstData toTecnico_superior_hst() + { + try + { + prepare( TO_TECNICO_SUPERIOR_HST ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_tecnico_superior_hst; + } + + public void setToTecnico_superior_hst( siprp.data.outer.MarcacoesTecnicosHstData to_tecnico_superior_hst ) + { + try + { + preProcess( TO_TECNICO_SUPERIOR_HST, to_tecnico_superior_hst ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_tecnico_superior_hst = to_tecnico_superior_hst; + } + + 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; + case MarcacoesEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + value = toEstabelecimento_id(); + break; + case MarcacoesEstabelecimento.ESTADO_INDEX: + value = getEstado(); + break; + case MarcacoesEstabelecimento.TECNICO_HST_INDEX: + value = getTecnico_hst(); + break; + case MarcacoesEstabelecimento.TO_TECNICO_HST_INDEX: + value = toTecnico_hst(); + break; + case MarcacoesEstabelecimento.OBSERVACOES_INDEX: + value = getObservacoes(); + break; + case MarcacoesEstabelecimento.TECNICO_SUPERIOR_HST_INDEX: + value = getTecnico_superior_hst(); + break; + case MarcacoesEstabelecimento.TO_TECNICO_SUPERIOR_HST_INDEX: + value = toTecnico_superior_hst(); + 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; + case MarcacoesEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + value = this.to_estabelecimento_id; + break; + case MarcacoesEstabelecimento.ESTADO_INDEX: + value = this.estado; + break; + case MarcacoesEstabelecimento.TECNICO_HST_INDEX: + value = this.tecnico_hst; + break; + case MarcacoesEstabelecimento.TO_TECNICO_HST_INDEX: + value = this.to_tecnico_hst; + break; + case MarcacoesEstabelecimento.OBSERVACOES_INDEX: + value = this.observacoes; + break; + case MarcacoesEstabelecimento.TECNICO_SUPERIOR_HST_INDEX: + value = this.tecnico_superior_hst; + break; + case MarcacoesEstabelecimento.TO_TECNICO_SUPERIOR_HST_INDEX: + value = this.to_tecnico_superior_hst; + 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; + case MarcacoesEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( siprp.data.outer.EstabelecimentosData ) value ); + break; + case MarcacoesEstabelecimento.ESTADO_INDEX: + setEstado( ( Integer ) value ); + break; + case MarcacoesEstabelecimento.TECNICO_HST_INDEX: + setTecnico_hst( ( Integer ) value ); + break; + case MarcacoesEstabelecimento.TO_TECNICO_HST_INDEX: + setToTecnico_hst( ( siprp.data.outer.MarcacoesTecnicosHstData ) value ); + break; + case MarcacoesEstabelecimento.OBSERVACOES_INDEX: + setObservacoes( ( String ) value ); + break; + case MarcacoesEstabelecimento.TECNICO_SUPERIOR_HST_INDEX: + setTecnico_superior_hst( ( Integer ) value ); + break; + case MarcacoesEstabelecimento.TO_TECNICO_SUPERIOR_HST_INDEX: + setToTecnico_superior_hst( ( siprp.data.outer.MarcacoesTecnicosHstData ) 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; + case MarcacoesEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + this.to_estabelecimento_id = ( siprp.data.outer.EstabelecimentosData ) value; + break; + case MarcacoesEstabelecimento.ESTADO_INDEX: + this.estado = ( Integer ) value; + break; + case MarcacoesEstabelecimento.TECNICO_HST_INDEX: + this.tecnico_hst = ( Integer ) value; + break; + case MarcacoesEstabelecimento.TO_TECNICO_HST_INDEX: + this.to_tecnico_hst = ( siprp.data.outer.MarcacoesTecnicosHstData ) value; + break; + case MarcacoesEstabelecimento.OBSERVACOES_INDEX: + this.observacoes = ( String ) value; + break; + case MarcacoesEstabelecimento.TECNICO_SUPERIOR_HST_INDEX: + this.tecnico_superior_hst = ( Integer ) value; + break; + case MarcacoesEstabelecimento.TO_TECNICO_SUPERIOR_HST_INDEX: + this.to_tecnico_superior_hst = ( siprp.data.outer.MarcacoesTecnicosHstData ) 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; + case MarcacoesEstabelecimento.TO_ESTABELECIMENTO_ID_INDEX: + theClass = siprp.data.outer.EstabelecimentosData.class; + break; + case MarcacoesEstabelecimento.ESTADO_INDEX: + theClass = Integer.class; + break; + case MarcacoesEstabelecimento.TECNICO_HST_INDEX: + theClass = Integer.class; + break; + case MarcacoesEstabelecimento.TO_TECNICO_HST_INDEX: + theClass = siprp.data.outer.MarcacoesTecnicosHstData.class; + break; + case MarcacoesEstabelecimento.OBSERVACOES_INDEX: + theClass = String.class; + break; + case MarcacoesEstabelecimento.TECNICO_SUPERIOR_HST_INDEX: + theClass = Integer.class; + break; + case MarcacoesEstabelecimento.TO_TECNICO_SUPERIOR_HST_INDEX: + theClass = siprp.data.outer.MarcacoesTecnicosHstData.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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/MarcacoesGruposRealizados.java b/trunk/SIPRPSoft/src/siprp/data/inner/MarcacoesGruposRealizados.java new file mode 100644 index 00000000..fa74d609 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/MarcacoesGruposRealizados.java @@ -0,0 +1,534 @@ +/* +* MarcacoesGruposRealizados.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class MarcacoesGruposRealizados extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( MarcacoesGruposRealizados.ID, MarcacoesGruposRealizados.ID_INDEX ); + FIELD_INDEXES.put( MarcacoesGruposRealizados.ID_FULL, MarcacoesGruposRealizados.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( MarcacoesGruposRealizados.CLASS_IDENTIFIER, MarcacoesGruposRealizados.MARCACAO_TRABALHADOR_ID, MarcacoesGruposRealizados.TO_MARCACAO_TRABALHADOR_ID ); + FIELD_INDEXES.put( MarcacoesGruposRealizados.MARCACAO_TRABALHADOR_ID, MarcacoesGruposRealizados.MARCACAO_TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesGruposRealizados.MARCACAO_TRABALHADOR_ID_FULL, MarcacoesGruposRealizados.MARCACAO_TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesGruposRealizados.TO_MARCACAO_TRABALHADOR_ID, MarcacoesGruposRealizados.TO_MARCACAO_TRABALHADOR_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( MarcacoesGruposRealizados.CLASS_IDENTIFIER, MarcacoesGruposRealizados.GRUPO_PROTOCOLO_ID, MarcacoesGruposRealizados.TO_GRUPO_PROTOCOLO_ID ); + FIELD_INDEXES.put( MarcacoesGruposRealizados.GRUPO_PROTOCOLO_ID, MarcacoesGruposRealizados.GRUPO_PROTOCOLO_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesGruposRealizados.GRUPO_PROTOCOLO_ID_FULL, MarcacoesGruposRealizados.GRUPO_PROTOCOLO_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesGruposRealizados.TO_GRUPO_PROTOCOLO_ID, MarcacoesGruposRealizados.TO_GRUPO_PROTOCOLO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( MarcacoesGruposRealizados.CLASS_IDENTIFIER, MarcacoesGruposRealizados.MARCACOES_TRABALHADOR_ESTADO_ID, MarcacoesGruposRealizados.TO_MARCACOES_TRABALHADOR_ESTADO_ID ); + FIELD_INDEXES.put( MarcacoesGruposRealizados.MARCACOES_TRABALHADOR_ESTADO_ID, MarcacoesGruposRealizados.MARCACOES_TRABALHADOR_ESTADO_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesGruposRealizados.MARCACOES_TRABALHADOR_ESTADO_ID_FULL, MarcacoesGruposRealizados.MARCACOES_TRABALHADOR_ESTADO_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesGruposRealizados.TO_MARCACOES_TRABALHADOR_ESTADO_ID, MarcacoesGruposRealizados.TO_MARCACOES_TRABALHADOR_ESTADO_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 ForeignKeymarcacao_trabalhador_idTomarcacoes_trabalhador = + new com.evolute.entity.ForeignKey( MarcacoesGruposRealizados.class, MarcacoesGruposRealizados.MARCACAO_TRABALHADOR_ID, siprp.data.outer.MarcacoesTrabalhadorData.class, siprp.data.outer.MarcacoesTrabalhadorData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeygrupo_protocolo_idToprt_grupos_protocolo = + new com.evolute.entity.ForeignKey( MarcacoesGruposRealizados.class, MarcacoesGruposRealizados.GRUPO_PROTOCOLO_ID, siprp.data.outer.PrtGruposProtocoloData.class, siprp.data.outer.PrtGruposProtocoloData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeymarcacoes_trabalhador_estado_idTomarcacoes_trabalhador_estados = + new com.evolute.entity.ForeignKey( MarcacoesGruposRealizados.class, MarcacoesGruposRealizados.MARCACOES_TRABALHADOR_ESTADO_ID, siprp.data.outer.MarcacoesTrabalhadorEstadosData.class, siprp.data.outer.MarcacoesTrabalhadorEstadosData.ID ); + + public static final String TABLENAME = "marcacoes_grupos_realizados"; + + + public static final String CLASS_IDENTIFIER = "marcacoes_grupos_realizados1277401737177"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "marcacoes_grupos_realizados.id"; + public static final int ID_INDEX = 0; + public static final String MARCACAO_TRABALHADOR_ID = "marcacao_trabalhador_id"; + public static final String MARCACAO_TRABALHADOR_ID_FULL = "marcacoes_grupos_realizados.marcacao_trabalhador_id"; + public static final int MARCACAO_TRABALHADOR_ID_INDEX = 1; + public static final String TO_MARCACAO_TRABALHADOR_ID = "to_marcacao_trabalhador_id"; + public static final int TO_MARCACAO_TRABALHADOR_ID_INDEX = 2; + public static final String GRUPO_PROTOCOLO_ID = "grupo_protocolo_id"; + public static final String GRUPO_PROTOCOLO_ID_FULL = "marcacoes_grupos_realizados.grupo_protocolo_id"; + public static final int GRUPO_PROTOCOLO_ID_INDEX = 3; + public static final String TO_GRUPO_PROTOCOLO_ID = "to_grupo_protocolo_id"; + public static final int TO_GRUPO_PROTOCOLO_ID_INDEX = 4; + public static final String MARCACOES_TRABALHADOR_ESTADO_ID = "marcacoes_trabalhador_estado_id"; + public static final String MARCACOES_TRABALHADOR_ESTADO_ID_FULL = "marcacoes_grupos_realizados.marcacoes_trabalhador_estado_id"; + public static final int MARCACOES_TRABALHADOR_ESTADO_ID_INDEX = 5; + public static final String TO_MARCACOES_TRABALHADOR_ESTADO_ID = "to_marcacoes_trabalhador_estado_id"; + public static final int TO_MARCACOES_TRABALHADOR_ESTADO_ID_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + MARCACAO_TRABALHADOR_ID, TO_MARCACAO_TRABALHADOR_ID, GRUPO_PROTOCOLO_ID, + TO_GRUPO_PROTOCOLO_ID, MARCACOES_TRABALHADOR_ESTADO_ID, + TO_MARCACOES_TRABALHADOR_ESTADO_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + MARCACAO_TRABALHADOR_ID, TABLENAME + "." + TO_MARCACAO_TRABALHADOR_ID, TABLENAME + "." + GRUPO_PROTOCOLO_ID, + TABLENAME + "." + TO_GRUPO_PROTOCOLO_ID, TABLENAME + "." + MARCACOES_TRABALHADOR_ESTADO_ID, + TABLENAME + "." + TO_MARCACOES_TRABALHADOR_ESTADO_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, MARCACAO_TRABALHADOR_ID, GRUPO_PROTOCOLO_ID, + MARCACOES_TRABALHADOR_ESTADO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, MARCACAO_TRABALHADOR_ID, GRUPO_PROTOCOLO_ID, + MARCACOES_TRABALHADOR_ESTADO_ID, }; + + private Integer id; + private Integer marcacao_trabalhador_id; + private siprp.data.outer.MarcacoesTrabalhadorData to_marcacao_trabalhador_id; + private Integer grupo_protocolo_id; + private siprp.data.outer.PrtGruposProtocoloData to_grupo_protocolo_id; + private Integer marcacoes_trabalhador_estado_id; + private siprp.data.outer.MarcacoesTrabalhadorEstadosData to_marcacoes_trabalhador_estado_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public MarcacoesGruposRealizados() + { + 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 + { + setLockedForRefresh( true ); + 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 getMarcacao_trabalhador_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MARCACAO_TRABALHADOR_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.marcacao_trabalhador_id; + } + + public void setMarcacao_trabalhador_id( Integer marcacao_trabalhador_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( MARCACAO_TRABALHADOR_ID, marcacao_trabalhador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.marcacao_trabalhador_id = marcacao_trabalhador_id; + LAZY_LOADED_OBJECTS.put( MARCACAO_TRABALHADOR_ID, Boolean.TRUE ); + } + + public siprp.data.outer.MarcacoesTrabalhadorData toMarcacao_trabalhador_id() + { + try + { + prepare( TO_MARCACAO_TRABALHADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_marcacao_trabalhador_id; + } + + public void setToMarcacao_trabalhador_id( siprp.data.outer.MarcacoesTrabalhadorData to_marcacao_trabalhador_id ) + { + try + { + preProcess( TO_MARCACAO_TRABALHADOR_ID, to_marcacao_trabalhador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_marcacao_trabalhador_id = to_marcacao_trabalhador_id; + } + + public Integer getGrupo_protocolo_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( GRUPO_PROTOCOLO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.grupo_protocolo_id; + } + + public void setGrupo_protocolo_id( Integer grupo_protocolo_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( GRUPO_PROTOCOLO_ID, grupo_protocolo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.grupo_protocolo_id = grupo_protocolo_id; + LAZY_LOADED_OBJECTS.put( GRUPO_PROTOCOLO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.PrtGruposProtocoloData toGrupo_protocolo_id() + { + try + { + prepare( TO_GRUPO_PROTOCOLO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_grupo_protocolo_id; + } + + public void setToGrupo_protocolo_id( siprp.data.outer.PrtGruposProtocoloData to_grupo_protocolo_id ) + { + try + { + preProcess( TO_GRUPO_PROTOCOLO_ID, to_grupo_protocolo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_grupo_protocolo_id = to_grupo_protocolo_id; + } + + public Integer getMarcacoes_trabalhador_estado_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MARCACOES_TRABALHADOR_ESTADO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.marcacoes_trabalhador_estado_id; + } + + public void setMarcacoes_trabalhador_estado_id( Integer marcacoes_trabalhador_estado_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( MARCACOES_TRABALHADOR_ESTADO_ID, marcacoes_trabalhador_estado_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.marcacoes_trabalhador_estado_id = marcacoes_trabalhador_estado_id; + LAZY_LOADED_OBJECTS.put( MARCACOES_TRABALHADOR_ESTADO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.MarcacoesTrabalhadorEstadosData toMarcacoes_trabalhador_estado_id() + { + try + { + prepare( TO_MARCACOES_TRABALHADOR_ESTADO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_marcacoes_trabalhador_estado_id; + } + + public void setToMarcacoes_trabalhador_estado_id( siprp.data.outer.MarcacoesTrabalhadorEstadosData to_marcacoes_trabalhador_estado_id ) + { + try + { + preProcess( TO_MARCACOES_TRABALHADOR_ESTADO_ID, to_marcacoes_trabalhador_estado_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_marcacoes_trabalhador_estado_id = to_marcacoes_trabalhador_estado_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesGruposRealizados.ID_INDEX: + value = getId(); + break; + case MarcacoesGruposRealizados.MARCACAO_TRABALHADOR_ID_INDEX: + value = getMarcacao_trabalhador_id(); + break; + case MarcacoesGruposRealizados.TO_MARCACAO_TRABALHADOR_ID_INDEX: + value = toMarcacao_trabalhador_id(); + break; + case MarcacoesGruposRealizados.GRUPO_PROTOCOLO_ID_INDEX: + value = getGrupo_protocolo_id(); + break; + case MarcacoesGruposRealizados.TO_GRUPO_PROTOCOLO_ID_INDEX: + value = toGrupo_protocolo_id(); + break; + case MarcacoesGruposRealizados.MARCACOES_TRABALHADOR_ESTADO_ID_INDEX: + value = getMarcacoes_trabalhador_estado_id(); + break; + case MarcacoesGruposRealizados.TO_MARCACOES_TRABALHADOR_ESTADO_ID_INDEX: + value = toMarcacoes_trabalhador_estado_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesGruposRealizados.ID_INDEX: + value = this.id; + break; + case MarcacoesGruposRealizados.MARCACAO_TRABALHADOR_ID_INDEX: + value = this.marcacao_trabalhador_id; + break; + case MarcacoesGruposRealizados.TO_MARCACAO_TRABALHADOR_ID_INDEX: + value = this.to_marcacao_trabalhador_id; + break; + case MarcacoesGruposRealizados.GRUPO_PROTOCOLO_ID_INDEX: + value = this.grupo_protocolo_id; + break; + case MarcacoesGruposRealizados.TO_GRUPO_PROTOCOLO_ID_INDEX: + value = this.to_grupo_protocolo_id; + break; + case MarcacoesGruposRealizados.MARCACOES_TRABALHADOR_ESTADO_ID_INDEX: + value = this.marcacoes_trabalhador_estado_id; + break; + case MarcacoesGruposRealizados.TO_MARCACOES_TRABALHADOR_ESTADO_ID_INDEX: + value = this.to_marcacoes_trabalhador_estado_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesGruposRealizados.ID_INDEX: + setId( ( Integer ) value ); + break; + case MarcacoesGruposRealizados.MARCACAO_TRABALHADOR_ID_INDEX: + setMarcacao_trabalhador_id( ( Integer ) value ); + break; + case MarcacoesGruposRealizados.TO_MARCACAO_TRABALHADOR_ID_INDEX: + setToMarcacao_trabalhador_id( ( siprp.data.outer.MarcacoesTrabalhadorData ) value ); + break; + case MarcacoesGruposRealizados.GRUPO_PROTOCOLO_ID_INDEX: + setGrupo_protocolo_id( ( Integer ) value ); + break; + case MarcacoesGruposRealizados.TO_GRUPO_PROTOCOLO_ID_INDEX: + setToGrupo_protocolo_id( ( siprp.data.outer.PrtGruposProtocoloData ) value ); + break; + case MarcacoesGruposRealizados.MARCACOES_TRABALHADOR_ESTADO_ID_INDEX: + setMarcacoes_trabalhador_estado_id( ( Integer ) value ); + break; + case MarcacoesGruposRealizados.TO_MARCACOES_TRABALHADOR_ESTADO_ID_INDEX: + setToMarcacoes_trabalhador_estado_id( ( siprp.data.outer.MarcacoesTrabalhadorEstadosData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesGruposRealizados.ID_INDEX: + this.id = ( Integer ) value; + break; + case MarcacoesGruposRealizados.MARCACAO_TRABALHADOR_ID_INDEX: + this.marcacao_trabalhador_id = ( Integer ) value; + break; + case MarcacoesGruposRealizados.TO_MARCACAO_TRABALHADOR_ID_INDEX: + this.to_marcacao_trabalhador_id = ( siprp.data.outer.MarcacoesTrabalhadorData ) value; + break; + case MarcacoesGruposRealizados.GRUPO_PROTOCOLO_ID_INDEX: + this.grupo_protocolo_id = ( Integer ) value; + break; + case MarcacoesGruposRealizados.TO_GRUPO_PROTOCOLO_ID_INDEX: + this.to_grupo_protocolo_id = ( siprp.data.outer.PrtGruposProtocoloData ) value; + break; + case MarcacoesGruposRealizados.MARCACOES_TRABALHADOR_ESTADO_ID_INDEX: + this.marcacoes_trabalhador_estado_id = ( Integer ) value; + break; + case MarcacoesGruposRealizados.TO_MARCACOES_TRABALHADOR_ESTADO_ID_INDEX: + this.to_marcacoes_trabalhador_estado_id = ( siprp.data.outer.MarcacoesTrabalhadorEstadosData ) 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 MarcacoesGruposRealizados.ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesGruposRealizados.MARCACAO_TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesGruposRealizados.TO_MARCACAO_TRABALHADOR_ID_INDEX: + theClass = siprp.data.outer.MarcacoesTrabalhadorData.class; + break; + case MarcacoesGruposRealizados.GRUPO_PROTOCOLO_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesGruposRealizados.TO_GRUPO_PROTOCOLO_ID_INDEX: + theClass = siprp.data.outer.PrtGruposProtocoloData.class; + break; + case MarcacoesGruposRealizados.MARCACOES_TRABALHADOR_ESTADO_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesGruposRealizados.TO_MARCACOES_TRABALHADOR_ESTADO_ID_INDEX: + theClass = siprp.data.outer.MarcacoesTrabalhadorEstadosData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : MarcacoesGruposRealizados._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, MarcacoesGruposRealizados.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/MarcacoesTecnicosHst.java b/trunk/SIPRPSoft/src/siprp/data/inner/MarcacoesTecnicosHst.java new file mode 100644 index 00000000..4e6feb05 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/MarcacoesTecnicosHst.java @@ -0,0 +1,761 @@ +/* +* MarcacoesTecnicosHst.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class MarcacoesTecnicosHst extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( MarcacoesTecnicosHst.ID, MarcacoesTecnicosHst.ID_INDEX ); + FIELD_INDEXES.put( MarcacoesTecnicosHst.ID_FULL, MarcacoesTecnicosHst.ID_INDEX ); + FIELD_INDEXES.put( MarcacoesTecnicosHst.NOME, MarcacoesTecnicosHst.NOME_INDEX ); + FIELD_INDEXES.put( MarcacoesTecnicosHst.NOME_FULL, MarcacoesTecnicosHst.NOME_INDEX ); + FIELD_INDEXES.put( MarcacoesTecnicosHst.NOME_PLAIN, MarcacoesTecnicosHst.NOME_PLAIN_INDEX ); + FIELD_INDEXES.put( MarcacoesTecnicosHst.NOME_PLAIN_FULL, MarcacoesTecnicosHst.NOME_PLAIN_INDEX ); + FIELD_INDEXES.put( MarcacoesTecnicosHst.INICIAIS, MarcacoesTecnicosHst.INICIAIS_INDEX ); + FIELD_INDEXES.put( MarcacoesTecnicosHst.INICIAIS_FULL, MarcacoesTecnicosHst.INICIAIS_INDEX ); + FIELD_INDEXES.put( MarcacoesTecnicosHst.IDENTIFICADOR, MarcacoesTecnicosHst.IDENTIFICADOR_INDEX ); + FIELD_INDEXES.put( MarcacoesTecnicosHst.IDENTIFICADOR_FULL, MarcacoesTecnicosHst.IDENTIFICADOR_INDEX ); + FIELD_INDEXES.put( MarcacoesTecnicosHst.INACTIVO, MarcacoesTecnicosHst.INACTIVO_INDEX ); + FIELD_INDEXES.put( MarcacoesTecnicosHst.INACTIVO_FULL, MarcacoesTecnicosHst.INACTIVO_INDEX ); + FIELD_INDEXES.put( MarcacoesTecnicosHst.CAP, MarcacoesTecnicosHst.CAP_INDEX ); + FIELD_INDEXES.put( MarcacoesTecnicosHst.CAP_FULL, MarcacoesTecnicosHst.CAP_INDEX ); + FIELD_INDEXES.put( MarcacoesTecnicosHst.FORMACAO, MarcacoesTecnicosHst.FORMACAO_INDEX ); + FIELD_INDEXES.put( MarcacoesTecnicosHst.FORMACAO_FULL, MarcacoesTecnicosHst.FORMACAO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( MarcacoesTecnicosHst.CLASS_IDENTIFIER, MarcacoesTecnicosHst.ASSINATURA, MarcacoesTecnicosHst.TO_ASSINATURA ); + FIELD_INDEXES.put( MarcacoesTecnicosHst.ASSINATURA, MarcacoesTecnicosHst.ASSINATURA_INDEX ); + FIELD_INDEXES.put( MarcacoesTecnicosHst.ASSINATURA_FULL, MarcacoesTecnicosHst.ASSINATURA_INDEX ); + FIELD_INDEXES.put( MarcacoesTecnicosHst.TO_ASSINATURA, MarcacoesTecnicosHst.TO_ASSINATURA_INDEX ); + FIELD_INDEXES.put( MarcacoesTecnicosHst.IS_SUPERIOR, MarcacoesTecnicosHst.IS_SUPERIOR_INDEX ); + FIELD_INDEXES.put( MarcacoesTecnicosHst.IS_SUPERIOR_FULL, MarcacoesTecnicosHst.IS_SUPERIOR_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyassinaturaToimage = + new com.evolute.entity.ForeignKey( MarcacoesTecnicosHst.class, MarcacoesTecnicosHst.ASSINATURA, siprp.data.outer.ImageData.class, siprp.data.outer.ImageData.ID ); + + public static final String TABLENAME = "marcacoes_tecnicos_hst"; + + + public static final String CLASS_IDENTIFIER = "marcacoes_tecnicos_hst1277401737178"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "marcacoes_tecnicos_hst.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "marcacoes_tecnicos_hst.nome"; + public static final int NOME_INDEX = 1; + public static final String NOME_PLAIN = "nome_plain"; + public static final String NOME_PLAIN_FULL = "marcacoes_tecnicos_hst.nome_plain"; + public static final int NOME_PLAIN_INDEX = 2; + public static final String INICIAIS = "iniciais"; + public static final String INICIAIS_FULL = "marcacoes_tecnicos_hst.iniciais"; + public static final int INICIAIS_INDEX = 3; + public static final String IDENTIFICADOR = "identificador"; + public static final String IDENTIFICADOR_FULL = "marcacoes_tecnicos_hst.identificador"; + public static final int IDENTIFICADOR_INDEX = 4; + public static final String INACTIVO = "inactivo"; + public static final String INACTIVO_FULL = "marcacoes_tecnicos_hst.inactivo"; + public static final int INACTIVO_INDEX = 5; + public static final String CAP = "cap"; + public static final String CAP_FULL = "marcacoes_tecnicos_hst.cap"; + public static final int CAP_INDEX = 6; + public static final String FORMACAO = "formacao"; + public static final String FORMACAO_FULL = "marcacoes_tecnicos_hst.formacao"; + public static final int FORMACAO_INDEX = 7; + public static final String ASSINATURA = "assinatura"; + public static final String ASSINATURA_FULL = "marcacoes_tecnicos_hst.assinatura"; + public static final int ASSINATURA_INDEX = 8; + public static final String TO_ASSINATURA = "to_assinatura"; + public static final int TO_ASSINATURA_INDEX = 9; + public static final String IS_SUPERIOR = "is_superior"; + public static final String IS_SUPERIOR_FULL = "marcacoes_tecnicos_hst.is_superior"; + public static final int IS_SUPERIOR_INDEX = 10; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, NOME_PLAIN, INICIAIS, IDENTIFICADOR, INACTIVO, CAP, FORMACAO, ASSINATURA, + TO_ASSINATURA, IS_SUPERIOR, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, TABLENAME + "." + NOME_PLAIN, TABLENAME + "." + INICIAIS, TABLENAME + "." + IDENTIFICADOR, TABLENAME + "." + INACTIVO, TABLENAME + "." + CAP, TABLENAME + "." + FORMACAO, TABLENAME + "." + ASSINATURA, + TABLENAME + "." + TO_ASSINATURA, TABLENAME + "." + IS_SUPERIOR, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, NOME_PLAIN, INICIAIS, IDENTIFICADOR, INACTIVO, CAP, FORMACAO, ASSINATURA, + IS_SUPERIOR, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, NOME_PLAIN, INICIAIS, IDENTIFICADOR, INACTIVO, CAP, FORMACAO, ASSINATURA, + IS_SUPERIOR, }; + + private Integer id; + private String nome; + private String nome_plain; + private String iniciais; + private Integer identificador; + private String inactivo; + private String cap; + private String formacao; + private Integer assinatura; + private siprp.data.outer.ImageData to_assinatura; + private String is_superior; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public MarcacoesTecnicosHst() + { + 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 + { + setLockedForRefresh( true ); + 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.ListfromMarcacoesEstabelecimento_tecnico_hst() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.MarcacoesEstabelecimentoData.class , getPrimaryKey().getMap().get("id"), "tecnico_hst" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromMarcacoesEstabelecimento_tecnico_superior_hst() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.MarcacoesEstabelecimentoData.class , getPrimaryKey().getMap().get("id"), "tecnico_superior_hst" ); + } + 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 + { + setLockedForRefresh( true ); + 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 getNome_plain() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME_PLAIN ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome_plain; + } + + public void setNome_plain( String nome_plain ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOME_PLAIN, nome_plain ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nome_plain = nome_plain; + LAZY_LOADED_OBJECTS.put( NOME_PLAIN, Boolean.TRUE ); + } + + public String getIniciais() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( INICIAIS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.iniciais; + } + + public void setIniciais( String iniciais ) + { + try + { + setLockedForRefresh( true ); + preProcess( INICIAIS, iniciais ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.iniciais = iniciais; + LAZY_LOADED_OBJECTS.put( INICIAIS, Boolean.TRUE ); + } + + public Integer getIdentificador() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IDENTIFICADOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.identificador; + } + + public void setIdentificador( Integer identificador ) + { + try + { + setLockedForRefresh( true ); + preProcess( IDENTIFICADOR, identificador ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.identificador = identificador; + LAZY_LOADED_OBJECTS.put( IDENTIFICADOR, 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 + { + setLockedForRefresh( true ); + 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 String getCap() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CAP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.cap; + } + + public void setCap( String cap ) + { + try + { + setLockedForRefresh( true ); + preProcess( CAP, cap ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.cap = cap; + LAZY_LOADED_OBJECTS.put( CAP, Boolean.TRUE ); + } + + public String getFormacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FORMACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.formacao; + } + + public void setFormacao( String formacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( FORMACAO, formacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.formacao = formacao; + LAZY_LOADED_OBJECTS.put( FORMACAO, Boolean.TRUE ); + } + + public Integer getAssinatura() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ASSINATURA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.assinatura; + } + + public void setAssinatura( Integer assinatura ) + { + try + { + setLockedForRefresh( true ); + preProcess( ASSINATURA, assinatura ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.assinatura = assinatura; + LAZY_LOADED_OBJECTS.put( ASSINATURA, Boolean.TRUE ); + } + + public siprp.data.outer.ImageData toAssinatura() + { + try + { + prepare( TO_ASSINATURA ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_assinatura; + } + + public void setToAssinatura( siprp.data.outer.ImageData to_assinatura ) + { + try + { + preProcess( TO_ASSINATURA, to_assinatura ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_assinatura = to_assinatura; + } + + public String getIs_superior() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( IS_SUPERIOR ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.is_superior; + } + + public void setIs_superior( String is_superior ) + { + try + { + setLockedForRefresh( true ); + preProcess( IS_SUPERIOR, is_superior ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.is_superior = is_superior; + LAZY_LOADED_OBJECTS.put( IS_SUPERIOR, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesTecnicosHst.ID_INDEX: + value = getId(); + break; + case MarcacoesTecnicosHst.NOME_INDEX: + value = getNome(); + break; + case MarcacoesTecnicosHst.NOME_PLAIN_INDEX: + value = getNome_plain(); + break; + case MarcacoesTecnicosHst.INICIAIS_INDEX: + value = getIniciais(); + break; + case MarcacoesTecnicosHst.IDENTIFICADOR_INDEX: + value = getIdentificador(); + break; + case MarcacoesTecnicosHst.INACTIVO_INDEX: + value = getInactivo(); + break; + case MarcacoesTecnicosHst.CAP_INDEX: + value = getCap(); + break; + case MarcacoesTecnicosHst.FORMACAO_INDEX: + value = getFormacao(); + break; + case MarcacoesTecnicosHst.ASSINATURA_INDEX: + value = getAssinatura(); + break; + case MarcacoesTecnicosHst.TO_ASSINATURA_INDEX: + value = toAssinatura(); + break; + case MarcacoesTecnicosHst.IS_SUPERIOR_INDEX: + value = getIs_superior(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesTecnicosHst.ID_INDEX: + value = this.id; + break; + case MarcacoesTecnicosHst.NOME_INDEX: + value = this.nome; + break; + case MarcacoesTecnicosHst.NOME_PLAIN_INDEX: + value = this.nome_plain; + break; + case MarcacoesTecnicosHst.INICIAIS_INDEX: + value = this.iniciais; + break; + case MarcacoesTecnicosHst.IDENTIFICADOR_INDEX: + value = this.identificador; + break; + case MarcacoesTecnicosHst.INACTIVO_INDEX: + value = this.inactivo; + break; + case MarcacoesTecnicosHst.CAP_INDEX: + value = this.cap; + break; + case MarcacoesTecnicosHst.FORMACAO_INDEX: + value = this.formacao; + break; + case MarcacoesTecnicosHst.ASSINATURA_INDEX: + value = this.assinatura; + break; + case MarcacoesTecnicosHst.TO_ASSINATURA_INDEX: + value = this.to_assinatura; + break; + case MarcacoesTecnicosHst.IS_SUPERIOR_INDEX: + value = this.is_superior; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesTecnicosHst.ID_INDEX: + setId( ( Integer ) value ); + break; + case MarcacoesTecnicosHst.NOME_INDEX: + setNome( ( String ) value ); + break; + case MarcacoesTecnicosHst.NOME_PLAIN_INDEX: + setNome_plain( ( String ) value ); + break; + case MarcacoesTecnicosHst.INICIAIS_INDEX: + setIniciais( ( String ) value ); + break; + case MarcacoesTecnicosHst.IDENTIFICADOR_INDEX: + setIdentificador( ( Integer ) value ); + break; + case MarcacoesTecnicosHst.INACTIVO_INDEX: + setInactivo( ( String ) value ); + break; + case MarcacoesTecnicosHst.CAP_INDEX: + setCap( ( String ) value ); + break; + case MarcacoesTecnicosHst.FORMACAO_INDEX: + setFormacao( ( String ) value ); + break; + case MarcacoesTecnicosHst.ASSINATURA_INDEX: + setAssinatura( ( Integer ) value ); + break; + case MarcacoesTecnicosHst.TO_ASSINATURA_INDEX: + setToAssinatura( ( siprp.data.outer.ImageData ) value ); + break; + case MarcacoesTecnicosHst.IS_SUPERIOR_INDEX: + setIs_superior( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesTecnicosHst.ID_INDEX: + this.id = ( Integer ) value; + break; + case MarcacoesTecnicosHst.NOME_INDEX: + this.nome = ( String ) value; + break; + case MarcacoesTecnicosHst.NOME_PLAIN_INDEX: + this.nome_plain = ( String ) value; + break; + case MarcacoesTecnicosHst.INICIAIS_INDEX: + this.iniciais = ( String ) value; + break; + case MarcacoesTecnicosHst.IDENTIFICADOR_INDEX: + this.identificador = ( Integer ) value; + break; + case MarcacoesTecnicosHst.INACTIVO_INDEX: + this.inactivo = ( String ) value; + break; + case MarcacoesTecnicosHst.CAP_INDEX: + this.cap = ( String ) value; + break; + case MarcacoesTecnicosHst.FORMACAO_INDEX: + this.formacao = ( String ) value; + break; + case MarcacoesTecnicosHst.ASSINATURA_INDEX: + this.assinatura = ( Integer ) value; + break; + case MarcacoesTecnicosHst.TO_ASSINATURA_INDEX: + this.to_assinatura = ( siprp.data.outer.ImageData ) value; + break; + case MarcacoesTecnicosHst.IS_SUPERIOR_INDEX: + this.is_superior = ( 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 MarcacoesTecnicosHst.ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesTecnicosHst.NOME_INDEX: + theClass = String.class; + break; + case MarcacoesTecnicosHst.NOME_PLAIN_INDEX: + theClass = String.class; + break; + case MarcacoesTecnicosHst.INICIAIS_INDEX: + theClass = String.class; + break; + case MarcacoesTecnicosHst.IDENTIFICADOR_INDEX: + theClass = Integer.class; + break; + case MarcacoesTecnicosHst.INACTIVO_INDEX: + theClass = String.class; + break; + case MarcacoesTecnicosHst.CAP_INDEX: + theClass = String.class; + break; + case MarcacoesTecnicosHst.FORMACAO_INDEX: + theClass = String.class; + break; + case MarcacoesTecnicosHst.ASSINATURA_INDEX: + theClass = Integer.class; + break; + case MarcacoesTecnicosHst.TO_ASSINATURA_INDEX: + theClass = siprp.data.outer.ImageData.class; + break; + case MarcacoesTecnicosHst.IS_SUPERIOR_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : MarcacoesTecnicosHst._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, MarcacoesTecnicosHst.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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/MarcacoesTrabalhador.java b/trunk/SIPRPSoft/src/siprp/data/inner/MarcacoesTrabalhador.java new file mode 100644 index 00000000..db564005 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/MarcacoesTrabalhador.java @@ -0,0 +1,875 @@ +/* +* MarcacoesTrabalhador.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class MarcacoesTrabalhador extends siprp.data.Marcacao +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + 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 ); + FIELD_INDEXES.put( MarcacoesTrabalhador.MOTIVO, MarcacoesTrabalhador.MOTIVO_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhador.MOTIVO_FULL, MarcacoesTrabalhador.MOTIVO_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhador.ESTADO, MarcacoesTrabalhador.ESTADO_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhador.ESTADO_FULL, MarcacoesTrabalhador.ESTADO_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhador.OBSERVACOES, MarcacoesTrabalhador.OBSERVACOES_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhador.OBSERVACOES_FULL, MarcacoesTrabalhador.OBSERVACOES_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( MarcacoesTrabalhador.CLASS_IDENTIFIER, MarcacoesTrabalhador.PRESTADOR_ID, MarcacoesTrabalhador.TO_PRESTADOR_ID ); + FIELD_INDEXES.put( MarcacoesTrabalhador.PRESTADOR_ID, MarcacoesTrabalhador.PRESTADOR_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhador.PRESTADOR_ID_FULL, MarcacoesTrabalhador.PRESTADOR_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhador.TO_PRESTADOR_ID, MarcacoesTrabalhador.TO_PRESTADOR_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, siprp.data.outer.TrabalhadoresData.class, siprp.data.outer.TrabalhadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprestador_idToprestadores = + new com.evolute.entity.ForeignKey( MarcacoesTrabalhador.class, MarcacoesTrabalhador.PRESTADOR_ID, siprp.data.outer.PrestadoresData.class, siprp.data.outer.PrestadoresData.ID ); + + public static final String TABLENAME = "marcacoes_trabalhador"; + + + public static final String CLASS_IDENTIFIER = "marcacoes_trabalhador1277401737178"; + + 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 int TO_TRABALHADOR_ID_INDEX = 7; + public static final String MOTIVO = "motivo"; + public static final String MOTIVO_FULL = "marcacoes_trabalhador.motivo"; + public static final int MOTIVO_INDEX = 8; + public static final String ESTADO = "estado"; + public static final String ESTADO_FULL = "marcacoes_trabalhador.estado"; + public static final int ESTADO_INDEX = 9; + public static final String OBSERVACOES = "observacoes"; + public static final String OBSERVACOES_FULL = "marcacoes_trabalhador.observacoes"; + public static final int OBSERVACOES_INDEX = 10; + public static final String PRESTADOR_ID = "prestador_id"; + public static final String PRESTADOR_ID_FULL = "marcacoes_trabalhador.prestador_id"; + public static final int PRESTADOR_ID_INDEX = 11; + public static final String TO_PRESTADOR_ID = "to_prestador_id"; + public static final int TO_PRESTADOR_ID_INDEX = 12; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, TIPO, TRABALHADOR_ID, + TO_TRABALHADOR_ID, MOTIVO, ESTADO, OBSERVACOES, PRESTADOR_ID, TO_PRESTADOR_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, TABLENAME + "." + MOTIVO, TABLENAME + "." + ESTADO, TABLENAME + "." + OBSERVACOES, TABLENAME + "." + PRESTADOR_ID, TABLENAME + "." + TO_PRESTADOR_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATA, REALIZADA, DATA_EMAIL, DATA_RELATORIO, TIPO, TRABALHADOR_ID, MOTIVO, ESTADO, + OBSERVACOES, PRESTADOR_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, MOTIVO, ESTADO, + OBSERVACOES, PRESTADOR_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 siprp.data.outer.TrabalhadoresData to_trabalhador_id; + private Integer motivo; + private Integer estado; + private String observacoes; + private Integer prestador_id; + private siprp.data.outer.PrestadoresData to_prestador_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public MarcacoesTrabalhador() + { + super(); + dirtyProperties = new boolean[]{ false, 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 + { + setLockedForRefresh( true ); + 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.ListfromLembretes_marcacao_trabalhador_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.LembretesData.class , getPrimaryKey().getMap().get("id"), "marcacao_trabalhador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromMarcacoesGruposRealizados_marcacao_trabalhador_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.MarcacoesGruposRealizadosData.class , getPrimaryKey().getMap().get("id"), "marcacao_trabalhador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromMarcacoesTrabalhadorEstados_marcacao_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.MarcacoesTrabalhadorEstadosData.class , getPrimaryKey().getMap().get("id"), "marcacao_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 getMotivo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MOTIVO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.motivo; + } + + public void setMotivo( Integer motivo ) + { + try + { + setLockedForRefresh( true ); + preProcess( MOTIVO, motivo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.motivo = motivo; + LAZY_LOADED_OBJECTS.put( MOTIVO, Boolean.TRUE ); + } + + public Integer getEstado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESTADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.estado; + } + + public void setEstado( Integer estado ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESTADO, estado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.estado = estado; + LAZY_LOADED_OBJECTS.put( ESTADO, Boolean.TRUE ); + } + + public String getObservacoes() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OBSERVACOES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.observacoes; + } + + public void setObservacoes( String observacoes ) + { + try + { + setLockedForRefresh( true ); + preProcess( OBSERVACOES, observacoes ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.observacoes = observacoes; + LAZY_LOADED_OBJECTS.put( OBSERVACOES, Boolean.TRUE ); + } + + public Integer getPrestador_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PRESTADOR_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.prestador_id; + } + + public void setPrestador_id( Integer prestador_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PRESTADOR_ID, prestador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.prestador_id = prestador_id; + LAZY_LOADED_OBJECTS.put( PRESTADOR_ID, Boolean.TRUE ); + } + + public siprp.data.outer.PrestadoresData toPrestador_id() + { + try + { + prepare( TO_PRESTADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_prestador_id; + } + + public void setToPrestador_id( siprp.data.outer.PrestadoresData to_prestador_id ) + { + try + { + preProcess( TO_PRESTADOR_ID, to_prestador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_prestador_id = to_prestador_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; + case MarcacoesTrabalhador.MOTIVO_INDEX: + value = getMotivo(); + break; + case MarcacoesTrabalhador.ESTADO_INDEX: + value = getEstado(); + break; + case MarcacoesTrabalhador.OBSERVACOES_INDEX: + value = getObservacoes(); + break; + case MarcacoesTrabalhador.PRESTADOR_ID_INDEX: + value = getPrestador_id(); + break; + case MarcacoesTrabalhador.TO_PRESTADOR_ID_INDEX: + value = toPrestador_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; + case MarcacoesTrabalhador.MOTIVO_INDEX: + value = this.motivo; + break; + case MarcacoesTrabalhador.ESTADO_INDEX: + value = this.estado; + break; + case MarcacoesTrabalhador.OBSERVACOES_INDEX: + value = this.observacoes; + break; + case MarcacoesTrabalhador.PRESTADOR_ID_INDEX: + value = this.prestador_id; + break; + case MarcacoesTrabalhador.TO_PRESTADOR_ID_INDEX: + value = this.to_prestador_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( ( siprp.data.outer.TrabalhadoresData ) value ); + break; + case MarcacoesTrabalhador.MOTIVO_INDEX: + setMotivo( ( Integer ) value ); + break; + case MarcacoesTrabalhador.ESTADO_INDEX: + setEstado( ( Integer ) value ); + break; + case MarcacoesTrabalhador.OBSERVACOES_INDEX: + setObservacoes( ( String ) value ); + break; + case MarcacoesTrabalhador.PRESTADOR_ID_INDEX: + setPrestador_id( ( Integer ) value ); + break; + case MarcacoesTrabalhador.TO_PRESTADOR_ID_INDEX: + setToPrestador_id( ( siprp.data.outer.PrestadoresData ) 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 = ( siprp.data.outer.TrabalhadoresData ) value; + break; + case MarcacoesTrabalhador.MOTIVO_INDEX: + this.motivo = ( Integer ) value; + break; + case MarcacoesTrabalhador.ESTADO_INDEX: + this.estado = ( Integer ) value; + break; + case MarcacoesTrabalhador.OBSERVACOES_INDEX: + this.observacoes = ( String ) value; + break; + case MarcacoesTrabalhador.PRESTADOR_ID_INDEX: + this.prestador_id = ( Integer ) value; + break; + case MarcacoesTrabalhador.TO_PRESTADOR_ID_INDEX: + this.to_prestador_id = ( siprp.data.outer.PrestadoresData ) 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 = siprp.data.outer.TrabalhadoresData.class; + break; + case MarcacoesTrabalhador.MOTIVO_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhador.ESTADO_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhador.OBSERVACOES_INDEX: + theClass = String.class; + break; + case MarcacoesTrabalhador.PRESTADOR_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhador.TO_PRESTADOR_ID_INDEX: + theClass = siprp.data.outer.PrestadoresData.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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/MarcacoesTrabalhadorEstados.java b/trunk/SIPRPSoft/src/siprp/data/inner/MarcacoesTrabalhadorEstados.java new file mode 100644 index 00000000..2338bd6b --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/MarcacoesTrabalhadorEstados.java @@ -0,0 +1,543 @@ +/* +* MarcacoesTrabalhadorEstados.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class MarcacoesTrabalhadorEstados extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( MarcacoesTrabalhadorEstados.ID, MarcacoesTrabalhadorEstados.ID_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhadorEstados.ID_FULL, MarcacoesTrabalhadorEstados.ID_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhadorEstados.DATA, MarcacoesTrabalhadorEstados.DATA_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhadorEstados.DATA_FULL, MarcacoesTrabalhadorEstados.DATA_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhadorEstados.ESTADO, MarcacoesTrabalhadorEstados.ESTADO_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhadorEstados.ESTADO_FULL, MarcacoesTrabalhadorEstados.ESTADO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( MarcacoesTrabalhadorEstados.CLASS_IDENTIFIER, MarcacoesTrabalhadorEstados.MARCACAO_ID, MarcacoesTrabalhadorEstados.TO_MARCACAO_ID ); + FIELD_INDEXES.put( MarcacoesTrabalhadorEstados.MARCACAO_ID, MarcacoesTrabalhadorEstados.MARCACAO_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhadorEstados.MARCACAO_ID_FULL, MarcacoesTrabalhadorEstados.MARCACAO_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhadorEstados.TO_MARCACAO_ID, MarcacoesTrabalhadorEstados.TO_MARCACAO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( MarcacoesTrabalhadorEstados.CLASS_IDENTIFIER, MarcacoesTrabalhadorEstados.PRESTADOR_ID, MarcacoesTrabalhadorEstados.TO_PRESTADOR_ID ); + FIELD_INDEXES.put( MarcacoesTrabalhadorEstados.PRESTADOR_ID, MarcacoesTrabalhadorEstados.PRESTADOR_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhadorEstados.PRESTADOR_ID_FULL, MarcacoesTrabalhadorEstados.PRESTADOR_ID_INDEX ); + FIELD_INDEXES.put( MarcacoesTrabalhadorEstados.TO_PRESTADOR_ID, MarcacoesTrabalhadorEstados.TO_PRESTADOR_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 ForeignKeymarcacao_idTomarcacoes_trabalhador = + new com.evolute.entity.ForeignKey( MarcacoesTrabalhadorEstados.class, MarcacoesTrabalhadorEstados.MARCACAO_ID, siprp.data.outer.MarcacoesTrabalhadorData.class, siprp.data.outer.MarcacoesTrabalhadorData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprestador_idToprestadores = + new com.evolute.entity.ForeignKey( MarcacoesTrabalhadorEstados.class, MarcacoesTrabalhadorEstados.PRESTADOR_ID, siprp.data.outer.PrestadoresData.class, siprp.data.outer.PrestadoresData.ID ); + + public static final String TABLENAME = "marcacoes_trabalhador_estados"; + + + public static final String CLASS_IDENTIFIER = "marcacoes_trabalhador_estados1277401737179"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "marcacoes_trabalhador_estados.id"; + public static final int ID_INDEX = 0; + public static final String DATA = "data"; + public static final String DATA_FULL = "marcacoes_trabalhador_estados.data"; + public static final int DATA_INDEX = 1; + public static final String ESTADO = "estado"; + public static final String ESTADO_FULL = "marcacoes_trabalhador_estados.estado"; + public static final int ESTADO_INDEX = 2; + public static final String MARCACAO_ID = "marcacao_id"; + public static final String MARCACAO_ID_FULL = "marcacoes_trabalhador_estados.marcacao_id"; + public static final int MARCACAO_ID_INDEX = 3; + public static final String TO_MARCACAO_ID = "to_marcacao_id"; + public static final int TO_MARCACAO_ID_INDEX = 4; + public static final String PRESTADOR_ID = "prestador_id"; + public static final String PRESTADOR_ID_FULL = "marcacoes_trabalhador_estados.prestador_id"; + public static final int PRESTADOR_ID_INDEX = 5; + public static final String TO_PRESTADOR_ID = "to_prestador_id"; + public static final int TO_PRESTADOR_ID_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, ESTADO, MARCACAO_ID, TO_MARCACAO_ID, PRESTADOR_ID, TO_PRESTADOR_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DATA, TABLENAME + "." + ESTADO, TABLENAME + "." + MARCACAO_ID, TABLENAME + "." + TO_MARCACAO_ID, TABLENAME + "." + PRESTADOR_ID, TABLENAME + "." + TO_PRESTADOR_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATA, ESTADO, MARCACAO_ID, PRESTADOR_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DATA, ESTADO, MARCACAO_ID, PRESTADOR_ID, }; + + private Integer id; + private java.util.Date data; + private Integer estado; + private Integer marcacao_id; + private siprp.data.outer.MarcacoesTrabalhadorData to_marcacao_id; + private Integer prestador_id; + private siprp.data.outer.PrestadoresData to_prestador_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public MarcacoesTrabalhadorEstados() + { + 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 + { + setLockedForRefresh( true ); + 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.ListfromMarcacoesGruposRealizados_marcacoes_trabalhador_estado_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.MarcacoesGruposRealizadosData.class , getPrimaryKey().getMap().get("id"), "marcacoes_trabalhador_estado_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + 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 + { + setLockedForRefresh( true ); + 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 Integer getEstado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESTADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.estado; + } + + public void setEstado( Integer estado ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESTADO, estado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.estado = estado; + LAZY_LOADED_OBJECTS.put( ESTADO, Boolean.TRUE ); + } + + public Integer getMarcacao_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MARCACAO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.marcacao_id; + } + + public void setMarcacao_id( Integer marcacao_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( MARCACAO_ID, marcacao_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.marcacao_id = marcacao_id; + LAZY_LOADED_OBJECTS.put( MARCACAO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.MarcacoesTrabalhadorData toMarcacao_id() + { + try + { + prepare( TO_MARCACAO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_marcacao_id; + } + + public void setToMarcacao_id( siprp.data.outer.MarcacoesTrabalhadorData to_marcacao_id ) + { + try + { + preProcess( TO_MARCACAO_ID, to_marcacao_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_marcacao_id = to_marcacao_id; + } + + public Integer getPrestador_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PRESTADOR_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.prestador_id; + } + + public void setPrestador_id( Integer prestador_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PRESTADOR_ID, prestador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.prestador_id = prestador_id; + LAZY_LOADED_OBJECTS.put( PRESTADOR_ID, Boolean.TRUE ); + } + + public siprp.data.outer.PrestadoresData toPrestador_id() + { + try + { + prepare( TO_PRESTADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_prestador_id; + } + + public void setToPrestador_id( siprp.data.outer.PrestadoresData to_prestador_id ) + { + try + { + preProcess( TO_PRESTADOR_ID, to_prestador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_prestador_id = to_prestador_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesTrabalhadorEstados.ID_INDEX: + value = getId(); + break; + case MarcacoesTrabalhadorEstados.DATA_INDEX: + value = getData(); + break; + case MarcacoesTrabalhadorEstados.ESTADO_INDEX: + value = getEstado(); + break; + case MarcacoesTrabalhadorEstados.MARCACAO_ID_INDEX: + value = getMarcacao_id(); + break; + case MarcacoesTrabalhadorEstados.TO_MARCACAO_ID_INDEX: + value = toMarcacao_id(); + break; + case MarcacoesTrabalhadorEstados.PRESTADOR_ID_INDEX: + value = getPrestador_id(); + break; + case MarcacoesTrabalhadorEstados.TO_PRESTADOR_ID_INDEX: + value = toPrestador_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesTrabalhadorEstados.ID_INDEX: + value = this.id; + break; + case MarcacoesTrabalhadorEstados.DATA_INDEX: + value = this.data; + break; + case MarcacoesTrabalhadorEstados.ESTADO_INDEX: + value = this.estado; + break; + case MarcacoesTrabalhadorEstados.MARCACAO_ID_INDEX: + value = this.marcacao_id; + break; + case MarcacoesTrabalhadorEstados.TO_MARCACAO_ID_INDEX: + value = this.to_marcacao_id; + break; + case MarcacoesTrabalhadorEstados.PRESTADOR_ID_INDEX: + value = this.prestador_id; + break; + case MarcacoesTrabalhadorEstados.TO_PRESTADOR_ID_INDEX: + value = this.to_prestador_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesTrabalhadorEstados.ID_INDEX: + setId( ( Integer ) value ); + break; + case MarcacoesTrabalhadorEstados.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case MarcacoesTrabalhadorEstados.ESTADO_INDEX: + setEstado( ( Integer ) value ); + break; + case MarcacoesTrabalhadorEstados.MARCACAO_ID_INDEX: + setMarcacao_id( ( Integer ) value ); + break; + case MarcacoesTrabalhadorEstados.TO_MARCACAO_ID_INDEX: + setToMarcacao_id( ( siprp.data.outer.MarcacoesTrabalhadorData ) value ); + break; + case MarcacoesTrabalhadorEstados.PRESTADOR_ID_INDEX: + setPrestador_id( ( Integer ) value ); + break; + case MarcacoesTrabalhadorEstados.TO_PRESTADOR_ID_INDEX: + setToPrestador_id( ( siprp.data.outer.PrestadoresData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case MarcacoesTrabalhadorEstados.ID_INDEX: + this.id = ( Integer ) value; + break; + case MarcacoesTrabalhadorEstados.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case MarcacoesTrabalhadorEstados.ESTADO_INDEX: + this.estado = ( Integer ) value; + break; + case MarcacoesTrabalhadorEstados.MARCACAO_ID_INDEX: + this.marcacao_id = ( Integer ) value; + break; + case MarcacoesTrabalhadorEstados.TO_MARCACAO_ID_INDEX: + this.to_marcacao_id = ( siprp.data.outer.MarcacoesTrabalhadorData ) value; + break; + case MarcacoesTrabalhadorEstados.PRESTADOR_ID_INDEX: + this.prestador_id = ( Integer ) value; + break; + case MarcacoesTrabalhadorEstados.TO_PRESTADOR_ID_INDEX: + this.to_prestador_id = ( siprp.data.outer.PrestadoresData ) 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 MarcacoesTrabalhadorEstados.ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhadorEstados.DATA_INDEX: + theClass = java.util.Date.class; + break; + case MarcacoesTrabalhadorEstados.ESTADO_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhadorEstados.MARCACAO_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhadorEstados.TO_MARCACAO_ID_INDEX: + theClass = siprp.data.outer.MarcacoesTrabalhadorData.class; + break; + case MarcacoesTrabalhadorEstados.PRESTADOR_ID_INDEX: + theClass = Integer.class; + break; + case MarcacoesTrabalhadorEstados.TO_PRESTADOR_ID_INDEX: + theClass = siprp.data.outer.PrestadoresData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : MarcacoesTrabalhadorEstados._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, MarcacoesTrabalhadorEstados.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/Medicos.java b/trunk/SIPRPSoft/src/siprp/data/inner/Medicos.java new file mode 100644 index 00000000..6210379f --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/Medicos.java @@ -0,0 +1,408 @@ +/* +* Medicos.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class Medicos extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + 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 = "medicos1277401737179"; + + 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 + { + setLockedForRefresh( true ); + 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.ListfromEstabelecimentos_medico_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.EstabelecimentosData.class , getPrimaryKey().getMap().get("id"), "medico_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromExames_medico_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/Prestadores.java b/trunk/SIPRPSoft/src/siprp/data/inner/Prestadores.java new file mode 100644 index 00000000..38e9d268 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/Prestadores.java @@ -0,0 +1,1053 @@ +/* +* Prestadores.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class Prestadores extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Prestadores.ID, Prestadores.ID_INDEX ); + FIELD_INDEXES.put( Prestadores.ID_FULL, Prestadores.ID_INDEX ); + FIELD_INDEXES.put( Prestadores.NOME, Prestadores.NOME_INDEX ); + FIELD_INDEXES.put( Prestadores.NOME_FULL, Prestadores.NOME_INDEX ); + FIELD_INDEXES.put( Prestadores.NOME_PLAIN, Prestadores.NOME_PLAIN_INDEX ); + FIELD_INDEXES.put( Prestadores.NOME_PLAIN_FULL, Prestadores.NOME_PLAIN_INDEX ); + FIELD_INDEXES.put( Prestadores.MORADA, Prestadores.MORADA_INDEX ); + FIELD_INDEXES.put( Prestadores.MORADA_FULL, Prestadores.MORADA_INDEX ); + FIELD_INDEXES.put( Prestadores.CODIGO_POSTAL, Prestadores.CODIGO_POSTAL_INDEX ); + FIELD_INDEXES.put( Prestadores.CODIGO_POSTAL_FULL, Prestadores.CODIGO_POSTAL_INDEX ); + FIELD_INDEXES.put( Prestadores.LOCALIDADE, Prestadores.LOCALIDADE_INDEX ); + FIELD_INDEXES.put( Prestadores.LOCALIDADE_FULL, Prestadores.LOCALIDADE_INDEX ); + FIELD_INDEXES.put( Prestadores.LOCALIDADE_CP, Prestadores.LOCALIDADE_CP_INDEX ); + FIELD_INDEXES.put( Prestadores.LOCALIDADE_CP_FULL, Prestadores.LOCALIDADE_CP_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Prestadores.CLASS_IDENTIFIER, Prestadores.CONTACTO_ID, Prestadores.TO_CONTACTO_ID ); + FIELD_INDEXES.put( Prestadores.CONTACTO_ID, Prestadores.CONTACTO_ID_INDEX ); + FIELD_INDEXES.put( Prestadores.CONTACTO_ID_FULL, Prestadores.CONTACTO_ID_INDEX ); + FIELD_INDEXES.put( Prestadores.TO_CONTACTO_ID, Prestadores.TO_CONTACTO_ID_INDEX ); + FIELD_INDEXES.put( Prestadores.ACTIVO, Prestadores.ACTIVO_INDEX ); + FIELD_INDEXES.put( Prestadores.ACTIVO_FULL, Prestadores.ACTIVO_INDEX ); + FIELD_INDEXES.put( Prestadores.FAZ_CONSULTAS, Prestadores.FAZ_CONSULTAS_INDEX ); + FIELD_INDEXES.put( Prestadores.FAZ_CONSULTAS_FULL, Prestadores.FAZ_CONSULTAS_INDEX ); + FIELD_INDEXES.put( Prestadores.FAZ_ECDS, Prestadores.FAZ_ECDS_INDEX ); + FIELD_INDEXES.put( Prestadores.FAZ_ECDS_FULL, Prestadores.FAZ_ECDS_INDEX ); + FIELD_INDEXES.put( Prestadores.CONTRIBUINTE, Prestadores.CONTRIBUINTE_INDEX ); + FIELD_INDEXES.put( Prestadores.CONTRIBUINTE_FULL, Prestadores.CONTRIBUINTE_INDEX ); + FIELD_INDEXES.put( Prestadores.OBSERVACOES, Prestadores.OBSERVACOES_INDEX ); + FIELD_INDEXES.put( Prestadores.OBSERVACOES_FULL, Prestadores.OBSERVACOES_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeycontacto_idTocontactos = + new com.evolute.entity.ForeignKey( Prestadores.class, Prestadores.CONTACTO_ID, siprp.data.outer.ContactosData.class, siprp.data.outer.ContactosData.ID ); + + public static final String TABLENAME = "prestadores"; + + + public static final String CLASS_IDENTIFIER = "prestadores1277401737180"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "prestadores.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "prestadores.nome"; + public static final int NOME_INDEX = 1; + public static final String NOME_PLAIN = "nome_plain"; + public static final String NOME_PLAIN_FULL = "prestadores.nome_plain"; + public static final int NOME_PLAIN_INDEX = 2; + public static final String MORADA = "morada"; + public static final String MORADA_FULL = "prestadores.morada"; + public static final int MORADA_INDEX = 3; + public static final String CODIGO_POSTAL = "codigo_postal"; + public static final String CODIGO_POSTAL_FULL = "prestadores.codigo_postal"; + public static final int CODIGO_POSTAL_INDEX = 4; + public static final String LOCALIDADE = "localidade"; + public static final String LOCALIDADE_FULL = "prestadores.localidade"; + public static final int LOCALIDADE_INDEX = 5; + public static final String LOCALIDADE_CP = "localidade_cp"; + public static final String LOCALIDADE_CP_FULL = "prestadores.localidade_cp"; + public static final int LOCALIDADE_CP_INDEX = 6; + public static final String CONTACTO_ID = "contacto_id"; + public static final String CONTACTO_ID_FULL = "prestadores.contacto_id"; + public static final int CONTACTO_ID_INDEX = 7; + public static final String TO_CONTACTO_ID = "to_contacto_id"; + public static final int TO_CONTACTO_ID_INDEX = 8; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "prestadores.activo"; + public static final int ACTIVO_INDEX = 9; + public static final String FAZ_CONSULTAS = "faz_consultas"; + public static final String FAZ_CONSULTAS_FULL = "prestadores.faz_consultas"; + public static final int FAZ_CONSULTAS_INDEX = 10; + public static final String FAZ_ECDS = "faz_ecds"; + public static final String FAZ_ECDS_FULL = "prestadores.faz_ecds"; + public static final int FAZ_ECDS_INDEX = 11; + public static final String CONTRIBUINTE = "contribuinte"; + public static final String CONTRIBUINTE_FULL = "prestadores.contribuinte"; + public static final int CONTRIBUINTE_INDEX = 12; + public static final String OBSERVACOES = "observacoes"; + public static final String OBSERVACOES_FULL = "prestadores.observacoes"; + public static final int OBSERVACOES_INDEX = 13; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, NOME_PLAIN, MORADA, CODIGO_POSTAL, LOCALIDADE, LOCALIDADE_CP, CONTACTO_ID, + TO_CONTACTO_ID, ACTIVO, FAZ_CONSULTAS, FAZ_ECDS, CONTRIBUINTE, OBSERVACOES, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, TABLENAME + "." + NOME_PLAIN, TABLENAME + "." + MORADA, TABLENAME + "." + CODIGO_POSTAL, TABLENAME + "." + LOCALIDADE, TABLENAME + "." + LOCALIDADE_CP, TABLENAME + "." + CONTACTO_ID, + TABLENAME + "." + TO_CONTACTO_ID, TABLENAME + "." + ACTIVO, TABLENAME + "." + FAZ_CONSULTAS, TABLENAME + "." + FAZ_ECDS, TABLENAME + "." + CONTRIBUINTE, TABLENAME + "." + OBSERVACOES, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, NOME_PLAIN, MORADA, CODIGO_POSTAL, LOCALIDADE, LOCALIDADE_CP, CONTACTO_ID, + ACTIVO, FAZ_CONSULTAS, FAZ_ECDS, CONTRIBUINTE, OBSERVACOES, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, NOME_PLAIN, MORADA, CODIGO_POSTAL, LOCALIDADE, LOCALIDADE_CP, CONTACTO_ID, + ACTIVO, FAZ_CONSULTAS, FAZ_ECDS, CONTRIBUINTE, OBSERVACOES, }; + + private Integer id; + private String nome; + private String nome_plain; + private String morada; + private String codigo_postal; + private String localidade; + private String localidade_cp; + private Integer contacto_id; + private siprp.data.outer.ContactosData to_contacto_id; + private String activo; + private String faz_consultas; + private String faz_ecds; + private String contribuinte; + private String observacoes; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Prestadores() + { + super(); + dirtyProperties = new boolean[]{ false, false, 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 + { + setLockedForRefresh( true ); + 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.ListfromEstabelecimentos_prestador_consulta_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.EstabelecimentosData.class , getPrimaryKey().getMap().get("id"), "prestador_consulta_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromEstabelecimentos_prestador_ecds_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.EstabelecimentosData.class , getPrimaryKey().getMap().get("id"), "prestador_ecds_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromMarcacoesTrabalhador_prestador_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.MarcacoesTrabalhadorData.class , getPrimaryKey().getMap().get("id"), "prestador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromMarcacoesTrabalhadorEstados_prestador_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.MarcacoesTrabalhadorEstadosData.class , getPrimaryKey().getMap().get("id"), "prestador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromPrestadoresGruposProtocolo_prestador_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.PrestadoresGruposProtocoloData.class , getPrimaryKey().getMap().get("id"), "prestador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromPrtGruposProtocolo_analisador_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.PrtGruposProtocoloData.class , getPrimaryKey().getMap().get("id"), "analisador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromTrabalhadoresConsultas_prestador_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresConsultasData.class , getPrimaryKey().getMap().get("id"), "prestador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromTrabalhadoresConsultasDatas_prestador_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresConsultasDatasData.class , getPrimaryKey().getMap().get("id"), "prestador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromTrabalhadoresEcd_analisador_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresEcdData.class , getPrimaryKey().getMap().get("id"), "analisador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromTrabalhadoresEcdsAnalise_prestador_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresEcdsAnaliseData.class , getPrimaryKey().getMap().get("id"), "prestador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromTrabalhadoresEcdsDatas_prestador_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresEcdsDatasData.class , getPrimaryKey().getMap().get("id"), "prestador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromTrabalhadoresEcdsDatas_analisador_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresEcdsDatasData.class , getPrimaryKey().getMap().get("id"), "analisador_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 + { + setLockedForRefresh( true ); + 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 getNome_plain() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME_PLAIN ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome_plain; + } + + public void setNome_plain( String nome_plain ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOME_PLAIN, nome_plain ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nome_plain = nome_plain; + LAZY_LOADED_OBJECTS.put( NOME_PLAIN, Boolean.TRUE ); + } + + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 String getLocalidade_cp() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LOCALIDADE_CP ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.localidade_cp; + } + + public void setLocalidade_cp( String localidade_cp ) + { + try + { + setLockedForRefresh( true ); + preProcess( LOCALIDADE_CP, localidade_cp ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.localidade_cp = localidade_cp; + LAZY_LOADED_OBJECTS.put( LOCALIDADE_CP, Boolean.TRUE ); + } + + public Integer getContacto_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CONTACTO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.contacto_id; + } + + public void setContacto_id( Integer contacto_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( CONTACTO_ID, contacto_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.contacto_id = contacto_id; + LAZY_LOADED_OBJECTS.put( CONTACTO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.ContactosData toContacto_id() + { + try + { + prepare( TO_CONTACTO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_contacto_id; + } + + public void setToContacto_id( siprp.data.outer.ContactosData to_contacto_id ) + { + try + { + preProcess( TO_CONTACTO_ID, to_contacto_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_contacto_id = to_contacto_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 + { + setLockedForRefresh( true ); + 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 String getFaz_consultas() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FAZ_CONSULTAS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.faz_consultas; + } + + public void setFaz_consultas( String faz_consultas ) + { + try + { + setLockedForRefresh( true ); + preProcess( FAZ_CONSULTAS, faz_consultas ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.faz_consultas = faz_consultas; + LAZY_LOADED_OBJECTS.put( FAZ_CONSULTAS, Boolean.TRUE ); + } + + public String getFaz_ecds() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FAZ_ECDS ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.faz_ecds; + } + + public void setFaz_ecds( String faz_ecds ) + { + try + { + setLockedForRefresh( true ); + preProcess( FAZ_ECDS, faz_ecds ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.faz_ecds = faz_ecds; + LAZY_LOADED_OBJECTS.put( FAZ_ECDS, Boolean.TRUE ); + } + + public String getContribuinte() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CONTRIBUINTE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.contribuinte; + } + + public void setContribuinte( String contribuinte ) + { + try + { + setLockedForRefresh( true ); + preProcess( CONTRIBUINTE, contribuinte ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.contribuinte = contribuinte; + LAZY_LOADED_OBJECTS.put( CONTRIBUINTE, Boolean.TRUE ); + } + + public String getObservacoes() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OBSERVACOES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.observacoes; + } + + public void setObservacoes( String observacoes ) + { + try + { + setLockedForRefresh( true ); + preProcess( OBSERVACOES, observacoes ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.observacoes = observacoes; + LAZY_LOADED_OBJECTS.put( OBSERVACOES, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Prestadores.ID_INDEX: + value = getId(); + break; + case Prestadores.NOME_INDEX: + value = getNome(); + break; + case Prestadores.NOME_PLAIN_INDEX: + value = getNome_plain(); + break; + case Prestadores.MORADA_INDEX: + value = getMorada(); + break; + case Prestadores.CODIGO_POSTAL_INDEX: + value = getCodigo_postal(); + break; + case Prestadores.LOCALIDADE_INDEX: + value = getLocalidade(); + break; + case Prestadores.LOCALIDADE_CP_INDEX: + value = getLocalidade_cp(); + break; + case Prestadores.CONTACTO_ID_INDEX: + value = getContacto_id(); + break; + case Prestadores.TO_CONTACTO_ID_INDEX: + value = toContacto_id(); + break; + case Prestadores.ACTIVO_INDEX: + value = getActivo(); + break; + case Prestadores.FAZ_CONSULTAS_INDEX: + value = getFaz_consultas(); + break; + case Prestadores.FAZ_ECDS_INDEX: + value = getFaz_ecds(); + break; + case Prestadores.CONTRIBUINTE_INDEX: + value = getContribuinte(); + break; + case Prestadores.OBSERVACOES_INDEX: + value = getObservacoes(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Prestadores.ID_INDEX: + value = this.id; + break; + case Prestadores.NOME_INDEX: + value = this.nome; + break; + case Prestadores.NOME_PLAIN_INDEX: + value = this.nome_plain; + break; + case Prestadores.MORADA_INDEX: + value = this.morada; + break; + case Prestadores.CODIGO_POSTAL_INDEX: + value = this.codigo_postal; + break; + case Prestadores.LOCALIDADE_INDEX: + value = this.localidade; + break; + case Prestadores.LOCALIDADE_CP_INDEX: + value = this.localidade_cp; + break; + case Prestadores.CONTACTO_ID_INDEX: + value = this.contacto_id; + break; + case Prestadores.TO_CONTACTO_ID_INDEX: + value = this.to_contacto_id; + break; + case Prestadores.ACTIVO_INDEX: + value = this.activo; + break; + case Prestadores.FAZ_CONSULTAS_INDEX: + value = this.faz_consultas; + break; + case Prestadores.FAZ_ECDS_INDEX: + value = this.faz_ecds; + break; + case Prestadores.CONTRIBUINTE_INDEX: + value = this.contribuinte; + break; + case Prestadores.OBSERVACOES_INDEX: + value = this.observacoes; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Prestadores.ID_INDEX: + setId( ( Integer ) value ); + break; + case Prestadores.NOME_INDEX: + setNome( ( String ) value ); + break; + case Prestadores.NOME_PLAIN_INDEX: + setNome_plain( ( String ) value ); + break; + case Prestadores.MORADA_INDEX: + setMorada( ( String ) value ); + break; + case Prestadores.CODIGO_POSTAL_INDEX: + setCodigo_postal( ( String ) value ); + break; + case Prestadores.LOCALIDADE_INDEX: + setLocalidade( ( String ) value ); + break; + case Prestadores.LOCALIDADE_CP_INDEX: + setLocalidade_cp( ( String ) value ); + break; + case Prestadores.CONTACTO_ID_INDEX: + setContacto_id( ( Integer ) value ); + break; + case Prestadores.TO_CONTACTO_ID_INDEX: + setToContacto_id( ( siprp.data.outer.ContactosData ) value ); + break; + case Prestadores.ACTIVO_INDEX: + setActivo( ( String ) value ); + break; + case Prestadores.FAZ_CONSULTAS_INDEX: + setFaz_consultas( ( String ) value ); + break; + case Prestadores.FAZ_ECDS_INDEX: + setFaz_ecds( ( String ) value ); + break; + case Prestadores.CONTRIBUINTE_INDEX: + setContribuinte( ( String ) value ); + break; + case Prestadores.OBSERVACOES_INDEX: + setObservacoes( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Prestadores.ID_INDEX: + this.id = ( Integer ) value; + break; + case Prestadores.NOME_INDEX: + this.nome = ( String ) value; + break; + case Prestadores.NOME_PLAIN_INDEX: + this.nome_plain = ( String ) value; + break; + case Prestadores.MORADA_INDEX: + this.morada = ( String ) value; + break; + case Prestadores.CODIGO_POSTAL_INDEX: + this.codigo_postal = ( String ) value; + break; + case Prestadores.LOCALIDADE_INDEX: + this.localidade = ( String ) value; + break; + case Prestadores.LOCALIDADE_CP_INDEX: + this.localidade_cp = ( String ) value; + break; + case Prestadores.CONTACTO_ID_INDEX: + this.contacto_id = ( Integer ) value; + break; + case Prestadores.TO_CONTACTO_ID_INDEX: + this.to_contacto_id = ( siprp.data.outer.ContactosData ) value; + break; + case Prestadores.ACTIVO_INDEX: + this.activo = ( String ) value; + break; + case Prestadores.FAZ_CONSULTAS_INDEX: + this.faz_consultas = ( String ) value; + break; + case Prestadores.FAZ_ECDS_INDEX: + this.faz_ecds = ( String ) value; + break; + case Prestadores.CONTRIBUINTE_INDEX: + this.contribuinte = ( String ) value; + break; + case Prestadores.OBSERVACOES_INDEX: + this.observacoes = ( 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 Prestadores.ID_INDEX: + theClass = Integer.class; + break; + case Prestadores.NOME_INDEX: + theClass = String.class; + break; + case Prestadores.NOME_PLAIN_INDEX: + theClass = String.class; + break; + case Prestadores.MORADA_INDEX: + theClass = String.class; + break; + case Prestadores.CODIGO_POSTAL_INDEX: + theClass = String.class; + break; + case Prestadores.LOCALIDADE_INDEX: + theClass = String.class; + break; + case Prestadores.LOCALIDADE_CP_INDEX: + theClass = String.class; + break; + case Prestadores.CONTACTO_ID_INDEX: + theClass = Integer.class; + break; + case Prestadores.TO_CONTACTO_ID_INDEX: + theClass = siprp.data.outer.ContactosData.class; + break; + case Prestadores.ACTIVO_INDEX: + theClass = String.class; + break; + case Prestadores.FAZ_CONSULTAS_INDEX: + theClass = String.class; + break; + case Prestadores.FAZ_ECDS_INDEX: + theClass = String.class; + break; + case Prestadores.CONTRIBUINTE_INDEX: + theClass = String.class; + break; + case Prestadores.OBSERVACOES_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Prestadores._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, Prestadores.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/PrestadoresGruposProtocolo.java b/trunk/SIPRPSoft/src/siprp/data/inner/PrestadoresGruposProtocolo.java new file mode 100644 index 00000000..9c9014db --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/PrestadoresGruposProtocolo.java @@ -0,0 +1,429 @@ +/* +* PrestadoresGruposProtocolo.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class PrestadoresGruposProtocolo extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( PrestadoresGruposProtocolo.ID, PrestadoresGruposProtocolo.ID_INDEX ); + FIELD_INDEXES.put( PrestadoresGruposProtocolo.ID_FULL, PrestadoresGruposProtocolo.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PrestadoresGruposProtocolo.CLASS_IDENTIFIER, PrestadoresGruposProtocolo.PRESTADOR_ID, PrestadoresGruposProtocolo.TO_PRESTADOR_ID ); + FIELD_INDEXES.put( PrestadoresGruposProtocolo.PRESTADOR_ID, PrestadoresGruposProtocolo.PRESTADOR_ID_INDEX ); + FIELD_INDEXES.put( PrestadoresGruposProtocolo.PRESTADOR_ID_FULL, PrestadoresGruposProtocolo.PRESTADOR_ID_INDEX ); + FIELD_INDEXES.put( PrestadoresGruposProtocolo.TO_PRESTADOR_ID, PrestadoresGruposProtocolo.TO_PRESTADOR_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PrestadoresGruposProtocolo.CLASS_IDENTIFIER, PrestadoresGruposProtocolo.GRUPO_PROTOCOLO_ID, PrestadoresGruposProtocolo.TO_GRUPO_PROTOCOLO_ID ); + FIELD_INDEXES.put( PrestadoresGruposProtocolo.GRUPO_PROTOCOLO_ID, PrestadoresGruposProtocolo.GRUPO_PROTOCOLO_ID_INDEX ); + FIELD_INDEXES.put( PrestadoresGruposProtocolo.GRUPO_PROTOCOLO_ID_FULL, PrestadoresGruposProtocolo.GRUPO_PROTOCOLO_ID_INDEX ); + FIELD_INDEXES.put( PrestadoresGruposProtocolo.TO_GRUPO_PROTOCOLO_ID, PrestadoresGruposProtocolo.TO_GRUPO_PROTOCOLO_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 ForeignKeyprestador_idToprestadores = + new com.evolute.entity.ForeignKey( PrestadoresGruposProtocolo.class, PrestadoresGruposProtocolo.PRESTADOR_ID, siprp.data.outer.PrestadoresData.class, siprp.data.outer.PrestadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeygrupo_protocolo_idToprt_grupos_protocolo = + new com.evolute.entity.ForeignKey( PrestadoresGruposProtocolo.class, PrestadoresGruposProtocolo.GRUPO_PROTOCOLO_ID, siprp.data.outer.PrtGruposProtocoloData.class, siprp.data.outer.PrtGruposProtocoloData.ID ); + + public static final String TABLENAME = "prestadores_grupos_protocolo"; + + + public static final String CLASS_IDENTIFIER = "prestadores_grupos_protocolo1277401737180"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "prestadores_grupos_protocolo.id"; + public static final int ID_INDEX = 0; + public static final String PRESTADOR_ID = "prestador_id"; + public static final String PRESTADOR_ID_FULL = "prestadores_grupos_protocolo.prestador_id"; + public static final int PRESTADOR_ID_INDEX = 1; + public static final String TO_PRESTADOR_ID = "to_prestador_id"; + public static final int TO_PRESTADOR_ID_INDEX = 2; + public static final String GRUPO_PROTOCOLO_ID = "grupo_protocolo_id"; + public static final String GRUPO_PROTOCOLO_ID_FULL = "prestadores_grupos_protocolo.grupo_protocolo_id"; + public static final int GRUPO_PROTOCOLO_ID_INDEX = 3; + public static final String TO_GRUPO_PROTOCOLO_ID = "to_grupo_protocolo_id"; + public static final int TO_GRUPO_PROTOCOLO_ID_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + PRESTADOR_ID, TO_PRESTADOR_ID, GRUPO_PROTOCOLO_ID, TO_GRUPO_PROTOCOLO_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + PRESTADOR_ID, TABLENAME + "." + TO_PRESTADOR_ID, TABLENAME + "." + GRUPO_PROTOCOLO_ID, TABLENAME + "." + TO_GRUPO_PROTOCOLO_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, PRESTADOR_ID, GRUPO_PROTOCOLO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, PRESTADOR_ID, GRUPO_PROTOCOLO_ID, }; + + private Integer id; + private Integer prestador_id; + private siprp.data.outer.PrestadoresData to_prestador_id; + private Integer grupo_protocolo_id; + private siprp.data.outer.PrtGruposProtocoloData to_grupo_protocolo_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public PrestadoresGruposProtocolo() + { + 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 + { + setLockedForRefresh( true ); + 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 getPrestador_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PRESTADOR_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.prestador_id; + } + + public void setPrestador_id( Integer prestador_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PRESTADOR_ID, prestador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.prestador_id = prestador_id; + LAZY_LOADED_OBJECTS.put( PRESTADOR_ID, Boolean.TRUE ); + } + + public siprp.data.outer.PrestadoresData toPrestador_id() + { + try + { + prepare( TO_PRESTADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_prestador_id; + } + + public void setToPrestador_id( siprp.data.outer.PrestadoresData to_prestador_id ) + { + try + { + preProcess( TO_PRESTADOR_ID, to_prestador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_prestador_id = to_prestador_id; + } + + public Integer getGrupo_protocolo_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( GRUPO_PROTOCOLO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.grupo_protocolo_id; + } + + public void setGrupo_protocolo_id( Integer grupo_protocolo_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( GRUPO_PROTOCOLO_ID, grupo_protocolo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.grupo_protocolo_id = grupo_protocolo_id; + LAZY_LOADED_OBJECTS.put( GRUPO_PROTOCOLO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.PrtGruposProtocoloData toGrupo_protocolo_id() + { + try + { + prepare( TO_GRUPO_PROTOCOLO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_grupo_protocolo_id; + } + + public void setToGrupo_protocolo_id( siprp.data.outer.PrtGruposProtocoloData to_grupo_protocolo_id ) + { + try + { + preProcess( TO_GRUPO_PROTOCOLO_ID, to_grupo_protocolo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_grupo_protocolo_id = to_grupo_protocolo_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PrestadoresGruposProtocolo.ID_INDEX: + value = getId(); + break; + case PrestadoresGruposProtocolo.PRESTADOR_ID_INDEX: + value = getPrestador_id(); + break; + case PrestadoresGruposProtocolo.TO_PRESTADOR_ID_INDEX: + value = toPrestador_id(); + break; + case PrestadoresGruposProtocolo.GRUPO_PROTOCOLO_ID_INDEX: + value = getGrupo_protocolo_id(); + break; + case PrestadoresGruposProtocolo.TO_GRUPO_PROTOCOLO_ID_INDEX: + value = toGrupo_protocolo_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PrestadoresGruposProtocolo.ID_INDEX: + value = this.id; + break; + case PrestadoresGruposProtocolo.PRESTADOR_ID_INDEX: + value = this.prestador_id; + break; + case PrestadoresGruposProtocolo.TO_PRESTADOR_ID_INDEX: + value = this.to_prestador_id; + break; + case PrestadoresGruposProtocolo.GRUPO_PROTOCOLO_ID_INDEX: + value = this.grupo_protocolo_id; + break; + case PrestadoresGruposProtocolo.TO_GRUPO_PROTOCOLO_ID_INDEX: + value = this.to_grupo_protocolo_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PrestadoresGruposProtocolo.ID_INDEX: + setId( ( Integer ) value ); + break; + case PrestadoresGruposProtocolo.PRESTADOR_ID_INDEX: + setPrestador_id( ( Integer ) value ); + break; + case PrestadoresGruposProtocolo.TO_PRESTADOR_ID_INDEX: + setToPrestador_id( ( siprp.data.outer.PrestadoresData ) value ); + break; + case PrestadoresGruposProtocolo.GRUPO_PROTOCOLO_ID_INDEX: + setGrupo_protocolo_id( ( Integer ) value ); + break; + case PrestadoresGruposProtocolo.TO_GRUPO_PROTOCOLO_ID_INDEX: + setToGrupo_protocolo_id( ( siprp.data.outer.PrtGruposProtocoloData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PrestadoresGruposProtocolo.ID_INDEX: + this.id = ( Integer ) value; + break; + case PrestadoresGruposProtocolo.PRESTADOR_ID_INDEX: + this.prestador_id = ( Integer ) value; + break; + case PrestadoresGruposProtocolo.TO_PRESTADOR_ID_INDEX: + this.to_prestador_id = ( siprp.data.outer.PrestadoresData ) value; + break; + case PrestadoresGruposProtocolo.GRUPO_PROTOCOLO_ID_INDEX: + this.grupo_protocolo_id = ( Integer ) value; + break; + case PrestadoresGruposProtocolo.TO_GRUPO_PROTOCOLO_ID_INDEX: + this.to_grupo_protocolo_id = ( siprp.data.outer.PrtGruposProtocoloData ) 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 PrestadoresGruposProtocolo.ID_INDEX: + theClass = Integer.class; + break; + case PrestadoresGruposProtocolo.PRESTADOR_ID_INDEX: + theClass = Integer.class; + break; + case PrestadoresGruposProtocolo.TO_PRESTADOR_ID_INDEX: + theClass = siprp.data.outer.PrestadoresData.class; + break; + case PrestadoresGruposProtocolo.GRUPO_PROTOCOLO_ID_INDEX: + theClass = Integer.class; + break; + case PrestadoresGruposProtocolo.TO_GRUPO_PROTOCOLO_ID_INDEX: + theClass = siprp.data.outer.PrtGruposProtocoloData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : PrestadoresGruposProtocolo._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, PrestadoresGruposProtocolo.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/PrtElementosProtocolo.java b/trunk/SIPRPSoft/src/siprp/data/inner/PrtElementosProtocolo.java new file mode 100644 index 00000000..5d8a7292 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/PrtElementosProtocolo.java @@ -0,0 +1,481 @@ +/* +* PrtElementosProtocolo.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class PrtElementosProtocolo extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( PrtElementosProtocolo.ID, PrtElementosProtocolo.ID_INDEX ); + FIELD_INDEXES.put( PrtElementosProtocolo.ID_FULL, PrtElementosProtocolo.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PrtElementosProtocolo.CLASS_IDENTIFIER, PrtElementosProtocolo.TIPO_ELEMENTO_PROTOCOLO_ID, PrtElementosProtocolo.TO_TIPO_ELEMENTO_PROTOCOLO_ID ); + FIELD_INDEXES.put( PrtElementosProtocolo.TIPO_ELEMENTO_PROTOCOLO_ID, PrtElementosProtocolo.TIPO_ELEMENTO_PROTOCOLO_ID_INDEX ); + FIELD_INDEXES.put( PrtElementosProtocolo.TIPO_ELEMENTO_PROTOCOLO_ID_FULL, PrtElementosProtocolo.TIPO_ELEMENTO_PROTOCOLO_ID_INDEX ); + FIELD_INDEXES.put( PrtElementosProtocolo.TO_TIPO_ELEMENTO_PROTOCOLO_ID, PrtElementosProtocolo.TO_TIPO_ELEMENTO_PROTOCOLO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PrtElementosProtocolo.CLASS_IDENTIFIER, PrtElementosProtocolo.EMPRESA_ID, PrtElementosProtocolo.TO_EMPRESA_ID ); + FIELD_INDEXES.put( PrtElementosProtocolo.EMPRESA_ID, PrtElementosProtocolo.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( PrtElementosProtocolo.EMPRESA_ID_FULL, PrtElementosProtocolo.EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( PrtElementosProtocolo.TO_EMPRESA_ID, PrtElementosProtocolo.TO_EMPRESA_ID_INDEX ); + FIELD_INDEXES.put( PrtElementosProtocolo.NUMERO_PERFIL, PrtElementosProtocolo.NUMERO_PERFIL_INDEX ); + FIELD_INDEXES.put( PrtElementosProtocolo.NUMERO_PERFIL_FULL, PrtElementosProtocolo.NUMERO_PERFIL_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeytipo_elemento_protocolo_idToprt_tipos_elementos_protocolo = + new com.evolute.entity.ForeignKey( PrtElementosProtocolo.class, PrtElementosProtocolo.TIPO_ELEMENTO_PROTOCOLO_ID, siprp.data.outer.PrtTiposElementosProtocoloData.class, siprp.data.outer.PrtTiposElementosProtocoloData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyempresa_idToempresas = + new com.evolute.entity.ForeignKey( PrtElementosProtocolo.class, PrtElementosProtocolo.EMPRESA_ID, siprp.data.outer.EmpresasData.class, siprp.data.outer.EmpresasData.ID ); + + public static final String TABLENAME = "prt_elementos_protocolo"; + + + public static final String CLASS_IDENTIFIER = "prt_elementos_protocolo1277401737181"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "prt_elementos_protocolo.id"; + public static final int ID_INDEX = 0; + public static final String TIPO_ELEMENTO_PROTOCOLO_ID = "tipo_elemento_protocolo_id"; + public static final String TIPO_ELEMENTO_PROTOCOLO_ID_FULL = "prt_elementos_protocolo.tipo_elemento_protocolo_id"; + public static final int TIPO_ELEMENTO_PROTOCOLO_ID_INDEX = 1; + public static final String TO_TIPO_ELEMENTO_PROTOCOLO_ID = "to_tipo_elemento_protocolo_id"; + public static final int TO_TIPO_ELEMENTO_PROTOCOLO_ID_INDEX = 2; + public static final String EMPRESA_ID = "empresa_id"; + public static final String EMPRESA_ID_FULL = "prt_elementos_protocolo.empresa_id"; + public static final int EMPRESA_ID_INDEX = 3; + public static final String TO_EMPRESA_ID = "to_empresa_id"; + public static final int TO_EMPRESA_ID_INDEX = 4; + public static final String NUMERO_PERFIL = "numero_perfil"; + public static final String NUMERO_PERFIL_FULL = "prt_elementos_protocolo.numero_perfil"; + public static final int NUMERO_PERFIL_INDEX = 5; + + public static final String FIELD_NAMES[] = new String[]{ + TIPO_ELEMENTO_PROTOCOLO_ID, TO_TIPO_ELEMENTO_PROTOCOLO_ID, EMPRESA_ID, + TO_EMPRESA_ID, NUMERO_PERFIL, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TIPO_ELEMENTO_PROTOCOLO_ID, TABLENAME + "." + TO_TIPO_ELEMENTO_PROTOCOLO_ID, TABLENAME + "." + EMPRESA_ID, + TABLENAME + "." + TO_EMPRESA_ID, TABLENAME + "." + NUMERO_PERFIL, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TIPO_ELEMENTO_PROTOCOLO_ID, EMPRESA_ID, NUMERO_PERFIL, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, TIPO_ELEMENTO_PROTOCOLO_ID, EMPRESA_ID, NUMERO_PERFIL, }; + + private Integer id; + private Integer tipo_elemento_protocolo_id; + private siprp.data.outer.PrtTiposElementosProtocoloData to_tipo_elemento_protocolo_id; + private Integer empresa_id; + private siprp.data.outer.EmpresasData to_empresa_id; + private Integer numero_perfil; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public PrtElementosProtocolo() + { + 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 + { + setLockedForRefresh( true ); + 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_elemento_protocolo_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TIPO_ELEMENTO_PROTOCOLO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.tipo_elemento_protocolo_id; + } + + public void setTipo_elemento_protocolo_id( Integer tipo_elemento_protocolo_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( TIPO_ELEMENTO_PROTOCOLO_ID, tipo_elemento_protocolo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.tipo_elemento_protocolo_id = tipo_elemento_protocolo_id; + LAZY_LOADED_OBJECTS.put( TIPO_ELEMENTO_PROTOCOLO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.PrtTiposElementosProtocoloData toTipo_elemento_protocolo_id() + { + try + { + prepare( TO_TIPO_ELEMENTO_PROTOCOLO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_tipo_elemento_protocolo_id; + } + + public void setToTipo_elemento_protocolo_id( siprp.data.outer.PrtTiposElementosProtocoloData to_tipo_elemento_protocolo_id ) + { + try + { + preProcess( TO_TIPO_ELEMENTO_PROTOCOLO_ID, to_tipo_elemento_protocolo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_tipo_elemento_protocolo_id = to_tipo_elemento_protocolo_id; + } + + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 getNumero_perfil() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NUMERO_PERFIL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.numero_perfil; + } + + public void setNumero_perfil( Integer numero_perfil ) + { + try + { + setLockedForRefresh( true ); + preProcess( NUMERO_PERFIL, numero_perfil ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.numero_perfil = numero_perfil; + LAZY_LOADED_OBJECTS.put( NUMERO_PERFIL, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PrtElementosProtocolo.ID_INDEX: + value = getId(); + break; + case PrtElementosProtocolo.TIPO_ELEMENTO_PROTOCOLO_ID_INDEX: + value = getTipo_elemento_protocolo_id(); + break; + case PrtElementosProtocolo.TO_TIPO_ELEMENTO_PROTOCOLO_ID_INDEX: + value = toTipo_elemento_protocolo_id(); + break; + case PrtElementosProtocolo.EMPRESA_ID_INDEX: + value = getEmpresa_id(); + break; + case PrtElementosProtocolo.TO_EMPRESA_ID_INDEX: + value = toEmpresa_id(); + break; + case PrtElementosProtocolo.NUMERO_PERFIL_INDEX: + value = getNumero_perfil(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PrtElementosProtocolo.ID_INDEX: + value = this.id; + break; + case PrtElementosProtocolo.TIPO_ELEMENTO_PROTOCOLO_ID_INDEX: + value = this.tipo_elemento_protocolo_id; + break; + case PrtElementosProtocolo.TO_TIPO_ELEMENTO_PROTOCOLO_ID_INDEX: + value = this.to_tipo_elemento_protocolo_id; + break; + case PrtElementosProtocolo.EMPRESA_ID_INDEX: + value = this.empresa_id; + break; + case PrtElementosProtocolo.TO_EMPRESA_ID_INDEX: + value = this.to_empresa_id; + break; + case PrtElementosProtocolo.NUMERO_PERFIL_INDEX: + value = this.numero_perfil; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PrtElementosProtocolo.ID_INDEX: + setId( ( Integer ) value ); + break; + case PrtElementosProtocolo.TIPO_ELEMENTO_PROTOCOLO_ID_INDEX: + setTipo_elemento_protocolo_id( ( Integer ) value ); + break; + case PrtElementosProtocolo.TO_TIPO_ELEMENTO_PROTOCOLO_ID_INDEX: + setToTipo_elemento_protocolo_id( ( siprp.data.outer.PrtTiposElementosProtocoloData ) value ); + break; + case PrtElementosProtocolo.EMPRESA_ID_INDEX: + setEmpresa_id( ( Integer ) value ); + break; + case PrtElementosProtocolo.TO_EMPRESA_ID_INDEX: + setToEmpresa_id( ( siprp.data.outer.EmpresasData ) value ); + break; + case PrtElementosProtocolo.NUMERO_PERFIL_INDEX: + setNumero_perfil( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PrtElementosProtocolo.ID_INDEX: + this.id = ( Integer ) value; + break; + case PrtElementosProtocolo.TIPO_ELEMENTO_PROTOCOLO_ID_INDEX: + this.tipo_elemento_protocolo_id = ( Integer ) value; + break; + case PrtElementosProtocolo.TO_TIPO_ELEMENTO_PROTOCOLO_ID_INDEX: + this.to_tipo_elemento_protocolo_id = ( siprp.data.outer.PrtTiposElementosProtocoloData ) value; + break; + case PrtElementosProtocolo.EMPRESA_ID_INDEX: + this.empresa_id = ( Integer ) value; + break; + case PrtElementosProtocolo.TO_EMPRESA_ID_INDEX: + this.to_empresa_id = ( siprp.data.outer.EmpresasData ) value; + break; + case PrtElementosProtocolo.NUMERO_PERFIL_INDEX: + this.numero_perfil = ( 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 PrtElementosProtocolo.ID_INDEX: + theClass = Integer.class; + break; + case PrtElementosProtocolo.TIPO_ELEMENTO_PROTOCOLO_ID_INDEX: + theClass = Integer.class; + break; + case PrtElementosProtocolo.TO_TIPO_ELEMENTO_PROTOCOLO_ID_INDEX: + theClass = siprp.data.outer.PrtTiposElementosProtocoloData.class; + break; + case PrtElementosProtocolo.EMPRESA_ID_INDEX: + theClass = Integer.class; + break; + case PrtElementosProtocolo.TO_EMPRESA_ID_INDEX: + theClass = siprp.data.outer.EmpresasData.class; + break; + case PrtElementosProtocolo.NUMERO_PERFIL_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : PrtElementosProtocolo._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, PrtElementosProtocolo.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/PrtGruposProtocolo.java b/trunk/SIPRPSoft/src/siprp/data/inner/PrtGruposProtocolo.java new file mode 100644 index 00000000..0f2de71c --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/PrtGruposProtocolo.java @@ -0,0 +1,585 @@ +/* +* PrtGruposProtocolo.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class PrtGruposProtocolo extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( PrtGruposProtocolo.ID, PrtGruposProtocolo.ID_INDEX ); + FIELD_INDEXES.put( PrtGruposProtocolo.ID_FULL, PrtGruposProtocolo.ID_INDEX ); + FIELD_INDEXES.put( PrtGruposProtocolo.DESCRICAO, PrtGruposProtocolo.DESCRICAO_INDEX ); + FIELD_INDEXES.put( PrtGruposProtocolo.DESCRICAO_FULL, PrtGruposProtocolo.DESCRICAO_INDEX ); + FIELD_INDEXES.put( PrtGruposProtocolo.DESCRICAO_PLAIN, PrtGruposProtocolo.DESCRICAO_PLAIN_INDEX ); + FIELD_INDEXES.put( PrtGruposProtocolo.DESCRICAO_PLAIN_FULL, PrtGruposProtocolo.DESCRICAO_PLAIN_INDEX ); + FIELD_INDEXES.put( PrtGruposProtocolo.GRUPO_REAL, PrtGruposProtocolo.GRUPO_REAL_INDEX ); + FIELD_INDEXES.put( PrtGruposProtocolo.GRUPO_REAL_FULL, PrtGruposProtocolo.GRUPO_REAL_INDEX ); + FIELD_INDEXES.put( PrtGruposProtocolo.ORDEM, PrtGruposProtocolo.ORDEM_INDEX ); + FIELD_INDEXES.put( PrtGruposProtocolo.ORDEM_FULL, PrtGruposProtocolo.ORDEM_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PrtGruposProtocolo.CLASS_IDENTIFIER, PrtGruposProtocolo.ANALISADOR_ID, PrtGruposProtocolo.TO_ANALISADOR_ID ); + FIELD_INDEXES.put( PrtGruposProtocolo.ANALISADOR_ID, PrtGruposProtocolo.ANALISADOR_ID_INDEX ); + FIELD_INDEXES.put( PrtGruposProtocolo.ANALISADOR_ID_FULL, PrtGruposProtocolo.ANALISADOR_ID_INDEX ); + FIELD_INDEXES.put( PrtGruposProtocolo.TO_ANALISADOR_ID, PrtGruposProtocolo.TO_ANALISADOR_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 ForeignKeyanalisador_idToprestadores = + new com.evolute.entity.ForeignKey( PrtGruposProtocolo.class, PrtGruposProtocolo.ANALISADOR_ID, siprp.data.outer.PrestadoresData.class, siprp.data.outer.PrestadoresData.ID ); + + public static final String TABLENAME = "prt_grupos_protocolo"; + + + public static final String CLASS_IDENTIFIER = "prt_grupos_protocolo1277401737184"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "prt_grupos_protocolo.id"; + public static final int ID_INDEX = 0; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "prt_grupos_protocolo.descricao"; + public static final int DESCRICAO_INDEX = 1; + public static final String DESCRICAO_PLAIN = "descricao_plain"; + public static final String DESCRICAO_PLAIN_FULL = "prt_grupos_protocolo.descricao_plain"; + public static final int DESCRICAO_PLAIN_INDEX = 2; + public static final String GRUPO_REAL = "grupo_real"; + public static final String GRUPO_REAL_FULL = "prt_grupos_protocolo.grupo_real"; + public static final int GRUPO_REAL_INDEX = 3; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "prt_grupos_protocolo.ordem"; + public static final int ORDEM_INDEX = 4; + public static final String ANALISADOR_ID = "analisador_id"; + public static final String ANALISADOR_ID_FULL = "prt_grupos_protocolo.analisador_id"; + public static final int ANALISADOR_ID_INDEX = 5; + public static final String TO_ANALISADOR_ID = "to_analisador_id"; + public static final int TO_ANALISADOR_ID_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO, DESCRICAO_PLAIN, GRUPO_REAL, ORDEM, ANALISADOR_ID, TO_ANALISADOR_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO, TABLENAME + "." + DESCRICAO_PLAIN, TABLENAME + "." + GRUPO_REAL, TABLENAME + "." + ORDEM, TABLENAME + "." + ANALISADOR_ID, TABLENAME + "." + TO_ANALISADOR_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRICAO, DESCRICAO_PLAIN, GRUPO_REAL, ORDEM, ANALISADOR_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DESCRICAO, DESCRICAO_PLAIN, GRUPO_REAL, ORDEM, ANALISADOR_ID, }; + + private Integer id; + private String descricao; + private String descricao_plain; + private String grupo_real; + private Integer ordem; + private Integer analisador_id; + private siprp.data.outer.PrestadoresData to_analisador_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public PrtGruposProtocolo() + { + 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 + { + setLockedForRefresh( true ); + 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.ListfromMarcacoesGruposRealizados_grupo_protocolo_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.MarcacoesGruposRealizadosData.class , getPrimaryKey().getMap().get("id"), "grupo_protocolo_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromPrestadoresGruposProtocolo_grupo_protocolo_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.PrestadoresGruposProtocoloData.class , getPrimaryKey().getMap().get("id"), "grupo_protocolo_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromPrtTiposElementosProtocolo_grupo_protocolo_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.PrtTiposElementosProtocoloData.class , getPrimaryKey().getMap().get("id"), "grupo_protocolo_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromTrabalhadoresEcdsAnalise_grupo_ecds_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresEcdsAnaliseData.class , getPrimaryKey().getMap().get("id"), "grupo_ecds_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 + { + setLockedForRefresh( true ); + 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 getDescricao_plain() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESCRICAO_PLAIN ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.descricao_plain; + } + + public void setDescricao_plain( String descricao_plain ) + { + try + { + setLockedForRefresh( true ); + preProcess( DESCRICAO_PLAIN, descricao_plain ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.descricao_plain = descricao_plain; + LAZY_LOADED_OBJECTS.put( DESCRICAO_PLAIN, Boolean.TRUE ); + } + + public String getGrupo_real() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( GRUPO_REAL ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.grupo_real; + } + + public void setGrupo_real( String grupo_real ) + { + try + { + setLockedForRefresh( true ); + preProcess( GRUPO_REAL, grupo_real ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.grupo_real = grupo_real; + LAZY_LOADED_OBJECTS.put( GRUPO_REAL, 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 + { + setLockedForRefresh( true ); + 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 Integer getAnalisador_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ANALISADOR_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.analisador_id; + } + + public void setAnalisador_id( Integer analisador_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( ANALISADOR_ID, analisador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.analisador_id = analisador_id; + LAZY_LOADED_OBJECTS.put( ANALISADOR_ID, Boolean.TRUE ); + } + + public siprp.data.outer.PrestadoresData toAnalisador_id() + { + try + { + prepare( TO_ANALISADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_analisador_id; + } + + public void setToAnalisador_id( siprp.data.outer.PrestadoresData to_analisador_id ) + { + try + { + preProcess( TO_ANALISADOR_ID, to_analisador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_analisador_id = to_analisador_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PrtGruposProtocolo.ID_INDEX: + value = getId(); + break; + case PrtGruposProtocolo.DESCRICAO_INDEX: + value = getDescricao(); + break; + case PrtGruposProtocolo.DESCRICAO_PLAIN_INDEX: + value = getDescricao_plain(); + break; + case PrtGruposProtocolo.GRUPO_REAL_INDEX: + value = getGrupo_real(); + break; + case PrtGruposProtocolo.ORDEM_INDEX: + value = getOrdem(); + break; + case PrtGruposProtocolo.ANALISADOR_ID_INDEX: + value = getAnalisador_id(); + break; + case PrtGruposProtocolo.TO_ANALISADOR_ID_INDEX: + value = toAnalisador_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PrtGruposProtocolo.ID_INDEX: + value = this.id; + break; + case PrtGruposProtocolo.DESCRICAO_INDEX: + value = this.descricao; + break; + case PrtGruposProtocolo.DESCRICAO_PLAIN_INDEX: + value = this.descricao_plain; + break; + case PrtGruposProtocolo.GRUPO_REAL_INDEX: + value = this.grupo_real; + break; + case PrtGruposProtocolo.ORDEM_INDEX: + value = this.ordem; + break; + case PrtGruposProtocolo.ANALISADOR_ID_INDEX: + value = this.analisador_id; + break; + case PrtGruposProtocolo.TO_ANALISADOR_ID_INDEX: + value = this.to_analisador_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PrtGruposProtocolo.ID_INDEX: + setId( ( Integer ) value ); + break; + case PrtGruposProtocolo.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case PrtGruposProtocolo.DESCRICAO_PLAIN_INDEX: + setDescricao_plain( ( String ) value ); + break; + case PrtGruposProtocolo.GRUPO_REAL_INDEX: + setGrupo_real( ( String ) value ); + break; + case PrtGruposProtocolo.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + case PrtGruposProtocolo.ANALISADOR_ID_INDEX: + setAnalisador_id( ( Integer ) value ); + break; + case PrtGruposProtocolo.TO_ANALISADOR_ID_INDEX: + setToAnalisador_id( ( siprp.data.outer.PrestadoresData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PrtGruposProtocolo.ID_INDEX: + this.id = ( Integer ) value; + break; + case PrtGruposProtocolo.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case PrtGruposProtocolo.DESCRICAO_PLAIN_INDEX: + this.descricao_plain = ( String ) value; + break; + case PrtGruposProtocolo.GRUPO_REAL_INDEX: + this.grupo_real = ( String ) value; + break; + case PrtGruposProtocolo.ORDEM_INDEX: + this.ordem = ( Integer ) value; + break; + case PrtGruposProtocolo.ANALISADOR_ID_INDEX: + this.analisador_id = ( Integer ) value; + break; + case PrtGruposProtocolo.TO_ANALISADOR_ID_INDEX: + this.to_analisador_id = ( siprp.data.outer.PrestadoresData ) 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 PrtGruposProtocolo.ID_INDEX: + theClass = Integer.class; + break; + case PrtGruposProtocolo.DESCRICAO_INDEX: + theClass = String.class; + break; + case PrtGruposProtocolo.DESCRICAO_PLAIN_INDEX: + theClass = String.class; + break; + case PrtGruposProtocolo.GRUPO_REAL_INDEX: + theClass = String.class; + break; + case PrtGruposProtocolo.ORDEM_INDEX: + theClass = Integer.class; + break; + case PrtGruposProtocolo.ANALISADOR_ID_INDEX: + theClass = Integer.class; + break; + case PrtGruposProtocolo.TO_ANALISADOR_ID_INDEX: + theClass = siprp.data.outer.PrestadoresData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : PrtGruposProtocolo._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, PrtGruposProtocolo.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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/PrtTiposElementosProtocolo.java b/trunk/SIPRPSoft/src/siprp/data/inner/PrtTiposElementosProtocolo.java new file mode 100644 index 00000000..779be424 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/PrtTiposElementosProtocolo.java @@ -0,0 +1,507 @@ +/* +* PrtTiposElementosProtocolo.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class PrtTiposElementosProtocolo extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( PrtTiposElementosProtocolo.ID, PrtTiposElementosProtocolo.ID_INDEX ); + FIELD_INDEXES.put( PrtTiposElementosProtocolo.ID_FULL, PrtTiposElementosProtocolo.ID_INDEX ); + FIELD_INDEXES.put( PrtTiposElementosProtocolo.DESCRICAO_PLAIN, PrtTiposElementosProtocolo.DESCRICAO_PLAIN_INDEX ); + FIELD_INDEXES.put( PrtTiposElementosProtocolo.DESCRICAO_PLAIN_FULL, PrtTiposElementosProtocolo.DESCRICAO_PLAIN_INDEX ); + FIELD_INDEXES.put( PrtTiposElementosProtocolo.DESCRICAO, PrtTiposElementosProtocolo.DESCRICAO_INDEX ); + FIELD_INDEXES.put( PrtTiposElementosProtocolo.DESCRICAO_FULL, PrtTiposElementosProtocolo.DESCRICAO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( PrtTiposElementosProtocolo.CLASS_IDENTIFIER, PrtTiposElementosProtocolo.GRUPO_PROTOCOLO_ID, PrtTiposElementosProtocolo.TO_GRUPO_PROTOCOLO_ID ); + FIELD_INDEXES.put( PrtTiposElementosProtocolo.GRUPO_PROTOCOLO_ID, PrtTiposElementosProtocolo.GRUPO_PROTOCOLO_ID_INDEX ); + FIELD_INDEXES.put( PrtTiposElementosProtocolo.GRUPO_PROTOCOLO_ID_FULL, PrtTiposElementosProtocolo.GRUPO_PROTOCOLO_ID_INDEX ); + FIELD_INDEXES.put( PrtTiposElementosProtocolo.TO_GRUPO_PROTOCOLO_ID, PrtTiposElementosProtocolo.TO_GRUPO_PROTOCOLO_ID_INDEX ); + FIELD_INDEXES.put( PrtTiposElementosProtocolo.ORDEM, PrtTiposElementosProtocolo.ORDEM_INDEX ); + FIELD_INDEXES.put( PrtTiposElementosProtocolo.ORDEM_FULL, PrtTiposElementosProtocolo.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 ForeignKeygrupo_protocolo_idToprt_grupos_protocolo = + new com.evolute.entity.ForeignKey( PrtTiposElementosProtocolo.class, PrtTiposElementosProtocolo.GRUPO_PROTOCOLO_ID, siprp.data.outer.PrtGruposProtocoloData.class, siprp.data.outer.PrtGruposProtocoloData.ID ); + + public static final String TABLENAME = "prt_tipos_elementos_protocolo"; + + + public static final String CLASS_IDENTIFIER = "prt_tipos_elementos_protocolo1277401737185"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "prt_tipos_elementos_protocolo.id"; + public static final int ID_INDEX = 0; + public static final String DESCRICAO_PLAIN = "descricao_plain"; + public static final String DESCRICAO_PLAIN_FULL = "prt_tipos_elementos_protocolo.descricao_plain"; + public static final int DESCRICAO_PLAIN_INDEX = 1; + public static final String DESCRICAO = "descricao"; + public static final String DESCRICAO_FULL = "prt_tipos_elementos_protocolo.descricao"; + public static final int DESCRICAO_INDEX = 2; + public static final String GRUPO_PROTOCOLO_ID = "grupo_protocolo_id"; + public static final String GRUPO_PROTOCOLO_ID_FULL = "prt_tipos_elementos_protocolo.grupo_protocolo_id"; + public static final int GRUPO_PROTOCOLO_ID_INDEX = 3; + public static final String TO_GRUPO_PROTOCOLO_ID = "to_grupo_protocolo_id"; + public static final int TO_GRUPO_PROTOCOLO_ID_INDEX = 4; + public static final String ORDEM = "ordem"; + public static final String ORDEM_FULL = "prt_tipos_elementos_protocolo.ordem"; + public static final int ORDEM_INDEX = 5; + + public static final String FIELD_NAMES[] = new String[]{ + DESCRICAO_PLAIN, DESCRICAO, GRUPO_PROTOCOLO_ID, TO_GRUPO_PROTOCOLO_ID, ORDEM, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DESCRICAO_PLAIN, TABLENAME + "." + DESCRICAO, TABLENAME + "." + GRUPO_PROTOCOLO_ID, TABLENAME + "." + TO_GRUPO_PROTOCOLO_ID, TABLENAME + "." + ORDEM, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DESCRICAO_PLAIN, DESCRICAO, GRUPO_PROTOCOLO_ID, ORDEM, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DESCRICAO_PLAIN, DESCRICAO, GRUPO_PROTOCOLO_ID, ORDEM, }; + + private Integer id; + private String descricao_plain; + private String descricao; + private Integer grupo_protocolo_id; + private siprp.data.outer.PrtGruposProtocoloData to_grupo_protocolo_id; + private Integer ordem; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public PrtTiposElementosProtocolo() + { + 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 + { + setLockedForRefresh( true ); + 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.ListfromPrtElementosProtocolo_tipo_elemento_protocolo_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.PrtElementosProtocoloData.class , getPrimaryKey().getMap().get("id"), "tipo_elemento_protocolo_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromTrabalhadoresEcd_ecd_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresEcdData.class , getPrimaryKey().getMap().get("id"), "ecd_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public String getDescricao_plain() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESCRICAO_PLAIN ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.descricao_plain; + } + + public void setDescricao_plain( String descricao_plain ) + { + try + { + setLockedForRefresh( true ); + preProcess( DESCRICAO_PLAIN, descricao_plain ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.descricao_plain = descricao_plain; + LAZY_LOADED_OBJECTS.put( DESCRICAO_PLAIN, 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 + { + setLockedForRefresh( true ); + 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 getGrupo_protocolo_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( GRUPO_PROTOCOLO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.grupo_protocolo_id; + } + + public void setGrupo_protocolo_id( Integer grupo_protocolo_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( GRUPO_PROTOCOLO_ID, grupo_protocolo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.grupo_protocolo_id = grupo_protocolo_id; + LAZY_LOADED_OBJECTS.put( GRUPO_PROTOCOLO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.PrtGruposProtocoloData toGrupo_protocolo_id() + { + try + { + prepare( TO_GRUPO_PROTOCOLO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_grupo_protocolo_id; + } + + public void setToGrupo_protocolo_id( siprp.data.outer.PrtGruposProtocoloData to_grupo_protocolo_id ) + { + try + { + preProcess( TO_GRUPO_PROTOCOLO_ID, to_grupo_protocolo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_grupo_protocolo_id = to_grupo_protocolo_id; + } + + 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 + { + setLockedForRefresh( true ); + 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 PrtTiposElementosProtocolo.ID_INDEX: + value = getId(); + break; + case PrtTiposElementosProtocolo.DESCRICAO_PLAIN_INDEX: + value = getDescricao_plain(); + break; + case PrtTiposElementosProtocolo.DESCRICAO_INDEX: + value = getDescricao(); + break; + case PrtTiposElementosProtocolo.GRUPO_PROTOCOLO_ID_INDEX: + value = getGrupo_protocolo_id(); + break; + case PrtTiposElementosProtocolo.TO_GRUPO_PROTOCOLO_ID_INDEX: + value = toGrupo_protocolo_id(); + break; + case PrtTiposElementosProtocolo.ORDEM_INDEX: + value = getOrdem(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PrtTiposElementosProtocolo.ID_INDEX: + value = this.id; + break; + case PrtTiposElementosProtocolo.DESCRICAO_PLAIN_INDEX: + value = this.descricao_plain; + break; + case PrtTiposElementosProtocolo.DESCRICAO_INDEX: + value = this.descricao; + break; + case PrtTiposElementosProtocolo.GRUPO_PROTOCOLO_ID_INDEX: + value = this.grupo_protocolo_id; + break; + case PrtTiposElementosProtocolo.TO_GRUPO_PROTOCOLO_ID_INDEX: + value = this.to_grupo_protocolo_id; + break; + case PrtTiposElementosProtocolo.ORDEM_INDEX: + value = this.ordem; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PrtTiposElementosProtocolo.ID_INDEX: + setId( ( Integer ) value ); + break; + case PrtTiposElementosProtocolo.DESCRICAO_PLAIN_INDEX: + setDescricao_plain( ( String ) value ); + break; + case PrtTiposElementosProtocolo.DESCRICAO_INDEX: + setDescricao( ( String ) value ); + break; + case PrtTiposElementosProtocolo.GRUPO_PROTOCOLO_ID_INDEX: + setGrupo_protocolo_id( ( Integer ) value ); + break; + case PrtTiposElementosProtocolo.TO_GRUPO_PROTOCOLO_ID_INDEX: + setToGrupo_protocolo_id( ( siprp.data.outer.PrtGruposProtocoloData ) value ); + break; + case PrtTiposElementosProtocolo.ORDEM_INDEX: + setOrdem( ( Integer ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case PrtTiposElementosProtocolo.ID_INDEX: + this.id = ( Integer ) value; + break; + case PrtTiposElementosProtocolo.DESCRICAO_PLAIN_INDEX: + this.descricao_plain = ( String ) value; + break; + case PrtTiposElementosProtocolo.DESCRICAO_INDEX: + this.descricao = ( String ) value; + break; + case PrtTiposElementosProtocolo.GRUPO_PROTOCOLO_ID_INDEX: + this.grupo_protocolo_id = ( Integer ) value; + break; + case PrtTiposElementosProtocolo.TO_GRUPO_PROTOCOLO_ID_INDEX: + this.to_grupo_protocolo_id = ( siprp.data.outer.PrtGruposProtocoloData ) value; + break; + case PrtTiposElementosProtocolo.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 PrtTiposElementosProtocolo.ID_INDEX: + theClass = Integer.class; + break; + case PrtTiposElementosProtocolo.DESCRICAO_PLAIN_INDEX: + theClass = String.class; + break; + case PrtTiposElementosProtocolo.DESCRICAO_INDEX: + theClass = String.class; + break; + case PrtTiposElementosProtocolo.GRUPO_PROTOCOLO_ID_INDEX: + theClass = Integer.class; + break; + case PrtTiposElementosProtocolo.TO_GRUPO_PROTOCOLO_ID_INDEX: + theClass = siprp.data.outer.PrtGruposProtocoloData.class; + break; + case PrtTiposElementosProtocolo.ORDEM_INDEX: + theClass = Integer.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : PrtTiposElementosProtocolo._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, PrtTiposElementosProtocolo.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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/TiposExamesComp.java b/trunk/SIPRPSoft/src/siprp/data/inner/TiposExamesComp.java new file mode 100644 index 00000000..fbf480d8 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/TiposExamesComp.java @@ -0,0 +1,343 @@ +/* +* TiposExamesComp.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class TiposExamesComp extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + 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 = "tipos_exames_comp1277401737185"; + + 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 + { + setLockedForRefresh( true ); + 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.ListfromExamesPerfis_tipo() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/Trabalhadores.java b/trunk/SIPRPSoft/src/siprp/data/inner/Trabalhadores.java new file mode 100644 index 00000000..4f344f90 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/Trabalhadores.java @@ -0,0 +1,1341 @@ +/* +* Trabalhadores.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class Trabalhadores extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( Trabalhadores.ID, Trabalhadores.ID_INDEX ); + FIELD_INDEXES.put( Trabalhadores.ID_FULL, Trabalhadores.ID_INDEX ); + FIELD_INDEXES.put( Trabalhadores.NOME, Trabalhadores.NOME_INDEX ); + FIELD_INDEXES.put( Trabalhadores.NOME_FULL, Trabalhadores.NOME_INDEX ); + FIELD_INDEXES.put( Trabalhadores.SEXO, Trabalhadores.SEXO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.SEXO_FULL, Trabalhadores.SEXO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.DATA_NASCIMENTO, Trabalhadores.DATA_NASCIMENTO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.DATA_NASCIMENTO_FULL, Trabalhadores.DATA_NASCIMENTO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.NACIONALIDADE, Trabalhadores.NACIONALIDADE_INDEX ); + FIELD_INDEXES.put( Trabalhadores.NACIONALIDADE_FULL, Trabalhadores.NACIONALIDADE_INDEX ); + FIELD_INDEXES.put( Trabalhadores.NUMERO_MECANOGRAFICO, Trabalhadores.NUMERO_MECANOGRAFICO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.NUMERO_MECANOGRAFICO_FULL, Trabalhadores.NUMERO_MECANOGRAFICO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.DATA_ADMISSAO, Trabalhadores.DATA_ADMISSAO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.DATA_ADMISSAO_FULL, Trabalhadores.DATA_ADMISSAO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.CATEGORIA, Trabalhadores.CATEGORIA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.CATEGORIA_FULL, Trabalhadores.CATEGORIA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.LOCAL_TRABALHO, Trabalhadores.LOCAL_TRABALHO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.LOCAL_TRABALHO_FULL, Trabalhadores.LOCAL_TRABALHO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.FUNCAO_PROPOSTA, Trabalhadores.FUNCAO_PROPOSTA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.FUNCAO_PROPOSTA_FULL, Trabalhadores.FUNCAO_PROPOSTA_INDEX ); + FIELD_INDEXES.put( Trabalhadores.DATA_ADMISSAO_FUNCAO, Trabalhadores.DATA_ADMISSAO_FUNCAO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.DATA_ADMISSAO_FUNCAO_FULL, Trabalhadores.DATA_ADMISSAO_FUNCAO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.OBSERVACOES, Trabalhadores.OBSERVACOES_INDEX ); + FIELD_INDEXES.put( Trabalhadores.OBSERVACOES_FULL, Trabalhadores.OBSERVACOES_INDEX ); + FIELD_INDEXES.put( Trabalhadores.INACTIVO, Trabalhadores.INACTIVO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.INACTIVO_FULL, Trabalhadores.INACTIVO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( Trabalhadores.CLASS_IDENTIFIER, Trabalhadores.ESTABELECIMENTO_ID, Trabalhadores.TO_ESTABELECIMENTO_ID ); + FIELD_INDEXES.put( Trabalhadores.ESTABELECIMENTO_ID, Trabalhadores.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( Trabalhadores.ESTABELECIMENTO_ID_FULL, Trabalhadores.ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( Trabalhadores.TO_ESTABELECIMENTO_ID, Trabalhadores.TO_ESTABELECIMENTO_ID_INDEX ); + FIELD_INDEXES.put( Trabalhadores.DATA_DEMISSAO, Trabalhadores.DATA_DEMISSAO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.DATA_DEMISSAO_FULL, Trabalhadores.DATA_DEMISSAO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.OBSERVACOES_GESTAO, Trabalhadores.OBSERVACOES_GESTAO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.OBSERVACOES_GESTAO_FULL, Trabalhadores.OBSERVACOES_GESTAO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.PERFIL, Trabalhadores.PERFIL_INDEX ); + FIELD_INDEXES.put( Trabalhadores.PERFIL_FULL, Trabalhadores.PERFIL_INDEX ); + FIELD_INDEXES.put( Trabalhadores.ACTUALIZACAO, Trabalhadores.ACTUALIZACAO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.ACTUALIZACAO_FULL, Trabalhadores.ACTUALIZACAO_INDEX ); + FIELD_INDEXES.put( Trabalhadores.NOME_PLAIN, Trabalhadores.NOME_PLAIN_INDEX ); + FIELD_INDEXES.put( Trabalhadores.NOME_PLAIN_FULL, Trabalhadores.NOME_PLAIN_INDEX ); + FIELD_INDEXES.put( Trabalhadores.BI, Trabalhadores.BI_INDEX ); + FIELD_INDEXES.put( Trabalhadores.BI_FULL, Trabalhadores.BI_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( Trabalhadores.class, Trabalhadores.ESTABELECIMENTO_ID, siprp.data.outer.EstabelecimentosData.class, siprp.data.outer.EstabelecimentosData.ID ); + + public static final String TABLENAME = "trabalhadores"; + + + public static final String CLASS_IDENTIFIER = "trabalhadores1277401737185"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores.id"; + public static final int ID_INDEX = 0; + public static final String NOME = "nome"; + public static final String NOME_FULL = "trabalhadores.nome"; + public static final int NOME_INDEX = 1; + public static final String SEXO = "sexo"; + public static final String SEXO_FULL = "trabalhadores.sexo"; + public static final int SEXO_INDEX = 2; + public static final String DATA_NASCIMENTO = "data_nascimento"; + public static final String DATA_NASCIMENTO_FULL = "trabalhadores.data_nascimento"; + public static final int DATA_NASCIMENTO_INDEX = 3; + public static final String NACIONALIDADE = "nacionalidade"; + public static final String NACIONALIDADE_FULL = "trabalhadores.nacionalidade"; + public static final int NACIONALIDADE_INDEX = 4; + public static final String NUMERO_MECANOGRAFICO = "numero_mecanografico"; + public static final String NUMERO_MECANOGRAFICO_FULL = "trabalhadores.numero_mecanografico"; + public static final int NUMERO_MECANOGRAFICO_INDEX = 5; + public static final String DATA_ADMISSAO = "data_admissao"; + public static final String DATA_ADMISSAO_FULL = "trabalhadores.data_admissao"; + public static final int DATA_ADMISSAO_INDEX = 6; + public static final String CATEGORIA = "categoria"; + public static final String CATEGORIA_FULL = "trabalhadores.categoria"; + public static final int CATEGORIA_INDEX = 7; + public static final String LOCAL_TRABALHO = "local_trabalho"; + public static final String LOCAL_TRABALHO_FULL = "trabalhadores.local_trabalho"; + public static final int LOCAL_TRABALHO_INDEX = 8; + public static final String FUNCAO_PROPOSTA = "funcao_proposta"; + public static final String FUNCAO_PROPOSTA_FULL = "trabalhadores.funcao_proposta"; + public static final int FUNCAO_PROPOSTA_INDEX = 9; + public static final String DATA_ADMISSAO_FUNCAO = "data_admissao_funcao"; + public static final String DATA_ADMISSAO_FUNCAO_FULL = "trabalhadores.data_admissao_funcao"; + public static final int DATA_ADMISSAO_FUNCAO_INDEX = 10; + public static final String OBSERVACOES = "observacoes"; + public static final String OBSERVACOES_FULL = "trabalhadores.observacoes"; + public static final int OBSERVACOES_INDEX = 11; + public static final String INACTIVO = "inactivo"; + public static final String INACTIVO_FULL = "trabalhadores.inactivo"; + public static final int INACTIVO_INDEX = 12; + public static final String ESTABELECIMENTO_ID = "estabelecimento_id"; + public static final String ESTABELECIMENTO_ID_FULL = "trabalhadores.estabelecimento_id"; + public static final int ESTABELECIMENTO_ID_INDEX = 13; + public static final String TO_ESTABELECIMENTO_ID = "to_estabelecimento_id"; + public static final int TO_ESTABELECIMENTO_ID_INDEX = 14; + public static final String DATA_DEMISSAO = "data_demissao"; + public static final String DATA_DEMISSAO_FULL = "trabalhadores.data_demissao"; + public static final int DATA_DEMISSAO_INDEX = 15; + public static final String OBSERVACOES_GESTAO = "observacoes_gestao"; + public static final String OBSERVACOES_GESTAO_FULL = "trabalhadores.observacoes_gestao"; + public static final int OBSERVACOES_GESTAO_INDEX = 16; + public static final String PERFIL = "perfil"; + public static final String PERFIL_FULL = "trabalhadores.perfil"; + public static final int PERFIL_INDEX = 17; + public static final String ACTUALIZACAO = "actualizacao"; + public static final String ACTUALIZACAO_FULL = "trabalhadores.actualizacao"; + public static final int ACTUALIZACAO_INDEX = 18; + public static final String NOME_PLAIN = "nome_plain"; + public static final String NOME_PLAIN_FULL = "trabalhadores.nome_plain"; + public static final int NOME_PLAIN_INDEX = 19; + public static final String BI = "bi"; + public static final String BI_FULL = "trabalhadores.bi"; + public static final int BI_INDEX = 20; + + public static final String FIELD_NAMES[] = new String[]{ + NOME, SEXO, DATA_NASCIMENTO, NACIONALIDADE, NUMERO_MECANOGRAFICO, DATA_ADMISSAO, + CATEGORIA, LOCAL_TRABALHO, FUNCAO_PROPOSTA, DATA_ADMISSAO_FUNCAO, OBSERVACOES, + INACTIVO, ESTABELECIMENTO_ID, TO_ESTABELECIMENTO_ID, DATA_DEMISSAO, + OBSERVACOES_GESTAO, PERFIL, ACTUALIZACAO, NOME_PLAIN, BI, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + NOME, TABLENAME + "." + SEXO, TABLENAME + "." + DATA_NASCIMENTO, TABLENAME + "." + NACIONALIDADE, TABLENAME + "." + NUMERO_MECANOGRAFICO, TABLENAME + "." + DATA_ADMISSAO, + TABLENAME + "." + CATEGORIA, TABLENAME + "." + LOCAL_TRABALHO, TABLENAME + "." + FUNCAO_PROPOSTA, TABLENAME + "." + DATA_ADMISSAO_FUNCAO, TABLENAME + "." + OBSERVACOES, + TABLENAME + "." + INACTIVO, TABLENAME + "." + ESTABELECIMENTO_ID, TABLENAME + "." + TO_ESTABELECIMENTO_ID, TABLENAME + "." + DATA_DEMISSAO, + TABLENAME + "." + OBSERVACOES_GESTAO, TABLENAME + "." + PERFIL, TABLENAME + "." + ACTUALIZACAO, TABLENAME + "." + NOME_PLAIN, TABLENAME + "." + BI, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, NOME, SEXO, DATA_NASCIMENTO, NACIONALIDADE, NUMERO_MECANOGRAFICO, + DATA_ADMISSAO, CATEGORIA, LOCAL_TRABALHO, FUNCAO_PROPOSTA, + DATA_ADMISSAO_FUNCAO, OBSERVACOES, INACTIVO, ESTABELECIMENTO_ID, DATA_DEMISSAO, + OBSERVACOES_GESTAO, PERFIL, ACTUALIZACAO, NOME_PLAIN, BI, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, NOME, SEXO, DATA_NASCIMENTO, NACIONALIDADE, NUMERO_MECANOGRAFICO, + DATA_ADMISSAO, CATEGORIA, LOCAL_TRABALHO, FUNCAO_PROPOSTA, + DATA_ADMISSAO_FUNCAO, OBSERVACOES, INACTIVO, ESTABELECIMENTO_ID, DATA_DEMISSAO, + OBSERVACOES_GESTAO, PERFIL, ACTUALIZACAO, NOME_PLAIN, BI, }; + + private Integer id; + private String nome; + private String sexo; + private java.util.Date data_nascimento; + private String nacionalidade; + private String numero_mecanografico; + private java.util.Date data_admissao; + private String categoria; + private String local_trabalho; + private String funcao_proposta; + private java.util.Date data_admissao_funcao; + private String observacoes; + private String inactivo; + private Integer estabelecimento_id; + private siprp.data.outer.EstabelecimentosData to_estabelecimento_id; + private java.util.Date data_demissao; + private String observacoes_gestao; + private Integer perfil; + private java.sql.Timestamp actualizacao; + private String nome_plain; + private String bi; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public Trabalhadores() + { + super(); + dirtyProperties = new boolean[]{ false, false, false, + false, false, false, false, false, false, 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 + { + setLockedForRefresh( true ); + 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.ListfromAvisos_trabalhador_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.AvisosData.class , getPrimaryKey().getMap().get("id"), "trabalhador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromExames_trabalhador_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.ExamesData.class , getPrimaryKey().getMap().get("id"), "trabalhador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromLembretes_trabalhador_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.LembretesData.class , getPrimaryKey().getMap().get("id"), "trabalhador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromMarcacoesTrabalhador_trabalhador_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.MarcacoesTrabalhadorData.class , getPrimaryKey().getMap().get("id"), "trabalhador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromTrabalhadoresConsultas_trabalhador_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresConsultasData.class , getPrimaryKey().getMap().get("id"), "trabalhador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromTrabalhadoresEcds_trabalhador_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresEcdsData.class , getPrimaryKey().getMap().get("id"), "trabalhador_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromTrabalhadoresProcesso_trabalhador_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresProcessoData.class , getPrimaryKey().getMap().get("id"), "trabalhador_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 + { + setLockedForRefresh( true ); + 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 getSexo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( SEXO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.sexo; + } + + public void setSexo( String sexo ) + { + try + { + setLockedForRefresh( true ); + preProcess( SEXO, sexo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.sexo = sexo; + LAZY_LOADED_OBJECTS.put( SEXO, Boolean.TRUE ); + } + + public java.util.Date getData_nascimento() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_NASCIMENTO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_nascimento; + } + + public void setData_nascimento( java.util.Date data_nascimento ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_NASCIMENTO, data_nascimento ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_nascimento = data_nascimento; + LAZY_LOADED_OBJECTS.put( DATA_NASCIMENTO, Boolean.TRUE ); + } + + public String getNacionalidade() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NACIONALIDADE ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nacionalidade; + } + + public void setNacionalidade( String nacionalidade ) + { + try + { + setLockedForRefresh( true ); + preProcess( NACIONALIDADE, nacionalidade ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nacionalidade = nacionalidade; + LAZY_LOADED_OBJECTS.put( NACIONALIDADE, Boolean.TRUE ); + } + + public String getNumero_mecanografico() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NUMERO_MECANOGRAFICO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.numero_mecanografico; + } + + public void setNumero_mecanografico( String numero_mecanografico ) + { + try + { + setLockedForRefresh( true ); + preProcess( NUMERO_MECANOGRAFICO, numero_mecanografico ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.numero_mecanografico = numero_mecanografico; + LAZY_LOADED_OBJECTS.put( NUMERO_MECANOGRAFICO, Boolean.TRUE ); + } + + public java.util.Date getData_admissao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_ADMISSAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_admissao; + } + + public void setData_admissao( java.util.Date data_admissao ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_ADMISSAO, data_admissao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_admissao = data_admissao; + LAZY_LOADED_OBJECTS.put( DATA_ADMISSAO, Boolean.TRUE ); + } + + public String getCategoria() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( CATEGORIA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.categoria; + } + + public void setCategoria( String categoria ) + { + try + { + setLockedForRefresh( true ); + preProcess( CATEGORIA, categoria ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.categoria = categoria; + LAZY_LOADED_OBJECTS.put( CATEGORIA, Boolean.TRUE ); + } + + public String getLocal_trabalho() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( LOCAL_TRABALHO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.local_trabalho; + } + + public void setLocal_trabalho( String local_trabalho ) + { + try + { + setLockedForRefresh( true ); + preProcess( LOCAL_TRABALHO, local_trabalho ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.local_trabalho = local_trabalho; + LAZY_LOADED_OBJECTS.put( LOCAL_TRABALHO, Boolean.TRUE ); + } + + public String getFuncao_proposta() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( FUNCAO_PROPOSTA ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.funcao_proposta; + } + + public void setFuncao_proposta( String funcao_proposta ) + { + try + { + setLockedForRefresh( true ); + preProcess( FUNCAO_PROPOSTA, funcao_proposta ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.funcao_proposta = funcao_proposta; + LAZY_LOADED_OBJECTS.put( FUNCAO_PROPOSTA, Boolean.TRUE ); + } + + public java.util.Date getData_admissao_funcao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_ADMISSAO_FUNCAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_admissao_funcao; + } + + public void setData_admissao_funcao( java.util.Date data_admissao_funcao ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_ADMISSAO_FUNCAO, data_admissao_funcao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_admissao_funcao = data_admissao_funcao; + LAZY_LOADED_OBJECTS.put( DATA_ADMISSAO_FUNCAO, Boolean.TRUE ); + } + + public String getObservacoes() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OBSERVACOES ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.observacoes; + } + + public void setObservacoes( String observacoes ) + { + try + { + setLockedForRefresh( true ); + preProcess( OBSERVACOES, observacoes ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.observacoes = observacoes; + LAZY_LOADED_OBJECTS.put( OBSERVACOES, 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 + { + setLockedForRefresh( true ); + 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 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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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_demissao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_DEMISSAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_demissao; + } + + public void setData_demissao( java.util.Date data_demissao ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_DEMISSAO, data_demissao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_demissao = data_demissao; + LAZY_LOADED_OBJECTS.put( DATA_DEMISSAO, Boolean.TRUE ); + } + + public String getObservacoes_gestao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OBSERVACOES_GESTAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.observacoes_gestao; + } + + public void setObservacoes_gestao( String observacoes_gestao ) + { + try + { + setLockedForRefresh( true ); + preProcess( OBSERVACOES_GESTAO, observacoes_gestao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.observacoes_gestao = observacoes_gestao; + LAZY_LOADED_OBJECTS.put( OBSERVACOES_GESTAO, 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 + { + setLockedForRefresh( true ); + 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 java.sql.Timestamp getActualizacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ACTUALIZACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.actualizacao; + } + + public void setActualizacao( java.sql.Timestamp actualizacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( ACTUALIZACAO, actualizacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.actualizacao = actualizacao; + LAZY_LOADED_OBJECTS.put( ACTUALIZACAO, Boolean.TRUE ); + } + + public String getNome_plain() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( NOME_PLAIN ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.nome_plain; + } + + public void setNome_plain( String nome_plain ) + { + try + { + setLockedForRefresh( true ); + preProcess( NOME_PLAIN, nome_plain ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.nome_plain = nome_plain; + LAZY_LOADED_OBJECTS.put( NOME_PLAIN, Boolean.TRUE ); + } + + public String getBi() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( BI ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.bi; + } + + public void setBi( String bi ) + { + try + { + setLockedForRefresh( true ); + preProcess( BI, bi ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.bi = bi; + LAZY_LOADED_OBJECTS.put( BI, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Trabalhadores.ID_INDEX: + value = getId(); + break; + case Trabalhadores.NOME_INDEX: + value = getNome(); + break; + case Trabalhadores.SEXO_INDEX: + value = getSexo(); + break; + case Trabalhadores.DATA_NASCIMENTO_INDEX: + value = getData_nascimento(); + break; + case Trabalhadores.NACIONALIDADE_INDEX: + value = getNacionalidade(); + break; + case Trabalhadores.NUMERO_MECANOGRAFICO_INDEX: + value = getNumero_mecanografico(); + break; + case Trabalhadores.DATA_ADMISSAO_INDEX: + value = getData_admissao(); + break; + case Trabalhadores.CATEGORIA_INDEX: + value = getCategoria(); + break; + case Trabalhadores.LOCAL_TRABALHO_INDEX: + value = getLocal_trabalho(); + break; + case Trabalhadores.FUNCAO_PROPOSTA_INDEX: + value = getFuncao_proposta(); + break; + case Trabalhadores.DATA_ADMISSAO_FUNCAO_INDEX: + value = getData_admissao_funcao(); + break; + case Trabalhadores.OBSERVACOES_INDEX: + value = getObservacoes(); + break; + case Trabalhadores.INACTIVO_INDEX: + value = getInactivo(); + break; + case Trabalhadores.ESTABELECIMENTO_ID_INDEX: + value = getEstabelecimento_id(); + break; + case Trabalhadores.TO_ESTABELECIMENTO_ID_INDEX: + value = toEstabelecimento_id(); + break; + case Trabalhadores.DATA_DEMISSAO_INDEX: + value = getData_demissao(); + break; + case Trabalhadores.OBSERVACOES_GESTAO_INDEX: + value = getObservacoes_gestao(); + break; + case Trabalhadores.PERFIL_INDEX: + value = getPerfil(); + break; + case Trabalhadores.ACTUALIZACAO_INDEX: + value = getActualizacao(); + break; + case Trabalhadores.NOME_PLAIN_INDEX: + value = getNome_plain(); + break; + case Trabalhadores.BI_INDEX: + value = getBi(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Trabalhadores.ID_INDEX: + value = this.id; + break; + case Trabalhadores.NOME_INDEX: + value = this.nome; + break; + case Trabalhadores.SEXO_INDEX: + value = this.sexo; + break; + case Trabalhadores.DATA_NASCIMENTO_INDEX: + value = this.data_nascimento; + break; + case Trabalhadores.NACIONALIDADE_INDEX: + value = this.nacionalidade; + break; + case Trabalhadores.NUMERO_MECANOGRAFICO_INDEX: + value = this.numero_mecanografico; + break; + case Trabalhadores.DATA_ADMISSAO_INDEX: + value = this.data_admissao; + break; + case Trabalhadores.CATEGORIA_INDEX: + value = this.categoria; + break; + case Trabalhadores.LOCAL_TRABALHO_INDEX: + value = this.local_trabalho; + break; + case Trabalhadores.FUNCAO_PROPOSTA_INDEX: + value = this.funcao_proposta; + break; + case Trabalhadores.DATA_ADMISSAO_FUNCAO_INDEX: + value = this.data_admissao_funcao; + break; + case Trabalhadores.OBSERVACOES_INDEX: + value = this.observacoes; + break; + case Trabalhadores.INACTIVO_INDEX: + value = this.inactivo; + break; + case Trabalhadores.ESTABELECIMENTO_ID_INDEX: + value = this.estabelecimento_id; + break; + case Trabalhadores.TO_ESTABELECIMENTO_ID_INDEX: + value = this.to_estabelecimento_id; + break; + case Trabalhadores.DATA_DEMISSAO_INDEX: + value = this.data_demissao; + break; + case Trabalhadores.OBSERVACOES_GESTAO_INDEX: + value = this.observacoes_gestao; + break; + case Trabalhadores.PERFIL_INDEX: + value = this.perfil; + break; + case Trabalhadores.ACTUALIZACAO_INDEX: + value = this.actualizacao; + break; + case Trabalhadores.NOME_PLAIN_INDEX: + value = this.nome_plain; + break; + case Trabalhadores.BI_INDEX: + value = this.bi; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Trabalhadores.ID_INDEX: + setId( ( Integer ) value ); + break; + case Trabalhadores.NOME_INDEX: + setNome( ( String ) value ); + break; + case Trabalhadores.SEXO_INDEX: + setSexo( ( String ) value ); + break; + case Trabalhadores.DATA_NASCIMENTO_INDEX: + setData_nascimento( ( java.util.Date ) value ); + break; + case Trabalhadores.NACIONALIDADE_INDEX: + setNacionalidade( ( String ) value ); + break; + case Trabalhadores.NUMERO_MECANOGRAFICO_INDEX: + setNumero_mecanografico( ( String ) value ); + break; + case Trabalhadores.DATA_ADMISSAO_INDEX: + setData_admissao( ( java.util.Date ) value ); + break; + case Trabalhadores.CATEGORIA_INDEX: + setCategoria( ( String ) value ); + break; + case Trabalhadores.LOCAL_TRABALHO_INDEX: + setLocal_trabalho( ( String ) value ); + break; + case Trabalhadores.FUNCAO_PROPOSTA_INDEX: + setFuncao_proposta( ( String ) value ); + break; + case Trabalhadores.DATA_ADMISSAO_FUNCAO_INDEX: + setData_admissao_funcao( ( java.util.Date ) value ); + break; + case Trabalhadores.OBSERVACOES_INDEX: + setObservacoes( ( String ) value ); + break; + case Trabalhadores.INACTIVO_INDEX: + setInactivo( ( String ) value ); + break; + case Trabalhadores.ESTABELECIMENTO_ID_INDEX: + setEstabelecimento_id( ( Integer ) value ); + break; + case Trabalhadores.TO_ESTABELECIMENTO_ID_INDEX: + setToEstabelecimento_id( ( siprp.data.outer.EstabelecimentosData ) value ); + break; + case Trabalhadores.DATA_DEMISSAO_INDEX: + setData_demissao( ( java.util.Date ) value ); + break; + case Trabalhadores.OBSERVACOES_GESTAO_INDEX: + setObservacoes_gestao( ( String ) value ); + break; + case Trabalhadores.PERFIL_INDEX: + setPerfil( ( Integer ) value ); + break; + case Trabalhadores.ACTUALIZACAO_INDEX: + setActualizacao( ( java.sql.Timestamp ) value ); + break; + case Trabalhadores.NOME_PLAIN_INDEX: + setNome_plain( ( String ) value ); + break; + case Trabalhadores.BI_INDEX: + setBi( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case Trabalhadores.ID_INDEX: + this.id = ( Integer ) value; + break; + case Trabalhadores.NOME_INDEX: + this.nome = ( String ) value; + break; + case Trabalhadores.SEXO_INDEX: + this.sexo = ( String ) value; + break; + case Trabalhadores.DATA_NASCIMENTO_INDEX: + this.data_nascimento = ( java.util.Date ) value; + break; + case Trabalhadores.NACIONALIDADE_INDEX: + this.nacionalidade = ( String ) value; + break; + case Trabalhadores.NUMERO_MECANOGRAFICO_INDEX: + this.numero_mecanografico = ( String ) value; + break; + case Trabalhadores.DATA_ADMISSAO_INDEX: + this.data_admissao = ( java.util.Date ) value; + break; + case Trabalhadores.CATEGORIA_INDEX: + this.categoria = ( String ) value; + break; + case Trabalhadores.LOCAL_TRABALHO_INDEX: + this.local_trabalho = ( String ) value; + break; + case Trabalhadores.FUNCAO_PROPOSTA_INDEX: + this.funcao_proposta = ( String ) value; + break; + case Trabalhadores.DATA_ADMISSAO_FUNCAO_INDEX: + this.data_admissao_funcao = ( java.util.Date ) value; + break; + case Trabalhadores.OBSERVACOES_INDEX: + this.observacoes = ( String ) value; + break; + case Trabalhadores.INACTIVO_INDEX: + this.inactivo = ( String ) value; + break; + case Trabalhadores.ESTABELECIMENTO_ID_INDEX: + this.estabelecimento_id = ( Integer ) value; + break; + case Trabalhadores.TO_ESTABELECIMENTO_ID_INDEX: + this.to_estabelecimento_id = ( siprp.data.outer.EstabelecimentosData ) value; + break; + case Trabalhadores.DATA_DEMISSAO_INDEX: + this.data_demissao = ( java.util.Date ) value; + break; + case Trabalhadores.OBSERVACOES_GESTAO_INDEX: + this.observacoes_gestao = ( String ) value; + break; + case Trabalhadores.PERFIL_INDEX: + this.perfil = ( Integer ) value; + break; + case Trabalhadores.ACTUALIZACAO_INDEX: + this.actualizacao = ( java.sql.Timestamp ) value; + break; + case Trabalhadores.NOME_PLAIN_INDEX: + this.nome_plain = ( String ) value; + break; + case Trabalhadores.BI_INDEX: + this.bi = ( 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 Trabalhadores.ID_INDEX: + theClass = Integer.class; + break; + case Trabalhadores.NOME_INDEX: + theClass = String.class; + break; + case Trabalhadores.SEXO_INDEX: + theClass = String.class; + break; + case Trabalhadores.DATA_NASCIMENTO_INDEX: + theClass = java.util.Date.class; + break; + case Trabalhadores.NACIONALIDADE_INDEX: + theClass = String.class; + break; + case Trabalhadores.NUMERO_MECANOGRAFICO_INDEX: + theClass = String.class; + break; + case Trabalhadores.DATA_ADMISSAO_INDEX: + theClass = java.util.Date.class; + break; + case Trabalhadores.CATEGORIA_INDEX: + theClass = String.class; + break; + case Trabalhadores.LOCAL_TRABALHO_INDEX: + theClass = String.class; + break; + case Trabalhadores.FUNCAO_PROPOSTA_INDEX: + theClass = String.class; + break; + case Trabalhadores.DATA_ADMISSAO_FUNCAO_INDEX: + theClass = java.util.Date.class; + break; + case Trabalhadores.OBSERVACOES_INDEX: + theClass = String.class; + break; + case Trabalhadores.INACTIVO_INDEX: + theClass = String.class; + break; + case Trabalhadores.ESTABELECIMENTO_ID_INDEX: + theClass = Integer.class; + break; + case Trabalhadores.TO_ESTABELECIMENTO_ID_INDEX: + theClass = siprp.data.outer.EstabelecimentosData.class; + break; + case Trabalhadores.DATA_DEMISSAO_INDEX: + theClass = java.util.Date.class; + break; + case Trabalhadores.OBSERVACOES_GESTAO_INDEX: + theClass = String.class; + break; + case Trabalhadores.PERFIL_INDEX: + theClass = Integer.class; + break; + case Trabalhadores.ACTUALIZACAO_INDEX: + theClass = java.sql.Timestamp.class; + break; + case Trabalhadores.NOME_PLAIN_INDEX: + theClass = String.class; + break; + case Trabalhadores.BI_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : Trabalhadores._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, Trabalhadores.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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresConsultas.java b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresConsultas.java new file mode 100644 index 00000000..0cb1ab08 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresConsultas.java @@ -0,0 +1,644 @@ +/* +* TrabalhadoresConsultas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class TrabalhadoresConsultas extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( TrabalhadoresConsultas.ID, TrabalhadoresConsultas.ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultas.ID_FULL, TrabalhadoresConsultas.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresConsultas.CLASS_IDENTIFIER, TrabalhadoresConsultas.TRABALHADOR_ID, TrabalhadoresConsultas.TO_TRABALHADOR_ID ); + FIELD_INDEXES.put( TrabalhadoresConsultas.TRABALHADOR_ID, TrabalhadoresConsultas.TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultas.TRABALHADOR_ID_FULL, TrabalhadoresConsultas.TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultas.TO_TRABALHADOR_ID, TrabalhadoresConsultas.TO_TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultas.DATA, TrabalhadoresConsultas.DATA_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultas.DATA_FULL, TrabalhadoresConsultas.DATA_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultas.ESTADO, TrabalhadoresConsultas.ESTADO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultas.ESTADO_FULL, TrabalhadoresConsultas.ESTADO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresConsultas.CLASS_IDENTIFIER, TrabalhadoresConsultas.PRESTADOR_ID, TrabalhadoresConsultas.TO_PRESTADOR_ID ); + FIELD_INDEXES.put( TrabalhadoresConsultas.PRESTADOR_ID, TrabalhadoresConsultas.PRESTADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultas.PRESTADOR_ID_FULL, TrabalhadoresConsultas.PRESTADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultas.TO_PRESTADOR_ID, TrabalhadoresConsultas.TO_PRESTADOR_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresConsultas.CLASS_IDENTIFIER, TrabalhadoresConsultas.PROCESSO_ID, TrabalhadoresConsultas.TO_PROCESSO_ID ); + FIELD_INDEXES.put( TrabalhadoresConsultas.PROCESSO_ID, TrabalhadoresConsultas.PROCESSO_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultas.PROCESSO_ID_FULL, TrabalhadoresConsultas.PROCESSO_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultas.TO_PROCESSO_ID, TrabalhadoresConsultas.TO_PROCESSO_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( TrabalhadoresConsultas.class, TrabalhadoresConsultas.TRABALHADOR_ID, siprp.data.outer.TrabalhadoresData.class, siprp.data.outer.TrabalhadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprestador_idToprestadores = + new com.evolute.entity.ForeignKey( TrabalhadoresConsultas.class, TrabalhadoresConsultas.PRESTADOR_ID, siprp.data.outer.PrestadoresData.class, siprp.data.outer.PrestadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprocesso_idTotrabalhadores_processo = + new com.evolute.entity.ForeignKey( TrabalhadoresConsultas.class, TrabalhadoresConsultas.PROCESSO_ID, siprp.data.outer.TrabalhadoresProcessoData.class, siprp.data.outer.TrabalhadoresProcessoData.ID ); + + public static final String TABLENAME = "trabalhadores_consultas"; + + + public static final String CLASS_IDENTIFIER = "trabalhadores_consultas1277401737186"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_consultas.id"; + public static final int ID_INDEX = 0; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "trabalhadores_consultas.trabalhador_id"; + public static final int TRABALHADOR_ID_INDEX = 1; + public static final String TO_TRABALHADOR_ID = "to_trabalhador_id"; + public static final int TO_TRABALHADOR_ID_INDEX = 2; + public static final String DATA = "data"; + public static final String DATA_FULL = "trabalhadores_consultas.data"; + public static final int DATA_INDEX = 3; + public static final String ESTADO = "estado"; + public static final String ESTADO_FULL = "trabalhadores_consultas.estado"; + public static final int ESTADO_INDEX = 4; + public static final String PRESTADOR_ID = "prestador_id"; + public static final String PRESTADOR_ID_FULL = "trabalhadores_consultas.prestador_id"; + public static final int PRESTADOR_ID_INDEX = 5; + public static final String TO_PRESTADOR_ID = "to_prestador_id"; + public static final int TO_PRESTADOR_ID_INDEX = 6; + public static final String PROCESSO_ID = "processo_id"; + public static final String PROCESSO_ID_FULL = "trabalhadores_consultas.processo_id"; + public static final int PROCESSO_ID_INDEX = 7; + public static final String TO_PROCESSO_ID = "to_processo_id"; + public static final int TO_PROCESSO_ID_INDEX = 8; + + public static final String FIELD_NAMES[] = new String[]{ + TRABALHADOR_ID, TO_TRABALHADOR_ID, DATA, ESTADO, PRESTADOR_ID, TO_PRESTADOR_ID, + PROCESSO_ID, TO_PROCESSO_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TRABALHADOR_ID, TABLENAME + "." + TO_TRABALHADOR_ID, TABLENAME + "." + DATA, TABLENAME + "." + ESTADO, TABLENAME + "." + PRESTADOR_ID, TABLENAME + "." + TO_PRESTADOR_ID, + TABLENAME + "." + PROCESSO_ID, TABLENAME + "." + TO_PROCESSO_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TRABALHADOR_ID, DATA, ESTADO, PRESTADOR_ID, PROCESSO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, TRABALHADOR_ID, DATA, ESTADO, PRESTADOR_ID, PROCESSO_ID, }; + + private Integer id; + private Integer trabalhador_id; + private siprp.data.outer.TrabalhadoresData to_trabalhador_id; + private java.util.Date data; + private Integer estado; + private Integer prestador_id; + private siprp.data.outer.PrestadoresData to_prestador_id; + private Integer processo_id; + private siprp.data.outer.TrabalhadoresProcessoData to_processo_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public TrabalhadoresConsultas() + { + super(); + dirtyProperties = new boolean[]{ 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 + { + setLockedForRefresh( true ); + 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.ListfromTrabalhadoresConsultasDatas_trabalhadores_consultas_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresConsultasDatasData.class , getPrimaryKey().getMap().get("id"), "trabalhadores_consultas_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 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 + { + setLockedForRefresh( true ); + 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 Integer getEstado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESTADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.estado; + } + + public void setEstado( Integer estado ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESTADO, estado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.estado = estado; + LAZY_LOADED_OBJECTS.put( ESTADO, Boolean.TRUE ); + } + + public Integer getPrestador_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PRESTADOR_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.prestador_id; + } + + public void setPrestador_id( Integer prestador_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PRESTADOR_ID, prestador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.prestador_id = prestador_id; + LAZY_LOADED_OBJECTS.put( PRESTADOR_ID, Boolean.TRUE ); + } + + public siprp.data.outer.PrestadoresData toPrestador_id() + { + try + { + prepare( TO_PRESTADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_prestador_id; + } + + public void setToPrestador_id( siprp.data.outer.PrestadoresData to_prestador_id ) + { + try + { + preProcess( TO_PRESTADOR_ID, to_prestador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_prestador_id = to_prestador_id; + } + + public Integer getProcesso_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PROCESSO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.processo_id; + } + + public void setProcesso_id( Integer processo_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PROCESSO_ID, processo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.processo_id = processo_id; + LAZY_LOADED_OBJECTS.put( PROCESSO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.TrabalhadoresProcessoData toProcesso_id() + { + try + { + prepare( TO_PROCESSO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_processo_id; + } + + public void setToProcesso_id( siprp.data.outer.TrabalhadoresProcessoData to_processo_id ) + { + try + { + preProcess( TO_PROCESSO_ID, to_processo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_processo_id = to_processo_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresConsultas.ID_INDEX: + value = getId(); + break; + case TrabalhadoresConsultas.TRABALHADOR_ID_INDEX: + value = getTrabalhador_id(); + break; + case TrabalhadoresConsultas.TO_TRABALHADOR_ID_INDEX: + value = toTrabalhador_id(); + break; + case TrabalhadoresConsultas.DATA_INDEX: + value = getData(); + break; + case TrabalhadoresConsultas.ESTADO_INDEX: + value = getEstado(); + break; + case TrabalhadoresConsultas.PRESTADOR_ID_INDEX: + value = getPrestador_id(); + break; + case TrabalhadoresConsultas.TO_PRESTADOR_ID_INDEX: + value = toPrestador_id(); + break; + case TrabalhadoresConsultas.PROCESSO_ID_INDEX: + value = getProcesso_id(); + break; + case TrabalhadoresConsultas.TO_PROCESSO_ID_INDEX: + value = toProcesso_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresConsultas.ID_INDEX: + value = this.id; + break; + case TrabalhadoresConsultas.TRABALHADOR_ID_INDEX: + value = this.trabalhador_id; + break; + case TrabalhadoresConsultas.TO_TRABALHADOR_ID_INDEX: + value = this.to_trabalhador_id; + break; + case TrabalhadoresConsultas.DATA_INDEX: + value = this.data; + break; + case TrabalhadoresConsultas.ESTADO_INDEX: + value = this.estado; + break; + case TrabalhadoresConsultas.PRESTADOR_ID_INDEX: + value = this.prestador_id; + break; + case TrabalhadoresConsultas.TO_PRESTADOR_ID_INDEX: + value = this.to_prestador_id; + break; + case TrabalhadoresConsultas.PROCESSO_ID_INDEX: + value = this.processo_id; + break; + case TrabalhadoresConsultas.TO_PROCESSO_ID_INDEX: + value = this.to_processo_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresConsultas.ID_INDEX: + setId( ( Integer ) value ); + break; + case TrabalhadoresConsultas.TRABALHADOR_ID_INDEX: + setTrabalhador_id( ( Integer ) value ); + break; + case TrabalhadoresConsultas.TO_TRABALHADOR_ID_INDEX: + setToTrabalhador_id( ( siprp.data.outer.TrabalhadoresData ) value ); + break; + case TrabalhadoresConsultas.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case TrabalhadoresConsultas.ESTADO_INDEX: + setEstado( ( Integer ) value ); + break; + case TrabalhadoresConsultas.PRESTADOR_ID_INDEX: + setPrestador_id( ( Integer ) value ); + break; + case TrabalhadoresConsultas.TO_PRESTADOR_ID_INDEX: + setToPrestador_id( ( siprp.data.outer.PrestadoresData ) value ); + break; + case TrabalhadoresConsultas.PROCESSO_ID_INDEX: + setProcesso_id( ( Integer ) value ); + break; + case TrabalhadoresConsultas.TO_PROCESSO_ID_INDEX: + setToProcesso_id( ( siprp.data.outer.TrabalhadoresProcessoData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresConsultas.ID_INDEX: + this.id = ( Integer ) value; + break; + case TrabalhadoresConsultas.TRABALHADOR_ID_INDEX: + this.trabalhador_id = ( Integer ) value; + break; + case TrabalhadoresConsultas.TO_TRABALHADOR_ID_INDEX: + this.to_trabalhador_id = ( siprp.data.outer.TrabalhadoresData ) value; + break; + case TrabalhadoresConsultas.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case TrabalhadoresConsultas.ESTADO_INDEX: + this.estado = ( Integer ) value; + break; + case TrabalhadoresConsultas.PRESTADOR_ID_INDEX: + this.prestador_id = ( Integer ) value; + break; + case TrabalhadoresConsultas.TO_PRESTADOR_ID_INDEX: + this.to_prestador_id = ( siprp.data.outer.PrestadoresData ) value; + break; + case TrabalhadoresConsultas.PROCESSO_ID_INDEX: + this.processo_id = ( Integer ) value; + break; + case TrabalhadoresConsultas.TO_PROCESSO_ID_INDEX: + this.to_processo_id = ( siprp.data.outer.TrabalhadoresProcessoData ) 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 TrabalhadoresConsultas.ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresConsultas.TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresConsultas.TO_TRABALHADOR_ID_INDEX: + theClass = siprp.data.outer.TrabalhadoresData.class; + break; + case TrabalhadoresConsultas.DATA_INDEX: + theClass = java.util.Date.class; + break; + case TrabalhadoresConsultas.ESTADO_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresConsultas.PRESTADOR_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresConsultas.TO_PRESTADOR_ID_INDEX: + theClass = siprp.data.outer.PrestadoresData.class; + break; + case TrabalhadoresConsultas.PROCESSO_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresConsultas.TO_PROCESSO_ID_INDEX: + theClass = siprp.data.outer.TrabalhadoresProcessoData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : TrabalhadoresConsultas._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, TrabalhadoresConsultas.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresConsultasDatas.java b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresConsultasDatas.java new file mode 100644 index 00000000..5944b57e --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresConsultasDatas.java @@ -0,0 +1,573 @@ +/* +* TrabalhadoresConsultasDatas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class TrabalhadoresConsultasDatas extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( TrabalhadoresConsultasDatas.ID, TrabalhadoresConsultasDatas.ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatas.ID_FULL, TrabalhadoresConsultasDatas.ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatas.DATA, TrabalhadoresConsultasDatas.DATA_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatas.DATA_FULL, TrabalhadoresConsultasDatas.DATA_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresConsultasDatas.CLASS_IDENTIFIER, TrabalhadoresConsultasDatas.TRABALHADORES_CONSULTAS_ID, TrabalhadoresConsultasDatas.TO_TRABALHADORES_CONSULTAS_ID ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatas.TRABALHADORES_CONSULTAS_ID, TrabalhadoresConsultasDatas.TRABALHADORES_CONSULTAS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatas.TRABALHADORES_CONSULTAS_ID_FULL, TrabalhadoresConsultasDatas.TRABALHADORES_CONSULTAS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatas.TO_TRABALHADORES_CONSULTAS_ID, TrabalhadoresConsultasDatas.TO_TRABALHADORES_CONSULTAS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatas.ESTADO, TrabalhadoresConsultasDatas.ESTADO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatas.ESTADO_FULL, TrabalhadoresConsultasDatas.ESTADO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresConsultasDatas.CLASS_IDENTIFIER, TrabalhadoresConsultasDatas.PRESTADOR_ID, TrabalhadoresConsultasDatas.TO_PRESTADOR_ID ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatas.PRESTADOR_ID, TrabalhadoresConsultasDatas.PRESTADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatas.PRESTADOR_ID_FULL, TrabalhadoresConsultasDatas.PRESTADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatas.TO_PRESTADOR_ID, TrabalhadoresConsultasDatas.TO_PRESTADOR_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 ForeignKeytrabalhadores_consultas_idTotrabalhadores_consultas = + new com.evolute.entity.ForeignKey( TrabalhadoresConsultasDatas.class, TrabalhadoresConsultasDatas.TRABALHADORES_CONSULTAS_ID, siprp.data.outer.TrabalhadoresConsultasData.class, siprp.data.outer.TrabalhadoresConsultasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprestador_idToprestadores = + new com.evolute.entity.ForeignKey( TrabalhadoresConsultasDatas.class, TrabalhadoresConsultasDatas.PRESTADOR_ID, siprp.data.outer.PrestadoresData.class, siprp.data.outer.PrestadoresData.ID ); + + public static final String TABLENAME = "trabalhadores_consultas_datas"; + + + public static final String CLASS_IDENTIFIER = "trabalhadores_consultas_datas1277401737187"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_consultas_datas.id"; + public static final int ID_INDEX = 0; + public static final String DATA = "data"; + public static final String DATA_FULL = "trabalhadores_consultas_datas.data"; + public static final int DATA_INDEX = 1; + public static final String TRABALHADORES_CONSULTAS_ID = "trabalhadores_consultas_id"; + public static final String TRABALHADORES_CONSULTAS_ID_FULL = "trabalhadores_consultas_datas.trabalhadores_consultas_id"; + public static final int TRABALHADORES_CONSULTAS_ID_INDEX = 2; + public static final String TO_TRABALHADORES_CONSULTAS_ID = "to_trabalhadores_consultas_id"; + public static final int TO_TRABALHADORES_CONSULTAS_ID_INDEX = 3; + public static final String ESTADO = "estado"; + public static final String ESTADO_FULL = "trabalhadores_consultas_datas.estado"; + public static final int ESTADO_INDEX = 4; + public static final String PRESTADOR_ID = "prestador_id"; + public static final String PRESTADOR_ID_FULL = "trabalhadores_consultas_datas.prestador_id"; + public static final int PRESTADOR_ID_INDEX = 5; + public static final String TO_PRESTADOR_ID = "to_prestador_id"; + public static final int TO_PRESTADOR_ID_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, TRABALHADORES_CONSULTAS_ID, TO_TRABALHADORES_CONSULTAS_ID, ESTADO, + PRESTADOR_ID, TO_PRESTADOR_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DATA, TABLENAME + "." + TRABALHADORES_CONSULTAS_ID, TABLENAME + "." + TO_TRABALHADORES_CONSULTAS_ID, TABLENAME + "." + ESTADO, + TABLENAME + "." + PRESTADOR_ID, TABLENAME + "." + TO_PRESTADOR_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATA, TRABALHADORES_CONSULTAS_ID, ESTADO, PRESTADOR_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DATA, TRABALHADORES_CONSULTAS_ID, ESTADO, PRESTADOR_ID, }; + + private Integer id; + private java.util.Date data; + private Integer trabalhadores_consultas_id; + private siprp.data.outer.TrabalhadoresConsultasData to_trabalhadores_consultas_id; + private Integer estado; + private Integer prestador_id; + private siprp.data.outer.PrestadoresData to_prestador_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public TrabalhadoresConsultasDatas() + { + 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 + { + setLockedForRefresh( true ); + 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.ListfromLembretes_trabalhadores_consultas_datas_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.LembretesData.class , getPrimaryKey().getMap().get("id"), "trabalhadores_consultas_datas_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromTrabalhadoresConsultasDatasEmails_trabalhadores_consultas_datas_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresConsultasDatasEmailsData.class , getPrimaryKey().getMap().get("id"), "trabalhadores_consultas_datas_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromTrabalhadoresConsultasDatasObservacoes_trabalhadores_consultas_datas_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresConsultasDatasObservacoesData.class , getPrimaryKey().getMap().get("id"), "trabalhadores_consultas_datas_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + 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 + { + setLockedForRefresh( true ); + 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 Integer getTrabalhadores_consultas_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TRABALHADORES_CONSULTAS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.trabalhadores_consultas_id; + } + + public void setTrabalhadores_consultas_id( Integer trabalhadores_consultas_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( TRABALHADORES_CONSULTAS_ID, trabalhadores_consultas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.trabalhadores_consultas_id = trabalhadores_consultas_id; + LAZY_LOADED_OBJECTS.put( TRABALHADORES_CONSULTAS_ID, Boolean.TRUE ); + } + + public siprp.data.outer.TrabalhadoresConsultasData toTrabalhadores_consultas_id() + { + try + { + prepare( TO_TRABALHADORES_CONSULTAS_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhadores_consultas_id; + } + + public void setToTrabalhadores_consultas_id( siprp.data.outer.TrabalhadoresConsultasData to_trabalhadores_consultas_id ) + { + try + { + preProcess( TO_TRABALHADORES_CONSULTAS_ID, to_trabalhadores_consultas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_trabalhadores_consultas_id = to_trabalhadores_consultas_id; + } + + public Integer getEstado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESTADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.estado; + } + + public void setEstado( Integer estado ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESTADO, estado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.estado = estado; + LAZY_LOADED_OBJECTS.put( ESTADO, Boolean.TRUE ); + } + + public Integer getPrestador_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PRESTADOR_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.prestador_id; + } + + public void setPrestador_id( Integer prestador_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PRESTADOR_ID, prestador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.prestador_id = prestador_id; + LAZY_LOADED_OBJECTS.put( PRESTADOR_ID, Boolean.TRUE ); + } + + public siprp.data.outer.PrestadoresData toPrestador_id() + { + try + { + prepare( TO_PRESTADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_prestador_id; + } + + public void setToPrestador_id( siprp.data.outer.PrestadoresData to_prestador_id ) + { + try + { + preProcess( TO_PRESTADOR_ID, to_prestador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_prestador_id = to_prestador_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresConsultasDatas.ID_INDEX: + value = getId(); + break; + case TrabalhadoresConsultasDatas.DATA_INDEX: + value = getData(); + break; + case TrabalhadoresConsultasDatas.TRABALHADORES_CONSULTAS_ID_INDEX: + value = getTrabalhadores_consultas_id(); + break; + case TrabalhadoresConsultasDatas.TO_TRABALHADORES_CONSULTAS_ID_INDEX: + value = toTrabalhadores_consultas_id(); + break; + case TrabalhadoresConsultasDatas.ESTADO_INDEX: + value = getEstado(); + break; + case TrabalhadoresConsultasDatas.PRESTADOR_ID_INDEX: + value = getPrestador_id(); + break; + case TrabalhadoresConsultasDatas.TO_PRESTADOR_ID_INDEX: + value = toPrestador_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresConsultasDatas.ID_INDEX: + value = this.id; + break; + case TrabalhadoresConsultasDatas.DATA_INDEX: + value = this.data; + break; + case TrabalhadoresConsultasDatas.TRABALHADORES_CONSULTAS_ID_INDEX: + value = this.trabalhadores_consultas_id; + break; + case TrabalhadoresConsultasDatas.TO_TRABALHADORES_CONSULTAS_ID_INDEX: + value = this.to_trabalhadores_consultas_id; + break; + case TrabalhadoresConsultasDatas.ESTADO_INDEX: + value = this.estado; + break; + case TrabalhadoresConsultasDatas.PRESTADOR_ID_INDEX: + value = this.prestador_id; + break; + case TrabalhadoresConsultasDatas.TO_PRESTADOR_ID_INDEX: + value = this.to_prestador_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresConsultasDatas.ID_INDEX: + setId( ( Integer ) value ); + break; + case TrabalhadoresConsultasDatas.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case TrabalhadoresConsultasDatas.TRABALHADORES_CONSULTAS_ID_INDEX: + setTrabalhadores_consultas_id( ( Integer ) value ); + break; + case TrabalhadoresConsultasDatas.TO_TRABALHADORES_CONSULTAS_ID_INDEX: + setToTrabalhadores_consultas_id( ( siprp.data.outer.TrabalhadoresConsultasData ) value ); + break; + case TrabalhadoresConsultasDatas.ESTADO_INDEX: + setEstado( ( Integer ) value ); + break; + case TrabalhadoresConsultasDatas.PRESTADOR_ID_INDEX: + setPrestador_id( ( Integer ) value ); + break; + case TrabalhadoresConsultasDatas.TO_PRESTADOR_ID_INDEX: + setToPrestador_id( ( siprp.data.outer.PrestadoresData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresConsultasDatas.ID_INDEX: + this.id = ( Integer ) value; + break; + case TrabalhadoresConsultasDatas.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case TrabalhadoresConsultasDatas.TRABALHADORES_CONSULTAS_ID_INDEX: + this.trabalhadores_consultas_id = ( Integer ) value; + break; + case TrabalhadoresConsultasDatas.TO_TRABALHADORES_CONSULTAS_ID_INDEX: + this.to_trabalhadores_consultas_id = ( siprp.data.outer.TrabalhadoresConsultasData ) value; + break; + case TrabalhadoresConsultasDatas.ESTADO_INDEX: + this.estado = ( Integer ) value; + break; + case TrabalhadoresConsultasDatas.PRESTADOR_ID_INDEX: + this.prestador_id = ( Integer ) value; + break; + case TrabalhadoresConsultasDatas.TO_PRESTADOR_ID_INDEX: + this.to_prestador_id = ( siprp.data.outer.PrestadoresData ) 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 TrabalhadoresConsultasDatas.ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresConsultasDatas.DATA_INDEX: + theClass = java.util.Date.class; + break; + case TrabalhadoresConsultasDatas.TRABALHADORES_CONSULTAS_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresConsultasDatas.TO_TRABALHADORES_CONSULTAS_ID_INDEX: + theClass = siprp.data.outer.TrabalhadoresConsultasData.class; + break; + case TrabalhadoresConsultasDatas.ESTADO_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresConsultasDatas.PRESTADOR_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresConsultasDatas.TO_PRESTADOR_ID_INDEX: + theClass = siprp.data.outer.PrestadoresData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : TrabalhadoresConsultasDatas._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, TrabalhadoresConsultasDatas.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresConsultasDatasEmails.java b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresConsultasDatasEmails.java new file mode 100644 index 00000000..93e69656 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresConsultasDatasEmails.java @@ -0,0 +1,532 @@ +/* +* TrabalhadoresConsultasDatasEmails.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class TrabalhadoresConsultasDatasEmails extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( TrabalhadoresConsultasDatasEmails.ID, TrabalhadoresConsultasDatasEmails.ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatasEmails.ID_FULL, TrabalhadoresConsultasDatasEmails.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresConsultasDatasEmails.CLASS_IDENTIFIER, TrabalhadoresConsultasDatasEmails.TRABALHADORES_CONSULTAS_DATAS_ID, TrabalhadoresConsultasDatasEmails.TO_TRABALHADORES_CONSULTAS_DATAS_ID ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatasEmails.TRABALHADORES_CONSULTAS_DATAS_ID, TrabalhadoresConsultasDatasEmails.TRABALHADORES_CONSULTAS_DATAS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatasEmails.TRABALHADORES_CONSULTAS_DATAS_ID_FULL, TrabalhadoresConsultasDatasEmails.TRABALHADORES_CONSULTAS_DATAS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatasEmails.TO_TRABALHADORES_CONSULTAS_DATAS_ID, TrabalhadoresConsultasDatasEmails.TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatasEmails.DESTINATION, TrabalhadoresConsultasDatasEmails.DESTINATION_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatasEmails.DESTINATION_FULL, TrabalhadoresConsultasDatasEmails.DESTINATION_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatasEmails.DATA, TrabalhadoresConsultasDatasEmails.DATA_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatasEmails.DATA_FULL, TrabalhadoresConsultasDatasEmails.DATA_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatasEmails.SUBJECT, TrabalhadoresConsultasDatasEmails.SUBJECT_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatasEmails.SUBJECT_FULL, TrabalhadoresConsultasDatasEmails.SUBJECT_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatasEmails.BODY, TrabalhadoresConsultasDatasEmails.BODY_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatasEmails.BODY_FULL, TrabalhadoresConsultasDatasEmails.BODY_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeytrabalhadores_consultas_datas_idTotrabalhadores_consultas_datas = + new com.evolute.entity.ForeignKey( TrabalhadoresConsultasDatasEmails.class, TrabalhadoresConsultasDatasEmails.TRABALHADORES_CONSULTAS_DATAS_ID, siprp.data.outer.TrabalhadoresConsultasDatasData.class, siprp.data.outer.TrabalhadoresConsultasDatasData.ID ); + + public static final String TABLENAME = "trabalhadores_consultas_datas_emails"; + + + public static final String CLASS_IDENTIFIER = "trabalhadores_consultas_datas_emails1277401737187"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_consultas_datas_emails.id"; + public static final int ID_INDEX = 0; + public static final String TRABALHADORES_CONSULTAS_DATAS_ID = "trabalhadores_consultas_datas_id"; + public static final String TRABALHADORES_CONSULTAS_DATAS_ID_FULL = "trabalhadores_consultas_datas_emails.trabalhadores_consultas_datas_id"; + public static final int TRABALHADORES_CONSULTAS_DATAS_ID_INDEX = 1; + public static final String TO_TRABALHADORES_CONSULTAS_DATAS_ID = "to_trabalhadores_consultas_datas_id"; + public static final int TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX = 2; + public static final String DESTINATION = "destination"; + public static final String DESTINATION_FULL = "trabalhadores_consultas_datas_emails.destination"; + public static final int DESTINATION_INDEX = 3; + public static final String DATA = "data"; + public static final String DATA_FULL = "trabalhadores_consultas_datas_emails.data"; + public static final int DATA_INDEX = 4; + public static final String SUBJECT = "subject"; + public static final String SUBJECT_FULL = "trabalhadores_consultas_datas_emails.subject"; + public static final int SUBJECT_INDEX = 5; + public static final String BODY = "body"; + public static final String BODY_FULL = "trabalhadores_consultas_datas_emails.body"; + public static final int BODY_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + TRABALHADORES_CONSULTAS_DATAS_ID, TO_TRABALHADORES_CONSULTAS_DATAS_ID, + DESTINATION, DATA, SUBJECT, BODY, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TRABALHADORES_CONSULTAS_DATAS_ID, TABLENAME + "." + TO_TRABALHADORES_CONSULTAS_DATAS_ID, + TABLENAME + "." + DESTINATION, TABLENAME + "." + DATA, TABLENAME + "." + SUBJECT, TABLENAME + "." + BODY, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TRABALHADORES_CONSULTAS_DATAS_ID, DESTINATION, DATA, SUBJECT, BODY, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, TRABALHADORES_CONSULTAS_DATAS_ID, DESTINATION, DATA, SUBJECT, BODY, }; + + private Integer id; + private Integer trabalhadores_consultas_datas_id; + private siprp.data.outer.TrabalhadoresConsultasDatasData to_trabalhadores_consultas_datas_id; + private String destination; + private java.util.Date data; + private String subject; + private String body; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public TrabalhadoresConsultasDatasEmails() + { + 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 + { + setLockedForRefresh( true ); + 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 getTrabalhadores_consultas_datas_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TRABALHADORES_CONSULTAS_DATAS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.trabalhadores_consultas_datas_id; + } + + public void setTrabalhadores_consultas_datas_id( Integer trabalhadores_consultas_datas_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( TRABALHADORES_CONSULTAS_DATAS_ID, trabalhadores_consultas_datas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.trabalhadores_consultas_datas_id = trabalhadores_consultas_datas_id; + LAZY_LOADED_OBJECTS.put( TRABALHADORES_CONSULTAS_DATAS_ID, Boolean.TRUE ); + } + + public siprp.data.outer.TrabalhadoresConsultasDatasData toTrabalhadores_consultas_datas_id() + { + try + { + prepare( TO_TRABALHADORES_CONSULTAS_DATAS_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhadores_consultas_datas_id; + } + + public void setToTrabalhadores_consultas_datas_id( siprp.data.outer.TrabalhadoresConsultasDatasData to_trabalhadores_consultas_datas_id ) + { + try + { + preProcess( TO_TRABALHADORES_CONSULTAS_DATAS_ID, to_trabalhadores_consultas_datas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_trabalhadores_consultas_datas_id = to_trabalhadores_consultas_datas_id; + } + + public String getDestination() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESTINATION ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.destination; + } + + public void setDestination( String destination ) + { + try + { + setLockedForRefresh( true ); + preProcess( DESTINATION, destination ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.destination = destination; + LAZY_LOADED_OBJECTS.put( DESTINATION, 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 + { + setLockedForRefresh( true ); + 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 getSubject() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( SUBJECT ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.subject; + } + + public void setSubject( String subject ) + { + try + { + setLockedForRefresh( true ); + preProcess( SUBJECT, subject ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.subject = subject; + LAZY_LOADED_OBJECTS.put( SUBJECT, Boolean.TRUE ); + } + + public String getBody() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( BODY ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.body; + } + + public void setBody( String body ) + { + try + { + setLockedForRefresh( true ); + preProcess( BODY, body ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.body = body; + LAZY_LOADED_OBJECTS.put( BODY, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresConsultasDatasEmails.ID_INDEX: + value = getId(); + break; + case TrabalhadoresConsultasDatasEmails.TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + value = getTrabalhadores_consultas_datas_id(); + break; + case TrabalhadoresConsultasDatasEmails.TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + value = toTrabalhadores_consultas_datas_id(); + break; + case TrabalhadoresConsultasDatasEmails.DESTINATION_INDEX: + value = getDestination(); + break; + case TrabalhadoresConsultasDatasEmails.DATA_INDEX: + value = getData(); + break; + case TrabalhadoresConsultasDatasEmails.SUBJECT_INDEX: + value = getSubject(); + break; + case TrabalhadoresConsultasDatasEmails.BODY_INDEX: + value = getBody(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresConsultasDatasEmails.ID_INDEX: + value = this.id; + break; + case TrabalhadoresConsultasDatasEmails.TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + value = this.trabalhadores_consultas_datas_id; + break; + case TrabalhadoresConsultasDatasEmails.TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + value = this.to_trabalhadores_consultas_datas_id; + break; + case TrabalhadoresConsultasDatasEmails.DESTINATION_INDEX: + value = this.destination; + break; + case TrabalhadoresConsultasDatasEmails.DATA_INDEX: + value = this.data; + break; + case TrabalhadoresConsultasDatasEmails.SUBJECT_INDEX: + value = this.subject; + break; + case TrabalhadoresConsultasDatasEmails.BODY_INDEX: + value = this.body; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresConsultasDatasEmails.ID_INDEX: + setId( ( Integer ) value ); + break; + case TrabalhadoresConsultasDatasEmails.TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + setTrabalhadores_consultas_datas_id( ( Integer ) value ); + break; + case TrabalhadoresConsultasDatasEmails.TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + setToTrabalhadores_consultas_datas_id( ( siprp.data.outer.TrabalhadoresConsultasDatasData ) value ); + break; + case TrabalhadoresConsultasDatasEmails.DESTINATION_INDEX: + setDestination( ( String ) value ); + break; + case TrabalhadoresConsultasDatasEmails.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case TrabalhadoresConsultasDatasEmails.SUBJECT_INDEX: + setSubject( ( String ) value ); + break; + case TrabalhadoresConsultasDatasEmails.BODY_INDEX: + setBody( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresConsultasDatasEmails.ID_INDEX: + this.id = ( Integer ) value; + break; + case TrabalhadoresConsultasDatasEmails.TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + this.trabalhadores_consultas_datas_id = ( Integer ) value; + break; + case TrabalhadoresConsultasDatasEmails.TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + this.to_trabalhadores_consultas_datas_id = ( siprp.data.outer.TrabalhadoresConsultasDatasData ) value; + break; + case TrabalhadoresConsultasDatasEmails.DESTINATION_INDEX: + this.destination = ( String ) value; + break; + case TrabalhadoresConsultasDatasEmails.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case TrabalhadoresConsultasDatasEmails.SUBJECT_INDEX: + this.subject = ( String ) value; + break; + case TrabalhadoresConsultasDatasEmails.BODY_INDEX: + this.body = ( 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 TrabalhadoresConsultasDatasEmails.ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresConsultasDatasEmails.TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresConsultasDatasEmails.TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + theClass = siprp.data.outer.TrabalhadoresConsultasDatasData.class; + break; + case TrabalhadoresConsultasDatasEmails.DESTINATION_INDEX: + theClass = String.class; + break; + case TrabalhadoresConsultasDatasEmails.DATA_INDEX: + theClass = java.util.Date.class; + break; + case TrabalhadoresConsultasDatasEmails.SUBJECT_INDEX: + theClass = String.class; + break; + case TrabalhadoresConsultasDatasEmails.BODY_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : TrabalhadoresConsultasDatasEmails._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, TrabalhadoresConsultasDatasEmails.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresConsultasDatasObservacoes.java b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresConsultasDatasObservacoes.java new file mode 100644 index 00000000..41943a87 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresConsultasDatasObservacoes.java @@ -0,0 +1,382 @@ +/* +* TrabalhadoresConsultasDatasObservacoes.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class TrabalhadoresConsultasDatasObservacoes extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( TrabalhadoresConsultasDatasObservacoes.ID, TrabalhadoresConsultasDatasObservacoes.ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatasObservacoes.ID_FULL, TrabalhadoresConsultasDatasObservacoes.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresConsultasDatasObservacoes.CLASS_IDENTIFIER, TrabalhadoresConsultasDatasObservacoes.TRABALHADORES_CONSULTAS_DATAS_ID, TrabalhadoresConsultasDatasObservacoes.TO_TRABALHADORES_CONSULTAS_DATAS_ID ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatasObservacoes.TRABALHADORES_CONSULTAS_DATAS_ID, TrabalhadoresConsultasDatasObservacoes.TRABALHADORES_CONSULTAS_DATAS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatasObservacoes.TRABALHADORES_CONSULTAS_DATAS_ID_FULL, TrabalhadoresConsultasDatasObservacoes.TRABALHADORES_CONSULTAS_DATAS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatasObservacoes.TO_TRABALHADORES_CONSULTAS_DATAS_ID, TrabalhadoresConsultasDatasObservacoes.TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatasObservacoes.OBSERVACAO, TrabalhadoresConsultasDatasObservacoes.OBSERVACAO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresConsultasDatasObservacoes.OBSERVACAO_FULL, TrabalhadoresConsultasDatasObservacoes.OBSERVACAO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeytrabalhadores_consultas_datas_idTotrabalhadores_consultas_datas = + new com.evolute.entity.ForeignKey( TrabalhadoresConsultasDatasObservacoes.class, TrabalhadoresConsultasDatasObservacoes.TRABALHADORES_CONSULTAS_DATAS_ID, siprp.data.outer.TrabalhadoresConsultasDatasData.class, siprp.data.outer.TrabalhadoresConsultasDatasData.ID ); + + public static final String TABLENAME = "trabalhadores_consultas_datas_observacoes"; + + + public static final String CLASS_IDENTIFIER = "trabalhadores_consultas_datas_observacoes1277401737193"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_consultas_datas_observacoes.id"; + public static final int ID_INDEX = 0; + public static final String TRABALHADORES_CONSULTAS_DATAS_ID = "trabalhadores_consultas_datas_id"; + public static final String TRABALHADORES_CONSULTAS_DATAS_ID_FULL = "trabalhadores_consultas_datas_observacoes.trabalhadores_consultas_datas_id"; + public static final int TRABALHADORES_CONSULTAS_DATAS_ID_INDEX = 1; + public static final String TO_TRABALHADORES_CONSULTAS_DATAS_ID = "to_trabalhadores_consultas_datas_id"; + public static final int TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX = 2; + public static final String OBSERVACAO = "observacao"; + public static final String OBSERVACAO_FULL = "trabalhadores_consultas_datas_observacoes.observacao"; + public static final int OBSERVACAO_INDEX = 3; + + public static final String FIELD_NAMES[] = new String[]{ + TRABALHADORES_CONSULTAS_DATAS_ID, TO_TRABALHADORES_CONSULTAS_DATAS_ID, + OBSERVACAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TRABALHADORES_CONSULTAS_DATAS_ID, TABLENAME + "." + TO_TRABALHADORES_CONSULTAS_DATAS_ID, + TABLENAME + "." + OBSERVACAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TRABALHADORES_CONSULTAS_DATAS_ID, OBSERVACAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, TRABALHADORES_CONSULTAS_DATAS_ID, OBSERVACAO, }; + + private Integer id; + private Integer trabalhadores_consultas_datas_id; + private siprp.data.outer.TrabalhadoresConsultasDatasData to_trabalhadores_consultas_datas_id; + private String observacao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public TrabalhadoresConsultasDatasObservacoes() + { + 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 + { + setLockedForRefresh( true ); + 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 getTrabalhadores_consultas_datas_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TRABALHADORES_CONSULTAS_DATAS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.trabalhadores_consultas_datas_id; + } + + public void setTrabalhadores_consultas_datas_id( Integer trabalhadores_consultas_datas_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( TRABALHADORES_CONSULTAS_DATAS_ID, trabalhadores_consultas_datas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.trabalhadores_consultas_datas_id = trabalhadores_consultas_datas_id; + LAZY_LOADED_OBJECTS.put( TRABALHADORES_CONSULTAS_DATAS_ID, Boolean.TRUE ); + } + + public siprp.data.outer.TrabalhadoresConsultasDatasData toTrabalhadores_consultas_datas_id() + { + try + { + prepare( TO_TRABALHADORES_CONSULTAS_DATAS_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhadores_consultas_datas_id; + } + + public void setToTrabalhadores_consultas_datas_id( siprp.data.outer.TrabalhadoresConsultasDatasData to_trabalhadores_consultas_datas_id ) + { + try + { + preProcess( TO_TRABALHADORES_CONSULTAS_DATAS_ID, to_trabalhadores_consultas_datas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_trabalhadores_consultas_datas_id = to_trabalhadores_consultas_datas_id; + } + + public String getObservacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OBSERVACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.observacao; + } + + public void setObservacao( String observacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( OBSERVACAO, observacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.observacao = observacao; + LAZY_LOADED_OBJECTS.put( OBSERVACAO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresConsultasDatasObservacoes.ID_INDEX: + value = getId(); + break; + case TrabalhadoresConsultasDatasObservacoes.TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + value = getTrabalhadores_consultas_datas_id(); + break; + case TrabalhadoresConsultasDatasObservacoes.TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + value = toTrabalhadores_consultas_datas_id(); + break; + case TrabalhadoresConsultasDatasObservacoes.OBSERVACAO_INDEX: + value = getObservacao(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresConsultasDatasObservacoes.ID_INDEX: + value = this.id; + break; + case TrabalhadoresConsultasDatasObservacoes.TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + value = this.trabalhadores_consultas_datas_id; + break; + case TrabalhadoresConsultasDatasObservacoes.TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + value = this.to_trabalhadores_consultas_datas_id; + break; + case TrabalhadoresConsultasDatasObservacoes.OBSERVACAO_INDEX: + value = this.observacao; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresConsultasDatasObservacoes.ID_INDEX: + setId( ( Integer ) value ); + break; + case TrabalhadoresConsultasDatasObservacoes.TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + setTrabalhadores_consultas_datas_id( ( Integer ) value ); + break; + case TrabalhadoresConsultasDatasObservacoes.TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + setToTrabalhadores_consultas_datas_id( ( siprp.data.outer.TrabalhadoresConsultasDatasData ) value ); + break; + case TrabalhadoresConsultasDatasObservacoes.OBSERVACAO_INDEX: + setObservacao( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresConsultasDatasObservacoes.ID_INDEX: + this.id = ( Integer ) value; + break; + case TrabalhadoresConsultasDatasObservacoes.TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + this.trabalhadores_consultas_datas_id = ( Integer ) value; + break; + case TrabalhadoresConsultasDatasObservacoes.TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + this.to_trabalhadores_consultas_datas_id = ( siprp.data.outer.TrabalhadoresConsultasDatasData ) value; + break; + case TrabalhadoresConsultasDatasObservacoes.OBSERVACAO_INDEX: + this.observacao = ( 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 TrabalhadoresConsultasDatasObservacoes.ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresConsultasDatasObservacoes.TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresConsultasDatasObservacoes.TO_TRABALHADORES_CONSULTAS_DATAS_ID_INDEX: + theClass = siprp.data.outer.TrabalhadoresConsultasDatasData.class; + break; + case TrabalhadoresConsultasDatasObservacoes.OBSERVACAO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : TrabalhadoresConsultasDatasObservacoes._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, TrabalhadoresConsultasDatasObservacoes.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresEcd.java b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresEcd.java new file mode 100644 index 00000000..0571b1f6 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresEcd.java @@ -0,0 +1,834 @@ +/* +* TrabalhadoresEcd.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class TrabalhadoresEcd extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( TrabalhadoresEcd.ID, TrabalhadoresEcd.ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcd.ID_FULL, TrabalhadoresEcd.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresEcd.CLASS_IDENTIFIER, TrabalhadoresEcd.ECD_ID, TrabalhadoresEcd.TO_ECD_ID ); + FIELD_INDEXES.put( TrabalhadoresEcd.ECD_ID, TrabalhadoresEcd.ECD_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcd.ECD_ID_FULL, TrabalhadoresEcd.ECD_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcd.TO_ECD_ID, TrabalhadoresEcd.TO_ECD_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresEcd.CLASS_IDENTIFIER, TrabalhadoresEcd.ECD_OFICIAL_ID, TrabalhadoresEcd.TO_ECD_OFICIAL_ID ); + FIELD_INDEXES.put( TrabalhadoresEcd.ECD_OFICIAL_ID, TrabalhadoresEcd.ECD_OFICIAL_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcd.ECD_OFICIAL_ID_FULL, TrabalhadoresEcd.ECD_OFICIAL_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcd.TO_ECD_OFICIAL_ID, TrabalhadoresEcd.TO_ECD_OFICIAL_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcd.ESTADO, TrabalhadoresEcd.ESTADO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcd.ESTADO_FULL, TrabalhadoresEcd.ESTADO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresEcd.CLASS_IDENTIFIER, TrabalhadoresEcd.TRABALHADORES_ECDS_DATAS_ID, TrabalhadoresEcd.TO_TRABALHADORES_ECDS_DATAS_ID ); + FIELD_INDEXES.put( TrabalhadoresEcd.TRABALHADORES_ECDS_DATAS_ID, TrabalhadoresEcd.TRABALHADORES_ECDS_DATAS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcd.TRABALHADORES_ECDS_DATAS_ID_FULL, TrabalhadoresEcd.TRABALHADORES_ECDS_DATAS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcd.TO_TRABALHADORES_ECDS_DATAS_ID, TrabalhadoresEcd.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcd.ENVIADO, TrabalhadoresEcd.ENVIADO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcd.ENVIADO_FULL, TrabalhadoresEcd.ENVIADO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresEcd.CLASS_IDENTIFIER, TrabalhadoresEcd.ANALISADOR_ID, TrabalhadoresEcd.TO_ANALISADOR_ID ); + FIELD_INDEXES.put( TrabalhadoresEcd.ANALISADOR_ID, TrabalhadoresEcd.ANALISADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcd.ANALISADOR_ID_FULL, TrabalhadoresEcd.ANALISADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcd.TO_ANALISADOR_ID, TrabalhadoresEcd.TO_ANALISADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcd.DATA_ENVIO, TrabalhadoresEcd.DATA_ENVIO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcd.DATA_ENVIO_FULL, TrabalhadoresEcd.DATA_ENVIO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcd.DATA_RECEPCAO, TrabalhadoresEcd.DATA_RECEPCAO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcd.DATA_RECEPCAO_FULL, TrabalhadoresEcd.DATA_RECEPCAO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeyecd_idToprt_tipos_elementos_protocolo = + new com.evolute.entity.ForeignKey( TrabalhadoresEcd.class, TrabalhadoresEcd.ECD_ID, siprp.data.outer.PrtTiposElementosProtocoloData.class, siprp.data.outer.PrtTiposElementosProtocoloData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyecd_oficial_idToecd_oficial = + new com.evolute.entity.ForeignKey( TrabalhadoresEcd.class, TrabalhadoresEcd.ECD_OFICIAL_ID, siprp.data.outer.EcdOficialData.class, siprp.data.outer.EcdOficialData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeytrabalhadores_ecds_datas_idTotrabalhadores_ecds_datas = + new com.evolute.entity.ForeignKey( TrabalhadoresEcd.class, TrabalhadoresEcd.TRABALHADORES_ECDS_DATAS_ID, siprp.data.outer.TrabalhadoresEcdsDatasData.class, siprp.data.outer.TrabalhadoresEcdsDatasData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyanalisador_idToprestadores = + new com.evolute.entity.ForeignKey( TrabalhadoresEcd.class, TrabalhadoresEcd.ANALISADOR_ID, siprp.data.outer.PrestadoresData.class, siprp.data.outer.PrestadoresData.ID ); + + public static final String TABLENAME = "trabalhadores_ecd"; + + + public static final String CLASS_IDENTIFIER = "trabalhadores_ecd1277401737193"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_ecd.id"; + public static final int ID_INDEX = 0; + public static final String ECD_ID = "ecd_id"; + public static final String ECD_ID_FULL = "trabalhadores_ecd.ecd_id"; + public static final int ECD_ID_INDEX = 1; + public static final String TO_ECD_ID = "to_ecd_id"; + public static final int TO_ECD_ID_INDEX = 2; + public static final String ECD_OFICIAL_ID = "ecd_oficial_id"; + public static final String ECD_OFICIAL_ID_FULL = "trabalhadores_ecd.ecd_oficial_id"; + public static final int ECD_OFICIAL_ID_INDEX = 3; + public static final String TO_ECD_OFICIAL_ID = "to_ecd_oficial_id"; + public static final int TO_ECD_OFICIAL_ID_INDEX = 4; + public static final String ESTADO = "estado"; + public static final String ESTADO_FULL = "trabalhadores_ecd.estado"; + public static final int ESTADO_INDEX = 5; + public static final String TRABALHADORES_ECDS_DATAS_ID = "trabalhadores_ecds_datas_id"; + public static final String TRABALHADORES_ECDS_DATAS_ID_FULL = "trabalhadores_ecd.trabalhadores_ecds_datas_id"; + public static final int TRABALHADORES_ECDS_DATAS_ID_INDEX = 6; + public static final String TO_TRABALHADORES_ECDS_DATAS_ID = "to_trabalhadores_ecds_datas_id"; + public static final int TO_TRABALHADORES_ECDS_DATAS_ID_INDEX = 7; + public static final String ENVIADO = "enviado"; + public static final String ENVIADO_FULL = "trabalhadores_ecd.enviado"; + public static final int ENVIADO_INDEX = 8; + public static final String ANALISADOR_ID = "analisador_id"; + public static final String ANALISADOR_ID_FULL = "trabalhadores_ecd.analisador_id"; + public static final int ANALISADOR_ID_INDEX = 9; + public static final String TO_ANALISADOR_ID = "to_analisador_id"; + public static final int TO_ANALISADOR_ID_INDEX = 10; + public static final String DATA_ENVIO = "data_envio"; + public static final String DATA_ENVIO_FULL = "trabalhadores_ecd.data_envio"; + public static final int DATA_ENVIO_INDEX = 11; + public static final String DATA_RECEPCAO = "data_recepcao"; + public static final String DATA_RECEPCAO_FULL = "trabalhadores_ecd.data_recepcao"; + public static final int DATA_RECEPCAO_INDEX = 12; + + public static final String FIELD_NAMES[] = new String[]{ + ECD_ID, TO_ECD_ID, ECD_OFICIAL_ID, TO_ECD_OFICIAL_ID, ESTADO, + TRABALHADORES_ECDS_DATAS_ID, TO_TRABALHADORES_ECDS_DATAS_ID, ENVIADO, + ANALISADOR_ID, TO_ANALISADOR_ID, DATA_ENVIO, DATA_RECEPCAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + ECD_ID, TABLENAME + "." + TO_ECD_ID, TABLENAME + "." + ECD_OFICIAL_ID, TABLENAME + "." + TO_ECD_OFICIAL_ID, TABLENAME + "." + ESTADO, + TABLENAME + "." + TRABALHADORES_ECDS_DATAS_ID, TABLENAME + "." + TO_TRABALHADORES_ECDS_DATAS_ID, TABLENAME + "." + ENVIADO, + TABLENAME + "." + ANALISADOR_ID, TABLENAME + "." + TO_ANALISADOR_ID, TABLENAME + "." + DATA_ENVIO, TABLENAME + "." + DATA_RECEPCAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, ECD_ID, ECD_OFICIAL_ID, ESTADO, TRABALHADORES_ECDS_DATAS_ID, ENVIADO, + ANALISADOR_ID, DATA_ENVIO, DATA_RECEPCAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, ECD_ID, ECD_OFICIAL_ID, ESTADO, TRABALHADORES_ECDS_DATAS_ID, ENVIADO, + ANALISADOR_ID, DATA_ENVIO, DATA_RECEPCAO, }; + + private Integer id; + private Integer ecd_id; + private siprp.data.outer.PrtTiposElementosProtocoloData to_ecd_id; + private Integer ecd_oficial_id; + private siprp.data.outer.EcdOficialData to_ecd_oficial_id; + private Integer estado; + private Integer trabalhadores_ecds_datas_id; + private siprp.data.outer.TrabalhadoresEcdsDatasData to_trabalhadores_ecds_datas_id; + private String enviado; + private Integer analisador_id; + private siprp.data.outer.PrestadoresData to_analisador_id; + private java.util.Date data_envio; + private java.util.Date data_recepcao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public TrabalhadoresEcd() + { + super(); + dirtyProperties = new boolean[]{ false, 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 + { + setLockedForRefresh( true ); + 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 getEcd_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ECD_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ecd_id; + } + + public void setEcd_id( Integer ecd_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( ECD_ID, ecd_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ecd_id = ecd_id; + LAZY_LOADED_OBJECTS.put( ECD_ID, Boolean.TRUE ); + } + + public siprp.data.outer.PrtTiposElementosProtocoloData toEcd_id() + { + try + { + prepare( TO_ECD_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_ecd_id; + } + + public void setToEcd_id( siprp.data.outer.PrtTiposElementosProtocoloData to_ecd_id ) + { + try + { + preProcess( TO_ECD_ID, to_ecd_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_ecd_id = to_ecd_id; + } + + public Integer getEcd_oficial_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ECD_OFICIAL_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.ecd_oficial_id; + } + + public void setEcd_oficial_id( Integer ecd_oficial_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( ECD_OFICIAL_ID, ecd_oficial_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.ecd_oficial_id = ecd_oficial_id; + LAZY_LOADED_OBJECTS.put( ECD_OFICIAL_ID, Boolean.TRUE ); + } + + public siprp.data.outer.EcdOficialData toEcd_oficial_id() + { + try + { + prepare( TO_ECD_OFICIAL_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_ecd_oficial_id; + } + + public void setToEcd_oficial_id( siprp.data.outer.EcdOficialData to_ecd_oficial_id ) + { + try + { + preProcess( TO_ECD_OFICIAL_ID, to_ecd_oficial_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_ecd_oficial_id = to_ecd_oficial_id; + } + + public Integer getEstado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESTADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.estado; + } + + public void setEstado( Integer estado ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESTADO, estado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.estado = estado; + LAZY_LOADED_OBJECTS.put( ESTADO, Boolean.TRUE ); + } + + public Integer getTrabalhadores_ecds_datas_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TRABALHADORES_ECDS_DATAS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.trabalhadores_ecds_datas_id; + } + + public void setTrabalhadores_ecds_datas_id( Integer trabalhadores_ecds_datas_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( TRABALHADORES_ECDS_DATAS_ID, trabalhadores_ecds_datas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.trabalhadores_ecds_datas_id = trabalhadores_ecds_datas_id; + LAZY_LOADED_OBJECTS.put( TRABALHADORES_ECDS_DATAS_ID, Boolean.TRUE ); + } + + public siprp.data.outer.TrabalhadoresEcdsDatasData toTrabalhadores_ecds_datas_id() + { + try + { + prepare( TO_TRABALHADORES_ECDS_DATAS_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhadores_ecds_datas_id; + } + + public void setToTrabalhadores_ecds_datas_id( siprp.data.outer.TrabalhadoresEcdsDatasData to_trabalhadores_ecds_datas_id ) + { + try + { + preProcess( TO_TRABALHADORES_ECDS_DATAS_ID, to_trabalhadores_ecds_datas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_trabalhadores_ecds_datas_id = to_trabalhadores_ecds_datas_id; + } + + public String getEnviado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ENVIADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.enviado; + } + + public void setEnviado( String enviado ) + { + try + { + setLockedForRefresh( true ); + preProcess( ENVIADO, enviado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.enviado = enviado; + LAZY_LOADED_OBJECTS.put( ENVIADO, Boolean.TRUE ); + } + + public Integer getAnalisador_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ANALISADOR_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.analisador_id; + } + + public void setAnalisador_id( Integer analisador_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( ANALISADOR_ID, analisador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.analisador_id = analisador_id; + LAZY_LOADED_OBJECTS.put( ANALISADOR_ID, Boolean.TRUE ); + } + + public siprp.data.outer.PrestadoresData toAnalisador_id() + { + try + { + prepare( TO_ANALISADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_analisador_id; + } + + public void setToAnalisador_id( siprp.data.outer.PrestadoresData to_analisador_id ) + { + try + { + preProcess( TO_ANALISADOR_ID, to_analisador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_analisador_id = to_analisador_id; + } + + public java.util.Date getData_envio() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_ENVIO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_envio; + } + + public void setData_envio( java.util.Date data_envio ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_ENVIO, data_envio ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_envio = data_envio; + LAZY_LOADED_OBJECTS.put( DATA_ENVIO, Boolean.TRUE ); + } + + public java.util.Date getData_recepcao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_RECEPCAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_recepcao; + } + + public void setData_recepcao( java.util.Date data_recepcao ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_RECEPCAO, data_recepcao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_recepcao = data_recepcao; + LAZY_LOADED_OBJECTS.put( DATA_RECEPCAO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcd.ID_INDEX: + value = getId(); + break; + case TrabalhadoresEcd.ECD_ID_INDEX: + value = getEcd_id(); + break; + case TrabalhadoresEcd.TO_ECD_ID_INDEX: + value = toEcd_id(); + break; + case TrabalhadoresEcd.ECD_OFICIAL_ID_INDEX: + value = getEcd_oficial_id(); + break; + case TrabalhadoresEcd.TO_ECD_OFICIAL_ID_INDEX: + value = toEcd_oficial_id(); + break; + case TrabalhadoresEcd.ESTADO_INDEX: + value = getEstado(); + break; + case TrabalhadoresEcd.TRABALHADORES_ECDS_DATAS_ID_INDEX: + value = getTrabalhadores_ecds_datas_id(); + break; + case TrabalhadoresEcd.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX: + value = toTrabalhadores_ecds_datas_id(); + break; + case TrabalhadoresEcd.ENVIADO_INDEX: + value = getEnviado(); + break; + case TrabalhadoresEcd.ANALISADOR_ID_INDEX: + value = getAnalisador_id(); + break; + case TrabalhadoresEcd.TO_ANALISADOR_ID_INDEX: + value = toAnalisador_id(); + break; + case TrabalhadoresEcd.DATA_ENVIO_INDEX: + value = getData_envio(); + break; + case TrabalhadoresEcd.DATA_RECEPCAO_INDEX: + value = getData_recepcao(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcd.ID_INDEX: + value = this.id; + break; + case TrabalhadoresEcd.ECD_ID_INDEX: + value = this.ecd_id; + break; + case TrabalhadoresEcd.TO_ECD_ID_INDEX: + value = this.to_ecd_id; + break; + case TrabalhadoresEcd.ECD_OFICIAL_ID_INDEX: + value = this.ecd_oficial_id; + break; + case TrabalhadoresEcd.TO_ECD_OFICIAL_ID_INDEX: + value = this.to_ecd_oficial_id; + break; + case TrabalhadoresEcd.ESTADO_INDEX: + value = this.estado; + break; + case TrabalhadoresEcd.TRABALHADORES_ECDS_DATAS_ID_INDEX: + value = this.trabalhadores_ecds_datas_id; + break; + case TrabalhadoresEcd.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX: + value = this.to_trabalhadores_ecds_datas_id; + break; + case TrabalhadoresEcd.ENVIADO_INDEX: + value = this.enviado; + break; + case TrabalhadoresEcd.ANALISADOR_ID_INDEX: + value = this.analisador_id; + break; + case TrabalhadoresEcd.TO_ANALISADOR_ID_INDEX: + value = this.to_analisador_id; + break; + case TrabalhadoresEcd.DATA_ENVIO_INDEX: + value = this.data_envio; + break; + case TrabalhadoresEcd.DATA_RECEPCAO_INDEX: + value = this.data_recepcao; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcd.ID_INDEX: + setId( ( Integer ) value ); + break; + case TrabalhadoresEcd.ECD_ID_INDEX: + setEcd_id( ( Integer ) value ); + break; + case TrabalhadoresEcd.TO_ECD_ID_INDEX: + setToEcd_id( ( siprp.data.outer.PrtTiposElementosProtocoloData ) value ); + break; + case TrabalhadoresEcd.ECD_OFICIAL_ID_INDEX: + setEcd_oficial_id( ( Integer ) value ); + break; + case TrabalhadoresEcd.TO_ECD_OFICIAL_ID_INDEX: + setToEcd_oficial_id( ( siprp.data.outer.EcdOficialData ) value ); + break; + case TrabalhadoresEcd.ESTADO_INDEX: + setEstado( ( Integer ) value ); + break; + case TrabalhadoresEcd.TRABALHADORES_ECDS_DATAS_ID_INDEX: + setTrabalhadores_ecds_datas_id( ( Integer ) value ); + break; + case TrabalhadoresEcd.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX: + setToTrabalhadores_ecds_datas_id( ( siprp.data.outer.TrabalhadoresEcdsDatasData ) value ); + break; + case TrabalhadoresEcd.ENVIADO_INDEX: + setEnviado( ( String ) value ); + break; + case TrabalhadoresEcd.ANALISADOR_ID_INDEX: + setAnalisador_id( ( Integer ) value ); + break; + case TrabalhadoresEcd.TO_ANALISADOR_ID_INDEX: + setToAnalisador_id( ( siprp.data.outer.PrestadoresData ) value ); + break; + case TrabalhadoresEcd.DATA_ENVIO_INDEX: + setData_envio( ( java.util.Date ) value ); + break; + case TrabalhadoresEcd.DATA_RECEPCAO_INDEX: + setData_recepcao( ( java.util.Date ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcd.ID_INDEX: + this.id = ( Integer ) value; + break; + case TrabalhadoresEcd.ECD_ID_INDEX: + this.ecd_id = ( Integer ) value; + break; + case TrabalhadoresEcd.TO_ECD_ID_INDEX: + this.to_ecd_id = ( siprp.data.outer.PrtTiposElementosProtocoloData ) value; + break; + case TrabalhadoresEcd.ECD_OFICIAL_ID_INDEX: + this.ecd_oficial_id = ( Integer ) value; + break; + case TrabalhadoresEcd.TO_ECD_OFICIAL_ID_INDEX: + this.to_ecd_oficial_id = ( siprp.data.outer.EcdOficialData ) value; + break; + case TrabalhadoresEcd.ESTADO_INDEX: + this.estado = ( Integer ) value; + break; + case TrabalhadoresEcd.TRABALHADORES_ECDS_DATAS_ID_INDEX: + this.trabalhadores_ecds_datas_id = ( Integer ) value; + break; + case TrabalhadoresEcd.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX: + this.to_trabalhadores_ecds_datas_id = ( siprp.data.outer.TrabalhadoresEcdsDatasData ) value; + break; + case TrabalhadoresEcd.ENVIADO_INDEX: + this.enviado = ( String ) value; + break; + case TrabalhadoresEcd.ANALISADOR_ID_INDEX: + this.analisador_id = ( Integer ) value; + break; + case TrabalhadoresEcd.TO_ANALISADOR_ID_INDEX: + this.to_analisador_id = ( siprp.data.outer.PrestadoresData ) value; + break; + case TrabalhadoresEcd.DATA_ENVIO_INDEX: + this.data_envio = ( java.util.Date ) value; + break; + case TrabalhadoresEcd.DATA_RECEPCAO_INDEX: + this.data_recepcao = ( java.util.Date ) 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 TrabalhadoresEcd.ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcd.ECD_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcd.TO_ECD_ID_INDEX: + theClass = siprp.data.outer.PrtTiposElementosProtocoloData.class; + break; + case TrabalhadoresEcd.ECD_OFICIAL_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcd.TO_ECD_OFICIAL_ID_INDEX: + theClass = siprp.data.outer.EcdOficialData.class; + break; + case TrabalhadoresEcd.ESTADO_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcd.TRABALHADORES_ECDS_DATAS_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcd.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX: + theClass = siprp.data.outer.TrabalhadoresEcdsDatasData.class; + break; + case TrabalhadoresEcd.ENVIADO_INDEX: + theClass = String.class; + break; + case TrabalhadoresEcd.ANALISADOR_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcd.TO_ANALISADOR_ID_INDEX: + theClass = siprp.data.outer.PrestadoresData.class; + break; + case TrabalhadoresEcd.DATA_ENVIO_INDEX: + theClass = java.util.Date.class; + break; + case TrabalhadoresEcd.DATA_RECEPCAO_INDEX: + theClass = java.util.Date.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : TrabalhadoresEcd._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, TrabalhadoresEcd.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresEcds.java b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresEcds.java new file mode 100644 index 00000000..937e630c --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresEcds.java @@ -0,0 +1,543 @@ +/* +* TrabalhadoresEcds.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class TrabalhadoresEcds extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( TrabalhadoresEcds.ID, TrabalhadoresEcds.ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcds.ID_FULL, TrabalhadoresEcds.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresEcds.CLASS_IDENTIFIER, TrabalhadoresEcds.TRABALHADOR_ID, TrabalhadoresEcds.TO_TRABALHADOR_ID ); + FIELD_INDEXES.put( TrabalhadoresEcds.TRABALHADOR_ID, TrabalhadoresEcds.TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcds.TRABALHADOR_ID_FULL, TrabalhadoresEcds.TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcds.TO_TRABALHADOR_ID, TrabalhadoresEcds.TO_TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcds.ESTADO, TrabalhadoresEcds.ESTADO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcds.ESTADO_FULL, TrabalhadoresEcds.ESTADO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcds.DATA, TrabalhadoresEcds.DATA_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcds.DATA_FULL, TrabalhadoresEcds.DATA_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresEcds.CLASS_IDENTIFIER, TrabalhadoresEcds.PROCESSO_ID, TrabalhadoresEcds.TO_PROCESSO_ID ); + FIELD_INDEXES.put( TrabalhadoresEcds.PROCESSO_ID, TrabalhadoresEcds.PROCESSO_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcds.PROCESSO_ID_FULL, TrabalhadoresEcds.PROCESSO_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcds.TO_PROCESSO_ID, TrabalhadoresEcds.TO_PROCESSO_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( TrabalhadoresEcds.class, TrabalhadoresEcds.TRABALHADOR_ID, siprp.data.outer.TrabalhadoresData.class, siprp.data.outer.TrabalhadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprocesso_idTotrabalhadores_processo = + new com.evolute.entity.ForeignKey( TrabalhadoresEcds.class, TrabalhadoresEcds.PROCESSO_ID, siprp.data.outer.TrabalhadoresProcessoData.class, siprp.data.outer.TrabalhadoresProcessoData.ID ); + + public static final String TABLENAME = "trabalhadores_ecds"; + + + public static final String CLASS_IDENTIFIER = "trabalhadores_ecds1277401737194"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_ecds.id"; + public static final int ID_INDEX = 0; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "trabalhadores_ecds.trabalhador_id"; + public static final int TRABALHADOR_ID_INDEX = 1; + public static final String TO_TRABALHADOR_ID = "to_trabalhador_id"; + public static final int TO_TRABALHADOR_ID_INDEX = 2; + public static final String ESTADO = "estado"; + public static final String ESTADO_FULL = "trabalhadores_ecds.estado"; + public static final int ESTADO_INDEX = 3; + public static final String DATA = "data"; + public static final String DATA_FULL = "trabalhadores_ecds.data"; + public static final int DATA_INDEX = 4; + public static final String PROCESSO_ID = "processo_id"; + public static final String PROCESSO_ID_FULL = "trabalhadores_ecds.processo_id"; + public static final int PROCESSO_ID_INDEX = 5; + public static final String TO_PROCESSO_ID = "to_processo_id"; + public static final int TO_PROCESSO_ID_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + TRABALHADOR_ID, TO_TRABALHADOR_ID, ESTADO, DATA, PROCESSO_ID, TO_PROCESSO_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TRABALHADOR_ID, TABLENAME + "." + TO_TRABALHADOR_ID, TABLENAME + "." + ESTADO, TABLENAME + "." + DATA, TABLENAME + "." + PROCESSO_ID, TABLENAME + "." + TO_PROCESSO_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TRABALHADOR_ID, ESTADO, DATA, PROCESSO_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, TRABALHADOR_ID, ESTADO, DATA, PROCESSO_ID, }; + + private Integer id; + private Integer trabalhador_id; + private siprp.data.outer.TrabalhadoresData to_trabalhador_id; + private Integer estado; + private java.util.Date data; + private Integer processo_id; + private siprp.data.outer.TrabalhadoresProcessoData to_processo_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public TrabalhadoresEcds() + { + 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 + { + setLockedForRefresh( true ); + 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.ListfromTrabalhadoresEcdsDatas_trabalhadores_ecds_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresEcdsDatasData.class , getPrimaryKey().getMap().get("id"), "trabalhadores_ecds_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 getEstado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESTADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.estado; + } + + public void setEstado( Integer estado ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESTADO, estado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.estado = estado; + LAZY_LOADED_OBJECTS.put( ESTADO, 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 + { + setLockedForRefresh( true ); + 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 Integer getProcesso_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PROCESSO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.processo_id; + } + + public void setProcesso_id( Integer processo_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PROCESSO_ID, processo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.processo_id = processo_id; + LAZY_LOADED_OBJECTS.put( PROCESSO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.TrabalhadoresProcessoData toProcesso_id() + { + try + { + prepare( TO_PROCESSO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_processo_id; + } + + public void setToProcesso_id( siprp.data.outer.TrabalhadoresProcessoData to_processo_id ) + { + try + { + preProcess( TO_PROCESSO_ID, to_processo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_processo_id = to_processo_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcds.ID_INDEX: + value = getId(); + break; + case TrabalhadoresEcds.TRABALHADOR_ID_INDEX: + value = getTrabalhador_id(); + break; + case TrabalhadoresEcds.TO_TRABALHADOR_ID_INDEX: + value = toTrabalhador_id(); + break; + case TrabalhadoresEcds.ESTADO_INDEX: + value = getEstado(); + break; + case TrabalhadoresEcds.DATA_INDEX: + value = getData(); + break; + case TrabalhadoresEcds.PROCESSO_ID_INDEX: + value = getProcesso_id(); + break; + case TrabalhadoresEcds.TO_PROCESSO_ID_INDEX: + value = toProcesso_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcds.ID_INDEX: + value = this.id; + break; + case TrabalhadoresEcds.TRABALHADOR_ID_INDEX: + value = this.trabalhador_id; + break; + case TrabalhadoresEcds.TO_TRABALHADOR_ID_INDEX: + value = this.to_trabalhador_id; + break; + case TrabalhadoresEcds.ESTADO_INDEX: + value = this.estado; + break; + case TrabalhadoresEcds.DATA_INDEX: + value = this.data; + break; + case TrabalhadoresEcds.PROCESSO_ID_INDEX: + value = this.processo_id; + break; + case TrabalhadoresEcds.TO_PROCESSO_ID_INDEX: + value = this.to_processo_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcds.ID_INDEX: + setId( ( Integer ) value ); + break; + case TrabalhadoresEcds.TRABALHADOR_ID_INDEX: + setTrabalhador_id( ( Integer ) value ); + break; + case TrabalhadoresEcds.TO_TRABALHADOR_ID_INDEX: + setToTrabalhador_id( ( siprp.data.outer.TrabalhadoresData ) value ); + break; + case TrabalhadoresEcds.ESTADO_INDEX: + setEstado( ( Integer ) value ); + break; + case TrabalhadoresEcds.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case TrabalhadoresEcds.PROCESSO_ID_INDEX: + setProcesso_id( ( Integer ) value ); + break; + case TrabalhadoresEcds.TO_PROCESSO_ID_INDEX: + setToProcesso_id( ( siprp.data.outer.TrabalhadoresProcessoData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcds.ID_INDEX: + this.id = ( Integer ) value; + break; + case TrabalhadoresEcds.TRABALHADOR_ID_INDEX: + this.trabalhador_id = ( Integer ) value; + break; + case TrabalhadoresEcds.TO_TRABALHADOR_ID_INDEX: + this.to_trabalhador_id = ( siprp.data.outer.TrabalhadoresData ) value; + break; + case TrabalhadoresEcds.ESTADO_INDEX: + this.estado = ( Integer ) value; + break; + case TrabalhadoresEcds.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case TrabalhadoresEcds.PROCESSO_ID_INDEX: + this.processo_id = ( Integer ) value; + break; + case TrabalhadoresEcds.TO_PROCESSO_ID_INDEX: + this.to_processo_id = ( siprp.data.outer.TrabalhadoresProcessoData ) 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 TrabalhadoresEcds.ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcds.TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcds.TO_TRABALHADOR_ID_INDEX: + theClass = siprp.data.outer.TrabalhadoresData.class; + break; + case TrabalhadoresEcds.ESTADO_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcds.DATA_INDEX: + theClass = java.util.Date.class; + break; + case TrabalhadoresEcds.PROCESSO_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcds.TO_PROCESSO_ID_INDEX: + theClass = siprp.data.outer.TrabalhadoresProcessoData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : TrabalhadoresEcds._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, TrabalhadoresEcds.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresEcdsAnalise.java b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresEcdsAnalise.java new file mode 100644 index 00000000..8c0b52a3 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresEcdsAnalise.java @@ -0,0 +1,479 @@ +/* +* TrabalhadoresEcdsAnalise.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class TrabalhadoresEcdsAnalise extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( TrabalhadoresEcdsAnalise.ID, TrabalhadoresEcdsAnalise.ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsAnalise.ID_FULL, TrabalhadoresEcdsAnalise.ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsAnalise.DATA, TrabalhadoresEcdsAnalise.DATA_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsAnalise.DATA_FULL, TrabalhadoresEcdsAnalise.DATA_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresEcdsAnalise.CLASS_IDENTIFIER, TrabalhadoresEcdsAnalise.PRESTADOR_ID, TrabalhadoresEcdsAnalise.TO_PRESTADOR_ID ); + FIELD_INDEXES.put( TrabalhadoresEcdsAnalise.PRESTADOR_ID, TrabalhadoresEcdsAnalise.PRESTADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsAnalise.PRESTADOR_ID_FULL, TrabalhadoresEcdsAnalise.PRESTADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsAnalise.TO_PRESTADOR_ID, TrabalhadoresEcdsAnalise.TO_PRESTADOR_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresEcdsAnalise.CLASS_IDENTIFIER, TrabalhadoresEcdsAnalise.GRUPO_ECDS_ID, TrabalhadoresEcdsAnalise.TO_GRUPO_ECDS_ID ); + FIELD_INDEXES.put( TrabalhadoresEcdsAnalise.GRUPO_ECDS_ID, TrabalhadoresEcdsAnalise.GRUPO_ECDS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsAnalise.GRUPO_ECDS_ID_FULL, TrabalhadoresEcdsAnalise.GRUPO_ECDS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsAnalise.TO_GRUPO_ECDS_ID, TrabalhadoresEcdsAnalise.TO_GRUPO_ECDS_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 ForeignKeyprestador_idToprestadores = + new com.evolute.entity.ForeignKey( TrabalhadoresEcdsAnalise.class, TrabalhadoresEcdsAnalise.PRESTADOR_ID, siprp.data.outer.PrestadoresData.class, siprp.data.outer.PrestadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeygrupo_ecds_idToprt_grupos_protocolo = + new com.evolute.entity.ForeignKey( TrabalhadoresEcdsAnalise.class, TrabalhadoresEcdsAnalise.GRUPO_ECDS_ID, siprp.data.outer.PrtGruposProtocoloData.class, siprp.data.outer.PrtGruposProtocoloData.ID ); + + public static final String TABLENAME = "trabalhadores_ecds_analise"; + + + public static final String CLASS_IDENTIFIER = "trabalhadores_ecds_analise1277401737194"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_ecds_analise.id"; + public static final int ID_INDEX = 0; + public static final String DATA = "data"; + public static final String DATA_FULL = "trabalhadores_ecds_analise.data"; + public static final int DATA_INDEX = 1; + public static final String PRESTADOR_ID = "prestador_id"; + public static final String PRESTADOR_ID_FULL = "trabalhadores_ecds_analise.prestador_id"; + public static final int PRESTADOR_ID_INDEX = 2; + public static final String TO_PRESTADOR_ID = "to_prestador_id"; + public static final int TO_PRESTADOR_ID_INDEX = 3; + public static final String GRUPO_ECDS_ID = "grupo_ecds_id"; + public static final String GRUPO_ECDS_ID_FULL = "trabalhadores_ecds_analise.grupo_ecds_id"; + public static final int GRUPO_ECDS_ID_INDEX = 4; + public static final String TO_GRUPO_ECDS_ID = "to_grupo_ecds_id"; + public static final int TO_GRUPO_ECDS_ID_INDEX = 5; + + public static final String FIELD_NAMES[] = new String[]{ + DATA, PRESTADOR_ID, TO_PRESTADOR_ID, GRUPO_ECDS_ID, TO_GRUPO_ECDS_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + DATA, TABLENAME + "." + PRESTADOR_ID, TABLENAME + "." + TO_PRESTADOR_ID, TABLENAME + "." + GRUPO_ECDS_ID, TABLENAME + "." + TO_GRUPO_ECDS_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, DATA, PRESTADOR_ID, GRUPO_ECDS_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, DATA, PRESTADOR_ID, GRUPO_ECDS_ID, }; + + private Integer id; + private java.util.Date data; + private Integer prestador_id; + private siprp.data.outer.PrestadoresData to_prestador_id; + private Integer grupo_ecds_id; + private siprp.data.outer.PrtGruposProtocoloData to_grupo_ecds_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public TrabalhadoresEcdsAnalise() + { + 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 + { + setLockedForRefresh( true ); + 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 + { + setLockedForRefresh( true ); + 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 Integer getPrestador_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PRESTADOR_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.prestador_id; + } + + public void setPrestador_id( Integer prestador_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PRESTADOR_ID, prestador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.prestador_id = prestador_id; + LAZY_LOADED_OBJECTS.put( PRESTADOR_ID, Boolean.TRUE ); + } + + public siprp.data.outer.PrestadoresData toPrestador_id() + { + try + { + prepare( TO_PRESTADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_prestador_id; + } + + public void setToPrestador_id( siprp.data.outer.PrestadoresData to_prestador_id ) + { + try + { + preProcess( TO_PRESTADOR_ID, to_prestador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_prestador_id = to_prestador_id; + } + + public Integer getGrupo_ecds_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( GRUPO_ECDS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.grupo_ecds_id; + } + + public void setGrupo_ecds_id( Integer grupo_ecds_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( GRUPO_ECDS_ID, grupo_ecds_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.grupo_ecds_id = grupo_ecds_id; + LAZY_LOADED_OBJECTS.put( GRUPO_ECDS_ID, Boolean.TRUE ); + } + + public siprp.data.outer.PrtGruposProtocoloData toGrupo_ecds_id() + { + try + { + prepare( TO_GRUPO_ECDS_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_grupo_ecds_id; + } + + public void setToGrupo_ecds_id( siprp.data.outer.PrtGruposProtocoloData to_grupo_ecds_id ) + { + try + { + preProcess( TO_GRUPO_ECDS_ID, to_grupo_ecds_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_grupo_ecds_id = to_grupo_ecds_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcdsAnalise.ID_INDEX: + value = getId(); + break; + case TrabalhadoresEcdsAnalise.DATA_INDEX: + value = getData(); + break; + case TrabalhadoresEcdsAnalise.PRESTADOR_ID_INDEX: + value = getPrestador_id(); + break; + case TrabalhadoresEcdsAnalise.TO_PRESTADOR_ID_INDEX: + value = toPrestador_id(); + break; + case TrabalhadoresEcdsAnalise.GRUPO_ECDS_ID_INDEX: + value = getGrupo_ecds_id(); + break; + case TrabalhadoresEcdsAnalise.TO_GRUPO_ECDS_ID_INDEX: + value = toGrupo_ecds_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcdsAnalise.ID_INDEX: + value = this.id; + break; + case TrabalhadoresEcdsAnalise.DATA_INDEX: + value = this.data; + break; + case TrabalhadoresEcdsAnalise.PRESTADOR_ID_INDEX: + value = this.prestador_id; + break; + case TrabalhadoresEcdsAnalise.TO_PRESTADOR_ID_INDEX: + value = this.to_prestador_id; + break; + case TrabalhadoresEcdsAnalise.GRUPO_ECDS_ID_INDEX: + value = this.grupo_ecds_id; + break; + case TrabalhadoresEcdsAnalise.TO_GRUPO_ECDS_ID_INDEX: + value = this.to_grupo_ecds_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcdsAnalise.ID_INDEX: + setId( ( Integer ) value ); + break; + case TrabalhadoresEcdsAnalise.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case TrabalhadoresEcdsAnalise.PRESTADOR_ID_INDEX: + setPrestador_id( ( Integer ) value ); + break; + case TrabalhadoresEcdsAnalise.TO_PRESTADOR_ID_INDEX: + setToPrestador_id( ( siprp.data.outer.PrestadoresData ) value ); + break; + case TrabalhadoresEcdsAnalise.GRUPO_ECDS_ID_INDEX: + setGrupo_ecds_id( ( Integer ) value ); + break; + case TrabalhadoresEcdsAnalise.TO_GRUPO_ECDS_ID_INDEX: + setToGrupo_ecds_id( ( siprp.data.outer.PrtGruposProtocoloData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcdsAnalise.ID_INDEX: + this.id = ( Integer ) value; + break; + case TrabalhadoresEcdsAnalise.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case TrabalhadoresEcdsAnalise.PRESTADOR_ID_INDEX: + this.prestador_id = ( Integer ) value; + break; + case TrabalhadoresEcdsAnalise.TO_PRESTADOR_ID_INDEX: + this.to_prestador_id = ( siprp.data.outer.PrestadoresData ) value; + break; + case TrabalhadoresEcdsAnalise.GRUPO_ECDS_ID_INDEX: + this.grupo_ecds_id = ( Integer ) value; + break; + case TrabalhadoresEcdsAnalise.TO_GRUPO_ECDS_ID_INDEX: + this.to_grupo_ecds_id = ( siprp.data.outer.PrtGruposProtocoloData ) 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 TrabalhadoresEcdsAnalise.ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcdsAnalise.DATA_INDEX: + theClass = java.util.Date.class; + break; + case TrabalhadoresEcdsAnalise.PRESTADOR_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcdsAnalise.TO_PRESTADOR_ID_INDEX: + theClass = siprp.data.outer.PrestadoresData.class; + break; + case TrabalhadoresEcdsAnalise.GRUPO_ECDS_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcdsAnalise.TO_GRUPO_ECDS_ID_INDEX: + theClass = siprp.data.outer.PrtGruposProtocoloData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : TrabalhadoresEcdsAnalise._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, TrabalhadoresEcdsAnalise.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresEcdsDatas.java b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresEcdsDatas.java new file mode 100644 index 00000000..5a50b8db --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresEcdsDatas.java @@ -0,0 +1,788 @@ +/* +* TrabalhadoresEcdsDatas.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class TrabalhadoresEcdsDatas extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( TrabalhadoresEcdsDatas.ID, TrabalhadoresEcdsDatas.ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatas.ID_FULL, TrabalhadoresEcdsDatas.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresEcdsDatas.CLASS_IDENTIFIER, TrabalhadoresEcdsDatas.TRABALHADORES_ECDS_ID, TrabalhadoresEcdsDatas.TO_TRABALHADORES_ECDS_ID ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatas.TRABALHADORES_ECDS_ID, TrabalhadoresEcdsDatas.TRABALHADORES_ECDS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatas.TRABALHADORES_ECDS_ID_FULL, TrabalhadoresEcdsDatas.TRABALHADORES_ECDS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatas.TO_TRABALHADORES_ECDS_ID, TrabalhadoresEcdsDatas.TO_TRABALHADORES_ECDS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatas.DATA, TrabalhadoresEcdsDatas.DATA_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatas.DATA_FULL, TrabalhadoresEcdsDatas.DATA_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatas.ESTADO, TrabalhadoresEcdsDatas.ESTADO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatas.ESTADO_FULL, TrabalhadoresEcdsDatas.ESTADO_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresEcdsDatas.CLASS_IDENTIFIER, TrabalhadoresEcdsDatas.PRESTADOR_ID, TrabalhadoresEcdsDatas.TO_PRESTADOR_ID ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatas.PRESTADOR_ID, TrabalhadoresEcdsDatas.PRESTADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatas.PRESTADOR_ID_FULL, TrabalhadoresEcdsDatas.PRESTADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatas.TO_PRESTADOR_ID, TrabalhadoresEcdsDatas.TO_PRESTADOR_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresEcdsDatas.CLASS_IDENTIFIER, TrabalhadoresEcdsDatas.ANALISADOR_ID, TrabalhadoresEcdsDatas.TO_ANALISADOR_ID ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatas.ANALISADOR_ID, TrabalhadoresEcdsDatas.ANALISADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatas.ANALISADOR_ID_FULL, TrabalhadoresEcdsDatas.ANALISADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatas.TO_ANALISADOR_ID, TrabalhadoresEcdsDatas.TO_ANALISADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatas.DATA_ENVIO, TrabalhadoresEcdsDatas.DATA_ENVIO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatas.DATA_ENVIO_FULL, TrabalhadoresEcdsDatas.DATA_ENVIO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatas.DATA_RECEPCAO, TrabalhadoresEcdsDatas.DATA_RECEPCAO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatas.DATA_RECEPCAO_FULL, TrabalhadoresEcdsDatas.DATA_RECEPCAO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeytrabalhadores_ecds_idTotrabalhadores_ecds = + new com.evolute.entity.ForeignKey( TrabalhadoresEcdsDatas.class, TrabalhadoresEcdsDatas.TRABALHADORES_ECDS_ID, siprp.data.outer.TrabalhadoresEcdsData.class, siprp.data.outer.TrabalhadoresEcdsData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyprestador_idToprestadores = + new com.evolute.entity.ForeignKey( TrabalhadoresEcdsDatas.class, TrabalhadoresEcdsDatas.PRESTADOR_ID, siprp.data.outer.PrestadoresData.class, siprp.data.outer.PrestadoresData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyanalisador_idToprestadores = + new com.evolute.entity.ForeignKey( TrabalhadoresEcdsDatas.class, TrabalhadoresEcdsDatas.ANALISADOR_ID, siprp.data.outer.PrestadoresData.class, siprp.data.outer.PrestadoresData.ID ); + + public static final String TABLENAME = "trabalhadores_ecds_datas"; + + + public static final String CLASS_IDENTIFIER = "trabalhadores_ecds_datas1277401737195"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_ecds_datas.id"; + public static final int ID_INDEX = 0; + public static final String TRABALHADORES_ECDS_ID = "trabalhadores_ecds_id"; + public static final String TRABALHADORES_ECDS_ID_FULL = "trabalhadores_ecds_datas.trabalhadores_ecds_id"; + public static final int TRABALHADORES_ECDS_ID_INDEX = 1; + public static final String TO_TRABALHADORES_ECDS_ID = "to_trabalhadores_ecds_id"; + public static final int TO_TRABALHADORES_ECDS_ID_INDEX = 2; + public static final String DATA = "data"; + public static final String DATA_FULL = "trabalhadores_ecds_datas.data"; + public static final int DATA_INDEX = 3; + public static final String ESTADO = "estado"; + public static final String ESTADO_FULL = "trabalhadores_ecds_datas.estado"; + public static final int ESTADO_INDEX = 4; + public static final String PRESTADOR_ID = "prestador_id"; + public static final String PRESTADOR_ID_FULL = "trabalhadores_ecds_datas.prestador_id"; + public static final int PRESTADOR_ID_INDEX = 5; + public static final String TO_PRESTADOR_ID = "to_prestador_id"; + public static final int TO_PRESTADOR_ID_INDEX = 6; + public static final String ANALISADOR_ID = "analisador_id"; + public static final String ANALISADOR_ID_FULL = "trabalhadores_ecds_datas.analisador_id"; + public static final int ANALISADOR_ID_INDEX = 7; + public static final String TO_ANALISADOR_ID = "to_analisador_id"; + public static final int TO_ANALISADOR_ID_INDEX = 8; + public static final String DATA_ENVIO = "data_envio"; + public static final String DATA_ENVIO_FULL = "trabalhadores_ecds_datas.data_envio"; + public static final int DATA_ENVIO_INDEX = 9; + public static final String DATA_RECEPCAO = "data_recepcao"; + public static final String DATA_RECEPCAO_FULL = "trabalhadores_ecds_datas.data_recepcao"; + public static final int DATA_RECEPCAO_INDEX = 10; + + public static final String FIELD_NAMES[] = new String[]{ + TRABALHADORES_ECDS_ID, TO_TRABALHADORES_ECDS_ID, DATA, ESTADO, PRESTADOR_ID, + TO_PRESTADOR_ID, ANALISADOR_ID, TO_ANALISADOR_ID, DATA_ENVIO, DATA_RECEPCAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TRABALHADORES_ECDS_ID, TABLENAME + "." + TO_TRABALHADORES_ECDS_ID, TABLENAME + "." + DATA, TABLENAME + "." + ESTADO, TABLENAME + "." + PRESTADOR_ID, + TABLENAME + "." + TO_PRESTADOR_ID, TABLENAME + "." + ANALISADOR_ID, TABLENAME + "." + TO_ANALISADOR_ID, TABLENAME + "." + DATA_ENVIO, TABLENAME + "." + DATA_RECEPCAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TRABALHADORES_ECDS_ID, DATA, ESTADO, PRESTADOR_ID, ANALISADOR_ID, DATA_ENVIO, + DATA_RECEPCAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, TRABALHADORES_ECDS_ID, DATA, ESTADO, PRESTADOR_ID, ANALISADOR_ID, DATA_ENVIO, + DATA_RECEPCAO, }; + + private Integer id; + private Integer trabalhadores_ecds_id; + private siprp.data.outer.TrabalhadoresEcdsData to_trabalhadores_ecds_id; + private java.util.Date data; + private Integer estado; + private Integer prestador_id; + private siprp.data.outer.PrestadoresData to_prestador_id; + private Integer analisador_id; + private siprp.data.outer.PrestadoresData to_analisador_id; + private java.util.Date data_envio; + private java.util.Date data_recepcao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public TrabalhadoresEcdsDatas() + { + 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 + { + setLockedForRefresh( true ); + 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.ListfromLembretes_trabalhadores_ecds_datas_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.LembretesData.class , getPrimaryKey().getMap().get("id"), "trabalhadores_ecds_datas_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromTrabalhadoresEcd_trabalhadores_ecds_datas_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresEcdData.class , getPrimaryKey().getMap().get("id"), "trabalhadores_ecds_datas_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromTrabalhadoresEcdsDatasEmails_trabalhadores_ecds_datas_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresEcdsDatasEmailsData.class , getPrimaryKey().getMap().get("id"), "trabalhadores_ecds_datas_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromTrabalhadoresEcdsDatasObservacoes_trabalhadores_ecds_datas_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresEcdsDatasObservacoesData.class , getPrimaryKey().getMap().get("id"), "trabalhadores_ecds_datas_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public Integer getTrabalhadores_ecds_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TRABALHADORES_ECDS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.trabalhadores_ecds_id; + } + + public void setTrabalhadores_ecds_id( Integer trabalhadores_ecds_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( TRABALHADORES_ECDS_ID, trabalhadores_ecds_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.trabalhadores_ecds_id = trabalhadores_ecds_id; + LAZY_LOADED_OBJECTS.put( TRABALHADORES_ECDS_ID, Boolean.TRUE ); + } + + public siprp.data.outer.TrabalhadoresEcdsData toTrabalhadores_ecds_id() + { + try + { + prepare( TO_TRABALHADORES_ECDS_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhadores_ecds_id; + } + + public void setToTrabalhadores_ecds_id( siprp.data.outer.TrabalhadoresEcdsData to_trabalhadores_ecds_id ) + { + try + { + preProcess( TO_TRABALHADORES_ECDS_ID, to_trabalhadores_ecds_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_trabalhadores_ecds_id = to_trabalhadores_ecds_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 + { + setLockedForRefresh( true ); + 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 Integer getEstado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESTADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.estado; + } + + public void setEstado( Integer estado ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESTADO, estado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.estado = estado; + LAZY_LOADED_OBJECTS.put( ESTADO, Boolean.TRUE ); + } + + public Integer getPrestador_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PRESTADOR_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.prestador_id; + } + + public void setPrestador_id( Integer prestador_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PRESTADOR_ID, prestador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.prestador_id = prestador_id; + LAZY_LOADED_OBJECTS.put( PRESTADOR_ID, Boolean.TRUE ); + } + + public siprp.data.outer.PrestadoresData toPrestador_id() + { + try + { + prepare( TO_PRESTADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_prestador_id; + } + + public void setToPrestador_id( siprp.data.outer.PrestadoresData to_prestador_id ) + { + try + { + preProcess( TO_PRESTADOR_ID, to_prestador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_prestador_id = to_prestador_id; + } + + public Integer getAnalisador_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ANALISADOR_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.analisador_id; + } + + public void setAnalisador_id( Integer analisador_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( ANALISADOR_ID, analisador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.analisador_id = analisador_id; + LAZY_LOADED_OBJECTS.put( ANALISADOR_ID, Boolean.TRUE ); + } + + public siprp.data.outer.PrestadoresData toAnalisador_id() + { + try + { + prepare( TO_ANALISADOR_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_analisador_id; + } + + public void setToAnalisador_id( siprp.data.outer.PrestadoresData to_analisador_id ) + { + try + { + preProcess( TO_ANALISADOR_ID, to_analisador_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_analisador_id = to_analisador_id; + } + + public java.util.Date getData_envio() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_ENVIO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_envio; + } + + public void setData_envio( java.util.Date data_envio ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_ENVIO, data_envio ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_envio = data_envio; + LAZY_LOADED_OBJECTS.put( DATA_ENVIO, Boolean.TRUE ); + } + + public java.util.Date getData_recepcao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_RECEPCAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_recepcao; + } + + public void setData_recepcao( java.util.Date data_recepcao ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_RECEPCAO, data_recepcao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_recepcao = data_recepcao; + LAZY_LOADED_OBJECTS.put( DATA_RECEPCAO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcdsDatas.ID_INDEX: + value = getId(); + break; + case TrabalhadoresEcdsDatas.TRABALHADORES_ECDS_ID_INDEX: + value = getTrabalhadores_ecds_id(); + break; + case TrabalhadoresEcdsDatas.TO_TRABALHADORES_ECDS_ID_INDEX: + value = toTrabalhadores_ecds_id(); + break; + case TrabalhadoresEcdsDatas.DATA_INDEX: + value = getData(); + break; + case TrabalhadoresEcdsDatas.ESTADO_INDEX: + value = getEstado(); + break; + case TrabalhadoresEcdsDatas.PRESTADOR_ID_INDEX: + value = getPrestador_id(); + break; + case TrabalhadoresEcdsDatas.TO_PRESTADOR_ID_INDEX: + value = toPrestador_id(); + break; + case TrabalhadoresEcdsDatas.ANALISADOR_ID_INDEX: + value = getAnalisador_id(); + break; + case TrabalhadoresEcdsDatas.TO_ANALISADOR_ID_INDEX: + value = toAnalisador_id(); + break; + case TrabalhadoresEcdsDatas.DATA_ENVIO_INDEX: + value = getData_envio(); + break; + case TrabalhadoresEcdsDatas.DATA_RECEPCAO_INDEX: + value = getData_recepcao(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcdsDatas.ID_INDEX: + value = this.id; + break; + case TrabalhadoresEcdsDatas.TRABALHADORES_ECDS_ID_INDEX: + value = this.trabalhadores_ecds_id; + break; + case TrabalhadoresEcdsDatas.TO_TRABALHADORES_ECDS_ID_INDEX: + value = this.to_trabalhadores_ecds_id; + break; + case TrabalhadoresEcdsDatas.DATA_INDEX: + value = this.data; + break; + case TrabalhadoresEcdsDatas.ESTADO_INDEX: + value = this.estado; + break; + case TrabalhadoresEcdsDatas.PRESTADOR_ID_INDEX: + value = this.prestador_id; + break; + case TrabalhadoresEcdsDatas.TO_PRESTADOR_ID_INDEX: + value = this.to_prestador_id; + break; + case TrabalhadoresEcdsDatas.ANALISADOR_ID_INDEX: + value = this.analisador_id; + break; + case TrabalhadoresEcdsDatas.TO_ANALISADOR_ID_INDEX: + value = this.to_analisador_id; + break; + case TrabalhadoresEcdsDatas.DATA_ENVIO_INDEX: + value = this.data_envio; + break; + case TrabalhadoresEcdsDatas.DATA_RECEPCAO_INDEX: + value = this.data_recepcao; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcdsDatas.ID_INDEX: + setId( ( Integer ) value ); + break; + case TrabalhadoresEcdsDatas.TRABALHADORES_ECDS_ID_INDEX: + setTrabalhadores_ecds_id( ( Integer ) value ); + break; + case TrabalhadoresEcdsDatas.TO_TRABALHADORES_ECDS_ID_INDEX: + setToTrabalhadores_ecds_id( ( siprp.data.outer.TrabalhadoresEcdsData ) value ); + break; + case TrabalhadoresEcdsDatas.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case TrabalhadoresEcdsDatas.ESTADO_INDEX: + setEstado( ( Integer ) value ); + break; + case TrabalhadoresEcdsDatas.PRESTADOR_ID_INDEX: + setPrestador_id( ( Integer ) value ); + break; + case TrabalhadoresEcdsDatas.TO_PRESTADOR_ID_INDEX: + setToPrestador_id( ( siprp.data.outer.PrestadoresData ) value ); + break; + case TrabalhadoresEcdsDatas.ANALISADOR_ID_INDEX: + setAnalisador_id( ( Integer ) value ); + break; + case TrabalhadoresEcdsDatas.TO_ANALISADOR_ID_INDEX: + setToAnalisador_id( ( siprp.data.outer.PrestadoresData ) value ); + break; + case TrabalhadoresEcdsDatas.DATA_ENVIO_INDEX: + setData_envio( ( java.util.Date ) value ); + break; + case TrabalhadoresEcdsDatas.DATA_RECEPCAO_INDEX: + setData_recepcao( ( java.util.Date ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcdsDatas.ID_INDEX: + this.id = ( Integer ) value; + break; + case TrabalhadoresEcdsDatas.TRABALHADORES_ECDS_ID_INDEX: + this.trabalhadores_ecds_id = ( Integer ) value; + break; + case TrabalhadoresEcdsDatas.TO_TRABALHADORES_ECDS_ID_INDEX: + this.to_trabalhadores_ecds_id = ( siprp.data.outer.TrabalhadoresEcdsData ) value; + break; + case TrabalhadoresEcdsDatas.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case TrabalhadoresEcdsDatas.ESTADO_INDEX: + this.estado = ( Integer ) value; + break; + case TrabalhadoresEcdsDatas.PRESTADOR_ID_INDEX: + this.prestador_id = ( Integer ) value; + break; + case TrabalhadoresEcdsDatas.TO_PRESTADOR_ID_INDEX: + this.to_prestador_id = ( siprp.data.outer.PrestadoresData ) value; + break; + case TrabalhadoresEcdsDatas.ANALISADOR_ID_INDEX: + this.analisador_id = ( Integer ) value; + break; + case TrabalhadoresEcdsDatas.TO_ANALISADOR_ID_INDEX: + this.to_analisador_id = ( siprp.data.outer.PrestadoresData ) value; + break; + case TrabalhadoresEcdsDatas.DATA_ENVIO_INDEX: + this.data_envio = ( java.util.Date ) value; + break; + case TrabalhadoresEcdsDatas.DATA_RECEPCAO_INDEX: + this.data_recepcao = ( java.util.Date ) 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 TrabalhadoresEcdsDatas.ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcdsDatas.TRABALHADORES_ECDS_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcdsDatas.TO_TRABALHADORES_ECDS_ID_INDEX: + theClass = siprp.data.outer.TrabalhadoresEcdsData.class; + break; + case TrabalhadoresEcdsDatas.DATA_INDEX: + theClass = java.util.Date.class; + break; + case TrabalhadoresEcdsDatas.ESTADO_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcdsDatas.PRESTADOR_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcdsDatas.TO_PRESTADOR_ID_INDEX: + theClass = siprp.data.outer.PrestadoresData.class; + break; + case TrabalhadoresEcdsDatas.ANALISADOR_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcdsDatas.TO_ANALISADOR_ID_INDEX: + theClass = siprp.data.outer.PrestadoresData.class; + break; + case TrabalhadoresEcdsDatas.DATA_ENVIO_INDEX: + theClass = java.util.Date.class; + break; + case TrabalhadoresEcdsDatas.DATA_RECEPCAO_INDEX: + theClass = java.util.Date.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : TrabalhadoresEcdsDatas._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, TrabalhadoresEcdsDatas.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresEcdsDatasEmails.java b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresEcdsDatasEmails.java new file mode 100644 index 00000000..7433304e --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresEcdsDatasEmails.java @@ -0,0 +1,532 @@ +/* +* TrabalhadoresEcdsDatasEmails.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class TrabalhadoresEcdsDatasEmails extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( TrabalhadoresEcdsDatasEmails.ID, TrabalhadoresEcdsDatasEmails.ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatasEmails.ID_FULL, TrabalhadoresEcdsDatasEmails.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresEcdsDatasEmails.CLASS_IDENTIFIER, TrabalhadoresEcdsDatasEmails.TRABALHADORES_ECDS_DATAS_ID, TrabalhadoresEcdsDatasEmails.TO_TRABALHADORES_ECDS_DATAS_ID ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatasEmails.TRABALHADORES_ECDS_DATAS_ID, TrabalhadoresEcdsDatasEmails.TRABALHADORES_ECDS_DATAS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatasEmails.TRABALHADORES_ECDS_DATAS_ID_FULL, TrabalhadoresEcdsDatasEmails.TRABALHADORES_ECDS_DATAS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatasEmails.TO_TRABALHADORES_ECDS_DATAS_ID, TrabalhadoresEcdsDatasEmails.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatasEmails.DESTINATION, TrabalhadoresEcdsDatasEmails.DESTINATION_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatasEmails.DESTINATION_FULL, TrabalhadoresEcdsDatasEmails.DESTINATION_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatasEmails.DATA, TrabalhadoresEcdsDatasEmails.DATA_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatasEmails.DATA_FULL, TrabalhadoresEcdsDatasEmails.DATA_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatasEmails.SUBJECT, TrabalhadoresEcdsDatasEmails.SUBJECT_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatasEmails.SUBJECT_FULL, TrabalhadoresEcdsDatasEmails.SUBJECT_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatasEmails.BODY, TrabalhadoresEcdsDatasEmails.BODY_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatasEmails.BODY_FULL, TrabalhadoresEcdsDatasEmails.BODY_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeytrabalhadores_ecds_datas_idTotrabalhadores_ecds_datas = + new com.evolute.entity.ForeignKey( TrabalhadoresEcdsDatasEmails.class, TrabalhadoresEcdsDatasEmails.TRABALHADORES_ECDS_DATAS_ID, siprp.data.outer.TrabalhadoresEcdsDatasData.class, siprp.data.outer.TrabalhadoresEcdsDatasData.ID ); + + public static final String TABLENAME = "trabalhadores_ecds_datas_emails"; + + + public static final String CLASS_IDENTIFIER = "trabalhadores_ecds_datas_emails1277401737195"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_ecds_datas_emails.id"; + public static final int ID_INDEX = 0; + public static final String TRABALHADORES_ECDS_DATAS_ID = "trabalhadores_ecds_datas_id"; + public static final String TRABALHADORES_ECDS_DATAS_ID_FULL = "trabalhadores_ecds_datas_emails.trabalhadores_ecds_datas_id"; + public static final int TRABALHADORES_ECDS_DATAS_ID_INDEX = 1; + public static final String TO_TRABALHADORES_ECDS_DATAS_ID = "to_trabalhadores_ecds_datas_id"; + public static final int TO_TRABALHADORES_ECDS_DATAS_ID_INDEX = 2; + public static final String DESTINATION = "destination"; + public static final String DESTINATION_FULL = "trabalhadores_ecds_datas_emails.destination"; + public static final int DESTINATION_INDEX = 3; + public static final String DATA = "data"; + public static final String DATA_FULL = "trabalhadores_ecds_datas_emails.data"; + public static final int DATA_INDEX = 4; + public static final String SUBJECT = "subject"; + public static final String SUBJECT_FULL = "trabalhadores_ecds_datas_emails.subject"; + public static final int SUBJECT_INDEX = 5; + public static final String BODY = "body"; + public static final String BODY_FULL = "trabalhadores_ecds_datas_emails.body"; + public static final int BODY_INDEX = 6; + + public static final String FIELD_NAMES[] = new String[]{ + TRABALHADORES_ECDS_DATAS_ID, TO_TRABALHADORES_ECDS_DATAS_ID, DESTINATION, + DATA, SUBJECT, BODY, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TRABALHADORES_ECDS_DATAS_ID, TABLENAME + "." + TO_TRABALHADORES_ECDS_DATAS_ID, TABLENAME + "." + DESTINATION, + TABLENAME + "." + DATA, TABLENAME + "." + SUBJECT, TABLENAME + "." + BODY, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TRABALHADORES_ECDS_DATAS_ID, DESTINATION, DATA, SUBJECT, BODY, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, TRABALHADORES_ECDS_DATAS_ID, DESTINATION, DATA, SUBJECT, BODY, }; + + private Integer id; + private Integer trabalhadores_ecds_datas_id; + private siprp.data.outer.TrabalhadoresEcdsDatasData to_trabalhadores_ecds_datas_id; + private String destination; + private java.util.Date data; + private String subject; + private String body; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public TrabalhadoresEcdsDatasEmails() + { + 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 + { + setLockedForRefresh( true ); + 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 getTrabalhadores_ecds_datas_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TRABALHADORES_ECDS_DATAS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.trabalhadores_ecds_datas_id; + } + + public void setTrabalhadores_ecds_datas_id( Integer trabalhadores_ecds_datas_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( TRABALHADORES_ECDS_DATAS_ID, trabalhadores_ecds_datas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.trabalhadores_ecds_datas_id = trabalhadores_ecds_datas_id; + LAZY_LOADED_OBJECTS.put( TRABALHADORES_ECDS_DATAS_ID, Boolean.TRUE ); + } + + public siprp.data.outer.TrabalhadoresEcdsDatasData toTrabalhadores_ecds_datas_id() + { + try + { + prepare( TO_TRABALHADORES_ECDS_DATAS_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhadores_ecds_datas_id; + } + + public void setToTrabalhadores_ecds_datas_id( siprp.data.outer.TrabalhadoresEcdsDatasData to_trabalhadores_ecds_datas_id ) + { + try + { + preProcess( TO_TRABALHADORES_ECDS_DATAS_ID, to_trabalhadores_ecds_datas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_trabalhadores_ecds_datas_id = to_trabalhadores_ecds_datas_id; + } + + public String getDestination() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DESTINATION ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.destination; + } + + public void setDestination( String destination ) + { + try + { + setLockedForRefresh( true ); + preProcess( DESTINATION, destination ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.destination = destination; + LAZY_LOADED_OBJECTS.put( DESTINATION, 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 + { + setLockedForRefresh( true ); + 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 getSubject() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( SUBJECT ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.subject; + } + + public void setSubject( String subject ) + { + try + { + setLockedForRefresh( true ); + preProcess( SUBJECT, subject ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.subject = subject; + LAZY_LOADED_OBJECTS.put( SUBJECT, Boolean.TRUE ); + } + + public String getBody() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( BODY ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.body; + } + + public void setBody( String body ) + { + try + { + setLockedForRefresh( true ); + preProcess( BODY, body ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.body = body; + LAZY_LOADED_OBJECTS.put( BODY, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcdsDatasEmails.ID_INDEX: + value = getId(); + break; + case TrabalhadoresEcdsDatasEmails.TRABALHADORES_ECDS_DATAS_ID_INDEX: + value = getTrabalhadores_ecds_datas_id(); + break; + case TrabalhadoresEcdsDatasEmails.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX: + value = toTrabalhadores_ecds_datas_id(); + break; + case TrabalhadoresEcdsDatasEmails.DESTINATION_INDEX: + value = getDestination(); + break; + case TrabalhadoresEcdsDatasEmails.DATA_INDEX: + value = getData(); + break; + case TrabalhadoresEcdsDatasEmails.SUBJECT_INDEX: + value = getSubject(); + break; + case TrabalhadoresEcdsDatasEmails.BODY_INDEX: + value = getBody(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcdsDatasEmails.ID_INDEX: + value = this.id; + break; + case TrabalhadoresEcdsDatasEmails.TRABALHADORES_ECDS_DATAS_ID_INDEX: + value = this.trabalhadores_ecds_datas_id; + break; + case TrabalhadoresEcdsDatasEmails.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX: + value = this.to_trabalhadores_ecds_datas_id; + break; + case TrabalhadoresEcdsDatasEmails.DESTINATION_INDEX: + value = this.destination; + break; + case TrabalhadoresEcdsDatasEmails.DATA_INDEX: + value = this.data; + break; + case TrabalhadoresEcdsDatasEmails.SUBJECT_INDEX: + value = this.subject; + break; + case TrabalhadoresEcdsDatasEmails.BODY_INDEX: + value = this.body; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcdsDatasEmails.ID_INDEX: + setId( ( Integer ) value ); + break; + case TrabalhadoresEcdsDatasEmails.TRABALHADORES_ECDS_DATAS_ID_INDEX: + setTrabalhadores_ecds_datas_id( ( Integer ) value ); + break; + case TrabalhadoresEcdsDatasEmails.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX: + setToTrabalhadores_ecds_datas_id( ( siprp.data.outer.TrabalhadoresEcdsDatasData ) value ); + break; + case TrabalhadoresEcdsDatasEmails.DESTINATION_INDEX: + setDestination( ( String ) value ); + break; + case TrabalhadoresEcdsDatasEmails.DATA_INDEX: + setData( ( java.util.Date ) value ); + break; + case TrabalhadoresEcdsDatasEmails.SUBJECT_INDEX: + setSubject( ( String ) value ); + break; + case TrabalhadoresEcdsDatasEmails.BODY_INDEX: + setBody( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcdsDatasEmails.ID_INDEX: + this.id = ( Integer ) value; + break; + case TrabalhadoresEcdsDatasEmails.TRABALHADORES_ECDS_DATAS_ID_INDEX: + this.trabalhadores_ecds_datas_id = ( Integer ) value; + break; + case TrabalhadoresEcdsDatasEmails.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX: + this.to_trabalhadores_ecds_datas_id = ( siprp.data.outer.TrabalhadoresEcdsDatasData ) value; + break; + case TrabalhadoresEcdsDatasEmails.DESTINATION_INDEX: + this.destination = ( String ) value; + break; + case TrabalhadoresEcdsDatasEmails.DATA_INDEX: + this.data = ( java.util.Date ) value; + break; + case TrabalhadoresEcdsDatasEmails.SUBJECT_INDEX: + this.subject = ( String ) value; + break; + case TrabalhadoresEcdsDatasEmails.BODY_INDEX: + this.body = ( 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 TrabalhadoresEcdsDatasEmails.ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcdsDatasEmails.TRABALHADORES_ECDS_DATAS_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcdsDatasEmails.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX: + theClass = siprp.data.outer.TrabalhadoresEcdsDatasData.class; + break; + case TrabalhadoresEcdsDatasEmails.DESTINATION_INDEX: + theClass = String.class; + break; + case TrabalhadoresEcdsDatasEmails.DATA_INDEX: + theClass = java.util.Date.class; + break; + case TrabalhadoresEcdsDatasEmails.SUBJECT_INDEX: + theClass = String.class; + break; + case TrabalhadoresEcdsDatasEmails.BODY_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : TrabalhadoresEcdsDatasEmails._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, TrabalhadoresEcdsDatasEmails.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresEcdsDatasObservacoes.java b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresEcdsDatasObservacoes.java new file mode 100644 index 00000000..f861aa74 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresEcdsDatasObservacoes.java @@ -0,0 +1,380 @@ +/* +* TrabalhadoresEcdsDatasObservacoes.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class TrabalhadoresEcdsDatasObservacoes extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( TrabalhadoresEcdsDatasObservacoes.ID, TrabalhadoresEcdsDatasObservacoes.ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatasObservacoes.ID_FULL, TrabalhadoresEcdsDatasObservacoes.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresEcdsDatasObservacoes.CLASS_IDENTIFIER, TrabalhadoresEcdsDatasObservacoes.TRABALHADORES_ECDS_DATAS_ID, TrabalhadoresEcdsDatasObservacoes.TO_TRABALHADORES_ECDS_DATAS_ID ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatasObservacoes.TRABALHADORES_ECDS_DATAS_ID, TrabalhadoresEcdsDatasObservacoes.TRABALHADORES_ECDS_DATAS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatasObservacoes.TRABALHADORES_ECDS_DATAS_ID_FULL, TrabalhadoresEcdsDatasObservacoes.TRABALHADORES_ECDS_DATAS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatasObservacoes.TO_TRABALHADORES_ECDS_DATAS_ID, TrabalhadoresEcdsDatasObservacoes.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatasObservacoes.OBSERVACAO, TrabalhadoresEcdsDatasObservacoes.OBSERVACAO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresEcdsDatasObservacoes.OBSERVACAO_FULL, TrabalhadoresEcdsDatasObservacoes.OBSERVACAO_INDEX ); + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final com.evolute.entity.ForeignKey ForeignKeytrabalhadores_ecds_datas_idTotrabalhadores_ecds_datas = + new com.evolute.entity.ForeignKey( TrabalhadoresEcdsDatasObservacoes.class, TrabalhadoresEcdsDatasObservacoes.TRABALHADORES_ECDS_DATAS_ID, siprp.data.outer.TrabalhadoresEcdsDatasData.class, siprp.data.outer.TrabalhadoresEcdsDatasData.ID ); + + public static final String TABLENAME = "trabalhadores_ecds_datas_observacoes"; + + + public static final String CLASS_IDENTIFIER = "trabalhadores_ecds_datas_observacoes1277401737196"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_ecds_datas_observacoes.id"; + public static final int ID_INDEX = 0; + public static final String TRABALHADORES_ECDS_DATAS_ID = "trabalhadores_ecds_datas_id"; + public static final String TRABALHADORES_ECDS_DATAS_ID_FULL = "trabalhadores_ecds_datas_observacoes.trabalhadores_ecds_datas_id"; + public static final int TRABALHADORES_ECDS_DATAS_ID_INDEX = 1; + public static final String TO_TRABALHADORES_ECDS_DATAS_ID = "to_trabalhadores_ecds_datas_id"; + public static final int TO_TRABALHADORES_ECDS_DATAS_ID_INDEX = 2; + public static final String OBSERVACAO = "observacao"; + public static final String OBSERVACAO_FULL = "trabalhadores_ecds_datas_observacoes.observacao"; + public static final int OBSERVACAO_INDEX = 3; + + public static final String FIELD_NAMES[] = new String[]{ + TRABALHADORES_ECDS_DATAS_ID, TO_TRABALHADORES_ECDS_DATAS_ID, OBSERVACAO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TRABALHADORES_ECDS_DATAS_ID, TABLENAME + "." + TO_TRABALHADORES_ECDS_DATAS_ID, TABLENAME + "." + OBSERVACAO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TRABALHADORES_ECDS_DATAS_ID, OBSERVACAO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, TRABALHADORES_ECDS_DATAS_ID, OBSERVACAO, }; + + private Integer id; + private Integer trabalhadores_ecds_datas_id; + private siprp.data.outer.TrabalhadoresEcdsDatasData to_trabalhadores_ecds_datas_id; + private String observacao; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public TrabalhadoresEcdsDatasObservacoes() + { + 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 + { + setLockedForRefresh( true ); + 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 getTrabalhadores_ecds_datas_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( TRABALHADORES_ECDS_DATAS_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.trabalhadores_ecds_datas_id; + } + + public void setTrabalhadores_ecds_datas_id( Integer trabalhadores_ecds_datas_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( TRABALHADORES_ECDS_DATAS_ID, trabalhadores_ecds_datas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.trabalhadores_ecds_datas_id = trabalhadores_ecds_datas_id; + LAZY_LOADED_OBJECTS.put( TRABALHADORES_ECDS_DATAS_ID, Boolean.TRUE ); + } + + public siprp.data.outer.TrabalhadoresEcdsDatasData toTrabalhadores_ecds_datas_id() + { + try + { + prepare( TO_TRABALHADORES_ECDS_DATAS_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_trabalhadores_ecds_datas_id; + } + + public void setToTrabalhadores_ecds_datas_id( siprp.data.outer.TrabalhadoresEcdsDatasData to_trabalhadores_ecds_datas_id ) + { + try + { + preProcess( TO_TRABALHADORES_ECDS_DATAS_ID, to_trabalhadores_ecds_datas_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_trabalhadores_ecds_datas_id = to_trabalhadores_ecds_datas_id; + } + + public String getObservacao() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( OBSERVACAO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.observacao; + } + + public void setObservacao( String observacao ) + { + try + { + setLockedForRefresh( true ); + preProcess( OBSERVACAO, observacao ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.observacao = observacao; + LAZY_LOADED_OBJECTS.put( OBSERVACAO, Boolean.TRUE ); + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcdsDatasObservacoes.ID_INDEX: + value = getId(); + break; + case TrabalhadoresEcdsDatasObservacoes.TRABALHADORES_ECDS_DATAS_ID_INDEX: + value = getTrabalhadores_ecds_datas_id(); + break; + case TrabalhadoresEcdsDatasObservacoes.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX: + value = toTrabalhadores_ecds_datas_id(); + break; + case TrabalhadoresEcdsDatasObservacoes.OBSERVACAO_INDEX: + value = getObservacao(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcdsDatasObservacoes.ID_INDEX: + value = this.id; + break; + case TrabalhadoresEcdsDatasObservacoes.TRABALHADORES_ECDS_DATAS_ID_INDEX: + value = this.trabalhadores_ecds_datas_id; + break; + case TrabalhadoresEcdsDatasObservacoes.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX: + value = this.to_trabalhadores_ecds_datas_id; + break; + case TrabalhadoresEcdsDatasObservacoes.OBSERVACAO_INDEX: + value = this.observacao; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcdsDatasObservacoes.ID_INDEX: + setId( ( Integer ) value ); + break; + case TrabalhadoresEcdsDatasObservacoes.TRABALHADORES_ECDS_DATAS_ID_INDEX: + setTrabalhadores_ecds_datas_id( ( Integer ) value ); + break; + case TrabalhadoresEcdsDatasObservacoes.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX: + setToTrabalhadores_ecds_datas_id( ( siprp.data.outer.TrabalhadoresEcdsDatasData ) value ); + break; + case TrabalhadoresEcdsDatasObservacoes.OBSERVACAO_INDEX: + setObservacao( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresEcdsDatasObservacoes.ID_INDEX: + this.id = ( Integer ) value; + break; + case TrabalhadoresEcdsDatasObservacoes.TRABALHADORES_ECDS_DATAS_ID_INDEX: + this.trabalhadores_ecds_datas_id = ( Integer ) value; + break; + case TrabalhadoresEcdsDatasObservacoes.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX: + this.to_trabalhadores_ecds_datas_id = ( siprp.data.outer.TrabalhadoresEcdsDatasData ) value; + break; + case TrabalhadoresEcdsDatasObservacoes.OBSERVACAO_INDEX: + this.observacao = ( 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 TrabalhadoresEcdsDatasObservacoes.ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcdsDatasObservacoes.TRABALHADORES_ECDS_DATAS_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresEcdsDatasObservacoes.TO_TRABALHADORES_ECDS_DATAS_ID_INDEX: + theClass = siprp.data.outer.TrabalhadoresEcdsDatasData.class; + break; + case TrabalhadoresEcdsDatasObservacoes.OBSERVACAO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : TrabalhadoresEcdsDatasObservacoes._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, TrabalhadoresEcdsDatasObservacoes.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresFichasAptidao.java b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresFichasAptidao.java new file mode 100644 index 00000000..9ee80232 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresFichasAptidao.java @@ -0,0 +1,429 @@ +/* +* TrabalhadoresFichasAptidao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class TrabalhadoresFichasAptidao extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( TrabalhadoresFichasAptidao.ID, TrabalhadoresFichasAptidao.ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresFichasAptidao.ID_FULL, TrabalhadoresFichasAptidao.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresFichasAptidao.CLASS_IDENTIFIER, TrabalhadoresFichasAptidao.PROCESSO_ID, TrabalhadoresFichasAptidao.TO_PROCESSO_ID ); + FIELD_INDEXES.put( TrabalhadoresFichasAptidao.PROCESSO_ID, TrabalhadoresFichasAptidao.PROCESSO_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresFichasAptidao.PROCESSO_ID_FULL, TrabalhadoresFichasAptidao.PROCESSO_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresFichasAptidao.TO_PROCESSO_ID, TrabalhadoresFichasAptidao.TO_PROCESSO_ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresFichasAptidao.CLASS_IDENTIFIER, TrabalhadoresFichasAptidao.EXAME_ID, TrabalhadoresFichasAptidao.TO_EXAME_ID ); + FIELD_INDEXES.put( TrabalhadoresFichasAptidao.EXAME_ID, TrabalhadoresFichasAptidao.EXAME_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresFichasAptidao.EXAME_ID_FULL, TrabalhadoresFichasAptidao.EXAME_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresFichasAptidao.TO_EXAME_ID, TrabalhadoresFichasAptidao.TO_EXAME_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 ForeignKeyprocesso_idTotrabalhadores_processo = + new com.evolute.entity.ForeignKey( TrabalhadoresFichasAptidao.class, TrabalhadoresFichasAptidao.PROCESSO_ID, siprp.data.outer.TrabalhadoresProcessoData.class, siprp.data.outer.TrabalhadoresProcessoData.ID ); + + public static final com.evolute.entity.ForeignKey ForeignKeyexame_idToexames = + new com.evolute.entity.ForeignKey( TrabalhadoresFichasAptidao.class, TrabalhadoresFichasAptidao.EXAME_ID, siprp.data.outer.ExamesData.class, siprp.data.outer.ExamesData.ID ); + + public static final String TABLENAME = "trabalhadores_fichas_aptidao"; + + + public static final String CLASS_IDENTIFIER = "trabalhadores_fichas_aptidao1277401737196"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_fichas_aptidao.id"; + public static final int ID_INDEX = 0; + public static final String PROCESSO_ID = "processo_id"; + public static final String PROCESSO_ID_FULL = "trabalhadores_fichas_aptidao.processo_id"; + public static final int PROCESSO_ID_INDEX = 1; + public static final String TO_PROCESSO_ID = "to_processo_id"; + public static final int TO_PROCESSO_ID_INDEX = 2; + public static final String EXAME_ID = "exame_id"; + public static final String EXAME_ID_FULL = "trabalhadores_fichas_aptidao.exame_id"; + public static final int EXAME_ID_INDEX = 3; + public static final String TO_EXAME_ID = "to_exame_id"; + public static final int TO_EXAME_ID_INDEX = 4; + + public static final String FIELD_NAMES[] = new String[]{ + PROCESSO_ID, TO_PROCESSO_ID, EXAME_ID, TO_EXAME_ID, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + PROCESSO_ID, TABLENAME + "." + TO_PROCESSO_ID, TABLENAME + "." + EXAME_ID, TABLENAME + "." + TO_EXAME_ID, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, PROCESSO_ID, EXAME_ID, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, PROCESSO_ID, EXAME_ID, }; + + private Integer id; + private Integer processo_id; + private siprp.data.outer.TrabalhadoresProcessoData to_processo_id; + private Integer exame_id; + private siprp.data.outer.ExamesData to_exame_id; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public TrabalhadoresFichasAptidao() + { + 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 + { + setLockedForRefresh( true ); + 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 getProcesso_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( PROCESSO_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.processo_id; + } + + public void setProcesso_id( Integer processo_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( PROCESSO_ID, processo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.processo_id = processo_id; + LAZY_LOADED_OBJECTS.put( PROCESSO_ID, Boolean.TRUE ); + } + + public siprp.data.outer.TrabalhadoresProcessoData toProcesso_id() + { + try + { + prepare( TO_PROCESSO_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_processo_id; + } + + public void setToProcesso_id( siprp.data.outer.TrabalhadoresProcessoData to_processo_id ) + { + try + { + preProcess( TO_PROCESSO_ID, to_processo_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_processo_id = to_processo_id; + } + + public Integer getExame_id() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( EXAME_ID ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.exame_id; + } + + public void setExame_id( Integer exame_id ) + { + try + { + setLockedForRefresh( true ); + preProcess( EXAME_ID, exame_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.exame_id = exame_id; + LAZY_LOADED_OBJECTS.put( EXAME_ID, Boolean.TRUE ); + } + + public siprp.data.outer.ExamesData toExame_id() + { + try + { + prepare( TO_EXAME_ID ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return this.to_exame_id; + } + + public void setToExame_id( siprp.data.outer.ExamesData to_exame_id ) + { + try + { + preProcess( TO_EXAME_ID, to_exame_id ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.to_exame_id = to_exame_id; + } + + public Object get( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresFichasAptidao.ID_INDEX: + value = getId(); + break; + case TrabalhadoresFichasAptidao.PROCESSO_ID_INDEX: + value = getProcesso_id(); + break; + case TrabalhadoresFichasAptidao.TO_PROCESSO_ID_INDEX: + value = toProcesso_id(); + break; + case TrabalhadoresFichasAptidao.EXAME_ID_INDEX: + value = getExame_id(); + break; + case TrabalhadoresFichasAptidao.TO_EXAME_ID_INDEX: + value = toExame_id(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresFichasAptidao.ID_INDEX: + value = this.id; + break; + case TrabalhadoresFichasAptidao.PROCESSO_ID_INDEX: + value = this.processo_id; + break; + case TrabalhadoresFichasAptidao.TO_PROCESSO_ID_INDEX: + value = this.to_processo_id; + break; + case TrabalhadoresFichasAptidao.EXAME_ID_INDEX: + value = this.exame_id; + break; + case TrabalhadoresFichasAptidao.TO_EXAME_ID_INDEX: + value = this.to_exame_id; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresFichasAptidao.ID_INDEX: + setId( ( Integer ) value ); + break; + case TrabalhadoresFichasAptidao.PROCESSO_ID_INDEX: + setProcesso_id( ( Integer ) value ); + break; + case TrabalhadoresFichasAptidao.TO_PROCESSO_ID_INDEX: + setToProcesso_id( ( siprp.data.outer.TrabalhadoresProcessoData ) value ); + break; + case TrabalhadoresFichasAptidao.EXAME_ID_INDEX: + setExame_id( ( Integer ) value ); + break; + case TrabalhadoresFichasAptidao.TO_EXAME_ID_INDEX: + setToExame_id( ( siprp.data.outer.ExamesData ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresFichasAptidao.ID_INDEX: + this.id = ( Integer ) value; + break; + case TrabalhadoresFichasAptidao.PROCESSO_ID_INDEX: + this.processo_id = ( Integer ) value; + break; + case TrabalhadoresFichasAptidao.TO_PROCESSO_ID_INDEX: + this.to_processo_id = ( siprp.data.outer.TrabalhadoresProcessoData ) value; + break; + case TrabalhadoresFichasAptidao.EXAME_ID_INDEX: + this.exame_id = ( Integer ) value; + break; + case TrabalhadoresFichasAptidao.TO_EXAME_ID_INDEX: + this.to_exame_id = ( siprp.data.outer.ExamesData ) 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 TrabalhadoresFichasAptidao.ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresFichasAptidao.PROCESSO_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresFichasAptidao.TO_PROCESSO_ID_INDEX: + theClass = siprp.data.outer.TrabalhadoresProcessoData.class; + break; + case TrabalhadoresFichasAptidao.EXAME_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresFichasAptidao.TO_EXAME_ID_INDEX: + theClass = siprp.data.outer.ExamesData.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : TrabalhadoresFichasAptidao._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, TrabalhadoresFichasAptidao.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresProcesso.java b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresProcesso.java new file mode 100644 index 00000000..a3ca39b7 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/TrabalhadoresProcesso.java @@ -0,0 +1,674 @@ +/* +* TrabalhadoresProcesso.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class TrabalhadoresProcesso extends siprp.data.BaseObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + FIELD_INDEXES.put( TrabalhadoresProcesso.ID, TrabalhadoresProcesso.ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresProcesso.ID_FULL, TrabalhadoresProcesso.ID_INDEX ); + com.evolute.entity.evo.EvoDataObject.register( TrabalhadoresProcesso.CLASS_IDENTIFIER, TrabalhadoresProcesso.TRABALHADOR_ID, TrabalhadoresProcesso.TO_TRABALHADOR_ID ); + FIELD_INDEXES.put( TrabalhadoresProcesso.TRABALHADOR_ID, TrabalhadoresProcesso.TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresProcesso.TRABALHADOR_ID_FULL, TrabalhadoresProcesso.TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresProcesso.TO_TRABALHADOR_ID, TrabalhadoresProcesso.TO_TRABALHADOR_ID_INDEX ); + FIELD_INDEXES.put( TrabalhadoresProcesso.ESTADO, TrabalhadoresProcesso.ESTADO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresProcesso.ESTADO_FULL, TrabalhadoresProcesso.ESTADO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresProcesso.DATA_INICIO, TrabalhadoresProcesso.DATA_INICIO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresProcesso.DATA_INICIO_FULL, TrabalhadoresProcesso.DATA_INICIO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresProcesso.DATA_FIM, TrabalhadoresProcesso.DATA_FIM_INDEX ); + FIELD_INDEXES.put( TrabalhadoresProcesso.DATA_FIM_FULL, TrabalhadoresProcesso.DATA_FIM_INDEX ); + FIELD_INDEXES.put( TrabalhadoresProcesso.MOTIVO, TrabalhadoresProcesso.MOTIVO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresProcesso.MOTIVO_FULL, TrabalhadoresProcesso.MOTIVO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresProcesso.SUB_MOTIVO, TrabalhadoresProcesso.SUB_MOTIVO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresProcesso.SUB_MOTIVO_FULL, TrabalhadoresProcesso.SUB_MOTIVO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresProcesso.ACTIVO, TrabalhadoresProcesso.ACTIVO_INDEX ); + FIELD_INDEXES.put( TrabalhadoresProcesso.ACTIVO_FULL, TrabalhadoresProcesso.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 ForeignKeytrabalhador_idTotrabalhadores = + new com.evolute.entity.ForeignKey( TrabalhadoresProcesso.class, TrabalhadoresProcesso.TRABALHADOR_ID, siprp.data.outer.TrabalhadoresData.class, siprp.data.outer.TrabalhadoresData.ID ); + + public static final String TABLENAME = "trabalhadores_processo"; + + + public static final String CLASS_IDENTIFIER = "trabalhadores_processo1277401737197"; + + public static final int _INVALID__INDEX = -1; + public static final String ID = "id"; + public static final String ID_FULL = "trabalhadores_processo.id"; + public static final int ID_INDEX = 0; + public static final String TRABALHADOR_ID = "trabalhador_id"; + public static final String TRABALHADOR_ID_FULL = "trabalhadores_processo.trabalhador_id"; + public static final int TRABALHADOR_ID_INDEX = 1; + public static final String TO_TRABALHADOR_ID = "to_trabalhador_id"; + public static final int TO_TRABALHADOR_ID_INDEX = 2; + public static final String ESTADO = "estado"; + public static final String ESTADO_FULL = "trabalhadores_processo.estado"; + public static final int ESTADO_INDEX = 3; + public static final String DATA_INICIO = "data_inicio"; + public static final String DATA_INICIO_FULL = "trabalhadores_processo.data_inicio"; + public static final int DATA_INICIO_INDEX = 4; + public static final String DATA_FIM = "data_fim"; + public static final String DATA_FIM_FULL = "trabalhadores_processo.data_fim"; + public static final int DATA_FIM_INDEX = 5; + public static final String MOTIVO = "motivo"; + public static final String MOTIVO_FULL = "trabalhadores_processo.motivo"; + public static final int MOTIVO_INDEX = 6; + public static final String SUB_MOTIVO = "sub_motivo"; + public static final String SUB_MOTIVO_FULL = "trabalhadores_processo.sub_motivo"; + public static final int SUB_MOTIVO_INDEX = 7; + public static final String ACTIVO = "activo"; + public static final String ACTIVO_FULL = "trabalhadores_processo.activo"; + public static final int ACTIVO_INDEX = 8; + + public static final String FIELD_NAMES[] = new String[]{ + TRABALHADOR_ID, TO_TRABALHADOR_ID, ESTADO, DATA_INICIO, DATA_FIM, MOTIVO, + SUB_MOTIVO, ACTIVO, }; + + public static final String FIELD_NAMES_FULL[] = new String[]{ + TABLENAME + "." + TRABALHADOR_ID, TABLENAME + "." + TO_TRABALHADOR_ID, TABLENAME + "." + ESTADO, TABLENAME + "." + DATA_INICIO, TABLENAME + "." + DATA_FIM, TABLENAME + "." + MOTIVO, + TABLENAME + "." + SUB_MOTIVO, TABLENAME + "." + ACTIVO, }; + + protected static final String DB_FIELD_NAMES[] = new String[]{ + ID, TRABALHADOR_ID, ESTADO, DATA_INICIO, DATA_FIM, MOTIVO, SUB_MOTIVO, ACTIVO, }; + + + protected static final String PK_FIELD_NAMES[] = new String[]{ + ID, }; + + + public static final String DEFAULT_LOAD_SET[] = new String[] { + ID, TRABALHADOR_ID, ESTADO, DATA_INICIO, DATA_FIM, MOTIVO, SUB_MOTIVO, ACTIVO, }; + + private Integer id; + private Integer trabalhador_id; + private siprp.data.outer.TrabalhadoresData to_trabalhador_id; + private String estado; + private java.util.Date data_inicio; + private java.util.Date data_fim; + private Integer motivo; + private Integer sub_motivo; + private String activo; + + protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; + + public TrabalhadoresProcesso() + { + super(); + dirtyProperties = new boolean[]{ 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 + { + setLockedForRefresh( true ); + 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.ListfromTrabalhadoresConsultas_processo_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresConsultasData.class , getPrimaryKey().getMap().get("id"), "processo_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromTrabalhadoresEcds_processo_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresEcdsData.class , getPrimaryKey().getMap().get("id"), "processo_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + public java.util.ListfromTrabalhadoresFichasAptidao_processo_id() + { + java.util.List result = null; + try + { + result = fromReference( siprp.data.outer.TrabalhadoresFichasAptidaoData.class , getPrimaryKey().getMap().get("id"), "processo_id" ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + return result; + } + + 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 + { + setLockedForRefresh( true ); + 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 siprp.data.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( siprp.data.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 String getEstado() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( ESTADO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.estado; + } + + public void setEstado( String estado ) + { + try + { + setLockedForRefresh( true ); + preProcess( ESTADO, estado ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.estado = estado; + LAZY_LOADED_OBJECTS.put( ESTADO, Boolean.TRUE ); + } + + public java.util.Date getData_inicio() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_INICIO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_inicio; + } + + public void setData_inicio( java.util.Date data_inicio ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_INICIO, data_inicio ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_inicio = data_inicio; + LAZY_LOADED_OBJECTS.put( DATA_INICIO, Boolean.TRUE ); + } + + public java.util.Date getData_fim() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( DATA_FIM ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.data_fim; + } + + public void setData_fim( java.util.Date data_fim ) + { + try + { + setLockedForRefresh( true ); + preProcess( DATA_FIM, data_fim ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.data_fim = data_fim; + LAZY_LOADED_OBJECTS.put( DATA_FIM, Boolean.TRUE ); + } + + public Integer getMotivo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( MOTIVO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.motivo; + } + + public void setMotivo( Integer motivo ) + { + try + { + setLockedForRefresh( true ); + preProcess( MOTIVO, motivo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.motivo = motivo; + LAZY_LOADED_OBJECTS.put( MOTIVO, Boolean.TRUE ); + } + + public Integer getSub_motivo() + { + try + { + setLastAccess( System.currentTimeMillis() ); + prepare( SUB_MOTIVO ); + } + catch( java.lang.Exception ex ) + { + throw new RuntimeException( ex ); + } + return this.sub_motivo; + } + + public void setSub_motivo( Integer sub_motivo ) + { + try + { + setLockedForRefresh( true ); + preProcess( SUB_MOTIVO, sub_motivo ); + } + catch( com.evolute.entity.evo.EvoDataException edex ) + { + throw new RuntimeException( edex ); + } + this.sub_motivo = sub_motivo; + LAZY_LOADED_OBJECTS.put( SUB_MOTIVO, 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 + { + setLockedForRefresh( true ); + 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 TrabalhadoresProcesso.ID_INDEX: + value = getId(); + break; + case TrabalhadoresProcesso.TRABALHADOR_ID_INDEX: + value = getTrabalhador_id(); + break; + case TrabalhadoresProcesso.TO_TRABALHADOR_ID_INDEX: + value = toTrabalhador_id(); + break; + case TrabalhadoresProcesso.ESTADO_INDEX: + value = getEstado(); + break; + case TrabalhadoresProcesso.DATA_INICIO_INDEX: + value = getData_inicio(); + break; + case TrabalhadoresProcesso.DATA_FIM_INDEX: + value = getData_fim(); + break; + case TrabalhadoresProcesso.MOTIVO_INDEX: + value = getMotivo(); + break; + case TrabalhadoresProcesso.SUB_MOTIVO_INDEX: + value = getSub_motivo(); + break; + case TrabalhadoresProcesso.ACTIVO_INDEX: + value = getActivo(); + break; + } + return value; + } + + public Object rawGet( String fieldName ) + { + Object value = null; + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresProcesso.ID_INDEX: + value = this.id; + break; + case TrabalhadoresProcesso.TRABALHADOR_ID_INDEX: + value = this.trabalhador_id; + break; + case TrabalhadoresProcesso.TO_TRABALHADOR_ID_INDEX: + value = this.to_trabalhador_id; + break; + case TrabalhadoresProcesso.ESTADO_INDEX: + value = this.estado; + break; + case TrabalhadoresProcesso.DATA_INICIO_INDEX: + value = this.data_inicio; + break; + case TrabalhadoresProcesso.DATA_FIM_INDEX: + value = this.data_fim; + break; + case TrabalhadoresProcesso.MOTIVO_INDEX: + value = this.motivo; + break; + case TrabalhadoresProcesso.SUB_MOTIVO_INDEX: + value = this.sub_motivo; + break; + case TrabalhadoresProcesso.ACTIVO_INDEX: + value = this.activo; + break; + } + return value; + } + + public void set( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresProcesso.ID_INDEX: + setId( ( Integer ) value ); + break; + case TrabalhadoresProcesso.TRABALHADOR_ID_INDEX: + setTrabalhador_id( ( Integer ) value ); + break; + case TrabalhadoresProcesso.TO_TRABALHADOR_ID_INDEX: + setToTrabalhador_id( ( siprp.data.outer.TrabalhadoresData ) value ); + break; + case TrabalhadoresProcesso.ESTADO_INDEX: + setEstado( ( String ) value ); + break; + case TrabalhadoresProcesso.DATA_INICIO_INDEX: + setData_inicio( ( java.util.Date ) value ); + break; + case TrabalhadoresProcesso.DATA_FIM_INDEX: + setData_fim( ( java.util.Date ) value ); + break; + case TrabalhadoresProcesso.MOTIVO_INDEX: + setMotivo( ( Integer ) value ); + break; + case TrabalhadoresProcesso.SUB_MOTIVO_INDEX: + setSub_motivo( ( Integer ) value ); + break; + case TrabalhadoresProcesso.ACTIVO_INDEX: + setActivo( ( String ) value ); + break; + } + } + + public void rawSet( String fieldName, Object value ) + { + Integer index = getFieldIndex( fieldName ); + switch( index ) + { + case TrabalhadoresProcesso.ID_INDEX: + this.id = ( Integer ) value; + break; + case TrabalhadoresProcesso.TRABALHADOR_ID_INDEX: + this.trabalhador_id = ( Integer ) value; + break; + case TrabalhadoresProcesso.TO_TRABALHADOR_ID_INDEX: + this.to_trabalhador_id = ( siprp.data.outer.TrabalhadoresData ) value; + break; + case TrabalhadoresProcesso.ESTADO_INDEX: + this.estado = ( String ) value; + break; + case TrabalhadoresProcesso.DATA_INICIO_INDEX: + this.data_inicio = ( java.util.Date ) value; + break; + case TrabalhadoresProcesso.DATA_FIM_INDEX: + this.data_fim = ( java.util.Date ) value; + break; + case TrabalhadoresProcesso.MOTIVO_INDEX: + this.motivo = ( Integer ) value; + break; + case TrabalhadoresProcesso.SUB_MOTIVO_INDEX: + this.sub_motivo = ( Integer ) value; + break; + case TrabalhadoresProcesso.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 TrabalhadoresProcesso.ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresProcesso.TRABALHADOR_ID_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresProcesso.TO_TRABALHADOR_ID_INDEX: + theClass = siprp.data.outer.TrabalhadoresData.class; + break; + case TrabalhadoresProcesso.ESTADO_INDEX: + theClass = String.class; + break; + case TrabalhadoresProcesso.DATA_INICIO_INDEX: + theClass = java.util.Date.class; + break; + case TrabalhadoresProcesso.DATA_FIM_INDEX: + theClass = java.util.Date.class; + break; + case TrabalhadoresProcesso.MOTIVO_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresProcesso.SUB_MOTIVO_INDEX: + theClass = Integer.class; + break; + case TrabalhadoresProcesso.ACTIVO_INDEX: + theClass = String.class; + break; + } + return theClass; + } + + public Integer getFieldIndex( String fieldName ) + { + Integer index = FIELD_INDEXES.get( fieldName ); + return index != null ? index : TrabalhadoresProcesso._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, TrabalhadoresProcesso.PK_FIELD_NAMES ); + primaryKey.set( 0, ( Integer ) array.get( row, col + 0 ) ); + } + setId( ( Integer ) array.get( row, col + 0 ) ); + } + + @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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/Versao.java b/trunk/SIPRPSoft/src/siprp/data/inner/Versao.java new file mode 100644 index 00000000..7858bfb3 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/Versao.java @@ -0,0 +1,178 @@ +/* +* Versao.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class Versao extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + } + + private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >(); + + + public static final String TABLENAME = "versao"; + + + public static final String CLASS_IDENTIFIER = "versao1277401737197"; + + 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 Versao() + { + 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 Versao 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 : Versao._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, Versao.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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/Version.java b/trunk/SIPRPSoft/src/siprp/data/inner/Version.java new file mode 100644 index 00000000..e6e8a3a4 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/Version.java @@ -0,0 +1,178 @@ +/* +* Version.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Use but DON'T TOUCH +* -> (can't touch this) +*/ +package siprp.data.inner; + + +public class Version extends com.evolute.entity.evo.EvoDataObject +{ + private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); + + static + { + } + + 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 = "version1277401737197"; + + 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 Version() + { + 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 Version 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 : 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.ObjectPrimaryKey( TABLENAME, Version.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 ); + } + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/inner/package.xml b/trunk/SIPRPSoft/src/siprp/data/inner/package.xml new file mode 100644 index 00000000..33f94503 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/inner/package.xml @@ -0,0 +1,2384 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/ActualizacaoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/ActualizacaoData.java new file mode 100644 index 00000000..258a4639 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/ActualizacaoData.java @@ -0,0 +1,18 @@ +/* +* ActualizacaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class ActualizacaoData extends siprp.data.inner.Actualizacao +{ + + public ActualizacaoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/AvisosData.java b/trunk/SIPRPSoft/src/siprp/data/outer/AvisosData.java new file mode 100644 index 00000000..5d261a82 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/AvisosData.java @@ -0,0 +1,21 @@ +/* +* AvisosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + +import siprp.data.AvisoConstants; + + +public final class AvisosData extends siprp.data.inner.Avisos implements AvisoConstants +{ + + public AvisosData() + { + super(); + } + +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/ContactosData.java b/trunk/SIPRPSoft/src/siprp/data/outer/ContactosData.java new file mode 100644 index 00000000..33b943af --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/ContactosData.java @@ -0,0 +1,18 @@ +/* +* ContactosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class ContactosData extends siprp.data.inner.Contactos +{ + + public ContactosData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/EcdOficialData.java b/trunk/SIPRPSoft/src/siprp/data/outer/EcdOficialData.java new file mode 100644 index 00000000..f7534705 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/EcdOficialData.java @@ -0,0 +1,18 @@ +/* +* EcdOficialData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class EcdOficialData extends siprp.data.inner.EcdOficial +{ + + public EcdOficialData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/EmailPlanoDeActuacaoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/EmailPlanoDeActuacaoData.java new file mode 100644 index 00000000..409e2bd7 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/EmailPlanoDeActuacaoData.java @@ -0,0 +1,18 @@ +/* +* EmailPlanoDeActuacaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class EmailPlanoDeActuacaoData extends siprp.data.inner.EmailPlanoDeActuacao +{ + + public EmailPlanoDeActuacaoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/EmpresasData.java b/trunk/SIPRPSoft/src/siprp/data/outer/EmpresasData.java new file mode 100644 index 00000000..23631923 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/EmpresasData.java @@ -0,0 +1,41 @@ +/* +* EmpresasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + +import java.sql.Timestamp; + +import com.evolute.entity.evo.EvoDataException; + + +public final class EmpresasData extends siprp.data.inner.Empresas +{ + + public EmpresasData() + { + super(); + } + + @Override + public void save() throws EvoDataException + { + if( getInactivo() == null ) + { + setInactivo( "n" ); + } + setActualizacao( new Timestamp(System.currentTimeMillis() ) ); + super.save(); + } + + @Override + public void delete() throws EvoDataException + { + setInactivo( "y" ); + save(); + } + +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/ErrorsData.java b/trunk/SIPRPSoft/src/siprp/data/outer/ErrorsData.java new file mode 100644 index 00000000..15cee4b8 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/ErrorsData.java @@ -0,0 +1,18 @@ +/* +* ErrorsData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class ErrorsData extends siprp.data.inner.Errors +{ + + public ErrorsData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/EstabelecimentosData.java b/trunk/SIPRPSoft/src/siprp/data/outer/EstabelecimentosData.java new file mode 100644 index 00000000..cd28ba5e --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/EstabelecimentosData.java @@ -0,0 +1,41 @@ +/* +* EstabelecimentosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + +import java.sql.Timestamp; + +import com.evolute.entity.evo.EvoDataException; + + +public final class EstabelecimentosData extends siprp.data.inner.Estabelecimentos +{ + + public EstabelecimentosData() + { + super(); + } + + @Override + public void save() throws EvoDataException + { + if( getInactivo() == null ) + { + setInactivo( "n" ); + } + setActualizacao( new Timestamp(System.currentTimeMillis() ) ); + super.save(); + } + + @Override + public void delete() throws EvoDataException + { + setInactivo( "y" ); + save(); + } + +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/EtiquetasData.java b/trunk/SIPRPSoft/src/siprp/data/outer/EtiquetasData.java new file mode 100644 index 00000000..e2d67a12 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/EtiquetasData.java @@ -0,0 +1,18 @@ +/* +* EtiquetasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class EtiquetasData extends siprp.data.inner.Etiquetas +{ + + public EtiquetasData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/ExamesData.java b/trunk/SIPRPSoft/src/siprp/data/outer/ExamesData.java new file mode 100644 index 00000000..4f9e6107 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/ExamesData.java @@ -0,0 +1,38 @@ +/* +* ExamesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + +import com.evolute.entity.evo.EvoDataException; + + +public final class ExamesData extends siprp.data.inner.Exames +{ + + public ExamesData() + { + super(); + } + + @Override + public void save() throws EvoDataException + { + if( getInactivo() == null ) + { + setInactivo( "n" ); + } + super.save(); + } + + @Override + public void delete() throws EvoDataException + { + setInactivo( "y" ); + save(); + } + +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/ExamesPerfisData.java b/trunk/SIPRPSoft/src/siprp/data/outer/ExamesPerfisData.java new file mode 100644 index 00000000..c4ea2108 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/ExamesPerfisData.java @@ -0,0 +1,18 @@ +/* +* ExamesPerfisData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class ExamesPerfisData extends siprp.data.inner.ExamesPerfis +{ + + public ExamesPerfisData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/ExamesPortariaData.java b/trunk/SIPRPSoft/src/siprp/data/outer/ExamesPortariaData.java new file mode 100644 index 00000000..e1542bbb --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/ExamesPortariaData.java @@ -0,0 +1,18 @@ +/* +* ExamesPortariaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class ExamesPortariaData extends siprp.data.inner.ExamesPortaria +{ + + public ExamesPortariaData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HistoricoEstabelecimentoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HistoricoEstabelecimentoData.java new file mode 100644 index 00000000..a78bf904 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HistoricoEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* HistoricoEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HistoricoEstabelecimentoData extends siprp.data.inner.HistoricoEstabelecimento +{ + + public HistoricoEstabelecimentoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsAreaData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsAreaData.java new file mode 100644 index 00000000..9bb0e87c --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsAreaData.java @@ -0,0 +1,18 @@ +/* +* HsAreaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsAreaData extends siprp.data.inner.HsArea +{ + + public HsAreaData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsEmailData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsEmailData.java new file mode 100644 index 00000000..0a101e80 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsEmailData.java @@ -0,0 +1,18 @@ +/* +* HsEmailData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsEmailData extends siprp.data.inner.HsEmail +{ + + public HsEmailData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsEmailEmpresaData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsEmailEmpresaData.java new file mode 100644 index 00000000..d4b8a17f --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsEmailEmpresaData.java @@ -0,0 +1,18 @@ +/* +* HsEmailEmpresaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsEmailEmpresaData extends siprp.data.inner.HsEmailEmpresa +{ + + public HsEmailEmpresaData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsEmailEstabelecimentoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsEmailEstabelecimentoData.java new file mode 100644 index 00000000..0c41092d --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsEmailEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* HsEmailEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsEmailEstabelecimentoData extends siprp.data.inner.HsEmailEstabelecimento +{ + + public HsEmailEstabelecimentoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsEquipamentoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsEquipamentoData.java new file mode 100644 index 00000000..377d04a9 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsEquipamentoData.java @@ -0,0 +1,18 @@ +/* +* HsEquipamentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsEquipamentoData extends siprp.data.inner.HsEquipamento +{ + + public HsEquipamentoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsLegislacaoCategoriaData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsLegislacaoCategoriaData.java new file mode 100644 index 00000000..7b391d78 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsLegislacaoCategoriaData.java @@ -0,0 +1,18 @@ +/* +* HsLegislacaoCategoriaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsLegislacaoCategoriaData extends siprp.data.inner.HsLegislacaoCategoria +{ + + public HsLegislacaoCategoriaData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsLegislacaoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsLegislacaoData.java new file mode 100644 index 00000000..7d5bb971 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsLegislacaoData.java @@ -0,0 +1,18 @@ +/* +* HsLegislacaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsLegislacaoData extends siprp.data.inner.HsLegislacao +{ + + public HsLegislacaoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsLegislacaoEmpresaData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsLegislacaoEmpresaData.java new file mode 100644 index 00000000..bf12db4f --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsLegislacaoEmpresaData.java @@ -0,0 +1,18 @@ +/* +* HsLegislacaoEmpresaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsLegislacaoEmpresaData extends siprp.data.inner.HsLegislacaoEmpresa +{ + + public HsLegislacaoEmpresaData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsLegislacaoEstabelecimentoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsLegislacaoEstabelecimentoData.java new file mode 100644 index 00000000..1147cf2c --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsLegislacaoEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* HsLegislacaoEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsLegislacaoEstabelecimentoData extends siprp.data.inner.HsLegislacaoEstabelecimento +{ + + public HsLegislacaoEstabelecimentoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsMedidaData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsMedidaData.java new file mode 100644 index 00000000..7d576ab4 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsMedidaData.java @@ -0,0 +1,18 @@ +/* +* HsMedidaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsMedidaData extends siprp.data.inner.HsMedida +{ + + public HsMedidaData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsNormalizacaoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsNormalizacaoData.java new file mode 100644 index 00000000..bbacbb7a --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsNormalizacaoData.java @@ -0,0 +1,18 @@ +/* +* HsNormalizacaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsNormalizacaoData extends siprp.data.inner.HsNormalizacao +{ + + public HsNormalizacaoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsNormalizacaoEmpresaData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsNormalizacaoEmpresaData.java new file mode 100644 index 00000000..0dddeb90 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsNormalizacaoEmpresaData.java @@ -0,0 +1,18 @@ +/* +* HsNormalizacaoEmpresaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsNormalizacaoEmpresaData extends siprp.data.inner.HsNormalizacaoEmpresa +{ + + public HsNormalizacaoEmpresaData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsNormalizacaoEstabelecimentoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsNormalizacaoEstabelecimentoData.java new file mode 100644 index 00000000..2d476f91 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsNormalizacaoEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* HsNormalizacaoEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsNormalizacaoEstabelecimentoData extends siprp.data.inner.HsNormalizacaoEstabelecimento +{ + + public HsNormalizacaoEstabelecimentoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsPostoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsPostoData.java new file mode 100644 index 00000000..02df2e9a --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsPostoData.java @@ -0,0 +1,18 @@ +/* +* HsPostoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsPostoData extends siprp.data.inner.HsPosto +{ + + public HsPostoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsPostoEstabelecimentoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsPostoEstabelecimentoData.java new file mode 100644 index 00000000..f3c74518 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsPostoEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* HsPostoEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsPostoEstabelecimentoData extends siprp.data.inner.HsPostoEstabelecimento +{ + + public HsPostoEstabelecimentoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsPostoMedidaData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsPostoMedidaData.java new file mode 100644 index 00000000..33a09ddb --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsPostoMedidaData.java @@ -0,0 +1,18 @@ +/* +* HsPostoMedidaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsPostoMedidaData extends siprp.data.inner.HsPostoMedida +{ + + public HsPostoMedidaData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsPostoRiscoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsPostoRiscoData.java new file mode 100644 index 00000000..52521624 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsPostoRiscoData.java @@ -0,0 +1,18 @@ +/* +* HsPostoRiscoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsPostoRiscoData extends siprp.data.inner.HsPostoRisco +{ + + public HsPostoRiscoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioAreaData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioAreaData.java new file mode 100644 index 00000000..34f0dd81 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioAreaData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioAreaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsRelatorioAreaData extends siprp.data.inner.HsRelatorioArea +{ + + public HsRelatorioAreaData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioData.java new file mode 100644 index 00000000..a69081ee --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsRelatorioData extends siprp.data.inner.HsRelatorio +{ + + public HsRelatorioData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioEquipamentoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioEquipamentoData.java new file mode 100644 index 00000000..967ef0df --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioEquipamentoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioEquipamentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsRelatorioEquipamentoData extends siprp.data.inner.HsRelatorioEquipamento +{ + + public HsRelatorioEquipamentoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioLegislacaoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioLegislacaoData.java new file mode 100644 index 00000000..9cb794b5 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioLegislacaoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioLegislacaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsRelatorioLegislacaoData extends siprp.data.inner.HsRelatorioLegislacao +{ + + public HsRelatorioLegislacaoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioMedidaData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioMedidaData.java new file mode 100644 index 00000000..639fe17b --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioMedidaData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioMedidaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsRelatorioMedidaData extends siprp.data.inner.HsRelatorioMedida +{ + + public HsRelatorioMedidaData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioNormalizacaoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioNormalizacaoData.java new file mode 100644 index 00000000..184b16d3 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioNormalizacaoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioNormalizacaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsRelatorioNormalizacaoData extends siprp.data.inner.HsRelatorioNormalizacao +{ + + public HsRelatorioNormalizacaoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioPostoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioPostoData.java new file mode 100644 index 00000000..ab64afcd --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioPostoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioPostoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsRelatorioPostoData extends siprp.data.inner.HsRelatorioPosto +{ + + public HsRelatorioPostoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioPostoMedidaData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioPostoMedidaData.java new file mode 100644 index 00000000..42e05242 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioPostoMedidaData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioPostoMedidaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsRelatorioPostoMedidaData extends siprp.data.inner.HsRelatorioPostoMedida +{ + + public HsRelatorioPostoMedidaData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioPostoRiscoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioPostoRiscoData.java new file mode 100644 index 00000000..f723fdac --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioPostoRiscoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioPostoRiscoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsRelatorioPostoRiscoData extends siprp.data.inner.HsRelatorioPostoRisco +{ + + public HsRelatorioPostoRiscoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioRiscoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioRiscoData.java new file mode 100644 index 00000000..ea5d4952 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioRiscoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioRiscoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsRelatorioRiscoData extends siprp.data.inner.HsRelatorioRisco +{ + + public HsRelatorioRiscoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioRiscoValorQualitativoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioRiscoValorQualitativoData.java new file mode 100644 index 00000000..d905bff4 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsRelatorioRiscoValorQualitativoData.java @@ -0,0 +1,18 @@ +/* +* HsRelatorioRiscoValorQualitativoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsRelatorioRiscoValorQualitativoData extends siprp.data.inner.HsRelatorioRiscoValorQualitativo +{ + + public HsRelatorioRiscoValorQualitativoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsRiscoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsRiscoData.java new file mode 100644 index 00000000..eb6a0329 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsRiscoData.java @@ -0,0 +1,18 @@ +/* +* HsRiscoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsRiscoData extends siprp.data.inner.HsRisco +{ + + public HsRiscoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsRiscoEmpresaData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsRiscoEmpresaData.java new file mode 100644 index 00000000..4cda36a9 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsRiscoEmpresaData.java @@ -0,0 +1,18 @@ +/* +* HsRiscoEmpresaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsRiscoEmpresaData extends siprp.data.inner.HsRiscoEmpresa +{ + + public HsRiscoEmpresaData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsRiscoMedidaData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsRiscoMedidaData.java new file mode 100644 index 00000000..d8889dd0 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsRiscoMedidaData.java @@ -0,0 +1,18 @@ +/* +* HsRiscoMedidaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsRiscoMedidaData extends siprp.data.inner.HsRiscoMedida +{ + + public HsRiscoMedidaData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/HsRiscoTemaData.java b/trunk/SIPRPSoft/src/siprp/data/outer/HsRiscoTemaData.java new file mode 100644 index 00000000..15747c3e --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/HsRiscoTemaData.java @@ -0,0 +1,18 @@ +/* +* HsRiscoTemaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class HsRiscoTemaData extends siprp.data.inner.HsRiscoTema +{ + + public HsRiscoTemaData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/IdsData.java b/trunk/SIPRPSoft/src/siprp/data/outer/IdsData.java new file mode 100644 index 00000000..e1f9bd5f --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/IdsData.java @@ -0,0 +1,18 @@ +/* +* IdsData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class IdsData extends siprp.data.inner.Ids +{ + + public IdsData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/ImageData.java b/trunk/SIPRPSoft/src/siprp/data/outer/ImageData.java new file mode 100644 index 00000000..c03edc77 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/ImageData.java @@ -0,0 +1,18 @@ +/* +* ImageData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class ImageData extends siprp.data.inner.Image +{ + + public ImageData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/LembretesData.java b/trunk/SIPRPSoft/src/siprp/data/outer/LembretesData.java new file mode 100644 index 00000000..5b8cc9d1 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/LembretesData.java @@ -0,0 +1,18 @@ +/* +* LembretesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class LembretesData extends siprp.data.inner.Lembretes +{ + + public LembretesData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/LembretesTiposData.java b/trunk/SIPRPSoft/src/siprp/data/outer/LembretesTiposData.java new file mode 100644 index 00000000..f8a030cf --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/LembretesTiposData.java @@ -0,0 +1,18 @@ +/* +* LembretesTiposData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class LembretesTiposData extends siprp.data.inner.LembretesTipos +{ + + public LembretesTiposData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/MarcacoesEmpresaData.java b/trunk/SIPRPSoft/src/siprp/data/outer/MarcacoesEmpresaData.java new file mode 100644 index 00000000..a7bc0550 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/MarcacoesEmpresaData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesEmpresaData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class MarcacoesEmpresaData extends siprp.data.inner.MarcacoesEmpresa +{ + + public MarcacoesEmpresaData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/MarcacoesEstabelecimentoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/MarcacoesEstabelecimentoData.java new file mode 100644 index 00000000..29f6e11b --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/MarcacoesEstabelecimentoData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesEstabelecimentoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class MarcacoesEstabelecimentoData extends siprp.data.inner.MarcacoesEstabelecimento +{ + + public MarcacoesEstabelecimentoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/MarcacoesGruposRealizadosData.java b/trunk/SIPRPSoft/src/siprp/data/outer/MarcacoesGruposRealizadosData.java new file mode 100644 index 00000000..81d764be --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/MarcacoesGruposRealizadosData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesGruposRealizadosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class MarcacoesGruposRealizadosData extends siprp.data.inner.MarcacoesGruposRealizados +{ + + public MarcacoesGruposRealizadosData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/MarcacoesTecnicosHstData.java b/trunk/SIPRPSoft/src/siprp/data/outer/MarcacoesTecnicosHstData.java new file mode 100644 index 00000000..4be4ae6f --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/MarcacoesTecnicosHstData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesTecnicosHstData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class MarcacoesTecnicosHstData extends siprp.data.inner.MarcacoesTecnicosHst +{ + + public MarcacoesTecnicosHstData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/MarcacoesTrabalhadorData.java b/trunk/SIPRPSoft/src/siprp/data/outer/MarcacoesTrabalhadorData.java new file mode 100644 index 00000000..1c486b49 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/MarcacoesTrabalhadorData.java @@ -0,0 +1,20 @@ +/* +* MarcacoesTrabalhadorData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + +import siprp.data.MarcacaoTrabalhadorConstants; + + +public final class MarcacoesTrabalhadorData extends siprp.data.inner.MarcacoesTrabalhador implements MarcacaoTrabalhadorConstants +{ + + public MarcacoesTrabalhadorData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/MarcacoesTrabalhadorEstadosData.java b/trunk/SIPRPSoft/src/siprp/data/outer/MarcacoesTrabalhadorEstadosData.java new file mode 100644 index 00000000..a03d4f87 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/MarcacoesTrabalhadorEstadosData.java @@ -0,0 +1,18 @@ +/* +* MarcacoesTrabalhadorEstadosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class MarcacoesTrabalhadorEstadosData extends siprp.data.inner.MarcacoesTrabalhadorEstados +{ + + public MarcacoesTrabalhadorEstadosData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/MedicosData.java b/trunk/SIPRPSoft/src/siprp/data/outer/MedicosData.java new file mode 100644 index 00000000..87552789 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/MedicosData.java @@ -0,0 +1,38 @@ +/* +* MedicosData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + +import com.evolute.entity.evo.EvoDataException; + + +public final class MedicosData extends siprp.data.inner.Medicos +{ + + public MedicosData() + { + super(); + } + + @Override + public void save() throws EvoDataException + { + if( getInactivo() == null ) + { + setInactivo( "n" ); + } + super.save(); + } + + @Override + public void delete() throws EvoDataException + { + setInactivo( "y" ); + save(); + } + +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/PrestadoresData.java b/trunk/SIPRPSoft/src/siprp/data/outer/PrestadoresData.java new file mode 100644 index 00000000..e2ce799a --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/PrestadoresData.java @@ -0,0 +1,18 @@ +/* +* PrestadoresData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class PrestadoresData extends siprp.data.inner.Prestadores +{ + + public PrestadoresData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/PrestadoresGruposProtocoloData.java b/trunk/SIPRPSoft/src/siprp/data/outer/PrestadoresGruposProtocoloData.java new file mode 100644 index 00000000..be21e6b7 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/PrestadoresGruposProtocoloData.java @@ -0,0 +1,18 @@ +/* +* PrestadoresGruposProtocoloData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class PrestadoresGruposProtocoloData extends siprp.data.inner.PrestadoresGruposProtocolo +{ + + public PrestadoresGruposProtocoloData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/PrtElementosProtocoloData.java b/trunk/SIPRPSoft/src/siprp/data/outer/PrtElementosProtocoloData.java new file mode 100644 index 00000000..81857f74 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/PrtElementosProtocoloData.java @@ -0,0 +1,18 @@ +/* +* PrtElementosProtocoloData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class PrtElementosProtocoloData extends siprp.data.inner.PrtElementosProtocolo +{ + + public PrtElementosProtocoloData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/PrtGruposProtocoloData.java b/trunk/SIPRPSoft/src/siprp/data/outer/PrtGruposProtocoloData.java new file mode 100644 index 00000000..e309476b --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/PrtGruposProtocoloData.java @@ -0,0 +1,18 @@ +/* +* PrtGruposProtocoloData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class PrtGruposProtocoloData extends siprp.data.inner.PrtGruposProtocolo +{ + + public PrtGruposProtocoloData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/PrtTiposElementosProtocoloData.java b/trunk/SIPRPSoft/src/siprp/data/outer/PrtTiposElementosProtocoloData.java new file mode 100644 index 00000000..268f152e --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/PrtTiposElementosProtocoloData.java @@ -0,0 +1,18 @@ +/* +* PrtTiposElementosProtocoloData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class PrtTiposElementosProtocoloData extends siprp.data.inner.PrtTiposElementosProtocolo +{ + + public PrtTiposElementosProtocoloData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/TiposExamesCompData.java b/trunk/SIPRPSoft/src/siprp/data/outer/TiposExamesCompData.java new file mode 100644 index 00000000..acfca78b --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/TiposExamesCompData.java @@ -0,0 +1,18 @@ +/* +* TiposExamesCompData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class TiposExamesCompData extends siprp.data.inner.TiposExamesComp +{ + + public TiposExamesCompData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresConsultasData.java b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresConsultasData.java new file mode 100644 index 00000000..fadf7835 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresConsultasData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresConsultasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class TrabalhadoresConsultasData extends siprp.data.inner.TrabalhadoresConsultas +{ + + public TrabalhadoresConsultasData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresConsultasDatasData.java b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresConsultasDatasData.java new file mode 100644 index 00000000..bfaf2bf9 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresConsultasDatasData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresConsultasDatasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class TrabalhadoresConsultasDatasData extends siprp.data.inner.TrabalhadoresConsultasDatas +{ + + public TrabalhadoresConsultasDatasData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresConsultasDatasEmailsData.java b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresConsultasDatasEmailsData.java new file mode 100644 index 00000000..c63a7049 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresConsultasDatasEmailsData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresConsultasDatasEmailsData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class TrabalhadoresConsultasDatasEmailsData extends siprp.data.inner.TrabalhadoresConsultasDatasEmails +{ + + public TrabalhadoresConsultasDatasEmailsData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresConsultasDatasObservacoesData.java b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresConsultasDatasObservacoesData.java new file mode 100644 index 00000000..3adb889f --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresConsultasDatasObservacoesData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresConsultasDatasObservacoesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class TrabalhadoresConsultasDatasObservacoesData extends siprp.data.inner.TrabalhadoresConsultasDatasObservacoes +{ + + public TrabalhadoresConsultasDatasObservacoesData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresData.java b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresData.java new file mode 100644 index 00000000..2df5810e --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresData.java @@ -0,0 +1,41 @@ +/* +* TrabalhadoresData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + +import java.sql.Timestamp; + +import com.evolute.entity.evo.EvoDataException; + + +public final class TrabalhadoresData extends siprp.data.inner.Trabalhadores +{ + + public TrabalhadoresData() + { + super(); + } + + @Override + public void save() throws EvoDataException + { + if( getInactivo() == null ) + { + setInactivo( "n" ); + } + setActualizacao( new Timestamp(System.currentTimeMillis() ) ); + super.save(); + } + + @Override + public void delete() throws EvoDataException + { + setInactivo( "y" ); + save(); + } + +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresEcdData.java b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresEcdData.java new file mode 100644 index 00000000..134903c0 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresEcdData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class TrabalhadoresEcdData extends siprp.data.inner.TrabalhadoresEcd +{ + + public TrabalhadoresEcdData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresEcdsAnaliseData.java b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresEcdsAnaliseData.java new file mode 100644 index 00000000..72a1955c --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresEcdsAnaliseData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdsAnaliseData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class TrabalhadoresEcdsAnaliseData extends siprp.data.inner.TrabalhadoresEcdsAnalise +{ + + public TrabalhadoresEcdsAnaliseData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresEcdsData.java b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresEcdsData.java new file mode 100644 index 00000000..dd1621e2 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresEcdsData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdsData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class TrabalhadoresEcdsData extends siprp.data.inner.TrabalhadoresEcds +{ + + public TrabalhadoresEcdsData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresEcdsDatasData.java b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresEcdsDatasData.java new file mode 100644 index 00000000..b187ef53 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresEcdsDatasData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdsDatasData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class TrabalhadoresEcdsDatasData extends siprp.data.inner.TrabalhadoresEcdsDatas +{ + + public TrabalhadoresEcdsDatasData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresEcdsDatasEmailsData.java b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresEcdsDatasEmailsData.java new file mode 100644 index 00000000..674576ed --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresEcdsDatasEmailsData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdsDatasEmailsData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class TrabalhadoresEcdsDatasEmailsData extends siprp.data.inner.TrabalhadoresEcdsDatasEmails +{ + + public TrabalhadoresEcdsDatasEmailsData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresEcdsDatasObservacoesData.java b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresEcdsDatasObservacoesData.java new file mode 100644 index 00000000..2956f769 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresEcdsDatasObservacoesData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresEcdsDatasObservacoesData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class TrabalhadoresEcdsDatasObservacoesData extends siprp.data.inner.TrabalhadoresEcdsDatasObservacoes +{ + + public TrabalhadoresEcdsDatasObservacoesData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresFichasAptidaoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresFichasAptidaoData.java new file mode 100644 index 00000000..a444a3a5 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresFichasAptidaoData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresFichasAptidaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class TrabalhadoresFichasAptidaoData extends siprp.data.inner.TrabalhadoresFichasAptidao +{ + + public TrabalhadoresFichasAptidaoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresProcessoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresProcessoData.java new file mode 100644 index 00000000..db5ba157 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/TrabalhadoresProcessoData.java @@ -0,0 +1,18 @@ +/* +* TrabalhadoresProcessoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class TrabalhadoresProcessoData extends siprp.data.inner.TrabalhadoresProcesso +{ + + public TrabalhadoresProcessoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/VersaoData.java b/trunk/SIPRPSoft/src/siprp/data/outer/VersaoData.java new file mode 100644 index 00000000..671f4446 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/VersaoData.java @@ -0,0 +1,18 @@ +/* +* VersaoData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class VersaoData extends siprp.data.inner.Versao +{ + + public VersaoData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/outer/VersionData.java b/trunk/SIPRPSoft/src/siprp/data/outer/VersionData.java new file mode 100644 index 00000000..1d700170 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/data/outer/VersionData.java @@ -0,0 +1,18 @@ +/* +* VersionData.java +* +* Generated by com.evutils.codegen.EntityObjectGenerator +* +* Edit at will +*/ +package siprp.data.outer; + + +public final class VersionData extends siprp.data.inner.Version +{ + + public VersionData() + { + super(); + } +} diff --git a/trunk/SIPRPSoft/src/siprp/data/package.jdo b/trunk/SIPRPSoft/src/siprp/data/package.jdo deleted file mode 100644 index f8600ea7..00000000 --- a/trunk/SIPRPSoft/src/siprp/data/package.jdo +++ /dev/null @@ -1,1152 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/trunk/SIPRPSoft/src/siprp/estatistica/EstatisticaDataProvider.java b/trunk/SIPRPSoft/src/siprp/estatistica/EstatisticaDataProvider.java index dcfbdd70..9dd4b3b8 100644 --- a/trunk/SIPRPSoft/src/siprp/estatistica/EstatisticaDataProvider.java +++ b/trunk/SIPRPSoft/src/siprp/estatistica/EstatisticaDataProvider.java @@ -10,7 +10,7 @@ import java.text.DateFormat; import java.util.Date; import siprp.data.Marcacao; -import siprp.data.MarcacaoTrabalhadorData; +import siprp.data.outer.MarcacoesTrabalhadorData; import com.evolute.utils.Singleton; import com.evolute.utils.arrays.Virtual2DArray; @@ -58,10 +58,10 @@ public class EstatisticaDataProvider extends MetaProvider String [][]result = null; Select select = new Select( new String[]{ "marcacoes_trabalhador" }, - new String[]{ MarcacaoTrabalhadorData.DATA, + new String[]{ MarcacoesTrabalhadorData.DATA, "trabalhador_id", - MarcacaoTrabalhadorData.REALIZADA, - MarcacaoTrabalhadorData.TIPO }, + MarcacoesTrabalhadorData.REALIZADA, + MarcacoesTrabalhadorData.TIPO }, new Field( "data" ).isGreaterOrEqual( dataInicio ).and( new Field( "data" ).isLessOrEqual( dataFim ) ), new String[]{ "data" }, null ); @@ -184,10 +184,10 @@ public class EstatisticaDataProvider extends MetaProvider String [][]result = null; Select select = new Select( new String[]{ "marcacoes_trabalhador", "trabalhadores" }, - new String[]{ MarcacaoTrabalhadorData.DATA, + new String[]{ MarcacoesTrabalhadorData.DATA, "trabalhador_id", - MarcacaoTrabalhadorData.REALIZADA, - MarcacaoTrabalhadorData.TIPO }, + MarcacoesTrabalhadorData.REALIZADA, + MarcacoesTrabalhadorData.TIPO }, new Field( "marcacoes_trabalhador.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ).and( new Field( "trabalhadores.estabelecimento_id" ).isEqual( estabelecimentoID ) ).and( new Field( "data" ).isGreaterOrEqual( dataInicio ) ).and( diff --git a/trunk/SIPRPSoft/src/siprp/estatistica/EstatisticaWindow.java b/trunk/SIPRPSoft/src/siprp/estatistica/EstatisticaWindow.java index 20cbd873..165c4d41 100644 --- a/trunk/SIPRPSoft/src/siprp/estatistica/EstatisticaWindow.java +++ b/trunk/SIPRPSoft/src/siprp/estatistica/EstatisticaWindow.java @@ -36,15 +36,15 @@ import javax.swing.JTextField; import javax.swing.ListSelectionModel; import javax.swing.event.ListSelectionListener; -import siprp.data.EmpresaData; -import siprp.data.EstabelecimentoData; +import siprp.data.outer.EmpresasData; +import siprp.data.outer.EstabelecimentosData; import siprp.pesquisas.PesquisasProvider; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; import com.evolute.utils.data.IDObject; import com.evolute.utils.data.MappableObject; import com.evolute.utils.documents.YearDocument; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.tables.BaseTable; import com.evolute.utils.tables.VectorTableModel; import com.evolute.utils.tracker.TrackableWindow; @@ -111,7 +111,7 @@ public class EstatisticaWindow extends JFrame // { true, false, false, false }, { false, false, false, false } }; - private JDOProvider JDO; + private ProviderInterface JDO; private EstatisticaDataProvider provider; private PesquisasProvider pesquisasProvider; @@ -133,7 +133,7 @@ public class EstatisticaWindow extends JFrame { provider = (EstatisticaDataProvider)EstatisticaDataProvider.getProvider(); pesquisasProvider = (PesquisasProvider)PesquisasProvider.getProvider(); - JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + JDO = ( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); setupComponents(); } @@ -569,8 +569,8 @@ public class EstatisticaWindow extends JFrame } StringBuffer buffer = new StringBuffer(); Integer idEmpresa = ( (IDObject)empresasModel.getRowAt( sEmpresa ) ).getID(); - EmpresaData empresa = (EmpresaData)JDO.load( EmpresaData.class, idEmpresa ); - String designacao = (String)empresa.get( EmpresaData.DESIGNACAO_SOCIAL ); + EmpresasData empresa = (EmpresasData)JDO.load( EmpresasData.class, idEmpresa ); + String designacao = (String)empresa.get( EmpresasData.DESIGNACAO_SOCIAL ); IDObject estabelecimentos[]; if( sEstabelecimento == -1 || ( ( IDObject )estabelecimentosModel.getRowAt( sEstabelecimento ) ).getID().equals( new Integer( -1 ) ) ) { @@ -636,8 +636,8 @@ public class EstatisticaWindow extends JFrame buffer.append( "" ); for( int e = 0; e < estabelecimentos.length; e++ ) { - EstabelecimentoData estabelecimento = (EstabelecimentoData)JDO.load( EstabelecimentoData.class, estabelecimentos[ e ].getID() ); - String nome = (String)estabelecimento.get( EstabelecimentoData.NOME ); + EstabelecimentosData estabelecimento = (EstabelecimentosData)JDO.load( EstabelecimentosData.class, estabelecimentos[ e ].getID() ); + String nome = (String)estabelecimento.get( EstabelecimentosData.NOME ); int exames = provider.countExamesPeriodoForEstabelecimento( inicio, fim, estabelecimentos[ e ].getID() ); int consultas = provider.countConsultasPeriodoForEstabelecimento( inicio, fim, estabelecimentos[ e ].getID() ); int total = exames + consultas; @@ -837,8 +837,8 @@ public class EstatisticaWindow extends JFrame } StringBuffer buffer = new StringBuffer(); Integer idEmpresa = ( (IDObject)empresasModel.getRowAt( sEmpresa ) ).getID(); - EmpresaData empresa = (EmpresaData)JDO.load( EmpresaData.class, idEmpresa ); - String designacao = (String)empresa.get( EmpresaData.DESIGNACAO_SOCIAL ); + EmpresasData empresa = (EmpresasData)JDO.load( EmpresasData.class, idEmpresa ); + String designacao = (String)empresa.get( EmpresasData.DESIGNACAO_SOCIAL ); IDObject estabelecimentos[]; if( sEstabelecimento == -1 || ( ( IDObject )estabelecimentosModel.getRowAt( sEstabelecimento ) ).getID().equals( new Integer( -1 ) ) ) { @@ -875,8 +875,8 @@ public class EstatisticaWindow extends JFrame buffer.append( "" ); for( int e = 0; e < estabelecimentos.length; e++ ) { - EstabelecimentoData estabelecimento = (EstabelecimentoData)JDO.load( EstabelecimentoData.class, estabelecimentos[ e ].getID() ); - String nome = (String)estabelecimento.get( EstabelecimentoData.NOME ); + EstabelecimentosData estabelecimento = (EstabelecimentosData)JDO.load( EstabelecimentosData.class, estabelecimentos[ e ].getID() ); + String nome = (String)estabelecimento.get( EstabelecimentosData.NOME ); int countEstabelecimento = provider.countTrabalhadoresSemExamesOuConsultasEstabelecimento( estabelecimentos[ e ].getID(), inicio, fim, exames ); buffer.append( "



" ); buffer.append( "" ); @@ -1041,8 +1041,8 @@ public class EstatisticaWindow extends JFrame } StringBuffer buffer = new StringBuffer(); Integer idEmpresa = ( (IDObject)empresasModel.getRowAt( sEmpresa ) ).getID(); - EmpresaData empresa = (EmpresaData)JDO.load( EmpresaData.class, idEmpresa ); - String designacao = (String)empresa.get( EmpresaData.DESIGNACAO_SOCIAL ); + EmpresasData empresa = (EmpresasData)JDO.load( EmpresasData.class, idEmpresa ); + String designacao = (String)empresa.get( EmpresasData.DESIGNACAO_SOCIAL ); IDObject estabelecimentos[]; if( sEstabelecimento == -1 || ( ( IDObject )estabelecimentosModel.getRowAt( sEstabelecimento ) ).getID().equals( new Integer( -1 ) ) ) { @@ -1090,8 +1090,8 @@ public class EstatisticaWindow extends JFrame buffer.append( "
" ); for( int e = 0; e < estabelecimentos.length; e++ ) { - EstabelecimentoData estabelecimento = (EstabelecimentoData)JDO.load( EstabelecimentoData.class, estabelecimentos[ e ].getID() ); - String nome = (String)estabelecimento.get( EstabelecimentoData.NOME ); + EstabelecimentosData estabelecimento = (EstabelecimentosData)JDO.load( EstabelecimentosData.class, estabelecimentos[ e ].getID() ); + String nome = (String)estabelecimento.get( EstabelecimentosData.NOME ); int countEstabelecimento = provider.countTrabalhadoresComExamesOuConsultasPeriodoForEstabelecimento( inicio, fim, estabelecimentos[ e ].getID(), exames ); buffer.append( "



" ); buffer.append( "" ); diff --git a/trunk/SIPRPSoft/src/siprp/ficha/EmpresaPanel.java b/trunk/SIPRPSoft/src/siprp/ficha/EmpresaPanel.java index ab55ba67..f53da816 100644 --- a/trunk/SIPRPSoft/src/siprp/ficha/EmpresaPanel.java +++ b/trunk/SIPRPSoft/src/siprp/ficha/EmpresaPanel.java @@ -11,7 +11,7 @@ import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.util.Hashtable; +import java.util.Map; import javax.swing.BorderFactory; import javax.swing.JButton; @@ -21,16 +21,16 @@ import javax.swing.JTextField; import siprp.FichaDataProvider; import siprp.SingletonConstants; -import siprp.data.EmpresaData; -import siprp.data.EstabelecimentoData; +import siprp.data.outer.EmpresasData; +import siprp.data.outer.EstabelecimentosData; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; import com.evolute.utils.data.IDObject; import com.evolute.utils.data.MappableObject; import com.evolute.utils.dataui.ComponentController; import com.evolute.utils.dataui.ComponentsHashtable; import com.evolute.utils.dataui.ControllableComponent; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.ui.DialogException; import com.evolute.utils.ui.panel.RadioButtonFixedPanel; import com.evolute.utils.ui.panel.RadioButtonPanel; @@ -43,7 +43,7 @@ import com.evolute.utils.ui.text.CopyPasteHandler; public class EmpresaPanel extends JPanel implements ControllableComponent { - private JDOProvider JDO; + private ProviderInterface JDO; private JTextField designacaoSocialText; private JTextField estabelecimentoText; private JTextField localidadeText; @@ -58,8 +58,8 @@ public class EmpresaPanel extends JPanel private ComponentsHashtable empresaComponents; private ComponentsHashtable estabelecimentoComponents; - private EstabelecimentoData estabelecimento; - private EmpresaData empresa; + private EstabelecimentosData estabelecimento; + private EmpresasData empresa; /** Creates a new instance of EmpresaPanel */ @@ -67,7 +67,7 @@ public class EmpresaPanel extends JPanel throws Exception { provider = (FichaDataProvider)FichaDataProvider.getProvider(); - JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + JDO = ( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); setupComponents(); setupComponentsHashtable(); } @@ -246,56 +246,56 @@ public class EmpresaPanel extends JPanel private void setupComponentsHashtable() { empresaComponents = new ComponentsHashtable(); - empresaComponents.putComponent( EmpresaData.DESIGNACAO_SOCIAL, designacaoSocialText ); - empresaComponents.putComponent( EmpresaData.SERVICO_SAUDE_TIPO, servicoSaudeTipoPanel ); - empresaComponents.putComponent( EmpresaData.SERVICO_SAUDE_DESIGNACAO, designacaoServicoSaudeText ); - empresaComponents.putComponent( EmpresaData.SERVICO_HIGIENE_TIPO, servicoHigieneTipoPanel ); - empresaComponents.putComponent( EmpresaData.SERVICO_HIGIENE_DESIGNACAO, designacaoText ); + empresaComponents.putComponent( EmpresasData.DESIGNACAO_SOCIAL, designacaoSocialText ); + empresaComponents.putComponent( EmpresasData.SERVICO_SAUDE_TIPO, servicoSaudeTipoPanel ); + empresaComponents.putComponent( EmpresasData.SERVICO_SAUDE_DESIGNACAO, designacaoServicoSaudeText ); + empresaComponents.putComponent( EmpresasData.SERVICO_HIGIENE_TIPO, servicoHigieneTipoPanel ); + empresaComponents.putComponent( EmpresasData.SERVICO_HIGIENE_DESIGNACAO, designacaoText ); - empresaComponents.putDummy( EmpresaData.MORADA ); - empresaComponents.putDummy( EmpresaData.CODIGO_POSTAL ); - empresaComponents.putDummy( EmpresaData.LOCALIDADE ); - empresaComponents.putDummy( EmpresaData.DISTRITO ); - empresaComponents.putDummy( EmpresaData.CONCELHO ); - empresaComponents.putDummy( EmpresaData.DATA_PROPOSTA ); - empresaComponents.putDummy( EmpresaData.DATA_ACEITACAO ); - empresaComponents.putDummy( EmpresaData.PERFIL_1 ); - empresaComponents.putDummy( EmpresaData.PERFIL_2 ); - empresaComponents.putDummy( EmpresaData.DATA_ENVIO_CONTRATO ); - empresaComponents.putDummy( EmpresaData.DATA_RECEPCAO_CONTRATO ); - empresaComponents.putDummy( EmpresaData.DATA_ENVIO_IDICT ); - empresaComponents.putDummy( EmpresaData.DATA_RELATORIO_ANUAL ); - empresaComponents.putDummy( EmpresaData.CODIGO_1 ); - empresaComponents.putDummy( EmpresaData.CODIGO_2 ); - empresaComponents.putDummy( EmpresaData.CODIGO_3 ); - empresaComponents.putDummy( EmpresaData.CAE ); - empresaComponents.putDummy( EmpresaData.ACTIVIDADE ); - empresaComponents.putDummy( EmpresaData.CONTRIBUINTE ); - empresaComponents.putDummy( EmpresaData.SEGURANCA_SOCIAL ); - empresaComponents.putDummy( EmpresaData.CONTACTO_1 ); - empresaComponents.putDummy( EmpresaData.CONTACTO_2 ); - empresaComponents.putDummy( EmpresaData.SERVICOS ); - empresaComponents.putDummy( EmpresaData.PRECO_HIGIENE ); - empresaComponents.putDummy( EmpresaData.PRECO_MEDICINA ); - empresaComponents.putDummy( EmpresaData.PERIODICIDADE ); - empresaComponents.putDummy( EmpresaData.DESIGNACAO_SOCIAL_PLAIN ); - empresaComponents.putDummy( EmpresaData.DATA_CANCELAMENTO ); - empresaComponents.putDummy( EmpresaData.A_CONSULTAS ); - empresaComponents.putDummy( EmpresaData.A_EXAMES ); - empresaComponents.putDummy( EmpresaData.B_CONSULTAS ); - empresaComponents.putDummy( EmpresaData.B_EXAMES ); - empresaComponents.putDummy( EmpresaData.INICIO_CONTRATO ); - empresaComponents.putDummy( EmpresaData.DURACAO ); + empresaComponents.putDummy( EmpresasData.MORADA ); + empresaComponents.putDummy( EmpresasData.CODIGO_POSTAL ); + empresaComponents.putDummy( EmpresasData.LOCALIDADE ); + empresaComponents.putDummy( EmpresasData.DISTRITO ); + empresaComponents.putDummy( EmpresasData.CONCELHO ); + empresaComponents.putDummy( EmpresasData.DATA_PROPOSTA ); + empresaComponents.putDummy( EmpresasData.DATA_ACEITACAO ); + empresaComponents.putDummy( EmpresasData.PERFIL_1 ); + empresaComponents.putDummy( EmpresasData.PERFIL_2 ); + empresaComponents.putDummy( EmpresasData.DATA_ENVIO_CONTRATO ); + empresaComponents.putDummy( EmpresasData.DATA_RECEPCAO_CONTRATO ); + empresaComponents.putDummy( EmpresasData.DATA_ENVIO_IDICT ); + empresaComponents.putDummy( EmpresasData.DATA_RELATORIO_ANUAL ); + empresaComponents.putDummy( EmpresasData.CODIGO_1 ); + empresaComponents.putDummy( EmpresasData.CODIGO_2 ); + empresaComponents.putDummy( EmpresasData.CODIGO_3 ); + empresaComponents.putDummy( EmpresasData.CAE ); + empresaComponents.putDummy( EmpresasData.ACTIVIDADE ); + empresaComponents.putDummy( EmpresasData.CONTRIBUINTE ); + empresaComponents.putDummy( EmpresasData.SEGURANCA_SOCIAL ); + empresaComponents.putDummy( EmpresasData.CONTACTO_1 ); + empresaComponents.putDummy( EmpresasData.CONTACTO_2 ); + empresaComponents.putDummy( EmpresasData.SERVICOS ); + empresaComponents.putDummy( EmpresasData.PRECO_HIGIENE ); + empresaComponents.putDummy( EmpresasData.PRECO_MEDICINA ); + empresaComponents.putDummy( EmpresasData.PERIODICIDADE ); + empresaComponents.putDummy( EmpresasData.DESIGNACAO_SOCIAL_PLAIN ); + empresaComponents.putDummy( EmpresasData.DATA_CANCELAMENTO ); + empresaComponents.putDummy( EmpresasData.A_CONSULTAS ); + empresaComponents.putDummy( EmpresasData.A_EXAMES ); + empresaComponents.putDummy( EmpresasData.B_CONSULTAS ); + empresaComponents.putDummy( EmpresasData.B_EXAMES ); + empresaComponents.putDummy( EmpresasData.INICIO_CONTRATO ); + empresaComponents.putDummy( EmpresasData.DURACAO ); estabelecimentoComponents = new ComponentsHashtable(); - estabelecimentoComponents.putComponent( EstabelecimentoData.NOME, estabelecimentoText ); - estabelecimentoComponents.putComponent( EstabelecimentoData.LOCALIDADE, localidadeText ); - estabelecimentoComponents.putDummy( EstabelecimentoData.MORADA ); - estabelecimentoComponents.putDummy( EstabelecimentoData.CODIGO_POSTAL ); - estabelecimentoComponents.putDummy( EstabelecimentoData.CONTACTO ); - estabelecimentoComponents.putDummy( EstabelecimentoData.HISTORICO ); - estabelecimentoComponents.putDummy( EstabelecimentoData.EMPRESA ); - estabelecimentoComponents.putDummy( EstabelecimentoData.NOME_PLAIN ); + estabelecimentoComponents.putComponent( EstabelecimentosData.NOME, estabelecimentoText ); + estabelecimentoComponents.putComponent( EstabelecimentosData.LOCALIDADE, localidadeText ); + estabelecimentoComponents.putDummy( EstabelecimentosData.MORADA ); + estabelecimentoComponents.putDummy( EstabelecimentosData.CODIGO_POSTAL ); + estabelecimentoComponents.putDummy( EstabelecimentosData.CONTACTO_ID ); + estabelecimentoComponents.putDummy( EstabelecimentosData.HISTORICO ); + estabelecimentoComponents.putDummy( EstabelecimentosData.EMPRESA_ID ); + estabelecimentoComponents.putDummy( EstabelecimentosData.NOME_PLAIN ); // components.putComponent( FichaDataProvider.T_EMPRESAS + "." + FichaDataProvider.DESIGNACAO_SOCIAL, designacaoSocialText ); // components.put( FichaDataProvider.T_EMPRESAS + "." + FichaDataProvider.SERVICO_SAUDE_TIPO, servicoSaudeTipoPanel ); @@ -324,13 +324,13 @@ public class EmpresaPanel extends JPanel { try { - empresa = (EmpresaData)JDO.load( EmpresaData.class, empresaID ); + empresa = (EmpresasData)JDO.load( EmpresasData.class, empresaID ); String names[] = (String[])empresaComponents.keySet().toArray( new String[0] ); ComponentController.fill( names, empresa.getHashData(), empresaComponents ); if( estabelecimentoID != null ) { - estabelecimento = (EstabelecimentoData)JDO.load( EstabelecimentoData.class, estabelecimentoID ); + estabelecimento = (EstabelecimentosData)JDO.load( EstabelecimentosData.class, estabelecimentoID ); names = (String[])estabelecimentoComponents.keySet().toArray( new String[0] ); //estabelecimento.getFieldNames(); ComponentController.fill( names, estabelecimento.getHashData(), estabelecimentoComponents ); } @@ -386,12 +386,12 @@ public class EmpresaPanel extends JPanel if( estabelecimento == null ) { // estabelecimento = provider.createObject( provider.ESTABELECIMENTOS ); - estabelecimento = new EstabelecimentoData(); + estabelecimento = new EstabelecimentosData(); } if( empresa == null ) { // empresa = provider.createObject( provider.EMPRESAS ); - empresa = new EmpresaData(); + empresa = new EmpresasData(); } // DBField fields[] = provider.EMPRESAS.getInsertFields(); // String empresaFields[] = new String[ fields.length ]; @@ -423,10 +423,10 @@ public class EmpresaPanel extends JPanel // } String names[] = (String[])empresaComponents.keySet().toArray( new String[0] ); -// String names[] = new String[]{ EmpresaData.DESIGNACAO_SOCIAL, EmpresaData.SERVICO_SAUDE_TIPO, -// EmpresaData.SERVICO_SAUDE_DESIGNACAO, EmpresaData.SERVICO_HIGIENE_TIPO, -// EmpresaData.SERVICO_HIGIENE_DESIGNACAO }; - Hashtable hash = empresa.getHashData(); +// String names[] = new String[]{ EmpresasData.DESIGNACAO_SOCIAL, EmpresasData.SERVICO_SAUDE_TIPO, +// EmpresasData.SERVICO_SAUDE_DESIGNACAO, EmpresasData.SERVICO_HIGIENE_TIPO, +// EmpresasData.SERVICO_HIGIENE_DESIGNACAO }; + Map hash = empresa.getHashData(); ComponentController.save( names, hash, empresaComponents ); empresa.setHashData( hash ); @@ -435,36 +435,36 @@ public class EmpresaPanel extends JPanel hash = estabelecimento.getHashData(); ComponentController.save( names, hash, estabelecimentoComponents ); estabelecimento.setHashData( hash ); - estabelecimento.set( EstabelecimentoData.EMPRESA, empresa ); + estabelecimento.setToEmpresa_id( empresa ); // estabelecimento.setProperty( provider.R_ESTABELECIMENTO_EMPRESA, empresa ); // if( ((String)empresa.getProperty( provider.DESIGNACAO_SOCIAL )).trim().length() == 0 ) - if( ((String)empresa.get( EmpresaData.DESIGNACAO_SOCIAL )).trim().length() == 0 ) + if( ((String)empresa.get( EmpresasData.DESIGNACAO_SOCIAL )).trim().length() == 0 ) { msg.append( "A empresa tem de ter uma design\u00e7\u00e3o social\n" ); hasMsg = true; } else { - empresa.set( EmpresaData.DESIGNACAO_SOCIAL_PLAIN, + empresa.set( EmpresasData.DESIGNACAO_SOCIAL_PLAIN, com.evolute.utils.strings.StringPlainer.convertString( ( String ) - empresa.get( EmpresaData.DESIGNACAO_SOCIAL ) ) ); + empresa.get( EmpresasData.DESIGNACAO_SOCIAL ) ) ); } // if( empresa.getProperty( provider.SERVICO_SAUDE_TIPO ) == null ) - if( empresa.get( EmpresaData.SERVICO_SAUDE_TIPO ) == null ) + if( empresa.get( EmpresasData.SERVICO_SAUDE_TIPO ) == null ) { msg.append( "A empresa tem de ter um tipo de seri\00e7o de sa\u00fade\n" ); hasMsg = true; } // if( empresa.getProperty( provider.SERVICO_HIGIENE_TIPO ) == null ) - if( empresa.get( EmpresaData.SERVICO_HIGIENE_TIPO ) == null ) + if( empresa.get( EmpresasData.SERVICO_HIGIENE_TIPO ) == null ) { msg.append( "A empresa tem de ter um tipo de seri\00e7o de higiene\n" ); hasMsg = true; } // if( ((String)estabelecimento.getProperty( provider.NOME )).trim().length() == 0 ) - if( ((String)estabelecimento.get( EstabelecimentoData.NOME )).trim().length() == 0 ) + if( ((String)estabelecimento.get( EstabelecimentosData.NOME )).trim().length() == 0 ) { msg.append( "O estabelecimento tem de ter nome\n" ); hasMsg = true; diff --git a/trunk/SIPRPSoft/src/siprp/ficha/ExamePanel.java b/trunk/SIPRPSoft/src/siprp/ficha/ExamePanel.java index 0886ee8c..9ada0a17 100644 --- a/trunk/SIPRPSoft/src/siprp/ficha/ExamePanel.java +++ b/trunk/SIPRPSoft/src/siprp/ficha/ExamePanel.java @@ -30,11 +30,11 @@ import javax.swing.event.ListSelectionListener; import siprp.FichaDataProvider; import siprp.MedicinaConstants; import siprp.SingletonConstants; -import siprp.data.DisableDeleteHandler; -import siprp.data.ExameData; import siprp.data.Marcacao; -import siprp.data.MarcacaoTrabalhadorData; +import siprp.data.outer.ExamesData; +import siprp.data.outer.MarcacoesTrabalhadorData; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; import com.evolute.utils.data.IDObject; import com.evolute.utils.data.MappableObject; @@ -42,7 +42,6 @@ import com.evolute.utils.dataui.ComponentController; import com.evolute.utils.dataui.ComponentsHashtable; import com.evolute.utils.dataui.ControllableComponent; import com.evolute.utils.documents.MaximumLengthDocument; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.ui.button.BetterButtonGroup; import com.evolute.utils.ui.calendar.JCalendarPanel; import com.evolute.utils.ui.panel.RadioButtonFixedPanel; @@ -54,12 +53,8 @@ import com.evolute.utils.ui.text.CopyPasteHandler; public class ExamePanel extends JPanel implements ChangeListener, ControllableComponent, ListSelectionListener { - static - { - ExameData.registerOperationHandlerForClass( DisableDeleteHandler.INSTANCE, ExameData.class ); - } - private JDOProvider JDO; + private ProviderInterface JDO; private JCalendarPanel dataExamePanel; private BetterButtonGroup tipoGroup; @@ -79,14 +74,14 @@ public class ExamePanel extends JPanel private ComponentsHashtable components; private Integer trabalhadorID; - private MarcacaoTrabalhadorData marcacao; + private MarcacoesTrabalhadorData marcacao; /** Creates a new instance of ExamePanel */ public ExamePanel() throws Exception { provider = (FichaDataProvider)FichaDataProvider.getProvider(); - JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + JDO = ( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); setupComponents(); setupComponentsHashtable(); } @@ -293,22 +288,22 @@ public class ExamePanel extends JPanel private void setupComponentsHashtable() { components = new ComponentsHashtable(); - components.putDummy( ExameData.TIPO ); - components.putComponent( ExameData.DATA, dataExamePanel ); - components.putComponent( ExameData.OCASIONAL, ocasionalPanel ); - components.putComponent( ExameData.OUTRO_TIPO, especificarText ); - components.putComponent( ExameData.PROXIMO_EXAME, proximoExamePanel ); - components.putComponent( ExameData.RESULTADO, resultadoPanel ); - components.putComponent( ExameData.OUTRA_FUNCAO_1, outrasFuncoesTexts[ 0 ] ); - components.putComponent( ExameData.OUTRA_FUNCAO_2, outrasFuncoesTexts[ 1 ] ); - components.putComponent( ExameData.OUTRA_FUNCAO_3, outrasFuncoesTexts[ 2 ] ); - components.putComponent( ExameData.OUTRA_FUNCAO_4, outrasFuncoesTexts[ 3 ] ); - components.putComponent( ExameData.OUTRAS_RECOMENDACOES, recomendacoesText ); - components.putDummy( ExameData.INACTIVO ); - components.putDummy( ExameData.TRABALHADOR ); - components.putDummy( ExameData.MEDICO ); - components.putDummy( ExameData.PDF ); - components.putDummy( ExameData.FO ); + components.putDummy( ExamesData.TIPO ); + components.putComponent( ExamesData.DATA, dataExamePanel ); + components.putComponent( ExamesData.OCASIONAL, ocasionalPanel ); + components.putComponent( ExamesData.OUTRO_TIPO, especificarText ); + components.putComponent( ExamesData.PROXIMO_EXAME, proximoExamePanel ); + components.putComponent( ExamesData.RESULTADO, resultadoPanel ); + components.putComponent( ExamesData.OUTRA_FUNCAO_1, outrasFuncoesTexts[ 0 ] ); + components.putComponent( ExamesData.OUTRA_FUNCAO_2, outrasFuncoesTexts[ 1 ] ); + components.putComponent( ExamesData.OUTRA_FUNCAO_3, outrasFuncoesTexts[ 2 ] ); + components.putComponent( ExamesData.OUTRA_FUNCAO_4, outrasFuncoesTexts[ 3 ] ); + components.putComponent( ExamesData.OUTRAS_RECOMENDACOES, recomendacoesText ); + components.putDummy( ExamesData.INACTIVO ); + components.putDummy( ExamesData.TRABALHADOR_ID ); + components.putDummy( ExamesData.MEDICO_ID ); + components.putDummy( ExamesData.PDF ); + components.putDummy( ExamesData.FO ); } public void stateChanged( ChangeEvent e ) @@ -338,7 +333,7 @@ public class ExamePanel extends JPanel if( marcacaoID != null ) { - marcacao = ( MarcacaoTrabalhadorData ) JDO.load( MarcacaoTrabalhadorData.class, marcacaoID ); + marcacao = ( MarcacoesTrabalhadorData ) JDO.load( MarcacoesTrabalhadorData.class, marcacaoID ); proximoExamePanel.setDate( (Date) marcacao.get( Marcacao.DATA ) ); } Object dadosMarcacao[] = provider.getDadosUltimaMarcacao( trabalhadorID ); @@ -390,7 +385,7 @@ public class ExamePanel extends JPanel StringBuffer msg = new StringBuffer(); boolean hasMsg = false; boolean hasData = false; - ExameData exame; + ExamesData exame; Date dataExame = dataExamePanel.getDate(); if( dataExame == null ) { @@ -431,7 +426,7 @@ public class ExamePanel extends JPanel recomendacoesText.setText( recomendacoes.trim() ); // exame = provider.createObject( FichaDataProvider.EXAMES ); - exame = new ExameData(); + exame = new ExamesData(); // DBField fields[] = FichaDataProvider.EXAMES.getInsertFields(); // String exameFields[] = new String[ fields.length ]; // for( int i = 0; i < exameFields.length; ++i ) @@ -470,13 +465,13 @@ public class ExamePanel extends JPanel // tipo = 4; // } // exame.setProperty( FichaDataProvider.TIPO, new Integer( tipo ) ); - exame.set( ExameData.TIPO, new Integer( tipo ) ); + exame.set( ExamesData.TIPO, new Integer( tipo ) ); if( tipo != 3 ) { // exame.setProperty( FichaDataProvider.EXAMES.getFieldByName( FichaDataProvider.OCASIONAL ).FULL_NAME, null ); - exame.set( ExameData.OCASIONAL, null ); + exame.set( ExamesData.OCASIONAL, null ); // exame.setProperty( FichaDataProvider.EXAMES.getFieldByName( FichaDataProvider.OUTRO_TIPO ).FULL_NAME, "" ); - exame.set( ExameData.OUTRO_TIPO, "" ); + exame.set( ExamesData.OUTRO_TIPO, "" ); } else { @@ -484,7 +479,7 @@ public class ExamePanel extends JPanel if( ocasionalID == null || ocasionalID.intValue() != 10 ) { // exame.setProperty( FichaDataProvider.EXAMES.getFieldByName( FichaDataProvider.OUTRO_TIPO ).FULL_NAME, "" ); - exame.set( ExameData.OUTRO_TIPO, "" ); + exame.set( ExamesData.OUTRO_TIPO, "" ); } } } diff --git a/trunk/SIPRPSoft/src/siprp/ficha/FichaWindow.java b/trunk/SIPRPSoft/src/siprp/ficha/FichaWindow.java index d25bba32..01c08084 100644 --- a/trunk/SIPRPSoft/src/siprp/ficha/FichaWindow.java +++ b/trunk/SIPRPSoft/src/siprp/ficha/FichaWindow.java @@ -31,19 +31,19 @@ import org.jdom.Element; import org.jdom.output.XMLOutputter; import siprp.FichaDataProvider; -import siprp.data.EmpresaData; -import siprp.data.EstabelecimentoData; -import siprp.data.ExameData; -import siprp.data.MedicoData; -import siprp.data.TrabalhadorData; +import siprp.data.outer.EmpresasData; +import siprp.data.outer.EstabelecimentosData; +import siprp.data.outer.ExamesData; +import siprp.data.outer.MedicosData; +import siprp.data.outer.TrabalhadoresData; import siprp.importer.Importer; import siprp.lembretes.LembretesDataProvider; import siprp.medicina.MarcacoesMedicinaHandler; import siprp.printer.Printer; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; import com.evolute.utils.data.IDObject; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.strings.StringPlainer; import com.evolute.utils.ui.DialogException; import com.evolute.utils.ui.dialog.ListAction; @@ -60,7 +60,7 @@ import com.evolute.utils.ui.window.TabbedWindow; public class FichaWindow extends TabbedWindow implements ListAction, FichaAptidaoConstants { - private JDOProvider JDO; + private ProviderInterface JDO; private UpperPanel upperPanel; private EmpresaPanel empresaPanel; @@ -97,7 +97,7 @@ public class FichaWindow extends TabbedWindow upperPanel = (UpperPanel) getUpperPanel(); upperPanel.owner = this; fdpProvider = ( FichaDataProvider ) FichaDataProvider.getProvider(); - JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + JDO = ( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); marcacoesHandler = new MarcacoesMedicinaHandler(); lembretesProvider = LembretesDataProvider.getProvider(); setupComponents(); @@ -269,40 +269,40 @@ public class FichaWindow extends TabbedWindow } }); StringBuilder msg = new StringBuilder(); - MedicoData medico; + MedicosData medico; try { - medico = (MedicoData)upperPanel.save(); + medico = (MedicosData)upperPanel.save(); } catch( ValuesException vex ) { msg.append( vex.getMessage() ); medico = null; } - EstabelecimentoData estabelecimento; + EstabelecimentosData estabelecimento; try { - estabelecimento = (EstabelecimentoData)empresaPanel.save(); + estabelecimento = (EstabelecimentosData)empresaPanel.save(); } catch( ValuesException vex ) { msg.append( vex.getMessage() ); estabelecimento = null; } - TrabalhadorData trabalhador; + TrabalhadoresData trabalhador; try { - trabalhador = (TrabalhadorData)trabalhadorPanel.save(); + trabalhador = (TrabalhadoresData)trabalhadorPanel.save(); } catch( ValuesException vex ) { msg.append( vex.getMessage() ); trabalhador = null; } - ExameData exame; + ExamesData exame; try { - exame = (ExameData)examePanel.save(); + exame = (ExamesData)examePanel.save(); } catch( ValuesException vex ) { @@ -317,23 +317,23 @@ public class FichaWindow extends TabbedWindow String observacoes = ( String ) observacoesPanel.save(); - estabelecimento.set( EstabelecimentoData.NOME_PLAIN, + estabelecimento.set( EstabelecimentosData.NOME_PLAIN, com.evolute.utils.strings.StringPlainer.convertString( ( String ) - estabelecimento.get( EstabelecimentoData.NOME ) ) ); + estabelecimento.get( EstabelecimentosData.NOME ) ) ); // trabalhador.setProperty( FichaDataProvider.R_TRABALHADOR_ESTABELECIMENTO, estabelecimento ); // trabalhador.setProperty( FichaDataProvider.OBSERVACOES, observacoesPanel.save() ); - trabalhador.set( TrabalhadorData.ESTABELECIMENTO, estabelecimento ); - trabalhador.set( TrabalhadorData.OBSERVACOES, observacoes ); - trabalhador.set( TrabalhadorData.NOME_PLAIN, + trabalhador.set( TrabalhadoresData.TO_ESTABELECIMENTO_ID, estabelecimento ); + trabalhador.set( TrabalhadoresData.OBSERVACOES, observacoes ); + trabalhador.set( TrabalhadoresData.NOME_PLAIN, com.evolute.utils.strings.StringPlainer.convertString( ( String ) - trabalhador.get( TrabalhadorData.NOME ) ) ); + trabalhador.get( TrabalhadoresData.NOME ) ) ); // exame.setProperty( FichaDataProvider.R_EXAME_MEDICO, medico ); // exame.setProperty( FichaDataProvider.R_EXAME_TRABALHADOR, trabalhador ); - exame.set( ExameData.MEDICO, medico ); - exame.set( ExameData.TRABALHADOR, trabalhador ); + exame.set( ExamesData.TO_MEDICO_ID, medico ); + exame.set( ExamesData.TO_TRABALHADOR_ID, trabalhador ); byte fo[] = null; try @@ -351,8 +351,8 @@ public class FichaWindow extends TabbedWindow // System.out.println( "FO sz: " + fo.length ); - exame.set( ExameData.FO, fo ); - exame.set( ExameData.PDF, createPDF( exame ) ); + exame.set( ExamesData.FO, fo ); + exame.set( ExamesData.PDF, createPDF( exame ) ); // empresa.save(); // estabelecimento.save(); @@ -363,8 +363,8 @@ public class FichaWindow extends TabbedWindow { if( medico != null ) { - fdpProvider.setMedicoForEstabelecimento( ( Integer ) estabelecimento.get( EstabelecimentoData.ID ), - ( Integer ) medico.get( MedicoData.ID ) ); + fdpProvider.setMedicoForEstabelecimento( ( Integer ) estabelecimento.get( EstabelecimentosData.ID ), + ( Integer ) medico.get( MedicosData.ID ) ); } } catch( Exception mex ) @@ -375,23 +375,23 @@ public class FichaWindow extends TabbedWindow // DBKey key = trabalhador.getPrimaryKeyValue(); // DBField fields[] = FichaDataProvider.TRABALHADORES.getPrimaryKey(); // trabalhadorID = new Integer( ((Number)key.getFieldValue( fields[ 0 ] )).intValue() ); - trabalhadorID = ( Integer ) trabalhador.get( TrabalhadorData.ID ); + trabalhadorID = ( Integer ) trabalhador.get( TrabalhadoresData.ID ); try { - //Marcacao.saveMarcacaoConsultaForTrabalhadorID( trabalhadorID, (Date)exame.get( ExameData.PROXIMO_EXAME ) ); + //Marcacao.saveMarcacaoConsultaForTrabalhadorID( trabalhadorID, (Date)exame.get( ExamesData.PROXIMO_EXAME ) ); marcacoesHandler.ajustarMarcacoes( - trabalhadorID, (Integer)exame.get( ExameData.TIPO ), - (Date)exame.get( ExameData.DATA ), - examePanel.getMotivoProximoExame(), (Date)exame.get( ExameData.PROXIMO_EXAME ) ); + trabalhadorID, (Integer)exame.get( ExamesData.TIPO ), + (Date)exame.get( ExamesData.DATA ), + examePanel.getMotivoProximoExame(), (Date)exame.get( ExamesData.PROXIMO_EXAME ) ); } catch( Exception iex ) { iex.printStackTrace(); } - Integer motivoProximoExame = (Integer) exame.get( ExameData.TIPO ); + Integer motivoProximoExame = (Integer) exame.get( ExamesData.TIPO ); if ( motivoProximoExame != null && motivoProximoExame.equals( new Integer( FichaAptidaoConstants.CODIGO_TIPO_OCASIONAL ) ) ) { - Date proximoExameDate = (Date) exame.get( ExameData.PROXIMO_EXAME ); + Date proximoExameDate = (Date) exame.get( ExamesData.PROXIMO_EXAME ); if( proximoExameDate != null && proximoExameDate.getTime() > 0 ) { Calendar whenCal = Calendar.getInstance(); @@ -413,7 +413,7 @@ public class FichaWindow extends TabbedWindow } if( exameListener != null ) { - exameListener.exameSaved( trabalhadorID, ( Integer )exame.get( ExameData.ID ) ); + exameListener.exameSaved( trabalhadorID, ( Integer )exame.get( ExamesData.ID ) ); exameListener = null; } return true; @@ -608,19 +608,19 @@ public class FichaWindow extends TabbedWindow throws Exception { // MetaObject exame = fdpProvider.load( fdpProvider.EXAMES, new DBKey( exameID ) ); - ExameData exame = (ExameData) JDO.load( ExameData.class, exameID ); + ExamesData exame = (ExamesData) JDO.load( ExamesData.class, exameID ); if( exame == null ) { throw new Exception( "N\u00e3o existe exame" ); } - byte fo[] = (byte []) exame.get( ExameData.FO ); - byte pdf[] = (byte []) exame.get( ExameData.PDF ); + byte fo[] = (byte []) exame.get( ExamesData.FO ); + byte pdf[] = (byte []) exame.get( ExamesData.PDF ); if( toFile ) { - TrabalhadorData trabalhadorExame = ( TrabalhadorData ) exame.get( ExameData.TRABALHADOR ); - String fileName = StringPlainer.convertString( ( String ) trabalhadorExame.get( TrabalhadorData.NOME ) ); + TrabalhadoresData trabalhadorExame = exame.toTrabalhador_id(); + String fileName = StringPlainer.convertString( ( String ) trabalhadorExame.get( TrabalhadoresData.NOME ) ); SimpleDateFormat sdf = new SimpleDateFormat("_dd-MM-yyyy"); Date date = new Date(); fileName = fileName + sdf.format( date ); @@ -663,8 +663,8 @@ public class FichaWindow extends TabbedWindow // } // else // { - TrabalhadorData trabalhadorExame = ( TrabalhadorData ) exame.get( ExameData.TRABALHADOR ); - String nomeFicheiro = StringPlainer.convertString( ( String ) trabalhadorExame.get( TrabalhadorData.NOME ) ); + TrabalhadoresData trabalhadorExame = exame.toTrabalhador_id(); + String nomeFicheiro = StringPlainer.convertString( ( String ) trabalhadorExame.get( TrabalhadoresData.NOME ) ); nomeFicheiro = nomeFicheiro.replaceAll( " ", "_" ); ePDF.print( pdf, nomeFicheiro ); // } @@ -694,14 +694,14 @@ public class FichaWindow extends TabbedWindow // throws Exception //{ //// MetaObject exame = fdpProvider.load( fdpProvider.EXAMES, new DBKey( exameID ) ); -// ExameData exame = (ExameData) JDO.load( ExameData.class, exameID ); +// ExamesData exame = (ExamesData) JDO.load( ExamesData.class, exameID ); // if( exame == null ) // { // throw new Exception( "N\u00e3o existe exame" ); // } // // // lflores - ignore FO (for now) -// byte fo[] = (byte []) exame.get( ExameData.FO ); +// byte fo[] = (byte []) exame.get( ExamesData.FO ); // // if( fo != null ) // { @@ -710,7 +710,7 @@ public class FichaWindow extends TabbedWindow // } //} - public byte[] createFO( ExameData exame ) + public byte[] createFO( ExamesData exame ) throws Exception { byte xml[] = createXmlFromExame( exame ); @@ -721,28 +721,28 @@ public class FichaWindow extends TabbedWindow return FichaAptidaoCreator.getCreator().createFO( xml ); } - public byte[] createPDF( ExameData exame ) + public byte[] createPDF( ExamesData exame ) throws Exception { - // byte fo[] = exame.get( ExameData.FO, fo ); + // byte fo[] = exame.get( ExamesData.FO, fo ); HashMap ht = createMapFromExame( exame ); return ePDF.createPDF( ht ); // return FichaAptidaoCreator.getCreator().createPDF( fo ); } - private HashMap createMapFromExame(final ExameData exame) + private HashMap createMapFromExame(final ExamesData exame) { - MedicoData medico = (MedicoData)exame.get( ExameData.MEDICO ); - TrabalhadorData trabalhador = (TrabalhadorData) exame.get( ExameData.TRABALHADOR ); - EstabelecimentoData estabelecimento = (EstabelecimentoData) trabalhador.get( TrabalhadorData.ESTABELECIMENTO ); - EmpresaData empresa = (EmpresaData) estabelecimento.get( EstabelecimentoData.EMPRESA ); + MedicosData medico = exame.toMedico_id(); + TrabalhadoresData trabalhador = exame.toTrabalhador_id(); + EstabelecimentosData estabelecimento = trabalhador.toEstabelecimento_id(); + EmpresasData empresa = estabelecimento.toEmpresa_id(); // empresa.load( empresa.getPrimaryKeyValue() ); HashMap ht = new HashMap(); - ht.put( DESIGNACAO_SOCIAL, ( String )empresa.get( EmpresaData.DESIGNACAO_SOCIAL ) ); - ht.put( ESTABELECIMENTOS_NOME, ( String )estabelecimento.get( EstabelecimentoData.NOME ) ); - String aux = (String)estabelecimento.get( EstabelecimentoData.LOCALIDADE ); + ht.put( DESIGNACAO_SOCIAL, ( String )empresa.get( EmpresasData.DESIGNACAO_SOCIAL ) ); + ht.put( ESTABELECIMENTOS_NOME, ( String )estabelecimento.get( EstabelecimentosData.NOME ) ); + String aux = (String)estabelecimento.get( EstabelecimentosData.LOCALIDADE ); ht.put( ESTABELECIMENTOS_LOCALIDADE, aux != null ? aux : "" ); - Integer tipo = (Integer)empresa.get( EmpresaData.SERVICO_SAUDE_TIPO ); + Integer tipo = (Integer)empresa.get( EmpresasData.SERVICO_SAUDE_TIPO ); ht.put( SERVICO_SAUDE_TIPO_INTERNO, SQUARE ); ht.put( SERVICO_SAUDE_TIPO_INTEREMPRESAS, SQUARE ); ht.put( SERVICO_SAUDE_TIPO_EXTERNO, SQUARE ); @@ -762,8 +762,8 @@ public class FichaWindow extends TabbedWindow ht.put( SERVICO_SAUDE_TIPO_SNS, CHECKED ); break; } - ht.put( SERVICO_SAUDE_DESIGNACAO, ( String )empresa.get( EmpresaData.SERVICO_SAUDE_DESIGNACAO ) ); - tipo = (Integer)empresa.get( EmpresaData.SERVICO_HIGIENE_TIPO ); + ht.put( SERVICO_SAUDE_DESIGNACAO, ( String )empresa.get( EmpresasData.SERVICO_SAUDE_DESIGNACAO ) ); + tipo = (Integer)empresa.get( EmpresasData.SERVICO_HIGIENE_TIPO ); ht.put( SERVICO_HIGIENE_TIPO_INTERNO, SQUARE ); ht.put( SERVICO_HIGIENE_TIPO_INTEREMPRESAS, SQUARE ); ht.put( SERVICO_HIGIENE_TIPO_EXTERNO, SQUARE ); @@ -783,9 +783,9 @@ public class FichaWindow extends TabbedWindow ht.put( SERVICO_HIGIENE_TIPO_OUTRO, CHECKED ); break; } - ht.put( SERVICO_HIGIENE_DESIGNACAO, ( String )empresa.get( EmpresaData.SERVICO_HIGIENE_DESIGNACAO ) ); - ht.put( TRABALHADORES_NOME, ( String )trabalhador.get( TrabalhadorData.NOME ) ); - aux = (String)trabalhador.get( TrabalhadorData.SEXO ); + ht.put( SERVICO_HIGIENE_DESIGNACAO, ( String )empresa.get( EmpresasData.SERVICO_HIGIENE_DESIGNACAO ) ); + ht.put( TRABALHADORES_NOME, ( String )trabalhador.get( TrabalhadoresData.NOME ) ); + aux = (String)trabalhador.get( TrabalhadoresData.SEXO ); switch( aux.charAt( 0 ) ) { case 'm': @@ -796,27 +796,27 @@ public class FichaWindow extends TabbedWindow break; } DateFormat df = DateFormat.getDateInstance( DateFormat.SHORT ); - Date data = ( Date )trabalhador.get( TrabalhadorData.DATA_NASCIMENTO ); + Date data = ( Date )trabalhador.get( TrabalhadoresData.DATA_NASCIMENTO ); ht.put( DATA_NASCIMENTO, data != null ? df.format( data ) : "" ); - aux = (String)trabalhador.get( TrabalhadorData.NACIONALIDADE ); + aux = (String)trabalhador.get( TrabalhadoresData.NACIONALIDADE ); ht.put( NACIONALIDADE, aux != null ? aux : "" ); - aux = (String)trabalhador.get( TrabalhadorData.NUMERO_MECANOGRAFICO ); + aux = (String)trabalhador.get( TrabalhadoresData.NUMERO_MECANOGRAFICO ); ht.put( NUMERO_MECANOGRAFICO, aux != null ? aux : "" ); - data = ( Date )trabalhador.get( TrabalhadorData.DATA_ADMISSAO ); + data = ( Date )trabalhador.get( TrabalhadoresData.DATA_ADMISSAO ); ht.put( DATA_ADMISSAO, data != null ? df.format( data ) : "" ); - aux = (String)trabalhador.get( TrabalhadorData.CATEGORIA ); + aux = (String)trabalhador.get( TrabalhadoresData.CATEGORIA ); ht.put( CATEGORIA, aux != null ? aux : "" ); - aux = (String)trabalhador.get( TrabalhadorData.LOCAL_TRABALHO ); + aux = (String)trabalhador.get( TrabalhadoresData.LOCAL_TRABALHO ); ht.put( LOCAL_TRABALHO, aux != null ? aux : "" ); - aux = (String)trabalhador.get( TrabalhadorData.FUNCAO_PROPOSTA ); + aux = (String)trabalhador.get( TrabalhadoresData.FUNCAO_PROPOSTA ); ht.put( FUNCAO_PROPOSTA, aux != null ? aux : "" ); - data = ( Date )trabalhador.get( TrabalhadorData.DATA_ADMISSAO_FUNCAO ); + data = ( Date )trabalhador.get( TrabalhadoresData.DATA_ADMISSAO_FUNCAO ); ht.put( DATA_ADMISSAO_FUNCAO, data != null ? df.format( data ) : "" ); - aux = (String)trabalhador.get( TrabalhadorData.OBSERVACOES ); + aux = (String)trabalhador.get( TrabalhadoresData.OBSERVACOES ); ht.put( OBSERVACOES, aux != null ? aux : "" ); - data = ( Date )exame.get( ExameData.DATA ); + data = ( Date )exame.get( ExamesData.DATA ); ht.put( EXAMES_DATA, data != null ? df.format( data ) : "" ); - tipo = (Integer)exame.get( ExameData.TIPO ); + tipo = (Integer)exame.get( ExamesData.TIPO ); ht.put( TIPO_ADMISSAO, SQUARE ); ht.put( TIPO_PERIODICO, SQUARE ); ht.put( TIPO_OCASIONAL, SQUARE ); @@ -839,7 +839,7 @@ public class FichaWindow extends TabbedWindow break; case 3: ht.put( TIPO_OCASIONAL, CHECKED ); - tipo = (Integer)exame.get( ExameData.OCASIONAL ); + tipo = (Integer)exame.get( ExamesData.OCASIONAL ); switch( tipo.intValue() ) { @@ -867,13 +867,13 @@ public class FichaWindow extends TabbedWindow } break; // case 4: -// aux = (String)exame.get( ExameData.OUTRO_TIPO ); +// aux = (String)exame.get( ExamesData.OUTRO_TIPO ); // ht.put( "tipo_outro", aux != null ? aux : "" ); // break; } - aux = (String)exame.get( ExameData.OUTRO_TIPO ); + aux = (String)exame.get( ExamesData.OUTRO_TIPO ); ht.put( TIPO_OUTRO_TEXTO, aux != null ? aux : "" ); - tipo = (Integer)exame.get( ExameData.RESULTADO ); + tipo = (Integer)exame.get( ExamesData.RESULTADO ); ht.put( RESULTADO_APTO, SQUARE ); ht.put( RESULTADO_APTO_CONDICIONALMENTE, SQUARE ); ht.put( RESULTADO_INAPTO_TEMP, SQUARE ); @@ -893,32 +893,32 @@ public class FichaWindow extends TabbedWindow ht.put( RESULTADO_INAPTO_DEF, CHECKED ); break; } - aux = (String)exame.get( ExameData.OUTRA_FUNCAO_1 ); + aux = (String)exame.get( ExamesData.OUTRA_FUNCAO_1 ); ht.put( OUTRA_FUNCAO_1, aux != null ? aux : "" ); - aux = (String)exame.get( ExameData.OUTRA_FUNCAO_2 ); + aux = (String)exame.get( ExamesData.OUTRA_FUNCAO_2 ); ht.put( OUTRA_FUNCAO_2, aux != null ? aux : "" ); - aux = (String)exame.get( ExameData.OUTRA_FUNCAO_3 ); + aux = (String)exame.get( ExamesData.OUTRA_FUNCAO_3 ); ht.put( OUTRA_FUNCAO_3, aux != null ? aux : "" ); - aux = (String)exame.get( ExameData.OUTRA_FUNCAO_4 ); + aux = (String)exame.get( ExamesData.OUTRA_FUNCAO_4 ); ht.put( OUTRA_FUNCAO_4, aux != null ? aux : "" ); - aux = (String)exame.get( ExameData.OUTRAS_RECOMENDACOES ); + aux = (String)exame.get( ExamesData.OUTRAS_RECOMENDACOES ); ht.put( OUTRAS_RECOMENDACOES, aux != null ? aux : "" ); - data = ( Date )exame.get( ExameData.PROXIMO_EXAME ); + data = ( Date )exame.get( ExamesData.PROXIMO_EXAME ); ht.put( PROXIMO_EXAME, data != null ? df.format( data ) : "n/d" ); - aux = (String)medico.get( MedicoData.NOME ); + aux = (String)medico.get( MedicosData.NOME ); ht.put( MEDICOS_NOME, aux != null ? aux : "" ); - aux = (String)medico.get( MedicoData.NUMERO_CEDULA ); + aux = (String)medico.get( MedicosData.NUMERO_CEDULA ); ht.put( NUMERO_CEDULA, aux != null ? aux : "" ); return ht; } - private byte[] createXmlFromExame(final ExameData exame) + private byte[] createXmlFromExame(final ExamesData exame) throws Exception { - MedicoData medico = (MedicoData)exame.get( ExameData.MEDICO ); - TrabalhadorData trabalhador = (TrabalhadorData) exame.get( ExameData.TRABALHADOR ); - EstabelecimentoData estabelecimento = (EstabelecimentoData) trabalhador.get( TrabalhadorData.ESTABELECIMENTO ); - EmpresaData empresa = (EmpresaData) estabelecimento.get( EstabelecimentoData.EMPRESA ); + MedicosData medico = exame.toMedico_id(); + TrabalhadoresData trabalhador = exame.toTrabalhador_id(); + EstabelecimentosData estabelecimento = trabalhador.toEstabelecimento_id(); + EmpresasData empresa = estabelecimento.toEmpresa_id(); Element rootElement = new Element( "FichaAptidao" ); Element portariaElement = new Element( "portaria" ); @@ -927,18 +927,18 @@ public class FichaWindow extends TabbedWindow Element empresaElement = new Element( "empresa" ); Element designacaoSocialEmpresaElement = new Element( "designacao-social" ); - designacaoSocialEmpresaElement.setText( ( String )empresa.get( EmpresaData.DESIGNACAO_SOCIAL ) ); + designacaoSocialEmpresaElement.setText( ( String )empresa.get( EmpresasData.DESIGNACAO_SOCIAL ) ); empresaElement.addContent( designacaoSocialEmpresaElement ); rootElement.addContent( empresaElement ); - Integer tipoServicoSaude = (Integer)empresa.get( EmpresaData.SERVICO_SAUDE_TIPO ); - Integer tipoServicoHigieneSeguranca = (Integer)empresa.get( EmpresaData.SERVICO_HIGIENE_TIPO ); + Integer tipoServicoSaude = (Integer)empresa.get( EmpresasData.SERVICO_SAUDE_TIPO ); + Integer tipoServicoHigieneSeguranca = (Integer)empresa.get( EmpresasData.SERVICO_HIGIENE_TIPO ); Element estabelecimentoElement = new Element( "estabelecimento" ); Element nomeEstabelecimentoElement = new Element( "nome" ); - nomeEstabelecimentoElement.setText( ( String )estabelecimento.get( EstabelecimentoData.NOME ) ); + nomeEstabelecimentoElement.setText( ( String )estabelecimento.get( EstabelecimentosData.NOME ) ); estabelecimentoElement.addContent( nomeEstabelecimentoElement ); Element localidadeEstabelecimentoElement = new Element( "localidade" ); - localidadeEstabelecimentoElement.setText( ( String )estabelecimento.get( EstabelecimentoData.LOCALIDADE ) ); + localidadeEstabelecimentoElement.setText( ( String )estabelecimento.get( EstabelecimentosData.LOCALIDADE ) ); estabelecimentoElement.addContent( localidadeEstabelecimentoElement ); Element servicoSaudeEstabelecimentoElement = new Element( "servico-saude" ); Element tipoServicoSaudeEstabelecimentoElement = new Element( "tipo" ); @@ -956,7 +956,7 @@ public class FichaWindow extends TabbedWindow tipoServicoSaudeEstabelecimentoElement.addContent( snsTipoServicoSaudeEstabelecimentoElement ); servicoSaudeEstabelecimentoElement.addContent( tipoServicoSaudeEstabelecimentoElement ); Element designacaoServicoSaudeEstabelecimentoElement = new Element( "designacao" ); - designacaoServicoSaudeEstabelecimentoElement.setText( ( String )empresa.get( EmpresaData.SERVICO_SAUDE_DESIGNACAO ) ); + designacaoServicoSaudeEstabelecimentoElement.setText( ( String )empresa.get( EmpresasData.SERVICO_SAUDE_DESIGNACAO ) ); servicoSaudeEstabelecimentoElement.addContent( designacaoServicoSaudeEstabelecimentoElement ); estabelecimentoElement.addContent( servicoSaudeEstabelecimentoElement ); Element servicoHigieneSegurancaEstabelecimentoElement = new Element( "servico-higiene-seguranca" ); @@ -975,19 +975,19 @@ public class FichaWindow extends TabbedWindow tipoServicoHigieneSegurancaEstabelecimentoElement.addContent( outroTipoServicoHigieneSegurancaEstabelecimentoElement ); servicoHigieneSegurancaEstabelecimentoElement.addContent( tipoServicoHigieneSegurancaEstabelecimentoElement ); Element designacaoServicoHigieneSegurancaEstabelecimentoElement = new Element( "designacao" ); - designacaoServicoHigieneSegurancaEstabelecimentoElement.setText( ( String )empresa.get( EmpresaData.SERVICO_HIGIENE_DESIGNACAO ) ); + designacaoServicoHigieneSegurancaEstabelecimentoElement.setText( ( String )empresa.get( EmpresasData.SERVICO_HIGIENE_DESIGNACAO ) ); servicoHigieneSegurancaEstabelecimentoElement.addContent( designacaoServicoHigieneSegurancaEstabelecimentoElement ); estabelecimentoElement.addContent( servicoHigieneSegurancaEstabelecimentoElement ); rootElement.addContent( estabelecimentoElement ); - char sexo = ( (String)trabalhador.get( TrabalhadorData.SEXO ) ).charAt( 0 ); + char sexo = ( (String)trabalhador.get( TrabalhadoresData.SEXO ) ).charAt( 0 ); DateFormat df = DateFormat.getDateInstance( DateFormat.SHORT ); - Date dataNascimento = ( Date )trabalhador.get( TrabalhadorData.DATA_NASCIMENTO ); - Date dataAdmissao = ( Date )trabalhador.get( TrabalhadorData.DATA_ADMISSAO ); - Date dataAdmissaoFuncao = ( Date )trabalhador.get( TrabalhadorData.DATA_ADMISSAO_FUNCAO ); + Date dataNascimento = ( Date )trabalhador.get( TrabalhadoresData.DATA_NASCIMENTO ); + Date dataAdmissao = ( Date )trabalhador.get( TrabalhadoresData.DATA_ADMISSAO ); + Date dataAdmissaoFuncao = ( Date )trabalhador.get( TrabalhadoresData.DATA_ADMISSAO_FUNCAO ); Element trabalhadorElement = new Element( "trabalhador" ); Element nomeTrabalhadorElement = new Element( "nome" ); - nomeTrabalhadorElement.setText( ( String )trabalhador.get( TrabalhadorData.NOME ) ); + nomeTrabalhadorElement.setText( ( String )trabalhador.get( TrabalhadoresData.NOME ) ); Element sexoTrabalhadorElement = new Element( "sexo" ); sexoTrabalhadorElement.setText( sexo == 'm' ? "Masculino" : "Feminino" ); trabalhadorElement.addContent( sexoTrabalhadorElement ); @@ -995,23 +995,23 @@ public class FichaWindow extends TabbedWindow dataNascimentoTrabalhadorElement.setText( dataNascimento != null ? df.format( dataNascimento ) : "" ); trabalhadorElement.addContent( dataNascimentoTrabalhadorElement ); Element nacionalidadeTrabalhadorElement = new Element( "nacionalidade" ); - nacionalidadeTrabalhadorElement.setText( (String)trabalhador.get( TrabalhadorData.NACIONALIDADE ) ); + nacionalidadeTrabalhadorElement.setText( (String)trabalhador.get( TrabalhadoresData.NACIONALIDADE ) ); trabalhadorElement.addContent( nacionalidadeTrabalhadorElement ); trabalhadorElement.addContent( nomeTrabalhadorElement ); Element numeroMecanograficoTrabalhadorElement = new Element( "numero-mecanografico" ); - numeroMecanograficoTrabalhadorElement.setText( (String)trabalhador.get( TrabalhadorData.NUMERO_MECANOGRAFICO ) ); + numeroMecanograficoTrabalhadorElement.setText( (String)trabalhador.get( TrabalhadoresData.NUMERO_MECANOGRAFICO ) ); trabalhadorElement.addContent( numeroMecanograficoTrabalhadorElement ); Element dataAdmissaoTrabalhadorElement = new Element( "data-admissao" ); dataAdmissaoTrabalhadorElement.setText( dataAdmissao != null ? df.format( dataAdmissao ) : "" ); trabalhadorElement.addContent( dataAdmissaoTrabalhadorElement ); Element categoriaProfissionalTrabalhadorElement = new Element( "categoria-profissional" ); - categoriaProfissionalTrabalhadorElement.setText( (String)trabalhador.get( TrabalhadorData.CATEGORIA ) ); + categoriaProfissionalTrabalhadorElement.setText( (String)trabalhador.get( TrabalhadoresData.CATEGORIA ) ); trabalhadorElement.addContent( categoriaProfissionalTrabalhadorElement ); Element localTrabalhoTrabalhadorElement = new Element( "local-trabalho" ); - localTrabalhoTrabalhadorElement.setText( (String)trabalhador.get( TrabalhadorData.LOCAL_TRABALHO ) ); + localTrabalhoTrabalhadorElement.setText( (String)trabalhador.get( TrabalhadoresData.LOCAL_TRABALHO ) ); trabalhadorElement.addContent( localTrabalhoTrabalhadorElement ); Element funcaoPropostaTrabalhadorElement = new Element( "funcao-proposta" ); - funcaoPropostaTrabalhadorElement.setText( (String)trabalhador.get( TrabalhadorData.FUNCAO_PROPOSTA ) ); + funcaoPropostaTrabalhadorElement.setText( (String)trabalhador.get( TrabalhadoresData.FUNCAO_PROPOSTA ) ); Element dataAdmissaoFuncaoTrabalhadorElement = new Element( "data-admissao-funcao" ); dataAdmissaoFuncaoTrabalhadorElement.setText( dataAdmissaoFuncao != null ? df.format( dataAdmissaoFuncao ) : "" ); trabalhadorElement.addContent( dataAdmissaoFuncaoTrabalhadorElement ); @@ -1019,13 +1019,13 @@ public class FichaWindow extends TabbedWindow rootElement.addContent( trabalhadorElement ); Element observacoesElement = new Element( "observacoes" ); - observacoesElement.setText( (String)trabalhador.get( TrabalhadorData.OBSERVACOES ) ); + observacoesElement.setText( (String)trabalhador.get( TrabalhadoresData.OBSERVACOES ) ); rootElement.addContent( observacoesElement ); - Date dataExameMedico = ( Date )exame.get( ExameData.DATA ); - Integer tipoExameMedico = (Integer)exame.get( ExameData.TIPO ); - Integer tipoOcasionalExameMedico = (Integer)exame.get( ExameData.OCASIONAL ); - Integer resultadoExameMedico = (Integer)exame.get( ExameData.RESULTADO ); + Date dataExameMedico = ( Date )exame.get( ExamesData.DATA ); + Integer tipoExameMedico = (Integer)exame.get( ExamesData.TIPO ); + Integer tipoOcasionalExameMedico = (Integer)exame.get( ExamesData.OCASIONAL ); + Integer resultadoExameMedico = (Integer)exame.get( ExamesData.RESULTADO ); Element exameMedicoElement = new Element( "exame-medico" ); Element dataExameMedicoElement = new Element( "data" ); dataExameMedicoElement.setText( dataExameMedico != null ? df.format( dataExameMedico ) : "" ); @@ -1069,7 +1069,7 @@ public class FichaWindow extends TabbedWindow ( tipoExameMedico.intValue() == 3 && tipoOcasionalExameMedico != null && tipoOcasionalExameMedico.intValue() == 10 ) ? "y" : "n" ); tipoExameMedicoElement.addContent( ocasionalOutroTipoExameMedicoElement ); Element ocasionalOutroDescricaoTipoExameMedicoElement = new Element( "ocasional-outro-descricao" ); - ocasionalOutroDescricaoTipoExameMedicoElement.setText( (String)exame.get( ExameData.OUTRO_TIPO ) ); + ocasionalOutroDescricaoTipoExameMedicoElement.setText( (String)exame.get( ExamesData.OUTRO_TIPO ) ); tipoExameMedicoElement.addContent( ocasionalOutroDescricaoTipoExameMedicoElement ); exameMedicoElement.addContent( tipoExameMedicoElement ); Element resultadoExameMedicoElement = new Element( "resultado" ); @@ -1086,35 +1086,35 @@ public class FichaWindow extends TabbedWindow inaptoDefinitivamenteResultadoExameMedicoElement.setText( resultadoExameMedico.intValue() == 4 ? "y" : "n" ); resultadoExameMedicoElement.addContent( inaptoDefinitivamenteResultadoExameMedicoElement ); Element outrasFuncoes1ResultadoExameMedicoElement = new Element( "outras-funcoes-1" ); - outrasFuncoes1ResultadoExameMedicoElement.setText( (String)exame.get( ExameData.OUTRA_FUNCAO_1 ) ); + outrasFuncoes1ResultadoExameMedicoElement.setText( (String)exame.get( ExamesData.OUTRA_FUNCAO_1 ) ); resultadoExameMedicoElement.addContent( outrasFuncoes1ResultadoExameMedicoElement ); Element outrasFuncoes2ResultadoExameMedicoElement = new Element( "outras-funcoes-2" ); - outrasFuncoes2ResultadoExameMedicoElement.setText( (String)exame.get( ExameData.OUTRA_FUNCAO_2 ) ); + outrasFuncoes2ResultadoExameMedicoElement.setText( (String)exame.get( ExamesData.OUTRA_FUNCAO_2 ) ); resultadoExameMedicoElement.addContent( outrasFuncoes2ResultadoExameMedicoElement ); Element outrasFuncoes3ResultadoExameMedicoElement = new Element( "outras-funcoes-3" ); - outrasFuncoes3ResultadoExameMedicoElement.setText( (String)exame.get( ExameData.OUTRA_FUNCAO_3 ) ); + outrasFuncoes3ResultadoExameMedicoElement.setText( (String)exame.get( ExamesData.OUTRA_FUNCAO_3 ) ); resultadoExameMedicoElement.addContent( outrasFuncoes3ResultadoExameMedicoElement ); Element outrasFuncoes4ResultadoExameMedicoElement = new Element( "outras-funcoes-4" ); - outrasFuncoes4ResultadoExameMedicoElement.setText( (String)exame.get( ExameData.OUTRA_FUNCAO_4 ) ); + outrasFuncoes4ResultadoExameMedicoElement.setText( (String)exame.get( ExamesData.OUTRA_FUNCAO_4 ) ); resultadoExameMedicoElement.addContent( outrasFuncoes4ResultadoExameMedicoElement ); exameMedicoElement.addContent( resultadoExameMedicoElement ); rootElement.addContent( exameMedicoElement ); - Date dataProximoExame = ( Date )exame.get( ExameData.PROXIMO_EXAME ); + Date dataProximoExame = ( Date )exame.get( ExamesData.PROXIMO_EXAME ); Element proximoExameElement = new Element( "proximo-element" ); proximoExameElement.setText( dataProximoExame != null ? df.format( dataProximoExame ) : "" ); rootElement.addContent( proximoExameElement ); Element outrasRecomendacoesElement = new Element( "outras-recomendacoes" ); - outrasRecomendacoesElement.setText( (String)exame.get( ExameData.OUTRAS_RECOMENDACOES ) ); + outrasRecomendacoesElement.setText( (String)exame.get( ExamesData.OUTRAS_RECOMENDACOES ) ); rootElement.addContent( outrasRecomendacoesElement ); Element medicoElement = new Element( "medico" ); Element nomeMedicoElement = new Element( "nome" ); - nomeMedicoElement.setText( (String)medico.get( MedicoData.NOME ) ); + nomeMedicoElement.setText( (String)medico.get( MedicosData.NOME ) ); medicoElement.addContent( nomeMedicoElement ); Element cedulaMedicoElement = new Element( "cedula" ); - cedulaMedicoElement.setText( (String)medico.get( MedicoData.NUMERO_CEDULA ) ); + cedulaMedicoElement.setText( (String)medico.get( MedicosData.NUMERO_CEDULA ) ); medicoElement.addContent( cedulaMedicoElement ); rootElement.addContent( medicoElement ); @@ -1212,12 +1212,12 @@ public class FichaWindow extends TabbedWindow { // if( useFO ) // { -// ExameData exame = (ExameData) JDO.load( ExameData.class, ( ( IDObject )value ).getID() ); +// ExamesData exame = (ExamesData) JDO.load( ExamesData.class, ( ( IDObject )value ).getID() ); // if( exame == null ) // { // throw new Exception( "N\u00e3o existe exame" ); // } -// byte fo[] = (byte[]) exame.get( ExameData.FO ); +// byte fo[] = (byte[]) exame.get( ExamesData.FO ); // Printer.printFO( fo ); // } // else @@ -1243,16 +1243,16 @@ public class FichaWindow extends TabbedWindow throws Exception { // MetaObject exame = fdpProvider.load( fdpProvider.EXAMES, new DBKey( exameID ) ); - ExameData exame = (ExameData) JDO.load( ExameData.class, exameID ); + ExamesData exame = (ExamesData) JDO.load( ExamesData.class, exameID ); if( exame == null ) { throw new Exception( "N\u00e3o existe exame" ); } if( JOptionPane.showConfirmDialog( this, - "Tem a certeza que quer apagar o exame de " + exame.get( ExameData.DATA ) + "?", + "Tem a certeza que quer apagar o exame de " + exame.get( ExamesData.DATA ) + "?", "...", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, null ) == 0 ) { -// exame.set( ExameData.INACTIVO, "y" ); +// exame.set( ExamesData.INACTIVO, "y" ); // exame.save(); exame.delete(); } diff --git a/trunk/SIPRPSoft/src/siprp/ficha/MedicoEditor.java b/trunk/SIPRPSoft/src/siprp/ficha/MedicoEditor.java index 6aa8555e..326a492b 100644 --- a/trunk/SIPRPSoft/src/siprp/ficha/MedicoEditor.java +++ b/trunk/SIPRPSoft/src/siprp/ficha/MedicoEditor.java @@ -26,11 +26,10 @@ import javax.swing.ListSelectionModel; import javax.swing.event.ListSelectionListener; import siprp.FichaDataProvider; -import siprp.data.DisableDeleteHandler; -import siprp.data.MedicoData; +import siprp.data.outer.MedicosData; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.tables.BaseTable; import com.evolute.utils.tables.VectorTableModel; import com.evolute.utils.ui.CustomJDialog; @@ -44,11 +43,8 @@ import com.evolute.utils.ui.text.CopyPasteHandler; public class MedicoEditor extends CustomJDialog implements ActionListener, ListSelectionListener { - static - { - MedicoData.registerOperationHandlerForClass( DisableDeleteHandler.INSTANCE, MedicoData.class ); - } - private JDOProvider JDO; + + private ProviderInterface JDO; private FichaDataProvider provider; private BaseTable table; private VectorTableModel model; @@ -66,7 +62,7 @@ public class MedicoEditor extends CustomJDialog { super( owner, true ); provider = (FichaDataProvider)FichaDataProvider.getProvider(); - JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + JDO = ( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); setupComponents(); } @@ -249,28 +245,28 @@ public class MedicoEditor extends CustomJDialog } try { - MedicoData medico; + MedicosData medico; if( id != null ) { - medico = ( MedicoData ) JDO.load( MedicoData.class, id ); + medico = ( MedicosData ) JDO.load( MedicosData.class, id ); // medico = provider.load( provider.MEDICOS, new DBKey( id ) ); } else { - medico = new MedicoData(); + medico = new MedicosData(); // medico = provider.createObject( provider.MEDICOS ); } // medico.setProperty( provider.NOME, nome ); // medico.setProperty( provider.NUMERO_CEDULA, numero ); - medico.set( MedicoData.NOME, nome ); - medico.set( MedicoData.NUMERO_CEDULA, numero ); + medico.set( MedicosData.NOME, nome ); + medico.set( MedicosData.NUMERO_CEDULA, numero ); medico.save(); if( id == null ) { // DBKey key = medico.getPrimaryKeyValue(); // DBField fields[] = provider.MEDICOS.getPrimaryKey(); // id = new Integer( ((Number)key.getFieldValue( fields[ 0 ] )).intValue() ); - id = (Integer)medico.get( MedicoData.ID ); + id = (Integer)medico.get( MedicosData.ID ); } } catch( Exception ex ) diff --git a/trunk/SIPRPSoft/src/siprp/ficha/ObservacoesPanel.java b/trunk/SIPRPSoft/src/siprp/ficha/ObservacoesPanel.java index f433f176..f0af82de 100644 --- a/trunk/SIPRPSoft/src/siprp/ficha/ObservacoesPanel.java +++ b/trunk/SIPRPSoft/src/siprp/ficha/ObservacoesPanel.java @@ -13,12 +13,12 @@ import javax.swing.JPanel; import javax.swing.JTextField; import siprp.FichaDataProvider; -import siprp.data.TrabalhadorData; +import siprp.data.outer.TrabalhadoresData; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; import com.evolute.utils.dataui.ControllableComponent; import com.evolute.utils.documents.MaximumLengthDocument; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.ui.text.CopyPasteHandler; /** * @@ -27,7 +27,7 @@ import com.evolute.utils.ui.text.CopyPasteHandler; public class ObservacoesPanel extends JPanel implements ControllableComponent { - private JDOProvider JDO; + private ProviderInterface JDO; private JTextField observacoesText; @@ -38,7 +38,7 @@ public class ObservacoesPanel extends JPanel throws Exception { provider = (FichaDataProvider)FichaDataProvider.getProvider(); - JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + JDO = ( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); setupComponents(); } @@ -72,8 +72,8 @@ public class ObservacoesPanel extends JPanel try { - TrabalhadorData trabalhador = (TrabalhadorData)JDO.load( TrabalhadorData.class, trabalhadorID ); - String observacoes = (String) trabalhador.get( TrabalhadorData.OBSERVACOES ); + TrabalhadoresData trabalhador = (TrabalhadoresData)JDO.load( TrabalhadoresData.class, trabalhadorID ); + String observacoes = (String) trabalhador.get( TrabalhadoresData.OBSERVACOES ); if( observacoes != null ) { observacoesText.setText( observacoes ); diff --git a/trunk/SIPRPSoft/src/siprp/ficha/TrabalhadorPanel.java b/trunk/SIPRPSoft/src/siprp/ficha/TrabalhadorPanel.java index 8753bb84..d0f111f3 100644 --- a/trunk/SIPRPSoft/src/siprp/ficha/TrabalhadorPanel.java +++ b/trunk/SIPRPSoft/src/siprp/ficha/TrabalhadorPanel.java @@ -10,6 +10,7 @@ import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.util.Hashtable; +import java.util.Map; import javax.swing.BorderFactory; import javax.swing.JLabel; @@ -17,9 +18,10 @@ import javax.swing.JPanel; import javax.swing.JTextField; import siprp.FichaDataProvider; -import siprp.data.TrabalhadorData; +import siprp.data.outer.TrabalhadoresData; import siprp.importer.Importer; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; import com.evolute.utils.data.IDObject; import com.evolute.utils.data.MappableObject; @@ -27,7 +29,6 @@ import com.evolute.utils.dataui.ComponentController; import com.evolute.utils.dataui.ComponentsHashtable; import com.evolute.utils.dataui.ControllableComponent; import com.evolute.utils.date.DateUtils; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.ui.DialogException; import com.evolute.utils.ui.calendar.JCalendarPanel; import com.evolute.utils.ui.panel.RadioButtonFixedPanel; @@ -40,7 +41,7 @@ import com.evolute.utils.ui.text.CopyPasteHandler; public class TrabalhadorPanel extends JPanel implements ControllableComponent { - private JDOProvider JDO; + private ProviderInterface JDO; private JTextField nomeText; private RadioButtonFixedPanel sexoPanel; private JCalendarPanel dataNascimentoPanel; @@ -54,7 +55,7 @@ public class TrabalhadorPanel extends JPanel private ComponentsHashtable components; private FichaDataProvider provider; - private TrabalhadorData trabalhador; + private TrabalhadoresData trabalhador; /** Creates a new instance of TrabalhadorPanel */ @@ -62,7 +63,7 @@ public class TrabalhadorPanel extends JPanel throws Exception { provider = (FichaDataProvider)FichaDataProvider.getProvider(); - JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + JDO = ( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); setupComponents(); setupComponentsHashtable(); } @@ -217,8 +218,8 @@ public class TrabalhadorPanel extends JPanel private void setupComponentsHashtable() { components = new ComponentsHashtable(); - components.putComponent( TrabalhadorData.NOME, nomeText ); - components.putComponent( TrabalhadorData.SEXO, new ControllableComponent() + components.putComponent( TrabalhadoresData.NOME, nomeText ); + components.putComponent( TrabalhadoresData.SEXO, new ControllableComponent() { public void fill( Object value ) { @@ -252,21 +253,21 @@ public class TrabalhadorPanel extends JPanel sexoPanel.setEnabled( enable ); } } ); - components.putComponent( TrabalhadorData.DATA_NASCIMENTO, dataNascimentoPanel ); - components.putComponent( TrabalhadorData.NACIONALIDADE, nacionalidadeText ); - components.putComponent( TrabalhadorData.NUMERO_MECANOGRAFICO, numeroMecanograficoText ); - components.putComponent( TrabalhadorData.DATA_ADMISSAO, dataAdmissaoPanel ); - components.putComponent( TrabalhadorData.CATEGORIA, categoriaText ); - components.putComponent( TrabalhadorData.LOCAL_TRABALHO, localText ); - components.putComponent( TrabalhadorData.FUNCAO_PROPOSTA, funcaoText ); - components.putComponent( TrabalhadorData.DATA_ADMISSAO_FUNCAO, dataAdmissaoFuncaoPanel ); - components.putDummy( TrabalhadorData.DATA_DEMISSAO ); - components.putDummy( TrabalhadorData.OBSERVACOES ); - components.putDummy( TrabalhadorData.OBSERVACOES_GESTAO ); - components.putDummy( TrabalhadorData.PERFIL ); - components.putDummy( TrabalhadorData.ESTABELECIMENTO ); - components.putDummy( TrabalhadorData.NOME_PLAIN ); - components.putDummy( TrabalhadorData.BI ); + components.putComponent( TrabalhadoresData.DATA_NASCIMENTO, dataNascimentoPanel ); + components.putComponent( TrabalhadoresData.NACIONALIDADE, nacionalidadeText ); + components.putComponent( TrabalhadoresData.NUMERO_MECANOGRAFICO, numeroMecanograficoText ); + components.putComponent( TrabalhadoresData.DATA_ADMISSAO, dataAdmissaoPanel ); + components.putComponent( TrabalhadoresData.CATEGORIA, categoriaText ); + components.putComponent( TrabalhadoresData.LOCAL_TRABALHO, localText ); + components.putComponent( TrabalhadoresData.FUNCAO_PROPOSTA, funcaoText ); + components.putComponent( TrabalhadoresData.DATA_ADMISSAO_FUNCAO, dataAdmissaoFuncaoPanel ); + components.putDummy( TrabalhadoresData.DATA_DEMISSAO ); + components.putDummy( TrabalhadoresData.OBSERVACOES ); + components.putDummy( TrabalhadoresData.OBSERVACOES_GESTAO ); + components.putDummy( TrabalhadoresData.PERFIL ); + components.putDummy( TrabalhadoresData.TO_ESTABELECIMENTO_ID ); + components.putDummy( TrabalhadoresData.NOME_PLAIN ); + components.putDummy( TrabalhadoresData.BI ); // components.putComponent( FichaDataProvider.T_TRABALHADORES + "." + FichaDataProvider.NOME, nomeText ); // components.putComponent( FichaDataProvider.T_TRABALHADORES + "." + FichaDataProvider.DATA_NASCIMENTO, dataNascimentoPanel ); @@ -327,7 +328,7 @@ public class TrabalhadorPanel extends JPanel { try { - trabalhador = ( TrabalhadorData ) JDO.load( TrabalhadorData.class, trabalhadorID ); + trabalhador = ( TrabalhadoresData ) JDO.load( TrabalhadoresData.class, trabalhadorID ); String names[] = trabalhador.getFieldNames(); ComponentController.fill( names, trabalhador.getHashData(), components ); // trabalhador = provider.load( FichaDataProvider.TRABALHADORES, new DBKey( trabalhadorID ) ); @@ -363,8 +364,8 @@ public class TrabalhadorPanel extends JPanel if( trabalhador == null ) { // trabalhador = provider.createObject( FichaDataProvider.TRABALHADORES ); - trabalhador = new TrabalhadorData(); - trabalhador.set( TrabalhadorData.PERFIL, new Integer( 1 ) ); + trabalhador = new TrabalhadoresData(); + trabalhador.set( TrabalhadoresData.PERFIL, new Integer( 1 ) ); } // DBField fields[] = FichaDataProvider.TRABALHADORES.getInsertFields(); // String trabalhadorFields[] = new String[ fields.length ]; @@ -381,17 +382,17 @@ public class TrabalhadorPanel extends JPanel // trabalhador.setProperty( name, hash.get( name ) ); // } String names[] = trabalhador.getFieldNames(); - Hashtable hash = trabalhador.getHashData(); + Map hash = trabalhador.getHashData(); ComponentController.save( names, hash, components ); trabalhador.setHashData( hash ); // if( ((String)trabalhador.getProperty( FichaDataProvider.NOME )).trim().length() == 0 ) - if( ((String)trabalhador.get( TrabalhadorData.NOME )).trim().length() == 0 ) + if( ((String)trabalhador.get( TrabalhadoresData.NOME )).trim().length() == 0 ) { msg.append( "O trabalhador tem de ter nome\n" ); hasMsg = true; } // if( trabalhador.getProperty( FichaDataProvider.SEXO ) == null ) - if( trabalhador.get( TrabalhadorData.SEXO ) == null ) + if( trabalhador.get( TrabalhadoresData.SEXO ) == null ) { msg.append( "O trabalhador tem de ter um sexo definido\n" ); hasMsg = true; diff --git a/trunk/SIPRPSoft/src/siprp/ficha/UpperPanel.java b/trunk/SIPRPSoft/src/siprp/ficha/UpperPanel.java index 6210c6a1..63878174 100644 --- a/trunk/SIPRPSoft/src/siprp/ficha/UpperPanel.java +++ b/trunk/SIPRPSoft/src/siprp/ficha/UpperPanel.java @@ -20,16 +20,16 @@ import javax.swing.JPanel; import javax.swing.JTextField; import siprp.FichaDataProvider; -import siprp.data.EmpresaData; -import siprp.data.EstabelecimentoData; -import siprp.data.MedicoData; -import siprp.data.TrabalhadorData; +import siprp.data.outer.EmpresasData; +import siprp.data.outer.EstabelecimentosData; +import siprp.data.outer.MedicosData; +import siprp.data.outer.TrabalhadoresData; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; import com.evolute.utils.data.IDObject; import com.evolute.utils.data.MappableObject; import com.evolute.utils.dataui.ControllableComponent; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.ui.DialogException; import com.evolute.utils.ui.text.CopyPasteHandler; @@ -40,7 +40,7 @@ import com.evolute.utils.ui.text.CopyPasteHandler; public class UpperPanel extends JPanel implements ControllableComponent, ItemListener { - protected JDOProvider JDO; + protected ProviderInterface JDO; protected JFrame owner; private JTextField empresaText; @@ -57,7 +57,7 @@ public class UpperPanel extends JPanel { provider = (FichaDataProvider)FichaDataProvider.getProvider(); medicosHash = new Hashtable(); - JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + JDO = ( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); setupComponents(); } @@ -138,20 +138,20 @@ public class UpperPanel extends JPanel clear(); try { - TrabalhadorData trabalhador; - EstabelecimentoData estabelecimento; - EmpresaData empresa; + TrabalhadoresData trabalhador; + EstabelecimentosData estabelecimento; + EmpresasData empresa; if( trabalhadorID != null ) { - trabalhador = ( TrabalhadorData ) JDO.load( TrabalhadorData.class, trabalhadorID ); - String nome = (String) trabalhador.get( TrabalhadorData.NOME ); + trabalhador = ( TrabalhadoresData ) JDO.load( TrabalhadoresData.class, trabalhadorID ); + String nome = (String) trabalhador.get( TrabalhadoresData.NOME ); nomeText.setText( nome ); } String nomeEstabelecimento = ""; if( estabelecimentoID != null ) { - estabelecimento = ( EstabelecimentoData ) JDO.load( EstabelecimentoData.class, estabelecimentoID ); - nomeEstabelecimento = (String) estabelecimento.get( EstabelecimentoData.NOME ); + estabelecimento = ( EstabelecimentosData ) JDO.load( EstabelecimentosData.class, estabelecimentoID ); + nomeEstabelecimento = (String) estabelecimento.get( EstabelecimentosData.NOME ); try { Integer medicoID = provider.getMedicoForEstabelecimento( estabelecimentoID ); @@ -174,8 +174,8 @@ public class UpperPanel extends JPanel } if( empresaID != null ) { - empresa = ( EmpresaData ) JDO.load( EmpresaData.class, empresaID ); - String nomeEmpresa = (String) empresa.get( EmpresaData.DESIGNACAO_SOCIAL ); + empresa = ( EmpresasData ) JDO.load( EmpresasData.class, empresaID ); + String nomeEmpresa = (String) empresa.get( EmpresasData.DESIGNACAO_SOCIAL ); empresaText.setText( nomeEmpresa + ( nomeEstabelecimento.length() > 0?" / " + nomeEstabelecimento:"" ) ); } } @@ -192,7 +192,7 @@ public class UpperPanel extends JPanel { try { - MedicoData medico = ( MedicoData )JDO.load( MedicoData.class, id ); + MedicosData medico = ( MedicosData )JDO.load( MedicosData.class, id ); return medico; } catch( Exception ex ) diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/email/AdicionarEmailsPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/email/AdicionarEmailsPanel.java index 3097cbb4..a69e0b49 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/email/AdicionarEmailsPanel.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/email/AdicionarEmailsPanel.java @@ -14,7 +14,7 @@ import siprp.database.cayenne.objects.HsEmailEstabelecimento; import siprp.higiene.gestao.AdicionarPanel; import siprp.logic.HigieneSegurancaLogic; -import com.evolute.adt.TreeTools; +import com.evolute.utils.ui.trees.TreeTools; public class AdicionarEmailsPanel extends AdicionarPanel { diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/equipamentos/AdicionarEquipamentosPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/equipamentos/AdicionarEquipamentosPanel.java index 1cf251f8..94702387 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/equipamentos/AdicionarEquipamentosPanel.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/equipamentos/AdicionarEquipamentosPanel.java @@ -29,7 +29,7 @@ import siprp.database.cayenne.objects.HsRelatorioEquipamento; import siprp.logic.HigieneSegurancaLogic; import siprp.logic.node.EquipamentoNode; -import com.evolute.adt.TreeTools; +import com.evolute.utils.ui.trees.TreeTools; public class AdicionarEquipamentosPanel extends JPanel { diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/equipamentos/GerirEquipamentosPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/equipamentos/GerirEquipamentosPanel.java index 372508b6..d705d51d 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/equipamentos/GerirEquipamentosPanel.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/equipamentos/GerirEquipamentosPanel.java @@ -33,7 +33,7 @@ import leaf.ui.LeafUIConstants; import siprp.database.cayenne.objects.HsEquipamento; import siprp.logic.HigieneSegurancaLogic; -import com.evolute.adt.TreeTools; +import com.evolute.utils.ui.trees.TreeTools; public class GerirEquipamentosPanel extends JPanel implements CaretListener, LeafUIConstants { diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/importacao/Importador.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/importacao/Importador.java index 90352986..26e8a180 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/importacao/Importador.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/importacao/Importador.java @@ -35,7 +35,7 @@ public class Importador String pwd = "Typein"; DBManager dbm = new JDBCManager( url, user, pwd, 10, 8, 8, null ); - Importador importador = new Importador( dbm.getSharedExecuter() ); + Importador importador = new Importador( dbm.getSharedExecuter(Importador.class) ); // importador.converter(); importador.importar(); } diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/legislacao/AdicionarLegislacaoPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/legislacao/AdicionarLegislacaoPanel.java index 6e991074..22009bc3 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/legislacao/AdicionarLegislacaoPanel.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/legislacao/AdicionarLegislacaoPanel.java @@ -16,7 +16,7 @@ import siprp.database.cayenne.objects.HsLegislacaoEstabelecimento; import siprp.higiene.gestao.AdicionarPanel; import siprp.logic.HigieneSegurancaLogic; -import com.evolute.adt.TreeTools; +import com.evolute.utils.ui.trees.TreeTools; public class AdicionarLegislacaoPanel extends AdicionarPanel { diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/legislacao/GerirLegislacaoPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/legislacao/GerirLegislacaoPanel.java index 3794c1ed..7a7a7bf8 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/legislacao/GerirLegislacaoPanel.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/legislacao/GerirLegislacaoPanel.java @@ -35,8 +35,8 @@ import siprp.database.cayenne.objects.HsLegislacao; import siprp.database.cayenne.objects.HsLegislacaoCategoria; import siprp.logic.HigieneSegurancaLogic; -import com.evolute.adt.TreeTools; import com.evolute.adt.Validator; +import com.evolute.utils.ui.trees.TreeTools; public class GerirLegislacaoPanel extends JPanel implements LeafUIConstants { diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/normalizacao/AdicionarNormalizacaoPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/normalizacao/AdicionarNormalizacaoPanel.java index b3b48641..11df7767 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/normalizacao/AdicionarNormalizacaoPanel.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/normalizacao/AdicionarNormalizacaoPanel.java @@ -16,7 +16,7 @@ import siprp.database.cayenne.objects.HsNormalizacaoEstabelecimento; import siprp.higiene.gestao.AdicionarPanel; import siprp.logic.HigieneSegurancaLogic; -import com.evolute.adt.TreeTools; +import com.evolute.utils.ui.trees.TreeTools; public class AdicionarNormalizacaoPanel extends AdicionarPanel { diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/normalizacao/GerirNormalizacaoPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/normalizacao/GerirNormalizacaoPanel.java index 8f4202df..a77eaaf7 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/normalizacao/GerirNormalizacaoPanel.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/normalizacao/GerirNormalizacaoPanel.java @@ -37,7 +37,7 @@ import siprp.SIPRPSpellChecker; import siprp.database.cayenne.objects.HsNormalizacao; import siprp.logic.HigieneSegurancaLogic; -import com.evolute.adt.TreeTools; +import com.evolute.utils.ui.trees.TreeTools; public class GerirNormalizacaoPanel extends JPanel implements LeafUIConstants, CaretListener { diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/postos/AdicionarAreasPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/postos/AdicionarAreasPanel.java index d91b26fe..1851ae15 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/postos/AdicionarAreasPanel.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/postos/AdicionarAreasPanel.java @@ -28,7 +28,7 @@ import siprp.logic.HigieneSegurancaLogic; import siprp.logic.node.AreaNode; import siprp.logic.node.PostoNode; -import com.evolute.adt.TreeTools; +import com.evolute.utils.ui.trees.TreeTools; public class AdicionarAreasPanel extends JPanel { diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/postos/GerirAreasPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/postos/GerirAreasPanel.java index 5f6c0bfe..0468a490 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/postos/GerirAreasPanel.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/postos/GerirAreasPanel.java @@ -41,7 +41,7 @@ import siprp.database.cayenne.objects.HsPosto; import siprp.logic.node.AreaNode; import siprp.logic.node.PostoNode; -import com.evolute.adt.TreeTools; +import com.evolute.utils.ui.trees.TreeTools; public class GerirAreasPanel extends JPanel implements LeafUIConstants { diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/riscos/AdicionarRiscosPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/riscos/AdicionarRiscosPanel.java index 9d955856..8ceb203f 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/riscos/AdicionarRiscosPanel.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/riscos/AdicionarRiscosPanel.java @@ -31,7 +31,7 @@ import siprp.database.cayenne.objects.HsRiscoEmpresa; import siprp.logic.HigieneSegurancaLogic; import siprp.logic.node.NodeRisco; -import com.evolute.adt.TreeTools; +import com.evolute.utils.ui.trees.TreeTools; public class AdicionarRiscosPanel extends JPanel { diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/riscos/GerirRiscosPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/riscos/GerirRiscosPanel.java index 7b0089f2..88f7ae4f 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/riscos/GerirRiscosPanel.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/riscos/GerirRiscosPanel.java @@ -36,7 +36,7 @@ import siprp.database.cayenne.objects.HsRiscoMedida; import siprp.database.cayenne.objects.HsRiscoTema; import siprp.logic.HigieneSegurancaLogic; -import com.evolute.adt.TreeTools; +import com.evolute.utils.ui.trees.TreeTools; public class GerirRiscosPanel extends JPanel implements LeafUIConstants { diff --git a/trunk/SIPRPSoft/src/siprp/higiene/marcacoes/MarcacaoVisitaHSTPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/marcacoes/MarcacaoVisitaHSTPanel.java index 85e90fe9..a5dfdbe8 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/marcacoes/MarcacaoVisitaHSTPanel.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/marcacoes/MarcacaoVisitaHSTPanel.java @@ -4,6 +4,7 @@ import info.clearthought.layout.TableLayout; import info.clearthought.layout.TableLayoutConstraints; import java.util.Hashtable; +import java.util.Map; import javax.swing.BorderFactory; import javax.swing.JButton; @@ -12,7 +13,7 @@ import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; -import siprp.data.MarcacaoEstabelecimentoData; +import siprp.data.outer.MarcacoesEstabelecimentoData; import com.evolute.utils.Singleton; import com.evolute.utils.data.IDObject; @@ -34,7 +35,7 @@ public class MarcacaoVisitaHSTPanel { private static final long serialVersionUID = 1L; - private siprp.data.MarcacaoEstabelecimentoData marcacaoEstabelecimentoData; + private MarcacoesEstabelecimentoData marcacaoEstabelecimentosData; private final ComponentsHashtable components = new ComponentsHashtable(); protected final SQLExecuter EXECUTER; @@ -223,12 +224,12 @@ public class MarcacaoVisitaHSTPanel private void setupComponentsHashtable() { - components.putComponent( siprp.data.MarcacaoEstabelecimentoData.DATA, dataPanel ); - components.putComponent( siprp.data.MarcacaoEstabelecimentoData.DATA_RELATORIO, dataFichaPanel ); - components.putComponent( siprp.data.MarcacaoEstabelecimentoData.TECNICO_HST, tecnicoList ); - components.putComponent( siprp.data.MarcacaoEstabelecimentoData.TECNICO_SUPERIOR_HST, tecnicoSuperiorList ); - components.putComponent( siprp.data.MarcacaoEstabelecimentoData.ESTADO, estadoList ); - components.putComponent( siprp.data.MarcacaoEstabelecimentoData.OBSERVACOES, observacoesText ); + components.putComponent( MarcacoesEstabelecimentoData.DATA, dataPanel ); + components.putComponent( MarcacoesEstabelecimentoData.DATA_RELATORIO, dataFichaPanel ); + components.putComponent( MarcacoesEstabelecimentoData.TECNICO_HST, tecnicoList ); + components.putComponent( MarcacoesEstabelecimentoData.TECNICO_SUPERIOR_HST, tecnicoSuperiorList ); + components.putComponent( MarcacoesEstabelecimentoData.ESTADO, estadoList ); + components.putComponent( MarcacoesEstabelecimentoData.OBSERVACOES, observacoesText ); } public void fill( Object toFill ) @@ -238,13 +239,13 @@ public class MarcacaoVisitaHSTPanel { return; } - Hashtable data = null; + Map data = null; if( toFill instanceof PropertyObject ) { data = ( (PropertyObject) toFill ).getHashData(); - if( toFill instanceof siprp.data.MarcacaoEstabelecimentoData ) + if( toFill instanceof MarcacoesEstabelecimentoData ) { - marcacaoEstabelecimentoData = (siprp.data.MarcacaoEstabelecimentoData) toFill; + marcacaoEstabelecimentosData = (MarcacoesEstabelecimentoData) toFill; } } else if( toFill instanceof Hashtable ) @@ -255,10 +256,10 @@ public class MarcacaoVisitaHSTPanel { return; } - if( marcacaoEstabelecimentoData == null ) + if( marcacaoEstabelecimentosData == null ) { - marcacaoEstabelecimentoData = new siprp.data.MarcacaoEstabelecimentoData(); - marcacaoEstabelecimentoData.setHashData( data ); + marcacaoEstabelecimentosData = new MarcacoesEstabelecimentoData(); + marcacaoEstabelecimentosData.setHashData( data ); } PropertyObject po = (PropertyObject) toFill; String properties[] = (String[]) components.keySet().toArray( new String[ 0 ] ); @@ -267,24 +268,24 @@ public class MarcacaoVisitaHSTPanel public Object save() { - if( marcacaoEstabelecimentoData == null ) + if( marcacaoEstabelecimentosData == null ) { - marcacaoEstabelecimentoData = new siprp.data.MarcacaoEstabelecimentoData(); + marcacaoEstabelecimentosData = new MarcacoesEstabelecimentoData(); } - Hashtable data = marcacaoEstabelecimentoData.getHashData(); + Map data = marcacaoEstabelecimentosData.getHashData(); String properties[] = (String[]) components.keySet().toArray( new String[ 0 ] ); ComponentController.save( properties, data, components ); - if( !( marcacaoEstabelecimentoData instanceof PropertyObject ) ) + if( !( marcacaoEstabelecimentosData instanceof PropertyObject ) ) { return data; } - marcacaoEstabelecimentoData.setHashData( data ); - return marcacaoEstabelecimentoData; + marcacaoEstabelecimentosData.setHashData( data ); + return marcacaoEstabelecimentosData; } public void clear() { - marcacaoEstabelecimentoData = null; + marcacaoEstabelecimentosData = null; String properties[] = (String[]) components.keySet().toArray( new String[ 0 ] ); ComponentController.clear( properties, components ); } @@ -295,9 +296,9 @@ public class MarcacaoVisitaHSTPanel ComponentController.setEnabled( properties, enable, components ); } - public Class getDataClass() + public Class getDataClass() { - return siprp.data.MarcacaoEstabelecimentoData.class; + return MarcacoesEstabelecimentoData.class; } public JLabel getDataFichaLabel() diff --git a/trunk/SIPRPSoft/src/siprp/higiene/marcacoes/MarcacoesHigieneWindow.java b/trunk/SIPRPSoft/src/siprp/higiene/marcacoes/MarcacoesHigieneWindow.java index 32080991..bb767e3d 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/marcacoes/MarcacoesHigieneWindow.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/marcacoes/MarcacoesHigieneWindow.java @@ -32,16 +32,16 @@ import siprp.CompanyDataLoader; import siprp.SIPRPTracker; import siprp.SingletonConstants; import siprp.data.AvisoConstants; -import siprp.data.ContactoData; -import siprp.data.EstabelecimentoData; import siprp.data.Marcacao; -import siprp.data.MarcacaoEstabelecimentoData; +import siprp.data.outer.ContactosData; +import siprp.data.outer.EstabelecimentosData; +import siprp.data.outer.MarcacoesEstabelecimentoData; import siprp.higiene.HigieneDataProvider; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; import com.evolute.utils.arrays.Object2DArray; import com.evolute.utils.data.MappableObject; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.ui.DialogException; import com.evolute.utils.ui.panel.TableEditorPanel; import com.evolute.utils.ui.text.CopyPasteHandler; @@ -73,7 +73,7 @@ public class MarcacoesHigieneWindow extends EditorWindow protected TableEditorPanel marcacaoEditorPanel; protected HigieneDataProvider provider; - protected JDOProvider JDO; + protected ProviderInterface JDO; protected SIPRPTracker tracker; private Hashtable tecnicosHash; @@ -81,7 +81,7 @@ public class MarcacoesHigieneWindow extends EditorWindow protected Integer empresaID; protected String empresa; protected Integer estabelecimentoID; - protected EstabelecimentoData estabelecimento; + protected EstabelecimentosData estabelecimento; protected boolean editing = false; @@ -91,7 +91,7 @@ public class MarcacoesHigieneWindow extends EditorWindow { super( iPermissionArray ); this.provider = ( HigieneDataProvider ) HigieneDataProvider.getProvider(); - this.JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + this.JDO = ( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); this.tecnicosHash = new Hashtable(); this.setupComponents(); this.setSize( 800, 700 ); @@ -268,30 +268,30 @@ public class MarcacoesHigieneWindow extends EditorWindow switch( index ) { case INDEX_VISITA: - MarcacaoEstabelecimentoData visita = ( MarcacaoEstabelecimentoData ) marcacaoPanel.save(); - Date data = ( Date ) visita.get( MarcacaoEstabelecimentoData.DATA ); + MarcacoesEstabelecimentoData visita = ( MarcacoesEstabelecimentoData ) marcacaoPanel.save(); + Date data = ( Date ) visita.get( MarcacoesEstabelecimentoData.DATA ); if( data == null ) { JOptionPane.showMessageDialog( this, "Tem de preencher uma data para a visita.", "Erro", JOptionPane.ERROR_MESSAGE ); return false; } - visita.set( MarcacaoEstabelecimentoData.ESTABELECIMENTO, estabelecimento ); + visita.setToEstabelecimento_id( estabelecimento ); try { - visita.set( MarcacaoEstabelecimentoData.REALIZADA, - ( ( Integer )visita.get( MarcacaoEstabelecimentoData.ESTADO ) ).intValue() == + visita.set( MarcacoesEstabelecimentoData.REALIZADA, + ( ( Integer )visita.get( MarcacoesEstabelecimentoData.ESTADO ) ).intValue() == HigieneDataProvider.ESTADO_REALIZADO ? "y" : "n" ); - System.out.println( "DATA " + visita.get( MarcacaoEstabelecimentoData.DATA ) ); - Integer tecnico = ( Integer ) visita.get( MarcacaoEstabelecimentoData.TECNICO_HST ); + System.out.println( "DATA " + visita.get( MarcacoesEstabelecimentoData.DATA ) ); + Integer tecnico = ( Integer ) visita.get( MarcacoesEstabelecimentoData.TECNICO_HST ); if( tecnico != null && tecnico.intValue() < 0 ) { - visita.set( MarcacaoEstabelecimentoData.TECNICO_HST, null ); + visita.set( MarcacoesEstabelecimentoData.TECNICO_HST, null ); } - Integer tecnicoSup = ( Integer ) visita.get( MarcacaoEstabelecimentoData.TECNICO_SUPERIOR_HST ); + Integer tecnicoSup = ( Integer ) visita.get( MarcacoesEstabelecimentoData.TECNICO_SUPERIOR_HST ); if( tecnicoSup != null && tecnicoSup.intValue() < 0 ) { - visita.set( MarcacaoEstabelecimentoData.TECNICO_SUPERIOR_HST, null ); + visita.set( MarcacoesEstabelecimentoData.TECNICO_SUPERIOR_HST, null ); } visita.save(); } @@ -317,7 +317,7 @@ public class MarcacoesHigieneWindow extends EditorWindow switch( index ) { case INDEX_VISITA: - MarcacaoEstabelecimentoData visita = ( MarcacaoEstabelecimentoData ) marcacaoPanel.save(); + MarcacoesEstabelecimentoData visita = ( MarcacoesEstabelecimentoData ) marcacaoPanel.save(); try { visita.delete(); @@ -395,10 +395,10 @@ public class MarcacoesHigieneWindow extends EditorWindow try { empresa = provider.getEmpresa( empresaID ); - estabelecimento = ( EstabelecimentoData ) JDO.load( EstabelecimentoData.class, estabelecimentoID ); + estabelecimento = ( EstabelecimentosData ) JDO.load( EstabelecimentosData.class, estabelecimentoID ); // upperPanel.getEmpresaText().setText( empresa ); // upperPanel.getEstabelecimentoText().setText( estabelecimento ); -// upperPanel.getTrabalhadorText().setText( ( String ) trabalhador.get( TrabalhadorData.NOME ) ); +// upperPanel.getTrabalhadorText().setText( ( String ) trabalhador.get( TrabalhadoresData.NOME ) ); Object visitas[][] = provider.getVisitasEstabelecimento( estabelecimentoID ); if( visitas.length > 0 ) { @@ -423,10 +423,10 @@ public class MarcacoesHigieneWindow extends EditorWindow } try { - MarcacaoEstabelecimentoData visita = - ( MarcacaoEstabelecimentoData ) JDO.load( MarcacaoEstabelecimentoData.class, visitaID ); + MarcacoesEstabelecimentoData visita = + ( MarcacoesEstabelecimentoData ) JDO.load( MarcacoesEstabelecimentoData.class, visitaID ); marcacaoPanel.fill( visita ); - Date dataEmailVisita = ( Date ) visita.get( MarcacaoEstabelecimentoData.DATA_EMAIL ); + Date dataEmailVisita = ( Date ) visita.get( MarcacoesEstabelecimentoData.DATA_EMAIL ); if( dataEmailVisita != null ) { marcacaoPanel.getEmailButton().setText( "Enviar email (" + DATE_FORMAT.format( dataEmailVisita ) + ")" ); @@ -455,7 +455,7 @@ public class MarcacoesHigieneWindow extends EditorWindow protected void enviarEmailVisita() { - MarcacaoEstabelecimentoData visita = ( MarcacaoEstabelecimentoData ) marcacaoPanel.save(); + MarcacoesEstabelecimentoData visita = ( MarcacoesEstabelecimentoData ) marcacaoPanel.save(); String subject = ( String ) Singleton.getInstance( SingletonConstants.SUBJECT_VISITA ); String texto = ( String ) Singleton.getInstance( SingletonConstants.LETTER_VISITA ); @@ -465,7 +465,7 @@ public class MarcacoesHigieneWindow extends EditorWindow try { - enviarEmail( subject, texto, ( Date )visita.get( MarcacaoEstabelecimentoData.DATA ) ); + enviarEmail( subject, texto, ( Date )visita.get( MarcacoesEstabelecimentoData.DATA ) ); visita.set( Marcacao.DATA_EMAIL, today ); } catch( Exception ex ) @@ -477,20 +477,20 @@ public class MarcacoesHigieneWindow extends EditorWindow protected void enviarEmail( String subject, String texto, Date data ) throws Exception { - String sede = ( String )estabelecimento.get( EstabelecimentoData.NOME ); + String sede = ( String )estabelecimento.get( EstabelecimentosData.NOME ); String dataStr = DATE_FORMAT.format( data ); subject = subject.replaceAll( CompanyDataLoader.NOME, sede ); - String morada = ( String )estabelecimento.get( EstabelecimentoData.MORADA ); + String morada = ( String )estabelecimento.get( EstabelecimentosData.MORADA ); texto = texto.replaceAll( CompanyDataLoader.DATA, dataStr ); texto = texto.replaceAll( CompanyDataLoader.NOME, sede ); texto = texto.replaceAll( CompanyDataLoader.MORADA, morada ); - ContactoData contacto = ( ContactoData )estabelecimento.get( EstabelecimentoData.CONTACTO ); + ContactosData contacto = estabelecimento.toContacto_id(); String mail = ""; if( contacto != null ) { - mail = ( String )contacto.get( ContactoData.EMAIL ); + mail = ( String )contacto.get( ContactosData.EMAIL ); } if( System.getProperty( "os.name" ).startsWith( "Windows" ) ) diff --git a/trunk/SIPRPSoft/src/siprp/higiene/marcacoes/TecnicoEditor.java b/trunk/SIPRPSoft/src/siprp/higiene/marcacoes/TecnicoEditor.java index 89c0b1f0..02b6f334 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/marcacoes/TecnicoEditor.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/marcacoes/TecnicoEditor.java @@ -26,12 +26,11 @@ import javax.swing.ListSelectionModel; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; -import siprp.data.DisableDeleteHandler; -import siprp.data.TecnicoHSTData; +import siprp.data.outer.MarcacoesTecnicosHstData; import siprp.higiene.HigieneDataProvider; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.tables.BaseTable; import com.evolute.utils.tables.ColumnizedObjectArray; import com.evolute.utils.tables.VectorTableModel; @@ -49,13 +48,8 @@ public class TecnicoEditor extends CustomJDialog { private static final long serialVersionUID = 1L; - - static - { - TecnicoHSTData.registerOperationHandlerForClass( DisableDeleteHandler.INSTANCE, TecnicoHSTData.class ); - } - private JDOProvider JDO; + private ProviderInterface JDO; private HigieneDataProvider provider; private BaseTable table; private VectorTableModel model; @@ -76,7 +70,7 @@ public class TecnicoEditor extends CustomJDialog { super( owner, true ); provider = (HigieneDataProvider)HigieneDataProvider.getProvider(); - JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + JDO = ( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); setupComponents(); } @@ -297,24 +291,24 @@ public class TecnicoEditor extends CustomJDialog } try { - TecnicoHSTData tecnico; + MarcacoesTecnicosHstData tecnico; if( id != null ) { - tecnico = ( TecnicoHSTData ) JDO.load( TecnicoHSTData.class, id ); + tecnico = ( MarcacoesTecnicosHstData ) JDO.load( MarcacoesTecnicosHstData.class, id ); } else { - tecnico = new TecnicoHSTData(); + tecnico = new MarcacoesTecnicosHstData(); } - tecnico.set( TecnicoHSTData.IS_SUPERIOR, checkSuperior.isSelected() ? "y" : "n" ); - tecnico.set( TecnicoHSTData.NOME, nome ); - tecnico.set( TecnicoHSTData.NOME_PLAIN, nomePlain ); - tecnico.set( TecnicoHSTData.INICIAIS, iniciais ); - tecnico.set( TecnicoHSTData.IDENTIFICADOR, cor ); + tecnico.set( MarcacoesTecnicosHstData.IS_SUPERIOR, checkSuperior.isSelected() ? "y" : "n" ); + tecnico.set( MarcacoesTecnicosHstData.NOME, nome ); + tecnico.set( MarcacoesTecnicosHstData.NOME_PLAIN, nomePlain ); + tecnico.set( MarcacoesTecnicosHstData.INICIAIS, iniciais ); + tecnico.set( MarcacoesTecnicosHstData.IDENTIFICADOR, cor ); tecnico.save(); if( id == null ) { - id = (Integer)tecnico.get( TecnicoHSTData.ID ); + id = (Integer)tecnico.get( MarcacoesTecnicosHstData.ID ); } } catch( Exception ex ) diff --git a/trunk/SIPRPSoft/src/siprp/higiene/relatorio/GerirMedidasRelatorioPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/relatorio/GerirMedidasRelatorioPanel.java index c8991ae2..3c1439aa 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/relatorio/GerirMedidasRelatorioPanel.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/relatorio/GerirMedidasRelatorioPanel.java @@ -43,7 +43,7 @@ import siprp.logic.node.MedidaRelatorioNode; import siprp.logic.node.NodeRisco; import siprp.logic.node.RiscoRelatorioNode; -import com.evolute.adt.TreeTools; +import com.evolute.utils.ui.trees.TreeTools; public class GerirMedidasRelatorioPanel extends JPanel { diff --git a/trunk/SIPRPSoft/src/siprp/higiene/relatorio/VerAreasRelatorioPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/relatorio/VerAreasRelatorioPanel.java index 4e8434fe..63b8f654 100644 --- a/trunk/SIPRPSoft/src/siprp/higiene/relatorio/VerAreasRelatorioPanel.java +++ b/trunk/SIPRPSoft/src/siprp/higiene/relatorio/VerAreasRelatorioPanel.java @@ -24,7 +24,7 @@ import siprp.database.cayenne.objects.HsRelatorioPostoRisco; import siprp.logic.HigieneSegurancaLogic; import siprp.logic.node.PostoRelatorioNode; -import com.evolute.adt.TreeTools; +import com.evolute.utils.ui.trees.TreeTools; public class VerAreasRelatorioPanel extends JPanel { diff --git a/trunk/SIPRPSoft/src/siprp/impressaofichas/FichasPrinter.java b/trunk/SIPRPSoft/src/siprp/impressaofichas/FichasPrinter.java index 4a6d971e..c8c4f2c7 100644 --- a/trunk/SIPRPSoft/src/siprp/impressaofichas/FichasPrinter.java +++ b/trunk/SIPRPSoft/src/siprp/impressaofichas/FichasPrinter.java @@ -132,8 +132,8 @@ public class FichasPrinter extends Thread provider = ( ImpressaoFichasDataProvider ) ImpressaoFichasDataProvider.getProvider(); } // MetaObject exame = fdpProvider.load( fdpProvider.EXAMES, new DBKey( exameID ) ); -// ExameData exame = (ExameData) JDO.load( ExameData.class, exameID ); -// byte pdf[] = (byte []) exame.get( ExameData.PDF ); +// ExameData exame = (ExameData) JDO.load( ExamesData.class, exameID ); +// byte pdf[] = (byte []) exame.get( ExamesData.PDF ); if( /* !printFO( exameID ) && */!printPDF( exameID ) ) { diff --git a/trunk/SIPRPSoft/src/siprp/lembretes/LembretesDataProvider.java b/trunk/SIPRPSoft/src/siprp/lembretes/LembretesDataProvider.java index fdb92156..4bc0f8d9 100644 --- a/trunk/SIPRPSoft/src/siprp/lembretes/LembretesDataProvider.java +++ b/trunk/SIPRPSoft/src/siprp/lembretes/LembretesDataProvider.java @@ -16,7 +16,7 @@ import java.util.LinkedList; import java.util.List; import siprp.MedicinaConstants; -import siprp.data.ExameData; +import siprp.data.outer.ExamesData; import siprp.database.cayenne.objects.Empresas; import siprp.database.cayenne.objects.Estabelecimentos; import siprp.database.cayenne.objects.Trabalhadores; @@ -439,10 +439,10 @@ public class LembretesDataProvider } } - public void criarLembreteFicha( ExameData exame, Date when ) + public void criarLembreteFicha( ExamesData exame, Date when ) { Integer tipoID = getTipoLembreteIDByCodigo( LembretesConstants.CODE_MARCACOES ); - createLembreteForFicha( (Integer) exame.get( ExameData.ID ), tipoID, when ); + createLembreteForFicha( (Integer) exame.get( ExamesData.ID ), tipoID, when ); } } diff --git a/trunk/SIPRPSoft/src/siprp/lembretes/externos/LembretesExternosPanel.java b/trunk/SIPRPSoft/src/siprp/lembretes/externos/LembretesExternosPanel.java index 015f4cd5..6a828746 100755 --- a/trunk/SIPRPSoft/src/siprp/lembretes/externos/LembretesExternosPanel.java +++ b/trunk/SIPRPSoft/src/siprp/lembretes/externos/LembretesExternosPanel.java @@ -18,7 +18,7 @@ import javax.swing.JScrollPane; import siprp.lembretes.LembretesConstants; -import com.evolute.utils.jdo.JDOProvider; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.ui.panel.multipleactionlist.MultipleActionListPanel; @@ -33,7 +33,7 @@ public class LembretesExternosPanel extends JPanel private final Integer empresaID; private final Integer estabelecimentoID; - private JDOProvider JDO; + private ProviderInterface JDO; /** Creates a new instance of LembretesRemarcacaoPanel */ public LembretesExternosPanel( Integer empresaID, Integer estabelecimentoID ) diff --git a/trunk/SIPRPSoft/src/siprp/lembretes/marcacoes/LembretesMarcacaoPanel.java b/trunk/SIPRPSoft/src/siprp/lembretes/marcacoes/LembretesMarcacaoPanel.java index 8c1c3add..b6cba869 100755 --- a/trunk/SIPRPSoft/src/siprp/lembretes/marcacoes/LembretesMarcacaoPanel.java +++ b/trunk/SIPRPSoft/src/siprp/lembretes/marcacoes/LembretesMarcacaoPanel.java @@ -18,7 +18,7 @@ import javax.swing.JScrollPane; import siprp.lembretes.LembretesConstants; -import com.evolute.utils.jdo.JDOProvider; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.ui.panel.multipleactionlist.MultipleActionListPanel; @@ -33,7 +33,7 @@ public class LembretesMarcacaoPanel extends JPanel private final Integer empresaID; private final Integer estabelecimentoID; - private JDOProvider JDO; + private ProviderInterface JDO; /** Creates a new instance of LembretesRemarcacaoPanel */ public LembretesMarcacaoPanel( Integer empresaID, Integer estabelecimentoID ) diff --git a/trunk/SIPRPSoft/src/siprp/lembretes/marcacoes/actions/TratarCriacaoProcessoTrabalhadorAction.java b/trunk/SIPRPSoft/src/siprp/lembretes/marcacoes/actions/TratarCriacaoProcessoTrabalhadorAction.java index 130ca7ef..f903de92 100644 --- a/trunk/SIPRPSoft/src/siprp/lembretes/marcacoes/actions/TratarCriacaoProcessoTrabalhadorAction.java +++ b/trunk/SIPRPSoft/src/siprp/lembretes/marcacoes/actions/TratarCriacaoProcessoTrabalhadorAction.java @@ -26,9 +26,9 @@ import siprp.lembretes.LembretesDataProvider; import siprp.medicina.processo.logic.MedicinaProcessoLogic; import siprp.medicina.processo.ui.MedicinaProcessoWindow; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; import com.evolute.utils.data.IDObject; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.ui.DialogException; /** @@ -38,7 +38,7 @@ import com.evolute.utils.ui.DialogException; public class TratarCriacaoProcessoTrabalhadorAction extends AbstractAction { private LembretesDataProvider lembretesProvider; - private JDOProvider JDO; + private ProviderInterface JDO; private SIPRPTracker tracker; private Integer lembreteID; @@ -55,7 +55,7 @@ public class TratarCriacaoProcessoTrabalhadorAction extends AbstractAction { lembreteID = lembrete.getID(); lembretesProvider = LembretesDataProvider.getProvider(); - JDO = (JDOProvider) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + JDO = (ProviderInterface) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); } catch( Exception ex ) { diff --git a/trunk/SIPRPSoft/src/siprp/lembretes/remarcacoes/LembretesRemarcacaoPanel.java b/trunk/SIPRPSoft/src/siprp/lembretes/remarcacoes/LembretesRemarcacaoPanel.java index 6c90800a..301f1d11 100644 --- a/trunk/SIPRPSoft/src/siprp/lembretes/remarcacoes/LembretesRemarcacaoPanel.java +++ b/trunk/SIPRPSoft/src/siprp/lembretes/remarcacoes/LembretesRemarcacaoPanel.java @@ -18,7 +18,7 @@ import javax.swing.JScrollPane; import siprp.lembretes.LembretesConstants; -import com.evolute.utils.jdo.JDOProvider; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.ui.panel.multipleactionlist.MultipleActionListPanel; /** @@ -38,7 +38,7 @@ public class LembretesRemarcacaoPanel extends JPanel private final Integer empresaID; private final Integer estabelecimentoID; - private JDOProvider JDO; + private ProviderInterface JDO; /** Creates a new instance of LembretesRemarcacaoPanel */ public LembretesRemarcacaoPanel( Integer empresaID, Integer estabelecimentoID ) diff --git a/trunk/SIPRPSoft/src/siprp/lembretes/remarcacoes/actions/TratarMarcacaoTrabalhadorAction.java b/trunk/SIPRPSoft/src/siprp/lembretes/remarcacoes/actions/TratarMarcacaoTrabalhadorAction.java index ba2a445a..e51425ae 100644 --- a/trunk/SIPRPSoft/src/siprp/lembretes/remarcacoes/actions/TratarMarcacaoTrabalhadorAction.java +++ b/trunk/SIPRPSoft/src/siprp/lembretes/remarcacoes/actions/TratarMarcacaoTrabalhadorAction.java @@ -17,10 +17,10 @@ import javax.swing.JOptionPane; import siprp.SIPRPTracker; import siprp.SingletonConstants; -import siprp.data.EmpresaData; -import siprp.data.EstabelecimentoData; -import siprp.data.MarcacaoTrabalhadorData; -import siprp.data.TrabalhadorData; +import siprp.data.outer.EmpresasData; +import siprp.data.outer.EstabelecimentosData; +import siprp.data.outer.MarcacoesTrabalhadorData; +import siprp.data.outer.TrabalhadoresData; import siprp.database.cayenne.objects.Empresas; import siprp.database.cayenne.objects.Estabelecimentos; import siprp.database.cayenne.objects.Trabalhadores; @@ -35,9 +35,9 @@ import siprp.lembretes.LembretesDataProvider; import siprp.medicina.processo.logic.MedicinaProcessoLogic; import siprp.medicina.processo.ui.MedicinaProcessoWindow; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; import com.evolute.utils.data.IDObject; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.ui.DialogException; /** @@ -47,7 +47,7 @@ import com.evolute.utils.ui.DialogException; public class TratarMarcacaoTrabalhadorAction extends AbstractAction { private LembretesDataProvider lembretesProvider; - private JDOProvider JDO; + private ProviderInterface JDO; private SIPRPTracker tracker; private Integer lembreteID; @@ -64,7 +64,7 @@ public class TratarMarcacaoTrabalhadorAction extends AbstractAction { lembreteID = lembrete.getID(); lembretesProvider = LembretesDataProvider.getProvider(); - JDO = (JDOProvider) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + JDO = (ProviderInterface) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); } catch( Exception ex ) { @@ -88,17 +88,17 @@ public class TratarMarcacaoTrabalhadorAction extends AbstractAction if( lembrete.getMarcacaoTrabalhadorID() != null ) { // old model - MarcacaoTrabalhadorData marcacao = ( MarcacaoTrabalhadorData ) JDO.load( MarcacaoTrabalhadorData.class, lembrete.getMarcacaoTrabalhadorID() ); - TrabalhadorData trabalhador = ( TrabalhadorData ) marcacao.get( MarcacaoTrabalhadorData.TRABALHADOR ); - EstabelecimentoData estabelecimento = ( EstabelecimentoData ) trabalhador.get( TrabalhadorData.ESTABELECIMENTO ); - EmpresaData empresa = ( EmpresaData ) estabelecimento.get( EstabelecimentoData.EMPRESA ); + MarcacoesTrabalhadorData marcacao = ( MarcacoesTrabalhadorData ) JDO.load( MarcacoesTrabalhadorData.class, lembrete.getMarcacaoTrabalhadorID() ); + TrabalhadoresData trabalhador = marcacao.toTrabalhador_id(); + EstabelecimentosData estabelecimento = trabalhador.toEstabelecimento_id(); + EmpresasData empresa = estabelecimento.toEmpresa_id(); lembretesProvider.apagarLembreteByID( lembreteID ); setEnabled( false ); tracker.getMedicinaWindow().setVisible( true ); - tracker.getMedicinaWindow().setEmpresaAndEstabelecimentoAndTrabalhador( (Integer) empresa.get( EmpresaData.ID ), - ( Integer ) estabelecimento.get( EstabelecimentoData.ID ), - ( Integer ) trabalhador.get( TrabalhadorData.ID ) ); + tracker.getMedicinaWindow().setEmpresaAndEstabelecimentoAndTrabalhador( (Integer) empresa.get( EmpresasData.ID ), + ( Integer ) estabelecimento.get( EstabelecimentosData.ID ), + ( Integer ) trabalhador.get( TrabalhadoresData.ID ) ); } else { diff --git a/trunk/SIPRPSoft/src/siprp/logic/HigieneSegurancaLogic.java b/trunk/SIPRPSoft/src/siprp/logic/HigieneSegurancaLogic.java index 1afb3e04..7a64df6d 100644 --- a/trunk/SIPRPSoft/src/siprp/logic/HigieneSegurancaLogic.java +++ b/trunk/SIPRPSoft/src/siprp/logic/HigieneSegurancaLogic.java @@ -49,8 +49,8 @@ import siprp.logic.node.NodeRiscoTema; import siprp.logic.node.PostoNode; import siprp.logic.node.PostoRelatorioNode; -import com.evolute.adt.TreeTools; import com.evolute.utils.error.ErrorLogger; +import com.evolute.utils.ui.trees.TreeTools; public class HigieneSegurancaLogic { diff --git a/trunk/SIPRPSoft/src/siprp/medicina/MarcacaoConsultaPanel.java b/trunk/SIPRPSoft/src/siprp/medicina/MarcacaoConsultaPanel.java index 73a30584..f4985f4d 100644 --- a/trunk/SIPRPSoft/src/siprp/medicina/MarcacaoConsultaPanel.java +++ b/trunk/SIPRPSoft/src/siprp/medicina/MarcacaoConsultaPanel.java @@ -5,6 +5,7 @@ import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.util.Hashtable; +import java.util.Map; import javax.swing.BorderFactory; import javax.swing.JButton; @@ -13,6 +14,8 @@ import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; +import siprp.data.outer.MarcacoesTrabalhadorData; + import com.evolute.utils.Singleton; import com.evolute.utils.data.IDObject; import com.evolute.utils.data.MappableObject; @@ -31,7 +34,7 @@ public class MarcacaoConsultaPanel extends JPanel implements ControllableComponent, DataClassAware { - private siprp.data.MarcacaoTrabalhadorData marcacaoTrabalhadorData; + private MarcacoesTrabalhadorData marcacaoTrabalhadoresData; private final ComponentsHashtable components = new ComponentsHashtable(); protected final SQLExecuter EXECUTER; @@ -196,11 +199,11 @@ public class MarcacaoConsultaPanel private void setupComponentsHashtable() { - components.putComponent( siprp.data.MarcacaoTrabalhadorData.DATA, dataPanel ); - components.putComponent( siprp.data.MarcacaoTrabalhadorData.DATA_RELATORIO, dataFichaPanel ); - components.putComponent( siprp.data.MarcacaoTrabalhadorData.MOTIVO, tipoList ); - components.putComponent( siprp.data.MarcacaoTrabalhadorData.ESTADO, estadoList ); - components.putComponent( siprp.data.MarcacaoTrabalhadorData.OBSERVACOES, observacoesText ); + components.putComponent( MarcacoesTrabalhadorData.DATA, dataPanel ); + components.putComponent( MarcacoesTrabalhadorData.DATA_RELATORIO, dataFichaPanel ); + components.putComponent( MarcacoesTrabalhadorData.MOTIVO, tipoList ); + components.putComponent( MarcacoesTrabalhadorData.ESTADO, estadoList ); + components.putComponent( MarcacoesTrabalhadorData.OBSERVACOES, observacoesText ); } public void fill( Object toFill ) @@ -210,13 +213,13 @@ public class MarcacaoConsultaPanel { return; } - Hashtable data = null; + Map data = null; if( toFill instanceof PropertyObject ) { data = ( (PropertyObject) toFill ).getHashData(); - if( toFill instanceof siprp.data.MarcacaoTrabalhadorData ) + if( toFill instanceof MarcacoesTrabalhadorData ) { - marcacaoTrabalhadorData = (siprp.data.MarcacaoTrabalhadorData) toFill; + marcacaoTrabalhadoresData = (MarcacoesTrabalhadorData) toFill; } } else if( toFill instanceof Hashtable ) @@ -227,10 +230,10 @@ public class MarcacaoConsultaPanel { return; } - if( marcacaoTrabalhadorData == null ) + if( marcacaoTrabalhadoresData == null ) { - marcacaoTrabalhadorData = new siprp.data.MarcacaoTrabalhadorData(); - marcacaoTrabalhadorData.setHashData( data ); + marcacaoTrabalhadoresData = new MarcacoesTrabalhadorData(); + marcacaoTrabalhadoresData.setHashData( data ); } PropertyObject po = (PropertyObject) toFill; String properties[] = (String[]) components.keySet().toArray( new String[ 0 ] ); @@ -239,24 +242,24 @@ public class MarcacaoConsultaPanel public Object save() { - if( marcacaoTrabalhadorData == null ) + if( marcacaoTrabalhadoresData == null ) { - marcacaoTrabalhadorData = new siprp.data.MarcacaoTrabalhadorData(); + marcacaoTrabalhadoresData = new MarcacoesTrabalhadorData(); } - Hashtable data = marcacaoTrabalhadorData.getHashData(); + Map data = marcacaoTrabalhadoresData.getHashData(); String properties[] = (String[]) components.keySet().toArray( new String[ 0 ] ); ComponentController.save( properties, data, components ); - if( !( marcacaoTrabalhadorData instanceof PropertyObject ) ) + if( !( marcacaoTrabalhadoresData instanceof PropertyObject ) ) { return data; } - marcacaoTrabalhadorData.setHashData( data ); - return marcacaoTrabalhadorData; + marcacaoTrabalhadoresData.setHashData( data ); + return marcacaoTrabalhadoresData; } public void clear() { - marcacaoTrabalhadorData = null; + marcacaoTrabalhadoresData = null; String properties[] = (String[]) components.keySet().toArray( new String[ 0 ] ); ComponentController.clear( properties, components ); } @@ -269,7 +272,7 @@ public class MarcacaoConsultaPanel public Class getDataClass() { - return siprp.data.MarcacaoTrabalhadorData.class; + return MarcacoesTrabalhadorData.class; } public JLabel getDataFichaLabel() diff --git a/trunk/SIPRPSoft/src/siprp/medicina/MarcacaoExamePanel.java b/trunk/SIPRPSoft/src/siprp/medicina/MarcacaoExamePanel.java index 2c4bb581..3c0222b5 100644 --- a/trunk/SIPRPSoft/src/siprp/medicina/MarcacaoExamePanel.java +++ b/trunk/SIPRPSoft/src/siprp/medicina/MarcacaoExamePanel.java @@ -5,6 +5,7 @@ import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.util.Hashtable; +import java.util.Map; import javax.swing.BorderFactory; import javax.swing.JButton; @@ -13,6 +14,8 @@ import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; +import siprp.data.outer.MarcacoesTrabalhadorData; + import com.evolute.utils.Singleton; import com.evolute.utils.data.IDObject; import com.evolute.utils.data.MappableObject; @@ -32,7 +35,7 @@ public class MarcacaoExamePanel extends JPanel implements ControllableComponent, DataClassAware { - private siprp.data.MarcacaoTrabalhadorData marcacaoTrabalhadorData; + private MarcacoesTrabalhadorData marcacaoTrabalhadoresData; private final ComponentsHashtable components = new ComponentsHashtable(); protected final SQLExecuter EXECUTER; @@ -167,9 +170,9 @@ public class MarcacaoExamePanel private void setupComponentsHashtable() { - components.putComponent( siprp.data.MarcacaoTrabalhadorData.DATA, dataPanel ); - components.putComponent( siprp.data.MarcacaoTrabalhadorData.ESTADO, estadoList ); - components.putComponent( siprp.data.MarcacaoTrabalhadorData.OBSERVACOES, observacoesText ); + components.putComponent( MarcacoesTrabalhadorData.DATA, dataPanel ); + components.putComponent( MarcacoesTrabalhadorData.ESTADO, estadoList ); + components.putComponent( MarcacoesTrabalhadorData.OBSERVACOES, observacoesText ); } public void fill( Object toFill ) @@ -179,13 +182,13 @@ public class MarcacaoExamePanel { return; } - Hashtable data = null; + Map data = null; if( toFill instanceof PropertyObject ) { data = ( (PropertyObject) toFill ).getHashData(); - if( toFill instanceof siprp.data.MarcacaoTrabalhadorData ) + if( toFill instanceof MarcacoesTrabalhadorData ) { - marcacaoTrabalhadorData = (siprp.data.MarcacaoTrabalhadorData) toFill; + marcacaoTrabalhadoresData = (MarcacoesTrabalhadorData) toFill; } } else if( toFill instanceof Hashtable ) @@ -196,10 +199,10 @@ public class MarcacaoExamePanel { return; } - if( marcacaoTrabalhadorData == null ) + if( marcacaoTrabalhadoresData == null ) { - marcacaoTrabalhadorData = new siprp.data.MarcacaoTrabalhadorData(); - marcacaoTrabalhadorData.setHashData( data ); + marcacaoTrabalhadoresData = new MarcacoesTrabalhadorData(); + marcacaoTrabalhadoresData.setHashData( data ); } PropertyObject po = (PropertyObject) toFill; String properties[] = (String[]) components.keySet().toArray( new String[ 0 ] ); @@ -208,24 +211,24 @@ public class MarcacaoExamePanel public Object save() { - if( marcacaoTrabalhadorData == null ) + if( marcacaoTrabalhadoresData == null ) { - marcacaoTrabalhadorData = new siprp.data.MarcacaoTrabalhadorData(); + marcacaoTrabalhadoresData = new MarcacoesTrabalhadorData(); } - Hashtable data = marcacaoTrabalhadorData.getHashData(); + Map data = marcacaoTrabalhadoresData.getHashData(); String properties[] = (String[]) components.keySet().toArray( new String[ 0 ] ); ComponentController.save( properties, data, components ); - if( !( marcacaoTrabalhadorData instanceof PropertyObject ) ) + if( !( marcacaoTrabalhadoresData instanceof PropertyObject ) ) { return data; } - marcacaoTrabalhadorData.setHashData( data ); - return marcacaoTrabalhadorData; + marcacaoTrabalhadoresData.setHashData( data ); + return marcacaoTrabalhadoresData; } public void clear() { - marcacaoTrabalhadorData = null; + marcacaoTrabalhadoresData = null; String properties[] = (String[]) components.keySet().toArray( new String[ 0 ] ); ComponentController.clear( properties, components ); } @@ -238,7 +241,7 @@ public class MarcacaoExamePanel public Class getDataClass() { - return siprp.data.MarcacaoTrabalhadorData.class; + return MarcacoesTrabalhadorData.class; } public JLabel getDataLabel() diff --git a/trunk/SIPRPSoft/src/siprp/medicina/MarcacoesMedicinaHandler.java b/trunk/SIPRPSoft/src/siprp/medicina/MarcacoesMedicinaHandler.java index 057a77f5..e6d84c8f 100644 --- a/trunk/SIPRPSoft/src/siprp/medicina/MarcacoesMedicinaHandler.java +++ b/trunk/SIPRPSoft/src/siprp/medicina/MarcacoesMedicinaHandler.java @@ -12,11 +12,11 @@ package siprp.medicina; import java.util.Date; import siprp.data.Marcacao; -import siprp.data.MarcacaoTrabalhadorData; -import siprp.data.TrabalhadorData; +import siprp.data.outer.MarcacoesTrabalhadorData; +import siprp.data.outer.TrabalhadoresData; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; -import com.evolute.utils.jdo.JDOProvider; /** * Classe auxiliar para tratamento de marcações de Medicina. @@ -49,44 +49,44 @@ public class MarcacoesMedicinaHandler Integer idCorrente; Integer idSeguinte; MedicinaDataProvider provider = ( MedicinaDataProvider ) MedicinaDataProvider.getProvider(); - JDOProvider JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); - TrabalhadorData trabalhador = (TrabalhadorData)JDO.load( TrabalhadorData.class, trabalhadorID ); + ProviderInterface JDO = ( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + TrabalhadoresData trabalhador = (TrabalhadoresData)JDO.load( TrabalhadoresData.class, trabalhadorID ); idCorrente = provider.getConsultaIDByTrabalhadorMotivoAndDate( trabalhadorID, motivoCorrente, dataCorrente ); - MarcacaoTrabalhadorData consultaCorrente; + MarcacoesTrabalhadorData consultaCorrente; if( idCorrente == null ) { - consultaCorrente = new MarcacaoTrabalhadorData(); - consultaCorrente.set( MarcacaoTrabalhadorData.TRABALHADOR, trabalhador ); - consultaCorrente.set( MarcacaoTrabalhadorData.TIPO, new Integer( MarcacaoTrabalhadorData.TIPO_CONSULTA ) ); + consultaCorrente = new MarcacoesTrabalhadorData(); + consultaCorrente.setToTrabalhador_id( trabalhador ); + consultaCorrente.set( MarcacoesTrabalhadorData.TIPO, new Integer( MarcacoesTrabalhadorData.TIPO_CONSULTA ) ); consultaCorrente.set( Marcacao.DATA, dataCorrente ); - consultaCorrente.set( MarcacaoTrabalhadorData.MOTIVO, motivoCorrente ); + consultaCorrente.set( MarcacoesTrabalhadorData.MOTIVO, motivoCorrente ); } else { - consultaCorrente = ( MarcacaoTrabalhadorData ) JDO.load( MarcacaoTrabalhadorData.class, idCorrente ); + consultaCorrente = ( MarcacoesTrabalhadorData ) JDO.load( MarcacoesTrabalhadorData.class, idCorrente ); } consultaCorrente.set( Marcacao.REALIZADA, "y" ); - consultaCorrente.set( MarcacaoTrabalhadorData.ESTADO, new Integer( siprp.medicina.MedicinaDataProvider.ESTADO_REALIZADO ) ); + consultaCorrente.set( MarcacoesTrabalhadorData.ESTADO, new Integer( siprp.medicina.MedicinaDataProvider.ESTADO_REALIZADO ) ); consultaCorrente.save(); idSeguinte = provider.getConsultaIDByTrabalhadorMotivoAndDate( trabalhadorID, motivoSeguinte, dataSeguinte ); if( idSeguinte == null ) { idSeguinte = provider.getProximaConsultaIDByTrabalhadorMotivoAndDate( trabalhadorID, motivoSeguinte, dataCorrente ); - MarcacaoTrabalhadorData consultaSeguinte; + MarcacoesTrabalhadorData consultaSeguinte; if( idSeguinte == null ) { - consultaSeguinte = new MarcacaoTrabalhadorData(); - consultaSeguinte.set( MarcacaoTrabalhadorData.TRABALHADOR, trabalhador ); - consultaSeguinte.set( MarcacaoTrabalhadorData.TIPO, new Integer( MarcacaoTrabalhadorData.TIPO_CONSULTA ) ); - consultaSeguinte.set( MarcacaoTrabalhadorData.MOTIVO, motivoSeguinte ); + consultaSeguinte = new MarcacoesTrabalhadorData(); + consultaSeguinte.setToTrabalhador_id( trabalhador ); + consultaSeguinte.set( MarcacoesTrabalhadorData.TIPO, new Integer( MarcacoesTrabalhadorData.TIPO_CONSULTA ) ); + consultaSeguinte.set( MarcacoesTrabalhadorData.MOTIVO, motivoSeguinte ); consultaSeguinte.set( Marcacao.REALIZADA, "y" ); - consultaSeguinte.set( MarcacaoTrabalhadorData.ESTADO, new Integer( siprp.medicina.MedicinaDataProvider.ESTADO_POR_REALIZAR ) ); + consultaSeguinte.set( MarcacoesTrabalhadorData.ESTADO, new Integer( siprp.medicina.MedicinaDataProvider.ESTADO_POR_REALIZAR ) ); } else { - consultaSeguinte = ( MarcacaoTrabalhadorData ) JDO.load( MarcacaoTrabalhadorData.class, idSeguinte ); + consultaSeguinte = ( MarcacoesTrabalhadorData ) JDO.load( MarcacoesTrabalhadorData.class, idSeguinte ); } consultaSeguinte.set( Marcacao.DATA, dataSeguinte ); consultaSeguinte.save(); diff --git a/trunk/SIPRPSoft/src/siprp/medicina/MedicinaWindow.java b/trunk/SIPRPSoft/src/siprp/medicina/MedicinaWindow.java index 56c24078..79a12e3d 100644 --- a/trunk/SIPRPSoft/src/siprp/medicina/MedicinaWindow.java +++ b/trunk/SIPRPSoft/src/siprp/medicina/MedicinaWindow.java @@ -32,16 +32,16 @@ import siprp.FichaDataProvider; import siprp.SIPRPTracker; import siprp.SingletonConstants; import siprp.data.AvisoConstants; -import siprp.data.ContactoData; -import siprp.data.EstabelecimentoData; import siprp.data.Marcacao; -import siprp.data.MarcacaoTrabalhadorData; -import siprp.data.TrabalhadorData; +import siprp.data.outer.ContactosData; +import siprp.data.outer.EstabelecimentosData; +import siprp.data.outer.MarcacoesTrabalhadorData; +import siprp.data.outer.TrabalhadoresData; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; import com.evolute.utils.arrays.Object2DArray; import com.evolute.utils.data.IDObject; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.ui.DialogException; import com.evolute.utils.ui.panel.CheckBoxPanel; import com.evolute.utils.ui.panel.TableEditorPanel; @@ -74,7 +74,7 @@ public class MedicinaWindow extends TabbedWindow protected MedicinaDataProvider provider; protected FichaDataProvider fichaProvider; - protected JDOProvider JDO; + protected ProviderInterface JDO; protected SIPRPTracker tracker; protected MedicinaUpperPanel upperPanel; @@ -89,7 +89,7 @@ public class MedicinaWindow extends TabbedWindow protected Integer estabelecimentoID; protected String estabelecimento; protected Integer trabalhadorID; - protected TrabalhadorData trabalhador; + protected TrabalhadoresData trabalhador; protected boolean estado[] = new boolean[]{ false, false }; /** Creates a new instance of MedicinaWindow */ @@ -100,7 +100,7 @@ public class MedicinaWindow extends TabbedWindow upperPanel = ( MedicinaUpperPanel ) getUpperPanel(); provider = ( MedicinaDataProvider ) MedicinaDataProvider.getProvider(); fichaProvider = ( FichaDataProvider ) FichaDataProvider.getProvider(); - JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + JDO = ( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); setupComponents(); maximizeOnNextActivate(); } @@ -242,24 +242,24 @@ public class MedicinaWindow extends TabbedWindow switch( index ) { case INDEX_EXAME: - MarcacaoTrabalhadorData exame = ( MarcacaoTrabalhadorData ) marcacaoExamePanel.save(); - data = ( Date ) exame.get( MarcacaoTrabalhadorData.DATA ); + MarcacoesTrabalhadorData exame = ( MarcacoesTrabalhadorData ) marcacaoExamePanel.save(); + data = ( Date ) exame.get( MarcacoesTrabalhadorData.DATA ); if( data == null ) { JOptionPane.showMessageDialog( this, "Tem de preencher uma data para os exames.", "Erro", JOptionPane.ERROR_MESSAGE ); return false; } - exame.set( MarcacaoTrabalhadorData.TIPO, + exame.set( MarcacoesTrabalhadorData.TIPO, new Integer( Marcacao.TIPO_MARCACAO_TRABALHADOR_EXAMES ) ); - exame.set( MarcacaoTrabalhadorData.TRABALHADOR, trabalhador ); + exame.setToTrabalhador_id( trabalhador ); try { - exame.set( MarcacaoTrabalhadorData.REALIZADA, - ( ( Integer )exame.get( MarcacaoTrabalhadorData.ESTADO ) ).intValue() == + exame.set( MarcacoesTrabalhadorData.REALIZADA, + ( ( Integer )exame.get( MarcacoesTrabalhadorData.ESTADO ) ).intValue() == provider.ESTADO_REALIZADO ? "y" : "n" ); exame.save(); - Integer exameID = ( Integer ) exame.get( MarcacaoTrabalhadorData.ID ); + Integer exameID = ( Integer ) exame.get( MarcacoesTrabalhadorData.ID ); Integer detalhesRealizados[] = detalhesExamePanel.getSelected(); provider.setDetalhesRealziadosForMarcacao( exameID, detalhesRealizados ); } @@ -272,21 +272,21 @@ public class MedicinaWindow extends TabbedWindow break; case INDEX_CONSULTA: - MarcacaoTrabalhadorData consulta = ( MarcacaoTrabalhadorData ) marcacaoConsultaPanel.save(); - data = ( Date ) consulta.get( MarcacaoTrabalhadorData.DATA ); + MarcacoesTrabalhadorData consulta = ( MarcacoesTrabalhadorData ) marcacaoConsultaPanel.save(); + data = ( Date ) consulta.get( MarcacoesTrabalhadorData.DATA ); if( data == null ) { JOptionPane.showMessageDialog( this, "Tem de preencher uma data para a consulta.", "Erro", JOptionPane.ERROR_MESSAGE ); return false; } - consulta.set( MarcacaoTrabalhadorData.TIPO, + consulta.set( MarcacoesTrabalhadorData.TIPO, new Integer( Marcacao.TIPO_MARCACAO_TRABALHADOR_CONSULTA ) ); - consulta.set( MarcacaoTrabalhadorData.TRABALHADOR, trabalhador ); + consulta.setToTrabalhador_id( trabalhador ); try { - consulta.set( MarcacaoTrabalhadorData.REALIZADA, - ( ( Integer )consulta.get( MarcacaoTrabalhadorData.ESTADO ) ).intValue() == + consulta.set( MarcacoesTrabalhadorData.REALIZADA, + ( ( Integer )consulta.get( MarcacoesTrabalhadorData.ESTADO ) ).intValue() == provider.ESTADO_REALIZADO ? "y" : "n" ); consulta.save(); } @@ -310,7 +310,7 @@ public class MedicinaWindow extends TabbedWindow switch( index ) { case INDEX_CONSULTA: - MarcacaoTrabalhadorData consulta = ( MarcacaoTrabalhadorData ) marcacaoConsultaPanel.save(); + MarcacoesTrabalhadorData consulta = ( MarcacoesTrabalhadorData ) marcacaoConsultaPanel.save(); try { consulta.delete(); @@ -323,7 +323,7 @@ public class MedicinaWindow extends TabbedWindow break; case INDEX_EXAME: - MarcacaoTrabalhadorData exame = ( MarcacaoTrabalhadorData ) marcacaoExamePanel.save(); + MarcacoesTrabalhadorData exame = ( MarcacoesTrabalhadorData ) marcacaoExamePanel.save(); try { exame.delete(); @@ -470,10 +470,10 @@ public class MedicinaWindow extends TabbedWindow provider.getEmpresaEstabelecimento( empresaID, estabelecimentoID ); empresa = nomes[ 0 ]; estabelecimento = nomes[ 1 ]; - trabalhador = ( TrabalhadorData ) JDO.load( TrabalhadorData.class, trabalhadorID ); + trabalhador = ( TrabalhadoresData ) JDO.load( TrabalhadoresData.class, trabalhadorID ); // upperPanel.getEmpresaText().setText( empresa ); // upperPanel.getEstabelecimentoText().setText( estabelecimento ); -// upperPanel.getTrabalhadorText().setText( ( String ) trabalhador.get( TrabalhadorData.NOME ) ); +// upperPanel.getTrabalhadorText().setText( ( String ) trabalhador.get( TrabalhadoresData.NOME ) ); IDObject detalhesExame[] = provider.getDetalhesValidosTrabalhador( empresaID, trabalhadorID ); detalhesExamePanel = new CheckBoxPanel( detalhesExame ); JPanel detalhesExameOuterPanel = marcacaoExamePanel.getDetalhesPanel(); @@ -514,10 +514,10 @@ public class MedicinaWindow extends TabbedWindow } try { - MarcacaoTrabalhadorData exame = - ( MarcacaoTrabalhadorData ) JDO.load( MarcacaoTrabalhadorData.class, exameID ); + MarcacoesTrabalhadorData exame = + ( MarcacoesTrabalhadorData ) JDO.load( MarcacoesTrabalhadorData.class, exameID ); marcacaoExamePanel.fill( exame ); - Date dataEmailExame = ( Date ) exame.get( MarcacaoTrabalhadorData.DATA_EMAIL ); + Date dataEmailExame = ( Date ) exame.get( MarcacoesTrabalhadorData.DATA_EMAIL ); if( dataEmailExame != null ) { marcacaoExamePanel.getEmailButton().setText( "Enviar email (" + DATE_FORMAT.format( dataEmailExame ) + ")" ); @@ -543,10 +543,10 @@ public class MedicinaWindow extends TabbedWindow } try { - MarcacaoTrabalhadorData consulta = - ( MarcacaoTrabalhadorData ) JDO.load( MarcacaoTrabalhadorData.class, consultaID ); + MarcacoesTrabalhadorData consulta = + ( MarcacoesTrabalhadorData ) JDO.load( MarcacoesTrabalhadorData.class, consultaID ); marcacaoConsultaPanel.fill( consulta ); - Date dataEmailConsulta = ( Date ) consulta.get( MarcacaoTrabalhadorData.DATA_EMAIL ); + Date dataEmailConsulta = ( Date ) consulta.get( MarcacoesTrabalhadorData.DATA_EMAIL ); if( dataEmailConsulta != null ) { marcacaoConsultaPanel.getEmailButton().setText( "Enviar email (" + DATE_FORMAT.format( dataEmailConsulta ) + ")" ); @@ -579,7 +579,7 @@ public class MedicinaWindow extends TabbedWindow protected void enviarEmailConsulta() { - MarcacaoTrabalhadorData consulta = ( MarcacaoTrabalhadorData ) marcacaoConsultaPanel.save(); + MarcacoesTrabalhadorData consulta = ( MarcacoesTrabalhadorData ) marcacaoConsultaPanel.save(); String subject = ( String ) Singleton.getInstance( SingletonConstants.SUBJECT_CONSULTA ); String texto = ( String ) Singleton.getInstance( SingletonConstants.LETTER_CONSULTA ); @@ -589,7 +589,7 @@ public class MedicinaWindow extends TabbedWindow try { - enviarEmail( subject, texto, ( Date )consulta.get( MarcacaoTrabalhadorData.DATA ) ); + enviarEmail( subject, texto, ( Date )consulta.get( MarcacoesTrabalhadorData.DATA ) ); consulta.set( Marcacao.DATA_EMAIL, today ); } catch( Exception ex ) @@ -600,7 +600,7 @@ public class MedicinaWindow extends TabbedWindow protected void enviarEmailExame() { - MarcacaoTrabalhadorData exame = ( MarcacaoTrabalhadorData ) marcacaoExamePanel.save(); + MarcacoesTrabalhadorData exame = ( MarcacoesTrabalhadorData ) marcacaoExamePanel.save(); String subject = ( String ) Singleton.getInstance( SingletonConstants.SUBJECT_EXAMES ); String texto = ( String ) Singleton.getInstance( SingletonConstants.LETTER_EXAMES ); @@ -610,7 +610,7 @@ public class MedicinaWindow extends TabbedWindow try { - enviarEmail( subject, texto, ( Date )exame.get( MarcacaoTrabalhadorData.DATA ) ); + enviarEmail( subject, texto, ( Date )exame.get( MarcacoesTrabalhadorData.DATA ) ); exame.set( Marcacao.DATA_EMAIL, today ); } catch( Exception ex ) @@ -622,20 +622,20 @@ public class MedicinaWindow extends TabbedWindow protected void enviarEmail( String subject, String texto, Date data ) throws Exception { - String nome = ( String ) trabalhador.get( TrabalhadorData.NOME ); + String nome = ( String ) trabalhador.get( TrabalhadoresData.NOME ); String dataStr = DATE_FORMAT.format( data ); subject = subject.replaceAll( CompanyDataLoader.NOME, nome ); texto = texto.replaceAll( CompanyDataLoader.DATA, dataStr ); texto = texto.replaceAll( CompanyDataLoader.NOME, nome ); - EstabelecimentoData estabelecimento = - ( EstabelecimentoData ) JDO.load( EstabelecimentoData.class, estabelecimentoID ); - ContactoData contacto = ( ContactoData )estabelecimento.get( EstabelecimentoData.CONTACTO ); + EstabelecimentosData estabelecimento = + ( EstabelecimentosData ) JDO.load( EstabelecimentosData.class, estabelecimentoID ); + ContactosData contacto = ( ContactosData ) estabelecimento.toContacto_id(); String mail = ""; if( contacto != null ) { - mail = ( String )contacto.get( ContactoData.EMAIL ); + mail = ( String )contacto.getEmail(); } if( System.getProperty( "os.name" ).startsWith( "Windows" ) ) diff --git a/trunk/SIPRPSoft/src/siprp/medicina/prestadores/PrestadoresDataProvider.java b/trunk/SIPRPSoft/src/siprp/medicina/prestadores/PrestadoresDataProvider.java index 6cb7b3ae..35b50313 100644 --- a/trunk/SIPRPSoft/src/siprp/medicina/prestadores/PrestadoresDataProvider.java +++ b/trunk/SIPRPSoft/src/siprp/medicina/prestadores/PrestadoresDataProvider.java @@ -9,9 +9,10 @@ package siprp.medicina.prestadores; -import siprp.data.ContactoData; -import siprp.medicina.prestadores.data.PrestadoresData; +import siprp.data.outer.ContactosData; +import siprp.data.outer.PrestadoresData; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; import com.evolute.utils.arrays.Object2DArray; import com.evolute.utils.arrays.Virtual2DArray; @@ -19,7 +20,6 @@ import com.evolute.utils.data.IDObject; import com.evolute.utils.data.MappableObject; import com.evolute.utils.db.DBManager; import com.evolute.utils.db.Executer; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.sql.Assignment; import com.evolute.utils.sql.Begin; import com.evolute.utils.sql.Commit; @@ -47,7 +47,7 @@ public class PrestadoresDataProvider private Executer EXECUTER; - private JDOProvider JDO; + private ProviderInterface JDO; /** Creates a new instance of PrestadoresDataProvider */ public PrestadoresDataProvider() @@ -55,7 +55,7 @@ public class PrestadoresDataProvider { DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); EXECUTER = dbm.getSharedExecuter( this ); - JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + JDO = ( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); } public static PrestadoresDataProvider getProvider() @@ -168,11 +168,11 @@ public class PrestadoresDataProvider public void savePrestador( PrestadoresData prestador ) throws Exception { - if( prestador.get( PrestadoresData.CONTACTO_ID ) instanceof ContactoData ) + if( prestador.get( PrestadoresData.CONTACTO_ID ) instanceof ContactosData ) { - ContactoData contacto = ( ContactoData )prestador.get( PrestadoresData.CONTACTO_ID ); + ContactosData contacto = ( ContactosData )prestador.get( PrestadoresData.CONTACTO_ID ); contacto.save(); - prestador.set( PrestadoresData.CONTACTO_ID, contacto.get( ContactoData.ID ) ); + prestador.set( PrestadoresData.CONTACTO_ID, contacto.get( ContactosData.ID ) ); } prestador.save(); } diff --git a/trunk/SIPRPSoft/src/siprp/medicina/prestadores/PrestadoresWindow.java b/trunk/SIPRPSoft/src/siprp/medicina/prestadores/PrestadoresWindow.java index 7559c96f..bf15cfff 100644 --- a/trunk/SIPRPSoft/src/siprp/medicina/prestadores/PrestadoresWindow.java +++ b/trunk/SIPRPSoft/src/siprp/medicina/prestadores/PrestadoresWindow.java @@ -21,7 +21,6 @@ import java.awt.event.ItemListener; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; -import java.util.Hashtable; import java.util.List; import java.util.Map; import java.util.Vector; @@ -40,19 +39,19 @@ import javax.swing.JTextField; import leaf.ui.LeafDialog; import siprp.clientes.ClientesDataProvider; import siprp.clientes.ContactoPanel; -import siprp.data.ContactoData; +import siprp.data.outer.ContactosData; +import siprp.data.outer.PrestadoresData; import siprp.database.cayenne.objects.Prestadores; import siprp.database.cayenne.objects.PrtGruposProtocolo; import siprp.database.cayenne.providers.MedicinaDAO; -import siprp.medicina.prestadores.data.PrestadoresData; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; import com.evolute.utils.data.IDObject; import com.evolute.utils.dataui.ComponentController; import com.evolute.utils.dataui.ComponentsHashtable; import com.evolute.utils.dataui.JDOControllable; import com.evolute.utils.dataui.JTextComponentPlainFillerSaver; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.ui.DialogException; import com.evolute.utils.ui.panel.CheckBoxPanel; import com.evolute.utils.ui.search.SearchDialog; @@ -232,8 +231,9 @@ public class PrestadoresWindow extends EditorWindow components.putComponent( PrestadoresData.ACTIVO, activoCheck ); components.putComponent( PrestadoresData.FAZ_CONSULTAS, consultasCheck ); components.putComponent( PrestadoresData.FAZ_ECDS, ecdsCheck ); - components.putComponent( PrestadoresData.CONTACTO_ID, new JDOControllable( (JDOProvider) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ), ContactoData.class, new String[] { - ContactoData.ID + components.putComponent( PrestadoresData.CONTACTO_ID, + new JDOControllable( (ProviderInterface) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ), ContactosData.class, new String[] { + ContactosData.ID }, contactoPanel ) ); } @@ -302,7 +302,7 @@ public class PrestadoresWindow extends EditorWindow prestador = new PrestadoresData(); } String names[] = (String[]) components.keySet().toArray( new String[0] ); - Hashtable data = prestador.getHashData(); + Map data = prestador.getHashData(); ComponentController.save( names, data, components ); prestador.setHashData( data ); gruposProtocolo = ecdsPanel.getSelected(); diff --git a/trunk/SIPRPSoft/src/siprp/medicina/prestadores/data/Prestadores.java b/trunk/SIPRPSoft/src/siprp/medicina/prestadores/data/Prestadores.java deleted file mode 100644 index 234b5225..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/prestadores/data/Prestadores.java +++ /dev/null @@ -1,253 +0,0 @@ -/* -* Prestadores.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.prestadores.data; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class Prestadores implements JDOInnerObject -{ - private Integer id; - private String nome; - private String nome_plain; - private String morada; - private String codigo_postal; - private String localidade; - private String localidade_cp; - private Integer contacto_id; - private String activo; - private String faz_consultas; - private String faz_ecds; - private String contribuinte; - private String observacoes; - - public Prestadores() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == PrestadoresData.ID ) - { - return id; - } - else if( fieldName == PrestadoresData.NOME ) - { - return nome; - } - else if( fieldName == PrestadoresData.NOME_PLAIN ) - { - return nome_plain; - } - else if( fieldName == PrestadoresData.MORADA ) - { - return morada; - } - else if( fieldName == PrestadoresData.CODIGO_POSTAL ) - { - return codigo_postal; - } - else if( fieldName == PrestadoresData.LOCALIDADE ) - { - return localidade; - } - else if( fieldName == PrestadoresData.LOCALIDADE_CP ) - { - return localidade_cp; - } - else if( fieldName == PrestadoresData.CONTACTO_ID ) - { - return contacto_id; - } - else if( fieldName == PrestadoresData.ACTIVO ) - { - return activo; - } - else if( fieldName == PrestadoresData.FAZ_CONSULTAS ) - { - return faz_consultas; - } - else if( fieldName == PrestadoresData.FAZ_ECDS ) - { - return faz_ecds; - } - else if( fieldName == PrestadoresData.CONTRIBUINTE ) - { - return contribuinte; - } - else if( fieldName == PrestadoresData.OBSERVACOES ) - { - return observacoes; - } - else if( fieldName.equals( PrestadoresData.ID ) ) - { - return id; - } - else if( fieldName.equals( PrestadoresData.NOME ) ) - { - return nome; - } - else if( fieldName.equals( PrestadoresData.NOME_PLAIN ) ) - { - return nome_plain; - } - else if( fieldName.equals( PrestadoresData.MORADA ) ) - { - return morada; - } - else if( fieldName.equals( PrestadoresData.CODIGO_POSTAL ) ) - { - return codigo_postal; - } - else if( fieldName.equals( PrestadoresData.LOCALIDADE ) ) - { - return localidade; - } - else if( fieldName.equals( PrestadoresData.LOCALIDADE_CP ) ) - { - return localidade_cp; - } - else if( fieldName.equals( PrestadoresData.CONTACTO_ID ) ) - { - return contacto_id; - } - else if( fieldName.equals( PrestadoresData.ACTIVO ) ) - { - return activo; - } - else if( fieldName.equals( PrestadoresData.FAZ_CONSULTAS ) ) - { - return faz_consultas; - } - else if( fieldName.equals( PrestadoresData.FAZ_ECDS ) ) - { - return faz_ecds; - } - else if( fieldName.equals( PrestadoresData.CONTRIBUINTE ) ) - { - return contribuinte; - } - else if( fieldName.equals( PrestadoresData.OBSERVACOES ) ) - { - return observacoes; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == PrestadoresData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == PrestadoresData.NOME ) - { - nome = ( String ) value; - } - else if( fieldName == PrestadoresData.NOME_PLAIN ) - { - nome_plain = ( String ) value; - } - else if( fieldName == PrestadoresData.MORADA ) - { - morada = ( String ) value; - } - else if( fieldName == PrestadoresData.CODIGO_POSTAL ) - { - codigo_postal = ( String ) value; - } - else if( fieldName == PrestadoresData.LOCALIDADE ) - { - localidade = ( String ) value; - } - else if( fieldName == PrestadoresData.LOCALIDADE_CP ) - { - localidade_cp = ( String ) value; - } - else if( fieldName == PrestadoresData.CONTACTO_ID ) - { - contacto_id = ( Integer ) value; - } - else if( fieldName == PrestadoresData.ACTIVO ) - { - activo = ( String ) value; - } - else if( fieldName == PrestadoresData.FAZ_CONSULTAS ) - { - faz_consultas = ( String ) value; - } - else if( fieldName == PrestadoresData.FAZ_ECDS ) - { - faz_ecds = ( String ) value; - } - else if( fieldName == PrestadoresData.CONTRIBUINTE ) - { - contribuinte = ( String ) value; - } - else if( fieldName == PrestadoresData.OBSERVACOES ) - { - observacoes = ( String ) value; - } - else if( fieldName.equals( PrestadoresData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( PrestadoresData.NOME ) ) - { - nome = ( String ) value; - } - else if( fieldName.equals( PrestadoresData.NOME_PLAIN ) ) - { - nome_plain = ( String ) value; - } - else if( fieldName.equals( PrestadoresData.MORADA ) ) - { - morada = ( String ) value; - } - else if( fieldName.equals( PrestadoresData.CODIGO_POSTAL ) ) - { - codigo_postal = ( String ) value; - } - else if( fieldName.equals( PrestadoresData.LOCALIDADE ) ) - { - localidade = ( String ) value; - } - else if( fieldName.equals( PrestadoresData.LOCALIDADE_CP ) ) - { - localidade_cp = ( String ) value; - } - else if( fieldName.equals( PrestadoresData.CONTACTO_ID ) ) - { - contacto_id = ( Integer ) value; - } - else if( fieldName.equals( PrestadoresData.ACTIVO ) ) - { - activo = ( String ) value; - } - else if( fieldName.equals( PrestadoresData.FAZ_CONSULTAS ) ) - { - faz_consultas = ( String ) value; - } - else if( fieldName.equals( PrestadoresData.FAZ_ECDS ) ) - { - faz_ecds = ( String ) value; - } - else if( fieldName.equals( PrestadoresData.CONTRIBUINTE ) ) - { - contribuinte = ( String ) value; - } - else if( fieldName.equals( PrestadoresData.OBSERVACOES ) ) - { - observacoes = ( String ) value; - } - } - - public Class getOuterClass() - { - return PrestadoresData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/prestadores/data/PrestadoresData.java b/trunk/SIPRPSoft/src/siprp/medicina/prestadores/data/PrestadoresData.java deleted file mode 100644 index c1393c5a..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/prestadores/data/PrestadoresData.java +++ /dev/null @@ -1,72 +0,0 @@ -/* -* PrestadoresData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.prestadores.data; - -import java.util.HashMap; - -import com.evolute.utils.jdo.JDOObject; - -public final class PrestadoresData extends JDOObject -{ - public static final String ID = "id"; - public static final String NOME = "nome"; - public static final String NOME_PLAIN = "nome_plain"; - public static final String MORADA = "morada"; - public static final String CODIGO_POSTAL = "codigo_postal"; - public static final String LOCALIDADE = "localidade"; - public static final String LOCALIDADE_CP = "localidade_cp"; - public static final String CONTACTO_ID = "contacto_id"; - public static final String ACTIVO = "activo"; - public static final String FAZ_CONSULTAS = "faz_consultas"; - public static final String FAZ_ECDS = "faz_ecds"; - public static final String CONTRIBUINTE = "contribuinte"; - public static final String OBSERVACOES = "observacoes"; - - public static final String FIELD_NAMES[] = new String[]{ - NOME, NOME_PLAIN, MORADA, CODIGO_POSTAL, LOCALIDADE, LOCALIDADE_CP, CONTACTO_ID, - ACTIVO, FAZ_CONSULTAS, FAZ_ECDS, CONTRIBUINTE, OBSERVACOES, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, NOME, NOME_PLAIN, MORADA, CODIGO_POSTAL, LOCALIDADE, LOCALIDADE_CP, CONTACTO_ID, - ACTIVO, FAZ_CONSULTAS, FAZ_ECDS, CONTRIBUINTE, OBSERVACOES, }; - - private HashMap dataHash; - - public PrestadoresData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return Prestadores.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/prestadores/data/PrestadoresID.java b/trunk/SIPRPSoft/src/siprp/medicina/prestadores/data/PrestadoresID.java deleted file mode 100644 index 6d755bde..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/prestadores/data/PrestadoresID.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -* PrestadoresID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.prestadores.data; - -import java.io.Serializable; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class PrestadoresID extends IntegerID - implements Serializable -{ - public PrestadoresID() - { - } - - public PrestadoresID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/prestadores/data/package.jdo b/trunk/SIPRPSoft/src/siprp/medicina/prestadores/data/package.jdo deleted file mode 100644 index 8dcb7723..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/prestadores/data/package.jdo +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/ProcessoDataProvider.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/ProcessoDataProvider.java index 97afa9f0..d93a1afc 100644 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/ProcessoDataProvider.java +++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/ProcessoDataProvider.java @@ -19,19 +19,19 @@ import java.util.Vector; import siprp.MedicinaConstants; import siprp.ProcessoConstants; -import siprp.medicina.processo.data.TrabalhadoresConsultasData; -import siprp.medicina.processo.data.TrabalhadoresConsultasDatasData; -import siprp.medicina.processo.data.TrabalhadoresEcdsData; -import siprp.medicina.processo.data.TrabalhadoresEcdsDatasData; -import siprp.medicina.processo.data.TrabalhadoresProcessoData; +import siprp.data.outer.TrabalhadoresConsultasData; +import siprp.data.outer.TrabalhadoresConsultasDatasData; +import siprp.data.outer.TrabalhadoresEcdsData; +import siprp.data.outer.TrabalhadoresEcdsDatasData; +import siprp.data.outer.TrabalhadoresProcessoData; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; import com.evolute.utils.arrays.Virtual2DArray; import com.evolute.utils.data.IDObject; import com.evolute.utils.data.MappableObject; import com.evolute.utils.db.DBManager; import com.evolute.utils.db.Executer; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.sql.Assignment; import com.evolute.utils.sql.Expression; import com.evolute.utils.sql.Field; @@ -62,7 +62,7 @@ public class ProcessoDataProvider private static final Object LOCK = new Object(); private static ProcessoDataProvider instance = null; private Executer EXECUTER; - private JDOProvider JDO; + private ProviderInterface JDO; /** Creates a new instance of ProcessoDataProvider */ public ProcessoDataProvider() @@ -70,7 +70,7 @@ public class ProcessoDataProvider { DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); EXECUTER = dbm.getSharedExecuter( this ); - JDO = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + JDO = ( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); } public static ProcessoDataProvider getProvider() diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultas.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultas.java deleted file mode 100644 index a95e96f3..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultas.java +++ /dev/null @@ -1,136 +0,0 @@ -/* -* TrabalhadoresConsultas.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.util.Date; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class TrabalhadoresConsultas implements JDOInnerObject -{ - private Integer id; - private Integer trabalhador_id; - private Date data; - private Integer estado; - private Integer prestador_id; - private Integer processo_id; - - public TrabalhadoresConsultas() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == TrabalhadoresConsultasData.ID ) - { - return id; - } - else if( fieldName == TrabalhadoresConsultasData.TRABALHADOR_ID ) - { - return trabalhador_id; - } - else if( fieldName == TrabalhadoresConsultasData.DATA ) - { - return data; - } - else if( fieldName == TrabalhadoresConsultasData.ESTADO ) - { - return estado; - } - else if( fieldName == TrabalhadoresConsultasData.PRESTADOR_ID ) - { - return prestador_id; - } - else if( fieldName == TrabalhadoresConsultasData.PROCESSO_ID ) - { - return processo_id; - } - else if( fieldName.equals( TrabalhadoresConsultasData.ID ) ) - { - return id; - } - else if( fieldName.equals( TrabalhadoresConsultasData.TRABALHADOR_ID ) ) - { - return trabalhador_id; - } - else if( fieldName.equals( TrabalhadoresConsultasData.DATA ) ) - { - return data; - } - else if( fieldName.equals( TrabalhadoresConsultasData.ESTADO ) ) - { - return estado; - } - else if( fieldName.equals( TrabalhadoresConsultasData.PRESTADOR_ID ) ) - { - return prestador_id; - } - else if( fieldName.equals( TrabalhadoresConsultasData.PROCESSO_ID ) ) - { - return processo_id; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == TrabalhadoresConsultasData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresConsultasData.TRABALHADOR_ID ) - { - trabalhador_id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresConsultasData.DATA ) - { - data = ( Date ) value; - } - else if( fieldName == TrabalhadoresConsultasData.ESTADO ) - { - estado = ( Integer ) value; - } - else if( fieldName == TrabalhadoresConsultasData.PRESTADOR_ID ) - { - prestador_id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresConsultasData.PROCESSO_ID ) - { - processo_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresConsultasData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresConsultasData.TRABALHADOR_ID ) ) - { - trabalhador_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresConsultasData.DATA ) ) - { - data = ( Date ) value; - } - else if( fieldName.equals( TrabalhadoresConsultasData.ESTADO ) ) - { - estado = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresConsultasData.PRESTADOR_ID ) ) - { - prestador_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresConsultasData.PROCESSO_ID ) ) - { - processo_id = ( Integer ) value; - } - } - - public Class getOuterClass() - { - return TrabalhadoresConsultasData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasData.java deleted file mode 100644 index fb96b27f..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasData.java +++ /dev/null @@ -1,63 +0,0 @@ -/* -* TrabalhadoresConsultasData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.util.HashMap; - -import com.evolute.utils.jdo.JDOObject; - -public final class TrabalhadoresConsultasData extends JDOObject -{ - public static final String ID = "id"; - public static final String TRABALHADOR_ID = "trabalhador_id"; - public static final String DATA = "data"; - public static final String ESTADO = "estado"; - public static final String PRESTADOR_ID = "prestador_id"; - public static final String PROCESSO_ID = "processo_id"; - - public static final String FIELD_NAMES[] = new String[]{ - TRABALHADOR_ID, DATA, ESTADO, PRESTADOR_ID, PROCESSO_ID, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, TRABALHADOR_ID, DATA, ESTADO, PRESTADOR_ID, PROCESSO_ID, }; - - private HashMap dataHash; - - public TrabalhadoresConsultasData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return TrabalhadoresConsultas.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatas.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatas.java deleted file mode 100644 index f73e9722..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatas.java +++ /dev/null @@ -1,119 +0,0 @@ -/* -* TrabalhadoresConsultasDatas.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.util.Date; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class TrabalhadoresConsultasDatas implements JDOInnerObject -{ - private Integer id; - private Date data; - private Integer trabalhadores_consultas_id; - private Integer estado; - private Integer prestador_id; - - public TrabalhadoresConsultasDatas() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == TrabalhadoresConsultasDatasData.ID ) - { - return id; - } - else if( fieldName == TrabalhadoresConsultasDatasData.DATA ) - { - return data; - } - else if( fieldName == TrabalhadoresConsultasDatasData.TRABALHADORES_CONSULTAS_ID ) - { - return trabalhadores_consultas_id; - } - else if( fieldName == TrabalhadoresConsultasDatasData.ESTADO ) - { - return estado; - } - else if( fieldName == TrabalhadoresConsultasDatasData.PRESTADOR_ID ) - { - return prestador_id; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasData.ID ) ) - { - return id; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasData.DATA ) ) - { - return data; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasData.TRABALHADORES_CONSULTAS_ID ) ) - { - return trabalhadores_consultas_id; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasData.ESTADO ) ) - { - return estado; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasData.PRESTADOR_ID ) ) - { - return prestador_id; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == TrabalhadoresConsultasDatasData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresConsultasDatasData.DATA ) - { - data = ( Date ) value; - } - else if( fieldName == TrabalhadoresConsultasDatasData.TRABALHADORES_CONSULTAS_ID ) - { - trabalhadores_consultas_id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresConsultasDatasData.ESTADO ) - { - estado = ( Integer ) value; - } - else if( fieldName == TrabalhadoresConsultasDatasData.PRESTADOR_ID ) - { - prestador_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasData.DATA ) ) - { - data = ( Date ) value; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasData.TRABALHADORES_CONSULTAS_ID ) ) - { - trabalhadores_consultas_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasData.ESTADO ) ) - { - estado = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasData.PRESTADOR_ID ) ) - { - prestador_id = ( Integer ) value; - } - } - - public Class getOuterClass() - { - return TrabalhadoresConsultasDatasData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasData.java deleted file mode 100644 index 536abfce..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasData.java +++ /dev/null @@ -1,62 +0,0 @@ -/* -* TrabalhadoresConsultasDatasData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.util.HashMap; - -import com.evolute.utils.jdo.JDOObject; - -public final class TrabalhadoresConsultasDatasData extends JDOObject -{ - public static final String ID = "id"; - public static final String DATA = "data"; - public static final String TRABALHADORES_CONSULTAS_ID = "trabalhadores_consultas_id"; - public static final String ESTADO = "estado"; - public static final String PRESTADOR_ID = "prestador_id"; - - public static final String FIELD_NAMES[] = new String[]{ - DATA, TRABALHADORES_CONSULTAS_ID, ESTADO, PRESTADOR_ID, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, DATA, TRABALHADORES_CONSULTAS_ID, ESTADO, PRESTADOR_ID, }; - - private HashMap dataHash; - - public TrabalhadoresConsultasDatasData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return TrabalhadoresConsultasDatas.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasEmails.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasEmails.java deleted file mode 100644 index 00bc91c3..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasEmails.java +++ /dev/null @@ -1,136 +0,0 @@ -/* -* TrabalhadoresConsultasDatasEmails.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.util.Date; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class TrabalhadoresConsultasDatasEmails implements JDOInnerObject -{ - private Integer id; - private Integer trabalhadores_consultas_datas_id; - private String destination; - private Date data; - private String subject; - private String body; - - public TrabalhadoresConsultasDatasEmails() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == TrabalhadoresConsultasDatasEmailsData.ID ) - { - return id; - } - else if( fieldName == TrabalhadoresConsultasDatasEmailsData.TRABALHADORES_CONSULTAS_DATAS_ID ) - { - return trabalhadores_consultas_datas_id; - } - else if( fieldName == TrabalhadoresConsultasDatasEmailsData.DESTINATION ) - { - return destination; - } - else if( fieldName == TrabalhadoresConsultasDatasEmailsData.DATA ) - { - return data; - } - else if( fieldName == TrabalhadoresConsultasDatasEmailsData.SUBJECT ) - { - return subject; - } - else if( fieldName == TrabalhadoresConsultasDatasEmailsData.BODY ) - { - return body; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsData.ID ) ) - { - return id; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsData.TRABALHADORES_CONSULTAS_DATAS_ID ) ) - { - return trabalhadores_consultas_datas_id; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsData.DESTINATION ) ) - { - return destination; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsData.DATA ) ) - { - return data; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsData.SUBJECT ) ) - { - return subject; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsData.BODY ) ) - { - return body; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == TrabalhadoresConsultasDatasEmailsData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresConsultasDatasEmailsData.TRABALHADORES_CONSULTAS_DATAS_ID ) - { - trabalhadores_consultas_datas_id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresConsultasDatasEmailsData.DESTINATION ) - { - destination = ( String ) value; - } - else if( fieldName == TrabalhadoresConsultasDatasEmailsData.DATA ) - { - data = ( Date ) value; - } - else if( fieldName == TrabalhadoresConsultasDatasEmailsData.SUBJECT ) - { - subject = ( String ) value; - } - else if( fieldName == TrabalhadoresConsultasDatasEmailsData.BODY ) - { - body = ( String ) value; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsData.TRABALHADORES_CONSULTAS_DATAS_ID ) ) - { - trabalhadores_consultas_datas_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsData.DESTINATION ) ) - { - destination = ( String ) value; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsData.DATA ) ) - { - data = ( Date ) value; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsData.SUBJECT ) ) - { - subject = ( String ) value; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasEmailsData.BODY ) ) - { - body = ( String ) value; - } - } - - public Class getOuterClass() - { - return TrabalhadoresConsultasDatasEmailsData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasEmailsData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasEmailsData.java deleted file mode 100644 index 9225b356..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasEmailsData.java +++ /dev/null @@ -1,63 +0,0 @@ -/* -* TrabalhadoresConsultasDatasEmailsData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.util.HashMap; - -import com.evolute.utils.jdo.JDOObject; - -public final class TrabalhadoresConsultasDatasEmailsData extends JDOObject -{ - public static final String ID = "id"; - public static final String TRABALHADORES_CONSULTAS_DATAS_ID = "trabalhadores_consultas_datas_id"; - public static final String DESTINATION = "destination"; - public static final String DATA = "data"; - public static final String SUBJECT = "subject"; - public static final String BODY = "body"; - - public static final String FIELD_NAMES[] = new String[]{ - TRABALHADORES_CONSULTAS_DATAS_ID, DESTINATION, DATA, SUBJECT, BODY, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, TRABALHADORES_CONSULTAS_DATAS_ID, DESTINATION, DATA, SUBJECT, BODY, }; - - private HashMap dataHash; - - public TrabalhadoresConsultasDatasEmailsData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return TrabalhadoresConsultasDatasEmails.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasEmailsID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasEmailsID.java deleted file mode 100644 index a9e15659..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasEmailsID.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -* TrabalhadoresConsultasDatasEmailsID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.io.Serializable; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class TrabalhadoresConsultasDatasEmailsID extends IntegerID - implements Serializable -{ - public TrabalhadoresConsultasDatasEmailsID() - { - } - - public TrabalhadoresConsultasDatasEmailsID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasID.java deleted file mode 100644 index ab628d6f..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasID.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -* TrabalhadoresConsultasDatasID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.io.Serializable; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class TrabalhadoresConsultasDatasID extends IntegerID - implements Serializable -{ - public TrabalhadoresConsultasDatasID() - { - } - - public TrabalhadoresConsultasDatasID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasObservacoes.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasObservacoes.java deleted file mode 100644 index 7b4793c4..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasObservacoes.java +++ /dev/null @@ -1,83 +0,0 @@ -/* -* TrabalhadoresConsultasDatasObservacoes.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class TrabalhadoresConsultasDatasObservacoes implements JDOInnerObject -{ - private Integer id; - private Integer trabalhadores_consultas_datas_id; - private String observacao; - - public TrabalhadoresConsultasDatasObservacoes() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == TrabalhadoresConsultasDatasObservacoesData.ID ) - { - return id; - } - else if( fieldName == TrabalhadoresConsultasDatasObservacoesData.TRABALHADORES_CONSULTAS_DATAS_ID ) - { - return trabalhadores_consultas_datas_id; - } - else if( fieldName == TrabalhadoresConsultasDatasObservacoesData.OBSERVACAO ) - { - return observacao; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasObservacoesData.ID ) ) - { - return id; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasObservacoesData.TRABALHADORES_CONSULTAS_DATAS_ID ) ) - { - return trabalhadores_consultas_datas_id; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasObservacoesData.OBSERVACAO ) ) - { - return observacao; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == TrabalhadoresConsultasDatasObservacoesData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresConsultasDatasObservacoesData.TRABALHADORES_CONSULTAS_DATAS_ID ) - { - trabalhadores_consultas_datas_id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresConsultasDatasObservacoesData.OBSERVACAO ) - { - observacao = ( String ) value; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasObservacoesData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasObservacoesData.TRABALHADORES_CONSULTAS_DATAS_ID ) ) - { - trabalhadores_consultas_datas_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresConsultasDatasObservacoesData.OBSERVACAO ) ) - { - observacao = ( String ) value; - } - } - - public Class getOuterClass() - { - return TrabalhadoresConsultasDatasObservacoesData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasObservacoesData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasObservacoesData.java deleted file mode 100644 index 398752ba..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasObservacoesData.java +++ /dev/null @@ -1,60 +0,0 @@ -/* -* TrabalhadoresConsultasDatasObservacoesData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.util.HashMap; - -import com.evolute.utils.jdo.JDOObject; - -public final class TrabalhadoresConsultasDatasObservacoesData extends JDOObject -{ - public static final String ID = "id"; - public static final String TRABALHADORES_CONSULTAS_DATAS_ID = "trabalhadores_consultas_datas_id"; - public static final String OBSERVACAO = "observacao"; - - public static final String FIELD_NAMES[] = new String[]{ - TRABALHADORES_CONSULTAS_DATAS_ID, OBSERVACAO, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, TRABALHADORES_CONSULTAS_DATAS_ID, OBSERVACAO, }; - - private HashMap dataHash; - - public TrabalhadoresConsultasDatasObservacoesData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return TrabalhadoresConsultasDatasObservacoes.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasObservacoesID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasObservacoesID.java deleted file mode 100644 index c8db4f34..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasDatasObservacoesID.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -* TrabalhadoresConsultasDatasObservacoesID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.io.Serializable; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class TrabalhadoresConsultasDatasObservacoesID extends IntegerID - implements Serializable -{ - public TrabalhadoresConsultasDatasObservacoesID() - { - } - - public TrabalhadoresConsultasDatasObservacoesID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasID.java deleted file mode 100644 index 2347b21b..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresConsultasID.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -* TrabalhadoresConsultasID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.io.Serializable; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class TrabalhadoresConsultasID extends IntegerID - implements Serializable -{ - public TrabalhadoresConsultasID() - { - } - - public TrabalhadoresConsultasID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcd.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcd.java deleted file mode 100644 index cc8e3184..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcd.java +++ /dev/null @@ -1,151 +0,0 @@ -/* -* TrabalhadoresEcd.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class TrabalhadoresEcd implements JDOInnerObject -{ - private Integer id; - private Integer ecd_id; - private Integer ecd_oficial_id; - private Integer estado; - private Integer trabalhadores_ecds_datas_id; - private String enviado; - private Integer analisador_id; - - public TrabalhadoresEcd() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == TrabalhadoresEcdData.ID ) - { - return id; - } - else if( fieldName == TrabalhadoresEcdData.ECD_ID ) - { - return ecd_id; - } - else if( fieldName == TrabalhadoresEcdData.ECD_OFICIAL_ID ) - { - return ecd_oficial_id; - } - else if( fieldName == TrabalhadoresEcdData.ESTADO ) - { - return estado; - } - else if( fieldName == TrabalhadoresEcdData.TRABALHADORES_ECDS_DATAS_ID ) - { - return trabalhadores_ecds_datas_id; - } - else if( fieldName == TrabalhadoresEcdData.ENVIADO ) - { - return enviado; - } - else if( fieldName == TrabalhadoresEcdData.ANALISADOR_ID ) - { - return analisador_id; - } - else if( fieldName.equals( TrabalhadoresEcdData.ID ) ) - { - return id; - } - else if( fieldName.equals( TrabalhadoresEcdData.ECD_ID ) ) - { - return ecd_id; - } - else if( fieldName.equals( TrabalhadoresEcdData.ECD_OFICIAL_ID ) ) - { - return ecd_oficial_id; - } - else if( fieldName.equals( TrabalhadoresEcdData.ESTADO ) ) - { - return estado; - } - else if( fieldName.equals( TrabalhadoresEcdData.TRABALHADORES_ECDS_DATAS_ID ) ) - { - return trabalhadores_ecds_datas_id; - } - else if( fieldName.equals( TrabalhadoresEcdData.ENVIADO ) ) - { - return enviado; - } - else if( fieldName.equals( TrabalhadoresEcdData.ANALISADOR_ID ) ) - { - return analisador_id; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == TrabalhadoresEcdData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresEcdData.ECD_ID ) - { - ecd_id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresEcdData.ECD_OFICIAL_ID ) - { - ecd_oficial_id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresEcdData.ESTADO ) - { - estado = ( Integer ) value; - } - else if( fieldName == TrabalhadoresEcdData.TRABALHADORES_ECDS_DATAS_ID ) - { - trabalhadores_ecds_datas_id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresEcdData.ENVIADO ) - { - enviado = ( String ) value; - } - else if( fieldName == TrabalhadoresEcdData.ANALISADOR_ID ) - { - analisador_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresEcdData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresEcdData.ECD_ID ) ) - { - ecd_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresEcdData.ECD_OFICIAL_ID ) ) - { - ecd_oficial_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresEcdData.ESTADO ) ) - { - estado = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresEcdData.TRABALHADORES_ECDS_DATAS_ID ) ) - { - trabalhadores_ecds_datas_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresEcdData.ENVIADO ) ) - { - enviado = ( String ) value; - } - else if( fieldName.equals( TrabalhadoresEcdData.ANALISADOR_ID ) ) - { - analisador_id = ( Integer ) value; - } - } - - public Class getOuterClass() - { - return TrabalhadoresEcdData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdData.java deleted file mode 100644 index 0154d4c5..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdData.java +++ /dev/null @@ -1,66 +0,0 @@ -/* -* TrabalhadoresEcdData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.util.HashMap; - -import com.evolute.utils.jdo.JDOObject; - -public final class TrabalhadoresEcdData extends JDOObject -{ - public static final String ID = "id"; - public static final String ECD_ID = "ecd_id"; - public static final String ECD_OFICIAL_ID = "ecd_oficial_id"; - public static final String ESTADO = "estado"; - public static final String TRABALHADORES_ECDS_DATAS_ID = "trabalhadores_ecds_datas_id"; - public static final String ENVIADO = "enviado"; - public static final String ANALISADOR_ID = "analisador_id"; - - public static final String FIELD_NAMES[] = new String[]{ - ECD_ID, ECD_OFICIAL_ID, ESTADO, TRABALHADORES_ECDS_DATAS_ID, ENVIADO, - ANALISADOR_ID, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, ECD_ID, ECD_OFICIAL_ID, ESTADO, TRABALHADORES_ECDS_DATAS_ID, ENVIADO, - ANALISADOR_ID, }; - - private HashMap dataHash; - - public TrabalhadoresEcdData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return TrabalhadoresEcd.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdID.java deleted file mode 100644 index 24d39509..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdID.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -* TrabalhadoresEcdID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.io.Serializable; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class TrabalhadoresEcdID extends IntegerID - implements Serializable -{ - public TrabalhadoresEcdID() - { - } - - public TrabalhadoresEcdID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcds.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcds.java deleted file mode 100644 index 5305b0d4..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcds.java +++ /dev/null @@ -1,119 +0,0 @@ -/* -* TrabalhadoresEcds.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.util.Date; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class TrabalhadoresEcds implements JDOInnerObject -{ - private Integer id; - private Integer trabalhador_id; - private Integer estado; - private Date data; - private Integer processo_id; - - public TrabalhadoresEcds() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == TrabalhadoresEcdsData.ID ) - { - return id; - } - else if( fieldName == TrabalhadoresEcdsData.TRABALHADOR_ID ) - { - return trabalhador_id; - } - else if( fieldName == TrabalhadoresEcdsData.ESTADO ) - { - return estado; - } - else if( fieldName == TrabalhadoresEcdsData.DATA ) - { - return data; - } - else if( fieldName == TrabalhadoresEcdsData.PROCESSO_ID ) - { - return processo_id; - } - else if( fieldName.equals( TrabalhadoresEcdsData.ID ) ) - { - return id; - } - else if( fieldName.equals( TrabalhadoresEcdsData.TRABALHADOR_ID ) ) - { - return trabalhador_id; - } - else if( fieldName.equals( TrabalhadoresEcdsData.ESTADO ) ) - { - return estado; - } - else if( fieldName.equals( TrabalhadoresEcdsData.DATA ) ) - { - return data; - } - else if( fieldName.equals( TrabalhadoresEcdsData.PROCESSO_ID ) ) - { - return processo_id; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == TrabalhadoresEcdsData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresEcdsData.TRABALHADOR_ID ) - { - trabalhador_id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresEcdsData.ESTADO ) - { - estado = ( Integer ) value; - } - else if( fieldName == TrabalhadoresEcdsData.DATA ) - { - data = ( Date ) value; - } - else if( fieldName == TrabalhadoresEcdsData.PROCESSO_ID ) - { - processo_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsData.TRABALHADOR_ID ) ) - { - trabalhador_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsData.ESTADO ) ) - { - estado = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsData.DATA ) ) - { - data = ( Date ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsData.PROCESSO_ID ) ) - { - processo_id = ( Integer ) value; - } - } - - public Class getOuterClass() - { - return TrabalhadoresEcdsData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsAnalise.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsAnalise.java deleted file mode 100644 index a5d36be2..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsAnalise.java +++ /dev/null @@ -1,102 +0,0 @@ -/* -* TrabalhadoresEcdsAnalise.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.util.Date; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class TrabalhadoresEcdsAnalise implements JDOInnerObject -{ - private Integer id; - private Date data; - private Integer prestador_id; - private Integer grupo_ecds_id; - - public TrabalhadoresEcdsAnalise() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == TrabalhadoresEcdsAnaliseData.ID ) - { - return id; - } - else if( fieldName == TrabalhadoresEcdsAnaliseData.DATA ) - { - return data; - } - else if( fieldName == TrabalhadoresEcdsAnaliseData.PRESTADOR_ID ) - { - return prestador_id; - } - else if( fieldName == TrabalhadoresEcdsAnaliseData.GRUPO_ECDS_ID ) - { - return grupo_ecds_id; - } - else if( fieldName.equals( TrabalhadoresEcdsAnaliseData.ID ) ) - { - return id; - } - else if( fieldName.equals( TrabalhadoresEcdsAnaliseData.DATA ) ) - { - return data; - } - else if( fieldName.equals( TrabalhadoresEcdsAnaliseData.PRESTADOR_ID ) ) - { - return prestador_id; - } - else if( fieldName.equals( TrabalhadoresEcdsAnaliseData.GRUPO_ECDS_ID ) ) - { - return grupo_ecds_id; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == TrabalhadoresEcdsAnaliseData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresEcdsAnaliseData.DATA ) - { - data = ( Date ) value; - } - else if( fieldName == TrabalhadoresEcdsAnaliseData.PRESTADOR_ID ) - { - prestador_id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresEcdsAnaliseData.GRUPO_ECDS_ID ) - { - grupo_ecds_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsAnaliseData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsAnaliseData.DATA ) ) - { - data = ( Date ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsAnaliseData.PRESTADOR_ID ) ) - { - prestador_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsAnaliseData.GRUPO_ECDS_ID ) ) - { - grupo_ecds_id = ( Integer ) value; - } - } - - public Class getOuterClass() - { - return TrabalhadoresEcdsAnaliseData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsAnaliseData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsAnaliseData.java deleted file mode 100644 index d3f0ce07..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsAnaliseData.java +++ /dev/null @@ -1,61 +0,0 @@ -/* -* TrabalhadoresEcdsAnaliseData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.util.HashMap; - -import com.evolute.utils.jdo.JDOObject; - -public final class TrabalhadoresEcdsAnaliseData extends JDOObject -{ - public static final String ID = "id"; - public static final String DATA = "data"; - public static final String PRESTADOR_ID = "prestador_id"; - public static final String GRUPO_ECDS_ID = "grupo_ecds_id"; - - public static final String FIELD_NAMES[] = new String[]{ - DATA, PRESTADOR_ID, GRUPO_ECDS_ID, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, DATA, PRESTADOR_ID, GRUPO_ECDS_ID, }; - - private HashMap dataHash; - - public TrabalhadoresEcdsAnaliseData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return TrabalhadoresEcdsAnalise.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsAnaliseID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsAnaliseID.java deleted file mode 100644 index 1bd2d4b5..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsAnaliseID.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -* TrabalhadoresEcdsAnaliseID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.io.Serializable; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class TrabalhadoresEcdsAnaliseID extends IntegerID - implements Serializable -{ - public TrabalhadoresEcdsAnaliseID() - { - } - - public TrabalhadoresEcdsAnaliseID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsData.java deleted file mode 100644 index b4a70a07..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsData.java +++ /dev/null @@ -1,62 +0,0 @@ -/* -* TrabalhadoresEcdsData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.util.HashMap; - -import com.evolute.utils.jdo.JDOObject; - -public final class TrabalhadoresEcdsData extends JDOObject -{ - public static final String ID = "id"; - public static final String TRABALHADOR_ID = "trabalhador_id"; - public static final String ESTADO = "estado"; - public static final String DATA = "data"; - public static final String PROCESSO_ID = "processo_id"; - - public static final String FIELD_NAMES[] = new String[]{ - TRABALHADOR_ID, ESTADO, DATA, PROCESSO_ID, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, TRABALHADOR_ID, ESTADO, DATA, PROCESSO_ID, }; - - private HashMap dataHash; - - public TrabalhadoresEcdsData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return TrabalhadoresEcds.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatas.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatas.java deleted file mode 100644 index 51705429..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatas.java +++ /dev/null @@ -1,170 +0,0 @@ -/* -* TrabalhadoresEcdsDatas.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.util.Date; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class TrabalhadoresEcdsDatas implements JDOInnerObject -{ - private Integer id; - private Integer trabalhadores_ecds_id; - private Date data; - private Integer estado; - private Integer prestador_id; - private Integer analisador_id; - private Date data_envio; - private Date data_recepcao; - - public TrabalhadoresEcdsDatas() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == TrabalhadoresEcdsDatasData.ID ) - { - return id; - } - else if( fieldName == TrabalhadoresEcdsDatasData.TRABALHADORES_ECDS_ID ) - { - return trabalhadores_ecds_id; - } - else if( fieldName == TrabalhadoresEcdsDatasData.DATA ) - { - return data; - } - else if( fieldName == TrabalhadoresEcdsDatasData.ESTADO ) - { - return estado; - } - else if( fieldName == TrabalhadoresEcdsDatasData.PRESTADOR_ID ) - { - return prestador_id; - } - else if( fieldName == TrabalhadoresEcdsDatasData.ANALISADOR_ID ) - { - return analisador_id; - } - else if( fieldName == TrabalhadoresEcdsDatasData.DATA_ENVIO ) - { - return data_envio; - } - else if( fieldName == TrabalhadoresEcdsDatasData.DATA_RECEPCAO ) - { - return data_recepcao; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasData.ID ) ) - { - return id; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasData.TRABALHADORES_ECDS_ID ) ) - { - return trabalhadores_ecds_id; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasData.DATA ) ) - { - return data; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasData.ESTADO ) ) - { - return estado; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasData.PRESTADOR_ID ) ) - { - return prestador_id; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasData.ANALISADOR_ID ) ) - { - return analisador_id; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasData.DATA_ENVIO ) ) - { - return data_envio; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasData.DATA_RECEPCAO ) ) - { - return data_recepcao; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == TrabalhadoresEcdsDatasData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresEcdsDatasData.TRABALHADORES_ECDS_ID ) - { - trabalhadores_ecds_id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresEcdsDatasData.DATA ) - { - data = ( Date ) value; - } - else if( fieldName == TrabalhadoresEcdsDatasData.ESTADO ) - { - estado = ( Integer ) value; - } - else if( fieldName == TrabalhadoresEcdsDatasData.PRESTADOR_ID ) - { - prestador_id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresEcdsDatasData.ANALISADOR_ID ) - { - analisador_id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresEcdsDatasData.DATA_ENVIO ) - { - data_envio = ( Date ) value; - } - else if( fieldName == TrabalhadoresEcdsDatasData.DATA_RECEPCAO ) - { - data_recepcao = ( Date ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasData.TRABALHADORES_ECDS_ID ) ) - { - trabalhadores_ecds_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasData.DATA ) ) - { - data = ( Date ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasData.ESTADO ) ) - { - estado = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasData.PRESTADOR_ID ) ) - { - prestador_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasData.ANALISADOR_ID ) ) - { - analisador_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasData.DATA_ENVIO ) ) - { - data_envio = ( Date ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasData.DATA_RECEPCAO ) ) - { - data_recepcao = ( Date ) value; - } - } - - public Class getOuterClass() - { - return TrabalhadoresEcdsDatasData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasData.java deleted file mode 100644 index ef21d535..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasData.java +++ /dev/null @@ -1,67 +0,0 @@ -/* -* TrabalhadoresEcdsDatasData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.util.HashMap; - -import com.evolute.utils.jdo.JDOObject; - -public final class TrabalhadoresEcdsDatasData extends JDOObject -{ - public static final String ID = "id"; - public static final String TRABALHADORES_ECDS_ID = "trabalhadores_ecds_id"; - public static final String DATA = "data"; - public static final String ESTADO = "estado"; - public static final String PRESTADOR_ID = "prestador_id"; - public static final String ANALISADOR_ID = "analisador_id"; - public static final String DATA_ENVIO = "data_envio"; - public static final String DATA_RECEPCAO = "data_recepcao"; - - public static final String FIELD_NAMES[] = new String[]{ - TRABALHADORES_ECDS_ID, DATA, ESTADO, PRESTADOR_ID, ANALISADOR_ID, DATA_ENVIO, - DATA_RECEPCAO, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, TRABALHADORES_ECDS_ID, DATA, ESTADO, PRESTADOR_ID, ANALISADOR_ID, DATA_ENVIO, - DATA_RECEPCAO, }; - - private HashMap dataHash; - - public TrabalhadoresEcdsDatasData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return TrabalhadoresEcdsDatas.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasEmails.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasEmails.java deleted file mode 100644 index 7fc88394..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasEmails.java +++ /dev/null @@ -1,136 +0,0 @@ -/* -* TrabalhadoresEcdsDatasEmails.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.util.Date; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class TrabalhadoresEcdsDatasEmails implements JDOInnerObject -{ - private Integer id; - private Integer trabalhadores_ecds_datas_id; - private String destination; - private Date data; - private String subject; - private String body; - - public TrabalhadoresEcdsDatasEmails() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == TrabalhadoresEcdsDatasEmailsData.ID ) - { - return id; - } - else if( fieldName == TrabalhadoresEcdsDatasEmailsData.TRABALHADORES_ECDS_DATAS_ID ) - { - return trabalhadores_ecds_datas_id; - } - else if( fieldName == TrabalhadoresEcdsDatasEmailsData.DESTINATION ) - { - return destination; - } - else if( fieldName == TrabalhadoresEcdsDatasEmailsData.DATA ) - { - return data; - } - else if( fieldName == TrabalhadoresEcdsDatasEmailsData.SUBJECT ) - { - return subject; - } - else if( fieldName == TrabalhadoresEcdsDatasEmailsData.BODY ) - { - return body; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsData.ID ) ) - { - return id; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsData.TRABALHADORES_ECDS_DATAS_ID ) ) - { - return trabalhadores_ecds_datas_id; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsData.DESTINATION ) ) - { - return destination; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsData.DATA ) ) - { - return data; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsData.SUBJECT ) ) - { - return subject; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsData.BODY ) ) - { - return body; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == TrabalhadoresEcdsDatasEmailsData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresEcdsDatasEmailsData.TRABALHADORES_ECDS_DATAS_ID ) - { - trabalhadores_ecds_datas_id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresEcdsDatasEmailsData.DESTINATION ) - { - destination = ( String ) value; - } - else if( fieldName == TrabalhadoresEcdsDatasEmailsData.DATA ) - { - data = ( Date ) value; - } - else if( fieldName == TrabalhadoresEcdsDatasEmailsData.SUBJECT ) - { - subject = ( String ) value; - } - else if( fieldName == TrabalhadoresEcdsDatasEmailsData.BODY ) - { - body = ( String ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsData.TRABALHADORES_ECDS_DATAS_ID ) ) - { - trabalhadores_ecds_datas_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsData.DESTINATION ) ) - { - destination = ( String ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsData.DATA ) ) - { - data = ( Date ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsData.SUBJECT ) ) - { - subject = ( String ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasEmailsData.BODY ) ) - { - body = ( String ) value; - } - } - - public Class getOuterClass() - { - return TrabalhadoresEcdsDatasEmailsData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasEmailsData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasEmailsData.java deleted file mode 100644 index b20862d7..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasEmailsData.java +++ /dev/null @@ -1,63 +0,0 @@ -/* -* TrabalhadoresEcdsDatasEmailsData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.util.HashMap; - -import com.evolute.utils.jdo.JDOObject; - -public final class TrabalhadoresEcdsDatasEmailsData extends JDOObject -{ - public static final String ID = "id"; - public static final String TRABALHADORES_ECDS_DATAS_ID = "trabalhadores_ecds_datas_id"; - public static final String DESTINATION = "destination"; - public static final String DATA = "data"; - public static final String SUBJECT = "subject"; - public static final String BODY = "body"; - - public static final String FIELD_NAMES[] = new String[]{ - TRABALHADORES_ECDS_DATAS_ID, DESTINATION, DATA, SUBJECT, BODY, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, TRABALHADORES_ECDS_DATAS_ID, DESTINATION, DATA, SUBJECT, BODY, }; - - private HashMap dataHash; - - public TrabalhadoresEcdsDatasEmailsData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return TrabalhadoresEcdsDatasEmails.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasEmailsID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasEmailsID.java deleted file mode 100644 index b32cda9f..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasEmailsID.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -* TrabalhadoresEcdsDatasEmailsID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.io.Serializable; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class TrabalhadoresEcdsDatasEmailsID extends IntegerID - implements Serializable -{ - public TrabalhadoresEcdsDatasEmailsID() - { - } - - public TrabalhadoresEcdsDatasEmailsID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasID.java deleted file mode 100644 index 7526071c..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasID.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -* TrabalhadoresEcdsDatasID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.io.Serializable; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class TrabalhadoresEcdsDatasID extends IntegerID - implements Serializable -{ - public TrabalhadoresEcdsDatasID() - { - } - - public TrabalhadoresEcdsDatasID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasObservacoes.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasObservacoes.java deleted file mode 100644 index be5ee16e..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasObservacoes.java +++ /dev/null @@ -1,83 +0,0 @@ -/* -* TrabalhadoresEcdsDatasObservacoes.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class TrabalhadoresEcdsDatasObservacoes implements JDOInnerObject -{ - private Integer id; - private Integer trabalhadores_ecds_datas_id; - private String observacao; - - public TrabalhadoresEcdsDatasObservacoes() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == TrabalhadoresEcdsDatasObservacoesData.ID ) - { - return id; - } - else if( fieldName == TrabalhadoresEcdsDatasObservacoesData.TRABALHADORES_ECDS_DATAS_ID ) - { - return trabalhadores_ecds_datas_id; - } - else if( fieldName == TrabalhadoresEcdsDatasObservacoesData.OBSERVACAO ) - { - return observacao; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasObservacoesData.ID ) ) - { - return id; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasObservacoesData.TRABALHADORES_ECDS_DATAS_ID ) ) - { - return trabalhadores_ecds_datas_id; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasObservacoesData.OBSERVACAO ) ) - { - return observacao; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == TrabalhadoresEcdsDatasObservacoesData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresEcdsDatasObservacoesData.TRABALHADORES_ECDS_DATAS_ID ) - { - trabalhadores_ecds_datas_id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresEcdsDatasObservacoesData.OBSERVACAO ) - { - observacao = ( String ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasObservacoesData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasObservacoesData.TRABALHADORES_ECDS_DATAS_ID ) ) - { - trabalhadores_ecds_datas_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresEcdsDatasObservacoesData.OBSERVACAO ) ) - { - observacao = ( String ) value; - } - } - - public Class getOuterClass() - { - return TrabalhadoresEcdsDatasObservacoesData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasObservacoesData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasObservacoesData.java deleted file mode 100644 index 66f869b0..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasObservacoesData.java +++ /dev/null @@ -1,60 +0,0 @@ -/* -* TrabalhadoresEcdsDatasObservacoesData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.util.HashMap; - -import com.evolute.utils.jdo.JDOObject; - -public final class TrabalhadoresEcdsDatasObservacoesData extends JDOObject -{ - public static final String ID = "id"; - public static final String TRABALHADORES_ECDS_DATAS_ID = "trabalhadores_ecds_datas_id"; - public static final String OBSERVACAO = "observacao"; - - public static final String FIELD_NAMES[] = new String[]{ - TRABALHADORES_ECDS_DATAS_ID, OBSERVACAO, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, TRABALHADORES_ECDS_DATAS_ID, OBSERVACAO, }; - - private HashMap dataHash; - - public TrabalhadoresEcdsDatasObservacoesData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return TrabalhadoresEcdsDatasObservacoes.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasObservacoesID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasObservacoesID.java deleted file mode 100644 index ae9fed15..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsDatasObservacoesID.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -* TrabalhadoresEcdsDatasObservacoesID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.io.Serializable; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class TrabalhadoresEcdsDatasObservacoesID extends IntegerID - implements Serializable -{ - public TrabalhadoresEcdsDatasObservacoesID() - { - } - - public TrabalhadoresEcdsDatasObservacoesID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsID.java deleted file mode 100644 index 85030225..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresEcdsID.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -* TrabalhadoresEcdsID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.io.Serializable; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class TrabalhadoresEcdsID extends IntegerID - implements Serializable -{ - public TrabalhadoresEcdsID() - { - } - - public TrabalhadoresEcdsID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresFichasAptidao.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresFichasAptidao.java deleted file mode 100644 index ef967eba..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresFichasAptidao.java +++ /dev/null @@ -1,83 +0,0 @@ -/* -* TrabalhadoresFichasAptidao.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class TrabalhadoresFichasAptidao implements JDOInnerObject -{ - private Integer id; - private Integer processo_id; - private Integer exame_id; - - public TrabalhadoresFichasAptidao() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == TrabalhadoresFichasAptidaoData.ID ) - { - return id; - } - else if( fieldName == TrabalhadoresFichasAptidaoData.PROCESSO_ID ) - { - return processo_id; - } - else if( fieldName == TrabalhadoresFichasAptidaoData.EXAME_ID ) - { - return exame_id; - } - else if( fieldName.equals( TrabalhadoresFichasAptidaoData.ID ) ) - { - return id; - } - else if( fieldName.equals( TrabalhadoresFichasAptidaoData.PROCESSO_ID ) ) - { - return processo_id; - } - else if( fieldName.equals( TrabalhadoresFichasAptidaoData.EXAME_ID ) ) - { - return exame_id; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == TrabalhadoresFichasAptidaoData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresFichasAptidaoData.PROCESSO_ID ) - { - processo_id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresFichasAptidaoData.EXAME_ID ) - { - exame_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresFichasAptidaoData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresFichasAptidaoData.PROCESSO_ID ) ) - { - processo_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresFichasAptidaoData.EXAME_ID ) ) - { - exame_id = ( Integer ) value; - } - } - - public Class getOuterClass() - { - return TrabalhadoresFichasAptidaoData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresFichasAptidaoData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresFichasAptidaoData.java deleted file mode 100644 index d7866eb2..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresFichasAptidaoData.java +++ /dev/null @@ -1,60 +0,0 @@ -/* -* TrabalhadoresFichasAptidaoData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.util.HashMap; - -import com.evolute.utils.jdo.JDOObject; - -public final class TrabalhadoresFichasAptidaoData extends JDOObject -{ - public static final String ID = "id"; - public static final String PROCESSO_ID = "processo_id"; - public static final String EXAME_ID = "exame_id"; - - public static final String FIELD_NAMES[] = new String[]{ - PROCESSO_ID, EXAME_ID, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, PROCESSO_ID, EXAME_ID, }; - - private HashMap dataHash; - - public TrabalhadoresFichasAptidaoData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return TrabalhadoresFichasAptidao.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresFichasAptidaoID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresFichasAptidaoID.java deleted file mode 100644 index 8fe72ebf..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresFichasAptidaoID.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -* TrabalhadoresFichasAptidaoID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.io.Serializable; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class TrabalhadoresFichasAptidaoID extends IntegerID - implements Serializable -{ - public TrabalhadoresFichasAptidaoID() - { - } - - public TrabalhadoresFichasAptidaoID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresProcesso.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresProcesso.java deleted file mode 100644 index a5508aa4..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresProcesso.java +++ /dev/null @@ -1,170 +0,0 @@ -/* -* TrabalhadoresProcesso.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.util.Date; - -import com.evolute.utils.jdo.JDOInnerObject; - -public final class TrabalhadoresProcesso implements JDOInnerObject -{ - private Integer id; - private Integer trabalhador_id; - private String estado; - private Date data_inicio; - private Date data_fim; - private Integer motivo; - private Integer sub_motivo; - private String activo; - - public TrabalhadoresProcesso() - { - } - - public Object getField( String fieldName ) - { - if( fieldName == TrabalhadoresProcessoData.ID ) - { - return id; - } - else if( fieldName == TrabalhadoresProcessoData.TRABALHADOR_ID ) - { - return trabalhador_id; - } - else if( fieldName == TrabalhadoresProcessoData.ESTADO ) - { - return estado; - } - else if( fieldName == TrabalhadoresProcessoData.DATA_INICIO ) - { - return data_inicio; - } - else if( fieldName == TrabalhadoresProcessoData.DATA_FIM ) - { - return data_fim; - } - else if( fieldName == TrabalhadoresProcessoData.MOTIVO ) - { - return motivo; - } - else if( fieldName == TrabalhadoresProcessoData.SUB_MOTIVO ) - { - return sub_motivo; - } - else if( fieldName == TrabalhadoresProcessoData.ACTIVO ) - { - return activo; - } - else if( fieldName.equals( TrabalhadoresProcessoData.ID ) ) - { - return id; - } - else if( fieldName.equals( TrabalhadoresProcessoData.TRABALHADOR_ID ) ) - { - return trabalhador_id; - } - else if( fieldName.equals( TrabalhadoresProcessoData.ESTADO ) ) - { - return estado; - } - else if( fieldName.equals( TrabalhadoresProcessoData.DATA_INICIO ) ) - { - return data_inicio; - } - else if( fieldName.equals( TrabalhadoresProcessoData.DATA_FIM ) ) - { - return data_fim; - } - else if( fieldName.equals( TrabalhadoresProcessoData.MOTIVO ) ) - { - return motivo; - } - else if( fieldName.equals( TrabalhadoresProcessoData.SUB_MOTIVO ) ) - { - return sub_motivo; - } - else if( fieldName.equals( TrabalhadoresProcessoData.ACTIVO ) ) - { - return activo; - } - return null; - } - - public void setField( String fieldName, Object value ) - { - if( fieldName == TrabalhadoresProcessoData.ID ) - { - id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresProcessoData.TRABALHADOR_ID ) - { - trabalhador_id = ( Integer ) value; - } - else if( fieldName == TrabalhadoresProcessoData.ESTADO ) - { - estado = ( String ) value; - } - else if( fieldName == TrabalhadoresProcessoData.DATA_INICIO ) - { - data_inicio = ( Date ) value; - } - else if( fieldName == TrabalhadoresProcessoData.DATA_FIM ) - { - data_fim = ( Date ) value; - } - else if( fieldName == TrabalhadoresProcessoData.MOTIVO ) - { - motivo = ( Integer ) value; - } - else if( fieldName == TrabalhadoresProcessoData.SUB_MOTIVO ) - { - sub_motivo = ( Integer ) value; - } - else if( fieldName == TrabalhadoresProcessoData.ACTIVO ) - { - activo = ( String ) value; - } - else if( fieldName.equals( TrabalhadoresProcessoData.ID ) ) - { - id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresProcessoData.TRABALHADOR_ID ) ) - { - trabalhador_id = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresProcessoData.ESTADO ) ) - { - estado = ( String ) value; - } - else if( fieldName.equals( TrabalhadoresProcessoData.DATA_INICIO ) ) - { - data_inicio = ( Date ) value; - } - else if( fieldName.equals( TrabalhadoresProcessoData.DATA_FIM ) ) - { - data_fim = ( Date ) value; - } - else if( fieldName.equals( TrabalhadoresProcessoData.MOTIVO ) ) - { - motivo = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresProcessoData.SUB_MOTIVO ) ) - { - sub_motivo = ( Integer ) value; - } - else if( fieldName.equals( TrabalhadoresProcessoData.ACTIVO ) ) - { - activo = ( String ) value; - } - } - - public Class getOuterClass() - { - return TrabalhadoresProcessoData.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresProcessoData.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresProcessoData.java deleted file mode 100644 index 176007ab..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresProcessoData.java +++ /dev/null @@ -1,65 +0,0 @@ -/* -* TrabalhadoresProcessoData.java -* -* Generated by com.evutils.codegen.JDOObjectGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.util.HashMap; - -import com.evolute.utils.jdo.JDOObject; - -public final class TrabalhadoresProcessoData extends JDOObject -{ - public static final String ID = "id"; - public static final String TRABALHADOR_ID = "trabalhador_id"; - public static final String ESTADO = "estado"; - public static final String DATA_INICIO = "data_inicio"; - public static final String DATA_FIM = "data_fim"; - public static final String MOTIVO = "motivo"; - public static final String SUB_MOTIVO = "sub_motivo"; - public static final String ACTIVO = "activo"; - - public static final String FIELD_NAMES[] = new String[]{ - TRABALHADOR_ID, ESTADO, DATA_INICIO, DATA_FIM, MOTIVO, SUB_MOTIVO, ACTIVO, }; - - - protected static final String ALL_FIELD_NAMES[] = new String[]{ - ID, TRABALHADOR_ID, ESTADO, DATA_INICIO, DATA_FIM, MOTIVO, SUB_MOTIVO, ACTIVO, }; - - private HashMap dataHash; - - public TrabalhadoresProcessoData() - { - dataHash = new HashMap(); - } - - protected Object innerGet( String fieldName ) - throws Exception - { - return dataHash.get( fieldName ); - } - - protected void innerSet( String fieldName, Object value ) - throws Exception - { - dataHash.put( fieldName, value ); - } - - public String []getFieldNames() - { - return FIELD_NAMES; - } - - protected String []getAllFieldNames() - { - return ALL_FIELD_NAMES; - } - - public Class getInnerClass() - { - return TrabalhadoresProcesso.class; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresProcessoID.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresProcessoID.java deleted file mode 100644 index 17ab385e..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/TrabalhadoresProcessoID.java +++ /dev/null @@ -1,25 +0,0 @@ -/* -* TrabalhadoresProcessoID.java -* -* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Jan 16, 2008 -* -* Use but DON'T TOUCH -*/ -package siprp.medicina.processo.data; - -import java.io.Serializable; - -import com.evolute.utils.jdo.jpox.IntegerID; - -public final class TrabalhadoresProcessoID extends IntegerID - implements Serializable -{ - public TrabalhadoresProcessoID() - { - } - - public TrabalhadoresProcessoID( String str ) - { - super( str ); - } -} diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/package.jdo b/trunk/SIPRPSoft/src/siprp/medicina/processo/data/package.jdo deleted file mode 100644 index b9abd36e..00000000 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/data/package.jdo +++ /dev/null @@ -1,353 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/ui/ProcessoDadosPanel.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/ui/ProcessoDadosPanel.java index 8f70736c..64a828bd 100755 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/ui/ProcessoDadosPanel.java +++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/ui/ProcessoDadosPanel.java @@ -127,19 +127,19 @@ public class ProcessoDadosPanel extends JPanel // trabalhador private final JLabel labelTrabalhadorNome = new JLabel( "Nome" ); private final JLabel labelTrabalhadorSexo = new JLabel( "Sexo" ); - private final JLabel labelTrabalhadorDataNascimento = new JLabel( "Data de Nascimento" ); + private final JLabel labelTrabalhadoresDataNascimento = new JLabel( "Data de Nascimento" ); private final JLabel labelTrabalhadorNacionalidade = new JLabel( "Nacionalidade" ); private final JLabel labelTrabalhadorBI = new JLabel( "B.I." ); private final JLabel labelTrabalhadorObservacoes = new JLabel( "Observa" + ccedil + otilde + "es" ); - private final JLabel labelTrabalhadorDataAdmissao = new JLabel( "Data de Admiss" + atilde + "o" ); + private final JLabel labelTrabalhadoresDataAdmissao = new JLabel( "Data de Admiss" + atilde + "o" ); public final LeafInputField inputTrabalhadorNome = new LeafInputField(); public final LeafInputField> inputTrabalhadorSexo = new LeafInputField>(); - public final LeafInputField inputTrabalhadorDataNascimento = new LeafInputField(); + public final LeafInputField inputTrabalhadoresDataNascimento = new LeafInputField(); public final LeafInputField inputTrabalhadorNacionalidade = new LeafInputField(); public final LeafInputField inputTrabalhadorBI = new LeafInputField(); public final LeafInputField inputTrabalhadorObservacoes = new LeafInputField(); - public final LeafInputField inputTrabalhadorDataAdmissao = new LeafInputField(); + public final LeafInputField inputTrabalhadoresDataAdmissao = new LeafInputField(); // processo @@ -301,14 +301,14 @@ public class ProcessoDadosPanel extends JPanel { if( trabalhador != null ) { - inputTrabalhadorDataNascimento.setObject( trabalhador.getDataNascimento() ); + inputTrabalhadoresDataNascimento.setObject( trabalhador.getDataNascimento() ); inputTrabalhadorSexo.setObject( trabalhador.getSexos(), trabalhador.getSexo() ); inputTrabalhadorNome.setObject( trabalhador.getNome() ); inputTrabalhadorNacionalidade.setObject( trabalhador.getNacionalidade() ); inputTrabalhadorBI.setObject( trabalhador.getBi() ); inputTrabalhadorObservacoes.setObject( trabalhador.getObservacoesGestao() ); - inputTrabalhadorDataAdmissao.setObject( trabalhador.getDataAdmissao() ); - labelTrabalhadorDataNascimento.setText( "Data de Nascimento (" + getIdade( trabalhador.getDataNascimento() ) + " anos)" ); + inputTrabalhadoresDataAdmissao.setObject( trabalhador.getDataAdmissao() ); + labelTrabalhadoresDataNascimento.setText( "Data de Nascimento (" + getIdade( trabalhador.getDataNascimento() ) + " anos)" ); cardLayout.show( this, PANEL_TRABALHADOR_NAME ); } @@ -847,7 +847,7 @@ public class ProcessoDadosPanel extends JPanel private void setupTrabalhadorPanel() { - setupSimpleDataPanel( panelTrabalhador, "Trabalhador", labelTrabalhadorNome, inputTrabalhadorNome, labelTrabalhadorSexo, inputTrabalhadorSexo, labelTrabalhadorBI, inputTrabalhadorBI, labelTrabalhadorNacionalidade, inputTrabalhadorNacionalidade, labelTrabalhadorDataNascimento, inputTrabalhadorDataNascimento, labelTrabalhadorDataAdmissao, inputTrabalhadorDataAdmissao, labelTrabalhadorObservacoes, inputTrabalhadorObservacoes ); + setupSimpleDataPanel( panelTrabalhador, "Trabalhador", labelTrabalhadorNome, inputTrabalhadorNome, labelTrabalhadorSexo, inputTrabalhadorSexo, labelTrabalhadorBI, inputTrabalhadorBI, labelTrabalhadorNacionalidade, inputTrabalhadorNacionalidade, labelTrabalhadoresDataNascimento, inputTrabalhadoresDataNascimento, labelTrabalhadoresDataAdmissao, inputTrabalhadoresDataAdmissao, labelTrabalhadorObservacoes, inputTrabalhadorObservacoes ); } private void setupProcessoPanel() diff --git a/trunk/SIPRPSoft/src/siprp/pesquisas/PesquisasProvider.java b/trunk/SIPRPSoft/src/siprp/pesquisas/PesquisasProvider.java index fcc3e2bd..b7644da5 100644 --- a/trunk/SIPRPSoft/src/siprp/pesquisas/PesquisasProvider.java +++ b/trunk/SIPRPSoft/src/siprp/pesquisas/PesquisasProvider.java @@ -11,10 +11,10 @@ import java.util.HashMap; import java.util.Hashtable; import java.util.Vector; -import siprp.data.EmpresaData; import siprp.data.Marcacao; -import siprp.data.MarcacaoTrabalhadorData; -import siprp.data.TrabalhadorData; +import siprp.data.outer.EmpresasData; +import siprp.data.outer.MarcacoesTrabalhadorData; +import siprp.data.outer.TrabalhadoresData; import com.evolute.utils.Singleton; import com.evolute.utils.arrays.Virtual2DArray; @@ -104,9 +104,9 @@ public class PesquisasProvider extends MetaProvider throws Exception { Select select = new Select( new String[]{ "empresas" }, - new String[]{ EmpresaData.ID, EmpresaData.DESIGNACAO_SOCIAL, EmpresaData.DESIGNACAO_SOCIAL_PLAIN }, - new Field( EmpresaData.INACTIVO ).isDifferent( "y" ), - new String[]{ EmpresaData.DESIGNACAO_SOCIAL_PLAIN }, null ); + new String[]{ EmpresasData.ID, EmpresasData.DESIGNACAO_SOCIAL, EmpresasData.DESIGNACAO_SOCIAL_PLAIN }, + new Field( EmpresasData.INACTIVO ).isDifferent( "y" ), + new String[]{ EmpresasData.DESIGNACAO_SOCIAL_PLAIN }, null ); // Select select = new Select( "SELECT e.id, e.designacao_social FROM empresas e ORDER BY lower( e.designacao_social );" ); Virtual2DArray array = executer.executeQuery( select ); IDObject empresas[] = new IDObject[ array.columnLength() ]; @@ -132,27 +132,27 @@ public class PesquisasProvider extends MetaProvider cal.set( Calendar.DAY_OF_MONTH, 30 ); Select select = new Select( new String[]{ "trabalhadores" }, - new String[]{ "COUNT(" + TrabalhadorData.ID + ")" }, - new Par( new Field( "YEAR(" + TrabalhadorData.DATA_ADMISSAO + ")" ).isLessOrEqual( new Integer( ano ) ).or( - new Field( TrabalhadorData.DATA_ADMISSAO ).isEqual( null ) ) ).and( + new String[]{ "COUNT(" + TrabalhadoresData.ID + ")" }, + new Par( new Field( "YEAR(" + TrabalhadoresData.DATA_ADMISSAO + ")" ).isLessOrEqual( new Integer( ano ) ).or( + new Field( TrabalhadoresData.DATA_ADMISSAO ).isEqual( null ) ) ).and( new Field( "estabelecimento_id" ).isEqual( estabelecimentoID ) ).and( - new Field( TrabalhadorData.SEXO ).isEqual( "m" ) ).and( + new Field( TrabalhadoresData.SEXO ).isEqual( "m" ) ).and( new Field( "trabalhadores.inactivo" ).isEqual( "n" ) ).and( - new Par( new Field( TrabalhadorData.DATA_DEMISSAO ).isGreater( cal.getTime() ).or( - new Field( TrabalhadorData.DATA_DEMISSAO ).isEqual( null ) ) ) ) ); + new Par( new Field( TrabalhadoresData.DATA_DEMISSAO ).isGreater( cal.getTime() ).or( + new Field( TrabalhadoresData.DATA_DEMISSAO ).isEqual( null ) ) ) ) ); Virtual2DArray array = executer.executeQuery( select ); int contagem[] = new int[ 2 ]; contagem[ 0 ] = ( ( Number ) array.get( 0, 0 ) ).intValue(); select = new Select( new String[]{ "trabalhadores" }, - new String[]{ "COUNT(" + TrabalhadorData.ID + ")" }, - new Par( new Field( "YEAR(" + TrabalhadorData.DATA_ADMISSAO + ")" ).isLessOrEqual( new Integer( ano ) ).or( - new Field( TrabalhadorData.DATA_ADMISSAO ).isEqual( null ) ) ).and( + new String[]{ "COUNT(" + TrabalhadoresData.ID + ")" }, + new Par( new Field( "YEAR(" + TrabalhadoresData.DATA_ADMISSAO + ")" ).isLessOrEqual( new Integer( ano ) ).or( + new Field( TrabalhadoresData.DATA_ADMISSAO ).isEqual( null ) ) ).and( new Field( "estabelecimento_id" ).isEqual( estabelecimentoID ) ).and( - new Field( TrabalhadorData.SEXO ).isEqual( "f" ) ).and( + new Field( TrabalhadoresData.SEXO ).isEqual( "f" ) ).and( new Field( "trabalhadores.inactivo" ).isEqual( "n" ) ).and( - new Par( new Field( TrabalhadorData.DATA_DEMISSAO ).isGreater( cal.getTime() ).or( - new Field( TrabalhadorData.DATA_DEMISSAO ).isEqual( null ) ) ) ) ); + new Par( new Field( TrabalhadoresData.DATA_DEMISSAO ).isGreater( cal.getTime() ).or( + new Field( TrabalhadoresData.DATA_DEMISSAO ).isEqual( null ) ) ) ) ); array = executer.executeQuery( select ); contagem[ 1 ] = ( ( Number ) array.get( 0, 0 ) ).intValue(); return contagem; @@ -178,86 +178,86 @@ public class PesquisasProvider extends MetaProvider //0-18 Select select = new Select( new String[]{ "trabalhadores" }, - new String[]{ "COUNT(" + TrabalhadorData.ID + ")" }, - new Par( new Field( "YEAR(" + TrabalhadorData.DATA_ADMISSAO + ")" ).isLessOrEqual( new Integer( ano ) ).or( - new Field( TrabalhadorData.DATA_ADMISSAO ).isEqual( null ) ) ).and( + new String[]{ "COUNT(" + TrabalhadoresData.ID + ")" }, + new Par( new Field( "YEAR(" + TrabalhadoresData.DATA_ADMISSAO + ")" ).isLessOrEqual( new Integer( ano ) ).or( + new Field( TrabalhadoresData.DATA_ADMISSAO ).isEqual( null ) ) ).and( new Field( "estabelecimento_id" ).isEqual( estabelecimentoID ) ).and( - new Field( TrabalhadorData.SEXO ).isEqual( "m" ) ).and( - new Field( TrabalhadorData.DATA_NASCIMENTO ).isGreater( age18.getTime() ) ).and( + new Field( TrabalhadoresData.SEXO ).isEqual( "m" ) ).and( + new Field( TrabalhadoresData.DATA_NASCIMENTO ).isGreater( age18.getTime() ) ).and( new Field( "trabalhadores.inactivo" ).isEqual( "n" ) ).and( - new Par( new Field( TrabalhadorData.DATA_DEMISSAO ).isGreater( eoy.getTime() ).or( - new Field( TrabalhadorData.DATA_DEMISSAO ).isEqual( null ) ) ) ) ); + new Par( new Field( TrabalhadoresData.DATA_DEMISSAO ).isGreater( eoy.getTime() ).or( + new Field( TrabalhadoresData.DATA_DEMISSAO ).isEqual( null ) ) ) ) ); Virtual2DArray array = executer.executeQuery( select ); int contagem[][] = new int[ 3 ][ 2 ]; contagem[ 0 ][ 0 ] = ( ( Number ) array.get( 0, 0 ) ).intValue(); select = new Select( new String[]{ "trabalhadores" }, - new String[]{ "COUNT(" + TrabalhadorData.ID + ")" }, - new Par( new Field( "YEAR(" + TrabalhadorData.DATA_ADMISSAO + ")" ).isLessOrEqual( new Integer( ano ) ).or( - new Field( TrabalhadorData.DATA_ADMISSAO ).isEqual( null ) ) ).and( + new String[]{ "COUNT(" + TrabalhadoresData.ID + ")" }, + new Par( new Field( "YEAR(" + TrabalhadoresData.DATA_ADMISSAO + ")" ).isLessOrEqual( new Integer( ano ) ).or( + new Field( TrabalhadoresData.DATA_ADMISSAO ).isEqual( null ) ) ).and( new Field( "estabelecimento_id" ).isEqual( estabelecimentoID ) ).and( - new Field( TrabalhadorData.SEXO ).isEqual( "f" ) ).and( - new Field( TrabalhadorData.DATA_NASCIMENTO ).isGreater( age18.getTime() ) ).and( + new Field( TrabalhadoresData.SEXO ).isEqual( "f" ) ).and( + new Field( TrabalhadoresData.DATA_NASCIMENTO ).isGreater( age18.getTime() ) ).and( new Field( "trabalhadores.inactivo" ).isEqual( "n" ) ).and( - new Par( new Field( TrabalhadorData.DATA_DEMISSAO ).isGreater( eoy.getTime() ).or( - new Field( TrabalhadorData.DATA_DEMISSAO ).isEqual( null ) ) ) ) ); + new Par( new Field( TrabalhadoresData.DATA_DEMISSAO ).isGreater( eoy.getTime() ).or( + new Field( TrabalhadoresData.DATA_DEMISSAO ).isEqual( null ) ) ) ) ); array = executer.executeQuery( select ); contagem[ 0 ][ 1 ] = ( ( Number ) array.get( 0, 0 ) ).intValue(); //18-49 select = new Select( new String[]{ "trabalhadores" }, - new String[]{ "COUNT(" + TrabalhadorData.ID + ")" }, - new Par( new Field( "YEAR(" + TrabalhadorData.DATA_ADMISSAO + ")" ).isLessOrEqual( new Integer( ano ) ).or( - new Field( TrabalhadorData.DATA_ADMISSAO ).isEqual( null ) ) ).and( + new String[]{ "COUNT(" + TrabalhadoresData.ID + ")" }, + new Par( new Field( "YEAR(" + TrabalhadoresData.DATA_ADMISSAO + ")" ).isLessOrEqual( new Integer( ano ) ).or( + new Field( TrabalhadoresData.DATA_ADMISSAO ).isEqual( null ) ) ).and( new Field( "estabelecimento_id" ).isEqual( estabelecimentoID ) ).and( - new Field( TrabalhadorData.SEXO ).isEqual( "m" ) ).and( - new Field( TrabalhadorData.DATA_NASCIMENTO ).isLessOrEqual( age18.getTime() ) ).and( - new Field( TrabalhadorData.DATA_NASCIMENTO ).isGreater( age50.getTime() ) ).and( + new Field( TrabalhadoresData.SEXO ).isEqual( "m" ) ).and( + new Field( TrabalhadoresData.DATA_NASCIMENTO ).isLessOrEqual( age18.getTime() ) ).and( + new Field( TrabalhadoresData.DATA_NASCIMENTO ).isGreater( age50.getTime() ) ).and( new Field( "trabalhadores.inactivo" ).isEqual( "n" ) ).and( - new Par( new Field( TrabalhadorData.DATA_DEMISSAO ).isGreater( eoy.getTime() ).or( - new Field( TrabalhadorData.DATA_DEMISSAO ).isEqual( null ) ) ) ) ); + new Par( new Field( TrabalhadoresData.DATA_DEMISSAO ).isGreater( eoy.getTime() ).or( + new Field( TrabalhadoresData.DATA_DEMISSAO ).isEqual( null ) ) ) ) ); array = executer.executeQuery( select ); contagem[ 1 ][ 0 ] = ( ( Number ) array.get( 0, 0 ) ).intValue(); select = new Select( new String[]{ "trabalhadores" }, - new String[]{ "COUNT(" + TrabalhadorData.ID + ")" }, - new Par( new Field( "YEAR(" + TrabalhadorData.DATA_ADMISSAO + ")" ).isLessOrEqual( new Integer( ano ) ).or( - new Field( TrabalhadorData.DATA_ADMISSAO ).isEqual( null ) ) ).and( + new String[]{ "COUNT(" + TrabalhadoresData.ID + ")" }, + new Par( new Field( "YEAR(" + TrabalhadoresData.DATA_ADMISSAO + ")" ).isLessOrEqual( new Integer( ano ) ).or( + new Field( TrabalhadoresData.DATA_ADMISSAO ).isEqual( null ) ) ).and( new Field( "estabelecimento_id" ).isEqual( estabelecimentoID ) ).and( - new Field( TrabalhadorData.SEXO ).isEqual( "f" ) ).and( - new Field( TrabalhadorData.DATA_NASCIMENTO ).isLessOrEqual( age18.getTime() ) ).and( - new Field( TrabalhadorData.DATA_NASCIMENTO ).isGreater( age50.getTime() ) ).and( + new Field( TrabalhadoresData.SEXO ).isEqual( "f" ) ).and( + new Field( TrabalhadoresData.DATA_NASCIMENTO ).isLessOrEqual( age18.getTime() ) ).and( + new Field( TrabalhadoresData.DATA_NASCIMENTO ).isGreater( age50.getTime() ) ).and( new Field( "trabalhadores.inactivo" ).isEqual( "n" ) ).and( - new Par( new Field( TrabalhadorData.DATA_DEMISSAO ).isGreater( eoy.getTime() ).or( - new Field( TrabalhadorData.DATA_DEMISSAO ).isEqual( null ) ) ) ) ); + new Par( new Field( TrabalhadoresData.DATA_DEMISSAO ).isGreater( eoy.getTime() ).or( + new Field( TrabalhadoresData.DATA_DEMISSAO ).isEqual( null ) ) ) ) ); array = executer.executeQuery( select ); contagem[ 1 ][ 1 ] = ( ( Number ) array.get( 0, 0 ) ).intValue(); //50- select = new Select( new String[]{ "trabalhadores" }, - new String[]{ "COUNT(" + TrabalhadorData.ID + ")" }, - new Par( new Field( "YEAR(" + TrabalhadorData.DATA_ADMISSAO + ")" ).isLessOrEqual( new Integer( ano ) ).or( - new Field( TrabalhadorData.DATA_ADMISSAO ).isEqual( null ) ) ).and( + new String[]{ "COUNT(" + TrabalhadoresData.ID + ")" }, + new Par( new Field( "YEAR(" + TrabalhadoresData.DATA_ADMISSAO + ")" ).isLessOrEqual( new Integer( ano ) ).or( + new Field( TrabalhadoresData.DATA_ADMISSAO ).isEqual( null ) ) ).and( new Field( "estabelecimento_id" ).isEqual( estabelecimentoID ) ).and( - new Field( TrabalhadorData.SEXO ).isEqual( "m" ) ).and( - new Field( TrabalhadorData.DATA_NASCIMENTO ).isLessOrEqual( age50.getTime() ) ).and( + new Field( TrabalhadoresData.SEXO ).isEqual( "m" ) ).and( + new Field( TrabalhadoresData.DATA_NASCIMENTO ).isLessOrEqual( age50.getTime() ) ).and( new Field( "trabalhadores.inactivo" ).isEqual( "n" ) ).and( - new Par( new Field( TrabalhadorData.DATA_DEMISSAO ).isGreater( eoy.getTime() ).or( - new Field( TrabalhadorData.DATA_DEMISSAO ).isEqual( null ) ) ) ) ); + new Par( new Field( TrabalhadoresData.DATA_DEMISSAO ).isGreater( eoy.getTime() ).or( + new Field( TrabalhadoresData.DATA_DEMISSAO ).isEqual( null ) ) ) ) ); array = executer.executeQuery( select ); contagem[ 2 ][ 0 ] = ( ( Number ) array.get( 0, 0 ) ).intValue(); select = new Select( new String[]{ "trabalhadores" }, - new String[]{ "COUNT(" + TrabalhadorData.ID + ")" }, - new Par( new Field( "YEAR(" + TrabalhadorData.DATA_ADMISSAO + ")" ).isLessOrEqual( new Integer( ano ) ).or( - new Field( TrabalhadorData.DATA_ADMISSAO ).isEqual( null ) ) ).and( + new String[]{ "COUNT(" + TrabalhadoresData.ID + ")" }, + new Par( new Field( "YEAR(" + TrabalhadoresData.DATA_ADMISSAO + ")" ).isLessOrEqual( new Integer( ano ) ).or( + new Field( TrabalhadoresData.DATA_ADMISSAO ).isEqual( null ) ) ).and( new Field( "estabelecimento_id" ).isEqual( estabelecimentoID ) ).and( - new Field( TrabalhadorData.SEXO ).isEqual( "f" ) ).and( - new Field( TrabalhadorData.DATA_NASCIMENTO ).isLessOrEqual( age50.getTime() ) ).and( + new Field( TrabalhadoresData.SEXO ).isEqual( "f" ) ).and( + new Field( TrabalhadoresData.DATA_NASCIMENTO ).isLessOrEqual( age50.getTime() ) ).and( new Field( "trabalhadores.inactivo" ).isEqual( "n" ) ).and( - new Par( new Field( TrabalhadorData.DATA_DEMISSAO ).isGreater( eoy.getTime() ).or( - new Field( TrabalhadorData.DATA_DEMISSAO ).isEqual( null ) ) ) ) ); + new Par( new Field( TrabalhadoresData.DATA_DEMISSAO ).isGreater( eoy.getTime() ).or( + new Field( TrabalhadoresData.DATA_DEMISSAO ).isEqual( null ) ) ) ) ); array = executer.executeQuery( select ); contagem[ 2 ][ 1 ] = ( ( Number ) array.get( 0, 0 ) ).intValue(); @@ -291,12 +291,12 @@ public class PesquisasProvider extends MetaProvider new String[]{ "DISTINCT trabalhadores.id, exames.data" }, new Field( "estabelecimento_id" ).isEqual( estabelecimentoID ).and( new Field( "exames.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ) ).and( - new Field( TrabalhadorData.SEXO ).isEqual( sexos[s] ) ).and( + new Field( TrabalhadoresData.SEXO ).isEqual( sexos[s] ) ).and( new Field( "YEAR( exames.data )" ).isEqual( new Integer( ano ) ) ).and( dates[ d ] == null ? new Field( "exames.id" ).isDifferent( null ) : - new Field( TrabalhadorData.DATA_NASCIMENTO ).isLessOrEqual( dates[ d ].getTime() ) ).and( + new Field( TrabalhadoresData.DATA_NASCIMENTO ).isLessOrEqual( dates[ d ].getTime() ) ).and( dates[ d + 1 ] == null ? new Field( "exames.id" ).isDifferent( null ) : - new Field( TrabalhadorData.DATA_NASCIMENTO ).isGreater( dates[ d + 1 ].getTime() ) ).and( + new Field( TrabalhadoresData.DATA_NASCIMENTO ).isGreater( dates[ d + 1 ].getTime() ) ).and( new Field( "exames.tipo" ).isEqual( new Integer( TIPOS_EXAME[ t ] ) ) ).and( new Field( "exames.inactivo" ).isDifferent( "y" ) ).and( new Field( "trabalhadores.inactivo" ).isDifferent( "y" ) ) ); @@ -350,12 +350,12 @@ public class PesquisasProvider extends MetaProvider new String[]{ "DISTINCT trabalhadores.id, exames.data" }, new Field( "estabelecimento_id" ).isEqual( estabelecimentoID ).and( new Field( "exames.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ) ).and( - new Field( TrabalhadorData.SEXO ).isEqual( sexos[s] ) ).and( + new Field( TrabalhadoresData.SEXO ).isEqual( sexos[s] ) ).and( new Field( "YEAR( exames.data )" ).isEqual( new Integer( ano ) ) ).and( dates[ d ] == null ? new Field( "exames.id" ).isDifferent( null ) : - new Field( TrabalhadorData.DATA_NASCIMENTO ).isLessOrEqual( dates[ d ].getTime() ) ).and( + new Field( TrabalhadoresData.DATA_NASCIMENTO ).isLessOrEqual( dates[ d ].getTime() ) ).and( dates[ d + 1 ] == null ? new Field( "exames.id" ).isDifferent( null ) : - new Field( TrabalhadorData.DATA_NASCIMENTO ).isGreater( dates[ d + 1 ].getTime() ) ).and( + new Field( TrabalhadoresData.DATA_NASCIMENTO ).isGreater( dates[ d + 1 ].getTime() ) ).and( new Field( "exames.tipo" ).isEqual( new Integer( 3 ) ) ).and( new Field( "exames.ocasional" ).isEqual( new Integer( TIPOS_OCASIONAL[ t ] ) ) ).and( new Field( "exames.inactivo" ).isDifferent( "y" ) ).and( @@ -389,12 +389,12 @@ public class PesquisasProvider extends MetaProvider new Select( new String[]{ "estabelecimentos", "trabalhadores" }, new String[]{ "COUNT(trabalhadores.id)" }, new Field( "trabalhadores.estabelecimento_id" ).isEqual( new Field( "estabelecimentos.id" ) ).and( - new Par( new Field( "YEAR(" + TrabalhadorData.DATA_ADMISSAO + ")" ).isLess( new Integer( ano ) ).or( - new Field( TrabalhadorData.DATA_ADMISSAO ).isEqual( null ) ) ) ).and( - new Par( new Field( "YEAR(" + TrabalhadorData.DATA_DEMISSAO + ")" ).isGreater( new Integer( ano ) ).or( - new Field( TrabalhadorData.DATA_DEMISSAO ).isEqual( null ) ) ) ).and( + new Par( new Field( "YEAR(" + TrabalhadoresData.DATA_ADMISSAO + ")" ).isLess( new Integer( ano ) ).or( + new Field( TrabalhadoresData.DATA_ADMISSAO ).isEqual( null ) ) ) ).and( + new Par( new Field( "YEAR(" + TrabalhadoresData.DATA_DEMISSAO + ")" ).isGreater( new Integer( ano ) ).or( + new Field( TrabalhadoresData.DATA_DEMISSAO ).isEqual( null ) ) ) ).and( new Field( "empresa_id" ).isEqual( empresaID ) ).and( - new Field( TrabalhadorData.SEXO ).isEqual( sexos[ n ] ) ).and( + new Field( TrabalhadoresData.SEXO ).isEqual( sexos[ n ] ) ).and( new Field( "trabalhadores.inactivo" ).isEqual( "n" ) ) ); Virtual2DArray array = executer.executeQuery( select ); contagens[ n ] = ( ( Number ) array.get( 0, 0 ) ).doubleValue(); @@ -405,11 +405,11 @@ public class PesquisasProvider extends MetaProvider new Select( new String[]{ "estabelecimentos", "trabalhadores" }, new String[]{ "SUM( MONTH( data_demissao ) )" }, new Field( "trabalhadores.estabelecimento_id" ).isEqual( new Field( "estabelecimentos.id" ) ).and( - new Par( new Field( "YEAR(" + TrabalhadorData.DATA_ADMISSAO + ")" ).isLess( new Integer( ano ) ).or( - new Field( TrabalhadorData.DATA_ADMISSAO ).isEqual( null ) ) ) ).and( - new Field( "YEAR(" + TrabalhadorData.DATA_DEMISSAO + ")" ).isEqual( new Integer( ano ) ) ).and( + new Par( new Field( "YEAR(" + TrabalhadoresData.DATA_ADMISSAO + ")" ).isLess( new Integer( ano ) ).or( + new Field( TrabalhadoresData.DATA_ADMISSAO ).isEqual( null ) ) ) ).and( + new Field( "YEAR(" + TrabalhadoresData.DATA_DEMISSAO + ")" ).isEqual( new Integer( ano ) ) ).and( new Field( "empresa_id" ).isEqual( empresaID ) ).and( - new Field( TrabalhadorData.SEXO ).isEqual( sexos[ n ] ) ).and( + new Field( TrabalhadoresData.SEXO ).isEqual( sexos[ n ] ) ).and( new Field( "trabalhadores.inactivo" ).isEqual( "n" ) ) ); System.out.println( "SELECT: " + select ); Virtual2DArray array = executer.executeQuery( select ); @@ -425,11 +425,11 @@ System.out.println( "SELECT: " + select ); new Select( new String[]{ "estabelecimentos", "trabalhadores" }, new String[]{ "SUM( ( 1 + 12 - MONTH( data_admissao ) ) )" }, new Field( "trabalhadores.estabelecimento_id" ).isEqual( new Field( "estabelecimentos.id" ) ).and( - new Field( "YEAR(" + TrabalhadorData.DATA_ADMISSAO + ")" ).isEqual( new Integer( ano ) ) ).and( - new Par( new Field( "YEAR(" + TrabalhadorData.DATA_DEMISSAO + ")" ).isGreater( new Integer( ano ) ).or( - new Field( TrabalhadorData.DATA_DEMISSAO ).isEqual( null ) ) ) ).and( + new Field( "YEAR(" + TrabalhadoresData.DATA_ADMISSAO + ")" ).isEqual( new Integer( ano ) ) ).and( + new Par( new Field( "YEAR(" + TrabalhadoresData.DATA_DEMISSAO + ")" ).isGreater( new Integer( ano ) ).or( + new Field( TrabalhadoresData.DATA_DEMISSAO ).isEqual( null ) ) ) ).and( new Field( "empresa_id" ).isEqual( empresaID ) ).and( - new Field( TrabalhadorData.SEXO ).isEqual( sexos[ n ] ) ).and( + new Field( TrabalhadoresData.SEXO ).isEqual( sexos[ n ] ) ).and( new Field( "trabalhadores.inactivo" ).isEqual( "n" ) ) ); Virtual2DArray array = executer.executeQuery( select ); if( array.get( 0, 0 ) != null ) @@ -444,10 +444,10 @@ System.out.println( "SELECT: " + select ); new Select( new String[]{ "estabelecimentos", "trabalhadores" }, new String[]{ "SUM( ( 1 + MONTH( data_demissao ) - MONTH( data_admissao ) ) )" }, new Field( "trabalhadores.estabelecimento_id" ).isEqual( new Field( "estabelecimentos.id" ) ).and( - new Field( "YEAR(" + TrabalhadorData.DATA_ADMISSAO + ")" ).isEqual( new Integer( ano ) ) ).and( - new Field( "YEAR(" + TrabalhadorData.DATA_DEMISSAO + ")" ).isEqual( new Integer( ano ) ) ).and( + new Field( "YEAR(" + TrabalhadoresData.DATA_ADMISSAO + ")" ).isEqual( new Integer( ano ) ) ).and( + new Field( "YEAR(" + TrabalhadoresData.DATA_DEMISSAO + ")" ).isEqual( new Integer( ano ) ) ).and( new Field( "empresa_id" ).isEqual( empresaID ) ).and( - new Field( TrabalhadorData.SEXO ).isEqual( sexos[ n ] ) ).and( + new Field( TrabalhadoresData.SEXO ).isEqual( sexos[ n ] ) ).and( new Field( "trabalhadores.inactivo" ).isEqual( "n" ) ) ); Virtual2DArray array = executer.executeQuery( select ); if( array.get( 0, 0 ) != null ) @@ -472,12 +472,12 @@ System.out.println( "SELECT: " + select ); new Select( new String[]{ "estabelecimentos", "trabalhadores" }, new String[]{ "COUNT(trabalhadores.id)" }, new Field( "trabalhadores.estabelecimento_id" ).isEqual( new Field( "estabelecimentos.id" ) ).and( - new Par( new Field( "YEAR(" + TrabalhadorData.DATA_ADMISSAO + ")" ).isLessOrEqual( new Integer( ano ) ).or( - new Field( TrabalhadorData.DATA_ADMISSAO ).isEqual( null ) ) ) ).and( - new Par( new Field( "YEAR(" + TrabalhadorData.DATA_DEMISSAO + ")" ).isGreaterOrEqual( new Integer( ano ) ).or( - new Field( TrabalhadorData.DATA_DEMISSAO ).isEqual( null ) ) ) ).and( + new Par( new Field( "YEAR(" + TrabalhadoresData.DATA_ADMISSAO + ")" ).isLessOrEqual( new Integer( ano ) ).or( + new Field( TrabalhadoresData.DATA_ADMISSAO ).isEqual( null ) ) ) ).and( + new Par( new Field( "YEAR(" + TrabalhadoresData.DATA_DEMISSAO + ")" ).isGreaterOrEqual( new Integer( ano ) ).or( + new Field( TrabalhadoresData.DATA_DEMISSAO ).isEqual( null ) ) ) ).and( new Field( "empresa_id" ).isEqual( empresaID ) ).and( - new Field( TrabalhadorData.SEXO ).isEqual( sexos[ n ] ) ).and( + new Field( TrabalhadoresData.SEXO ).isEqual( sexos[ n ] ) ).and( new Field( "trabalhadores.inactivo" ).isEqual( "n" ) ) ); Virtual2DArray array = executer.executeQuery( select ); contagens[ n ] = ( ( Number ) array.get( 0, 0 ) ).doubleValue(); @@ -516,13 +516,13 @@ System.out.println( "SELECT: " + select ); // Integer pAux = new Integer( p + 1 ); // perfis[ p ] = new Vector(); // select = new Select( new String[]{"estabelecimentos", "trabalhadores", "marcacoes_trabalhador"}, -// new String[]{"COUNT(marcacoes_trabalhador.id)", TrabalhadorData.PERFIL }, +// new String[]{"COUNT(marcacoes_trabalhador.id)", TrabalhadoresData.PERFIL }, // new Field( "marcacoes_trabalhador.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ).and( // new Field( "trabalhadores.estabelecimento_id" ).isEqual( new Field( "estabelecimentos.id" ) ) ).and( // new Field( "empresa_id" ).isEqual( empresaID ) ).and( -// new Field( MarcacaoTrabalhadorData.TIPO ).isEqual( new Integer( MarcacaoTrabalhadorData.TIPO_EXAMES ) ) ).and( +// new Field( MarcacoesTrabalhadorData.TIPO ).isEqual( new Integer( MarcacoesTrabalhadorData.TIPO_EXAMES ) ) ).and( // new Field( "YEAR( marcacoes_trabalhador.data ) " ).isEqual( new Integer( ano ) ).and( -// new Field( MarcacaoTrabalhadorData.ESTADO ).in( new Integer[]{ new Integer( 1 ), new Integer( 2 ) } ) ) ).and( +// new Field( MarcacoesTrabalhadorData.ESTADO ).in( new Integer[]{ new Integer( 1 ), new Integer( 2 ) } ) ) ).and( // new Field( "trabalhadores.perfil" ).isEqual( pAux ) ) ); // array = executer.executeQuery( select ); // @@ -577,15 +577,15 @@ System.out.println( "SELECT: " + select ); perfil2 = perfil1; } select = new Select( new String[]{"estabelecimentos", "trabalhadores", "marcacoes_trabalhador"}, - new String[]{"COUNT(marcacoes_trabalhador.id)", TrabalhadorData.PERFIL }, + new String[]{"COUNT(marcacoes_trabalhador.id)", TrabalhadoresData.PERFIL }, new Field( "marcacoes_trabalhador.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ).and( new Field( "trabalhadores.estabelecimento_id" ).isEqual( new Field( "estabelecimentos.id" ) ) ).and( new Field( "empresa_id" ).isEqual( empresaID ) ).and( - new Field( MarcacaoTrabalhadorData.TIPO ).isEqual( new Integer( MarcacaoTrabalhadorData.TIPO_EXAMES ) ) ).and( + new Field( MarcacoesTrabalhadorData.TIPO ).isEqual( new Integer( MarcacoesTrabalhadorData.TIPO_EXAMES ) ) ).and( new Field( "YEAR( marcacoes_trabalhador.data ) " ).isEqual( new Integer( ano ) ).and( new Field( Marcacao.REALIZADA ).isEqual( "y" ) ) ), - new String[]{ TrabalhadorData.PERFIL }, - new String[]{ TrabalhadorData.PERFIL } ); + new String[]{ TrabalhadoresData.PERFIL }, + new String[]{ TrabalhadoresData.PERFIL } ); array = executer.executeQuery( select ); int numeroExames[] = new int[ 2 ]; for( int n = 0; n < array.columnLength(); n++ ) @@ -690,13 +690,13 @@ System.out.println( "SELECT: " + select ); new Field( "marcacoes_trabalhador.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ), new Field( "trabalhadores.estabelecimentos_id" ).isEqual( new Field( "estabelecimentos.id" ) ), }, - new String[]{"COUNT(marcacoes_trabalhador.id)", TrabalhadorData.PERFIL }, + new String[]{"COUNT(marcacoes_trabalhador.id)", TrabalhadoresData.PERFIL }, new Field( "estabelecimentos.id.empresa_id" ).isEqual( empresaId ).and( - new Field( MarcacaoTrabalhadorData.TIPO ).isEqual( new Integer( MarcacaoTrabalhadorData.TIPO_EXAMES ) ) ).and( + new Field( MarcacoesTrabalhadorData.TIPO ).isEqual( new Integer( MarcacoesTrabalhadorData.TIPO_EXAMES ) ) ).and( new Field( "YEAR( marcacoes_trabalhador.data ) " ).isEqual( new Integer( ano ) ).and( new Field( Marcacao.REALIZADA ).isEqual( "y" ) ) ), null, - new String[]{ TrabalhadorData.PERFIL }, + new String[]{ TrabalhadoresData.PERFIL }, null, null ); array = executer.executeQuery( select ); @@ -764,14 +764,14 @@ System.out.println( "SELECT: " + select ); perfil2 = perfil1; } select = new Select( new String[]{"trabalhadores", "marcacoes_trabalhador"}, - new String[]{"COUNT(marcacoes_trabalhador.id)", TrabalhadorData.PERFIL }, + new String[]{"COUNT(marcacoes_trabalhador.id)", TrabalhadoresData.PERFIL }, new Field( "marcacoes_trabalhador.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ).and( new Field( "trabalhadores.estabelecimento_id" ).isEqual( estabelecimentoID ) ).and( - new Field( MarcacaoTrabalhadorData.TIPO ).isEqual( new Integer( MarcacaoTrabalhadorData.TIPO_EXAMES ) ) ).and( + new Field( MarcacoesTrabalhadorData.TIPO ).isEqual( new Integer( MarcacoesTrabalhadorData.TIPO_EXAMES ) ) ).and( new Field( "YEAR( marcacoes_trabalhador.data ) " ).isEqual( new Integer( ano ) ).and( new Field( Marcacao.REALIZADA ).isEqual( "y" ) ) ), - new String[]{ TrabalhadorData.PERFIL }, - new String[]{ TrabalhadorData.PERFIL } ); + new String[]{ TrabalhadoresData.PERFIL }, + new String[]{ TrabalhadoresData.PERFIL } ); array = executer.executeQuery( select ); int numeroExames[] = new int[ 2 ]; for( int n = 0; n < array.columnLength(); n++ ) @@ -885,13 +885,13 @@ System.out.println( "SELECT: " + select ); new String[]{"trabalhadores", "marcacoes_trabalhador"}, new Integer[]{ Select2.JOIN_INNER }, new Expression[]{ new Field( "marcacoes_trabalhador.trabalhador_id" ).isEqual( new Field( "trabalhadores.id" ) ) }, - new String[]{"COUNT(marcacoes_trabalhador.id)", TrabalhadorData.PERFIL }, + new String[]{"COUNT(marcacoes_trabalhador.id)", TrabalhadoresData.PERFIL }, new Field( "trabalhadores.estabelecimento_id" ).isEqual( estabelecimentoID ).and( - new Field( MarcacaoTrabalhadorData.TIPO ).isEqual( new Integer( MarcacaoTrabalhadorData.TIPO_EXAMES ) ) ).and( + new Field( MarcacoesTrabalhadorData.TIPO ).isEqual( new Integer( MarcacoesTrabalhadorData.TIPO_EXAMES ) ) ).and( new Field( "YEAR( marcacoes_trabalhador.data ) " ).isEqual( new Integer( ano ) ).and( new Field( Marcacao.REALIZADA ).isEqual( "y" ) ) ), null, - new String[]{ TrabalhadorData.PERFIL }, + new String[]{ TrabalhadoresData.PERFIL }, null, null ); array = executer.executeQuery( select ); diff --git a/trunk/SIPRPSoft/src/siprp/pesquisas/PesquisasWindow.java b/trunk/SIPRPSoft/src/siprp/pesquisas/PesquisasWindow.java index c4f497b6..1aeb0d4a 100644 --- a/trunk/SIPRPSoft/src/siprp/pesquisas/PesquisasWindow.java +++ b/trunk/SIPRPSoft/src/siprp/pesquisas/PesquisasWindow.java @@ -35,15 +35,15 @@ import javax.swing.ListSelectionModel; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; -import siprp.data.ContactoData; -import siprp.data.EmpresaData; -import siprp.data.EstabelecimentoData; +import siprp.data.outer.ContactosData; +import siprp.data.outer.EmpresasData; +import siprp.data.outer.EstabelecimentosData; +import com.evolute.entity.ProviderInterface; import com.evolute.utils.Singleton; import com.evolute.utils.data.IDObject; import com.evolute.utils.data.MappableObject; import com.evolute.utils.documents.YearDocument; -import com.evolute.utils.jdo.JDOProvider; import com.evolute.utils.tables.BaseTable; import com.evolute.utils.tables.VectorTableModel; import com.evolute.utils.tracker.TrackableWindow; @@ -57,7 +57,7 @@ import com.evolute.utils.ui.text.CopyPasteHandler; public class PesquisasWindow extends JFrame implements TrackableWindow, ListSelectionListener, ActionListener { - private JDOProvider JDO; + private ProviderInterface JDO; private PesquisasProvider provider; private JTextField anoText; @@ -80,7 +80,7 @@ public class PesquisasWindow extends JFrame throws Exception { provider = (PesquisasProvider)PesquisasProvider.getProvider(); - JDO =( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); + JDO =( ProviderInterface ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER ); setupComponents(); } @@ -287,20 +287,20 @@ public class PesquisasWindow extends JFrame try { Integer idEmpresa = ( (IDObject)empresasModel.getRowAt( sEmpresa ) ).getID(); - EmpresaData empresa = (EmpresaData)JDO.load( EmpresaData.class, idEmpresa ); + EmpresasData empresa = (EmpresasData)JDO.load( EmpresasData.class, idEmpresa ); buff.append( " DESIGNA\u00C7\u00C3O SOCIAL: " ); - String designacao = (String)empresa.get( EmpresaData.DESIGNACAO_SOCIAL ); + String designacao = (String)empresa.get( EmpresasData.DESIGNACAO_SOCIAL ); buff.append( "" + ( designacao == null ? "" : designacao.trim() ) + "
" ); buff.append( " MORADA: " ); - String morada = (String)empresa.get( EmpresaData.MORADA ); + String morada = (String)empresa.get( EmpresasData.MORADA ); buff.append( "" + ( morada == null ? "" : morada.trim() ) + "
" ); buff.append( " LOCALIDADE: " ); - String localidade = ( String ) empresa.get( EmpresaData.LOCALIDADE ); + String localidade = ( String ) empresa.get( EmpresasData.LOCALIDADE ); buff.append( "" + ( localidade == null ? "" : localidade.trim() ) + "
" ); buff.append( " C\u00D3DIGO POSTAL: " ); - String codigoPostal = ( String ) empresa.get( EmpresaData.CODIGO_POSTAL ); + String codigoPostal = ( String ) empresa.get( EmpresasData.CODIGO_POSTAL ); buff.append( "" + ( codigoPostal == null ? "" : codigoPostal.trim() ) + "
" ); - ContactoData contacto = (ContactoData)empresa.get( EmpresaData.CONTACTO_2 ); + ContactosData contacto = (ContactosData)empresa.get( EmpresasData.CONTACTO_2 ); if( contacto == null ) { buff.append( " TELEFONE:
" ); @@ -309,26 +309,26 @@ public class PesquisasWindow extends JFrame else { buff.append( " TELEFONE: " ); - String telefone = ( String ) contacto.get( ContactoData.TELEFONE ); + String telefone = ( String ) contacto.get( ContactosData.TELEFONE ); buff.append( "" + ( telefone == null ? "" : telefone.trim() ) + "
" ); buff.append( " FAX: " ); - String fax = ( String ) contacto.get( ContactoData.TELEFONE ); + String fax = ( String ) contacto.get( ContactosData.TELEFONE ); buff.append( "" + ( fax == null ? "" : fax.trim() ) + "
" ); } buff.append( " DISTRITO: " ); - String distrito = ( String ) empresa.get( EmpresaData.DISTRITO ); + String distrito = ( String ) empresa.get( EmpresasData.DISTRITO ); buff.append( "" + ( distrito == null ? "" : distrito ) + "
" ); buff.append( " CONCELHO: " ); - String concelho = ( String ) empresa.get( EmpresaData.CONCELHO ); + String concelho = ( String ) empresa.get( EmpresasData.CONCELHO ); buff.append( "" + ( concelho == null ? "" : concelho ) + "
" ); buff.append( " N\u00DAMERO PESSOA COLECTIVA: " ); - String contribuinte = ( String ) empresa.get( EmpresaData.CONTRIBUINTE ); + String contribuinte = ( String ) empresa.get( EmpresasData.CONTRIBUINTE ); buff.append( "" + ( contribuinte == null ? "" : contribuinte ) + "
" ); buff.append( " N\u00DAMERO SEGURAN\u00C7A SOCIAL: " ); - String segSocial = ( String ) empresa.get( EmpresaData.SEGURANCA_SOCIAL ); + String segSocial = ( String ) empresa.get( EmpresasData.SEGURANCA_SOCIAL ); buff.append( "" + ( segSocial == null ? "" : segSocial ) + "
" ); buff.append( " CAE: " ); - String CAE = ( String ) empresa.get( EmpresaData.CAE ); + String CAE = ( String ) empresa.get( EmpresasData.CAE ); buff.append( "" + ( CAE == null ? "" : CAE ) + "
" ); buff.append( "
 N\u00DAMERO M\u00C9DIO DE TRABALHADORES DURANTE O ANO" ); double contagemMedia[] = provider.countNumeroMedioTrabalhadoresEmpresa( idEmpresa, ano ); @@ -368,20 +368,20 @@ public class PesquisasWindow extends JFrame buff.append( "
" ); for( int n = 0; n < estabelecimentos.length; n++ ) { - EstabelecimentoData estabelecimento = (EstabelecimentoData)JDO.load( EstabelecimentoData.class, estabelecimentos[ n ].getID() ); + EstabelecimentosData estabelecimento = (EstabelecimentosData)JDO.load( EstabelecimentosData.class, estabelecimentos[ n ].getID() ); buff.append( "  NOME: " ); - String nome = (String)estabelecimento.get( EstabelecimentoData.NOME ); + String nome = (String)estabelecimento.get( EstabelecimentosData.NOME ); buff.append( "" + ( nome == null ? "" : nome.trim() ) + "
" ); buff.append( "  MORADA: " ); - morada = (String)estabelecimento.get( EstabelecimentoData.MORADA ); + morada = (String)estabelecimento.get( EstabelecimentosData.MORADA ); buff.append( "" + ( morada == null ? "" : morada.trim() ) + "
" ); buff.append( "  LOCALIDADE: " ); - localidade = (String)estabelecimento.get( EstabelecimentoData.LOCALIDADE ); + localidade = (String)estabelecimento.get( EstabelecimentosData.LOCALIDADE ); buff.append( "" + ( localidade == null ? "" : localidade.trim() ) + "
" ); buff.append( "  C\u00D3DIGO POSTAL: " ); - codigoPostal = (String)estabelecimento.get( EstabelecimentoData.CODIGO_POSTAL ); + codigoPostal = (String)estabelecimento.get( EstabelecimentosData.CODIGO_POSTAL ); buff.append( "" + ( codigoPostal == null ? "" : codigoPostal.trim() ) + "
" ); - contacto = (ContactoData)estabelecimento.get( EstabelecimentoData.CONTACTO ); + contacto = estabelecimento.toContacto_id(); if( contacto == null ) { buff.append( "  TELEFONE:
" ); @@ -390,10 +390,10 @@ public class PesquisasWindow extends JFrame else { buff.append( "  TELEFONE: " ); - String telefone = ( String ) contacto.get( ContactoData.TELEFONE ); + String telefone = ( String ) contacto.get( ContactosData.TELEFONE ); buff.append( "" + ( telefone == null ? "" : telefone.trim() ) + "
" ); buff.append( "  FAX: " ); - String fax = ( String ) contacto.get( ContactoData.TELEFONE ); + String fax = ( String ) contacto.get( ContactosData.TELEFONE ); buff.append( "" + ( fax == null ? "" : fax.trim() ) + "
" ); } int countTrabalhadores[] = provider.countTrabalhadoresEstabelecimentoDezembro( estabelecimentos[ n ].getID(), ano ); diff --git a/trunk/SIPRPSoft/src/siprp/update/UpdateList.java b/trunk/SIPRPSoft/src/siprp/update/UpdateList.java index 86cc7057..c62dc7bd 100644 --- a/trunk/SIPRPSoft/src/siprp/update/UpdateList.java +++ b/trunk/SIPRPSoft/src/siprp/update/UpdateList.java @@ -9,8 +9,6 @@ package siprp.update; -import java.util.Vector; - import siprp.update.updates.V10_0_To_V10_1; import siprp.update.updates.V10_1_To_V10_2; import siprp.update.updates.V10_2_To_V10_3; @@ -32,6 +30,7 @@ import siprp.update.updates.V11_7_To_V11_8; import siprp.update.updates.V11_8_To_V11_9; import siprp.update.updates.V11_9_To_V12_0; import siprp.update.updates.V12_0_To_V12_1; +import siprp.update.updates.V12_1_To_V12_2; import siprp.update.updates.V6_1_To_V7_0; import siprp.update.updates.V7_0_To_V7_2; import siprp.update.updates.V7_2_To_V7_4; @@ -62,14 +61,7 @@ import siprp.update.updates.V9_7_To_V9_8; import siprp.update.updates.V9_8_To_V9_9; import siprp.update.updates.V9_9_To_V10_0; -import com.evolute.utils.Singleton; -import com.evolute.utils.arrays.Virtual2DArray; -import com.evolute.utils.db.DBManager; -import com.evolute.utils.db.Executer; -import com.evolute.utils.sql.Assignment; -import com.evolute.utils.sql.Field; -import com.evolute.utils.sql.Insert; -import com.evolute.utils.sql.Select; +import com.evolute.module.updater.AbstractUpdate; /** @@ -78,8 +70,8 @@ import com.evolute.utils.sql.Select; */ public class UpdateList { - protected static final Update UPDATE_LIST[] = - new Update[]{ + public static final AbstractUpdate UPDATE_LIST[] = + new AbstractUpdate[]{ new V6_1_To_V7_0(), new V7_0_To_V7_2(), new V7_2_To_V7_4(), new V7_4_To_V7_5(), new V7_5_To_V7_6(), new V7_6_To_V7_7(), @@ -104,82 +96,82 @@ public class UpdateList new V11_3_To_V11_4(), new V11_4_To_V11_5(), new V11_5_To_V11_6(), new V11_6_To_V11_7(), new V11_7_To_V11_8(), new V11_8_To_V11_9(), - new V11_9_To_V12_0(),new V12_0_To_V12_1() + new V11_9_To_V12_0(),new V12_0_To_V12_1(), + new V12_1_To_V12_2() }; - - protected static Executer EXECUTER; - protected static double version = -1; - - /** Creates a new instance of Updater */ - private UpdateList() - { - } - - public static double getCurrentVersion() - throws Exception - { - if( version < 0 ) - { - version = getVersion(); - } - return version; - } - - public static Update []getUpdates() - throws Exception - { - if( version < 0 ) - { - version = getVersion(); - } - Vector validUpdates = new Vector(); - for( int n = 0; n < UPDATE_LIST.length; n++ ) - { - if( version <= UPDATE_LIST[ n ].getStartVersion() ) - { - validUpdates.add( UPDATE_LIST[ n ] ); - } - } - return validUpdates.toArray( new Update[ validUpdates.size() ] ); - } - - protected static double getVersion() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - EXECUTER = dbm.getSharedExecuter(); - try - { - return readVersion(); - } - catch( Exception ex ) - { - createVersionTable(); - } - return readVersion(); - } - - protected static double readVersion() - throws Exception - { - Select select = - new Select( new String[]{ "version" }, - new String[]{ "MAX(current_version)" }, - null ); - Virtual2DArray array = EXECUTER.executeQuery( select ); - return ( ( Number ) array.get( 0, 0 ) ).doubleValue(); - } - - protected static void createVersionTable() - throws Exception - { - com.evolute.utils.sql.Update update = - new com.evolute.utils.sql.Update( "CREATE TABLE version( current_version float );" ); - EXECUTER.executeQuery( update ); - Insert insert = - new Insert( "version", - new Assignment[]{ - new Assignment( new Field( "current_version" ), new Double( 0.1 ) ) } ); - EXECUTER.executeQuery( insert ); - } +// +// protected static Executer EXECUTER; +// protected static double version = -1; +// +// private UpdateList() +// { +// } +// +// public static double getCurrentVersion() +// throws Exception +// { +// if( version < 0 ) +// { +// version = getVersion(); +// } +// return version; +// } +// +// public static Update [] getUpdates() +// throws Exception +// { +// if( version < 0 ) +// { +// version = getVersion(); +// } +// Vector validUpdates = new Vector(); +// for( int n = 0; n < UPDATE_LIST.length; n++ ) +// { +// if( version <= UPDATE_LIST[ n ].getStartVersion() ) +// { +// validUpdates.add( UPDATE_LIST[ n ] ); +// } +// } +// return validUpdates.toArray( new Update[ validUpdates.size() ] ); +// } +// +// protected static double getVersion() +// throws Exception +// { +// DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); +// EXECUTER = dbm.getSharedExecuter(); +// try +// { +// return readVersion(); +// } +// catch( Exception ex ) +// { +// createVersionTable(); +// } +// return readVersion(); +// } +// +// protected static double readVersion() +// throws Exception +// { +// Select select = +// new Select( new String[]{ "version" }, +// new String[]{ "MAX(current_version)" }, +// null ); +// Virtual2DArray array = EXECUTER.executeQuery( select ); +// return ( ( Number ) array.get( 0, 0 ) ).doubleValue(); +// } +// +// protected static void createVersionTable() +// throws Exception +// { +// com.evolute.utils.sql.Update update = +// new com.evolute.utils.sql.Update( "CREATE TABLE version( current_version float );" ); +// EXECUTER.executeQuery( update ); +// Insert insert = +// new Insert( "version", +// new Assignment[]{ +// new Assignment( new Field( "current_version" ), new Double( 0.1 ) ) } ); +// EXECUTER.executeQuery( insert ); +// } } diff --git a/trunk/SIPRPSoft/src/siprp/update/UpdateWindow.java b/trunk/SIPRPSoft/src/siprp/update/UpdateWindow.java deleted file mode 100644 index 1dcacb8b..00000000 --- a/trunk/SIPRPSoft/src/siprp/update/UpdateWindow.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * UpdateWindow.java - * - * Created on 26 de Setembro de 2006, 11:54 - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package siprp.update; - -import java.awt.BorderLayout; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -import javax.swing.JButton; -import javax.swing.JFrame; -import javax.swing.JScrollPane; -import javax.swing.JTextArea; -import javax.swing.SwingUtilities; -import javax.swing.WindowConstants; - -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; -import com.evolute.utils.db.Executer; -import com.evolute.utils.sql.Assignment; -import com.evolute.utils.sql.Field; - - -/** - * - * @author fpalma - */ -public class UpdateWindow extends JFrame - implements ActionListener -{ - protected JTextArea logText; - protected JButton closeButton; - - protected Update updates[]; - protected String filename; - - public static void main( String args[] ) - { - UpdateWindow updateWindow = new UpdateWindow(); - updateWindow.update(); - } - - /** Creates a new instance of UpdateWindow */ - public UpdateWindow() - { - setupComponents(); - } - - private void setupComponents() - { - setTitle( "Actualiza\u00e7\u00e3o do Software" ); - setSize( 800, 600 ); - logText = new JTextArea(); - logText.setLineWrap( true ); - logText.setWrapStyleWord( true ); - logText.setEditable( true ); - JScrollPane scp = - new JScrollPane( logText, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, - JScrollPane.HORIZONTAL_SCROLLBAR_NEVER ); - closeButton = new JButton( "Fechar" ); - - setLayout( new BorderLayout() ); - add( scp, BorderLayout.CENTER ); - add( closeButton, BorderLayout.SOUTH ); - - closeButton.setEnabled( false ); - closeButton.addActionListener( this ); - - setDefaultCloseOperation( WindowConstants.DO_NOTHING_ON_CLOSE ); - } - - public void actionPerformed( ActionEvent e ) - { - Object source = e.getSource(); - if( source.equals( closeButton ) ) - { - close(); - } - } - - public void close() - { - SwingUtilities.invokeLater( new Runnable(){ - public void run() - { - setVisible( false ); - dispose(); - } - } ); - } - - public void update() - { - log( "A verificar a exist\u00eancia de actualiza\u00e7\u00f5es...\n" ); - try - { - double version = UpdateList.getCurrentVersion(); - log( "Vers\u00e3o actual: " + ( version < 6.1 ? 6.1 : version ) + "\n" ); - updates = UpdateList.getUpdates(); - } - catch( Exception ex ) - { - setVisible( true ); - log( "Erro a verificar actualiza\u00e7\u00f5es!!!" ); - ex.printStackTrace(); - updates = new Update[ 0 ]; - } - if( updates.length > 0 ) - { - setVisible( true ); - log( "Existe " + ( updates.length > 1 ? "m " : " " ) + updates.length + - " actualiza\u00e7" + ( updates.length > 1 ? "\u00f5es... " : "\u00e3o\n" ) ); - boolean ok = doUpdates(); - if( ok ) - { - log( "**** Actualiza\u00e7\u00f5es terminadas ****\n" ); - } - else - { - log( "**** Actualiza\u00e7\u00f5es abortadas ****\n" ); - log( "\nPode favor contacte a EVOLUTE\n" ); - } - - } - closeButton.setEnabled( true ); - } - - protected void log( final String newLog ) - { - SwingUtilities.invokeLater( new Runnable(){ - public void run() - { - logText.append( newLog ); - } - } ); - } - - protected boolean doUpdates() - { - double last = 0.1; - log( "**** A realizar actualiza\u00e7\u00f5es... **** \n" ); - for( int n = 0; n < updates.length; n++ ) - { - last = updates[ n ].getEndVersion(); - String msg = " " + updates[ n ] + "... \n"; - String changes[] = updates[ n ].listChanges(); - for( int c = 0; c < changes.length; c++ ) - { - msg += " " + changes[ c ] + "\n"; - } - log( msg ); - try - { - updates[ n ].doUpdate(); - } - catch( Exception ex ) - { - log( "ERRO ! ! !\nA abortar actualiza\u00e7\u00f5es\n" ); - String errorToLog = ""; - ex.printStackTrace(); - ex.printStackTrace( System.out ); - if( ex.getStackTrace() != null ) - { - for( StackTraceElement el : ex.getStackTrace() ) - { - errorToLog += el.toString() + "\n"; - } - } - log(errorToLog); - - return false; - } - } - try - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); - com.evolute.utils.sql.Update update = - new com.evolute.utils.sql.Update( "version", - new Assignment[]{ - new Assignment( new Field( "current_version" ), new Double( last ) ) }, - null ); - executer.executeQuery( update ); - log( "Vers\u00e3o actualizada para: " + last + "\n" ); - return true; - } - catch( Exception ex ) - { - log( "ERRO ! ! !\nA abortar actualiza\u00e7\u00f5es\n" ); - ex.printStackTrace(); - return false; - } - } - - public int getUpdateCount() - { - return updates.length; - } -} diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V10_0_To_V10_1.java b/trunk/SIPRPSoft/src/siprp/update/updates/V10_0_To_V10_1.java index 8cf9b7ea..5c1a794c 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V10_0_To_V10_1.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V10_0_To_V10_1.java @@ -1,39 +1,20 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; -public class V10_0_To_V10_1 - implements siprp.update.Update +public class V10_0_To_V10_1 extends AbstractUpdate { public V10_0_To_V10_1() { + super(10.0,10.1,"Adicionadas normalizacoes para estabelecimentos e empresas"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ - "adicionadas normalizacoes para estabelecimentos e empresas" - }; - } - - public double getStartVersion() - { - return 10.0; - } - - public double getEndVersion() - { - return 10.1; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "CREATE TABLE hs_normalizacao_empresa " + @@ -52,8 +33,4 @@ public class V10_0_To_V10_1 executer.executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V10_1_To_V10_2.java b/trunk/SIPRPSoft/src/siprp/update/updates/V10_1_To_V10_2.java index 6a523887..659e2776 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V10_1_To_V10_2.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V10_1_To_V10_2.java @@ -1,39 +1,20 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; -public class V10_1_To_V10_2 - implements siprp.update.Update +public class V10_1_To_V10_2 extends AbstractUpdate { public V10_1_To_V10_2() { + super(10.1,10.2,"Adicionadas normalizacoes para estabelecimentos e empresas"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ - "adicionadas normalizacoes para estabelecimentos e empresas" - }; - } - - public double getStartVersion() - { - return 10.1; - } - - public double getEndVersion() - { - return 10.2; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "CREATE TABLE hs_equipamento( " + @@ -59,8 +40,4 @@ public class V10_1_To_V10_2 executer.executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V10_2_To_V10_3.java b/trunk/SIPRPSoft/src/siprp/update/updates/V10_2_To_V10_3.java index 85f34e67..04c13969 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V10_2_To_V10_3.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V10_2_To_V10_3.java @@ -1,40 +1,21 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; -public class V10_2_To_V10_3 - implements siprp.update.Update +public class V10_2_To_V10_3 extends AbstractUpdate { public V10_2_To_V10_3() { + super(10.2,10.3,"adicionadas normalizacoes duplicadas para planos de actuacao", + "adicionados campos aos tecnicos de higiene e seguranca"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ - "adicionadas normalizacoes duplicadas para planos de actuacao", - "adicionados campos aos tecnicos de higiene e seguranca" - }; - } - - public double getStartVersion() - { - return 10.2; - } - - public double getEndVersion() - { - return 10.3; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "alter table hs_relatorio_equipamento drop constraint hs_relatorio_equipamento_hs_equipamento_fkey; " + @@ -62,8 +43,4 @@ public class V10_2_To_V10_3 executer.executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V10_3_To_V10_4.java b/trunk/SIPRPSoft/src/siprp/update/updates/V10_3_To_V10_4.java index 33f0197a..2ea3c95f 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V10_3_To_V10_4.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V10_3_To_V10_4.java @@ -1,39 +1,20 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; -public class V10_3_To_V10_4 - implements siprp.update.Update +public class V10_3_To_V10_4 extends AbstractUpdate { public V10_3_To_V10_4() { + super(10.3,10.4,"Adicionado campo a empresa (Imprimir tabela alargada)"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ - "adicionado campo a empresa (Imprimir tabela alargada)" - }; - } - - public double getStartVersion() - { - return 10.3; - } - - public double getEndVersion() - { - return 10.4; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "alter table empresas add column imprimir_tabela_alargada boolean;" @@ -41,8 +22,4 @@ public class V10_3_To_V10_4 executer.executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V10_4_To_V10_5.java b/trunk/SIPRPSoft/src/siprp/update/updates/V10_4_To_V10_5.java index d926581d..f2abdbdc 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V10_4_To_V10_5.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V10_4_To_V10_5.java @@ -1,39 +1,20 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; -public class V10_4_To_V10_5 - implements siprp.update.Update +public class V10_4_To_V10_5 extends AbstractUpdate { public V10_4_To_V10_5() { + super(10.4,10.5,"Remocao dos dados de teste dos relatorio de higiene e seguranca"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ - "remocao dos dados de teste dos relatorio de higiene e seguranca" - }; - } - - public double getStartVersion() - { - return 10.4; - } - - public double getEndVersion() - { - return 10.5; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "delete from hs_relatorio_posto_risco; " + @@ -72,8 +53,4 @@ public class V10_4_To_V10_5 executer.executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V10_5_To_V10_6.java b/trunk/SIPRPSoft/src/siprp/update/updates/V10_5_To_V10_6.java index 17e19d20..c11e6524 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V10_5_To_V10_6.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V10_5_To_V10_6.java @@ -2,40 +2,21 @@ package siprp.update.updates; import siprp.higiene.gestao.importacao.Importador; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; -public class V10_5_To_V10_6 - implements siprp.update.Update +public class V10_5_To_V10_6 extends AbstractUpdate { public V10_5_To_V10_6() { + super(10.5,10.6,"Importa\u00e7\u00e3o de riscos e medidas"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ - "Importa\u00e7\u00e3o de riscos e medidas" - }; - } - - public double getStartVersion() - { - return 10.5; - } - - public double getEndVersion() - { - return 10.6; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "alter table hs_medida alter column description type character varying(8192);"); executer.executeQuery( update ); @@ -44,8 +25,4 @@ public class V10_5_To_V10_6 new Importador( executer ).importar(); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V10_6_To_V10_7.java b/trunk/SIPRPSoft/src/siprp/update/updates/V10_6_To_V10_7.java index a00998ea..ba4a776b 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V10_6_To_V10_7.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V10_6_To_V10_7.java @@ -1,39 +1,20 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; -public class V10_6_To_V10_7 - implements siprp.update.Update +public class V10_6_To_V10_7 extends AbstractUpdate { public V10_6_To_V10_7() { + super(10.6,10.7,"Alteracao de tamanho maximo em campos de descricao"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ - "alteracao de tamanho maximo em campos de descricao" - }; - } - - public double getStartVersion() - { - return 10.6; - } - - public double getEndVersion() - { - return 10.7; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "alter table hs_risco alter column description type varchar(8192); " + @@ -50,8 +31,4 @@ public class V10_6_To_V10_7 executer.executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V10_7_To_V10_8.java b/trunk/SIPRPSoft/src/siprp/update/updates/V10_7_To_V10_8.java index 2bb13a50..dadebe7b 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V10_7_To_V10_8.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V10_7_To_V10_8.java @@ -1,39 +1,20 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; -public class V10_7_To_V10_8 - implements siprp.update.Update +public class V10_7_To_V10_8 extends AbstractUpdate { public V10_7_To_V10_8() { + super(10.7,10.8,"relatorio de higiene e seguranca: insercao de valores qualitativos"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ - "relatorio de higiene e seguranca: insercao de valores qualitativos" - }; - } - - public double getStartVersion() - { - return 10.7; - } - - public double getEndVersion() - { - return 10.8; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "insert into hs_relatorio_risco_valor_qualitativo(description) " + @@ -46,8 +27,4 @@ public class V10_7_To_V10_8 executer.executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V10_8_To_V10_9.java b/trunk/SIPRPSoft/src/siprp/update/updates/V10_8_To_V10_9.java index bcabbebd..c501a850 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V10_8_To_V10_9.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V10_8_To_V10_9.java @@ -1,38 +1,20 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; -public class V10_8_To_V10_9 implements siprp.update.Update +public class V10_8_To_V10_9 extends AbstractUpdate { public V10_8_To_V10_9() { + super(10.8,10.9,"relatorio de higiene e seguranca: aumentada a capacidade de texto das requesitos(relatorio)"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ - "relatorio de higiene e seguranca: aumentada a capacidade de texto das requesitos(relatorio)" - }; - } - - public double getStartVersion() - { - return 10.8; - } - - public double getEndVersion() - { - return 10.9; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "alter table hs_relatorio_medida alter column description type varchar(8192); " + @@ -41,9 +23,4 @@ public class V10_8_To_V10_9 implements siprp.update.Update executer.executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } - } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V10_9_To_V11_0.java b/trunk/SIPRPSoft/src/siprp/update/updates/V10_9_To_V11_0.java index caa9fa9b..25278416 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V10_9_To_V11_0.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V10_9_To_V11_0.java @@ -1,38 +1,20 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; -public class V10_9_To_V11_0 implements siprp.update.Update +public class V10_9_To_V11_0 extends AbstractUpdate { public V10_9_To_V11_0() { + super(10.9,11.0,"relatorio de higiene e seguranca: adicionado campo 'funcionarios'"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ - "relatorio de higiene e seguranca: adicionado campo 'funcionarios'" - }; - } - - public double getStartVersion() - { - return 10.9; - } - - public double getEndVersion() - { - return 11.0; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "alter table hs_relatorio add column funcionarios varchar(8192); " @@ -40,9 +22,4 @@ public class V10_9_To_V11_0 implements siprp.update.Update executer.executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } - } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V11_0_To_V11_1.java b/trunk/SIPRPSoft/src/siprp/update/updates/V11_0_To_V11_1.java index 87527fa8..51327a58 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V11_0_To_V11_1.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V11_0_To_V11_1.java @@ -10,9 +10,8 @@ import java.io.ByteArrayOutputStream; import javax.imageio.ImageIO; -import com.evolute.utils.Singleton; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.arrays.Virtual2DArray; -import com.evolute.utils.db.DBManager; import com.evolute.utils.db.Executer; import com.evolute.utils.sql.Assignment; import com.evolute.utils.sql.BlobUpdate; @@ -21,34 +20,18 @@ import com.evolute.utils.sql.Insert; import com.evolute.utils.sql.Select2; import com.evolute.utils.sql.Update; -public class V11_0_To_V11_1 implements siprp.update.Update +public class V11_0_To_V11_1 extends AbstractUpdate { public V11_0_To_V11_1() { + super(11.0,11.1,"A actualizar informacao dos tecnicos de higiene e seguranca"); } - public String []listChanges() - { - return new String[]{ - "A actualizar informacao dos tecnicos de higiene e seguranca" - }; - } - - public double getStartVersion() - { - return 11.0; - } - - public double getEndVersion() - { - return 11.1; - } - + @Override public void doUpdate() throws Exception { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); Update update = new Update( "alter table image alter column image_data drop not null; " @@ -112,9 +95,4 @@ public class V11_0_To_V11_1 implements siprp.update.Update executer.executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } - } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V11_1_To_V11_2.java b/trunk/SIPRPSoft/src/siprp/update/updates/V11_1_To_V11_2.java index e4f57870..09f4b0a0 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V11_1_To_V11_2.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V11_1_To_V11_2.java @@ -2,47 +2,24 @@ package siprp.update.updates; import siprp.higiene.gestao.importacao.Importador; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; -public class V11_1_To_V11_2 implements siprp.update.Update +public class V11_1_To_V11_2 extends AbstractUpdate { public V11_1_To_V11_2() { - } - - public String []listChanges() - { - return new String[]{ - "Higiene e seguranca: a repor datas de submissao dos relatorios" - }; - } - - public double getStartVersion() - { - return 11.1; - } - - public double getEndVersion() - { - return 11.2; + super(11.1,11.2,"Higiene e seguranca: a repor datas de submissao dos relatorios"); } public void doUpdate() throws Exception { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "update hs_relatorio set is_submetido = null;" ); executer.executeQuery( update ); new Importador( executer ).importar(); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } - } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V11_2_To_V11_3.java b/trunk/SIPRPSoft/src/siprp/update/updates/V11_2_To_V11_3.java index 1fabac5c..8db9fe44 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V11_2_To_V11_3.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V11_2_To_V11_3.java @@ -2,38 +2,21 @@ package siprp.update.updates; import siprp.higiene.gestao.importacao.Importador; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; -public class V11_2_To_V11_3 implements siprp.update.Update +public class V11_2_To_V11_3 extends AbstractUpdate { public V11_2_To_V11_3() { + super(11.2,11.3,"Higiene e seguranca: restruturacao"); } - public String []listChanges() - { - return new String[]{ - "Higiene e seguranca: restruturacao" - }; - } - - public double getStartVersion() - { - return 11.2; - } - - public double getEndVersion() - { - return 11.3; - } - + @Override public void doUpdate() throws Exception { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "alter table hs_posto add column is_principal boolean; " + @@ -47,9 +30,4 @@ public class V11_2_To_V11_3 implements siprp.update.Update new Importador( executer ).importar(); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } - } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V11_3_To_V11_4.java b/trunk/SIPRPSoft/src/siprp/update/updates/V11_3_To_V11_4.java index db480647..cd820fd9 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V11_3_To_V11_4.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V11_3_To_V11_4.java @@ -2,38 +2,21 @@ package siprp.update.updates; import siprp.higiene.gestao.importacao.Importador; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; -public class V11_3_To_V11_4 implements siprp.update.Update +public class V11_3_To_V11_4 extends AbstractUpdate { public V11_3_To_V11_4() { + super(11.3,11.4,"Higiene e seguranca: restruturacao"); } - public String []listChanges() - { - return new String[]{ - "Higiene e seguranca: restruturacao" - }; - } - - public double getStartVersion() - { - return 11.3; - } - - public double getEndVersion() - { - return 11.4; - } - + @Override public void doUpdate() throws Exception { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "alter table hs_legislacao_estabelecimento add column ordem int4; " + @@ -43,9 +26,4 @@ public class V11_3_To_V11_4 implements siprp.update.Update new Importador( executer ).importar(); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } - } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V11_4_To_V11_5.java b/trunk/SIPRPSoft/src/siprp/update/updates/V11_4_To_V11_5.java index c735a0a4..8d14aae1 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V11_4_To_V11_5.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V11_4_To_V11_5.java @@ -2,38 +2,20 @@ package siprp.update.updates; import siprp.higiene.gestao.importacao.Importador; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; -public class V11_4_To_V11_5 implements siprp.update.Update +public class V11_4_To_V11_5 extends AbstractUpdate { public V11_4_To_V11_5() { - } - - public String []listChanges() - { - return new String[]{ - "Correc\u00e7\u00e3o de submiss\u00f5es" - }; - } - - public double getStartVersion() - { - return 11.4; - } - - public double getEndVersion() - { - return 11.5; + super(11.4,11.5,"Correc\u00e7\u00e3o de submiss\u00f5es"); } public void doUpdate() throws Exception { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "update hs_relatorio set is_submetido = '2009-09-17 15:21:35.208' where marcacao_id in (2006, 1911,2174);" @@ -42,9 +24,4 @@ public class V11_4_To_V11_5 implements siprp.update.Update new Importador( executer ).importar(); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } - } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V11_5_To_V11_6.java b/trunk/SIPRPSoft/src/siprp/update/updates/V11_5_To_V11_6.java index 0e09b238..b9ddbd94 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V11_5_To_V11_6.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V11_5_To_V11_6.java @@ -2,38 +2,21 @@ package siprp.update.updates; import siprp.higiene.gestao.importacao.Importador; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; -public class V11_5_To_V11_6 implements siprp.update.Update +public class V11_5_To_V11_6 extends AbstractUpdate { public V11_5_To_V11_6() { + super(11.5,11.6,"Adicionadas soft-references aos itens dos relatorios de H&S"); } - public String []listChanges() - { - return new String[]{ - "Adicionadas soft-references aos itens dos relatorios de H&S" - }; - } - - public double getStartVersion() - { - return 11.5; - } - - public double getEndVersion() - { - return 11.6; - } - + @Override public void doUpdate() throws Exception { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "alter table hs_relatorio_risco add column hs_risco_id int4; " + @@ -46,9 +29,4 @@ public class V11_5_To_V11_6 implements siprp.update.Update new Importador( executer ).importar(); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } - } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V11_6_To_V11_7.java b/trunk/SIPRPSoft/src/siprp/update/updates/V11_6_To_V11_7.java index 2376f980..65a533f2 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V11_6_To_V11_7.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V11_6_To_V11_7.java @@ -2,38 +2,21 @@ package siprp.update.updates; import siprp.higiene.gestao.importacao.Importador; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; -public class V11_6_To_V11_7 implements siprp.update.Update +public class V11_6_To_V11_7 extends AbstractUpdate { public V11_6_To_V11_7() { + super(11.6,11.7,"Adicionado suporte para tecnicos superiores de higiene e seguranca"); } - public String []listChanges() - { - return new String[]{ - "Adicionado suporte para tecnicos superiores de higiene e seguranca" - }; - } - - public double getStartVersion() - { - return 11.6; - } - - public double getEndVersion() - { - return 11.7; - } - + @Override public void doUpdate() throws Exception { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "alter table marcacoes_tecnicos_hst add column is_superior char(1); " + @@ -46,9 +29,4 @@ public class V11_6_To_V11_7 implements siprp.update.Update new Importador( executer ).importar(); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } - } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V11_7_To_V11_8.java b/trunk/SIPRPSoft/src/siprp/update/updates/V11_7_To_V11_8.java index 8221ed93..6105b958 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V11_7_To_V11_8.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V11_7_To_V11_8.java @@ -2,38 +2,21 @@ package siprp.update.updates; import siprp.higiene.gestao.importacao.Importador; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; -public class V11_7_To_V11_8 implements siprp.update.Update +public class V11_7_To_V11_8 extends AbstractUpdate { public V11_7_To_V11_8() { + super(11.7,11.8,"Adicionado suporte adicional para tecnicos superiores de higiene e seguranca"); } - public String []listChanges() - { - return new String[]{ - "Adicionado suporte adicional para tecnicos superiores de higiene e seguranca" - }; - } - - public double getStartVersion() - { - return 11.7; - } - - public double getEndVersion() - { - return 11.8; - } - + @Override public void doUpdate() throws Exception { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "alter table marcacoes_estabelecimento add column tecnico_superior_hst int4 " + @@ -43,9 +26,4 @@ public class V11_7_To_V11_8 implements siprp.update.Update new Importador( executer ).importar(); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } - } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V11_8_To_V11_9.java b/trunk/SIPRPSoft/src/siprp/update/updates/V11_8_To_V11_9.java index 2853623f..056708b2 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V11_8_To_V11_9.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V11_8_To_V11_9.java @@ -5,9 +5,8 @@ import java.io.ByteArrayOutputStream; import javax.imageio.ImageIO; -import com.evolute.utils.Singleton; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.arrays.Virtual2DArray; -import com.evolute.utils.db.DBManager; import com.evolute.utils.db.Executer; import com.evolute.utils.sql.Assignment; import com.evolute.utils.sql.BlobUpdate; @@ -15,34 +14,18 @@ import com.evolute.utils.sql.Field; import com.evolute.utils.sql.Insert; import com.evolute.utils.sql.Select2; -public class V11_8_To_V11_9 implements siprp.update.Update +public class V11_8_To_V11_9 extends AbstractUpdate { public V11_8_To_V11_9() { + super(11.8,11.9,"A actualizar informacao dos tecnicos de higiene e seguranca"); } - public String []listChanges() - { - return new String[]{ - "A actualizar informacao dos tecnicos de higiene e seguranca" - }; - } - - public double getStartVersion() - { - return 11.8; - } - - public double getEndVersion() - { - return 11.9; - } - + @Override public void doUpdate() throws Exception { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); Integer assDavidID = null; String assDavid = "Assinatura(David Afonso)"; @@ -75,9 +58,4 @@ public class V11_8_To_V11_9 implements siprp.update.Update executer.executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } - } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V11_9_To_V12_0.java b/trunk/SIPRPSoft/src/siprp/update/updates/V11_9_To_V12_0.java index 26fdfc5a..ec349a95 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V11_9_To_V12_0.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V11_9_To_V12_0.java @@ -6,9 +6,8 @@ import java.util.Vector; import javax.imageio.ImageIO; -import com.evolute.utils.Singleton; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.arrays.Virtual2DArray; -import com.evolute.utils.db.DBManager; import com.evolute.utils.db.Executer; import com.evolute.utils.sql.Assignment; import com.evolute.utils.sql.BlobUpdate; @@ -17,34 +16,18 @@ import com.evolute.utils.sql.Insert; import com.evolute.utils.sql.Select2; import com.evolute.utils.sql.Update; -public class V11_9_To_V12_0 implements siprp.update.Update +public class V11_9_To_V12_0 extends AbstractUpdate { public V11_9_To_V12_0() { + super(11.9,12.0,"A actualizar informacao dos tecnicos de higiene e seguranca"); } - public String []listChanges() - { - return new String[]{ - "A actualizar informacao dos tecnicos de higiene e seguranca" - }; - } - - public double getStartVersion() - { - return 11.9; - } - - public double getEndVersion() - { - return 12.0; - } - + @Override public void doUpdate() throws Exception { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); String nomes[] = new String[]{ "David Afonso", @@ -107,9 +90,4 @@ public class V11_9_To_V12_0 implements siprp.update.Update } } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } - } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V12_0_To_V12_1.java b/trunk/SIPRPSoft/src/siprp/update/updates/V12_0_To_V12_1.java index 9ec76151..ad7c60c8 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V12_0_To_V12_1.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V12_0_To_V12_1.java @@ -6,45 +6,24 @@ import java.util.Vector; import javax.imageio.ImageIO; -import com.evolute.utils.Singleton; -import com.evolute.utils.arrays.Virtual2DArray; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; import com.evolute.utils.sql.Assignment; import com.evolute.utils.sql.BlobUpdate; import com.evolute.utils.sql.Field; -import com.evolute.utils.sql.Insert; -import com.evolute.utils.sql.Select2; -import com.evolute.utils.sql.Update; -public class V12_0_To_V12_1 implements siprp.update.Update +public class V12_0_To_V12_1 extends AbstractUpdate { public V12_0_To_V12_1() { + super(12.0,12.1,"A actualizar assinatura de B\u00e1rbara Gon\u00e7alves"); } - public String []listChanges() - { - return new String[]{ - "A actualizar assinatura de B\u00e1rbara Gon\u00e7alves" - }; - } - - public double getStartVersion() - { - return 12.0; - } - - public double getEndVersion() - { - return 12.1; - } - + @Override public void doUpdate() throws Exception { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); Integer ids[] = new Integer[]{ 129, @@ -72,9 +51,4 @@ public class V12_0_To_V12_1 implements siprp.update.Update } } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } - } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V12_1_To_V12_2.java b/trunk/SIPRPSoft/src/siprp/update/updates/V12_1_To_V12_2.java new file mode 100644 index 00000000..bb7a6174 --- /dev/null +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V12_1_To_V12_2.java @@ -0,0 +1,25 @@ +package siprp.update.updates; + +import com.evolute.module.updater.AbstractUpdate; +import com.evolute.utils.sql.Update; + +public class V12_1_To_V12_2 extends AbstractUpdate +{ + + public V12_1_To_V12_2() + { + super(12.1,12.2, + "A corrigir a tabela de marcacoes de trabalhadores", + "A corrigir a tabela de avisos", + "A corrigir a tabela de exames"); + } + + @Override + public void doUpdate() throws Exception + { + executeQuery( new Update( "ALTER TABLE marcacoes_trabalhador ADD CONSTRAINT marcacoes_trabalhador_trabalhador_id_fkey FOREIGN KEY (trabalhador_id) REFERENCES trabalhadores (id); " ) ); + executeQuery( new Update( "ALTER TABLE avisos ADD CONSTRAINT avisos_trabalhador_id_fkey FOREIGN KEY (trabalhador_id) REFERENCES trabalhadores (id); " ) ); + executeQuery( new Update( "ALTER TABLE exames ADD CONSTRAINT exames_trabalhador_id_fkey FOREIGN KEY (trabalhador_id) REFERENCES trabalhadores(id); " ) ); + } + +} diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V6_1_To_V7_0.java b/trunk/SIPRPSoft/src/siprp/update/updates/V6_1_To_V7_0.java index 0fa15d9e..0cd34a03 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V6_1_To_V7_0.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V6_1_To_V7_0.java @@ -9,8 +9,7 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; @@ -18,39 +17,20 @@ import com.evolute.utils.db.Executer; * * @author fpalma */ -public class V6_1_To_V7_0 - implements siprp.update.Update +public class V6_1_To_V7_0 extends AbstractUpdate { - /** - * Creates a new instance of V6_1_To_V7_0 - */ public V6_1_To_V7_0() { + super(6.1,7.0,"Acrescentar campo de contribuinte nos prestadores", + "Acrescentar campo de prestador nas marca\u00e7\u00f5es", + "Acrescentar campo de prestador no hist\u00f3rico das marca\u00e7\u00f5es"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ "Acrescentar campo de contribuinte nos prestadores", - "Acrescentar campo de prestador nas marca\u00e7\u00f5es", - "Acrescentar campo de prestador no hist\u00f3rico das marca\u00e7\u00f5es"}; - } - - public double getStartVersion() - { - return 6.1; - } - - public double getEndVersion() - { - return 7.0; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "ALTER TABLE prestadores ADD contribuinte VARCHAR(64);" ); executer.executeQuery( update ); @@ -60,8 +40,4 @@ public class V6_1_To_V7_0 executer.executeQuery( update ); } - public String toString() - { - return "v6.1 para v7.0"; - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V7_0_To_V7_2.java b/trunk/SIPRPSoft/src/siprp/update/updates/V7_0_To_V7_2.java index 2bcb004c..f636627b 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V7_0_To_V7_2.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V7_0_To_V7_2.java @@ -9,8 +9,7 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; @@ -18,37 +17,18 @@ import com.evolute.utils.db.Executer; * * @author fpalma */ -public class V7_0_To_V7_2 - implements siprp.update.Update +public class V7_0_To_V7_2 extends AbstractUpdate { - - /** - * Creates a new instance of V7_0_To_V7_2 - */ + public V7_0_To_V7_2() { + super(7.0,7.2,"Criar tabela dos processos"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ "Criar tabela dos processos" }; - } - - public double getStartVersion() - { - return 7.0; - } - - public double getEndVersion() - { - return 7.2; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "CREATE TABLE marcacoes_processo " @@ -67,8 +47,4 @@ public class V7_0_To_V7_2 executer.executeQuery( update ); } - public String toString() - { - return "v7.0 para v7.2"; - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V7_2_To_V7_4.java b/trunk/SIPRPSoft/src/siprp/update/updates/V7_2_To_V7_4.java index bf21eb40..56c08183 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V7_2_To_V7_4.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V7_2_To_V7_4.java @@ -9,8 +9,7 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; @@ -18,38 +17,19 @@ import com.evolute.utils.db.Executer; * * @author fpalma */ -public class V7_2_To_V7_4 - implements siprp.update.Update +public class V7_2_To_V7_4 extends AbstractUpdate { - /** - * Creates a new instance of V7_2_To_V7_4 - */ public V7_2_To_V7_4() { - } - - public String []listChanges() - { - return new String[]{ "Acrescentar campo de motivo ao processo", - "Criar tabelas de suporte aos processos"}; - } - - public double getStartVersion() - { - return 7.2; - } - - public double getEndVersion() - { - return 7.4; + super(7.2,7.4,"Acrescentar campo de motivo ao processo", + "Criar tabelas de suporte aos processos"); } public void doUpdate() throws Exception { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "ALTER TABLE marcacoes_processo RENAME TO trabalhadores_processo;" ); @@ -202,8 +182,4 @@ public class V7_2_To_V7_4 } - public String toString() - { - return "v7.2 para v7.4"; - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V7_4_To_V7_5.java b/trunk/SIPRPSoft/src/siprp/update/updates/V7_4_To_V7_5.java index 56902912..8c8370de 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V7_4_To_V7_5.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V7_4_To_V7_5.java @@ -9,8 +9,7 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; @@ -18,37 +17,18 @@ import com.evolute.utils.db.Executer; * * @author fpalma */ -public class V7_4_To_V7_5 - implements siprp.update.Update +public class V7_4_To_V7_5 extends AbstractUpdate { - /** - * Creates a new instance of V7_4_To_V7_5 - */ public V7_4_To_V7_5() { - } - - public String []listChanges() - { - return new String[]{ "Ligar processo a ficha de aptid\u00e3o" }; - } - - public double getStartVersion() - { - return 7.4; - } - - public double getEndVersion() - { - return 7.5; + super( 7.4,7.5,"Ligar processo a ficha de aptid\u00e3o"); } public void doUpdate() throws Exception { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "CREATE TABLE trabalhadores_fichas_aptidao" @@ -65,8 +45,4 @@ public class V7_4_To_V7_5 executer.executeQuery( update ); } - public String toString() - { - return "v7.4 para v7.5"; - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V7_5_To_V7_6.java b/trunk/SIPRPSoft/src/siprp/update/updates/V7_5_To_V7_6.java index 497f3783..0d46f4ef 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V7_5_To_V7_6.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V7_5_To_V7_6.java @@ -9,8 +9,7 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; @@ -18,45 +17,22 @@ import com.evolute.utils.db.Executer; * * @author fpalma */ -public class V7_5_To_V7_6 - implements siprp.update.Update +public class V7_5_To_V7_6 extends AbstractUpdate { - /** - * Creates a new instance of V7_5_To_V7_6 - */ public V7_5_To_V7_6() { + super(7.5,7.6,"Alterar tabela dos processos"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ "Alterar tabela dos processos" }; - } - - public double getStartVersion() - { - return 7.5; - } - - public double getEndVersion() - { - return 7.6; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "ALTER TABLE trabalhadores_processo ADD sub_motivo int4;" ); executer.executeQuery( update ); } - public String toString() - { - return "v7.5 para v7.6"; - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V7_6_To_V7_7.java b/trunk/SIPRPSoft/src/siprp/update/updates/V7_6_To_V7_7.java index f393c465..41b57180 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V7_6_To_V7_7.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V7_6_To_V7_7.java @@ -9,8 +9,7 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; import com.evolute.utils.sql.Assignment; import com.evolute.utils.sql.Field; @@ -19,37 +18,18 @@ import com.evolute.utils.sql.Field; * * @author lflores */ -public class V7_6_To_V7_7 - implements siprp.update.Update +public class V7_6_To_V7_7 extends AbstractUpdate { - /** - * Creates a new instance of V7_6_To_V7_7 - */ public V7_6_To_V7_7() { + super(7.6,7.7,"Alterar tabela dos exames e criar tabela exames_portaria"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ "Alterar tabela dos exames e criar tabela exames_portaria" }; - } - - public double getStartVersion() - { - return 7.6; - } - - public double getEndVersion() - { - return 7.7; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "ALTER TABLE exames ADD fo BYTEA;" ); @@ -64,8 +44,4 @@ public class V7_6_To_V7_7 executer.executeQuery( insert ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V7_7_To_V7_8.java b/trunk/SIPRPSoft/src/siprp/update/updates/V7_7_To_V7_8.java index 72c7893a..1f8c2c06 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V7_7_To_V7_8.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V7_7_To_V7_8.java @@ -9,46 +9,25 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; /** * * @author lflores */ -public class V7_7_To_V7_8 - implements siprp.update.Update +public class V7_7_To_V7_8 extends AbstractUpdate { - /** - * Creates a new instance of V7_7_To_V7_8 - */ public V7_7_To_V7_8() { + super(7.7,7.8,"Alterar tabela das datas de exames para incluir o prestador", + "Alterar tabela das datas de consulta para incluir o prestador"); } - public String []listChanges() + public void doUpdate() throws Exception { - return new String[]{ "Alterar tabela das datas de exames para incluir o prestador", - "Alterar tabela das datas de consulta para incluir o prestador"}; - } - - public double getStartVersion() - { - return 7.7; - } - - public double getEndVersion() - { - return 7.8; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "ALTER TABLE trabalhadores_ecds_datas ADD prestador_id INTEGER REFERENCES prestadores( id );" ); @@ -59,8 +38,4 @@ public class V7_7_To_V7_8 } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V7_8_To_V7_9.java b/trunk/SIPRPSoft/src/siprp/update/updates/V7_8_To_V7_9.java index c98b022e..938f1946 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V7_8_To_V7_9.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V7_8_To_V7_9.java @@ -9,45 +9,25 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; /** * * @author fpalma */ -public class V7_8_To_V7_9 - implements siprp.update.Update +public class V7_8_To_V7_9 extends AbstractUpdate { - /** - * Creates a new instance of V7_8_To_V7_9 - */ public V7_8_To_V7_9() { + super(7.8,7.9,"Alterar tabela dos estabelecimentos para ter prestadores por defeito"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ "Alterar tabela dos estabelecimentos para ter prestadores por defeito"}; - } - - public double getStartVersion() - { - return 7.8; - } - - public double getEndVersion() - { - return 7.9; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "ALTER TABLE estabelecimentos ADD prestador_consulta_id INTEGER REFERENCES prestadores( id );" ); @@ -74,8 +54,4 @@ public class V7_8_To_V7_9 executer.executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V7_9_To_V8_0.java b/trunk/SIPRPSoft/src/siprp/update/updates/V7_9_To_V8_0.java index 8423db84..c10af2a9 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V7_9_To_V8_0.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V7_9_To_V8_0.java @@ -9,45 +9,25 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; /** * * @author fpalma */ -public class V7_9_To_V8_0 - implements siprp.update.Update +public class V7_9_To_V8_0 extends AbstractUpdate { - /** - * Creates a new instance of V7_9_To_V8_0 - */ public V7_9_To_V8_0() { + super(7.9,8.0,"Alterar tabela dos ecds"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ "Alterar tabela dos ecds"}; - } - - public double getStartVersion() - { - return 7.9; - } - - public double getEndVersion() - { - return 8.0; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "ALTER TABLE trabalhadores_ecd DROP CONSTRAINT trabalhadores_ecd_trabalhadores_ecds_id_fkey;" ); @@ -66,8 +46,4 @@ public class V7_9_To_V8_0 executer.executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V8_0_To_V8_1.java b/trunk/SIPRPSoft/src/siprp/update/updates/V8_0_To_V8_1.java index 177c3baa..1cd5ae0f 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V8_0_To_V8_1.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V8_0_To_V8_1.java @@ -9,57 +9,31 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; -import com.evolute.utils.db.Executer; +import com.evolute.module.updater.AbstractUpdate; /** * * @author fpalma */ -public class V8_0_To_V8_1 - implements siprp.update.Update +public class V8_0_To_V8_1 extends AbstractUpdate { - /** - * Creates a new instance of V8_0_To_V8_1 - */ public V8_0_To_V8_1() { + super(8.0,8.1,"Alterar tabela dos ecds"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ "Alterar tabela dos ecds"}; - } - - public double getStartVersion() - { - return 8.0; - } - - public double getEndVersion() - { - return 8.1; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "CREATE SEQUENCE trabalhadores_ecd_id_seq;" ); - executer.executeQuery( update ); + getExecuter().executeQuery( update ); update = new com.evolute.utils.sql.Update( "ALTER TABLE trabalhadores_ecd ALTER COLUMN id SET DEFAULT NEXTVAL('trabalhadores_ecd_id_seq');" ); - executer.executeQuery( update ); + getExecuter().executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V8_1_To_V8_2.java b/trunk/SIPRPSoft/src/siprp/update/updates/V8_1_To_V8_2.java index 4289e9fc..bc70145b 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V8_1_To_V8_2.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V8_1_To_V8_2.java @@ -9,8 +9,7 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; import com.evolute.utils.sql.Delete; @@ -18,37 +17,18 @@ import com.evolute.utils.sql.Delete; * * @author fpalma */ -public class V8_1_To_V8_2 - implements siprp.update.Update +public class V8_1_To_V8_2 extends AbstractUpdate { - /** - * Creates a new instance of V8_1_To_V8_2 - */ public V8_1_To_V8_2() { + super(8.1,8.2,"Alterar tabela dos ecds", "Alterar tabela de marca\u00e7\u00e3o dos ecds"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ "Alterar tabela dos ecds", "Alterar tabela de marca\u00e7\u00e3o dos ecds" }; - } - - public double getStartVersion() - { - return 8.1; - } - - public double getEndVersion() - { - return 8.2; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "ALTER TABLE trabalhadores_ecd ADD enviado CHAR(1);" ); @@ -89,8 +69,4 @@ public class V8_1_To_V8_2 executer.executeQuery( delete ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V8_2_To_V8_3.java b/trunk/SIPRPSoft/src/siprp/update/updates/V8_2_To_V8_3.java index 86bb1850..10534d55 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V8_2_To_V8_3.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V8_2_To_V8_3.java @@ -1,44 +1,22 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; -import com.evolute.utils.db.Executer; +import com.evolute.module.updater.AbstractUpdate; /** * * @author fpalma */ -public class V8_2_To_V8_3 - implements siprp.update.Update +public class V8_2_To_V8_3 extends AbstractUpdate { - /** - * Creates a new instance of V8_2_To_V8_3 - */ public V8_2_To_V8_3() { + super(8.2,8.3,"Criar tabela para locais de an\u00e1lise"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ "Criar tabela para locais de an\u00e1lise" }; - } - - public double getStartVersion() - { - return 8.2; - } - - public double getEndVersion() - { - return 8.3; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "CREATE TABLE trabalhadores_ecds_analise" @@ -57,11 +35,7 @@ public class V8_2_To_V8_3 + ") " + "WITHOUT OIDS; " + "ALTER TABLE trabalhadores_ecds_analise OWNER TO postgres;" ); - executer.executeQuery( update ); + getExecuter().executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V8_3_To_V8_4.java b/trunk/SIPRPSoft/src/siprp/update/updates/V8_3_To_V8_4.java index e00b0096..7563bdf3 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V8_3_To_V8_4.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V8_3_To_V8_4.java @@ -1,47 +1,24 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; -import com.evolute.utils.db.Executer; +import com.evolute.module.updater.AbstractUpdate; /** * * @author tsimao * */ -public class V8_3_To_V8_4 implements siprp.update.Update +public class V8_3_To_V8_4 extends AbstractUpdate { public V8_3_To_V8_4() { + super(8.3,8.4,"Adicionado analisador [prestador] por TrabalhadorEcd"); } - public String[] listChanges() - { - return new String[] { - "Adicionado analisador [prestador] por TrabalhadorEcd" - }; - } - - public double getStartVersion() - { - return 8.3; - } - - public double getEndVersion() - { - return 8.4; - } - + @Override public void doUpdate() throws Exception { - DBManager dbm = (DBManager) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "ALTER TABLE trabalhadores_ecd ADD COLUMN analisador_id int4;" + "ALTER TABLE trabalhadores_ecd ADD CONSTRAINT analisador_id_fkey FOREIGN KEY(analisador_id) REFERENCES prestadores(id);" ); - executer.executeQuery( update ); - } - - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); + getExecuter().executeQuery( update ); } + } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V8_4_To_V8_5.java b/trunk/SIPRPSoft/src/siprp/update/updates/V8_4_To_V8_5.java index 1a2463eb..6d2e542b 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V8_4_To_V8_5.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V8_4_To_V8_5.java @@ -1,48 +1,25 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; -import com.evolute.utils.db.Executer; +import com.evolute.module.updater.AbstractUpdate; /** * * @author tsimao * */ -public class V8_4_To_V8_5 implements siprp.update.Update +public class V8_4_To_V8_5 extends AbstractUpdate { public V8_4_To_V8_5() { + super(8.4,8.5,"Adicionado analisador [prestador] por PrtGruposProtocolo"); } - public String[] listChanges() - { - return new String[] { - "Adicionado analisador [prestador] por PrtGruposProtocolo" - }; - } - - public double getStartVersion() - { - return 8.4; - } - - public double getEndVersion() - { - return 8.5; - } - + @Override public void doUpdate() throws Exception { - DBManager dbm = (DBManager) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "ALTER TABLE prt_grupos_protocolo ADD COLUMN analisador_id int4;" + "ALTER TABLE prt_grupos_protocolo ADD CONSTRAINT analisador_id_fkey FOREIGN KEY(analisador_id) REFERENCES prestadores(id);" ); - executer.executeQuery( update ); - } - - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); + getExecuter().executeQuery( update ); } + } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V8_5_To_V8_6.java b/trunk/SIPRPSoft/src/siprp/update/updates/V8_5_To_V8_6.java index 8065d2ef..4a9a098b 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V8_5_To_V8_6.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V8_5_To_V8_6.java @@ -1,51 +1,28 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; -import com.evolute.utils.db.Executer; +import com.evolute.module.updater.AbstractUpdate; /** * * @author tsimao * */ -public class V8_5_To_V8_6 implements siprp.update.Update +public class V8_5_To_V8_6 extends AbstractUpdate { public V8_5_To_V8_6() { + super(8.5,8.6,"Adicionado campo 'activo' a TrabalhadoresProcesso\n"+ + "Adicionada observacao a Prestadores\n"+ + "Adicionado BI a Trabalhadores\n"); } - public String[] listChanges() - { - return new String[] { - "Adicionado campo 'activo' a TrabalhadoresProcesso\n"+ - "Adicionada observacao a Prestadores\n"+ - "Adicionado BI a Trabalhadores\n" - }; - } - - public double getStartVersion() - { - return 8.5; - } - - public double getEndVersion() - { - return 8.6; - } - + @Override public void doUpdate() throws Exception { - DBManager dbm = (DBManager) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "ALTER TABLE trabalhadores_processo ADD COLUMN activo char default 'y';" + "ALTER TABLE prestadores ADD COLUMN observacoes character varying(65535);" + "ALTER TABLE trabalhadores ADD COLUMN bi character varying(255);"); - executer.executeQuery( update ); - } - - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); + getExecuter().executeQuery( update ); } + } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V8_6_To_V8_7.java b/trunk/SIPRPSoft/src/siprp/update/updates/V8_6_To_V8_7.java index b8fbf9a1..4c252f76 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V8_6_To_V8_7.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V8_6_To_V8_7.java @@ -1,56 +1,30 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; -import com.evolute.utils.db.Executer; +import com.evolute.module.updater.AbstractUpdate; /** * * @author fpalma */ -public class V8_6_To_V8_7 - implements siprp.update.Update +public class V8_6_To_V8_7 extends AbstractUpdate { - /** - * Creates a new instance of V8_6_To_V8_7 - */ public V8_6_To_V8_7() { + super(8.6,8.7,"Adicionados campos data_envio e data_recepcao a cada instancia de ECD"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ "Adicionados campos data_envio e data_recepcao a cada instancia de ECD" }; - } - - public double getStartVersion() - { - return 8.6; - } - - public double getEndVersion() - { - return 8.7; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "ALTER TABLE trabalhadores_ecd ADD data_envio DATE;" ); - executer.executeQuery( update ); + getExecuter().executeQuery( update ); update = new com.evolute.utils.sql.Update( "ALTER TABLE trabalhadores_ecd ADD data_recepcao DATE;" ); - executer.executeQuery( update ); + getExecuter().executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V8_7_To_V8_8.java b/trunk/SIPRPSoft/src/siprp/update/updates/V8_7_To_V8_8.java index 6502b7e0..9eaf5b2b 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V8_7_To_V8_8.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V8_7_To_V8_8.java @@ -1,56 +1,30 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; -import com.evolute.utils.db.Executer; +import com.evolute.module.updater.AbstractUpdate; /** * * @author fpalma */ -public class V8_7_To_V8_8 - implements siprp.update.Update +public class V8_7_To_V8_8 extends AbstractUpdate { - /** - * Creates a new instance of V8_6_To_V8_7 - */ public V8_7_To_V8_8() { + super(8.7,8.8,"Adicionada coluna em 'lembretes' que referencia nova tabela das marcacoes (trabalhadores_consultas_datas)"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ "Adicionada coluna em 'lembretes' que referencia nova tabela das marcacoes (trabalhadores_consultas_datas)" }; - } - - public double getStartVersion() - { - return 8.7; - } - - public double getEndVersion() - { - return 8.8; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "ALTER TABLE lembretes ADD COLUMN trabalhadores_consultas_datas_id int4 REFERENCES trabalhadores_consultas_datas(id);" ); - executer.executeQuery( update ); + getExecuter().executeQuery( update ); update = new com.evolute.utils.sql.Update( "ALTER TABLE lembretes ADD COLUMN trabalhadores_ecds_datas_id int4 REFERENCES trabalhadores_ecds_datas(id);" ); - executer.executeQuery( update ); + getExecuter().executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V8_8_To_V8_9.java b/trunk/SIPRPSoft/src/siprp/update/updates/V8_8_To_V8_9.java index bf6d8f3f..2863db86 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V8_8_To_V8_9.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V8_8_To_V8_9.java @@ -1,52 +1,26 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; -import com.evolute.utils.db.Executer; +import com.evolute.module.updater.AbstractUpdate; /** * * @author fpalma */ -public class V8_8_To_V8_9 - implements siprp.update.Update +public class V8_8_To_V8_9 extends AbstractUpdate { - /** - * Creates a new instance of V8_6_To_V8_7 - */ public V8_8_To_V8_9() { + super(8.8,8.9,"Adicionada coluna em 'lembretes' para marcar lembretes já tratados"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ "Adicionada coluna em 'lembretes' para marcar lembretes já tratados" }; - } - - public double getStartVersion() - { - return 8.8; - } - - public double getEndVersion() - { - return 8.9; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "alter table lembretes add column deleted_date timestamp;" ); - executer.executeQuery( update ); + getExecuter().executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V8_9_To_V9_0.java b/trunk/SIPRPSoft/src/siprp/update/updates/V8_9_To_V9_0.java index 3827ec48..8b299e4e 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V8_9_To_V9_0.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V8_9_To_V9_0.java @@ -1,52 +1,31 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; -import com.evolute.utils.db.Executer; +import com.evolute.module.updater.AbstractUpdate; /** * * @author fpalma */ -public class V8_9_To_V9_0 - implements siprp.update.Update +public class V8_9_To_V9_0 extends AbstractUpdate { public V8_9_To_V9_0() { + super(8.9,9.0, "Criar tabela 'posto_de_trabalho'", + "Criar tabela 'legislacao'", + "Criar tabela relacional 'posto_de_trabalho_estabelecimento'", + "Criar tabela relacional 'legislacao_estabelecimento'", + "Criar tabela 'medida'", + "Criar tabela 'risco'", + "Criar tabela 'medida'", + "Criar tabela relacional 'risco_medida'", + "Criar tabela 'image'", + "Adicionar logotipo a empresa"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ - "Criar tabela 'posto_de_trabalho'", - "Criar tabela 'legislacao'", - "Criar tabela relacional 'posto_de_trabalho_estabelecimento'", - "Criar tabela relacional 'legislacao_estabelecimento'", - "Criar tabela 'medida'", - "Criar tabela 'risco'", - "Criar tabela 'medida'", - "Criar tabela relacional 'risco_medida'", - "Criar tabela 'image'", - "Adicionar logotipo a empresa" - }; - } - - public double getStartVersion() - { - return 8.9; - } - - public double getEndVersion() - { - return 9.0; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "create table email_plano_de_actuacao(" + @@ -94,11 +73,7 @@ public class V8_9_To_V9_0 ");" + "alter table empresas add column empresa_logo_id int4 REFERENCES image(id);" ); - executer.executeQuery( update ); + getExecuter().executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V9_0_To_V9_1.java b/trunk/SIPRPSoft/src/siprp/update/updates/V9_0_To_V9_1.java index 8d67a739..d800c233 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V9_0_To_V9_1.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V9_0_To_V9_1.java @@ -1,44 +1,22 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; -import com.evolute.utils.db.Executer; +import com.evolute.module.updater.AbstractUpdate; /** * * @author fpalma */ -public class V9_0_To_V9_1 - implements siprp.update.Update +public class V9_0_To_V9_1 extends AbstractUpdate { public V9_0_To_V9_1() { + super(9.0,9.1,"Refactorizar tabelas de higiene e seguranca","Criar novas tabelas de higiene e seguranca"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ - "Refactorizar tabelas de higiene e seguranca", - "Criar novas tabelas de higiene e seguranca" - }; - } - - public double getStartVersion() - { - return 9.0; - } - - public double getEndVersion() - { - return 9.1; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "drop table risco_medida;" + @@ -130,11 +108,7 @@ public class V9_0_To_V9_1 " CONSTRAINT hs_legislacao_estabelecimento_pkey PRIMARY KEY(legislacao_id, estabelecimento_id)" + ");" ); - executer.executeQuery( update ); + getExecuter().executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V9_1_To_V9_2.java b/trunk/SIPRPSoft/src/siprp/update/updates/V9_1_To_V9_2.java index 29436924..77ddef5f 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V9_1_To_V9_2.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V9_1_To_V9_2.java @@ -1,43 +1,22 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; -import com.evolute.utils.db.Executer; +import com.evolute.module.updater.AbstractUpdate; /** * * @author fpalma */ -public class V9_1_To_V9_2 - implements siprp.update.Update +public class V9_1_To_V9_2 extends AbstractUpdate { public V9_1_To_V9_2() { + super(9.1,9.2,"Soft-delete nas tabelas de higiene e saude"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ - "Soft-delete nas tabelas de higiene e saude" - }; - } - - public double getStartVersion() - { - return 9.1; - } - - public double getEndVersion() - { - return 9.2; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "alter table hs_area add column deleted_date timestamp;" + @@ -52,11 +31,7 @@ public class V9_1_To_V9_2 "alter table hs_risco add column deleted_date timestamp;" + "alter table hs_risco_tema add column deleted_date timestamp;" ); - executer.executeQuery( update ); + getExecuter().executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V9_2_To_V9_3.java b/trunk/SIPRPSoft/src/siprp/update/updates/V9_2_To_V9_3.java index dc4dca5f..b88d5760 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V9_2_To_V9_3.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V9_2_To_V9_3.java @@ -1,43 +1,22 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; -import com.evolute.utils.db.Executer; +import com.evolute.module.updater.AbstractUpdate; /** * * @author fpalma */ -public class V9_2_To_V9_3 - implements siprp.update.Update +public class V9_2_To_V9_3 extends AbstractUpdate { public V9_2_To_V9_3() { + super(9.2,9.3,"Adicionados campos ao relatorio"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ - "Adicionados campos ao relatorio" - }; - } - - public double getStartVersion() - { - return 9.2; - } - - public double getEndVersion() - { - return 9.3; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "alter table hs_relatorio_medida drop column severidade;" + @@ -56,11 +35,7 @@ public class V9_2_To_V9_3 "alter table hs_relatorio_risco add column valor_qualitativo_id int4 REFERENCES hs_relatorio_risco_valor_qualitativo;" + "alter table hs_relatorio_risco add column is_plano_actuacao char(1);" ); - executer.executeQuery( update ); + getExecuter().executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V9_3_To_V9_4.java b/trunk/SIPRPSoft/src/siprp/update/updates/V9_3_To_V9_4.java index 3bef558f..7226bb77 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V9_3_To_V9_4.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V9_3_To_V9_4.java @@ -1,43 +1,22 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; -import com.evolute.utils.db.Executer; +import com.evolute.module.updater.AbstractUpdate; /** * * @author fpalma */ -public class V9_3_To_V9_4 - implements siprp.update.Update +public class V9_3_To_V9_4 extends AbstractUpdate { public V9_3_To_V9_4() { + super(9.3,9.4,"Adicionados postos de trabalho relatorio"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ - "Adicionados postos de trabalho relatorio" - }; - } - - public double getStartVersion() - { - return 9.3; - } - - public double getEndVersion() - { - return 9.4; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "create table hs_relatorio_medida_area" + @@ -52,11 +31,7 @@ public class V9_3_To_V9_4 " area_id int4 REFERENCES hs_relatorio_medida_area(id)" + ");" ); - executer.executeQuery( update ); + getExecuter().executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V9_4_To_V9_5.java b/trunk/SIPRPSoft/src/siprp/update/updates/V9_4_To_V9_5.java index 0d21d416..26646bdc 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V9_4_To_V9_5.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V9_4_To_V9_5.java @@ -1,43 +1,21 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; -import com.evolute.utils.db.Executer; +import com.evolute.module.updater.AbstractUpdate; /** * * @author fpalma */ -public class V9_4_To_V9_5 - implements siprp.update.Update +public class V9_4_To_V9_5 extends AbstractUpdate { public V9_4_To_V9_5() { + super(9.4,9.5,"Refactorizacao do relatorio"); } - public String []listChanges() + public void doUpdate() throws Exception { - return new String[]{ - "Refactorizacao do relatorio" - }; - } - - public double getStartVersion() - { - return 9.4; - } - - public double getEndVersion() - { - return 9.5; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "drop table hs_relatorio_medida_posto;" + @@ -70,11 +48,7 @@ public class V9_4_To_V9_5 " CONSTRAINT hs_relatorio_posto_risco_pkey PRIMARY KEY (posto_id,risco_id)" + ");" ); - executer.executeQuery( update ); + getExecuter().executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V9_5_To_V9_6.java b/trunk/SIPRPSoft/src/siprp/update/updates/V9_5_To_V9_6.java index 4b355636..bc25d4ac 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V9_5_To_V9_6.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V9_5_To_V9_6.java @@ -1,43 +1,22 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; -import com.evolute.utils.db.Executer; +import com.evolute.module.updater.AbstractUpdate; /** * * @author fpalma */ -public class V9_5_To_V9_6 - implements siprp.update.Update +public class V9_5_To_V9_6 extends AbstractUpdate { public V9_5_To_V9_6() { + super(9.5,9.6,"Relacao postoDeTrabalho <-> estabelecimento"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ - "Relacao postoDeTrabalho <-> estabelecimento" - }; - } - - public double getStartVersion() - { - return 9.5; - } - - public double getEndVersion() - { - return 9.6; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "create table hs_posto_estabelecimento(" + @@ -46,11 +25,7 @@ public class V9_5_To_V9_6 " CONSTRAINT hs_posto_estabelecimento_pkey PRIMARY KEY(posto_id,estabelecimento_id)" + ");" ); - executer.executeQuery( update ); + getExecuter().executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V9_6_To_V9_7.java b/trunk/SIPRPSoft/src/siprp/update/updates/V9_6_To_V9_7.java index 6088724f..a9c66d17 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V9_6_To_V9_7.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V9_6_To_V9_7.java @@ -1,43 +1,21 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; -import com.evolute.utils.db.Executer; +import com.evolute.module.updater.AbstractUpdate; /** * * @author fpalma */ -public class V9_6_To_V9_7 - implements siprp.update.Update +public class V9_6_To_V9_7 extends AbstractUpdate { public V9_6_To_V9_7() { + super(9.6,9.7,"Relacao postoDeTrabalho <-> medida"); } - public String []listChanges() + public void doUpdate() throws Exception { - return new String[]{ - "Relacao postoDeTrabalho <-> medida" - }; - } - - public double getStartVersion() - { - return 9.6; - } - - public double getEndVersion() - { - return 9.7; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "drop table hs_posto_risco;" + @@ -52,7 +30,7 @@ public class V9_6_To_V9_7 " CONSTRAINT hs_relatorio_posto_medida_pkey PRIMARY KEY(posto_id,medida_id)" + ");" ); - executer.executeQuery( update ); + getExecuter().executeQuery( update ); } public String toString() diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V9_7_To_V9_8.java b/trunk/SIPRPSoft/src/siprp/update/updates/V9_7_To_V9_8.java index 15057f26..2528dbe3 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V9_7_To_V9_8.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V9_7_To_V9_8.java @@ -1,43 +1,22 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; -import com.evolute.utils.db.Executer; +import com.evolute.module.updater.AbstractUpdate; /** * * @author fpalma */ -public class V9_7_To_V9_8 - implements siprp.update.Update +public class V9_7_To_V9_8 extends AbstractUpdate { public V9_7_To_V9_8() { + super(9.7,9.8,"Relacao postoDeTrabalho <-> risco"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ - "Relacao postoDeTrabalho <-> risco" - }; - } - - public double getStartVersion() - { - return 9.7; - } - - public double getEndVersion() - { - return 9.8; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "create table hs_posto_risco(" + @@ -54,11 +33,7 @@ public class V9_7_To_V9_8 "insert into hs_relatorio_risco_valor_qualitativo (description) values('Incontrolado');" + "insert into hs_relatorio_risco_valor_qualitativo (description) values('Indeterminado');" ); - executer.executeQuery( update ); + getExecuter().executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V9_8_To_V9_9.java b/trunk/SIPRPSoft/src/siprp/update/updates/V9_8_To_V9_9.java index a0443d8e..1a8c0f7f 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V9_8_To_V9_9.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V9_8_To_V9_9.java @@ -1,43 +1,24 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; /** * * @author fpalma */ -public class V9_8_To_V9_9 - implements siprp.update.Update +public class V9_8_To_V9_9 extends AbstractUpdate { public V9_8_To_V9_9() { + super(9.8,9.9,"Criacao de tabelas para associacao de emails e riscos a empresas"); } - public String []listChanges() + @Override + public void doUpdate() throws Exception { - return new String[]{ - "Criacao de tabelas para associacao de emails e riscos a empresas" - }; - } - - public double getStartVersion() - { - return 9.8; - } - - public double getEndVersion() - { - return 9.9; - } - - public void doUpdate() - throws Exception - { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "alter table hs_posto_medida add column is_plano_actuacao char(1); " + @@ -64,8 +45,4 @@ public class V9_8_To_V9_9 executer.executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } } diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V9_9_To_V10_0.java b/trunk/SIPRPSoft/src/siprp/update/updates/V9_9_To_V10_0.java index af3a0dee..4f5018fe 100644 --- a/trunk/SIPRPSoft/src/siprp/update/updates/V9_9_To_V10_0.java +++ b/trunk/SIPRPSoft/src/siprp/update/updates/V9_9_To_V10_0.java @@ -1,43 +1,25 @@ package siprp.update.updates; -import com.evolute.utils.Singleton; -import com.evolute.utils.db.DBManager; +import com.evolute.module.updater.AbstractUpdate; import com.evolute.utils.db.Executer; /** * * @author fpalma */ -public class V9_9_To_V10_0 - implements siprp.update.Update +public class V9_9_To_V10_0 extends AbstractUpdate { public V9_9_To_V10_0() { + super(9.9,10.0,"extensao da definicao de 'relatorio de higiene e seguranca'"); } - public String []listChanges() - { - return new String[]{ - "extensao da definicao de 'relatorio de higiene e seguranca'" - }; - } - - public double getStartVersion() - { - return 9.9; - } - - public double getEndVersion() - { - return 10.0; - } - + @Override public void doUpdate() throws Exception { - DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER ); - Executer executer = dbm.getSharedExecuter(); + Executer executer = getExecuter(); com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "create table hs_relatorio_legislacao( " + @@ -69,8 +51,4 @@ public class V9_9_To_V10_0 executer.executeQuery( update ); } - public String toString() - { - return "v" + getStartVersion() + " para v" + getEndVersion(); - } }